Index: trunk/HiggsSignals-2/example_programs/HS_mass.f90 =================================================================== --- trunk/HiggsSignals-2/example_programs/HS_mass.f90 (revision 596) +++ trunk/HiggsSignals-2/example_programs/HS_mass.f90 (revision 597) @@ -1,173 +1,173 @@ !-------------------------------------------------------------------------------------- ! This example program is part of HiggsSignals (TS 26/09/2013). !-------------------------------------------------------------------------------------- program HS_mass ! In this example the peak-centered chi^2 method is applied to a SM-like Higgs boson ! (overall signal strength scale factor mu) within the mass range 110 - 140 GeV. ! All three mass pdf choices are considered. Theoretical mass uncertainties and ! assignment range can be changed. !-------------------------------------------------------------------------------------- use theory_colliderSfunctions use usefulbits, only : vsmall use pc_chisq, only : print_cov_mh_to_file,print_cov_mu_to_file,print_inverse_cov_mh_to_file,& & get_peakchi2, print_corr_mu_to_file use io, only : get_number_of_observables,get_ID_of_peakobservable,get_peakinfo_from_HSresults implicit none integer :: nHzero, nHplus, i, j, k, ii, jj double precision :: obsratio, mass, Lambda double precision :: SMGammaTotal double precision :: Mh,GammaTotal,ghjss_s,ghjss_p,ghjcc_s,ghjcc_p, & & ghjbb_s,ghjbb_p,ghjtt_s,ghjtt_p, & & ghjmumu_s,ghjmumu_p,ghjtautau_s,ghjtautau_p, & & ghjWW,ghjZZ,ghjZga,ghjgaga,ghjgg, & & ghjhiZ character(len=100)::filename double precision :: dm integer :: pdf integer :: ntotal, npeakmu, npeakmh, nmpred, nanalyses, ID, domH, nHcomb, Nassigned double precision :: Chisq_peak_mu, Chisq_peak_mh, Chisq_peak, Pvalue_peak double precision :: Chisq_STXS_rates, Chisq_STXS_mh, Chisq_STXS, Pvalue_STXS double precision :: Chisq_LHCRun1_mu, Chisq_LHCRun1_mh, Chisq_LHCRun1, Pvalue_LHCRun1 integer :: nobs_STXS, nobs_peak, nobs_LHCRun1 double precision :: mupred double precision, allocatable :: csqmu(:),csqmh(:),csqmax(:),csqtot(:) integer, allocatable :: ncomb(:) !-HiggsBounds internal functions to obtain SM branching ratios double precision :: SMBR_Htoptop,SMBR_Hss, SMBR_Hcc, SMBR_Hbb, SMBR_Hmumu, SMBR_Htautau,& & SMBR_HWW, SMBR_HZZ, SMBR_HZgam, SMBR_Hgamgam, SMBR_Hgg,SMGamma_h logical :: use_assignmentrange nHzero=1 nHplus=0 !---- Initialize HiggsSignals and pass the name of the experimental analysis folder ----! call initialize_HiggsSignals(nHzero,nHplus,"LHC13") ! call initialize_HiggsSignals(nHzero,nHplus,"latestresults-1.4.0-LHCinclusive") !---- Set the output level (0: silent, 1: screen output, 2: even more output,...) ----! call setup_output_level(0) !--Enter the Higgs mass and its theory uncertainty here: dm = 1.0D0 Lambda = 1.0D0 use_assignmentrange = .False. !---- Pass the Higgs mass uncertainty to HiggsSignals ----! call HiggsSignals_neutral_input_MassUncertainty(dm) !---- Set the assignment range for various observables ----! ! Could have different values, too... if(use_assignmentrange) then call setup_assignmentrange(Lambda) call setup_assignmentrange_massobservables(Lambda) call setup_assignmentrange_LHCrun1(Lambda) call setup_assignmentrange_STXS(Lambda) else Lambda = 0.0D0 endif ! Normalize rate prediction w.r.t. predicted Higgs mass (for any mass): call setup_rate_normalization(.False.,.False.) ! Instead, normalize rate prediction w.r.t. observed Higgs mass (for any predicted mass): ! call setup_rate_normalization(.True.,.True.) do pdf=1,3 !---- Set the Higgs mass parametrization (1: box, 2:gaussian, 3:box+gaussian) ----! call setup_pdf(pdf) select case(pdf) case(1) filename='results/HS_mass_pdf1.dat' case(2) filename='results/HS_mass_pdf2.dat' case(3) filename='results/HS_mass_pdf3.dat' case default end select open(21,file=filename) write(21,*) '# mh dmh Chisq_mu Chisq_mh Chisq Nassigned ndf Lambda' write(21,*) '#----------------------------------------------------' - do j=1,101 !181,181! - mh = 120.0D0 +(j-1)*0.1D0 - + do j=1,81 !181,181! +! mh = 120.0D0 +(j-1)*0.1D0 + mh = 123.0D0 +(j-1)*0.05D0 SMGammaTotal=SMGamma_h(Mh) ! SMGamma_h(Mh), SMBR_Hgg(Mh), SMBR_Hgg(Mh) are set to -1 if called ! with Mh out of range [0.8 GeV, 500 GeV]. The calculation is then bypassed. if(.not. (SMGammaTotal .lt. 0)) then ghjss_s=1.0d0 ghjss_p=0.0d0 ghjcc_s=1.0d0 ghjcc_p=0.0d0 ghjbb_s=1.0d0 ghjbb_p=0.0d0 ghjtt_s=1.0d0 ghjtt_p=0.0d0 ghjmumu_s=1.0d0 ghjmumu_p=0.0d0 ghjtautau_s=1.0d0 ghjtautau_p=0.0d0 ghjWW=1.0d0 ghjZZ=1.0d0 ghjZga=1.0d0 ghjgg=1.0d0 ghjhiZ=0d0 ghjgaga=1.0d0 call HiggsBounds_neutral_input_properties(Mh,SMGammaTotal) call HiggsBounds_neutral_input_effC( & & ghjss_s,ghjss_p,ghjcc_s,ghjcc_p, & & ghjbb_s,ghjbb_p,ghjtt_s,ghjtt_p, & & ghjmumu_s,ghjmumu_p, & & ghjtautau_s,ghjtautau_p, & & ghjWW,ghjZZ,ghjZga, & & ghjgaga,ghjgg,ghjhiZ) call run_HiggsSignals(1, Chisq_peak_mu, Chisq_peak_mh, Chisq_peak, nobs_peak, & & Pvalue_peak) call run_HiggsSignals_LHC_Run1_combination(Chisq_LHCRun1_mu, Chisq_LHCRun1_mh, & & Chisq_LHCRun1, nobs_LHCRun1, Pvalue_LHCRun1) call run_HiggsSignals_STXS(Chisq_STXS_rates, Chisq_STXS_mh, Chisq_STXS,& & nobs_STXS, Pvalue_STXS) call complete_HS_results() ! PEAK OBSERVABLES ONLY! call get_number_of_observables(ntotal, npeakmu, npeakmh, nmpred, nanalyses) allocate(csqmu(npeakmu),csqmh(npeakmu),csqmax(npeakmu),csqtot(npeakmu),ncomb(npeakmu)) Nassigned=0 do ii=1,npeakmu call get_ID_of_peakobservable(ii, ID) call get_peakinfo_from_HSresults(ID, mupred, domH, nHcomb) ncomb(ii)=nHcomb call get_peakchi2(ID, csqmu(ii), csqmh(ii), csqmax(ii), csqtot(ii)) Nassigned=Nassigned+nHcomb enddo deallocate(csqmu,csqmh,csqmax,csqtot,ncomb) write(21,*) mh,dm,Chisq_peak_mu+Chisq_STXS_rates+Chisq_LHCRun1_mu,& & Chisq_peak_mh+Chisq_STXS_mh+Chisq_LHCRun1_mh,& & Chisq_peak+Chisq_STXS+Chisq_LHCRun1,Nassigned,& & nobs_peak+nobs_STXS+nobs_LHCRun1,Lambda endif enddo close(21) enddo write(*,*) "Finishing HiggsSignals..." call finish_HiggsSignals end program HS_mass Index: trunk/HiggsSignals-2/example_programs/results/plot_2Higgses.py =================================================================== --- trunk/HiggsSignals-2/example_programs/results/plot_2Higgses.py (revision 596) +++ trunk/HiggsSignals-2/example_programs/results/plot_2Higgses.py (revision 597) @@ -1,89 +1,97 @@ import matplotlib.pyplot as plt import pylab as P import numpy as np P.rc('text', usetex=True) P.rc('text.latex', preamble='\usepackage{amsmath}\usepackage{color}') font = {'size' : 14} P.rc('font', **font) P.rc('grid', linewidth=1,color='#666666') data1 = np.loadtxt("2Higgses_pdf1.dat") data1T = zip(*data1) data2 = np.loadtxt("2Higgses_pdf2.dat") data2T = zip(*data2) data3 = np.loadtxt("2Higgses_pdf3.dat") data3T = zip(*data3) plt.close('all') fig, axes = plt.subplots(nrows = 2, ncols = 3,sharex='col',sharey='row') # fig.clf() # for a in axes: # for aa in a: # aa.axis('off') # plt.tick_params(axis='both', left='off', top='off', right='off', bottom='off', labelleft='off', labeltop='off', labelright='off', labelbottom='off') # plt.show() plts = [[0,0,data1T,8,"Box pdf (1)"],\ [0,1,data2T,8,"Gaussian pdf (2)"],\ [0,2,data3T,8,"Box+Gaussian pdf (3)"],\ [1,0,data1T,11,""],\ [1,1,data2T,11,""],\ [1,2,data3T,11,""]] +# plts = [[0,0,data1T,7,"Box pdf (1)"],\ +# [0,1,data2T,7,"Gaussian pdf (2)"],\ +# [0,2,data3T,7,"Box+Gaussian pdf (3)"],\ +# [1,0,data1T,11,""],\ +# [1,1,data2T,11,""],\ +# [1,2,data3T,11,""]] + + for p in plts: # print p # axes[p[0],p[1]].cla() # axes[p[0],p[1]].scatter(p[2][0],p[2][1]) chi2min = min(p[2][p[3]]) minindex = p[2][p[3]].index(chi2min) print chi2min, p[2][0][minindex],p[2][1][minindex] # if p[0] == 1: # make these tick labels invisible # axes[p[0],p[1]].cla() # plt.setp(axes[p[0],p[1]].get_xticklabels(), visible=False) # 1/2sigma filled regions: axes[p[0],p[1]].tricontourf(p[2][0],p[2][1],map(lambda d: d-chi2min, p[2][p[3]]),levels=np.arange(0,10,step=0.5),cmap=plt.cm.YlOrRd)#,colors=['green','yellow','none'] # 1/2sigma contours: axes[p[0],p[1]].tricontour(p[2][0],p[2][1],map(lambda d: d-chi2min, p[2][p[3]]),levels=[2.3,5.99],colors=['k','k'],linewidths=2) axes[p[0],p[1]].plot(p[2][0][minindex],p[2][1][minindex],'*',markersize=10,color='w') axes[p[0],p[1]].set_xlim([min(p[2][0]),max(p[2][0])]) axes[p[0],p[1]].set_ylim([min(p[2][1]),max(p[2][1])]) axes[p[0],p[1]].set_xticks(np.arange(min(p[2][0]),max(p[2][0])+1,step=1.)) axes[p[0],p[1]].set_yticks(np.arange(min(p[2][1]),max(p[2][1])+1,step=1.)) # axes[p[0],p[1]].relim() axes[p[0],p[1]].grid() if p[0] == 1: axes[p[0],p[1]].set_xlabel(r'$M_1~[\mathrm{GeV}]$') if p[1] == 0: axes[p[0],p[1]].set_ylabel(r'$M_2~[\mathrm{GeV}]$') if p[0] == 0: axes[p[0],p[1]].set_title(p[4],fontsize=14) # make these tick labels invisible # plt.setp(axes[p[0],p[1]].get_xticklabels(), visible=False) # axes[p[0],p[1]].label_outer() plt.subplots_adjust(hspace=0.10, wspace=0.20) # # fig.tight_layout() plt.savefig('2Higgses.pdf') Index: trunk/HiggsSignals-2/example_programs/results/plot_HS_mass.py =================================================================== --- trunk/HiggsSignals-2/example_programs/results/plot_HS_mass.py (revision 596) +++ trunk/HiggsSignals-2/example_programs/results/plot_HS_mass.py (revision 597) @@ -1,47 +1,47 @@ import matplotlib.pyplot as plt import pylab as P import numpy as np P.rc('text', usetex=True) P.rc('text.latex', preamble='\usepackage{amsmath}\usepackage{color}') font = {'size' : 16} P.rc('font', **font) P.rc('grid', linewidth=1,color='#666666') files = ["HS_mass_pdf1.dat",\ "HS_mass_pdf2.dat",\ "HS_mass_pdf3.dat"] -ls = [ ['red','solid'], ['green','dashed'],['blue','dotted']] +ls = [ ['blue','dotted'], ['red','solid'], ['green','dashed']] labels = ['box', 'Gaussian', 'box+Gaussian'] fig, ax = plt.subplots() for i,f in enumerate(files): data = np.loadtxt(f) dataT = zip(*data) chi2min = min(dataT[4]) print chi2min # minindex = dataT[5].index(chi2min) ax.plot(dataT[0],dataT[4],color=ls[i][0],linestyle=ls[i][1], linewidth=2, label=labels[i]) ax.set_xlim([min(dataT[0]),max(dataT[0])]) # ax.set_ylim([0.,200.]) if dataT[7][0] == 0: ax.text(0.02,1.015,r"$\Delta m_H^\text{theo} = "+format(dataT[1][0],'4.2f')+"~\mathrm{GeV}$, $\Lambda = \mathrm{default}$",transform=ax.transAxes) else: ax.text(0.02,1.015,r"$\Delta m_H^\text{theo} = "+format(dataT[1][0],'4.2f')+"~\mathrm{GeV}$, $\Lambda = "+format(dataT[7][0],'3.1f')+"$",transform=ax.transAxes) # ax.text(0.42,1.02,r",transform=ax.transAxes) plt.grid() leg = plt.legend(fancybox = True, fontsize=14, loc=3) leg.get_frame().set_alpha(0.5) plt.xlabel(r'$m_{H}~[\mathrm{GeV}]$') plt.ylabel(r'$\chi^2$') plt.savefig('HS_mass.pdf') Index: trunk/HiggsSignals-2/example_programs/HS_2Higgses.f90 =================================================================== --- trunk/HiggsSignals-2/example_programs/HS_2Higgses.f90 (revision 596) +++ trunk/HiggsSignals-2/example_programs/HS_2Higgses.f90 (revision 597) @@ -1,156 +1,159 @@ !-------------------------------------------------------------------------------------- ! This example program is part of HiggsSignals (TS 30/10/2014). ! ! In this example we scan over the masses of two Higgs bosons, for fixed values of ! universal signal strength scale factors (scale1, scale2) and theoretical mass un- ! certainties (dm(1), dm(2)). We loop over the three different pdf choices. ! The output (total chi^2) can be plotted by using the gnuplot script plot_2Higgses.gnu. !-------------------------------------------------------------------------------------- program HS_2Higgses !-------------------------------------------------------------------------------------- use theory_colliderSfunctions use usefulbits, only : vsmall use usefulbits_hs, only : HSres use pc_chisq, only : print_inverse_cov_mh_to_file, get_masschi2_from_separation implicit none integer :: nHzero, nHplus, ndf, i, j, k, ii, jj double precision :: obsratio, mass, Pvalue, Chisq, mu, Chisq_mu, Chisq_mh double precision :: Chisq_mu_LHCRun1, Chisq_mh_LHCRun1, Chisq_LHCRun1, Pvalue_LHCRun1 double precision :: Chisq_STXS_rates, Chisq_STXS_mh, Chisq_STXS, Pvalue_STXS integer :: nobs_LHCRun1, nobs_STXS double precision :: SMGammaTotal(2) double precision :: scale_bbh, scale_ggh, dggh, dbbh double precision :: Mh(2),GammaTotal(2),ghjss_s(2),ghjss_p(2),ghjcc_s(2),ghjcc_p(2), & & ghjbb_s(2),ghjbb_p(2),ghjtt_s(2),ghjtt_p(2), & & ghjmumu_s(2),ghjmumu_p(2),ghjtautau_s(2),ghjtautau_p(2), & & ghjWW(2),ghjZZ(2),ghjZga(2),ghjgaga(2),ghjgg(2), & & ghjhiZ(2,2) character(len=100)::filename character(len=1)::pdfchar double precision :: dm(2) integer :: pdf !-HiggsBounds internal functions to obtain SM branching ratios double precision :: SMBR_Htoptop,SMBR_Hss, SMBR_Hcc, SMBR_Hbb, SMBR_Hmumu, SMBR_Htautau,& & SMBR_HWW, SMBR_HZZ, SMBR_HZgam, SMBR_Hgamgam, SMBR_Hgg,SMGamma_h double precision :: scale1, scale2, csq_sep nHzero=2 nHplus=0 !--Enter the Higgs mass and its theory uncertainty here: Mh = (/ 125.0D0, 125.0D0 /) - dm = (/ 1.0D0, 1.0D0 /) + dm = (/ 0.5D0, 0.5D0 /) ! dm = (/ 0.0D0, 0.0D0 /) !---- Initialize HiggsSignals and pass the name of the experimental analysis folder ----! call initialize_HiggsSignals(nHzero,nHplus,"LHC13") !---- Set the output level (0: silent, 1: screen output, 2: even more output,...) ----! call setup_output_level(0) ! call setup_anticorrelations_in_mh(1) ! call setup_assignmentrange_massobservables(2.0D0) ! Always normalize rate prediction w.r.t. to predicted Higgs mass call setup_rate_normalization(.False.,.False.) !---- Pass the Higgs mass uncertainty to HiggsSignals ----! call HiggsSignals_neutral_input_MassUncertainty(dm) ! Set number of free parameters (for p-value evaluation) call setup_nparam(2) - do pdf = 1,3 + do pdf = 2,2 !---- Set the Higgs mass parametrization (1: box, 2:gaussian, 3:box+gaussian) ----! call setup_pdf(pdf) write(pdfchar,'(I1)') pdf filename='results/2Higgses_pdf'//pdfchar//'.dat' open(21,file=trim(adjustl(filename))) write(21,*) '# Mh(1) Mh(2) dm(1) dm(2) scale(1) scale(2) chisq_mu chisq_mh chisq ndf Pvalue chisq_sep' write(21,*) '#--------------------------------------------------------------------------' - scale1 = sqrt(0.5D0) + scale1 = sqrt(0.75D0) scale2 = sqrt(1.0D0-scale1**2.0D0) ghjss_s(1) = scale1 ghjss_s(2) = scale2 ghjss_p=0.0d0 ghjcc_s(1) = scale1 ghjcc_s(2) = scale2 ghjcc_p=0.0d0 ghjbb_s(1) = scale1 ghjbb_s(2) = scale2 ghjbb_p=0.0d0 ghjtt_s(1) = scale1 ghjtt_s(2) = scale2 ghjtt_p=0.0d0 ghjmumu_s(1) = scale1 ghjmumu_s(2) = scale2 ghjmumu_p=0.0d0 ghjtautau_s(1) = scale1 ghjtautau_s(2) = scale2 ghjtautau_p=0.0d0 ghjWW(1) = scale1 ghjWW(2) = scale2 ghjZZ(1) = scale1 ghjZZ(2) = scale2 ghjZga(1) = scale1 ghjZga(2) = scale2 ghjgg(1) = scale1 ghjgg(2) = scale2 ! ghjggZ(1) = scale1 ! ghjggZ(2) = scale2 ghjhiZ=0d0 ghjgaga(1) = scale1 ghjgaga(2) = scale2 - do i=1,17 - do j=1,17 - Mh(1) = 123.0D0 + (i-1)*0.25D0 - Mh(2) = 123.0D0 + (j-1)*0.25D0 + do i=1,41!,16 + do j=1,41!16 + Mh(1) = 124D0 + (i-1)*0.05D0 + Mh(2) = 124D0 + (j-1)*0.05D0 + +! Mh(1) = 123.5D0 + (i-1)*0.2D0 +! Mh(2) = 123.5D0 + (j-1)*0.2D0 SMGammaTotal(1)=SMGamma_h(Mh(1)) SMGammaTotal(2)=SMGamma_h(Mh(2)) !----Calculate the new total decay width: GammaTotal(1) = SMGammaTotal(1)*(1 + & & (ghjWW(1)**2.0D0 - 1)*SMBR_HWW(Mh(1))+(ghjZZ(1)**2.0D0 - 1)*SMBR_HZZ(Mh(1)) + & & (ghjgg(1)**2.0D0 - 1)*SMBR_Hgg(Mh(1))+(ghjtt_s(1)**2.0D0 - 1)*SMBR_Htoptop(Mh(1))+ & & (ghjbb_s(1)**2.0D0 - 1)*SMBR_Hbb(Mh(1))+(ghjtautau_s(1)**2.0D0 - 1)*SMBR_Htautau(Mh(1))+ & & (ghjss_s(1)**2.0D0 - 1)*SMBR_Hss(Mh(1))+(ghjcc_s(1)**2.0D0 - 1)*SMBR_Hcc(Mh(1))+ & & (ghjZga(1)**2.0D0 - 1)*SMBR_HZgam(Mh(1))+(ghjmumu_s(1)**2.0D0 - 1)*SMBR_Hmumu(Mh(1))+ & & (ghjgaga(1)**2.0D0 - 1)*SMBR_Hgamgam(Mh(1)) ) GammaTotal(2) = SMGammaTotal(2)*(1 + & & (ghjWW(2)**2.0D0 - 1)*SMBR_HWW(Mh(2))+(ghjZZ(2)**2.0D0 - 1)*SMBR_HZZ(Mh(2)) + & & (ghjgg(2)**2.0D0 - 1)*SMBR_Hgg(Mh(2))+(ghjtt_s(2)**2.0D0 - 1)*SMBR_Htoptop(Mh(2))+ & & (ghjbb_s(2)**2.0D0 - 1)*SMBR_Hbb(Mh(2))+(ghjtautau_s(2)**2.0D0 - 1)*SMBR_Htautau(Mh(2))+ & & (ghjss_s(2)**2.0D0 - 1)*SMBR_Hss(Mh(2))+(ghjcc_s(2)**2.0D0 - 1)*SMBR_Hcc(Mh(2))+ & & (ghjZga(2)**2.0D0 - 1)*SMBR_HZgam(Mh(2))+(ghjmumu_s(2)**2.0D0 - 1)*SMBR_Hmumu(Mh(2))+ & & (ghjgaga(2)**2.0D0 - 1)*SMBR_Hgamgam(Mh(2)) ) call HiggsBounds_neutral_input_properties(Mh,GammaTotal,(/1, 1/)) call HiggsBounds_neutral_input_effC( & & ghjss_s,ghjss_p,ghjcc_s,ghjcc_p, & & ghjbb_s,ghjbb_p,ghjtt_s,ghjtt_p, & & ghjmumu_s,ghjmumu_p, & & ghjtautau_s,ghjtautau_p, & & ghjWW,ghjZZ,ghjZga, & & ghjgaga,ghjgg,ghjhiZ) call run_HiggsSignals( 1, Chisq_mu, Chisq_mh, Chisq, ndf, Pvalue) call run_HiggsSignals_LHC_Run1_combination(Chisq_mu_LHCRun1, Chisq_mh_LHCRun1, Chisq_LHCRun1, nobs_LHCRun1, Pvalue_LHCRun1) call run_HiggsSignals_STXS(Chisq_STXS_rates, Chisq_STXS_mh, Chisq_STXS, nobs_STXS, Pvalue_STXS) call complete_HS_results() call get_masschi2_from_separation(csq_sep) write(21,*) Mh,dm,scale1,scale2,HSres(1)%Chisq_mu,HSres(1)%Chisq_mh,HSres(1)%Chisq,HSres(1)%nobs-2,HSres(1)%Pvalue, csq_sep enddo enddo close(21) enddo write(*,*) "Finishing HiggsSignals..." call finish_HiggsSignals end program HS_2Higgses Index: trunk/HiggsSignals-2/usefulbits_HS.f90 =================================================================== --- trunk/HiggsSignals-2/usefulbits_HS.f90 (revision 596) +++ trunk/HiggsSignals-2/usefulbits_HS.f90 (revision 597) @@ -1,552 +1,552 @@ !-------------------------------------------------------------------- ! This file is part of HiggsSignals (TS 03/03/2013) !-------------------------------------------------------------------- module usefulbits_HS !-------------------------------------------------------------------- implicit none - character(LEN=9),parameter :: HSvers='2.2.2beta' + character(LEN=9),parameter :: HSvers='2.2.3beta' integer,parameter :: f_dmh=94 character(LEN=4) :: runmode character(LEN=100) :: Exptdir !-------------------------------------------------------------------- !------------------ User Control parameters ------------------- !-------------------------------------------------------------------- ! Note: values can be changed with specific user subroutines. logical :: usescalefactor = .False. logical :: symmetricerrors = .False. logical :: useaveragemass = .True. logical :: correlations_mu = .True. logical :: correlations_mh = .True. logical :: normalize_rates_to_reference_position = .False. logical :: normalize_rates_to_reference_position_outside_dmtheo = .False. ! If false, the reference mass value will be mobs +- dmtheo (depending on predicted mass) logical :: LHC_combination_run1_SMXS_from_paper = .False. double precision :: assignmentrange = 1.0D0 ! This gives the mass range ! (in standard deviations), in which ! the Higgs is forced to be assigned to ! a peak observable. - double precision :: assignmentrange_massobs = 5.0D0 + double precision :: assignmentrange_massobs = 1.0D0 ! This gives the mass range ! (in standard deviations), in which ! the Higgs is forced to be assigned to ! peak observables, which have a mass ! measurement. - double precision :: assignmentrange_LHCrun1 = 2.5D0 + double precision :: assignmentrange_LHCrun1 = 3.0D0 ! This gives the mass range ! (in standard deviations), in which ! the Higgs is forced to be assigned to ! peak observables, which have a mass ! measurement. double precision :: assignmentrange_STXS = 1.0D0 double precision :: mu_cutoff_for_assignment = 1.0D-03 integer :: output_level = 0 integer :: iterations = 0 ! default value: 0 ! 1 -> try to assign as many Higgs bosons as possible to ! the observable, Higgs-to-peak assignment is based on ! Higg mass covariance matrices with maximal ! correlations. ! >1 -> use the covariance matrix of previous iteration. integer :: pdf = 2 ! default value: 2 ! will automatically be set to 2 if not changed by the user ! via using subroutine set_pdf before. ! (1,2,3) = (box, gaussian, theory-box + exp-gaussian) integer :: Nparam = 0 ! Number of free model parameters (entering the Pvalue) ! Can be specified directly here or via the subroutine ! setup_nparam !------------------- For internal debugging/testing ----------------- logical :: withcorrexpsyst = .True. !(correlated experimental systematics) logical :: anticorrmu = .True. logical :: anticorrmh = .True. !-- sleeping features -- logical :: useSMweights = .False. logical :: minimalchisq = .False. logical :: maximalchisq = .False. logical :: additional_output = .False. !(outdated, to be removed!) logical :: useSMtest = .False. double precision :: eps ! logical :: use_SMrate_at_reference_position_for_STXS = .False. !-------------------- Internal Control parameters -------------------- logical :: usetoys = .False. !(outdated, to be removed!) logical :: absolute_errors = .False. ! Errors treated to original mu value, or toy-value logical :: SLHAdetailed = .False. logical :: newSLHAfile = .False. logical :: THU_included = .True. !-------------------------------------------------------------------- integer :: nanalys !Total number of relevant analyses double precision, parameter :: vlarge=1000000000000.0D0 !--------------------- Default rate uncertainties ------------------- type rate_uncertainties !- dCS_SM and dBR_SM for the SM !- (from LHC HXSWG Yellow Report 3, arXiv:1307.1347) !- dCS and dBR hold the model's rate uncertainties. Can be changed by user !- with subroutine setup_rate_uncertainties. Default values are those of the SM. double precision :: dCS_SM(5) = (/ 0.147D0, 0.028D0, 0.037D0, 0.060D0, 0.12D0 /) double precision :: dCS(5) = (/ 0.147D0, 0.028D0, 0.037D0, 0.060D0, 0.12D0 /) !- EDIT (TS 21/06/2013): Add new decay modes: !- Channels: gammagamma, WW, ZZ, tautau, bb, Zgamma, cc, mumu, gg double precision :: dBR_SM(9) = (/ 0.054D0, 0.048D0, 0.048D0, 0.061D0, 0.028D0,& & 0.090D0, 0.122D0, 0.060D0, 0.100D0 /) double precision :: dBR(9) = (/ 0.054D0, 0.048D0, 0.048D0, 0.061D0, 0.028D0,& & 0.090D0, 0.122D0, 0.060D0, 0.100D0 /) !--- IMPORTANT NOTE: !- !- The arrays dCS_SM, dCS, dBR_SM, dBR have been introduced in HiggsSignals-1.0.0 !- to hold the estimated theoretical uncertainties. These do not include correlations !- via parametric uncertainties (e.g. scale, PDFs,...) or correlations in the BRs introduced !- by the uncertainty of the total widths. !- !- Since HiggsSignals-1.1.0 the theoretical uncertainties for the cross sections and !- branching ratios are evaluated with toy MC scripts including the correlations of !- parametric error sources. The resulting covariance matrices are included per default !- if the files "BRcov.in" and "XScov.in" are present in the main HiggsSignals directory. !- If not, HiggsSignals will give a warning and use the old method. !- The covariance matrices can also be re-evaluated by the user with the scripts !- "smearErrorsBR.cpp" and "smearErrorsXS.cpp", which can be found in the directory !- /supplements/ !- !--- logical :: BRcov_ok=.False. logical :: CScov_ok=.False. logical :: usecov =.True. double precision, dimension(9,9) :: BRcovSM = 0.0D0 double precision, dimension(9,9) :: BRcov = 0.0D0 double precision, dimension(11,11) :: CScovSM = 0.0D0 double precision, dimension(11,11) :: CScov = 0.0D0 double precision, dimension(11,11) :: CS13covSM = 0.0D0 double precision, dimension(11,11) :: CS13cov = 0.0D0 !--- ILC cross section uncertainties (under development) !--- (none, none, WBF, ZH, ttH) double precision :: dCS_ILC_SM(5) = (/ 0.0D0, 0.0D0, 0.0D0, 0.0D0, 0.0D0 /) double precision :: dCS_ILC(5) = (/ 0.0D0, 0.0D0, 0.01D0, 0.005D0, 0.01D0 /) end type type(rate_uncertainties), save :: delta_rate type LHCrun1 ! rate measurements integer :: channel_id double precision :: r, r_low, dr_low, r_up, dr_up double precision :: r_pred, dr, dr0 end type type(LHCrun1), dimension(20) :: LHCrun1_rates double precision, dimension(20,20) :: LHCrun1_correlationmatrix = 0.0D0 type correlation_info integer :: obsID1, obsID2 double precision :: corr end type type(correlation_info), allocatable :: corrlist(:) !-------------- Type definitions of internal structures -------------- type neutHiggs double precision :: m, dm, mu integer :: mp_test ! This variable is set to 1 (0) if the Higgs is (not) being tested in the m-pred chi^2 method. integer :: id end type !-Will contain info about all neutral Higgs for every considered observable, i.e. !-neutHiggses has dimensions (number(observables),nH) type(neutHiggs), allocatable :: neutHiggses(:,:) type mutable integer :: id,nx,particle_x !see usefulbits.f90 for key to particle codes n.b. they're NOT pdg character(LEN=100) :: label character(LEN=100) :: desc character(LEN=3) :: expt character(LEN=10) :: collider character(LEN=10) :: collaboration double precision :: lumi,dlumi,energy ! dlumi in % !--TESTING correlated experimental systematics: ! double precision, dimension(4) :: correxpsyst !--END double precision :: xmax,xmin,sep,deltax double precision :: deltam character(LEN=100) :: assignmentgroup integer :: mhchisq double precision, allocatable :: mass(:) double precision, allocatable :: mu(:,:) ! in mu(a,b), a=row, b=1,2,3 for low,obs,up integer :: Nc ! Number of channels character(LEN=5), allocatable :: channel_id_str(:) ! Channels array as string, dim(Nc) ! integer, allocatable :: channel_id(:) ! Channels array, dim(Nc) integer, allocatable :: channel_p_id(:) ! Production channels array, dim(Nc) integer, allocatable :: channel_d_id(:) ! Decay channels array, dim(Nc) character(LEN=10),allocatable :: channel_description(:,:) double precision, allocatable :: channel_eff(:) ! Channel efficiencies, dim(Nc) double precision, allocatable :: channel_eff_ratios(:) ! Channel efficiency ratios (model vs. SM), dim(Nc) double precision, allocatable :: channel_w(:,:) ! Channel weights, dim(Nc, NHiggs) double precision, allocatable :: channel_w_corrected_eff(:,:) ! Channel weights, dim(Nc, NHiggs) double precision, allocatable :: channel_systSM(:,:) ! Channel systematics of SM, dim(Nc, NHiggs) double precision, allocatable :: channel_syst(:,:) ! Channel systematics, dim(Nc, NHiggs) double precision, allocatable :: channel_mu(:,:) ! SM normalized channel rates, dim(Nc, NHiggs) double precision :: eff_ref_mass ! Reference Higgs mass for quoted efficiency integer :: npeaks double precision, allocatable :: Toys_mhobs(:) double precision, allocatable :: Toys_muobs(:) double precision :: scale_mu end type type mupeak integer :: id integer :: ilow,iup,ipeak double precision :: mpeak double precision :: dm double precision :: mu double precision :: mu_original double precision :: scale_mu!, scale_mh double precision :: dmuup,dmulow ! Upper and lower cyan band double precision :: dmuup0sq, dmulow0sq ! Cyan band squared subtracted by correlated uncertainties !-Peak object should contain everything needed for constructing the covariance matrices integer :: Nc ! Number of channels integer, allocatable :: channel_id(:) ! Channels array, dim(Nc) integer, allocatable :: channel_p_id(:) ! Production channels array, dim(Nc) integer, allocatable :: channel_d_id(:) ! Decay channels array, dim(Nc) double precision, allocatable :: channel_eff(:) ! Channel efficiencies, dim(Nc) integer, allocatable :: Higgs_comb(:) ! Assigned Higgs combination, dim(NHiggs) character(LEN=100) :: assignmentgroup type(neutHiggs), allocatable :: Higgses(:) integer :: domH ! index of dominantly contributing Higgs integer :: NHiggs_comb ! Number of combined Higgses integer :: Higgs_assignment_forced integer :: undo_assignment !--These arrays contain only the information about all Higgs bosons !--(need to have this for every peak separately because it can depend on the efficiencies !-- which are given for each peak separately) double precision, allocatable :: channel_w_allH(:,:) ! Channel weights, dim(Nc, NHiggs) double precision, allocatable :: channel_w_corrected_eff_allH(:,:) ! Channel weights with corrected efficiencies, dim(Nc, NHiggs) double precision, allocatable :: channel_systSM_allH(:,:) ! Channel systematics of SM, dim(Nc, NHiggs) double precision, allocatable :: channel_syst_allH(:,:) ! Channel systematics, dim(Nc, NHiggs) double precision, allocatable :: channel_mu_allH(:,:) ! SM normalized channel rates, dim(Nc, NHiggs) !--These arrays contain only the information about the chosen Higgs combination: double precision, allocatable :: channel_w(:) ! Channel weights, dim(Nc) double precision, allocatable :: channel_w_corrected_eff(:) ! Channel weights with corrected efficencies, dim(Nc) double precision, allocatable :: channel_systSM(:) ! Channel systematics, dim(Nc) double precision, allocatable :: channel_syst(:) ! Channel systematics, dim(Nc) double precision, allocatable :: channel_mu(:) ! SM normalized channel rates, dim(Nc) double precision, allocatable :: channel_w_model(:) double precision :: total_mu double precision :: dlumi !-- Chisq values (mu and mh parts, total) after taking into account correlations with !-- other peaks: double precision :: chisq_mu double precision :: chisq_mh double precision :: chisq_tot double precision :: chisq_max integer :: internalnumber end type type mp_neutHiggs !-This object is a Higgs or Higgscluster which are separately !-tested with the predicted mass chi^2 method. type(neutHiggs), allocatable :: Higgses(:) double precision :: m, dm, mu integer :: mp_test double precision :: mu_obs, dmu_low_obs, dmu_up_obs, dmu_low0_obs, dmu_up0_obs, m_obs double precision, allocatable :: channel_w_model(:) double precision, allocatable :: channel_mu(:) double precision :: total_mu integer :: Higgscomb integer :: domH double precision :: chisq !-n.b. these are the smeared observed signal strengths for this Higgs boson end type type mpred type(mp_neutHiggs), allocatable :: mp_Higgses(:) double precision :: mupred end type type observable integer :: id integer :: obstype type(mupeak) :: peak type(mutable) :: table type(neutHiggs), allocatable :: Higgses(:) end type type(observable), allocatable :: obs(:) type tablelist integer :: Npeaks integer :: id type(mutable) :: table type(mupeak), allocatable :: peaks(:) type(mpred) :: mpred type(neutHiggs), allocatable :: Higgses(:) ! This object holds primarily the Higgs boson predictions ! corresponding to tablelist%table. It corresponds to the full ! muplot if it is implemented (to enable the mpred-method). end type type(tablelist), allocatable :: analyses(:) type HSresults double precision :: Pvalue = -1.0D0 double precision :: Pvalue_peak = -1.0D0 double precision :: Pvalue_LHCRun1 = -1.0D0 double precision :: Pvalue_STXS = -1.0D0 double precision :: Chisq, Chisq_mu,Chisq_mh double precision :: Chisq_peak, Chisq_mpred, Chisq_peak_mu, Chisq_peak_mh double precision :: Chisq_LHCRun1, Chisq_LHCRun1_mu, Chisq_LHCRun1_mh double precision :: Chisq_STXS, Chisq_STXS_rates, Chisq_STXS_mh double precision, allocatable :: mupred(:) integer, allocatable :: domH(:) integer, allocatable :: nH(:) integer, allocatable :: obsID(:) integer :: nobs, nobs_mu, nobs_mh integer :: nobs_peak, nobs_mpred, nobs_peak_mu, nobs_peak_mh, nanalysis integer :: nobs_LHCRun1, nobs_LHCRun1_mu, nobs_LHCRun1_mh integer :: nobs_STXS, nobs_STXS_rates, nobs_STXS_mh end type type(HSresults), allocatable :: HSres(:) !----------------------- Covariance matrices ---------------------- double precision, allocatable :: cov(:,:) double precision, allocatable :: cov_mhneut(:,:,:) double precision, allocatable :: cov_mhneut_max(:,:,:) double precision, allocatable :: cov_mh_av(:,:) double precision, allocatable :: cov_mh_av_max(:,:) double precision, allocatable :: cov_mp(:,:) double precision, allocatable :: cov_mu_tot(:,:) double precision, allocatable :: mu_vector(:) !-------------------------------------------------------------------- contains !-------------------------------------------------------------------- subroutine HiggsSignals_info !-------------------------------------------------------------------- implicit none write(*,*) write(*,*)"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" write(*,*)"~ ~" write(*,*)"~ HiggsSignals "//adjustl(HSvers)//" ~" write(*,*)"~ ~" write(*,*)"~ Philip Bechtle, Daniel Dercks, Sven Heinemeyer, ~" write(*,*)"~ Tobias Klingl, Tim Stefaniak, Georg Weiglein ~" write(*,*)"~ ~" write(*,*)"~ arXiv:1305.1933 (Manual) ~" write(*,*)"~ arXiv:1403.1582 (application + more details) ~" write(*,*)"~ ~" write(*,*)"~ It is based on the HiggsBounds-5 Fortran library. ~" write(*,*)"~ Please consult and cite also the following references ~" write(*,*)"~ for the HiggsBounds program ~" write(*,*)"~ ~" write(*,*)"~ arXiv:0811.4169, arXiv:1102.1898, arXiv:1311.0055 ~" write(*,*)"~ ~" write(*,*)"~ For updates, additional material, release notes, see: ~" write(*,*)"~ http://higgsbounds.hepforge.org ~" write(*,*)"~ ~" write(*,*)"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" write(*,*) write(*,*)" HiggsSignals collects together results from " write(*,*) write(*,*)" * the ATLAS and CMS Collaborations" write(*,*)" * the CDF and D0 Collaborations" write(*,*)" * the program HDECAY (arXiv:hep-ph/9704448)" write(*,*)" * LHC Higgs Cross Section Working Group" write(*,*)" (arXiv:1101.0593, arXiv:1201.3084, arXiv:1307.1347," write(*,*)" arXiv:1610.07922 and ref. therein)" write(*,*) end subroutine HiggsSignals_info !-------------------------------------------------------------------- subroutine print_dble_matrix(mat, title) !-------------------------------------------------------------------- implicit none double precision, dimension(:,:), intent(in) :: mat(:,:) character(LEN=50), intent(in), optional :: title integer :: i if(present(title)) then write(*,*)"#*************************************************************************#" write(*,*)"# ",trim(title) endif write(*,*) "#*************************************************************************#" do i=lbound(mat,dim=1),ubound(mat,dim=1) write(*,*) mat(i,:) enddo write(*,*) "#*************************************************************************#" end subroutine print_dble_matrix !-------------------------------------------------------------------- subroutine deallocate_usefulbits_HS !-------------------------------------------------------------------- implicit none integer :: i ! deallocate(neutHiggses) if(allocated(HSres)) then do i=lbound(HSres, dim=1), ubound(HSres, dim=1) if(allocated(HSres(i)%mupred)) deallocate(HSres(i)%mupred) if(allocated(HSres(i)%domH)) deallocate(HSres(i)%domH) if(allocated(HSres(i)%nH)) deallocate(HSres(i)%nH) enddo deallocate(HSres) endif if(allocated(corrlist)) deallocate(corrlist) call deallocate_covariance_matrices end subroutine deallocate_usefulbits_HS !-------------------------------------------------------------------- subroutine deallocate_covariance_matrices !-------------------------------------------------------------------- implicit none if(allocated(cov)) deallocate(cov) if(allocated(cov_mhneut)) deallocate(cov_mhneut) if(allocated(cov_mhneut_max)) deallocate(cov_mhneut_max) if(allocated(cov_mh_av)) deallocate(cov_mh_av) if(allocated(cov_mh_av_max)) deallocate(cov_mh_av_max) if(allocated(cov_mp)) deallocate(cov_mp) if(allocated(cov_mu_tot)) deallocate(cov_mu_tot) if(allocated(mu_vector)) deallocate(mu_vector) end subroutine deallocate_covariance_matrices !-------------------------------------------------------------------- function int_in_array(number, array) integer, intent(in) :: number integer, dimension(:), intent(in) :: array logical :: int_in_array integer :: i int_in_array = .False. do i=lbound(array,dim=1),ubound(array,dim=1) if(number.eq.array(i)) int_in_array = .True. enddo end function int_in_array !------------------------------------------------------------------------------------ !-------------------------------------------------------------------- !:sdoc+: ! ! NAME: ! StrCompress ! ! PURPOSE: ! Subroutine to return a copy of an input string with all whitespace ! (spaces and tabs) removed. ! ! CALLING SEQUENCE: ! Result = StrCompress( String, & ! Input ! n = n ) ! Optional Output ! ! INPUT ARGUMENTS: ! String: Character string to be compressed. ! UNITS: N/A ! TYPE: CHARACTER(*) ! DIMENSION: Scalar ! ATTRIBUTES: INTENT(IN) ! ! OPTIONAL OUTPUT ARGUMENTS: ! n: Number of useful characters in output string ! after compression. From character n+1 -> LEN(Input_String) ! the output is padded with blanks. ! UNITS: N/A ! TYPE: INTEGER ! DIMENSION: Scalar ! ATTRIBUTES: INTENT(OUT), OPTIONAL ! ! FUNCTION RESULT: ! Result: Input string with all whitespace removed before the ! first non-whitespace character, and from in-between ! non-whitespace characters. ! UNITS: N/A ! TYPE: CHARACTER(LEN(String)) ! DIMENSION: Scalar ! ! EXAMPLE: ! Input_String = ' This is a string with spaces in it.' ! Output_String = StrCompress( Input_String, n=n ) ! WRITE( *, '( a )' ) '>',Output_String( 1:n ),'<' ! >Thisisastringwithspacesinit.< ! ! or ! ! WRITE( *, '( a )' ) '>',TRIM( Output_String ),'<' ! >Thisisastringwithspacesinit.< ! ! PROCEDURE: ! Definitions of a space and a tab character are made for the ! ASCII collating sequence. Each single character of the input ! string is checked against these definitions using the IACHAR() ! intrinsic. If the input string character DOES NOT correspond ! to a space or tab, it is not copied to the output string. ! ! Note that for input that ONLY has spaces or tabs BEFORE the first ! useful character, the output of this function is the same as the ! ADJUSTL() instrinsic. ! ! CREATION HISTORY: ! Written by: Paul van Delst, CIMSS/SSEC 18-Oct-1999 ! paul.vandelst@ssec.wisc.edu ! !:sdoc-: !-------------------------------------------------------------------- FUNCTION StrCompress( Input_String, n ) RESULT( Output_String ) ! Arguments CHARACTER(*), INTENT(IN) :: Input_String INTEGER, OPTIONAL, INTENT(OUT) :: n ! Function result CHARACTER(LEN(Input_String)) :: Output_String ! Local parameters INTEGER, PARAMETER :: IACHAR_SPACE = 32 INTEGER, PARAMETER :: IACHAR_TAB = 9 ! Local variables INTEGER :: i, j INTEGER :: IACHAR_Character ! Setup ! ----- ! Initialise output string Output_String = ' ' ! Initialise output string "useful" length counter j = 0 ! Loop over string contents character by character ! ------------------------------------------------ DO i = 1, LEN(Input_String) ! Convert the current character to its position ! in the ASCII collating sequence IACHAR_Character = IACHAR(Input_String(i:i)) ! If the character is NOT a space ' ' or a tab '->|' ! copy it to the output string. IF ( IACHAR_Character /= IACHAR_SPACE .AND. & IACHAR_Character /= IACHAR_TAB ) THEN j = j + 1 Output_String(j:j) = Input_String(i:i) END IF END DO ! Save the non-whitespace count ! ----------------------------- IF ( PRESENT(n) ) n = j END FUNCTION StrCompress !-------------------------------------------------------------------- end module usefulbits_HS !-------------------------------------------------------------------- \ No newline at end of file Index: trunk/HiggsSignals-2/HiggsSignals.F90 =================================================================== --- trunk/HiggsSignals-2/HiggsSignals.F90 (revision 596) +++ trunk/HiggsSignals-2/HiggsSignals.F90 (revision 597) @@ -1,80 +1,80 @@ !-------------------------------------------------------------------- ! This file is part of HiggsSignals (TS 31/01/2013) !-------------------------------------------------------------------- program HiggsSignals !-------------------------------------------------------------------- ! Creates the command-line executable of HiggsSignals ! ! HiggsSignals performs a chi^2 test of Higgs signal rate and mass ! predictions of an arbitrary Higgs sector with measurements from ! the Tevatron and LHC experiments. !-------------------------------------------------------------------- use usefulbits, only : inputmethod,np,Hneut,Hplus,whichanalyses, vsmall use input, only : do_input use usefulbits_hs, only : output_level, HiggsSignals_info, runmode, Exptdir, Nparam, HSres use io, only : setup_input_for_hs, do_output_for_hs use STXS, only : calculate_model_predictions_for_STXS, get_chisq_from_STXS, & & get_number_of_STXS_observables,print_STXS use numerics, only : gammp implicit none double precision :: Pvalue, Chisq, Chisq_mu, Chisq_mh double precision :: Chisq_mu_LHCRun1, Chisq_mh_LHCRun1, Chisq_LHCRun1, Pvalue_LHCRun1 double precision :: Chisq_STXS, Chisq_STXS_rates, Chisq_STXS_mh, Pvalue_STXS double precision :: Pvalue_tot integer :: nobs, nobs_LHCRun1, nobs_STXS, mode inputmethod='datfile' output_level=0 whichanalyses='onlyH' call setup_input_for_hs call initialize_HiggsSignals(np(Hneut),np(Hplus),Exptdir) call do_input if(runmode.eq.'peak') then mode = 1 elseif(runmode.eq.'mass') then mode = 2 elseif(runmode.eq.'both') then mode = 3 else - stop"Error: runmode is unknown. Please specify as peak, mass or both." + stop "Error: runmode is unknown. Please specify as peak, mass or both." endif ! write(*,*) "Run HS..." call run_HiggsSignals( mode, Chisq_mu, Chisq_mh, Chisq, nobs, Pvalue) ! write(*,*) "Run HS Run1 ..." call run_HiggsSignals_LHC_Run1_combination(Chisq_mu_LHCRun1, Chisq_mh_LHCRun1, Chisq_LHCRun1, nobs_LHCRun1, Pvalue_LHCRun1) ! write(*,*) "Run HS STXS ..." call run_HiggsSignals_STXS(Chisq_STXS_rates, Chisq_STXS_mh, Chisq_STXS, nobs_STXS, Pvalue_STXS) ! call calculate_model_predictions_for_STXS ! call get_chisq_from_STXS(Chisq_STXS, Pvalue_STXS) ! ! call get_number_of_STXS_observables(nobs_STXS) ! call print_STXS() if((Chisq+Chisq_LHCRun1+Chisq_STXS).gt.vsmall.and.(nobs+nobs_LHCRun1+nobs_STXS-Nparam).gt.0) then Pvalue_tot = 1 - gammp(dble(nobs+nobs_LHCRun1+nobs_STXS-Nparam)/2.0D0,(Chisq+Chisq_LHCRun1+Chisq_STXS)/2.0D0) endif call complete_HS_results() ! write(*,*) "Chisq_mu, Chisq_mu_LHCRun1, Chisq_STXS = ",Chisq_mu,Chisq_mu_LHCRun1,Chisq_STXS ! write(*,*) "Chisq_mh, Chisq_mh_LHCRun1 = ",Chisq_mh,Chisq_mh_LHCRun1 ! write(*,*) "nobs, nobs_LHCRun1, nobs_STXS, Nparam = ", nobs, nobs_LHCRun1, nobs_STXS, Nparam ! write(*,*) "Pvalue_tot = ", Pvalue_tot call do_output_for_hs call finish_HiggsSignals end program \ No newline at end of file Index: trunk/HiggsSignals-2/configure =================================================================== --- trunk/HiggsSignals-2/configure (revision 596) +++ trunk/HiggsSignals-2/configure (revision 597) @@ -1,78 +1,136 @@ #! /bin/sh #configure script for HiggsSignals -#last modified 16.07.12 TS +#last modified 20.12.18 TS # this tells the fortran program where to look to read in tables of experimental data chmod u+x ./create_store_pathname_HS.bat ./create_store_pathname_HS.bat > store_pathname_HS.f90 -echo 'running configure script...' 1>&2 -echo ' * * * ' -echo 'Reminder: You must enter manually the correct path to HiggsBounds in the ' -echo 'configure script. Also, you may need/wish to change the fortran compiler used. ' -echo 'The default is gfortran.' -echo ' * * * ' +echo ' ******************************************************** ' +echo ' Configuring HiggsSignals...' 1>&2 +echo ' ******************************************************** ' +echo ' You can specify the correct paths to HiggsBounds and ' +echo ' (if needed) FeynHiggs via the options ' +echo ' --hbpath=/PATH/TO/HIGGSBOUNDS' +echo ' --fhpath=/PATH/TO/FEYNHIGGS' +echo ' or manually in the configure script.' +echo '' +echo ' The Fortran compiler has to be set manually in the ' +echo ' configure script. The default is gfortran.' +echo ' ******************************************************** ' #---------------------------- +# Note that you have to build HiggsBounds successfully BEFORE you build HiggsSignals. + +CONF_HBPATH="/Users/timstefaniak/Work/HiggsBounds/trunk/HiggsBounds-5" +CONF_FHPATH="/Users/timstefaniak/Work/Codes/FeynHiggs-2.14.3" +# For FeynHiggs: +CONF_OS=`uname -s` +CONF_MACH=`uname -m` +CONF_DEFPREFIX="$CONF_MACH-$CONF_OS" + +for arg in "$@" ; do + case "$arg" in + --hbpath=*) + CONF_HBPATH=`expr "$arg" : ".*--hbpath=\(.*\)"` ;; + --fhpath=*) + CONF_FHPATH=`expr "$arg" : ".*--fhpath=\(.*\)"` ;; + -*) + echo "Warning: $arg is not a valid option." ;; + *=*) + eval `echo $arg\" | sed 's/=/="/'` ;; + *) + echo "Warning: $arg is not a valid argument." ;; + esac +done + +# Remove slash in entered paths +if [ "${CONF_HBPATH: -1}" = "/" ]; then + CONF_HBPATH="${CONF_HBPATH%?}" +fi + +if [ "${CONF_FHPATH: -1}" = "/" ]; then + CONF_FHPATH="${CONF_FHPATH%?}" +fi + +echo " hbpath=${CONF_HBPATH}" +echo " fhpath=${CONF_FHPATH}" +#---------------------------- + + cat - makefile.in > makefile << _EOF_ # --- variables defined by configure --- # If you want to edit these variables, change ./configure, not ./makefile #---------------------------- # Put you favourite compiler and compiler options in here: - F90C = gfortran F77C = gfortran -F90FLAGS = -fbounds-check -# F90FLAGS = -fbounds-check -Wall -W -fcheck=all -# F90FLAGS = -O2 -fimplicit-none -Wall -Wline-truncation -Wcharacter-truncation -Wsurprising -Waliasing -Wimplicit-interface -Wunused-parameter -fwhole-file -fcheck=all -std=f2008 -pedantic -fbacktrace - -HBLIBS =-L/Users/timstefaniak/Work/HiggsBounds/trunk/HiggsBounds-5 -HBINCLUDE =-I/Users/timstefaniak/Work/HiggsBounds/trunk/HiggsBounds-5 - -FHLIBS = -L/Users/timstefaniak/Work/Codes/FeynHiggs-2.14.3/x86_64-Darwin/lib -lFH -FHINCLUDE = -I/Users/timstefaniak/Work/Codes/FeynHiggs-2.14.3/x86_64-Darwin/include - +F90FLAGS = -fbounds-check -ffixed-line-length-none +#F90FLAGS = -fbounds-check -ffixed-line-length-none -fPIC +#F90FLAGS = -fbounds-check -Wall -W #other useful gfortran flags: # -pg can then use gprof ./programname to look at how efficient program is # -fopenmp switches on parallel processing (see HiggsBounds.F90) # -O3 sets a high level of optimisation -#F90C = gfortran -#F77C = gfortran -#F90FLAGS = -fbounds-check -Wall -W -fixed-line-length-none - #F90C = g95 #F77C = g95 #F90FLAGS = -fbounds-check -ffree-line-length-huge #F90C = pgf90 #F77C = pgf90 #F90FLAGS = -C -Ktrap=fp -Mbounds #F90C = f95 #F77C = f95 #F90FLAGS = -C #F90C = ifort #F77C = ifort -#F90FLAGS = +#F90FLAGS = -C #if using the NAG compiler, you need the compiler flag -DNAGf90Fortran #because the subroutines flush,iargc,getarg need to use modules #caution: the use of the NAG compiler is unsupported + +HBLIBS =-L${CONF_HBPATH} +HBINCLUDE =-I${CONF_HBPATH} + + +#------------------------------ + +# If you wish to use HiggsSignals in conjunction with FeynHiggs, +# make sure these paths indicate where you've stored these packages on your system, + +FHINCLUDE = -I${CONF_FHPATH}/${CONF_DEFPREFIX}/include +FHLIBS = -L${CONF_FHPATH}/${CONF_DEFPREFIX}/lib -lFH + +# Note that care must be taken to ensure that consistent compilers are used +# If you get error messages similar to +# ... undefined reference to initialize_higgsbounds__... +# and the paths the libraries are correct, it's a good idea to check +# that the same compilers are used for each package. +# (you may be able to work around this +# e.g. if FeynHiggs was compiled with g77 it may be possible to compile HiggsBounds +# with gfortran and add -lg2c to the end of the variable FHLIBS) + +#----------------------------- + HSLIBS = -L./ -lHS EXE = HiggsSignals #----------------------------- _EOF_ -echo 'finished configure script' 1>&2 +echo ' ******************************************************** ' +echo ' ...finished configure script.' 1>&2 +echo ' ******************************************************** ' Index: trunk/HiggsSignals-2/HiggsSignals_subroutines.F90 =================================================================== --- trunk/HiggsSignals-2/HiggsSignals_subroutines.F90 (revision 596) +++ trunk/HiggsSignals-2/HiggsSignals_subroutines.F90 (revision 597) @@ -1,2664 +1,2688 @@ !------------------------------------------------------------ ! This file is part of HiggsSignals (TS 03/03/2013). !------------------------------------------------------------ subroutine initialize_HiggsSignals_latestresults(nHiggsneut,nHiggsplus) !------------------------------------------------------------ ! Wrapper subroutine to intitialize HiggsSignals with the experimental ! dataset "latestresults", avoiding to specify this via a string argument. !------------------------------------------------------------ implicit none !--------------------------------------input integer,intent(in) :: nHiggsneut integer,intent(in) :: nHiggsplus character(LEN=13) :: Expt_string Expt_string = "latestresults" call initialize_HiggsSignals(nHiggsneut,nHiggsplus,Expt_string) end subroutine initialize_HiggsSignals_latestresults !------------------------------------------------------------ subroutine initialize_HiggsSignals_LHC13(nHiggsneut,nHiggsplus) !------------------------------------------------------------ ! Wrapper subroutine to intitialize HiggsSignals with the experimental ! dataset "latestresults", avoiding to specify this via a string argument. !------------------------------------------------------------ implicit none !--------------------------------------input integer,intent(in) :: nHiggsneut integer,intent(in) :: nHiggsplus character(LEN=13) :: Expt_string Expt_string = "LHC13" call initialize_HiggsSignals(nHiggsneut,nHiggsplus,Expt_string) end subroutine initialize_HiggsSignals_LHC13 !------------------------------------------------------------ subroutine initialize_HiggsSignals_empty(nHiggsneut,nHiggsplus) !------------------------------------------------------------ ! Wrapper subroutine to intitialize HiggsSignals without dataset. !------------------------------------------------------------ implicit none !--------------------------------------input integer,intent(in) :: nHiggsneut integer,intent(in) :: nHiggsplus character(LEN=13) :: Expt_string Expt_string = "none" call initialize_HiggsSignals(nHiggsneut,nHiggsplus,Expt_string) end subroutine initialize_HiggsSignals_empty !------------------------------------------------------------ subroutine initialize_HiggsSignals(nHiggsneut,nHiggsplus,Expt_string) !------------------------------------------------------------ ! This the first HiggsSignals subroutine that should be called ! by the user. ! It calls subroutines to read in the tables of Standard Model ! decay and production rates from HiggsBounds, sets up the ! experimental data from Tevatron and LHC, allocate arrays, etc. ! Arguments (input): ! * nHiggs = number of neutral Higgs in the model ! * nHiggsplus = number of singly, positively charged Higgs in the model ! * Expt_string = name of experimental dataset to be used !------------------------------------------------------------ use usefulbits, only : np,Hneut,Hplus,Chineut,Chiplus,debug,inputmethod,& & theo,whichanalyses,just_after_run,& & file_id_debug1,file_id_debug2,allocate_if_stats_required use usefulbits_HS, only : HiggsSignals_info, nanalys, eps, Exptdir, obs use datatables, only: setup_observables, setup_LHC_Run1_combination use STXS, only : load_STXS use input, only : check_number_of_particles,check_whichanalyses use io, only : setup_input_for_hs, setup_output_for_hs use theory_BRfunctions, only : setup_BRSM, BRSM use theory_XS_SM_functions, only : setup_XSSM, XSSM + use store_pathname_hs, only : pathname_HS #if defined(NAGf90Fortran) use F90_UNIX_IO, only : flush #endif implicit none !--------------------------------------input integer,intent(in) :: nHiggsneut integer,intent(in) :: nHiggsplus character(LEN=*), intent(in) :: Expt_string !-----------------------------------internal - integer :: i + integer :: i, status logical :: exptdirpresent = .False. !----------------------------------parameter eps=5.0D0 np(Hneut)=nHiggsneut np(Hplus)=nHiggsplus if(Expt_string.ne.'none') then Exptdir = Expt_string exptdirpresent = .True. endif + call system("ls "//pathname_HS//"/Expt_tables/"//Expt_string,status) + if (status.ne.0) then + stop 'Error: Experimental dataset does not exist in '//pathname_HS//"Expt_tables/" + endif np(Chineut)=0! not considering bounds on neutralinos here np(Chiplus)=0! not considering bounds on charginos here debug=.False. select case(whichanalyses) case('onlyL') whichanalyses='LandH' case('onlyH','onlyP','list ','LandH') case default whichanalyses='onlyH' end select call HiggsSignals_info if(inputmethod=='subrout') then if(allocated(theo))then if(debug) write(*,*) "HiggsBounds/HiggsSignals internal structure already initialized!" else if(debug)write(*,*)'doing other preliminary tasks...' ; call flush(6) call setup_input_for_hs ! allocate(inputsub( 2 )) !(1)np(Hneut)>0 (2)np(Hplus)>0 ! inputsub(1)%desc='HiggsBounds_neutral_input_*' ; inputsub(1)%req=req( 0, 1) ! inputsub(2)%desc='HiggsBounds_charged_input' ; inputsub(2)%req=req( 1, 0) ! ! do i=1,ubound(inputsub,dim=1) ! inputsub(i)%stat=0 ! enddo endif endif if(debug)write(*,*)'reading in Standard Model tables...' ; call flush(6) if(.not.allocated(BRSM)) call setup_BRSM if(.not.allocated(XSSM)) call setup_XSSM call setup_uncertainties if(debug)write(*,*)'reading in experimental data...' ; call flush(6) if(exptdirpresent) call setup_observables if(exptdirpresent) call load_STXS(Expt_string) call setup_LHC_Run1_combination if(debug)write(*,*)'sorting out processes to be checked...'; call flush(6) nanalys = size(obs) if(debug)write(*,*)'preparing output arrays...' ; call flush(6) call setup_output_for_hs if(debug)write(*,*)'HiggsSignals has been initialized...' ; call flush(6) just_after_run=.False. ! contains ! | np ! |Hneu Hcha ! | ==0 ==0 ! function req(Hneu,Hcha) ! integer, intent(in) ::Hneu,Hcha ! integer :: req ! ! req=1 ! if(np(Hneut)==0) req= Hneu * req ! if(np(Hplus)==0) req= Hcha * req ! ! end function req end subroutine initialize_HiggsSignals !------------------------------------------------------------ subroutine HiggsSignals_neutral_input_MassUncertainty(dMh) ! Sets the theoretical mass uncertainty of the Higgs bosons. !------------------------------------------------------------ use usefulbits, only: theo,np,Hneut implicit none double precision,intent(in) :: dMh(np(Hneut)) if(.not.allocated(theo))then stop 'subroutine HiggsSignals_initialize must be called first' endif if(np(Hneut).eq.0)then write(*,*)'subroutine HiggsSignal_neutral_input_MassUncertainty should' write(*,*)'only be called if np(Hneut)>0' stop 'error in subroutine HiggsSignal_neutral_input_MassUncertainty' endif theo(1)%particle(Hneut)%dM = dMh end subroutine HiggsSignals_neutral_input_MassUncertainty !------------------------------------------------------------ subroutine setup_uncertainties !------------------------------------------------------------ use usefulbits, only : file_id_common3 use store_pathname_hs, only : pathname_HS use usefulbits_hs, only : delta_rate use io, only : read_matrix_from_file logical :: BRmodel, BRSM, XSmodel, XSSM call read_matrix_from_file(9,pathname_HS//"BRcov.in",delta_rate%BRcov, BRmodel) call read_matrix_from_file(9,pathname_HS//"BRcovSM.in",delta_rate%BRcovSM, BRSM) call read_matrix_from_file(11,pathname_HS//"XScov.in",delta_rate%CScov, XSmodel) call read_matrix_from_file(11,pathname_HS//"XScovSM.in",delta_rate%CScovSM, XSSM) call read_matrix_from_file(11,pathname_HS//"XScov_13TeV.in",delta_rate%CS13cov, XSmodel) call read_matrix_from_file(11,pathname_HS//"XScovSM_13TeV.in",delta_rate%CS13covSM, XSSM) if(BRmodel.and.BRSM) then delta_rate%BRcov_ok=.True. write(*,*) "Covariance matrix for relative branching ratio uncertainties read in successfully." else write(*,*) "Covariance matrix for relative branching ratio uncertainties not provided. Using default values." endif if(XSmodel.and.XSSM) then delta_rate%CScov_ok=.True. write(*,*) "Covariance matrix for relative cross section uncertainties read in successfully." else write(*,*) "Covariance matrix for relative cross section uncertainties not provided. Using default values." endif end subroutine setup_uncertainties !------------------------------------------------------------ subroutine setup_rate_normalization(normalize_to_refmass, normalize_to_refmass_outside_dmtheo) use usefulbits_hs, only : normalize_rates_to_reference_position,& & normalize_rates_to_reference_position_outside_dmtheo implicit none logical, intent(in) :: normalize_to_refmass logical, intent(in) :: normalize_to_refmass_outside_dmtheo if(normalize_to_refmass) then write(*,*) "Using SM rate prediction at observed mass for signal strength calculation." else write(*,*) "Using SM rate prediction at predicted mass for signal strength calculation." endif if(normalize_to_refmass_outside_dmtheo) then write(*,*) "If predicted mass and observed mass do not agree within theory uncertainty:",& & " SM rate prediction at observed mass is used for signal strength calculation." else write(*,*) "If predicted mass and observed mass do not agree within theory uncertainty:",& & " SM rate prediction at predicted mass is used for signal strength calculation." endif normalize_rates_to_reference_position = normalize_to_refmass normalize_rates_to_reference_position_outside_dmtheo = normalize_to_refmass_outside_dmtheo end subroutine setup_rate_normalization !------------------------------------------------------------ subroutine setup_model_rate_uncertainties(filename_XS, filename_XS13, filename_BR) !------------------------------------------------------------ use usefulbits, only : file_id_common3 use store_pathname_hs, only : pathname_HS use usefulbits_hs, only : delta_rate use io, only : read_matrix_from_file character(LEN=*),intent(in) :: filename_XS, filename_XS13, filename_BR logical :: BRmodel, XSmodel call read_matrix_from_file(9,filename_BR,delta_rate%BRcov, BRmodel) call read_matrix_from_file(11,filename_XS,delta_rate%CScov, XSmodel) call read_matrix_from_file(11,filename_XS13,delta_rate%CS13cov, XSmodel) if(BRmodel.and.XSmodel) then delta_rate%BRcov_ok=.True. delta_rate%CScov_ok=.True. write(*,*) "Covariance matrices for rate uncertainties read in successfully." else write(*,*) "Covariance matrix for rate uncertainties not provided. Using default values." endif end subroutine setup_model_rate_uncertainties !------------------------------------------------------------ subroutine setup_rate_uncertainties( dCS, dBR ) +! OUTDATED !!! !------------------------------------------------------------ ! Sets (relative) systematic uncertainties of the model for: ! dCS(1) - singleH dBR(1) - gamma gamma ! dCS(2) - VBF dBR(2) - W W ! dCS(3) - HW dBR(3) - Z Z ! dCS(4) - HZ dBR(4) - tau tau ! dCS(5) - ttH dBR(5) - b bbar !------------------------------------------------------------ use usefulbits_hs, only : delta_rate implicit none double precision, intent(in) :: dCS(5) double precision, intent(in) :: dBR(5) integer :: i delta_rate%dCS = dCS do i=lbound(dBR,dim=1),ubound(dBR,dim=1) call setup_dbr(i,dBR(i)) enddo end subroutine setup_rate_uncertainties !------------------------------------------------------------ subroutine setup_dbr(BRid, value) +! OUTDATED !!! !------------------------------------------------------------ use usefulbits_hs, only : delta_rate integer,intent(in) :: BRid double precision, intent(in) :: value if(BRid.gt.0.and.BRid.lt.10) then delta_rate%dBR(BRid) = value else write(*,*) "Warning in setup_dbr: Unknown decay mode." endif end subroutine setup_dbr !------------------------------------------------------------ subroutine setup_correlations(corr_mu, corr_mh) !------------------------------------------------------------ ! With this subroutine the user may switch off/on correlations ! (default=on) by setting corr = 0/1. !------------------------------------------------------------ use usefulbits_hs, only : correlations_mu, correlations_mh implicit none integer, intent(in) :: corr_mu, corr_mh if(corr_mu.eq.0) then correlations_mu = .False. write(*,*) 'Correlations in signal strength observables are switched off.' elseif(corr_mu.eq.1) then correlations_mu = .True. else stop 'Error: Correlations must be switched on/off by an integer value of 0 or 1.' endif if(corr_mh.eq.0) then correlations_mh = .False. write(*,*) 'Correlations in Higgs mass observables are switched off.' elseif(corr_mh.eq.1) then correlations_mh = .True. else stop 'Error: Correlations must be switched on/off by an integer value of 0 or 1.' endif end subroutine setup_correlations !------------------------------------------------------------ subroutine setup_symmetricerrors(symm) ! Sets the measured rate uncertainties to either a symmetrical average ! of the upper and lower cyan band widths (symm==1) or else uses the ! original (asymmetrical) errors. !------------------------------------------------------------ use usefulbits_hs, only : symmetricerrors implicit none integer, intent(in) :: symm if(symm.eq.1) then write(*,*) "Using averaged (symmetrical) experimental rate uncertainties." symmetricerrors = .True. else write(*,*) "Using original (asymmetrical) experimental rate uncertainties." symmetricerrors = .False. endif end subroutine setup_symmetricerrors !------------------------------------------------------------ subroutine setup_absolute_errors(absol) ! Treats the measured rate uncertainties as either absolute ! uncertainties (1) or relative (0). By default, they are ! treated as relative uncertainties. !------------------------------------------------------------ use usefulbits_hs, only : absolute_errors implicit none integer, intent(in) :: absol if(absol.eq.1) then write(*,*) "Using absolute experimental rate uncertainties." absolute_errors = .True. else write(*,*) "Using relative experimental rate uncertainties." absolute_errors = .False. endif end subroutine setup_absolute_errors !------------------------------------------------------------ subroutine setup_correlated_rate_uncertainties(corr) +! OUTDATED !------------------------------------------------------------ use usefulbits_hs, only : delta_rate integer, intent(in) :: corr if(corr.eq.0) then delta_rate%usecov = .False. write(*,*) "Deactivated correlated CS and BR uncertainties. Using approximated maximum error." elseif(corr.eq.1) then delta_rate%usecov = .True. write(*,*) "Activated correlated CS and BR uncertainties. Using them if covariance matrices are present." else write(*,*) "Warning in subroutine setup_correlated_rate_uncertainties: Argument ",corr," is not equal to 0 or 1." endif end subroutine setup_correlated_rate_uncertainties !------------------------------------------------------------ subroutine setup_SMweights(useweight) ! If set to 1 (true), HiggsSignals assumes the same signal decomposition ! (weights) as in the SM for the given model. This will enter the determination ! of the theoretical rate uncertainty. +! +! OUTDATED !------------------------------------------------------------ use usefulbits_hs, only : useSMweights implicit none integer, intent(in) :: useweight if(useweight.eq.1) then write(*,*) "Using SM weights for theoretical rate uncertainties of the model." useSMweights = .True. else write(*,*) "Using true model weights for theoretical rate uncertainties of the model." useSMweights = .False. endif end subroutine setup_SMweights !------------------------------------------------------------ subroutine setup_anticorrelations_in_mu(acorr) ! Allows for anti-correlations in the signal strength covariance ! matrix if there is a relative sign difference in two mu measurements ! (acorr==1) or else uses only correlations irrespective of the relative ! (acorr==0). +! +! OUTDATED !------------------------------------------------------------ use usefulbits_hs, only : anticorrmu implicit none integer, intent(in) :: acorr if(acorr.eq.1) then write(*,*) "Allow anti-correlated signal strength measurements." anticorrmu = .True. else write(*,*) "Prohibit anti-correlated signal strength measurements." anticorrmu = .False. endif end subroutine setup_anticorrelations_in_mu !------------------------------------------------------------ subroutine setup_anticorrelations_in_mh(acorr) ! Allows for anti-correlations in the mass covariance ! matrix if there is a relative sign difference in two mu measurements ! (acorr==1) or else uses only correlations irrespective of the relative ! (acorr==0). +! +! OUTDATED !------------------------------------------------------------ use usefulbits_hs, only : anticorrmh implicit none integer, intent(in) :: acorr if(acorr.eq.1) then write(*,*) "Allow anti-correlated mass measurements." anticorrmh = .True. else write(*,*) "Prohibit anti-correlated mass measurements." anticorrmh = .False. endif end subroutine setup_anticorrelations_in_mh !------------------------------------------------------------ subroutine setup_assignmentrange(range) !------------------------------------------------------------ ! This sets up the mass range (in standard deviations) in which ! the Higgs is forced to be assigned to the peak observables. !------------------------------------------------------------ use usefulbits_hs, only : assignmentrange,assignmentrange_massobs, pdf implicit none double precision, intent(in) :: range if(range.le.0.0D0) then write(*,*) "Error: Bad assignment range ",range write(*,*) "Keeping the value ",assignmentrange else assignmentrange = range assignmentrange_massobs = range endif if(assignmentrange.ne.1.0D0.and.pdf.eq.1) then write(*,*) "Note: For a box pdf, only 1s mass range is used to force the Higgs-to-peak assignment." endif end subroutine setup_assignmentrange !------------------------------------------------------------ subroutine setup_assignmentrange_LHCrun1(range) !------------------------------------------------------------ ! This sets up the mass range (in standard deviations) in which ! the Higgs is forced to be assigned to the peak observables. !------------------------------------------------------------ use usefulbits_hs, only : assignmentrange_LHCrun1, pdf implicit none double precision, intent(in) :: range if(range.le.0.0D0) then write(*,*) "Error: Bad assignment range ",range write(*,*) "Keeping the value ",assignmentrange_LHCrun1 else assignmentrange_LHCrun1 = range endif ! if(assignmentrange_LHCrun1.ne.1.0D0.and.pdf.eq.1) then ! write(*,*) "Note: For a box pdf, only 1s mass range is used to force the Higgs-to-peak assignment." ! endif end subroutine setup_assignmentrange_LHCrun1 !------------------------------------------------------------ subroutine setup_assignmentrange_massobservables(range) !------------------------------------------------------------ ! This sets up the mass range (in standard deviations) in which ! the Higgs is forced to be assigned to the peak observables. !------------------------------------------------------------ use usefulbits_hs, only : assignmentrange_massobs, pdf implicit none double precision, intent(in) :: range if(range.le.0.0D0) then write(*,*) "Error: Bad assignment range ",range write(*,*) "Keeping the value ",assignmentrange_massobs else assignmentrange_massobs = range endif if(assignmentrange_massobs.ne.1.0D0.and.pdf.eq.1) then write(*,*) "Note: For a box pdf, only 1s mass range is used to force the Higgs-to-peak assignment." endif end subroutine setup_assignmentrange_massobservables !------------------------------------------------------------ subroutine setup_assignmentrange_STXS(range) !------------------------------------------------------------ ! This sets up the mass range (in standard deviations) in which ! the Higgs is forced to be assigned to the peak observables. !------------------------------------------------------------ use usefulbits_hs, only : assignmentrange_STXS implicit none double precision, intent(in) :: range if(range.le.0.0D0) then write(*,*) "Error: Bad assignment range ",range write(*,*) "Keeping the value ",assignmentrange_STXS else assignmentrange_STXS = range endif end subroutine setup_assignmentrange_STXS !------------------------------------------------------------ subroutine setup_nparam(Np) !------------------------------------------------------------ use usefulbits_hs, only : Nparam implicit none integer, intent(in) :: Np Nparam = Np end subroutine setup_nparam !------------------------------------------------------------ subroutine setup_Higgs_to_peaks_assignment_iterations(iter) ! Sets the number of iterations for the Higgs-to-peak-assignment. !------------------------------------------------------------ use usefulbits_hs, only : iterations implicit none integer, intent(in) :: iter iterations = iter end subroutine setup_Higgs_to_peaks_assignment_iterations !------------------------------------------------------------ subroutine setup_mcmethod_dm_theory(mode) +! OUTDATED use mc_chisq, only : mc_mode implicit none integer, intent(in) :: mode character(LEN=14) :: mode_desc(2) = (/'mass variation','convolution '/) if(mode.eq.1.or.mode.eq.2) then mc_mode = mode write(*,'(1X,A,A)') 'The mass-centered chi^2 method will treat the Higgs',& & ' boson mass theory uncertainty by '//trim(mode_desc(mode))//'.' else stop 'Error in subroutine setup_mcmethod_dm_theory: Unknown mode (1 or 2 possible)!' endif end subroutine setup_mcmethod_dm_theory !------------------------------------------------------------ subroutine setup_sm_test(int_SMtest,epsilon) ! With this subroutine the user may switch off the SM likeness test ! (default=on) or change the maximal deviation epsilon (default=5.0D-2) +! OUTDATED / NOT USED !------------------------------------------------------------ use usefulbits_hs, only : useSMtest, eps implicit none integer, intent(in) :: int_SMtest double precision, intent(in) :: epsilon if(int_SMtest.eq.0) then useSMtest = .False. write(*,*) 'SM likeness test has been switched off.' elseif(int_SMtest.eq.1) then useSMtest = .True. write(*,*) 'SM likeness test has been switched on.' else stop 'Error: SM test must be switched on/off by an integer value of 0 or 1.' endif eps = epsilon end subroutine setup_sm_test !------------------------------------------------------------ subroutine setup_thu_observables(thuobs) +! OUTDATED use usefulbits_hs, only : THU_included integer, intent(in) :: thuobs if(thuobs.eq.0) then THU_included = .False. write(*,*) 'Observables are assumed to NOT include theory errors.' else THU_included = .True. write(*,*) 'Observables are assumed to include theory errors.' endif end subroutine setup_thu_observables !------------------------------------------------------------ subroutine setup_output_level(level) ! Controls the level of information output: ! 0 : silent mode ! 1 : screen output for each analysis with its peak/mass-centered observables and ! their respective values predicted by the model ! 2 : screen output of detailed information on each analysis with its ! peak/mass-centered observables ! 3 : creates the files peak_information.txt and peak_massesandrates.txt !------------------------------------------------------------ use usefulbits_hs, only : output_level, additional_output implicit none integer, intent(in) :: level if(level.eq.0.or.level.eq.1.or.level.eq.2.or.level.eq.3) then output_level = level else stop 'Error in subroutine setup_output_level: level not equal to 0,1,2 or 3.' endif if(level.eq.3) additional_output = .True. end subroutine setup_output_level !------------------------------------------------------------ subroutine setup_pdf(pdf_in) ! Sets the probability density function for the Higgs mass uncertainty parametrization: ! 1 : box-shaped pdf ! 2 : Gaussian pdf ! 3 : box-shaped theory error + Gaussian experimental pdf !------------------------------------------------------------ use usefulbits_hs, only : pdf, assignmentrange implicit none integer, intent(in) :: pdf_in character(LEN=13) :: pdf_desc(3) = (/'box ','Gaussian ','box+Gaussian'/) pdf=pdf_in if((pdf.eq.1).or.(pdf.eq.2).or.(pdf.eq.3)) then write(*,'(1X,A,A,1I1,A)') 'Use a '//trim(pdf_desc(pdf))//' probability density function ',& & 'for the Higgs mass(es) (pdf=',pdf,')' endif if(assignmentrange.ne.1.0D0.and.pdf.eq.1) then write(*,*) "Note: For a box pdf, only 1s mass range is used to force the Higgs-to-peak assignment." endif end subroutine setup_pdf !------------------------------------------------------------ !subroutine assign_toyvalues_to_observables(ii, peakindex, npeaks, mu_obs, mh_obs) !! Assigns toy values to the peak's mass and mu value for analysis ii. !! ii :: analysis number (entry in mutables) !! peakindex :: index of the peak of analysis ii !! npeaks :: number of peaks found in analysis ii !! mu_obs :: toy value for mu to be given to the peak with peakindex !! mh_obs :: toy value for mh to be given to the peak with peakindex !------------------------------------------------------------ ! use usefulbits_hs, only: obs, usetoys ! ! integer, intent(in) :: ii, peakindex, npeaks ! double precision, intent(in) :: mh_obs, mu_obs ! ! if(peakindex.gt.npeaks) then ! stop 'Error in subroutine assign_toyvalues_to_observables: Observable does not exist!' ! endif ! ! obs(ii)%table%npeaks = npeaks ! if(.not.allocated(obs(ii)%table%Toys_muobs)) allocate(obs(ii)%table%Toys_muobs(npeaks)) ! if(.not.allocated(obs(ii)%table%Toys_mhobs)) allocate(obs(ii)%table%Toys_mhobs(npeaks)) ! ! obs(ii)%table%Toys_muobs(peakindex) = mu_obs ! obs(ii)%table%Toys_mhobs(peakindex) = mh_obs ! ! usetoys = .True. ! !end subroutine assign_toyvalues_to_observables !------------------------------------------------------------ subroutine assign_toyvalues_to_peak(ID, mu_obs, mh_obs) ! Assigns toy values to the peak's mass and mu value to a peak observable. ! ID :: observable ID ! mu_obs :: toy value for mu to be given to the peak ! mh_obs :: toy value for mh to be given to the peak ! ! n.B.: Do we also want to set mu uncertainties here? !------------------------------------------------------------ use usefulbits_hs, only: obs, usetoys implicit none integer, intent(in) :: ID double precision, intent(in) :: mh_obs, mu_obs integer :: pos, ii pos = -1 do ii=lbound(obs,dim=1),ubound(obs,dim=1) if(obs(ii)%id.eq.ID) then pos = ii exit endif enddo if(pos.ne.-1) then obs(pos)%peak%mpeak = mh_obs obs(pos)%peak%mu = mu_obs usetoys = .True. else write(*,*) "WARNING in assign_toyvalues_to_peak: ID unknown." endif end subroutine assign_toyvalues_to_peak !------------------------------------------------------------ subroutine assign_modelefficiencies_to_peak(ID, Nc, eff_ratios) ! Assigns to each channel of the observable the efficiency in the model ! w.r.t the SM efficiency (as a ratio!) ! ! ID :: observable ID ! Nc :: number of channels ! eff_ratios :: array of length (Number of channels) giving the efficiency ratios ! ! Note: You can first employ the subroutine get_peak_channels (io module) to obtain ! the relevant channel information of the observable. !------------------------------------------------------------ use usefulbits_hs, only: obs implicit none integer, intent(in) :: ID, Nc double precision, dimension(Nc), intent(in) :: eff_ratios integer :: pos, ii pos = -1 do ii=lbound(obs,dim=1),ubound(obs,dim=1) if(obs(ii)%id.eq.ID) then pos = ii exit endif enddo if(pos.ne.-1) then if(size(eff_ratios,dim=1).ne.obs(pos)%table%Nc) then write(*,*) "WARNING in assign modelefficiencies_to_peak: Number of channels (",& & size(eff_ratios,dim=1),"!=",obs(pos)%table%Nc,"does not match for observable ID = ",ID else obs(pos)%table%channel_eff_ratios = eff_ratios endif else write(*,*) "WARNING in assign_modelefficiencies_to_peak: ID unknown." endif end subroutine assign_modelefficiencies_to_peak !------------------------------------------------------------ subroutine assign_rate_uncertainty_scalefactor_to_peak(ID, scale_mu) ! Assigns a rate uncertainty scalefactor to the peak specified by ID. ! This scalefactor will only scale the experimental rate uncertainties. ! The theory rate uncertainties must be given manually via setup_rate_uncertainties. ! ! ID :: observable ID of the peak observable ! scale_mu :: scale_mu by which the mu uncertainty is scaled +! +! OUTDATED / UNUSED !------------------------------------------------------------ use usefulbits_hs, only: obs, usescalefactor implicit none integer, intent(in) :: ID double precision, intent(in) :: scale_mu integer :: pos, ii pos = -1 do ii=lbound(obs,dim=1),ubound(obs,dim=1) if(obs(ii)%id.eq.ID) then pos = ii exit endif enddo if(pos.ne.-1) then obs(pos)%peak%scale_mu = scale_mu else write(*,*) "WARNING in assign_uncertainty_scalefactors_to_peak: ID unknown." endif usescalefactor = .True. end subroutine assign_rate_uncertainty_scalefactor_to_peak !------------------------------------------------------------ subroutine run_HiggsSignals_LHC_Run1_combination(Chisq_mu, Chisq_mh, Chisq, nobs, Pvalue) use usefulbits, only : theo,just_after_run, ndat use theo_manip, only : HB5_complete_theo use usefulbits_HS, only : HSres, output_level, Nparam implicit none !----------------------------------------output integer,intent(out) :: nobs double precision,intent(out) :: Pvalue, Chisq, Chisq_mu, Chisq_mh !-------------------------------------internal integer :: n,i, nobs_mu, nobs_mh logical :: debug=.False. !--------------------------------------------- if(.not.allocated(theo))then stop 'subroutine HiggsSignals_initialize must be called first' endif call HB5_complete_theo do n=1,ndat call evaluate_LHC_Run1_combination(theo(n),n) Pvalue = HSres(n)%Pvalue_LHCRun1 Chisq = HSres(n)%Chisq_LHCRun1 Chisq_mu = HSres(n)%Chisq_LHCRun1_mu Chisq_mh = HSres(n)%Chisq_LHCRun1_mh nobs_mu = HSres(n)%nobs_LHCRun1_mu nobs_mh = HSres(n)%nobs_LHCRun1_mh nobs = nobs_mu+nobs_mh if(output_level.ne.0) then write(*,*) write(*,*) '#*************************************************************************#' write(*,*) '# HIGGSSIGNALS RESULTS (LHC ATLAS + CMS Run1 combination) #' write(*,*) '#*************************************************************************#' write(*,'(A55,F21.8)') 'chi^2 from signal rate observables = ',Chisq_mu write(*,'(A55,F21.8)') 'chi^2 from Higgs mass observables = ',Chisq_mh write(*,'(A55,F21.8)') 'chi^2 (total) = ',Chisq write(*,'(A55,I21)') 'Number of rate observables = ', nobs_mu write(*,'(A55,I21)') 'Number of mass observables = ', nobs_mh write(*,'(A55,I21)') 'Number of observables (total) = ', nobs write(*,'(A48,I3,A4,F21.8)') 'Probability (ndf =',nobs-Nparam,') = ', Pvalue write(*,*) '#*************************************************************************#' write(*,*) endif enddo just_after_run=.True. end subroutine run_HiggsSignals_LHC_Run1_combination !------------------------------------------------------------ subroutine setup_LHC_combination_run1_SMXS_from_paper(useSMXS_from_paper) !------------------------------------------------------------ use usefulbits_hs, only : LHC_combination_run1_SMXS_from_paper implicit none logical, intent(in) :: useSMXS_from_paper if(useSMXS_from_paper) then write(*,*) "Using SM cross sections from Tab.1 of arXiv:1606.02266 for LHC Run 1 combination chi^2 test." else write(*,*) "Using internal SM cross sections for LHC Run 1 combination chi^2 test." endif LHC_combination_run1_SMXS_from_paper = useSMXS_from_paper end subroutine setup_LHC_combination_run1_SMXS_from_paper !------------------------------------------------------------ subroutine evaluate_LHC_Run1_combination( t , n ) !------------------------------------------------------------ -! +! internal routine !------------------------------------------------------------ use usefulbits, only : np,Hneut,Hplus,dataset,results, vsmall use usefulbits_hs, only : HSresults, output_level, Nparam, pdf, & & LHCrun1_rates, LHCrun1_correlationmatrix, useaveragemass, & & assignmentrange_LHCrun1, HSres, normalize_rates_to_reference_position, & & normalize_rates_to_reference_position_outside_dmtheo use pc_chisq, only : csq_mh use numerics, only : invmatrix, matmult, gammp implicit none !--------------------------------------input type(dataset), intent(in) :: t integer, intent(in) :: n !--------------------------------------output ! type(HSresults), intent(inout) :: r !--------------------------------------internal integer :: p, d, id, i, j, k, ncomb double precision, allocatable :: covmat(:,:), invcovmat(:,:) double precision, allocatable :: covmatzero(:,:), invcovmatzero(:,:) double precision, dimension(20) :: v, v2, csq_mu, vzero, vzero2, csq_mu_max double precision, dimension(20,1) :: vmat, vzeromat double precision :: mobs = 125.09D0 double precision :: dmobs = 0.24D0 double precision :: dmbbtautau = 20.0D0 double precision :: dmWW = 5.0D0 double precision :: expmassrange, allowed_massrange double precision :: Higgs_signal_k double precision :: num1, num2, dnum1, dnum2, denom1, denom2, mav, dmav allocate(covmat(20,20),invcovmat(20,20)) allocate(covmatzero(20,20),invcovmatzero(20,20)) mav =0.0D0 dmav = 0.0D0 denom1 = 0.0D0 denom2 = 0.0D0 num1 = 0.0D0 num2 = 0.0D0 dnum1 = 0.0D0 dnum2 = 0.0D0 do i=lbound(LHCrun1_rates,dim=1),ubound(LHCrun1_rates,dim=1) id = LHCrun1_rates(i)%channel_id p = int((id-modulo(id,10))/dble(10)) d = modulo(id,10) if(d.eq.4.or.d.eq.5) then expmassrange = dmbbtautau elseif(d.eq.2) then expmassrange = dmWW else if(pdf.eq.1) then expmassrange = dmobs else expmassrange = assignmentrange_LHCrun1*dmobs endif endif LHCrun1_rates(i)%r_pred = 0.0D0 ncomb = 0 do k=1,np(Hneut) if(pdf.eq.1) then allowed_massrange = expmassrange + t%particle(Hneut)%dM(k) else allowed_massrange = sqrt(expmassrange**2.0D0 + t%particle(Hneut)%dM(k)**2.0D0) endif if(abs(t%particle(Hneut)%M(k)-mobs).le.allowed_massrange ) then Higgs_signal_k = signalrate(k,p,d,mobs,t%particle(Hneut)%M(k),t%particle(Hneut)%dM(k)) LHCrun1_rates(i)%r_pred = LHCrun1_rates(i)%r_pred + Higgs_signal_k if(id.eq.11) then ! gg -> h_k -> gaga weighted mass average num1 = num1 + Higgs_signal_k * t%particle(Hneut)%M(k) dnum1 = dnum1 + Higgs_signal_k * t%particle(Hneut)%dM(k) else if(id.eq.13) then ! gg -> h_k -> ZZ -> 4l weighted mass average num2 = num2 + Higgs_signal_k * t%particle(Hneut)%M(k) dnum2 = dnum2 + Higgs_signal_k * t%particle(Hneut)%dM(k) endif ncomb = ncomb+1 endif enddo if(id.eq.11) then denom1 = LHCrun1_rates(i)%r_pred else if(id.eq.13) then denom2 = LHCrun1_rates(i)%r_pred endif if(LHCrun1_rates(i)%r_pred.gt.LHCrun1_rates(i)%r) then LHCrun1_rates(i)%dr = LHCrun1_rates(i)%dr_up else LHCrun1_rates(i)%dr = LHCrun1_rates(i)%dr_low endif if(LHCrun1_rates(i)%r.lt.0.0D0) then LHCrun1_rates(i)%dr0 = LHCrun1_rates(i)%dr_up else LHCrun1_rates(i)%dr0 = LHCrun1_rates(i)%dr_low endif v(i) = LHCrun1_rates(i)%r_pred - LHCrun1_rates(i)%r vmat(i,1) = v(i) vzero(i) = LHCrun1_rates(i)%r vzeromat(i,1) = vzero(i) ! write(*,'(2I3,3F10.5)') p, d, LHCrun1_rates(i)%r_pred, LHCrun1_rates(i)%r, LHCrun1_rates(i)%r/LHCrun1_rates(i)%r_pred enddo if(denom1.gt.vsmall.and.denom2.gt.vsmall) then mav = 0.5D0 * (num1/denom1 + num2/denom2) dmav = 0.5D0 * (dnum1/denom1 + dnum2/denom2) ! write(*,*) "Averaged mass is ",mav, " +- ",dmav ! else ! write(*,*) "denom1 and denom2 are ",denom1, denom2 endif do i=lbound(LHCrun1_rates,dim=1),ubound(LHCrun1_rates,dim=1) do j=lbound(LHCrun1_rates,dim=1),ubound(LHCrun1_rates,dim=1) covmat(i,j) = LHCrun1_correlationmatrix(i,j) * & & LHCrun1_rates(i)%dr * LHCrun1_rates(j)%dr covmatzero(i,j) = LHCrun1_correlationmatrix(i,j) * & & LHCrun1_rates(i)%dr0 * LHCrun1_rates(j)%dr0 enddo enddo call invmatrix(covmat, invcovmat) call matmult(invcovmat,vmat,v2,20,1) call invmatrix(covmatzero, invcovmatzero) call matmult(invcovmatzero,vzeromat,vzero2,20,1) do i=1, 20 csq_mu(i) = v(i)*v2(i) enddo do i=1, 20 csq_mu_max(i) = vzero(i)*vzero2(i) enddo if(mav.lt.vsmall) then HSres(n)%Chisq_LHCRun1_mh=0.0D0 else HSres(n)%Chisq_LHCRun1_mh=csq_mh(mav,mobs,dmav,dmobs) endif if((HSres(n)%Chisq_LHCRun1_mh+sum(csq_mu)).gt.sum(csq_mu_max)) then HSres(n)%Chisq_LHCRun1_mu=sum(csq_mu_max) HSres(n)%Chisq_LHCRun1_mh=0.0D0 else HSres(n)%Chisq_LHCRun1_mu=sum(csq_mu) endif HSres(n)%Chisq_LHCRun1= HSres(n)%Chisq_LHCRun1_mu + HSres(n)%Chisq_LHCRun1_mh HSres(n)%nobs_LHCRun1_mu=20 HSres(n)%nobs_LHCRun1_mh=1 if(HSres(n)%Chisq_LHCRun1.gt.vsmall.and.(HSres(n)%nobs_LHCRun1_mu+HSres(n)%nobs_LHCRun1_mh-Nparam).gt.0) then HSres(n)%Pvalue_LHCRun1=1 - gammp(dble(HSres(n)%nobs_LHCRun1_mu + HSres(n)%nobs_LHCRun1_mh-Nparam)/2,HSres(n)%Chisq_LHCRun1/2) endif deallocate(covmat,invcovmat) deallocate(covmatzero,invcovmatzero) contains !------------------------------------------------------------ function signalrate(k,p,d,mobs,m,dmtheo) !------------------------------------------------------------ use usefulbits_hs, only : LHC_combination_run1_SMXS_from_paper !--------------------------------------external functions double precision :: SMCS_lhc8_gg_H,SMCS_lhc8_bb_H,SMCS_lhc8_vbf_H, & & SMCS_lhc8_HW, SMCS_lhc8_HZ, SMCS_lhc8_ttH, SMBR_Hgamgam,SMBR_HWW, & & SMBR_HZZ, SMBR_Htautau, SMBR_Hbb, SMBR_HZgam, SMBR_Hcc, SMBR_Hmumu, & & SMBR_Hgg double precision, intent(in) :: mobs, m, dmtheo integer, intent(in) :: k,p,d double precision :: signalrate, production_rate, decay_rate, mass, refmass double precision :: production_rate_scalefactor, decay_rate_scalefactor mass = t%particle(Hneut)%M(k) ! TS (17/10/2018): Take reference mass for SM-normalization at mobs+dmtheo box boundary. if(mass.ge.(mobs+dmtheo)) then refmass = mobs + dmtheo else if(mass.le.(mobs-dmtheo)) then refmass = mobs - dmtheo else refmass = mass endif !--- if(p.eq.1) then if(LHC_combination_run1_SMXS_from_paper) then production_rate= t%lhc8%XS_gg_hj_ratio(k) * 19.2D0 & & + t%lhc8%XS_bb_hj_ratio(k) * 0.203D0 else production_rate= t%lhc8%XS_gg_hj_ratio(k) * SMCS_lhc8_gg_H(mass) & & + t%lhc8%XS_bb_hj_ratio(k) * SMCS_lhc8_bb_H(mass) endif ! NOTE: Here we make a small error in the scalefactor. Correct would be to rescale ! the gg and bb contributions separately. production_rate_scalefactor = (SMCS_lhc8_gg_H(mobs)+SMCS_lhc8_bb_H(mobs))/& & (SMCS_lhc8_gg_H(refmass)+SMCS_lhc8_bb_H(refmass)) else if(p.eq.2) then if(LHC_combination_run1_SMXS_from_paper) then production_rate= t%lhc8%XS_vbf_ratio(k) * 1.58D0 else production_rate= t%lhc8%XS_vbf_ratio(k) * SMCS_lhc8_vbf_H(mass) endif production_rate_scalefactor = SMCS_lhc8_vbf_H(mobs)/SMCS_lhc8_vbf_H(refmass) else if(p.eq.3) then if(LHC_combination_run1_SMXS_from_paper) then production_rate= t%lhc8%XS_hjW_ratio(k) * 0.703D0 else production_rate= t%lhc8%XS_hjW_ratio(k) * SMCS_lhc8_HW(mass) endif production_rate_scalefactor = SMCS_lhc8_HW(mobs)/SMCS_lhc8_HW(refmass) else if(p.eq.4) then if(LHC_combination_run1_SMXS_from_paper) then production_rate= t%lhc8%XS_hjZ_ratio(k) * 0.446D0 else production_rate= t%lhc8%XS_hjZ_ratio(k) * SMCS_lhc8_HZ(mass) endif production_rate_scalefactor = SMCS_lhc8_HZ(mobs)/SMCS_lhc8_HZ(refmass) else if(p.eq.5) then if(LHC_combination_run1_SMXS_from_paper) then production_rate= t%lhc8%XS_tthj_ratio(k) * 0.129D0 else production_rate= t%lhc8%XS_tthj_ratio(k) * SMCS_lhc8_ttH(mass) endif production_rate_scalefactor = SMCS_lhc8_ttH(mobs)/SMCS_lhc8_ttH(refmass) endif if(d.eq.1) then decay_rate = t%BR_hjgaga(k) decay_rate_scalefactor = SMBR_Hgamgam(mobs)/SMBR_Hgamgam(refmass) else if(d.eq.2) then decay_rate = t%BR_hjWW(k) decay_rate_scalefactor = SMBR_HWW(mobs)/SMBR_HWW(refmass) else if(d.eq.3) then decay_rate = t%BR_hjZZ(k) decay_rate_scalefactor = SMBR_HZZ(mobs)/SMBR_HZZ(refmass) else if(d.eq.4) then decay_rate = t%BR_hjtautau(k) decay_rate_scalefactor = SMBR_Htautau(mobs)/SMBR_Htautau(refmass) else if(d.eq.5) then decay_rate = t%BR_hjbb(k) decay_rate_scalefactor = SMBR_Hbb(mobs)/SMBR_Hbb(refmass) endif if(normalize_rates_to_reference_position) then signalrate = production_rate * decay_rate else ! This is the default: signalrate = production_rate * production_rate_scalefactor * & & decay_rate * decay_rate_scalefactor endif if(normalize_rates_to_reference_position_outside_dmtheo) then if(abs(mobs-m).ge.dmtheo) then signalrate = production_rate * decay_rate endif endif end function signalrate !------------------------------------------------------------ end subroutine evaluate_LHC_Run1_combination !------------------------------------------------------------ subroutine run_HiggsSignals_STXS(Chisq_STXS_rates, Chisq_STXS_mh, Chisq_STXS, nobs_STXS, Pvalue_STXS) !------------------------------------------------------------ use STXS, only : evaluate_model_for_STXS, get_chisq_from_STXS, print_STXS, & & get_number_of_STXS_observables, STXSlist, print_STXS_to_file use usefulbits, only : theo,just_after_run, ndat, vsmall use usefulbits_hs, only : HSres, output_level use theo_manip, only : HB5_complete_theo use numerics, only : gammp double precision, intent(out) :: Chisq_STXS_rates, Chisq_STXS_mh, Chisq_STXS, Pvalue_STXS integer, intent(out) :: nobs_STXS double precision :: Pvalue integer :: nobs_STXS_rates, nobs_STXS_mh, i, n call HB5_complete_theo Chisq_STXS_mh = 0.0D0 do n=1, ndat do i=lbound(STXSlist,dim=1), ubound(STXSlist,dim=1) call evaluate_model_for_STXS(STXSlist(i),theo(n)) enddo call get_chisq_from_STXS(Chisq_STXS_rates, Pvalue_STXS) call get_number_of_STXS_observables(nobs_STXS_rates, nobs_STXS_mh) nobs_STXS = nobs_STXS_rates + nobs_STXS_mh ! Add routine for possible mh-observable in STXS here! Chisq_STXS = Chisq_STXS_rates + Chisq_STXS_mh HSres(n)%Chisq_STXS_rates = Chisq_STXS_rates HSres(n)%Chisq_STXS_mh = Chisq_STXS_mh HSres(n)%Chisq_STXS = Chisq_STXS HSres(n)%nobs_STXS_rates = nobs_STXS_rates HSres(n)%nobs_STXS_mh = nobs_STXS_mh HSres(n)%nobs_STXS = nobs_STXS Pvalue = 1.0D0 if(Chisq_STXS.gt.vsmall.and.(nobs_STXS-Nparam).gt.0) then Pvalue = 1 - gammp(dble(nobs_STXS-Nparam)/2,Chisq_STXS/2) endif HSres(n)%Pvalue_STXS = Pvalue enddo if(output_level.eq.1) call print_STXS if(output_level.eq.3) then call print_STXS_to_file endif if(output_level.ne.0) then write(*,*) write(*,*) '#*************************************************************************#' write(*,*) '# HIGGSSIGNALS RESULTS (STXS observables) #' write(*,*) '#*************************************************************************#' write(*,'(A55,F21.8)') 'chi^2 (signal rate) from STXS observables = ',Chisq_STXS_rates write(*,'(A55,F21.8)') 'chi^2 (Higgs mass) from STXS observables = ',Chisq_STXS_mh write(*,'(A55,F21.8)') 'chi^2 (total) = ',Chisq_STXS write(*,'(A55,I21)') 'Number of STXS rate observables = ', nobs_STXS_rates write(*,'(A55,I21)') 'Number of STXS mass observables = ', nobs_STXS_mh write(*,'(A55,I21)') 'Number of STXS observables (total) = ', nobs_STXS write(*,'(A48,I3,A4,F21.8)') 'Probability (ndf =',nobs-Nparam,') = ', Pvalue write(*,*) '#*************************************************************************#' write(*,*) endif end subroutine run_HiggsSignals_STXS !------------------------------------------------------------------------------------ subroutine run_HiggsSignals(mode, Chisq_mu, Chisq_mh, Chisq, nobs, Pvalue) !------------------------------------------------------------ ! This subroutine can be called by the user after HiggsSignals_initialize has been called. ! The input routines, where required, should be called before calling run_HiggsSignals. ! It takes theoretical predictions for a particular parameter point ! in the model and calls subroutines which compare these predictions ! to the experimental results. ! Arguments (output): ! * mode = 1,2 or 3 for peak-centered, mass-centered chi^2 method or both, respectively. ! * Chisq_mu = total chi^2 contribution from signal strength measurements ! * Chisq_mh = total chi^2 contribution from Higgs mass measurements ! * Chisq = total chi^2 value for the combination of the considered Higgs signals ! * nobs = total number of observables ! * Pvalue = total chi^2 probability for the agreement between model and data, ! assuming number of observables == number of degrees of freedom ! (see manual for more precise definitions)) !------------------------------------------------------------ use usefulbits, only : theo,just_after_run, inputmethod, ndat!inputsub, use usefulbits_HS, only : HSres, runmode, output_level, usescalefactor, Nparam,Exptdir use channels, only : check_channels use theo_manip, only : HB5_complete_theo!, HB5_recalculate_theo_for_datapoint #if defined(NAGf90Fortran) use F90_UNIX_IO, only : flush #endif implicit none integer,intent(in) :: mode !----------------------------------------output integer,intent(out) :: nobs double precision,intent(out) :: Pvalue, Chisq, Chisq_mu, Chisq_mh !-------------------------------------internal integer :: n,i logical :: debug=.False. !--------------------------------------------- if(mode.eq.1) then runmode="peak" else if(mode.eq.2) then ! runmode="mass" write(*,*) "Warning: The 'mass' method (runmode = 2) is no longer maintained." write(*,*) " The peak-centered chi^2 method will be used instead." runmode="peak" else if(mode.eq.3) then ! runmode="both" write(*,*) "Warning: The 'both' method (runmode = 3) is no longer maintained." write(*,*) " The peak-centered chi^2 method will be used instead." runmode="peak" else stop 'Error in subroutine run_HiggsSignals: mode unknown' endif if(.not.allocated(theo))then stop 'subroutine HiggsSignals_initialize must be called first' endif ! if(inputmethod.eq.'subrout') then ! do i=1,ubound(inputsub,dim=1) ! if( inputsub(i)%req .ne. inputsub(i)%stat )then ! write(*,*) inputsub(i)%req, inputsub(i)%stat ! write(*,*)'subroutine '//trim(adjustl(inputsub(i)%desc)) ! write(*,*)'should be called once and only once before each call to' ! write(*,*)'subroutine run_HiggsSignals.' ! stop 'error in subroutine run_HiggsSignals' ! endif ! TS: Have to work on this bit to make it run simultaneously with HiggsBounds. Now, ! commented out the =0 statement. HS thus has to be run before HB. ! inputsub(i)%stat=0!now we have used this input, set back to zero ! enddo ! endif if(debug)write(*,*)'manipulating input...' ; call flush(6) call HB5_complete_theo if(debug)write(*,*)'compare each model to the experimental data...' ; call flush(6) do n=1,ndat ! call recalculate_theo_for_datapoint(n) call evaluate_model(theo(n),n) Pvalue = HSres(n)%Pvalue_peak Chisq = HSres(n)%Chisq_peak Chisq_mu = HSres(n)%Chisq_peak_mu Chisq_mh = HSres(n)%Chisq_peak_mh nobs = HSres(n)%nobs_peak if(output_level.ne.0) then write(*,*) write(*,*) '#*************************************************************************#' write(*,*) '# HIGGSSIGNALS RESULTS (',trim(adjustl(Exptdir)),') -- peak observables #' write(*,*) '#*************************************************************************#' write(*,'(A55,F21.8)') 'chi^2 (signal strength) from peak observables = ',& & HSres(n)%Chisq_peak_mu write(*,'(A55,F21.8)') 'chi^2 (Higgs mass) from peak observables = ',HSres(n)%Chisq_peak_mh ! write(*,'(A55,F21.8)') 'chi^2 from mass-centered observables = ',HSres(n)%Chisq_mpred ! write(*,'(A55,F21.8)') 'chi^2 from signal strength peak observables (total) = ',HSres(n)%Chisq_mu write(*,'(A55,F21.8)') 'chi^2 (total) from peak observables = ',HSres(n)%Chisq write(*,'(A55,I21)') 'Number of signal strength peak observables = ',& & HSres(n)%nobs_peak_mu write(*,'(A55,I21)') 'Number of Higgs mass peak observables = ',HSres(n)%nobs_peak_mh ! write(*,'(A55,I21)') 'Number of mass-centered observables = ',HSres(n)%nobs_mpred write(*,'(A55,I21)') 'Number of peak observables (total) = ',HSres(n)%nobs_peak write(*,'(A48,I3,A4,F21.8)') 'Probability (ndf =',HSres(n)%nobs-Nparam,') using peak observables = ',HSres(n)%Pvalue_peak write(*,*) '#*************************************************************************#' write(*,*) endif enddo just_after_run=.True. usescalefactor=.False. end subroutine run_HiggsSignals !------------------------------------------------------------ subroutine evaluate_model( t , n ) +! internal routine !------------------------------------------------------------ ! This subroutine evaluates the signal strength modifier for every Higgs boson and ! considered analysis. It fills a matrix neutHiggs(:,:) of type neutHiggs with dimensions ! (number(considered analyses),nH). !------------------------------------------------------------ use usefulbits, only : np,Hneut,Hplus,dataset,results, vsmall use usefulbits_hs, only : neutHiggses, nanalys, runmode, HSresults, cov, obs, analyses,& & cov_mhneut, iterations, deallocate_covariance_matrices, & & output_level, Nparam, nanalys use datatables, only : setup_tablelist, check_available_Higgses use pc_chisq use mc_chisq use all_chisq use numerics implicit none !--------------------------------------input type(dataset), intent(in) :: t integer, intent(in) :: n !-------------------------------------output ! type(HSresults), intent(out) :: r integer :: ii, jj, iii, jjj double precision :: totchisq, muchisq, mhchisq, mpchisq, mpredchisq integer :: nobs, Nmu, Nmh, Nmpred character(LEN=100), allocatable :: assignmentgroups(:) integer, allocatable :: assignmentgroups_domH(:) integer, allocatable :: assignmentgroups_Higgs_comb(:,:) allocate(assignmentgroups(nanalys),assignmentgroups_domH(nanalys)) allocate(assignmentgroups_Higgs_comb(nanalys,np(Hneut))) assignmentgroups = '' !---Initialize assignmentgroups arrays with default values do ii=lbound(assignmentgroups_domH,dim=1),ubound(assignmentgroups_domH,dim=1) assignmentgroups_domH(ii) = 0 assignmentgroups_Higgs_comb(ii,:) = 0 enddo !---First, evaluate the model predictions allocate(neutHiggses(nanalys,np(Hneut))) !-Loop over considered analyses do ii=lbound(neutHiggses,dim=1),ubound(neutHiggses,dim=1) !-Loop over the neutral Higgs bosons of the model do jj=lbound(neutHiggses,dim=2),ubound(neutHiggses,dim=2) !! write(*,*) "hello evaluate model:", ii, jj call calc_mupred(jj, t, obs(ii)%table, neutHiggses(ii,jj)) enddo if(.not.allocated(obs(ii)%Higgses)) allocate(obs(ii)%Higgses(np(Hneut))) obs(ii)%Higgses(:) = neutHiggses(ii,:) enddo !-Pass the observables and their predicted Higgs properties (obs%Higgses) !-to the tablelist "analyses" call setup_tablelist ! select case(runmode) ! ! case('peak') !-Peak-centered chisq method jjj=0 do ii=lbound(analyses,dim=1),ubound(analyses,dim=1) call deallocate_covariance_matrices call assign_Higgs_to_peaks(analyses(ii)%table, analyses(ii)%peaks,0) do iii=lbound(analyses(ii)%peaks,dim=1),ubound(analyses(ii)%peaks,dim=1) if(analyses(ii)%table%mhchisq.eq.1.and.& & len(trim(adjustl(analyses(ii)%peaks(iii)%assignmentgroup))).ne.0) then jjj=jjj+1 assignmentgroups(jjj)=analyses(ii)%peaks(iii)%assignmentgroup assignmentgroups_Higgs_comb(jjj,:)=analyses(ii)%peaks(iii)%Higgs_comb assignmentgroups_domH(jjj)=analyses(ii)%peaks(iii)%domH ! write(*,*) "Found leader of group ",assignmentgroups(jjj) ! write(*,*) "ID ",analyses(ii)%peaks(iii)%id ! write(*,*) "with Higgs combination ",assignmentgroups_Higgs_comb(jjj,:) ! write(*,*) "and dominant Higgs boson ",assignmentgroups_domH(jjj) endif enddo enddo do ii=lbound(analyses,dim=1),ubound(analyses,dim=1) do iii=lbound(analyses(ii)%peaks,dim=1),ubound(analyses(ii)%peaks,dim=1) if(analyses(ii)%table%mhchisq.eq.0.and.& & len(trim(adjustl(analyses(ii)%peaks(iii)%assignmentgroup))).ne.0) then !SELECT ASSIGNMENT GROUP FOLLOWERS do jjj=lbound(assignmentgroups,dim=1),ubound(assignmentgroups,dim=1) if(analyses(ii)%peaks(iii)%assignmentgroup.eq.assignmentgroups(jjj)) then !TAKE OVER THE HIGGS ASSIGNMENT OF THE LEADING PEAK analyses(ii)%peaks(iii)%Higgs_comb=assignmentgroups_Higgs_comb(jjj,:) analyses(ii)%peaks(iii)%domH=assignmentgroups_domH(jjj) if(assignmentgroups_domH(jjj).ne.0) then analyses(ii)%peaks(iii)%Higgs_assignment_forced=1 endif call evaluate_peak(analyses(ii)%peaks(iii),analyses(ii)%table) endif enddo endif enddo enddo ! write(*,*) "Starting assignment procedure..." ! Do the iterative Higgs-to-peak-assignment here: call assign_Higgs_to_peaks_with_correlations(iterations) ! write(*,*) "Calculating chi^2..." call calculate_total_pc_chisq(totchisq, muchisq, mhchisq, nobs, Nmu, Nmh) ! write(*,*) "...done." if(output_level.eq.1) call print_peakinformation if(output_level.eq.2) call print_peakinformation_essentials if(output_level.eq.3) then call print_peaks_to_file call print_peaks_signal_rates_to_file endif call add_peaks_to_HSresults(HSres(n)) HSres(n)%Chisq_peak=totchisq HSres(n)%Chisq_peak_mu = muchisq HSres(n)%Chisq_mpred = 0.0D0 HSres(n)%Chisq_peak_mu=muchisq HSres(n)%Chisq_peak_mh=mhchisq HSres(n)%nobs_mpred=0 HSres(n)%nobs_peak_mu=Nmu HSres(n)%nobs_peak_mh=Nmh HSres(n)%nanalysis=size(analyses) HSres(n)%nobs_peak=nobs ! ! if(HSres(n)%Chisq.gt.vsmall.and.(HSres(n)%nobs-Nparam).gt.0) then ! HSres(n)%Pvalue_peak = 1 - gammp(dble(HSres(n)%nobs-Nparam)/2,HSres(n)%Chisq/2) ! endif if(HSres(n)%Chisq_peak.gt.vsmall.and.(HSres(n)%nobs_peak-Nparam).gt.0) then HSres(n)%Pvalue_peak = 1 - gammp(dble(HSres(n)%nobs_peak-Nparam)/2,HSres(n)%Chisq_peak/2) endif ! case('mass') ! do ii=lbound(analyses,dim=1),ubound(analyses,dim=1) ! call fill_mp_obs(ii) ! enddo ! if(mc_mode.eq.1) call mass_variation_by_theory_uncertainty ! call create_covariance_matrix_mp ! call calculate_mpred_chisq(mpchisq, nobs) ! ! if(output_level.eq.1) call print_mc_observables ! if(output_level.eq.2) call print_mc_observables_essentials ! if(output_level.eq.3) then ! call print_mc_tables_to_file ! call print_mc_observables_to_file ! endif ! ! HSres(n)%Chisq=mpchisq ! HSres(n)%Chisq_peak_mu = 0.0D0 ! HSres(n)%Chisq_mpred = mpchisq ! HSres(n)%Chisq_mu=mpchisq ! HSres(n)%Chisq_mh=0.0D0 ! HSres(n)%nobs_mpred=nobs ! HSres(n)%nobs_peak_mu=0 ! HSres(n)%nobs_peak_mh=0 ! HSres(n)%nanalysis=size(analyses) ! HSres(n)%nobs=nobs ! if(HSres(n)%Chisq.gt.vsmall.and.(HSres(n)%nobs-Nparam).gt.0) then ! HSres(n)%Pvalue=1 - gammp(dble(HSres(n)%nobs-Nparam)/2,HSres(n)%Chisq/2) ! endif ! ! case('both') ! jjj=0 ! do ii=lbound(analyses,dim=1),ubound(analyses,dim=1) ! call deallocate_covariance_matrices ! call assign_Higgs_to_peaks(analyses(ii)%table, analyses(ii)%peaks,0) ! do iii=lbound(analyses(ii)%peaks,dim=1),ubound(analyses(ii)%peaks,dim=1) ! if(analyses(ii)%table%mhchisq.eq.1.and.& ! & len(trim(analyses(ii)%peaks(iii)%assignmentgroup)).ne.0) then ! jjj=jjj+1 ! assignmentgroups(jjj)=analyses(ii)%peaks(iii)%assignmentgroup ! assignmentgroups_Higgs_comb(jjj,:)=analyses(ii)%peaks(iii)%Higgs_comb ! assignmentgroups_domH(jjj)=analyses(ii)%peaks(iii)%domH ! endif ! enddo ! enddo ! do ii=lbound(analyses,dim=1),ubound(analyses,dim=1) ! do iii=lbound(analyses(ii)%peaks,dim=1),ubound(analyses(ii)%peaks,dim=1) ! if(analyses(ii)%table%mhchisq.eq.0.and.& ! & len(trim(analyses(ii)%peaks(iii)%assignmentgroup)).ne.0) then ! do jjj=lbound(assignmentgroups,dim=1),ubound(assignmentgroups,dim=1) ! if(analyses(ii)%peaks(iii)%assignmentgroup.eq.assignmentgroups(jjj)) then ! !TAKE OVER THE HIGGS ASSIGNMENT OF THE LEADING PEAK ! analyses(ii)%peaks(iii)%Higgs_comb=assignmentgroups_Higgs_comb(jjj,:) ! analyses(ii)%peaks(iii)%domH=assignmentgroups_domH(jjj) ! if(assignmentgroups_domH(jjj).ne.0) then ! analyses(ii)%peaks(iii)%Higgs_assignment_forced=1 ! endif ! ! TODO: Need to evaluate everything else here! ! call evaluate_peak(analyses(ii)%peaks(iii),analyses(ii)%table) ! endif ! enddo ! endif ! enddo ! enddo ! ! call assign_Higgs_to_peaks_with_correlations(iterations) ! ! do ii=lbound(analyses,dim=1),ubound(analyses,dim=1) ! call check_available_Higgses(ii) ! call fill_mp_obs(ii) ! enddo ! if(mc_mode.eq.1) call mass_variation_by_theory_uncertainty ! ! call calculate_total_chisq(totchisq, muchisq, mhchisq, mpredchisq, nobs, Nmu, Nmh, Nmpred) ! ! !Have to write a new print method ! if(output_level.eq.1) call print_all_observables ! if(output_level.eq.2) call print_peakinformation_essentials ! if(output_level.eq.3) then ! call print_peaks_to_file ! call print_peaks_signal_rates_to_file ! endif ! ! call add_peaks_to_HSresults(r) ! ! HSres(n)%Chisq=totchisq ! HSres(n)%Chisq_peak_mu = muchisq ! HSres(n)%Chisq_mpred = mpredchisq ! HSres(n)%Chisq_mu=muchisq + mpredchisq ! HSres(n)%Chisq_mh=mhchisq ! HSres(n)%nobs_mpred=Nmpred ! HSres(n)%nobs_peak_mu=Nmu ! HSres(n)%nobs_peak_mh=Nmh ! HSres(n)%nanalysis=size(analyses) ! HSres(n)%nobs=nobs ! if(HSres(n)%Chisq.gt.vsmall.and.(HSres(n)%nobs-Nparam).gt.0) then ! HSres(n)%Pvalue=1 - gammp(dble(HSres(n)%nobs-Nparam)/2,HSres(n)%Chisq/2) ! endif ! ! case default ! stop "Error in subroutine evaluate_model: Please specify runmode!" ! ! end select deallocate(neutHiggses) deallocate(assignmentgroups, assignmentgroups_domH, assignmentgroups_Higgs_comb) end subroutine evaluate_model !------------------------------------------------------------ subroutine calc_mupred( j, t, mutab, Higgs ) +! internal routine ! Calculates the model-predicted signal strength modifier !------------------------------------------------------------ use usefulbits, only : dataset, div, vsmall use usefulbits_HS, only : neutHiggs, mutable, useSMtest, eps implicit none integer, intent(in) :: j ! Higgs index type(dataset), intent(in) :: t type(mutable), intent(inout) :: mutab type(neutHiggs), intent(inout) :: Higgs integer :: i double precision :: c, dcbyc integer :: testSMratios logical :: correct_properties Higgs%m = t%particle(mutab%particle_x)%M(j) Higgs%dm = t%particle(mutab%particle_x)%dM(j) Higgs%id = j call get_channelrates( j, t, mutab ) correct_properties=.True. !--Evaluate the predicted signal strength modifier c of the model c=0. do i=1,mutab%Nc !----use a weighted average of the channel rate ratios c=c+mutab%channel_w(i,j)*mutab%channel_mu(i,j) enddo !--Evaluate the deviation of each channel rate ratio to the signal !--strength modifier c and test SM likeness criterium, if this is !--activated. testSMratios= 1 !passes the SM-like ratios test do i=1,mutab%Nc dcbyc=div((mutab%channel_mu(i,j)-c),c,0.0D0,1.0D9) if(dcbyc*mutab%channel_w(i,j).gt.eps.and.useSMtest) then testSMratios= -1 !fails the SM-like ratios test endif enddo if(testSMratios.lt.0) correct_properties=.False. if(correct_properties) then Higgs%mu=c else Higgs%mu=0.0D0 endif end subroutine calc_mupred !------------------------------------------------------------ subroutine get_channelrates( j, t, mutab ) +! internal routine +! ! This subroutine assignes the rates, weights and systematic rate uncertainty of ! the Higgs boson (j) for the channels considered by the analysis (mutab). ! ! WARNING: if normalize_rates_to_reference_position is true ! The rates are normalized w.r.t. a reference rate at the (peak) mass position. ! This does not work with the mass-centered chi^2 method. ! Also, theoretical mass uncertainties are problematic! !------------------------------------------------------------ use usefulbits, only : dataset, div, small use usefulbits_HS, only : neutHiggs, mutable, delta_rate, normalize_rates_to_reference_position,& & normalize_rates_to_reference_position_outside_dmtheo use theory_XS_SM_functions use theory_BRfunctions integer, intent(in) :: j type(dataset), intent(in) :: t type(mutable), intent(inout) :: mutab integer :: i, p, d ! id integer :: ii, p1, p2, d1, d2 !id1, id2 double precision :: rate, SMrate, modelrate, drsq_SM, drsq, dBR, dBRSM,drcov,drcovSM double precision :: rate_SMref,refmass,BR_SMref!,BR_SMref_mpeak double precision :: dynamicalmass, rate_SMdyn ! TS (17/10/2018: dynamicalmass is the default reference mass position for the SM normalization) if(size(mutab%mass,dim=1).eq.1) then refmass = mutab%mass(1) ! TS (17/10/2018): Take dynamical reference mass for SM-normalization at mobs+dmtheo box boundary. if(t%particle(mutab%particle_x)%M(j).ge.(mutab%mass(1)+t%particle(mutab%particle_x)%dM(j))) then dynamicalmass = mutab%mass(1) + t%particle(mutab%particle_x)%dM(j) else if(t%particle(mutab%particle_x)%M(j).le.(mutab%mass(1)-t%particle(mutab%particle_x)%dM(j))) then dynamicalmass = mutab%mass(1) - t%particle(mutab%particle_x)%dM(j) else dynamicalmass = t%particle(mutab%particle_x)%M(j) endif ! write(*,*) "HS debug, dynamicalmass, refmass = ",dynamicalmass, refmass !--- else ! Only relevant for the mass-centered chi^2 method refmass = t%particle(mutab%particle_x)%M(j) endif !write(*,*) 'DEBUG HS: id = ', mutab%id !write(*,*) 'DEBUG HS, m = ', t%particle(mutab%particle_x)%M(j) do i=1,mutab%Nc ! id = mutab%channel_id(i) ! p = int((id-modulo(id,10))/dble(10)) ! d = modulo(id,10) p = mutab%channel_p_id(i) d = mutab%channel_d_id(i) !--Do the production rate for the relevant experiment and cms-energy if(mutab%collider.eq.'LHC') then if(abs(mutab%energy-7.0D0).le.small) then if(p.eq.1) then rate=t%lhc7%XS_hj_ratio(j) SMrate=t%lhc7%XS_H_SM(j) rate_SMdyn=XS_lhc7_gg_H_SM(dynamicalmass)+XS_lhc7_bb_H_SM(dynamicalmass) rate_SMref=XS_lhc7_gg_H_SM(refmass)+XS_lhc7_bb_H_SM(refmass) mutab%channel_description(i,1)='singleH' else if(p.eq.2) then rate=t%lhc7%XS_vbf_ratio(j) SMrate=t%lhc7%XS_vbf_SM(j) rate_SMdyn=XS_lhc7_vbf_SM(dynamicalmass) rate_SMref=XS_lhc7_vbf_SM(refmass) mutab%channel_description(i,1)='VBF' else if(p.eq.3) then rate=t%lhc7%XS_hjW_ratio(j) SMrate=t%lhc7%XS_HW_SM(j) rate_SMdyn=WH_nnlo(dynamicalmass,'LHC7 ',1.0D0,1.0D0,1.0D0,.True.,.True.) rate_SMref=WH_nnlo(refmass,'LHC7 ',1.0D0,1.0D0,1.0D0,.True.,.True.) mutab%channel_description(i,1)='HW' else if(p.eq.4) then rate=t%lhc7%XS_hjZ_ratio(j) SMrate=t%lhc7%XS_HZ_SM(j) rate_SMdyn=ZH_cpmix_nnlo_ggqqbb(dynamicalmass,'LHC7 ',1.0D0,1.0D0,1.0D0,0.0D0,0.0D0,.True.) rate_SMref=ZH_cpmix_nnlo_ggqqbb(refmass,'LHC7 ',1.0D0,1.0D0,1.0D0,0.0D0,0.0D0,.True.) mutab%channel_description(i,1)='HZ' else if(p.eq.5) then rate=t%lhc7%XS_tthj_ratio(j) SMrate=t%lhc7%XS_ttH_SM(j) rate_SMdyn=XS_lhc7_ttH_SM(dynamicalmass) rate_SMref=XS_lhc7_ttH_SM(refmass) mutab%channel_description(i,1)='ttH' else if(p.eq.6) then rate=t%lhc7%XS_gg_hj_ratio(j) SMrate=t%lhc7%XS_gg_H_SM(j) rate_SMdyn=XS_lhc7_gg_H_SM(dynamicalmass) rate_SMref=XS_lhc7_gg_H_SM(refmass) mutab%channel_description(i,1)='ggH' else if(p.eq.7) then rate=t%lhc7%XS_bb_hj_ratio(j) SMrate=t%lhc7%XS_bb_H_SM(j) rate_SMdyn=XS_lhc7_bb_H_SM(dynamicalmass) rate_SMref=XS_lhc7_bb_H_SM(refmass) mutab%channel_description(i,1)='bbH' else if(p.eq.8) then rate=t%lhc7%XS_thj_tchan_ratio(j) SMrate=t%lhc7%XS_tH_tchan_SM(j) rate_SMdyn=XS_lhc7_tH_tchan_SM(dynamicalmass) rate_SMref=XS_lhc7_tH_tchan_SM(refmass) mutab%channel_description(i,1)='tH (t-channel)' else if(p.eq.9) then rate=t%lhc7%XS_thj_schan_ratio(j) SMrate=t%lhc7%XS_tH_schan_SM(j) rate_SMdyn=XS_lhc7_tH_schan_SM(dynamicalmass) rate_SMref=XS_lhc7_tH_schan_SM(refmass) mutab%channel_description(i,1)='tH (s-channel)' else if(p.eq.10) then rate=t%lhc7%XS_qq_hjZ_ratio(j) SMrate=t%lhc7%XS_qq_HZ_SM(j) rate_SMdyn=ZH_cpmix_nnlo_qqbb(dynamicalmass,'LHC7 ',1.0D0,1.0D0,1.0D0,0.0D0,0.0D0,.True.) rate_SMref=ZH_cpmix_nnlo_qqbb(refmass,'LHC7 ',1.0D0,1.0D0,1.0D0,0.0D0,0.0D0,.True.) mutab%channel_description(i,1)='qq-HZ' else if(p.eq.11) then rate=t%lhc7%XS_gg_hjZ_ratio(j) SMrate=t%lhc7%XS_gg_HZ_SM(j) rate_SMdyn=ZH_cpmix_nnlo_gg(dynamicalmass,'LHC7 ',1.0D0,1.0D0,1.0D0,0.0D0,0.0D0,.True.) rate_SMref=ZH_cpmix_nnlo_gg(refmass,'LHC7 ',1.0D0,1.0D0,1.0D0,0.0D0,0.0D0,.True.) mutab%channel_description(i,1)='gg-HZ' else if(p.eq.0) then rate=1.0D0 SMrate=1.0D0 rate_SMdyn=1.0D0 rate_SMref=1.0D0 mutab%channel_description(i,1)='none' endif else if(abs(mutab%energy-8.0D0).le.small) then if(p.eq.1) then rate=t%lhc8%XS_hj_ratio(j) SMrate=t%lhc8%XS_H_SM(j) rate_SMdyn=XS_lhc8_gg_H_SM(dynamicalmass)+XS_lhc8_bb_H_SM(dynamicalmass) rate_SMref=XS_lhc8_gg_H_SM(refmass)+XS_lhc8_bb_H_SM(refmass) mutab%channel_description(i,1)='singleH' else if(p.eq.2) then rate=t%lhc8%XS_vbf_ratio(j) SMrate=t%lhc8%XS_vbf_SM(j) rate_SMdyn=XS_lhc8_vbf_SM(dynamicalmass) rate_SMref=XS_lhc8_vbf_SM(refmass) mutab%channel_description(i,1)='VBF' else if(p.eq.3) then rate=t%lhc8%XS_hjW_ratio(j) SMrate=t%lhc8%XS_HW_SM(j) rate_SMdyn=WH_nnlo(dynamicalmass,'LHC8 ',1.0D0,1.0D0,1.0D0,.True.,.True.) rate_SMref=WH_nnlo(refmass,'LHC8 ',1.0D0,1.0D0,1.0D0,.True.,.True.) mutab%channel_description(i,1)='HW' else if(p.eq.4) then rate=t%lhc8%XS_hjZ_ratio(j) SMrate=t%lhc8%XS_HZ_SM(j) rate_SMdyn=ZH_cpmix_nnlo_ggqqbb(dynamicalmass,'LHC8 ',1.0D0,1.0D0,1.0D0,0.0D0,0.0D0,.True.) rate_SMref=ZH_cpmix_nnlo_ggqqbb(refmass,'LHC8 ',1.0D0,1.0D0,1.0D0,0.0D0,0.0D0,.True.) mutab%channel_description(i,1)='HZ' else if(p.eq.5) then rate=t%lhc8%XS_tthj_ratio(j) SMrate=t%lhc8%XS_ttH_SM(j) rate_SMdyn=XS_lhc8_ttH_SM(dynamicalmass) rate_SMref=XS_lhc8_ttH_SM(refmass) mutab%channel_description(i,1)='ttH' else if(p.eq.6) then rate=t%lhc8%XS_gg_hj_ratio(j) SMrate=t%lhc8%XS_gg_H_SM(j) rate_SMdyn=XS_lhc8_gg_H_SM(dynamicalmass) rate_SMref=XS_lhc8_gg_H_SM(refmass) mutab%channel_description(i,1)='ggH' else if(p.eq.7) then rate=t%lhc8%XS_bb_hj_ratio(j) SMrate=t%lhc8%XS_bb_H_SM(j) rate_SMdyn=XS_lhc8_bb_H_SM(dynamicalmass) rate_SMref=XS_lhc8_bb_H_SM(refmass) mutab%channel_description(i,1)='bbH' else if(p.eq.8) then rate=t%lhc8%XS_thj_tchan_ratio(j) SMrate=t%lhc8%XS_tH_tchan_SM(j) rate_SMdyn=XS_lhc8_tH_tchan_SM(dynamicalmass) rate_SMref=XS_lhc8_tH_tchan_SM(refmass) mutab%channel_description(i,1)='tH (t-channel)' else if(p.eq.9) then rate=t%lhc8%XS_thj_schan_ratio(j) SMrate=t%lhc8%XS_tH_schan_SM(j) rate_SMdyn=XS_lhc8_tH_schan_SM(dynamicalmass) rate_SMref=XS_lhc8_tH_schan_SM(refmass) mutab%channel_description(i,1)='tH (s-channel)' else if(p.eq.10) then rate=t%lhc8%XS_qq_hjZ_ratio(j) SMrate=t%lhc8%XS_qq_HZ_SM(j) rate_SMdyn=ZH_cpmix_nnlo_qqbb(dynamicalmass,'LHC8 ',1.0D0,1.0D0,1.0D0,0.0D0,0.0D0,.True.) rate_SMref=ZH_cpmix_nnlo_qqbb(refmass,'LHC8 ',1.0D0,1.0D0,1.0D0,0.0D0,0.0D0,.True.) mutab%channel_description(i,1)='qq-HZ' else if(p.eq.11) then rate=t%lhc8%XS_gg_hjZ_ratio(j) SMrate=t%lhc8%XS_gg_HZ_SM(j) rate_SMdyn=ZH_cpmix_nnlo_gg(dynamicalmass,'LHC8 ',1.0D0,1.0D0,1.0D0,0.0D0,0.0D0,.True.) rate_SMref=ZH_cpmix_nnlo_gg(refmass,'LHC8 ',1.0D0,1.0D0,1.0D0,0.0D0,0.0D0,.True.) mutab%channel_description(i,1)='gg-HZ' else if(p.eq.0) then rate=1.0D0 SMrate=1.0D0 rate_SMdyn=1.0D0 rate_SMref=1.0D0 mutab%channel_description(i,1)='none' endif else if(abs(mutab%energy-13.0D0).le.small) then if(p.eq.1) then rate=t%lhc13%XS_hj_ratio(j) SMrate=t%lhc13%XS_H_SM(j) rate_SMdyn=XS_lhc13_gg_H_SM(dynamicalmass)+XS_lhc13_bb_H_SM(dynamicalmass) rate_SMref=XS_lhc13_gg_H_SM(refmass) + XS_lhc13_bb_H_SM(refmass) mutab%channel_description(i,1)='singleH' else if(p.eq.2) then rate=t%lhc13%XS_vbf_ratio(j) SMrate=t%lhc13%XS_vbf_SM(j) rate_SMdyn=XS_lhc13_vbf_SM(dynamicalmass) rate_SMref=XS_lhc13_vbf_SM(refmass) mutab%channel_description(i,1)='VBF' else if(p.eq.3) then rate=t%lhc13%XS_hjW_ratio(j) SMrate=t%lhc13%XS_HW_SM(j) rate_SMdyn=WH_nnlo(dynamicalmass,'LHC13',1.0D0,1.0D0,1.0D0,.True.,.True.) rate_SMref=WH_nnlo(refmass,'LHC13',1.0D0,1.0D0,1.0D0,.True.,.True.) mutab%channel_description(i,1)='HW' else if(p.eq.4) then rate=t%lhc13%XS_hjZ_ratio(j) SMrate=t%lhc13%XS_HZ_SM(j) rate_SMdyn=ZH_cpmix_nnlo_ggqqbb(dynamicalmass,'LHC13',1.0D0,1.0D0,1.0D0,0.0D0,0.0D0,.True.) rate_SMref=ZH_cpmix_nnlo_ggqqbb(refmass,'LHC13',1.0D0,1.0D0,1.0D0,0.0D0,0.0D0,.True.) mutab%channel_description(i,1)='HZ' else if(p.eq.5) then rate=t%lhc13%XS_tthj_ratio(j) SMrate=t%lhc13%XS_ttH_SM(j) rate_SMdyn=XS_lhc13_ttH_SM(dynamicalmass) rate_SMref=XS_lhc13_ttH_SM(refmass) mutab%channel_description(i,1)='ttH' else if(p.eq.6) then rate=t%lhc13%XS_gg_hj_ratio(j) SMrate=t%lhc13%XS_gg_H_SM(j) rate_SMdyn=XS_lhc13_gg_H_SM(dynamicalmass) rate_SMref=XS_lhc13_gg_H_SM(refmass) mutab%channel_description(i,1)='ggH' else if(p.eq.7) then rate=t%lhc13%XS_bb_hj_ratio(j) SMrate=t%lhc13%XS_bb_H_SM(j) rate_SMdyn=XS_lhc13_bb_H_SM(dynamicalmass) rate_SMref=XS_lhc13_bb_H_SM(refmass) mutab%channel_description(i,1)='bbH' else if(p.eq.8) then rate=t%lhc13%XS_thj_tchan_ratio(j) SMrate=t%lhc13%XS_tH_tchan_SM(j) rate_SMdyn=XS_lhc13_tH_tchan_SM(dynamicalmass) rate_SMref=XS_lhc13_tH_tchan_SM(refmass) mutab%channel_description(i,1)='tH (t-channel)' else if(p.eq.9) then rate=t%lhc13%XS_thj_schan_ratio(j) SMrate=t%lhc13%XS_tH_schan_SM(j) rate_SMdyn=XS_lhc13_tH_schan_SM(dynamicalmass) rate_SMref=XS_lhc13_tH_schan_SM(refmass) mutab%channel_description(i,1)='tH (s-channel)' else if(p.eq.10) then rate=t%lhc13%XS_qq_hjZ_ratio(j) SMrate=t%lhc13%XS_qq_HZ_SM(j) rate_SMdyn=ZH_cpmix_nnlo_qqbb(dynamicalmass,'LHC13',1.0D0,1.0D0,1.0D0,0.0D0,0.0D0,.True.) rate_SMref=ZH_cpmix_nnlo_qqbb(refmass,'LHC13',1.0D0,1.0D0,1.0D0,0.0D0,0.0D0,.True.) mutab%channel_description(i,1)='qq-HZ' else if(p.eq.11) then rate=t%lhc13%XS_gg_hjZ_ratio(j) SMrate=t%lhc13%XS_gg_HZ_SM(j) rate_SMdyn=ZH_cpmix_nnlo_gg(dynamicalmass,'LHC13',1.0D0,1.0D0,1.0D0,0.0D0,0.0D0,.True.) rate_SMref=ZH_cpmix_nnlo_gg(refmass,'LHC13',1.0D0,1.0D0,1.0D0,0.0D0,0.0D0,.True.) mutab%channel_description(i,1)='gg-HZ' else if(p.eq.0) then rate=1.0D0 SMrate=1.0D0 rate_SMdyn=1.0D0 rate_SMref=1.0D0 mutab%channel_description(i,1)='none' endif endif else if(mutab%collider.eq.'TEV') then if(p.eq.1) then rate=t%tev%XS_hj_ratio(j) SMrate=t%tev%XS_H_SM(j) rate_SMdyn=XS_tev_gg_H_SM(dynamicalmass)+XS_tev_bb_H_SM(dynamicalmass) rate_SMref=XS_tev_gg_H_SM(refmass)+XS_tev_bb_H_SM(refmass) mutab%channel_description(i,1)='singleH' else if(p.eq.2) then rate=t%tev%XS_vbf_ratio(j) SMrate=t%tev%XS_vbf_SM(j) rate_SMdyn=XS_tev_vbf_SM(dynamicalmass) rate_SMref=XS_tev_vbf_SM(refmass) mutab%channel_description(i,1)='VBF' else if(p.eq.3) then rate=t%tev%XS_hjW_ratio(j) SMrate=t%tev%XS_HW_SM(j) rate_SMdyn=WH_nnlo(dynamicalmass,'TEV ',1.0D0,1.0D0,1.0D0,.True.,.True.) rate_SMref=WH_nnlo(refmass,'TEV ',1.0D0,1.0D0,1.0D0,.True.,.True.) mutab%channel_description(i,1)='HW' else if(p.eq.4) then rate=t%tev%XS_hjZ_ratio(j) SMrate=t%tev%XS_HZ_SM(j) rate_SMdyn=ZH_cpmix_nnlo_ggqqbb(dynamicalmass,'TEV ',1.0D0,1.0D0,1.0D0,0.0D0,0.0D0,.True.) rate_SMref=ZH_cpmix_nnlo_ggqqbb(refmass,'TEV ',1.0D0,1.0D0,1.0D0,0.0D0,0.0D0,.True.) mutab%channel_description(i,1)='HZ' else if(p.eq.5) then rate=t%tev%XS_tthj_ratio(j) SMrate=t%tev%XS_ttH_SM(j) rate_SMdyn=XS_tev_ttH_SM(dynamicalmass) rate_SMref=XS_tev_ttH_SM(refmass) mutab%channel_description(i,1)='ttH' else if(p.eq.0) then rate=1.0D0 SMrate=1.0D0 rate_SMdyn=1.0D0 rate_SMref=1.0D0 mutab%channel_description(i,1)='none' endif else if(mutab%collider.eq.'ILC') then !--n.B.: As a first attempt, we use the LHC8 normalized cross sections for ZH, VBF, ttH. ! In order to do this properly, a separate input for the ILC cross sections ! has to be provided! It works only for single production mode observables (no ! correct weighting of channels included!)Then, at least in the effective coupling ! approximation, there is no difference to a full implementation. ! The theoretical uncertainty of the ILC production modes will are defined in ! usefulbits_HS.f90. if(p.eq.1.or.p.eq.2) then write(*,*) 'Warning: Unknown ILC production mode (',p,') in table ',mutab%id rate=0.0D0 SMrate=1.0D0 rate_SMref=1.0D0 mutab%channel_description(i,1)='unknown' else if(p.eq.3) then rate=t%lhc8%XS_hjW_ratio(j) SMrate=t%lhc8%XS_HW_SM(j) rate_SMdyn=WH_nnlo(dynamicalmass,'LHC8 ',1.0D0,1.0D0,1.0D0,.True.,.True.) rate_SMref=WH_nnlo(refmass,'LHC8 ',1.0D0,1.0D0,1.0D0,.True.,.True.) mutab%channel_description(i,1)='WBF' else if(p.eq.4) then rate=t%lhc8%XS_hjZ_ratio(j) SMrate=t%lhc8%XS_HZ_SM(j) rate_SMdyn=XS_lhc8_HZ_SM(dynamicalmass) rate_SMref=XS_lhc8_HZ_SM(refmass) mutab%channel_description(i,1)='HZ' else if(p.eq.5) then rate=t%lhc8%XS_tthj_ratio(j) SMrate=t%lhc8%XS_ttH_SM(j) rate_SMdyn=XS_lhc8_ttH_SM(dynamicalmass) rate_SMref=XS_lhc8_ttH_SM(refmass) mutab%channel_description(i,1)='ttH' else if(p.eq.0) then rate=1.0D0 SMrate=1.0D0 rate_SMdyn=1.0D0 rate_SMref=1.0D0 mutab%channel_description(i,1)='none' endif endif ! write(*,*) "DEBUG, after production mode, rate_SMdyn = ",rate_SMdyn !--Multiply now by the decay rate if(d.eq.1) then rate=rate*div(t%BR_hjgaga(j),t%BR_Hgaga_SM(j),0.0D0,1.0D0) SMrate=SMrate*t%BR_Hgaga_SM(j) rate_SMdyn = rate_SMdyn*BRSM_Hgaga(dynamicalmass) rate_SMref = rate_SMref*BRSM_Hgaga(refmass) mutab%channel_description(i,2)='gammagamma' else if(d.eq.2) then rate=rate*div(t%BR_hjWW(j),t%BR_HWW_SM(j),0.0D0,1.0D0) SMrate=SMrate*t%BR_HWW_SM(j) rate_SMdyn = rate_SMdyn*BRSM_HWW(dynamicalmass) rate_SMref = rate_SMref*BRSM_HWW(refmass) mutab%channel_description(i,2)='WW' else if(d.eq.3) then rate=rate*div(t%BR_hjZZ(j),t%BR_HZZ_SM(j),0.0D0,1.0D0) SMrate=SMrate*t%BR_HZZ_SM(j) rate_SMdyn = rate_SMdyn*BRSM_HZZ(dynamicalmass) rate_SMref = rate_SMref*BRSM_HZZ(refmass) mutab%channel_description(i,2)='ZZ' else if(d.eq.4) then rate=rate*div(t%BR_hjtautau(j),t%BR_Htautau_SM(j),0.0D0,1.0D0) SMrate=SMrate*t%BR_Htautau_SM(j) rate_SMdyn = rate_SMdyn*BRSM_Htautau(dynamicalmass) rate_SMref = rate_SMref*BRSM_Htautau(refmass) mutab%channel_description(i,2)='tautau' else if(d.eq.5) then rate=rate*div(t%BR_hjbb(j),t%BR_Hbb_SM(j),0.0D0,1.0D0) SMrate=SMrate*t%BR_Hbb_SM(j) rate_SMdyn = rate_SMdyn*BRSM_Hbb(dynamicalmass) rate_SMref = rate_SMref*BRSM_Hbb(refmass) mutab%channel_description(i,2)='bb' else if(d.eq.6) then rate=rate*div(t%BR_hjZga(j),t%BR_HZga_SM(j),0.0D0,1.0D0) SMrate=SMrate*t%BR_HZga_SM(j) rate_SMdyn = rate_SMdyn*BRSM_HZga(dynamicalmass) rate_SMref = rate_SMref*BRSM_HZga(refmass) mutab%channel_description(i,2)='Zgamma' else if(d.eq.7) then rate=rate*div(t%BR_hjcc(j),t%BR_Hcc_SM(j),0.0D0,1.0D0) SMrate=SMrate*t%BR_Hcc_SM(j) rate_SMdyn = rate_SMdyn*BRSM_Hcc(dynamicalmass) rate_SMref = rate_SMref*BRSM_Hcc(refmass) mutab%channel_description(i,2)='cc' else if(d.eq.8) then rate=rate*div(t%BR_hjmumu(j),t%BR_Hmumu_SM(j),0.0D0,1.0D0) SMrate=SMrate*t%BR_Hmumu_SM(j) rate_SMdyn = rate_SMdyn*BRSM_Hmumu(dynamicalmass) rate_SMref = rate_SMref*BRSM_Hmumu(refmass) mutab%channel_description(i,2)='mumu' else if(d.eq.9) then rate=rate*div(t%BR_hjgg(j),t%BR_Hgg_SM(j),0.0D0,1.0D0) SMrate=SMrate*t%BR_Hgg_SM(j) rate_SMdyn = rate_SMdyn*BRSM_Hgg(dynamicalmass) rate_SMref = rate_SMref*BRSM_Hgg(refmass) mutab%channel_description(i,2)='gg' else if(d.eq.10) then rate=rate*div(t%BR_hjss(j),t%BR_Hss_SM(j),0.0D0,1.0D0) SMrate=SMrate*t%BR_Hss_SM(j) rate_SMdyn = rate_SMdyn*BRSM_Hss(dynamicalmass) rate_SMref = rate_SMref*BRSM_Hss(refmass) mutab%channel_description(i,2)='ss' else if(d.eq.11) then rate=rate*div(t%BR_hjtt(j),t%BR_Htt_SM(j),0.0D0,1.0D0) SMrate=SMrate*t%BR_Htt_SM(j) rate_SMdyn = rate_SMdyn*BRSM_Htoptop(dynamicalmass) rate_SMref = rate_SMref*BRSM_Htoptop(refmass) mutab%channel_description(i,2)='tt' else if(d.eq.0) then rate=rate*1.0D0 SMrate=SMrate*1.0D0 rate_SMdyn = rate_SMdyn*1.0D0 rate_SMref = rate_SMref*1.0D0 mutab%channel_description(i,2)='none' endif !------------------------- ! NEW FEATURE (since HB-5.2): Enable to set channelrates directly. if(p.ne.0.and.d.ne.0) then select case(d) case(1) BR_SMref = t%BR_Hgaga_SM(j) ! BR_SMref_mpeak = BRSM_Hgaga(refmass) case(2) BR_SMref = t%BR_HWW_SM(j) ! BR_SMref_mpeak = BRSM_HWW(refmass) case(3) BR_SMref = t%BR_HZZ_SM(j) ! BR_SMref_mpeak = BRSM_HZZ(refmass) case(4) BR_SMref = t%BR_Htautau_SM(j) ! BR_SMref_mpeak = BRSM_Htautau(refmass) case(5) BR_SMref = t%BR_Hbb_SM(j) ! BR_SMref_mpeak = BRSM_Hbb(refmass) case(6) BR_SMref = t%BR_HZga_SM(j) ! BR_SMref_mpeak = BRSM_HZga(refmass) case(7) BR_SMref = t%BR_Hcc_SM(j) ! BR_SMref_mpeak = BRSM_Hcc(refmass) case(8) BR_SMref = t%BR_Hmumu_SM(j) ! BR_SMref_mpeak = BRSM_Hmumu(refmass) case(9) BR_SMref = t%BR_Hgg_SM(j) ! BR_SMref_mpeak = BRSM_Hgg(refmass) case(10) BR_SMref = t%BR_Hss_SM(j) case(11) BR_SMref = t%BR_Htt_SM(j) end select if(mutab%collider.eq.'LHC') then if(abs(mutab%energy-7.0D0).le.small) then if(t%lhc7%channelrates(j,p,d).ge.0.0d0) then rate=div(t%lhc7%channelrates(j,p,d),BR_SMref,0.0D0,1.0D0) endif else if(abs(mutab%energy-8.0D0).le.small) then if(t%lhc8%channelrates(j,p,d).ge.0.0d0) then rate=div(t%lhc8%channelrates(j,p,d),BR_SMref,0.0D0,1.0D0) endif else if(abs(mutab%energy-13.0D0).le.small) then if(t%lhc13%channelrates(j,p,d).ge.0.0d0) then rate=div(t%lhc13%channelrates(j,p,d),BR_SMref,0.0D0,1.0D0) endif endif else if(mutab%collider.eq.'TEV') then if(t%tev%channelrates(j,p,d).ge.0.0d0) then rate=div(t%tev%channelrates(j,p,d),BR_SMref,0.0D0,1.0D0) endif endif endif !------------------------- ! write(*,*) 'DEBUG HS: SM BRs = ', t%BR_HWW_SM(j), t%BR_HZZ_SM(j), t%BR_Hgaga_SM(j) ! write(*,*) 'DEBUG HS: rate, SMrate(i), rate_SMdyn = ', rate, SMrate, rate_SMdyn ! write(*,*) 'DEBUG HS: eff(i) = ', mutab%channel_eff(i) if(normalize_rates_to_reference_position) then !! THIS IS STILL IN TESTING PHASE !! mutab%channel_mu(i,j)=rate*SMrate/(rate_SMref) ! write(*,*) "DEBUG HS: normalize_rates_to_reference_position, mu = ",mutab%channel_mu(i,j) else ! mutab%channel_mu(i,j)=rate !! OLD WAY mutab%channel_mu(i,j)=rate*SMrate/(rate_SMdyn) !! NEW WAY (TS 17/10/2018) ! write(*,*) "DEBUG HS: not normalize_rates_to_reference_position, mu = ",mutab%channel_mu(i,j) endif if(normalize_rates_to_reference_position_outside_dmtheo) then if(abs(refmass-t%particle(mutab%particle_x)%M(j)).ge.t%particle(mutab%particle_x)%dM(j)) then mutab%channel_mu(i,j)=rate*SMrate/(rate_SMref) endif endif mutab%channel_w(i,j)=mutab%channel_eff(i)*SMrate ! mutab%channel_w_corrected_eff(i,j)=mutab%channel_eff_ratios(i)*mutab%channel_eff(i)*SMrate enddo ! write(*,*) 'DEBUG HS: BRs = ', t%BR_hjWW, t%BR_hjZZ, t%BR_hjgaga ! write(*,*) 'DEBUG HS: LHC13 = ', t%lhc13%XS_hj_ratio, t%lhc13%XS_vbf_ratio, t%lhc13%XS_hjW_ratio,& ! t%lhc13%XS_hjZ_ratio, t%lhc13%XS_tthj_ratio SMrate=sum(mutab%channel_w(:,j)) ! write(*,*) 'DEBUG HS: SMrate = ', SMrate ! modelrate=sum(mutab%channel_w_corrected_eff(:,j)) do i=1,mutab%Nc mutab%channel_w(i,j)=div(mutab%channel_w(i,j),SMrate,0.0D0,1.0D9) ! mutab%channel_w_corrected_eff(i,j)=div(mutab%channel_w_corrected_eff(i,j),modelrate,0.0D0,1.0D9) enddo ! (TS 30/10/2013): ! write(*,*) "get_channelrates (mu, w, weff):" ! write(*,*) mutab%channel_mu ! write(*,*) mutab%channel_w ! write(*,*) mutab%channel_eff_ratios do i=1,mutab%Nc mutab%channel_w_corrected_eff(i,j)=mutab%channel_eff_ratios(i)*mutab%channel_w(i,j) ! n.b.: model weights are not normalized to 1! enddo ! write(*,*) j,mutab%id, "SM = ", mutab%channel_w(:,j) ! write(*,*) j,mutab%id, "SM effcorr = ",mutab%channel_w_corrected_eff(:,j) do i=1,mutab%Nc drsq_SM = 0.0D0 drsq = 0.0D0 ! id1 = mutab%channel_id(i) ! p1 = int((id1-modulo(id1,10))/dble(10)) ! d1 = modulo(id1,10) p1 = mutab%channel_p_id(i) d1 = mutab%channel_d_id(i) if(mutab%collider.ne.'ILC') then do ii=1,mutab%Nc p2 = mutab%channel_p_id(ii) d2 = mutab%channel_d_id(ii) ! id2 = mutab%channel_id(ii) ! p2 = int((id2-modulo(id2,10))/dble(10)) ! d2 = modulo(id2,10) if(p1.eq.p2.and.p1.ne.0) then if(delta_rate%CScov_ok.and.delta_rate%usecov) then !-- TS 29/03/2017: Add 13 TeV XS covariance matrix here if(abs(mutab%energy-13.0D0).le.small) then drcov=delta_rate%CS13cov(p1,p1) drcovSM=delta_rate%CS13covSM(p1,p1) else drcov=delta_rate%CScov(p1,p1) drcovSM=delta_rate%CScovSM(p1,p1) endif drsq=drsq+drcov*mutab%channel_w_corrected_eff(i,j)*mutab%channel_w_corrected_eff(ii,j) drsq_SM=drsq_SM+drcovSM*mutab%channel_w(i,j)*mutab%channel_w(ii,j) else drsq=drsq+delta_rate%dCS(p1)**2*mutab%channel_w_corrected_eff(i,j)*mutab%channel_w_corrected_eff(ii,j) drsq_SM=drsq_SM+delta_rate%dCS_SM(p1)**2*mutab%channel_w(i,j)*mutab%channel_w(ii,j) endif endif if(d1.eq.d2.and.d1.ne.0) then if(delta_rate%BRcov_ok.and.delta_rate%usecov) then dBRSM = delta_rate%BRcovSM(d1,d1) dBR = delta_rate%BRcov(d1,d1) else dBRSM = delta_rate%dBR_SM(d1)**2 dBR = delta_rate%dBR(d1)**2 endif drsq=drsq+dBR*mutab%channel_w_corrected_eff(i,j)*mutab%channel_w_corrected_eff(ii,j) drsq_SM=drsq_SM+dBRSM*mutab%channel_w(i,j)*mutab%channel_w(ii,j) endif enddo endif mutab%channel_syst(i,j)=sqrt(drsq) mutab%channel_systSM(i,j)=sqrt(drsq_SM) enddo ! write(*,*) 'DEBUG HS: mu = ', mutab%channel_mu ! write(*,*) 'DEBUG HS: w = ', mutab%channel_w ! write(*,*) 'DEBUG HS: eff = ', mutab%channel_eff end subroutine get_channelrates !------------------------------------------------------------ subroutine get_Rvalues(ii,collider,R_H_WW, R_H_ZZ, R_H_gaga, R_H_tautau, R_H_bb, R_VH_bb) ! Returns SM normalized signal rates of some relevant channels (w/o efficiencies) ! for Higgs boson "ii" for a specific collider (see subroutine get_rates). !------------------------------------------------------------ ! use usefulbits, only : theo, np,Hneut ! use usefulbits_HS, only : mutable integer, intent(in) :: ii, collider double precision, intent(out) :: R_H_WW, R_H_ZZ, R_H_gaga, R_H_tautau, R_H_bb, R_VH_bb ! type(mutable) :: dummytable ! integer :: i call get_rates(ii,collider,5,(/ 12, 22, 32, 42, 52 /),R_H_WW) call get_rates(ii,collider,5,(/ 13, 23, 33, 43, 53 /),R_H_ZZ) call get_rates(ii,collider,5,(/ 11, 21, 31, 41, 51 /),R_H_gaga) call get_rates(ii,collider,5,(/ 14, 24, 34, 44, 54 /),R_H_tautau) call get_rates(ii,collider,5,(/ 15, 25, 35, 45, 55 /),R_H_bb) call get_rates(ii,collider,2,(/ 35, 45 /),R_VH_bb) end subroutine get_Rvalues !************************************************************ subroutine get_rates(ii,collider,Nchannels,IDchannels,rate) ! Returns SM normalized signal rates (w/o efficiencies) for Higgs boson "ii" and collider ! experiment "collider"(=1,2,3 for TEV, LHC7, LHC8). "Nchannels" gives the total number ! and IDchannels the two-digit ID of the subchannels, which should be included in the rates. ! IDchannels is an array of size(Nchannels). !------------------------------------------------------------ use usefulbits, only : theo, np,Hneut use usefulbits_HS, only : mutable integer, intent(in) :: ii, collider, Nchannels integer, dimension(Nchannels), intent(in) :: IDchannels double precision, intent(out) :: rate !-Internal type(mutable) :: dummytable integer :: i !-Initialize a dummy mutable in order to run get_channelrates for the channels we want. if(collider.eq.1) then dummytable%collider = 'TEV' else if(collider.eq.2) then dummytable%collider = 'LHC' dummytable%energy = 7.0D0 else if(collider.eq.3) then dummytable%collider = 'LHC' dummytable%energy = 8.0D0 else if(collider.eq.4) then dummytable%collider = 'LHC' dummytable%energy = 13.0D0 else write(*,*) 'WARNING: collider experiment for get_rates unknown.' continue endif dummytable%id = 999999 dummytable%particle_x = 1 dummytable%Nc=Nchannels allocate(dummytable%mass(1)) dummytable%mass(1) = theo(1)%particle(dummytable%particle_x)%M(ii) ! allocate(dummytable%channel_id(Nchannels)) allocate(dummytable%channel_p_id(Nchannels)) allocate(dummytable%channel_d_id(Nchannels)) allocate(dummytable%channel_eff(Nchannels)) allocate(dummytable%channel_eff_ratios(Nchannels)) !-Set all efficiencies equal: dummytable%channel_eff = 1.0D0 dummytable%channel_eff_ratios = 1.0D0 allocate(dummytable%channel_description(Nchannels,2)) allocate(dummytable%channel_w(Nchannels,np(Hneut))) allocate(dummytable%channel_w_corrected_eff(Nchannels,np(Hneut))) allocate(dummytable%channel_systSM(Nchannels,np(Hneut))) allocate(dummytable%channel_syst(Nchannels,np(Hneut))) allocate(dummytable%channel_mu(Nchannels,np(Hneut))) do i=1,Nchannels if(IDchannels(i).le.99) then dummytable%channel_p_id(i) = int((IDchannels(i)-modulo(id,10))/dble(10)) dummytable%channel_d_id(i) = modulo(IDchannels(i),10) else write(*,*) "Error in get_rates: channel-ID not supported. Use get_rates_str instead!" endif enddo call get_channelrates(ii, theo(1), dummytable) rate=0.0D0 do i=lbound(dummytable%channel_mu,dim=1),ubound(dummytable%channel_mu,dim=1) rate = rate + dummytable%channel_mu(i,ii)*dummytable%channel_w(i,ii) enddo deallocate(dummytable%channel_p_id,dummytable%channel_d_id,dummytable%channel_eff,& & dummytable%channel_w,dummytable%channel_systSM,dummytable%channel_syst, & & dummytable%channel_mu,dummytable%channel_eff_ratios,dummytable%channel_description, & & dummytable%channel_w_corrected_eff,dummytable%mass) end subroutine get_rates !************************************************************ subroutine get_rates_str(ii,collider,Nchannels,IDchannels_str,rate) ! Returns SM normalized signal rates (w/o efficiencies) for Higgs boson "ii" and collider ! experiment "collider"(=1,2,3 for TEV, LHC7, LHC8). "Nchannels" gives the total number ! and IDchannels_str the channel ID string of the subchannels, which should be included in the rates. ! IDchannels_str is an array of size(Nchannels). !------------------------------------------------------------ use usefulbits, only : theo, np,Hneut use usefulbits_HS, only : mutable integer, intent(in) :: ii, collider, Nchannels character(LEN=*), dimension(Nchannels), intent(in) :: IDchannels_str double precision, intent(out) :: rate !-Internal type(mutable) :: dummytable integer :: i,id,posperiod !-Initialize a dummy mutable in order to run get_channelrates for the channels we want. if(collider.eq.1) then dummytable%collider = 'TEV' else if(collider.eq.2) then dummytable%collider = 'LHC' dummytable%energy = 7.0D0 else if(collider.eq.3) then dummytable%collider = 'LHC' dummytable%energy = 8.0D0 else if(collider.eq.4) then dummytable%collider = 'LHC' dummytable%energy = 13.0D0 else write(*,*) 'WARNING: collider experiment for get_rates unknown.' continue endif dummytable%id = 999999 dummytable%particle_x = 1 dummytable%Nc=Nchannels allocate(dummytable%mass(1)) dummytable%mass(1) = theo(1)%particle(dummytable%particle_x)%M(ii) ! allocate(dummytable%channel_id(Nchannels)) allocate(dummytable%channel_p_id(Nchannels)) allocate(dummytable%channel_d_id(Nchannels)) allocate(dummytable%channel_eff(Nchannels)) allocate(dummytable%channel_eff_ratios(Nchannels)) !-Set all efficiencies equal: dummytable%channel_eff = 1.0D0 dummytable%channel_eff_ratios = 1.0D0 allocate(dummytable%channel_description(Nchannels,2)) allocate(dummytable%channel_w(Nchannels,np(Hneut))) allocate(dummytable%channel_w_corrected_eff(Nchannels,np(Hneut))) allocate(dummytable%channel_systSM(Nchannels,np(Hneut))) allocate(dummytable%channel_syst(Nchannels,np(Hneut))) allocate(dummytable%channel_mu(Nchannels,np(Hneut))) ! do i = 1,Nchannels ! write(*,*) i, IDchannels_str(i) ! enddo do i=1,Nchannels posperiod = index(IDchannels_str(i),'.') ! write(*,*) IDchannels_str(i) if(posperiod.eq.0) then if(len(trim(adjustl(IDchannels_str(i)))).eq.2) then read(IDchannels_str(i),*) id dummytable%channel_p_id(i) = int((id-modulo(id,10))/dble(10)) dummytable%channel_d_id(i) = modulo(id,10) else stop " Error in get_rates_str: Cannot handle channel IDs!" endif else ! write(*,*) dummytable%channel_p_id(i), dummytable%channel_d_id(i) read(IDchannels_str(i)(:posperiod-1),*) dummytable%channel_p_id(i) read(IDchannels_str(i)(posperiod+1:),*) dummytable%channel_d_id(i) endif enddo ! write(*,*) dummytable%channel_p_id, dummytable%channel_d_id call get_channelrates(ii, theo(1), dummytable) rate=0.0D0 do i=lbound(dummytable%channel_mu,dim=1),ubound(dummytable%channel_mu,dim=1) rate = rate + dummytable%channel_mu(i,ii)*dummytable%channel_w(i,ii) enddo deallocate(dummytable%channel_p_id,dummytable%channel_d_id,dummytable%channel_eff,& & dummytable%channel_w,dummytable%channel_systSM,dummytable%channel_syst, & & dummytable%channel_mu,dummytable%channel_eff_ratios,dummytable%channel_description, & & dummytable%channel_w_corrected_eff,dummytable%mass) end subroutine get_rates_str !------------------------------------------------------------ subroutine get_Pvalue(nparam, Pvalue) ! Calculates the Chi^2 probability for the total Chi^2 value ! and the number of degrees of freedom given by the ! number of observables - nparam !------------------------------------------------------------ use usefulbits, only : vsmall use usefulbits_hs, only: HSres use numerics implicit none integer, intent(in) :: nparam double precision, intent(out) :: Pvalue if(allocated(HSres)) then if(HSres(1)%Chisq.gt.vsmall.and.(HSres(1)%nobs-nparam).gt.0) then HSres(1)%Pvalue = 1 - gammp(dble(HSres(1)%nobs-nparam)/2,HSres(1)%Chisq/2) endif else write(*,*) "Warning: subroutine get_Pvalue should be called after run_HiggsSignals." endif Pvalue = HSres(1)%Pvalue end subroutine get_Pvalue !------------------------------------------------------------ subroutine get_neutral_Higgs_masses(Mh, dMh) -! Sets the theoretical mass uncertainty of the Higgs bosons. +! debugging/internal routine +! returns the mass and theoretical mass uncertainty of the Higgs bosons. !------------------------------------------------------------ use usefulbits, only: theo,np,Hneut implicit none double precision,intent(out) :: Mh(np(Hneut)), dMh(np(Hneut)) if(.not.allocated(theo))then stop 'No model information given!' endif if(np(Hneut).eq.0)then write(*,*)'Cannot access the neutral Higgs boson masses' write(*,*)'because np(Hneut) == 0.' stop 'error in subroutine get_neutral_Higgs_masses' endif Mh = theo(1)%particle(Hneut)%M dMh = theo(1)%particle(Hneut)%dM end subroutine get_neutral_Higgs_masses !------------------------------------------------------------ subroutine complete_HS_results() !------------------------------------------------------------ use usefulbits, only : just_after_run, ndat use usefulbits_HS, only : HSres, Nparam use numerics, only : gammp integer :: n if(just_after_run) then do n=1,ndat HSres(n)%Chisq_mu = HSres(n)%Chisq_peak_mu + & !HSres(n)%Chisq_mpred + & & HSres(n)%Chisq_STXS_rates + HSres(n)%Chisq_LHCRun1_mu HSres(n)%Chisq_mh = HSres(n)%Chisq_peak_mh + HSres(n)%Chisq_LHCRun1_mh + & & HSres(n)%Chisq_STXS_mh HSres(n)%Chisq_STXS = HSres(n)%Chisq_STXS_rates + HSres(n)%Chisq_STXS_mh HSres(n)%Chisq_peak = HSres(n)%Chisq_peak_mu + HSres(n)%Chisq_peak_mh HSres(n)%Chisq_LHCRun1 = HSres(n)%Chisq_LHCRun1_mu + HSres(n)%Chisq_LHCRun1_mh HSres(n)%Chisq = HSres(n)%Chisq_mu + HSres(n)%Chisq_mh HSres(n)%nobs_mu = HSres(n)%nobs_peak_mu + &!HSres(n)%nobs_mpred + & & HSres(n)%nobs_LHCRun1_mu + HSres(n)%nobs_STXS_rates HSres(n)%nobs_mh = HSres(n)%nobs_peak_mh + HSres(n)%nobs_LHCRun1_mh + & & HSres(n)%nobs_STXS_mh HSres(n)%nobs_peak = HSres(n)%nobs_peak_mu + HSres(n)%nobs_peak_mh HSres(n)%nobs_STXS = HSres(n)%nobs_STXS_rates + HSres(n)%nobs_STXS_mh HSres(n)%nobs_LHCRun1 = HSres(n)%nobs_LHCRun1_mu + HSres(n)%nobs_LHCRun1_mh HSres(n)%nobs = HSres(n)%nobs_mu + HSres(n)%nobs_mh if(HSres(n)%Chisq.gt.vsmall.and.(HSres(n)%nobs-Nparam).gt.0) then HSres(n)%Pvalue=1 - gammp(dble(HSres(n)%nobs-Nparam)/2.0D0,HSres(n)%Chisq/2.0D0) endif if(HSres(n)%Chisq_peak.gt.vsmall.and.(HSres(n)%nobs_peak-Nparam).gt.0) then HSres(n)%Pvalue_peak=1 - gammp(dble(HSres(n)%nobs_peak-Nparam)/2.0D0,HSres(n)%Chisq_peak/2.0D0) endif if(HSres(n)%Chisq_LHCRun1.gt.vsmall.and.(HSres(n)%nobs_LHCRun1-Nparam).gt.0) then HSres(n)%Pvalue_LHCRun1=1 - gammp(dble(HSres(n)%nobs_LHCRun1-Nparam)/2.0D0,HSres(n)%Chisq_LHCRun1/2.0D0) endif if(HSres(n)%Chisq_STXS.gt.vsmall.and.(HSres(n)%nobs_STXS-Nparam).gt.0) then HSres(n)%Pvalue_STXS=1 - gammp(dble(HSres(n)%nobs_STXS-Nparam)/2.0D0,HSres(n)%Chisq_STXS/2.0D0) endif enddo else write(*,*) "Warning: complete_HS_results was called but just_after_run is", just_after_run endif !------------------------------------------------------------ end subroutine complete_HS_results !------------------------------------------------------------ subroutine finish_HiggsSignals ! This subroutine needs to be called right at the end, to close files ! and deallocate arrays !------------------------------------------------------------ use usefulbits, only : deallocate_usefulbits,debug,theo,debug, &!,inputsub & file_id_debug1,file_id_debug2 use S95tables, only : deallocate_Exptranges use theory_BRfunctions, only : deallocate_BRSM use datatables, only : deallocate_observables use usefulbits_HS, only : deallocate_usefulbits_HS, analyses use mc_chisq, only : deallocate_mc_observables use store_pathname_HS !#if defined(NAGf90Fortran) ! use F90_UNIX_IO, only : flush !#endif if(debug)then close(file_id_debug2) close(file_id_debug1) endif if(debug) write(*,*)'finishing off...' ; call flush(6) if(.not.allocated(theo))then ! stop 'HiggsBounds_initialize should be called first' if(debug) write(*,*) "HiggsBounds/HiggsSignals internal structure already deallocated!" else call deallocate_BRSM call deallocate_Exptranges call deallocate_usefulbits ! if (allocated(inputsub)) deallocate(inputsub) endif ! write(*,*) "before deallocate mc observables." call deallocate_mc_observables ! write(*,*) "after deallocate mc observables." call deallocate_observables if(allocated(analyses)) deallocate(analyses) call deallocate_usefulbits_HS ! call system('rm -f '//trim(adjustl(pathname_HS))//'Expt_tables/analyses.txt') call system('rm -f HS_analyses.txt') if(debug) write(*,*)'finished' ; call flush(6) end subroutine finish_HiggsSignals !------------------------------------------------------------ subroutine finish_HiggsSignals_only !------------------------------------------------------------ use datatables, only : deallocate_observables use usefulbits_HS, only : deallocate_usefulbits_HS, analyses use mc_chisq, only : deallocate_mc_observables use store_pathname_HS call deallocate_mc_observables call deallocate_observables if(allocated(analyses)) deallocate(analyses) call deallocate_usefulbits_HS call system('rm -f HS_analyses.txt') end subroutine finish_HiggsSignals_only !------------------------------------------------------------ ! SOME HANDY WRAPPER SUBROUTINES !------------------------------------------------------------ subroutine initialize_HiggsSignals_for_Fittino(nHiggsneut,nHiggsplus) !------------------------------------------------------------ ! Wrapper subroutine to intitialize HiggsSignals with the experimental ! dataset "latestresults", avoiding to specify this via a string argument. !------------------------------------------------------------ implicit none !--------------------------------------input integer,intent(in) :: nHiggsneut integer,intent(in) :: nHiggsplus ! character(LEN=19) :: Expt_string character(LEN=33) :: Expt_string ! Expt_string = "Moriond2013_Fittino" Expt_string = "latestresults_April2013_inclusive" call initialize_HiggsSignals(nHiggsneut,nHiggsplus,Expt_string) end subroutine initialize_HiggsSignals_for_Fittino !------------------------------------------------------------ subroutine get_number_of_observables_wrapper(ntotal, npeakmu, npeakmh, nmpred, nanalyses) !------------------------------------------------------------ use io, only : get_number_of_observables implicit none integer, intent(out) :: ntotal, npeakmu, npeakmh, nmpred, nanalyses call get_number_of_observables(ntotal, npeakmu, npeakmh, nmpred, nanalyses) end subroutine get_number_of_observables_wrapper !------------------------------------------------------------ subroutine get_ID_of_peakobservable_wrapper(ii, ID) !------------------------------------------------------------ use io, only : get_ID_of_peakobservable implicit none integer, intent(in) :: ii integer, intent(out) :: ID call get_ID_of_peakobservable(ii, ID) end subroutine get_ID_of_peakobservable_wrapper !------------------------------------------------------------ subroutine get_peakinfo_from_HSresults_wrapper(obsID, mupred, domH, nHcomb) !-------------------------------------------------------------------- use io, only : get_peakinfo_from_HSresults implicit none integer, intent(in) :: obsID double precision, intent(out) :: mupred integer, intent(out) :: domH, nHcomb call get_peakinfo_from_HSresults(obsID, mupred, domH, nHcomb) end subroutine get_peakinfo_from_HSresults_wrapper !------------------------------------------------------------ subroutine print_cov_mh_to_file_wrapper(Hindex) !------------------------------------------------------------ use pc_chisq, only : print_cov_mh_to_file implicit none integer, intent(in) :: Hindex call print_cov_mh_to_file(Hindex) end subroutine print_cov_mh_to_file_wrapper !------------------------------------------------------------ subroutine print_cov_mu_to_file_wrapper !------------------------------------------------------------ use pc_chisq, only : print_cov_mu_to_file implicit none call print_cov_mu_to_file end subroutine print_cov_mu_to_file_wrapper !------------------------------------------------------------ subroutine print_corr_mu_to_file_wrapper !------------------------------------------------------------ use pc_chisq, only : print_corr_mu_to_file implicit none call print_corr_mu_to_file end subroutine print_corr_mu_to_file_wrapper !------------------------------------------------------------ Index: trunk/HiggsSignals-2/makefile.in =================================================================== --- trunk/HiggsSignals-2/makefile.in (revision 596) +++ trunk/HiggsSignals-2/makefile.in (revision 597) @@ -1,124 +1,123 @@ MODS = usefulbits_HS.mod store_pathname_HS.mod datatables.mod combinatorics.mod \ numerics.mod io.mod expt_syst.mod pc_chisq.mod mc_chisq.mod all_chisq.mod \ STXS.mod tempMODS = $(MODS:.mod=.o) OBJSbasic = $(tempMODS:.MOD=.o) OBJScommandline = $(OBJSbasic) \ HiggsSignals.o OBJSsubroutines = $(OBJSbasic) \ HiggsSignals_subroutines.o .SUFFIXES: .exe .o .mod .f90 .F .F90 .MOD #as advised in http://gcc.gnu.org/wiki/GfortranFAQ %.o : %.mod default: HiggsSignals .f90.mod: $(F90C) $(F90FLAGS) $(HBLIBS) $(HBINCLUDE) $(ADDITIONALDEFINE) -c $< -o $*.o -lHB .f90.o: $(F90C) $(F90FLAGS) $(HBLIBS) $(HBINCLUDE) $(ADDITIONALDEFINE) -c $< -o $*.o -lHB .F90.MOD: $(F90C) $(F90FLAGS) $(HBLIBS) $(HBINCLUDE) $(ADDITIONALDEFINE) -c $< -o $*.o -lHB .F90.o: $(F90C) $(F90FLAGS) $(HBLIBS) $(HBINCLUDE) $(ADDITIONALDEFINE) -c $< -o $*.o -lHB .F.o: $(F77C) -c $< -o $*.o .mod.o: $(F90C) $(F90FLAGS) $(HBLIBS) $(HBINCLUDE) -c $*.f90 -o $*.o -lHB .MOD.o: $(F90C) $(F90FLAGS) $(HBLIBS) $(HBINCLUDE) -c $*.F90 -o $*.o -lHB HiggsSignals: libHS.a $(MODS) $(OBJScommandline) $(F90C) $(F90FLAGS) $(HBINCLUDE) $(OBJScommandline) -o $(EXE) $(HSLIBS) -lHS $(HBLIBS) -lHB libHS: $(MODS) $(OBJSsubroutines) ar -rv libHS.a $(OBJSsubroutines) ranlib libHS.a libHS.a: libHS HSexamples: libHS.a $(F90C) $(F90FLAGS) $(HBLIBS) $(HBINCLUDE) example_programs/HSeffC.f90 -o example_programs/HSeffC $(HSLIBS) -lHB $(F90C) $(F90FLAGS) $(HBLIBS) $(HBINCLUDE) example_programs/HShadr.f90 -o example_programs/HShadr $(HSLIBS) -lHB $(F90C) $(F90FLAGS) $(HBLIBS) $(HBINCLUDE) example_programs/HSscaleUncertainties.f90 -o example_programs/HSscaleUncertainties $(HSLIBS) -lHB $(F90C) $(F90FLAGS) $(HBLIBS) $(HBINCLUDE) example_programs/HSwithToys.f90 -o example_programs/HSwithToys $(HSLIBS) -lHB $(F90C) $(F90FLAGS) $(HBLIBS) $(HBINCLUDE) example_programs/HS_efficiencies.f90 -o example_programs/HS_efficiencies $(HSLIBS) -lHB $(F90C) $(F90FLAGS) $(HBLIBS) $(HBINCLUDE) example_programs/HSwithSLHA.f90 -o example_programs/HSwithSLHA $(HSLIBS) -lHB $(F90C) $(F90FLAGS) $(HBLIBS) $(HBINCLUDE) example_programs/HBandHSwithSLHA.f90 -o example_programs/HBandHSwithSLHA $(HSLIBS) -lHB $(F90C) $(F90FLAGS) $(HBLIBS) $(HBINCLUDE) example_programs/HS_mass.f90 -o example_programs/HS_mass $(HSLIBS) -lHB $(F90C) $(F90FLAGS) $(HBLIBS) $(HBINCLUDE) example_programs/HS_2Higgses.f90 -o example_programs/HS_2Higgses $(HSLIBS) -lHB $(F90C) $(F90FLAGS) $(HBLIBS) $(HBINCLUDE) example_programs/HS_SM_LHCRun1.f90 -o example_programs/HS_SM_LHCRun1 $(HSLIBS) -lHB $(F90C) $(F90FLAGS) $(HBLIBS) $(HBINCLUDE) example_programs/HSwithSTXS.f90 -o example_programs/HSwithSTXS $(HSLIBS) -lHB HSeffC: libHS.a $(F90C) $(F90FLAGS) $(HBLIBS) $(HBINCLUDE) example_programs/HSeffC.f90 -o example_programs/HSeffC $(HSLIBS) -lHB HSgga: libHS.a $(F90C) $(F90FLAGS) $(HBLIBS) $(HBINCLUDE) example_programs/HSgga.f90 -o example_programs/HSgga $(HSLIBS) -lHB HS_mass: libHS.a $(F90C) $(F90FLAGS) $(HBLIBS) $(HBINCLUDE) example_programs/HS_mass.f90 -o example_programs/HS_mass $(HSLIBS) -lHB HS_SM_LHCRun1: libHS.a $(F90C) $(F90FLAGS) $(HBLIBS) $(HBINCLUDE) example_programs/HS_SM_LHCRun1.f90 -o example_programs/HS_SM_LHCRun1 $(HSLIBS) -lHB HSwithSTXS: libHS.a $(F90C) $(F90FLAGS) $(HBLIBS) $(HBINCLUDE) example_programs/HSwithSTXS.f90 -o example_programs/HSwithSTXS $(HSLIBS) -lHB $(F90C) $(F90FLAGS) $(HBLIBS) $(HBINCLUDE) example_programs/HSeffCwithSTXS.f90 -o example_programs/HSeffCwithSTXS $(HSLIBS) -lHB $(F90C) $(F90FLAGS) $(HBLIBS) $(HBINCLUDE) example_programs/HShadrwithSTXS.f90 -o example_programs/HShadrwithSTXS $(HSLIBS) -lHB HShadr: libHS.a $(F90C) $(F90FLAGS) $(HBLIBS) $(HBINCLUDE) example_programs/HShadr.f90 -o example_programs/HShadr $(HSLIBS) -lHB HSscaleUncertainties: libHS.a $(F90C) $(F90FLAGS) $(HBLIBS) $(HBINCLUDE) example_programs/HSscaleUncertainties.f90 -o example_programs/HSscaleUncertainties $(HSLIBS) -lHB HSwithToys: libHS.a $(F90C) $(F90FLAGS) $(HBLIBS) $(HBINCLUDE) example_programs/HSwithToys.f90 -o example_programs/HSwithToys $(HSLIBS) -lHB HS_efficiencies: libHS.a $(F90C) $(F90FLAGS) $(HBLIBS) $(HBINCLUDE) example_programs/HS_efficiencies.f90 -o example_programs/HS_efficiencies $(HSLIBS) -lHB HSwithSLHA: libHS.a $(F90C) $(F90FLAGS) $(HBLIBS) $(HBINCLUDE) example_programs/HSwithSLHA.f90 -o example_programs/HSwithSLHA $(HSLIBS) -lHB HBandHSwithSLHA: libHS.a $(F90C) $(F90FLAGS) $(HBLIBS) $(HBINCLUDE) example_programs/HBandHSwithSLHA.f90 -o example_programs/HBandHSwithSLHA $(HSLIBS) -lHB HBandHSwithFH: libHS.a $(F77C) $(FHINCLUDE) $(HBLIBS) $(HBINCLUDE) example_programs/HBandHSwithFH.F -o example_programs/HBandHSwithFH $(FHLIBS) $(HSLIBS) -lHB HS_2Higgses: libHS.a $(F90C) $(F90FLAGS) $(HBLIBS) $(HBINCLUDE) example_programs/HS_2Higgses.f90 -o example_programs/HS_2Higgses $(HSLIBS) -lHB clean: rm -f *.o *.mod *.MOD *.a - rm -f store_pathname_HS.f90 hyperclean: rm -f *.o *.mod *.MOD *.a *~ rm -f example_programs/*~ rm -f example_data/*-fromHB rm -f example_data/*-fromHS rm -f example_data/*-fromHBandHS rm -f store_pathname_HS.f90 rm -f example_programs/*.txt rm -f example_programs/tmp/* rm -f Expt_tables/mutables.binary rm -f Expt_tables/analyses.txt rm -f temp*.txt rm -f HiggsSignals Index: trunk/HiggsSignals-2/create_package.bat =================================================================== --- trunk/HiggsSignals-2/create_package.bat (revision 596) +++ trunk/HiggsSignals-2/create_package.bat (revision 597) @@ -1,237 +1,235 @@ #!/bin/bash vers=$1 echo '*************************************' echo 'Creating package HiggsSignals-'$vers startdir="$PWD" namedir=`basename $PWD` echo '*************************************' echo ' ' echo './configure, then run example :' echo ' ' ./configure >temp.txt make HSwithSLHA > temp.txt cd example_programs ./HSwithSLHA 1 ../example_data/SLHA/SLHA_FHexample.fh 2> temp_error.txt 1> temp_output.txt echo 'Is there anything between here...' grep 'hello' temp_output.txt grep 'WARNING' temp_output.txt grep 'Interrupt' temp_error.txt grep 'Error' temp_error.txt grep 'stop' temp_error.txt rm temp_output.txt rm temp_error.txt echo '... and here?' cd .. echo '*************************************' echo ' ' echo 'make hyperclean :' echo ' ' make hyperclean > temp.txt echo 'remove the makefile:' echo ' ' rm makefile echo ' ' echo '*************************************' echo ' ' echo 'CHECK THE HIGGSSIGNALS SETTINGS' echo ' ' grep 'logical :: withcorrexpsyst' usefulbits_HS.f90 grep 'logical :: additional_output' usefulbits_HS.f90 grep 'logical :: usetoys' usefulbits_HS.f90 grep 'logical :: usescalefactor' usefulbits_HS.f90 grep 'logical :: useSMweights' usefulbits_HS.f90 grep 'logical :: correlations_mu' usefulbits_HS.f90 grep 'logical :: correlations_mh' usefulbits_HS.f90 grep 'logical :: minimalchisq' usefulbits_HS.f90 grep 'logical :: maximalchisq' usefulbits_HS.f90 grep 'logical :: useSMtest' usefulbits_HS.f90 grep 'logical :: SLHAdetailed' usefulbits_HS.f90 grep 'logical :: newSLHAfile' usefulbits_HS.f90 grep 'logical :: symmetricerrors' usefulbits_HS.f90 grep 'logical :: anticorrmu' usefulbits_HS.f90 grep 'logical :: anticorrmh' usefulbits_HS.f90 grep 'logical :: absolute_errors' usefulbits_HS.f90 grep 'logical :: THU_included' usefulbits_HS.f90 grep 'logical :: normalize_rates_to_reference_position' usefulbits_HS.f90 grep 'double precision :: eps' usefulbits_HS.f90 grep 'double precision :: assignmentrange' usefulbits_HS.f90 grep 'integer :: output_level' usefulbits_HS.f90 grep 'integer :: iterations' usefulbits_HS.f90 grep 'integer :: pdf' usefulbits_HS.f90 grep 'integer :: Nparam' usefulbits_HS.f90 echo ' ' echo '*************************************' copyfiles=`ls COPYING\ README\ *.f90\ *.F90\ *.F\ *.f\ *.bat\ *.in\ example_data/SLHA/SLHA_heavyH.fh.*\ example_data/SLHA/SLHA_FHexample.fh.*\ - example_data/random/*.dat\ - example_data/mhmax/*.dat\ + example_data/mhmodplus/*.dat\ example_programs/*.f90\ example_programs/*.F\ example_programs/results/*.py\ supplements/*\ Expt_tables/LHC13/*.txt\ Expt_tables/LHC13/*.stxs\ Expt_tables/LHC13/*.stxscorr\ Expt_tables/LHC_combination_Run1/*.exp\ Expt_tables/LHC_combination_Run1/*.corr\ Expt_tables/LHC7+8/*.txt\ Expt_tables/LHC13_CMS_H-ZZ_36.1fb01_Higgs-pT/*.stxs\ Expt_tables/LHC13_CMS_H-ZZ_36.1fb01_Higgs-pT/*.stxscorr\ Expt_tables/README` # Expt_tables/latestresults-1.4.0/*.txt\ # Expt_tables/latestresults-1.4.0-LHCinclusive/*.txt\ # Expt_tables/latestresults/*.txt\ # Expt_tables/LHC13_ATL_H-WW/*.txt\ # Expt_tables/LHC13_ATL_H-ZZ/*.txt\ # Expt_tables/LHC13_ATL_H-gaga/*.txt\ # Expt_tables/LHC13_ATL_H-bb/*.txt\ # Expt_tables/LHC13_ATL_ttH/*.txt\ # Expt_tables/LHC13_CMS_H-ZZ/*.txt\ # Expt_tables/LHC13_CMS_H-WW/*.txt\ # Expt_tables/LHC13_CMS_H-tautau/*.txt\ # Expt_tables/LHC13_CMS_ttH-multilepton/*.txt\ # Expt_tables/LHC13_CMS_H-gaga/*.txt\ # Expt_tables/latestresults/*.txt\ # Expt_tables/latestresults-1.0.0/*.txt\ # Expt_tables/latestresults-1.0.0_inclusive/*.txt\ # Expt_tables/latestresults-1.1.0/*.txt\ # Expt_tables/latestresults-1.2.0/*.txt\ # Expt_tables/latestresults-1.3.0/*.txt\ # Expt_tables/latestresults-1.4.0/*.txt\ # Expt_tables/latestresults-1.2.0-CMSgaga125p7/*.txt\ # Expt_tables/latestresults-1.2.0-LHCinclusive/*.txt\ # Expt_tables/latestresults-1.3.0-LHCinclusive/*.txt\ # Expt_tables/latestresults-1.4.0-LHCinclusive/*.txt\ # Expt_tables/legacy/latestresults-1.0.0-old/*.txt\ # Expt_tables/CMS-13-005-gaga-125p7/*.txt\ # Expt_tables/LHC13_2016/*\ # Expt_tables/CMS-13-005-125p7/*.txt\ # Expt_tables/LHC300/*.txt\ # Expt_tables/LHC3000/*.txt\ # Expt_tables/ILC250/*.txt\ # Expt_tables/ILC500/*.txt\ # Expt_tables/ILC1000/*.txt\ # echo $copyfiles tempdir="HiggsSignals-$vers" #echo 'tempdir=' $tempdir cd .. mkdir "$tempdir" listdir="example_data\ example_data/SLHA\ - example_data/random\ - example_data/mhmax\ + example_data/mhmodplus\ example_programs\ example_programs/results\ example_programs/results/tmp\ supplements\ Expt_tables\ Expt_tables/LHC13\ Expt_tables/LHC_combination_Run1\ Expt_tables/LHC7+8\ Expt_tables/LHC13_CMS_H-ZZ_36.1fb01_Higgs-pT" # Expt_tables/LHC13_ATL_H-WW\ # Expt_tables/LHC13_ATL_H-ZZ\ # Expt_tables/LHC13_ATL_H-gaga\ # Expt_tables/LHC13_ATL_H-bb\ # Expt_tables/LHC13_ATL_ttH\ # Expt_tables/LHC13_CMS_H-ZZ\ # Expt_tables/LHC13_CMS_H-WW\ # Expt_tables/LHC13_CMS_H-tautau\ # Expt_tables/LHC13_CMS_ttH-multilepton\ # Expt_tables/LHC13_CMS_H-gaga\ # Expt_tables/latestresults # Expt_tables/latestresults-1.4.0\ # Expt_tables/latestresults-1.4.0-LHCinclusive\ # Expt_tables/latestresults-1.2.0-CMSgaga125p7\ # Expt_tables/latestresults-1.2.0-LHCinclusive\ # Expt_tables/latestresults-1.3.0-LHCinclusive\ # Expt_tables/CMS-13-005-gaga-125p7\ # Expt_tables/legacy\ # Expt_tables/legacy/latestresults-1.0.0-old\ # Expt_tables/latestresults-1.0.0_inclusive\ # Expt_tables/latestresults-1.0.0\ # Expt_tables/latestresults-1.1.0\ # Expt_tables/latestresults-1.2.0\ # Expt_tables/latestresults-1.3.0\ # Expt_tables/LHC13_2016\ # Expt_tables/CMS-13-005-125p7\ # Expt_tables/LHC300\ # Expt_tables/LHC3000\ # Expt_tables/ILC250\ # Expt_tables/ILC500\ # Expt_tables/ILC1000\ for direcname in $listdir ; do mkdir "$tempdir"/"$direcname" done cp "$namedir"/pubconfigure "$tempdir"/configure for filename in $copyfiles ; do cp "$namedir"/"$filename" "$tempdir"/"$filename" done echo 'removing some of the files not needed in the package' removefiles="create_package.bat\ example_data/random/*_peakobservables.dat\ example_data/random/*_HiggsSignals_results.dat\ example_data/mhmax/*_peakobservables.dat\ example_data/mhmax/*_HiggsSignals_results.dat\ supplements/smearErrorsXS_cpp.so\ supplements/smearErrorsXS_cpp.d\ supplements/smearErrorsBR_cpp.so\ supplements/smearErrorsBR_cpp.d" for filename in $removefiles ; do rm "$tempdir"/"$filename" done echo 'create ../'$tempdir'.tar.gz :' rm "$tempdir".tar.gz tar czf "$tempdir".tar.gz "$tempdir" rm -r "$tempdir" cd $namedir echo '*************************************' echo ' ' echo 'Is this the correct version number? ' grep 'HSvers=' usefulbits_HS.f90 echo ' ' echo '*************************************' echo ' ' echo 'finished' echo ' ' echo '*************************************' Index: trunk/HiggsSignals-2/example_data/SLHA/MSSMexample.fh.1 =================================================================== --- trunk/HiggsSignals-2/example_data/SLHA/MSSMexample.fh.1 (revision 596) +++ trunk/HiggsSignals-2/example_data/SLHA/MSSMexample.fh.1 (revision 597) @@ -1,481 +1,481 @@ BLOCK SPINFO 1 FeynHiggs 2 2.14.3 2 built on Aug 01, 2018 BLOCK MODSEL 1 0 # Model 2 1 # GridPts 3 0 # Content 4 0 # RPV 5 0 # CPV 6 0 # FV BLOCK SMINPUTS 1 1.28952896E+02 # invAlfaMZ 2 1.16637002E-05 # GF 3 1.18000000E-01 # AlfasMZ 4 9.11876000E+01 # MZ 5 4.17999983E+00 # Mb 6 1.72500000E+02 # Mt 7 1.77703000E+00 # Mtau 11 5.10998902E-04 # Me 13 1.05658357E-01 # Mmu 21 6.00000000E-03 # Md 22 3.00000000E-03 # Mu 23 9.50000000E-02 # Ms 24 1.28600000E+00 # Mc BLOCK MINPAR 3 2.00000000E+01 # TB BLOCK EXTPAR 0 0.00000000E+00 # Q 1 1.80000000E+02 # M1 2 3.00000000E+02 # M2 3 2.50000000E+03 # M3 11 2.85000000E+03 # At 12 2.85000000E+03 # Ab 13 8.00000000E+02 # Atau 23 1.00000000E+03 # MUE 25 2.00000000E+01 # TB 26 1.00000000E+03 # MA0 27 1.00322567E+03 # MHp 31 2.00000000E+03 # MSL(1) 32 2.00000000E+03 # MSL(2) 33 3.50000000E+02 # MSL(3) 34 2.00000000E+03 # MSE(1) 35 2.00000000E+03 # MSE(2) 36 3.50000000E+02 # MSE(3) 41 2.00000000E+03 # MSQ(1) 42 2.00000000E+03 # MSQ(2) 43 1.50000000E+03 # MSQ(3) 44 2.00000000E+03 # MSU(1) 45 2.00000000E+03 # MSU(2) 46 1.50000000E+03 # MSU(3) 47 2.00000000E+03 # MSD(1) 48 2.00000000E+03 # MSD(2) 49 1.50000000E+03 # MSD(3) BLOCK MASS 1000012 1.99896552E+03 # MSf(1,1,1) 1000011 2.00057313E+03 # MSf(1,2,1) 2000011 2.00046095E+03 # MSf(2,2,1) 1000002 1.99927301E+03 # MSf(1,3,1) 2000002 1.99969262E+03 # MSf(2,3,1) 1000001 2.00088111E+03 # MSf(1,4,1) 2000001 2.00015290E+03 # MSf(2,4,1) 1000014 1.99896552E+03 # MSf(1,1,2) 1000013 2.00097334E+03 # MSf(1,2,2) 2000013 2.00006064E+03 # MSf(2,2,2) 1000004 1.99855848E+03 # MSf(1,3,2) 2000004 2.00040758E+03 # MSf(2,3,2) 1000003 2.00103927E+03 # MSf(1,4,2) 2000003 1.99999468E+03 # MSf(2,4,2) 1000016 3.44039455E+02 # MSf(1,1,3) 1000015 3.00752176E+02 # MSf(1,2,3) 2000015 3.98360763E+02 # MSf(2,2,3) 1000006 1.33965932E+03 # MSf(1,3,3) 2000006 1.66153199E+03 # MSf(2,3,3) 1000005 1.48076973E+03 # MSf(1,4,3) 2000005 1.52035582E+03 # MSf(2,4,3) 25 1.25446331E+02 # Mh0 35 9.99859026E+02 # MHH 36 1.00000000E+03 # MA0 37 1.00352099E+03 # MHp 1000022 1.79456889E+02 # MNeu(1) 1000023 2.97205684E+02 # MNeu(2) 1000025 -1.00294285E+03 # MNeu(3) 1000035 1.00628028E+03 # MNeu(4) 1000024 2.97193887E+02 # MCha(1) 1000037 1.00727320E+03 # MCha(2) 1000021 2.50000000E+03 # MGl BLOCK DMASS 0 1.72500000E+02 # Q 25 1.98374186E+00 # Delta Mh0 35 3.20482021E-02 # Delta MHH 36 0.00000000E+00 # Delta MA0 37 5.13172661E-02 # Delta MHp BLOCK NMIX 1 1 9.98876349E-01 # ZNeu(1,1) 1 2 -8.40320482E-03 # ZNeu(1,2) 1 3 4.54802158E-02 # ZNeu(1,3) 1 4 -1.03429432E-02 # ZNeu(1,4) 2 1 1.27116592E-02 # ZNeu(2,1) 2 2 9.95548058E-01 # ZNeu(2,2) 2 3 -8.83657886E-02 # ZNeu(2,3) 2 4 3.02318502E-02 # ZNeu(2,4) 3 1 2.44324084E-02 # ZNeu(3,1) 3 2 -4.14182340E-02 # ZNeu(3,2) 3 3 -7.05140858E-01 # ZNeu(3,3) 3 4 -7.07434773E-01 # ZNeu(3,4) 4 1 -3.85682707E-02 # ZNeu(4,1) 4 2 8.42495085E-02 # ZNeu(4,2) 4 3 7.02067951E-01 # ZNeu(4,3) 4 4 -7.06056019E-01 # ZNeu(4,4) BLOCK UMIX 1 1 9.92105591E-01 # UCha(1,1) 1 2 -1.25405328E-01 # UCha(1,2) 2 1 1.25405328E-01 # UCha(2,1) 2 2 9.92105591E-01 # UCha(2,2) BLOCK VMIX 1 1 9.99077591E-01 # VCha(1,1) 1 2 -4.29414463E-02 # VCha(1,2) 2 1 4.29414463E-02 # VCha(2,1) 2 2 9.99077591E-01 # VCha(2,2) BLOCK STAUMIX 1 1 7.04779339E-01 # USf(1,1) 1 2 7.09426587E-01 # USf(1,2) 2 1 7.09426587E-01 # USf(2,1) 2 2 -7.04779339E-01 # USf(2,2) BLOCK STOPMIX 1 1 7.07720635E-01 # USf(1,1) 1 2 -7.06492394E-01 # USf(1,2) 2 1 7.06492394E-01 # USf(2,1) 2 2 7.07720635E-01 # USf(2,2) BLOCK SBOTMIX 1 1 6.98400871E-01 # USf(1,1) 1 2 7.15706800E-01 # USf(1,2) 2 1 7.15706800E-01 # USf(2,1) 2 2 -6.98400871E-01 # USf(2,2) BLOCK ALPHA -5.11239780E-02 # Alpha BLOCK DALPHA 7.94658769E-05 # Delta Alpha BLOCK HMIX Q= -0.99900000E+03 1 1.00000000E+03 # MUE 2 2.00000000E+01 # TB BLOCK MSOFT Q= 0.00000000E+00 1 1.80000000E+02 # M1 2 3.00000000E+02 # M2 3 2.50000000E+03 # M3 31 2.00000000E+03 # MSL(1) 32 2.00000000E+03 # MSL(2) 33 3.50000000E+02 # MSL(3) 34 2.00000000E+03 # MSE(1) 35 2.00000000E+03 # MSE(2) 36 3.50000000E+02 # MSE(3) 41 2.00000000E+03 # MSQ(1) 42 2.00000000E+03 # MSQ(2) 43 1.50000000E+03 # MSQ(3) 44 2.00000000E+03 # MSU(1) 45 2.00000000E+03 # MSU(2) 46 1.50000000E+03 # MSU(3) 47 2.00000000E+03 # MSD(1) 48 2.00000000E+03 # MSD(2) 49 1.50000000E+03 # MSD(3) BLOCK AE Q= 0.00000000E+00 1 1 2.85000000E+03 # Af(1,1) 2 2 2.85000000E+03 # Af(2,2) 3 3 8.00000000E+02 # Af(3,3) BLOCK AU Q= 0.00000000E+00 1 1 2.85000000E+03 # Af(1,1) 2 2 2.85000000E+03 # Af(2,2) 3 3 2.85000000E+03 # Af(3,3) BLOCK AD Q= 0.00000000E+00 1 1 2.85000000E+03 # Af(1,1) 2 2 2.85000000E+03 # Af(2,2) 3 3 2.85000000E+03 # Af(3,3) BLOCK YE Q= 0.00000000E+00 1 1 5.87736719E-05 # Yf(1,1) 2 2 1.21525302E-02 # Yf(2,2) 3 3 2.04389046E-01 # Yf(3,3) BLOCK YU Q= 0.00000000E+00 1 1 1.72525826E-05 # Yf(1,1) 2 2 7.39560709E-03 # Yf(2,2) 3 3 9.92023502E-01 # Yf(3,3) BLOCK YD Q= 0.00000000E+00 1 1 6.35951590E-04 # Yf(1,1) 2 2 1.00679551E-02 # Yf(2,2) 3 3 3.98258811E-01 # Yf(3,3) BLOCK VCKMIN 1 2.25300000E-01 # lambda 2 8.08000000E-01 # A 3 1.32000000E-01 # rhobar 4 3.41000000E-01 # etabar BLOCK MSL2 Q= 0.00000000E+00 1 1 4.00000000E+06 # MSL2(1,1) 2 2 4.00000000E+06 # MSL2(2,2) 3 3 1.22500000E+05 # MSL2(3,3) BLOCK MSE2 Q= 0.00000000E+00 1 1 4.00000000E+06 # MSE2(1,1) 2 2 4.00000000E+06 # MSE2(2,2) 3 3 1.22500000E+05 # MSE2(3,3) BLOCK MSQ2 Q= 0.00000000E+00 1 1 4.00000000E+06 # MSQ2(1,1) 2 2 4.00000000E+06 # MSQ2(2,2) 3 3 2.25000000E+06 # MSQ2(3,3) BLOCK MSU2 Q= 0.00000000E+00 1 1 4.00000000E+06 # MSU2(1,1) 2 2 4.00000000E+06 # MSU2(2,2) 3 3 2.25000000E+06 # MSU2(3,3) BLOCK MSD2 Q= 0.00000000E+00 1 1 4.00000000E+06 # MSD2(1,1) 2 2 4.00000000E+06 # MSD2(2,2) 3 3 2.25000000E+06 # MSD2(3,3) BLOCK TE Q= 0.00000000E+00 1 1 1.67504965E-01 # Tf(1,1) 2 2 3.46347112E+01 # Tf(2,2) 3 3 1.63511237E+02 # Tf(3,3) BLOCK TU Q= 0.00000000E+00 1 1 4.91698605E-02 # Tf(1,1) 2 2 2.10774802E+01 # Tf(2,2) 3 3 2.82726698E+03 # Tf(3,3) BLOCK TD Q= 0.00000000E+00 1 1 1.81246203E+00 # Tf(1,1) 2 2 2.86936721E+01 # Tf(2,2) 3 3 1.13503761E+03 # Tf(3,3) BLOCK SELMIX 1 1 9.99809281E-01 # UASf(1,1) 1 4 -1.95295227E-02 # UASf(1,4) 2 2 7.49270774E-01 # UASf(2,2) 2 5 -6.62263775E-01 # UASf(2,5) 3 3 7.04779339E-01 # UASf(3,3) 3 6 7.09426587E-01 # UASf(3,6) 4 1 1.95295227E-02 # UASf(4,1) 4 4 9.99809281E-01 # UASf(4,4) 5 2 6.62263775E-01 # UASf(5,2) 5 5 7.49270774E-01 # UASf(5,5) 6 3 7.09426587E-01 # UASf(6,3) 6 6 -7.04779339E-01 # UASf(6,6) BLOCK USQMIX 1 1 9.99987470E-01 # UASf(1,1) 1 4 -5.00595551E-03 # UASf(1,4) 2 2 7.83236011E-01 # UASf(2,2) 2 5 -6.21724498E-01 # UASf(2,5) 3 3 7.07720635E-01 # UASf(3,3) 3 6 -7.06492394E-01 # UASf(3,6) 4 1 5.00595551E-03 # UASf(4,1) 4 4 9.99987470E-01 # UASf(4,4) 5 2 6.21724498E-01 # UASf(5,2) 5 5 7.83236011E-01 # UASf(5,5) 6 3 7.06492394E-01 # UASf(6,3) 6 6 7.07720635E-01 # UASf(6,6) BLOCK DSQMIX 1 1 9.99469672E-01 # UASf(1,1) 1 4 -3.25633860E-02 # UASf(1,4) 2 2 9.20773138E-01 # UASf(2,2) 2 5 -3.90098486E-01 # UASf(2,5) 3 3 6.98400871E-01 # UASf(3,3) 3 6 7.15706800E-01 # UASf(3,6) 4 1 3.25633860E-02 # UASf(4,1) 4 4 9.99469672E-01 # UASf(4,4) 5 2 3.90098486E-01 # UASf(5,2) 5 5 9.20773138E-01 # UASf(5,5) 6 3 7.15706800E-01 # UASf(6,3) 6 6 -6.98400871E-01 # UASf(6,6) BLOCK CVHMIX 1 1 9.99999944E-01 # UH(1,1) 1 2 3.33494451E-04 # UH(1,2) 1 3 0.00000000E+00 # UH(1,3) 2 1 -3.33494451E-04 # UH(2,1) 2 2 9.99999944E-01 # UH(2,2) 2 3 0.00000000E+00 # UH(2,3) 3 1 0.00000000E+00 # UH(3,1) 3 2 0.00000000E+00 # UH(3,2) 3 3 1.00000000E+00 # UH(3,3) BLOCK PRECOBS 1 3.70801438E-02 # DeltaR 2 5.73493744E-05 # DeltaRho 3 8.03580769E+01 # MWMSSM 4 8.03532994E+01 # MWSM 5 2.31519688E-01 # SW2effMSSM 6 2.31537613E-01 # SW2effSM 11 1.55628199E-10 # gminus2mu 21 0.00000000E+00 # EDMeTh 22 0.00000000E+00 # EDMn 23 0.00000000E+00 # EDMHg 31 4.42059407E-04 # bsgammaMSSM 32 3.92583816E-04 # bsgammaSM 33 2.09482130E+01 # DeltaMsMSSM 34 2.08767455E+01 # DeltaMsSM 35 6.06876785E-08 # BsmumuMSSM 36 3.35592960E-09 # BsmumuSM DECAY 25 4.03250828E-03 # Gamma(h0) 2.31128319E-03 2 22 22 # BR(h0 -> photon photon) 1.50311516E-03 2 22 23 # BR(h0 -> photon Z) 2.81285945E-02 2 23 23 # BR(h0 -> Z Z) 2.30327715E-01 2 -24 24 # BR(h0 -> W W) 6.91739636E-02 2 21 21 # BR(h0 -> gluon gluon) 5.16700736E-09 2 -11 11 # BR(h0 -> Electron electron) 2.29837940E-04 2 -13 13 # BR(h0 -> Muon muon) 6.63595508E-02 2 -15 15 # BR(h0 -> Tau tau) 2.04401275E-07 2 -2 2 # BR(h0 -> Up up) 2.86468550E-02 2 -4 4 # BR(h0 -> Charm charm) 8.63906818E-07 2 -1 1 # BR(h0 -> Down down) 2.16956394E-04 2 -3 3 # BR(h0 -> Strange strange) 5.73101055E-01 2 -5 5 # BR(h0 -> Bottom bottom) DECAY 35 4.84215254E+00 # Gamma(HH) 7.01532225E-07 2 22 22 # BR(HH -> photon photon) 1.48943143E-06 2 22 23 # BR(HH -> photon Z) 5.88610434E-05 2 23 23 # BR(HH -> Z Z) 7.90218210E-05 2 -24 24 # BR(HH -> W W) 2.90176556E-05 2 21 21 # BR(HH -> gluon gluon) 1.26713589E-08 2 -11 11 # BR(HH -> Electron electron) 5.63997808E-04 2 -13 13 # BR(HH -> Muon muon) 1.69514757E-01 2 -15 15 # BR(HH -> Tau tau) 1.60333008E-12 2 -2 2 # BR(HH -> Up up) 2.24577074E-07 2 -4 4 # BR(HH -> Charm charm) 1.20781980E-02 2 -6 6 # BR(HH -> Top top) 1.28529222E-06 2 -1 1 # BR(HH -> Down down) 3.22736531E-04 2 -3 3 # BR(HH -> Strange strange) 7.07323382E-01 2 -5 5 # BR(HH -> Bottom bottom) 1.32833438E-02 2 -1000024 1000024 # BR(HH -> Chargino1 chargino1) 8.17648278E-04 2 1000022 1000022 # BR(HH -> neutralino1 neutralino1) 4.77219537E-03 2 1000022 1000023 # BR(HH -> neutralino1 neutralino2) 6.45783335E-03 2 1000023 1000023 # BR(HH -> neutralino2 neutralino2) 9.13887154E-04 2 25 25 # BR(HH -> h0 h0) 4.68826918E-02 2 -1000015 1000015 # BR(HH -> Stau1 stau1) 1.09393449E-06 2 -1000015 2000015 # BR(HH -> Stau1 stau2) 1.09393449E-06 2 -2000015 1000015 # BR(HH -> Stau2 stau1) 3.68631158E-02 2 -2000015 2000015 # BR(HH -> Stau2 stau2) DECAY 36 4.86015881E+00 # Gamma(A0) 9.57405804E-07 2 22 22 # BR(A0 -> photon photon) 2.82671580E-06 2 22 23 # BR(A0 -> photon Z) 1.28712044E-04 2 21 21 # BR(A0 -> gluon gluon) 1.24418936E-08 2 -11 11 # BR(A0 -> Electron electron) 5.53785038E-04 2 -13 13 # BR(A0 -> Muon muon) 1.66442344E-01 2 -15 15 # BR(A0 -> Tau tau) 1.53459338E-12 2 -2 2 # BR(A0 -> Up up) 2.14918378E-07 2 -4 4 # BR(A0 -> Charm charm) 1.32833979E-02 2 -6 6 # BR(A0 -> Top top) 1.26199784E-06 2 -1 1 # BR(A0 -> Down down) 3.16887390E-04 2 -3 3 # BR(A0 -> Strange strange) 6.94548917E-01 2 -5 5 # BR(A0 -> Bottom bottom) 2.19326967E-02 2 -1000024 1000024 # BR(A0 -> Chargino1 chargino1) 9.79429746E-04 2 1000022 1000022 # BR(A0 -> neutralino1 neutralino1) 6.43193791E-03 2 1000022 1000023 # BR(A0 -> neutralino1 neutralino2) 1.06677808E-02 2 1000023 1000023 # BR(A0 -> neutralino2 neutralino2) 8.51998309E-05 2 23 25 # BR(A0 -> Z h0) 6.37923825E-37 2 25 25 # BR(A0 -> h0 h0) 4.23118188E-02 2 -1000015 2000015 # BR(A0 -> Stau1 stau2) 4.23118188E-02 2 -2000015 1000015 # BR(A0 -> Stau2 stau1) DECAY 37 4.64425412E+00 # Gamma(Hp) 1.42932534E-08 2 -11 12 # BR(Hp -> Electron nu_e) 6.11081106E-04 2 -13 14 # BR(Hp -> Muon nu_mu) 1.72853411E-01 2 -15 16 # BR(Hp -> Tau nu_tau) 1.29523838E-06 2 -1 2 # BR(Hp -> Down up) 1.49763113E-05 2 -3 2 # BR(Hp -> Strange up) 7.73575675E-06 2 -5 2 # BR(Hp -> Bottom up) 7.48090776E-08 2 -1 4 # BR(Hp -> Down charm) 3.24402846E-04 2 -3 4 # BR(Hp -> Strange charm) 1.08328003E-03 2 -5 4 # BR(Hp -> Bottom charm) 1.48273253E-06 2 -1 6 # BR(Hp -> Down top) 3.27765366E-05 2 -3 6 # BR(Hp -> Strange top) 7.24519543E-01 2 -5 6 # BR(Hp -> Bottom top) 1.14825567E-02 2 1000022 1000024 # BR(Hp -> neutralino1 chargino1) 1.73930211E-06 2 1000023 1000024 # BR(Hp -> neutralino2 chargino1) 9.06810606E-05 2 24 25 # BR(Hp -> W h0) 1.92294506E-10 2 24 35 # BR(Hp -> W HH) 1.58042563E-10 2 24 36 # BR(Hp -> W A0) 4.59711000E-02 2 -1000015 1000016 # BR(Hp -> Stau1 snu_tau1) 4.30038481E-02 2 -2000015 1000016 # BR(Hp -> Stau2 snu_tau1) DECAY 6 1.35305515E+00 # Gamma(top) 1.00000000E+00 2 5 24 # BR(top -> bottom W) # Block HiggsCouplingsBosons # For exact definitions of NormEffCoup see HiggsBounds manual 0.999999 3 25 24 24 # higgs-W-W effective coupling, normalised to SM 0.116558E-02 3 35 24 24 # higgs-W-W effective coupling, normalised to SM 0.00000 3 36 24 24 # higgs-W-W effective coupling, normalised to SM 0.999999 3 25 23 23 # higgs-Z-Z effective coupling, normalised to SM 0.116558E-02 3 35 23 23 # higgs-Z-Z effective coupling, normalised to SM 0.00000 3 36 23 23 # higgs-Z-Z effective coupling, normalised to SM 0.952977 3 25 21 21 # higgs-gluon-gluon effective coupling, normalised to SM 0.501981E-01 3 35 21 21 # higgs-gluon-gluon effective coupling, normalised to SM 0.113261 3 36 21 21 # higgs-gluon-gluon effective coupling, normalised to SM 0.00000 3 25 25 23 # higgs-higgs-Z effective coupling, normalised 0.00000 3 35 25 23 # higgs-higgs-Z effective coupling, normalised 0.00000 3 35 35 23 # higgs-higgs-Z effective coupling, normalised 0.145434E-03 3 36 25 23 # higgs-higgs-Z effective coupling, normalised 0.124773 3 36 35 23 # higgs-higgs-Z effective coupling, normalised 0.00000 3 36 36 23 # higgs-higgs-Z effective coupling, normalised # Block HiggsCouplingsFermions # For exact definitions of NormEffCoup see HiggsBounds manual # ScalarNormEffCoup PseudoSNormEffCoup NP IP1 IP2 IP3 # Scalar, Pseudoscalar Normalised Effective Coupling 1.0193000674322237 1.7565995677947101E-029 3 25 5 5 # higgs-b-b eff. coupling, normalised to SM 16.557714685947133 1.5070568169751837E-026 3 35 5 5 # higgs-b-b eff. coupling, normalised to SM 1.5070578407059939E-026 16.558891516303152 3 36 5 5 # higgs-b-b eff. coupling, normalised to SM 0.99994104160649944 0.0000000000000000 3 25 6 6 # higgs-top-top eff. coupling, normalised to SM 5.1165548085686831E-002 0.0000000000000000 3 35 6 6 # higgs-top-top eff. coupling, normalised to SM 0.0000000000000000 5.0000000000000003E-002 3 36 6 6 # higgs-top-top eff. coupling, normalised to SM 1.0233109617137364 0.0000000000000000 3 25 15 15 # higgs-tau-tau eff. coupling, normalised to SM 19.998820832129994 0.0000000000000000 3 35 15 15 # higgs-tau-tau eff. coupling, normalised to SM 0.0000000000000000 20.000000000000000 3 36 15 15 # higgs-tau-tau eff. coupling, normalised to SM # Block ChargedHiggsLHC8 5 6 37 0.239848E-03 # t-b-Hp production (in pb) 4 5 37 0.00000 # c-b-Hp production (in pb) 2 5 37 0.00000 # u-b-Hp production (in pb) 3 4 37 0.00000 # c-s-Hp production (in pb) 1 4 37 0.00000 # c-d-Hp production (in pb) 1 2 37 0.00000 # u-d-Hp production (in pb) 2 3 37 0.00000 # u-s-Hp production (in pb) 0 24 37 0.00000 # W-Hp production (in pb) 0 23 37 0.00000 # Z-Hp production (in pb) 1 1 37 0.00000 # Hp VBF production (in pb) 0 -37 37 0.00000 # Hp-Hm production (in pb) 0 25 37 0.00000 # h0-Hp production (in pb) 0 35 37 0.00000 # h0-Hp production (in pb) 0 36 37 0.00000 # h0-Hp production (in pb) # Block ChargedHiggsLHC13 5 6 37 0.147262E-02 # t-b-Hp production (in pb) 4 5 37 0.00000 # c-b-Hp production (in pb) 2 5 37 0.00000 # u-b-Hp production (in pb) 3 4 37 0.00000 # c-s-Hp production (in pb) 1 4 37 0.00000 # c-d-Hp production (in pb) 1 2 37 0.00000 # u-d-Hp production (in pb) 2 3 37 0.00000 # u-s-Hp production (in pb) 0 24 37 0.00000 # W-Hp production (in pb) 0 23 37 0.00000 # Z-Hp production (in pb) 1 1 37 0.00000 # Hp VBF production (in pb) 0 -37 37 0.00000 # Hp-Hm production (in pb) 0 25 37 0.00000 # h0-Hp production (in pb) 0 35 37 0.00000 # h0-Hp production (in pb) 0 36 37 0.00000 # h0-Hp production (in pb) Block HiggsBoundsResults # results from HiggsBounds http://projects.hepforge.org/higgsbounds # HBresult : scenario allowed flag (1: allowed, 0: excluded, -1: unphysical) # chan id number: most sensitive channel (see below). chan=0 if no channel applies # obsratio : ratio [sig x BR]_model/[sig x BR]_limit (<1: allowed, >1: excluded) # ncomb : number of Higgs bosons combined in most sensitive channel # Note that the HB channel id number varies depending on the HB version and setting "whichanalyses" # 0 5.3.0beta ||LandH|| # version of HB used to produce these results,the HB setting "whichanalyses" # #CHANNEL info: ranked from highest statistical sensitivity 1 1 296 # channel id number 1 2 1 # HBresult 1 3 0.51704807517546159 # obsratio 1 4 1 # ncombined 1 5 ||(p p)->h1 ->Z Z-> l l l l (low mass) where h1 is SM-like (CMS-PAS-HIG-13-002)|| # text description of channel 2 1 278 # channel id number 2 2 1 # HBresult 2 3 0.43492453977958845 # obsratio 2 4 1 # ncombined 2 5 ||(p p)->h1 ->Z Z-> l l l l where h1 is SM-like (ATLAS-CONF-2013-013)|| # text description of channel 3 1 230 # channel id number 3 2 1 # HBresult 3 3 0.73995763062265141 # obsratio 3 4 1 # ncombined 3 5 ||(p p)->h1 +...->W W +... where h1 is SM-like (CMS-PAS-HIG-13-003)|| # text description of channel # BLOCK HiggsSignalsResults - 0 ||2.2.1beta|| # HiggsSignals version - 1 ||LHC13|| # experimental data set + 0 ||2.2.3beta|| # HiggsSignals version + 1 ||LHC7+8|| # experimental data set 2 1 # Chi-squared method ("peak"(1) or "mass"(2)-centered or "both"(3)) 3 2 # Parametrization of Higgs mass uncertainty (1:box, 2:gaussian, 3:box+gaussian) - 4 56 # Number of signal strength peak observables - 5 24 # Number of simplified template cross section (STXS) signal rate observables + 4 85 # Number of signal strength peak observables + 5 0 # Number of simplified template cross section (STXS) signal rate observables 6 20 # Number of LHC Run-1 signal rate observables - 7 2 # Number of Higgs mass observables - 8 102 # Number of observables (total) - 9 44.58784018 # chi^2 (signal strength) from peak observables - 10 28.97008344 # chi^2 (signal strength) from STXS observables - 11 21.77184464 # chi^2 (signal strength) from LHC Run-1 observables - 12 0.00851296 # chi^2 (Higgs mass) from peak observables + 7 5 # Number of Higgs mass observables + 8 110 # Number of observables (total) + 9 67.48060416 # chi^2 (signal strength) from peak observables + 10 0.00000000 # chi^2 (signal strength) from STXS observables + 11 21.77184515 # chi^2 (signal strength) from LHC Run-1 observables + 12 7.17088971 # chi^2 (Higgs mass) from peak observables 13 0.00000000 # chi^2 (Higgs mass) from STXS observables - 14 0.03129234 # chi^2 (Higgs mass) from LHC Run-1 observables - 15 95.32976825 # chi^2 (signal strength) (total) - 16 0.03980529 # chi^2 (Higgs mass) (total) - 17 95.36957355 # chi^2 (total) - 18 0.88393890 # Probability for peak observables - 19 0.41092952 # Probability for LHC-Run1 observables - 20 0.22125881 # Probability for STXS observables - 21 0.66557470 # Probability (total chi^2, total number observables) + 14 0.03179993 # chi^2 (Higgs mass) from LHC Run-1 observables + 15 89.25244931 # chi^2 (signal strength) (total) + 16 7.20268964 # chi^2 (Higgs mass) (total) + 17 96.45513895 # chi^2 (total) + 18 0.86185478 # Probability for peak observables + 19 0.41089986 # Probability for LHC-Run1 observables + 20 1.00000000 # Probability for STXS observables + 21 0.81810798 # Probability (total chi^2, total number observables) Index: trunk/HiggsSignals-2/example_data/SLHA/SLHA_FHexample.fh.1 =================================================================== --- trunk/HiggsSignals-2/example_data/SLHA/SLHA_FHexample.fh.1 (revision 596) +++ trunk/HiggsSignals-2/example_data/SLHA/SLHA_FHexample.fh.1 (revision 597) @@ -1,390 +1,390 @@ BLOCK SPINFO 1 FeynHiggs 2 2.8.6 2 built on Feb 23, 2012 BLOCK MODSEL 1 1 # Model 3 0 # Content 4 0 # RPV 5 2 # CPV 6 0 # FV BLOCK SMINPUTS 1 1.28936827E+02 # invAlfaMZ 2 1.16639000E-05 # GF 3 1.18000000E-01 # AlfasMZ 4 9.11870000E+01 # MZ 5 4.25000000E+00 # Mb 6 1.75000000E+02 # Mt 7 1.77703000E+00 # Mtau 11 5.10998902E-04 # Me 13 1.05658357E-01 # Mmu 21 6.00000000E-03 # Md 22 3.00000000E-03 # Mu 23 9.50000000E-02 # Ms 24 1.28600000E+00 # Mc BLOCK MINPAR 1 0.00000000E+00 # M0 2 0.00000000E+00 # M12 3 1.00000000E+01 # TB 4 1.00000000E+00 # signMUE 5 -0.00000000E+00 # A BLOCK EXTPAR 0 4.84786694E+02 # Q 1 3.00000000E+02 # M1 2 6.00000000E+02 # M2 3 1.00000000E+03 # M3 11 1.00000000E+03 # At 12 3.00000000E+02 # Ab 13 2.00000000E+02 # Atau 23 1.00000000E+02 # MUE 24 1.40000000E+05 # MA02 25 1.00000000E+01 # TB 26 3.74165739E+02 # MA0 27 3.82704682E+02 # MHp 31 2.06630723E+02 # MSL(1) 32 2.06645846E+02 # MSL(2) 33 1.34514453E+02 # MSL(3) 34 1.43872558E+02 # MSE(1) 35 1.43838140E+02 # MSE(2) 36 2.10401949E+02 # MSE(3) 41 5.64892619E+02 # MSQ(1) 42 5.64902784E+02 # MSQ(2) 43 4.58749215E+02 # MSQ(3) 44 5.47790210E+02 # MSU(1) 45 5.47775859E+02 # MSU(2) 46 5.89079372E+02 # MSU(3) 47 5.47601268E+02 # MSD(1) 48 5.47594947E+02 # MSD(2) 49 5.47471349E+02 # MSD(3) BLOCK MASS 1000012 1.96522387E+02 # MSf(1,1,1) 2000012 1.00000000+123 # MSf(2,1,1) 1000011 1.50049429E+02 # MSf(1,2,1) 2000011 2.12028169E+02 # MSf(2,2,1) 1000002 5.46684341E+02 # MSf(1,3,1) 2000002 5.62350503E+02 # MSf(2,3,1) 1000001 5.48153556E+02 # MSf(1,4,1) 2000001 5.67955726E+02 # MSf(2,4,1) 1000014 1.96538288E+02 # MSf(1,1,2) 2000014 1.00000000+123 # MSf(2,1,2) 1000013 1.50015405E+02 # MSf(1,2,2) 2000013 2.12043684E+02 # MSf(2,2,2) 1000004 5.46585835E+02 # MSf(1,3,2) 2000004 5.62283026E+02 # MSf(2,3,2) 1000003 5.48147074E+02 # MSf(1,4,2) 2000003 5.67966013E+02 # MSf(2,4,2) 1000016 1.18401567E+02 # MSf(1,1,3) 2000016 1.00000000+123 # MSf(2,1,3) 1000015 1.42403224E+02 # MSf(1,2,3) 2000015 2.14862660E+02 # MSf(2,2,3) 1000006 3.29129281E+02 # MSf(1,3,3) 2000006 6.76789745E+02 # MSf(2,3,3) 1000005 4.50942677E+02 # MSf(1,4,3) 2000005 5.51183125E+02 # MSf(2,4,3) 25 1.22651152E+02 # Mh0 35 3.74749649E+02 # MHH 36 3.74165739E+02 # MA0 37 3.82764933E+02 # MHp 1000022 8.77717849E+01 # MNeu(1) 1000023 1.05731705E+02 # MNeu(2) 1000025 3.06628639E+02 # MNeu(3) 1000035 6.11331282E+02 # MNeu(4) 1000024 9.60565070E+01 # MCha(1) 1000037 6.11309165E+02 # MCha(2) 1000021 1.00000000E+03 # MGl BLOCK DMASS 0 1.75000000E+02 # Q 25 9.72174332E-01 # Delta Mh0 35 1.06946442E-02 # Delta MHH 36 0.00000000E+00 # Delta MA0 37 8.06715487E-02 # Delta MHp BLOCK NMIX 1 1 1.47271688E-01 # ZNeu(1,1) 1 2 -1.13979916E-01 # ZNeu(1,2) 1 3 7.30717872E-01 # ZNeu(1,3) 1 4 -6.56788414E-01 # ZNeu(1,4) 2 1 -0.00000000E+00 # ZNeu(2,1) 2 2 0.00000000E+00 # ZNeu(2,2) 2 3 0.00000000E+00 # ZNeu(2,3) 2 4 0.00000000E+00 # ZNeu(2,4) 3 1 9.86458640E-01 # ZNeu(3,1) 3 2 4.16346543E-02 # ZNeu(3,2) 3 3 -6.05146385E-02 # ZNeu(3,3) 3 4 1.46642030E-01 # ZNeu(3,4) 4 1 -1.92855611E-02 # ZNeu(4,1) 4 2 9.89795429E-01 # ZNeu(4,2) 4 3 3.54417152E-02 # ZNeu(4,3) 4 4 -1.36663681E-01 # ZNeu(4,4) BLOCK IMNMIX 1 1 0.00000000E+00 # ZNeu(1,1) 1 2 0.00000000E+00 # ZNeu(1,2) 1 3 0.00000000E+00 # ZNeu(1,3) 1 4 0.00000000E+00 # ZNeu(1,4) 2 1 -6.95590979E-02 # ZNeu(2,1) 2 2 7.47003613E-02 # ZNeu(2,2) 2 3 6.79067931E-01 # ZNeu(2,3) 2 4 7.26944381E-01 # ZNeu(2,4) 3 1 0.00000000E+00 # ZNeu(3,1) 3 2 0.00000000E+00 # ZNeu(3,2) 3 3 0.00000000E+00 # ZNeu(3,3) 3 4 0.00000000E+00 # ZNeu(3,4) 4 1 0.00000000E+00 # ZNeu(4,1) 4 2 0.00000000E+00 # ZNeu(4,2) 4 3 0.00000000E+00 # ZNeu(4,3) 4 4 0.00000000E+00 # ZNeu(4,4) BLOCK UMIX 1 1 -4.97233578E-02 # UCha(1,1) 1 2 9.98763029E-01 # UCha(1,2) 2 1 9.98763029E-01 # UCha(2,1) 2 2 4.97233578E-02 # UCha(2,2) BLOCK VMIX 1 1 -1.92962310E-01 # VCha(1,1) 1 2 9.81206170E-01 # VCha(1,2) 2 1 9.81206170E-01 # VCha(2,1) 2 2 1.92962310E-01 # VCha(2,2) BLOCK STAUMIX 1 1 9.98486400E-01 # USf(1,1) 1 2 5.49991646E-02 # USf(1,2) 2 1 -5.49991646E-02 # USf(2,1) 2 2 9.98486400E-01 # USf(2,2) BLOCK STOPMIX 1 1 8.23605275E-01 # USf(1,1) 1 2 -5.67163425E-01 # USf(1,2) 2 1 5.67163425E-01 # USf(2,1) 2 2 8.23605275E-01 # USf(2,2) BLOCK SBOTMIX 1 1 9.99954439E-01 # USf(1,1) 1 2 9.54568581E-03 # USf(1,2) 2 1 -9.54568581E-03 # USf(2,1) 2 2 9.99954439E-01 # USf(2,2) BLOCK ALPHA -1.17451823E-01 # Alpha BLOCK DALPHA 1.46801249E-03 # Delta Alpha BLOCK VCKMIN 1 2.25300000E-01 # lambda 2 8.08000000E-01 # A 3 1.32000000E-01 # rhobar 4 3.41000000E-01 # etabar BLOCK MSL2IN 1 1 4.26962557E+04 # MSL2(1,1) 2 2 4.27025057E+04 # MSL2(2,2) 3 3 1.80941381E+04 # MSL2(3,3) BLOCK MSE2IN 1 1 2.06993129E+04 # MSE2(1,1) 2 2 2.06894105E+04 # MSE2(2,2) 3 3 4.42689801E+04 # MSE2(3,3) BLOCK MSQ2IN 1 1 3.19103671E+05 # MSQ2(1,1) 2 2 3.19115155E+05 # MSQ2(2,2) 3 3 1.99881446E+05 # MSQ2(3,3) BLOCK MSU2IN 1 1 3.00074114E+05 # MSU2(1,1) 2 2 3.00058392E+05 # MSU2(2,2) 3 3 3.16134306E+05 # MSU2(3,3) BLOCK MSD2IN 1 1 2.99867149E+05 # MSD2(1,1) 2 2 2.99860226E+05 # MSD2(2,2) 3 3 3.03181540E+05 # MSD2(3,3) BLOCK TEIN 1 1 5.89936191E-04 # Tf(1,1) 2 2 1.21980083E-01 # Tf(2,2) 3 3 2.05153926E+00 # Tf(3,3) BLOCK TUIN 1 1 1.73171465E-01 # Tf(1,1) 2 2 7.42328349E+01 # Tf(2,2) 3 3 9.53077892E+03 # Tf(3,3) BLOCK TDIN 1 1 1.03902879E-02 # Tf(1,1) 2 2 1.64512892E-01 # Tf(2,2) 3 3 1.56232003E+01 # Tf(3,3) BLOCK CVHMIX 1 1 9.99984377E-01 # UH(1,1) 1 2 5.58985436E-03 # UH(1,2) 1 3 0.00000000E+00 # UH(1,3) 2 1 -5.58985436E-03 # UH(2,1) 2 2 9.99984377E-01 # UH(2,2) 2 3 0.00000000E+00 # UH(2,3) 3 1 0.00000000E+00 # UH(3,1) 3 2 0.00000000E+00 # UH(3,2) 3 3 1.00000000E+00 # UH(3,3) BLOCK PRECOBS 1 4.58620642E-04 # DeltaRho 2 8.03985711E+01 # MWMSSM 3 8.03727370E+01 # MWSM 4 2.31309273E-01 # SW2effMSSM 5 2.31452470E-01 # SW2effSM 11 1.47612393E-09 # gminus2mu 21 0.00000000E+00 # EDMeTh 22 0.00000000E+00 # EDMn 23 0.00000000E+00 # EDMHg 31 7.83340682E-04 # bsgammaMSSM 32 3.84151628E-04 # bsgammaSM 33 2.29365346E+01 # DeltaMsMSSM 34 2.19915791E+01 # DeltaMsSM DECAY 25 4.66729789E-03 # Gamma(h0) 1.67729727E-03 2 22 22 # BR(h0 -> photon photon) 1.72630719E-02 2 23 23 # BR(h0 -> Z Z) 1.49508769E-01 2 -24 24 # BR(h0 -> W W) 4.98888879E-02 2 21 21 # BR(h0 -> gluon gluon) 5.91016012E-09 2 -11 11 # BR(h0 -> Electron electron) 2.62892978E-04 2 -13 13 # BR(h0 -> Muon muon) 7.57524936E-02 2 -15 15 # BR(h0 -> Tau tau) 1.71225452E-07 2 -2 2 # BR(h0 -> Up up) 2.39510771E-02 2 -4 4 # BR(h0 -> Charm charm) 9.86900853E-07 2 -1 1 # BR(h0 -> Down down) 2.47844298E-04 2 -3 3 # BR(h0 -> Strange strange) 6.81446502E-01 2 -5 5 # BR(h0 -> Bottom bottom) DECAY 35 7.83706554E-01 # Gamma(HH) 3.06707834E-06 2 22 22 # BR(HH -> photon photon) 1.74379832E-03 2 23 23 # BR(HH -> Z Z) 3.80819738E-03 2 -24 24 # BR(HH -> W W) 6.56064077E-04 2 21 21 # BR(HH -> gluon gluon) 7.54257349E-09 2 -11 11 # BR(HH -> Electron electron) 3.35617824E-04 2 -13 13 # BR(HH -> Muon muon) 9.73136619E-02 2 -15 15 # BR(HH -> Tau tau) 3.26751691E-11 2 -2 2 # BR(HH -> Up up) 4.57357974E-06 2 -4 4 # BR(HH -> Charm charm) 2.51100369E-02 2 -6 6 # BR(HH -> Top top) 1.00572923E-06 2 -1 1 # BR(HH -> Down down) 2.52571792E-04 2 -3 3 # BR(HH -> Strange strange) 6.71514561E-01 2 -5 5 # BR(HH -> Bottom bottom) 8.67236607E-02 2 -1000024 1000024 # BR(HH -> Chargino1 chargino1) 4.30707320E-02 2 1000022 1000022 # BR(HH -> neutralino1 neutralino1) 9.07746163E-03 2 1000022 1000023 # BR(HH -> neutralino1 neutralino2) 1.60515467E-02 2 1000023 1000023 # BR(HH -> neutralino2 neutralino2) 3.42640993E-02 2 25 25 # BR(HH -> h0 h0) 4.05662328E-04 2 -1000011 1000011 # BR(HH -> Selectron1 selectron1) 3.21302032E-10 2 -1000011 2000011 # BR(HH -> Selectron1 selectron2) 3.21302032E-10 2 -2000011 1000011 # BR(HH -> Selectron2 selectron1) 4.03871097E-04 2 -1000013 1000013 # BR(HH -> Smuon1 smuon1) 1.37454954E-05 2 -1000013 2000013 # BR(HH -> Smuon1 smuon2) 1.37454954E-05 2 -2000013 1000013 # BR(HH -> Smuon2 smuon1) 1.80571224E-04 2 -1000015 1000015 # BR(HH -> Stau1 stau1) 4.52587015E-03 2 -1000015 2000015 # BR(HH -> Stau1 stau2) 4.52587015E-03 2 -2000015 1000015 # BR(HH -> Stau2 stau1) DECAY 36 8.89538917E-01 # Gamma(A0) 6.11274373E-06 2 22 22 # BR(A0 -> photon photon) 6.30977419E-04 2 21 21 # BR(A0 -> gluon gluon) 6.58260322E-09 2 -11 11 # BR(A0 -> Electron electron) 2.92902511E-04 2 -13 13 # BR(A0 -> Muon muon) 8.49304516E-02 2 -15 15 # BR(A0 -> Tau tau) 1.88836298E-11 2 -2 2 # BR(A0 -> Up up) 2.64328808E-06 2 -4 4 # BR(A0 -> Charm charm) 1.16717546E-01 2 -6 6 # BR(A0 -> Top top) 8.77995484E-07 2 -1 1 # BR(A0 -> Down down) 2.20493704E-04 2 -3 3 # BR(A0 -> Strange strange) 5.86468722E-01 2 -5 5 # BR(A0 -> Bottom bottom) 1.14286977E-01 2 -1000024 1000024 # BR(A0 -> Chargino1 chargino1) 7.10303312E-02 2 1000022 1000022 # BR(A0 -> neutralino1 neutralino1) 8.23874194E-04 2 1000022 1000023 # BR(A0 -> neutralino1 neutralino2) 1.29641313E-02 2 1000023 1000023 # BR(A0 -> neutralino2 neutralino2) 3.87218821E-03 2 23 25 # BR(A0 -> Z h0) 6.41227277E-35 2 25 25 # BR(A0 -> h0 h0) 2.72541936E-10 2 -1000011 2000011 # BR(A0 -> Selectron1 selectron2) 2.72541936E-10 2 -2000011 1000011 # BR(A0 -> Selectron2 selectron1) 1.16605248E-05 2 -1000013 2000013 # BR(A0 -> Smuon1 smuon2) 1.16605248E-05 2 -2000013 1000013 # BR(A0 -> Smuon2 smuon1) 3.86422166E-03 2 -1000015 2000015 # BR(A0 -> Stau1 stau2) 3.86422166E-03 2 -2000015 1000015 # BR(A0 -> Stau2 stau1) DECAY 37 5.77103523E-01 # Gamma(Hp) 1.09735497E-08 2 -11 12 # BR(Hp -> Electron nu_e) 4.69153370E-04 2 -13 14 # BR(Hp -> Muon nu_mu) 1.32702162E-01 2 -15 16 # BR(Hp -> Tau nu_tau) 1.30918860E-06 2 -1 2 # BR(Hp -> Down up) 3.32233240E-04 2 -3 4 # BR(Hp -> Strange charm) 8.18940930E-01 2 -5 6 # BR(Hp -> Bottom top) 1.11828834E-03 2 1000022 1000024 # BR(Hp -> neutralino1 chargino1) 1.56473147E-02 2 1000023 1000024 # BR(Hp -> neutralino2 chargino1) 6.98960586E-03 2 -25 24 # BR(Hp -> H0 W) 7.69953813E-08 2 -35 24 # BR(Hp -> HH W) 1.07948719E-07 2 -36 24 # BR(Hp -> A0 W) 1.33187463E-09 2 -1000011 1000012 # BR(Hp -> Selectron1 snu_e1) 5.69556904E-05 2 -1000013 1000014 # BR(Hp -> Smuon1 snu_mu1) 2.27100515E-03 2 -1000015 1000016 # BR(Hp -> Stau1 snu_tau1) 1.96608875E-02 2 -2000015 1000016 # BR(Hp -> Stau2 snu_tau1) DECAY 6 1.42276225E+00 # Gamma(top) 1.00000000E+00 2 5 24 # BR(top -> bottom W) # Block HiggsBoundsInputHiggsCouplingsBosons # For exact definitions of NormEffCoupSq see HiggsBounds manual 1.01380 3 25 24 24 # higgs-W-W effective coupling^2, normalised to SM 0.224092E-03 3 35 24 24 # higgs-W-W effective coupling^2, normalised to SM 0.00000 3 36 24 24 # higgs-W-W effective coupling^2, normalised to SM 1.01380 3 25 23 23 # higgs-Z-Z effective coupling^2, normalised to SM 0.224092E-03 3 35 23 23 # higgs-Z-Z effective coupling^2, normalised to SM 0.00000 3 36 23 23 # higgs-Z-Z effective coupling^2, normalised to SM 0.842307 3 25 21 21 # higgs-gluon-gluon effective coupling^2, normalised to SM 0.303613E-01 3 35 21 21 # higgs-gluon-gluon effective coupling^2, normalised to SM 0.415637E-01 3 36 21 21 # higgs-gluon-gluon effective coupling^2, normalised to SM 0.00000 3 25 25 23 # higgs-higgs-Z effective coupling^2, normalised 0.00000 3 35 25 23 # higgs-higgs-Z effective coupling^2, normalised 0.00000 3 35 35 23 # higgs-higgs-Z effective coupling^2, normalised 0.344859E-03 3 36 25 23 # higgs-higgs-Z effective coupling^2, normalised 0.952528 3 36 35 23 # higgs-higgs-Z effective coupling^2, normalised 0.00000 3 36 36 23 # higgs-higgs-Z effective coupling^2, normalised 0.00000 4 25 21 21 23 # higgs-gluon-gluon-Z effective coupling^2, normalised to SM 0.00000 4 35 21 21 23 # higgs-gluon-gluon-Z effective coupling^2, normalised to SM 0.00000 4 36 21 21 23 # higgs-gluon-gluon-Z effective coupling^2, normalised to SM # Block HiggsBoundsInputHiggsCouplingsFermions # For exact definitions of NormEffCoupSq see HiggsBounds manual # ScalarNormEffCoupSq PseudoSNormEffCoupSq NP IP1 IP2 IP3 # Scalar, Pseudoscalar Normalised Effective Coupling Squared 1.4201311968339043 0.0000000000000000 3 25 5 5 # higgs-b-b eff. coupling^2, normalised to SM 94.055378696286240 0.0000000000000000 3 35 5 5 # higgs-b-b eff. coupling^2, normalised to SM 2.11691722613467644E-042 93.199701998261276 3 36 5 5 # higgs-b-b eff. coupling^2, normalised to SM 1.0099456255672334 0.0000000000000000 3 25 6 6 # higgs-top-top eff. coupling^2, normalised to SM 1.33592532043404228E-002 0.0000000000000000 3 35 6 6 # higgs-top-top eff. coupling^2, normalised to SM 0.0000000000000000 1.00000000000000019E-002 3 36 6 6 # higgs-top-top eff. coupling^2, normalised to SM 1.4359623579970071 0.0000000000000000 3 25 15 15 # higgs-tau-tau eff. coupling^2, normalised to SM 100.92889030196287 0.0000000000000000 3 35 15 15 # higgs-tau-tau eff. coupling^2, normalised to SM 0.0000000000000000 100.00000000000000 3 36 15 15 # higgs-tau-tau eff. coupling^2, normalised to SM Block HiggsBoundsResults # results from HiggsBounds http://projects.hepforge.org/higgsbounds # HBresult : scenario allowed flag (1: allowed, 0: excluded, -1: unphysical) # chan id number: most sensitive channel (see below). chan=0 if no channel applies # obsratio : ratio [sig x BR]_model/[sig x BR]_limit (<1: allowed, >1: excluded) # ncomb : number of Higgs bosons combined in most sensitive channel # Note that the HB channel id number varies depending on the HB version and setting "whichanalyses" # 0 5.2.0beta ||LandH|| # version of HB used to produce these results,the HB setting "whichanalyses" # #CHANNEL info: ranked from highest statistical sensitivity 1 1 746 # channel id number 1 2 0 # HBresult 1 3 2.9854227405247813 # obsratio 1 4 2 # ncombined 1 5 ||(pp)->h3->tautau, using -2ln(L) reconstruction (CMS-HIG-PAS 17-020)|| # text description of channel 2 1 745 # channel id number 2 2 0 # HBresult 2 3 2.9724238026124818 # obsratio 2 4 2 # ncombined 2 5 ||(pp)->h2->tautau, using -2ln(L) reconstruction (CMS-HIG-PAS 17-020)|| # text description of channel 3 1 749 # channel id number 3 2 0 # HBresult 3 3 1.9393939393939394 # obsratio 3 4 2 # ncombined 3 5 ||(pp)->h3->tautau, using -2ln(L) reconstruction (arXiv:1709.07242 [hep-ex] (ATLAS))|| # text description of channel # BLOCK HiggsSignalsResults - 0 ||2.2.1beta|| # HiggsSignals version + 0 ||2.2.3beta|| # HiggsSignals version 1 ||LHC13|| # experimental data set 2 1 # Chi-squared method ("peak"(1) or "mass"(2)-centered or "both"(3)) 3 2 # Parametrization of Higgs mass uncertainty (1:box, 2:gaussian, 3:box+gaussian) 4 56 # Number of signal strength peak observables 5 24 # Number of simplified template cross section (STXS) signal rate observables 6 20 # Number of LHC Run-1 signal rate observables 7 2 # Number of Higgs mass observables 8 102 # Number of observables (total) - 9 70.46596618 # chi^2 (signal strength) from peak observables - 10 43.21309525 # chi^2 (signal strength) from STXS observables - 11 88.11158847 # chi^2 (signal strength) from LHC Run-1 observables + 9 70.46573871 # chi^2 (signal strength) from peak observables + 10 43.21310164 # chi^2 (signal strength) from STXS observables + 11 88.11160495 # chi^2 (signal strength) from LHC Run-1 observables 12 6.64966820 # chi^2 (Higgs mass) from peak observables 13 0.00000000 # chi^2 (Higgs mass) from STXS observables 14 0.00000000 # chi^2 (Higgs mass) from LHC Run-1 observables - 15 201.79064989 # chi^2 (signal strength) (total) + 15 201.79044530 # chi^2 (signal strength) (total) 16 6.64966820 # chi^2 (Higgs mass) (total) - 17 208.44031809 # chi^2 (total) - 18 0.03920516 # Probability for peak observables + 17 208.44011349 # chi^2 (total) + 18 0.03920664 # Probability for peak observables 19 0.00000000 # Probability for LHC-Run1 observables - 20 0.00940436 # Probability for STXS observables + 20 0.00940434 # Probability for STXS observables 21 0.00000000 # Probability (total chi^2, total number observables) Index: trunk/HiggsSignals-2/pc_chisq.f90 =================================================================== --- trunk/HiggsSignals-2/pc_chisq.f90 (revision 596) +++ trunk/HiggsSignals-2/pc_chisq.f90 (revision 597) @@ -1,2574 +1,2574 @@ !-------------------------------------------------------------------- ! This file is part of HiggsSignals (TS 03/03/2013) !-------------------------------------------------------------------- module pc_chisq use numerics use combinatorics use usefulbits_hs implicit none integer :: i,j,k double precision,parameter :: pi=3.14159265358979323846264338328D0 integer, allocatable :: peakindices_best(:,:) contains !------------------------------------------------------------------------------------ subroutine set_toyvalues(ii, peaks) ! This subroutine sets the mass and mu measurements of the peak observable(s) of analyses ii ! to those values which are given by the user using assign_toyvalues_to_observables. !------------------------------------------------------------------------------------ use usefulbits_hs, only: obs, mupeak integer, intent(in) :: ii type(mupeak),dimension(:), intent(inout) :: peaks integer :: i if(obs(ii)%table%npeaks.ne.size(peaks)) then stop 'Error in subroutine set_toyvalues: Number of peaks does not match!' endif do i=lbound(peaks,dim=1),ubound(peaks,dim=1) peaks(i)%mpeak = obs(ii)%table%Toys_mhobs(i) peaks(i)%mu = obs(ii)%table%Toys_muobs(i) enddo end subroutine set_toyvalues !------------------------------------------------------------------------------------ !subroutine scale_uncertainties(ii, peaks) !! Scales the uncertainty of the signal strength and mass measurement of the peak !! observables of analysis ii by the scalefactors which have been set via the subroutine !! assign_uncertainty_scalefactors_to_observables. !!------------------------------------------------------------------------------------ ! use usefulbits_hs, only : obs, mupeak ! ! integer, intent(in) :: ii ! type(mupeak),dimension(:), intent(inout) :: peaks ! integer :: i ! ! if(obs(ii)%table%npeaks.ne.size(peaks)) then ! stop 'Error in subroutine scale_uncertainties: Number of peaks does not match!' ! endif ! ! do i=lbound(peaks,dim=1),ubound(peaks,dim=1) ! peaks(i)%dmuup = obs(ii)%table%scale_mu(i)*peaks(i)%dmuup ! peaks(i)%dmulow = obs(ii)%table%scale_mu(i)*peaks(i)%dmulow ! peaks(i)%dm = obs(ii)%table%scale_mh(i)*peaks(i)%dm ! enddo ! !end subroutine scale_uncertainties !------------------------------------------------------------------------------------ !subroutine restore_uncertainties(ii, peaks) !! Restores the uncertainty of the signal strength and mass measurement of the peak !! observables of analysis ii after scaling. !!------------------------------------------------------------------------------------ ! use usefulbits, only : vsmall ! use usefulbits_hs, only : obs, mupeak ! ! integer, intent(in) :: ii ! type(mupeak),dimension(:), intent(inout) :: peaks ! integer :: i ! ! if(obs(ii)%table%npeaks.ne.size(peaks)) then ! stop 'Error in subroutine restore_uncertainties: Number of peaks does not match!' ! endif ! ! do i=lbound(peaks,dim=1),ubound(peaks,dim=1) ! if(obs(ii)%table%scale_mu(i).ge.vsmall) then ! peaks(i)%dmuup = peaks(i)%dmuup/obs(ii)%table%scale_mu(i) ! peaks(i)%dmulow = peaks(i)%dmulow/obs(ii)%table%scale_mu(i) ! else ! write(*,*) 'WARNING: scale_mu is (too close to) zero!' ! endif ! if(obs(ii)%table%scale_mh(i).ge.vsmall) then ! peaks(i)%dm = peaks(i)%dm/obs(ii)%table%scale_mh(i) ! else ! write(*,*) 'WARNING: scale_mh is (too close to) zero!' ! endif ! enddo ! !end subroutine restore_uncertainties !!------------------------------------------------------------------------------------ subroutine assign_Higgs_to_peaks_with_correlations(iter) ! Do this only for pdf = 2 ! ! NOTE: This is possibly still buggy. Only use it with iter=0. ! TODO: Have to extend this here for assignment-groups. !------------------------------------------------------------------------------------ use usefulbits_HS, only : neutHiggses, nanalys use usefulbits, only : np, Hneut implicit none integer, intent(in) :: iter integer :: i, ii, iii, n, jjj character(LEN=100), allocatable :: assignmentgroups(:) integer, allocatable :: assignmentgroups_Higgs_comb(:,:) !! allocate(assignmentgroups(nanalys)) !! allocate(assignmentgroups_Higgs_comb(nanalys,np(Hneut))) !! write(*,*) "Running assign_Higgs_to_peaks_with_correlations." if(iter.gt.0) write(*,*) "WARNING: Iterations in the Higgs-to-peaks assignment are ",& & "still under development." jjj = 1 do n=1, iter call create_covariance_matrices() iii=0 do i=lbound(analyses,dim=1),ubound(analyses,dim=1) do ii=lbound(analyses(i)%peaks,dim=1),ubound(analyses(i)%peaks,dim=1) iii=iii+1 analyses(i)%peaks(ii)%internalnumber = iii enddo call assign_Higgs_to_peaks(analyses(i)%table, analyses(i)%peaks, n) enddo enddo end subroutine assign_Higgs_to_peaks_with_correlations !------------------------------------------------------------------------------------ subroutine assign_Higgs_to_peaks(table, peaks, iterstep) ! This subroutine assigns the best combination of Higgs bosons to each peak observable ! found in ONE mutable/analysis. ! It calculates for every possible assignment of the Higgs bosons to the peaks a ! chi-squared value. It takes care that each Higgs boson is used for at most one peak. ! The combination with the minimal chi-squared value is selected. The relevant information ! about the assigned Higgs bosons is then saved in each peak object. !------------------------------------------------------------------------------------ use usefulbits, only : div, np, Hneut implicit none type(mutable), intent(in) :: table type(mupeak), dimension(:), intent(inout) :: peaks(:) integer, intent(in) :: iterstep integer, allocatable :: peakindices_best(:,:), domH(:), domH_tmp(:) integer, allocatable :: Higgs_to_be_assigned(:),Higgs_fulfills_req_assignment(:) integer :: Npeaks, nH, a, i, j, ii,jj, Hindex, NHiggs integer :: Higgs_assignment_forced,Higgs_assignment_forced_tmp double precision :: pccsq, pccsq_tmp, chisq_fp !! integer, allocatable :: indices_best(:) double precision :: force_in_range chisq_fp = 10000000.0D0 nH=np(Hneut) Npeaks=size(peaks) ! write(*,*) 'DEBUG: Calling assign_Higgs_to_peaks for' ! write(*,*) 'table ID = ',table%id ! write(*,*) 'table expt, desc = ',table%expt, table%desc if(Npeaks.le.0) then if(iterstep.eq.0) then write(*,'(A,1X,A,1X,A,1X,A,F4.2,A,I12,A)') ' No peaks defined for ', & & trim(adjustl(table%collaboration)),trim(adjustl(table%desc)),'(',table%energy, & & " TeV) search (analysis ID = ",table%id,")." endif else !-Create indices matrix from combinatorics module containing all possible !-peak-Higgs combinations: call create_peakindices(Npeaks,nH) allocate(peakindices_best(Npeaks,nH)) allocate(domH(Npeaks),domH_tmp(Npeaks)) allocate(Higgs_to_be_assigned(nH),Higgs_fulfills_req_assignment(nH)) ! (TS 11/01/2013: Give some default values) Higgs_assignment_forced = 1 call copy_matrices(peakindices(1,:,:),peakindices_best(:,:)) do k=lbound(domH_tmp,dim=1),ubound(domH_tmp,dim=1) domH_tmp(k) = 0 enddo ! write(*,*) 'DEBUG: print peakindices before start...' ! do a=lbound(peakindices,dim=1),ubound(peakindices,dim=1) ! write(*,*) ' a = ',a ! write(*,*) peakindices(a,:,:) ! enddo if(table%mhchisq.eq.1) then force_in_range = assignmentrange_massobs else force_in_range = assignmentrange endif if(pdf.eq.1) force_in_range = 1.0D0 ! (TS 09/09/2012: Add the criterium that if the Higgs bosons masses are close enough to ! the peaks they have to be assigned. ) !-First, find out which Higgs bosons have to be assigned. For this, we loop over all peaks !-and check which Higgses lie close enough (i.e. the mass difference is less than the !-total (gaussian) mass uncertainty). In that case, we tag this Higgs to be assigned. do i=lbound(Higgs_to_be_assigned,dim=1), ubound(Higgs_to_be_assigned,dim=1) Higgs_to_be_assigned(i)=0 enddo do i=lbound(peaks,dim=1),ubound(peaks,dim=1) do j=lbound(Higgs_to_be_assigned,dim=1), ubound(Higgs_to_be_assigned,dim=1) if(abs(peaks(i)%Higgses(j)%m-peaks(i)%mpeak).le. & & force_in_range*sqrt(peaks(i)%Higgses(j)%dm**2 + table%deltam**2)) then if(useaveragemass.and.abs(peaks(i)%Higgses(j)%mu).le.mu_cutoff_for_assignment) then ! if(useaveragemass) then Higgs_to_be_assigned(j)=0 else Higgs_to_be_assigned(j)=1 endif else !-If the chisq contribution from the Higgs masses is not used, we do NOT want ! to assign Higgs bosons which are far away from peak. if(table%mhchisq.ne.1) Higgs_to_be_assigned(j)=-1 ! if(table%mhchisq.ne.1.or.useaveragemass) Higgs_to_be_assigned(j)=-1 endif enddo enddo ! write(*,*) 'Higgs_to_be_assigned = ',Higgs_to_be_assigned !-Loop over all possible combinations, calculate the chisq and find the best combination. do a=lbound(peakindices,dim=1),ubound(peakindices,dim=1) pccsq_tmp = 0 !--Loop over all peaks, i.e. rows of the combination matrices: do i=lbound(peakindices,dim=2),ubound(peakindices,dim=2) !---Calculate the chi squared value for this combination assigned to peak i: call calc_pc_chisq(pccsq, peaks(i), table%mhchisq, peaks(i)%Higgses, domH(i), & & peakindices(a,i,:),iterstep) pccsq = pccsq + csq_mass_separation_weighted(peakindices(a,i,:), peaks(i)) !---Add the calculated value to the total chi-squared value for all peaks: pccsq_tmp = pccsq_tmp + pccsq enddo ! write(*,*) 'a = ',a,' temporary chisq contribution = ', pccsq_tmp !--Determine the best Higgs-to-peaks assignment: if(pccsq_tmp.lt.chisq_fp) then ! write(*,*) 'pccsq_tmp is below chisq_fp = ', chisq_fp do i=lbound(Higgs_fulfills_req_assignment,dim=1), & & ubound(Higgs_fulfills_req_assignment,dim=1) Higgs_fulfills_req_assignment(i)=0 enddo Higgs_assignment_forced_tmp = 0 do j=lbound(Higgs_to_be_assigned,dim=1),ubound(Higgs_to_be_assigned,dim=1) if(Higgs_to_be_assigned(j).eq.1) then do ii=lbound(peakindices,dim=2),ubound(peakindices,dim=2) do jj=lbound(peakindices,dim=3),ubound(peakindices,dim=3) if(peakindices(a,ii,jj).eq.j) then Higgs_fulfills_req_assignment(j)=1 Higgs_assignment_forced_tmp = 1 endif enddo enddo else if(Higgs_to_be_assigned(j).eq.-1) then Higgs_fulfills_req_assignment(j)=1 do ii=lbound(peakindices,dim=2),ubound(peakindices,dim=2) do jj=lbound(peakindices,dim=3),ubound(peakindices,dim=3) if(peakindices(a,ii,jj).eq.j) then Higgs_fulfills_req_assignment(j)=0 endif enddo enddo else Higgs_fulfills_req_assignment(j)=1 endif enddo ! write(*,*) 'Higgs_fulfills_req_assignment = ', Higgs_fulfills_req_assignment if(sum(Higgs_fulfills_req_assignment).eq.nH) then chisq_fp = pccsq_tmp Higgs_assignment_forced = Higgs_assignment_forced_tmp call copy_matrices(peakindices(a,:,:),peakindices_best(:,:)) if(a.eq.1) then do k=lbound(domH_tmp,dim=1),ubound(domH_tmp,dim=1) domH_tmp(k) = 0 enddo else domH_tmp(:) = domH(:) endif ! write(*,*) 'Assignment taken over: ', peakindices_best endif endif enddo !--Save information in peak object do i=lbound(peakindices_best,dim=1),ubound(peakindices_best,dim=1) !--Best Higgs Combination: peaks(i)%Higgs_comb(:) = peakindices_best(i,:) ! write(*,*) "hello: Higgs assignment of ID = ",peaks(i)%id, ": ", peaks(i)%Higgs_comb,& ! & "Higgs_assignment_forced: ",Higgs_assignment_forced peaks(i)%domH = domH_tmp(i) peaks(i)%Higgs_assignment_forced = Higgs_assignment_forced call evaluate_peak(peaks(i),table) enddo deallocate(peakindices, peakindices_best, domH, domH_tmp) deallocate(Higgs_to_be_assigned,Higgs_fulfills_req_assignment) endif end subroutine assign_Higgs_to_peaks !------------------------------------------------------------------------------------ subroutine evaluate_peak(peak, table) ! Evaluates the peak information for a given Higgs boson combination and dominant Higgs ! (both have to be assigned to the peak before calling this subroutine!) !------------------------------------------------------------------------------------ use usefulbits, only : div, np, Hneut, small, vsmall implicit none type(mupeak) :: peak type(mutable) :: table integer :: j,k integer :: NHiggs,Hindex double precision :: normalization NHiggs=0 do j=lbound(peak%Higgs_comb,dim=1),ubound(peak%Higgs_comb,dim=1) if(peak%Higgs_comb(j).ne.0) NHiggs=NHiggs+1 enddo peak%NHiggs_comb = NHiggs !--Chose dominant Higgs in the best Higgs combination for weights and systematics !-------------- ! In rare cases there appears a segmentation fault, ! because peak%domH seems not to be initialized. ! HERE: Check that it is in a reasonable range. if(peak%domH.ne.0.and.peak%domH.le.np(Hneut)) then peak%channel_w(:) = peak%channel_w_allH(:,peak%domH) peak%channel_w_corrected_eff(:) = peak%channel_w_corrected_eff_allH(:,peak%domH) peak%channel_syst(:) = peak%channel_syst_allH(:,peak%domH) peak%channel_systSM(:) = peak%channel_systSM_allH(:,peak%domH) else !-Part of fix: peak%domH=0 !-------------- call get_weights_at_peak(peak, table) !! If no Higgs is assigned we don't correct the efficiencies... peak%channel_w_corrected_eff(:) = peak%channel_w(:) !! peak%channel_w(:) = peak%channel_w_allH(:,1) peak%channel_syst(:) = peak%channel_syst_allH(:,1) peak%channel_systSM(:) = peak%channel_systSM_allH(:,1) endif !--Subtract the correlated uncertainties from mu uncertainty: call correct_mu_uncertainty_of_peak(peak, table) !--Add the channel contributions of the Higgses and adjust them to the "averaged weights": peak%total_mu=0 !--n.b.: Have to set channel_mu to zero in case this subroutine is called several times. do k=lbound(peak%channel_mu,dim=1),ubound(peak%channel_mu,dim=1) peak%channel_mu(k)=0.0D0 peak%channel_w_model(k)=0.0D0 enddo !--Loop over Higgses in best combination do j=lbound(peak%Higgs_comb,dim=1),ubound(peak%Higgs_comb,dim=1) if(peak%Higgs_comb(j).ne.0) then Hindex=peak%Higgs_comb(j) !----Loop over the channels and add rates do k=lbound(peak%channel_mu,dim=1),ubound(peak%channel_mu,dim=1) peak%channel_mu(k)=peak%channel_mu(k)+ & & peak%channel_mu_allH(k,Hindex)*peak%channel_w_corrected_eff_allH(k,Hindex) peak%total_mu = peak%total_mu + & & peak%channel_mu_allH(k,Hindex)*peak%channel_w_corrected_eff_allH(k,Hindex) enddo endif enddo do k=lbound(peak%channel_mu,dim=1),ubound(peak%channel_mu,dim=1) !---Calculate channel weights of the model, using the possibly combined rates. ! (TS 20/04/2013) peak%channel_w_model(k)=div(peak%channel_mu(k),peak%total_mu,0.0D0,1.0D9) !--Reweight the rates to obtain the channel_mu peak%channel_mu(k)=div(peak%channel_mu(k),peak%channel_w_corrected_eff(k),0.0D0,1.0D9) enddo !--If no Higgs boson has been assigned, use the SM weight at the peak position for ! the channel weight of the model (TS26/04/2013): if(peak%domH.eq.0) then peak%channel_w_model = peak%channel_w endif !--In the (unphysical) case of negative channel rates, we have to take care that the ! model channel weights are still positive and between 0 and 1: normalization = 0.0D0 do k=lbound(peak%channel_w_model,dim=1),ubound(peak%channel_w_model,dim=1) normalization = normalization + abs(peak%channel_w_model(k)) enddo if(abs(normalization).gt.small) then do k=lbound(peak%channel_w_model,dim=1),ubound(peak%channel_w_model,dim=1) peak%channel_w_model(k) = div(abs(peak%channel_w_model(k)),& & normalization,1.0D0/peak%Nc,1.0D0) enddo else !--If the predicted signal strength is zero, use SM weights peak%channel_w_model = peak%channel_w endif if(abs(sum(peak%channel_w_model)-1.0D0).gt.small) then write(*,*) "WARNING: Channel weights of the model are not correctly normalized:" write(*,*) peak%channel_w_model endif end subroutine evaluate_peak !------------------------------------------------------------------------------------ subroutine calculate_total_pc_chisq(csq_tot, csq_mu, csq_mh, N, Nmu, Nmh) ! Calculates the total chi^2 value with the peak-centered chi^2 method. This ! subroutine is called from evaluate_model in the HiggsSignals run. !------------------------------------------------------------------------------------ implicit none double precision, allocatable :: csq_mu_in(:), csq_mh_in(:,:), csq0(:), csq0_nocorr(:) double precision, intent(out) :: csq_tot, csq_mu, csq_mh integer, intent(out) :: N, Nmu, Nmh integer :: i, ii, iii, j,jj, iter, Niterations logical :: iterate ! Need to do iterations of the following procedure. Due to modifications in the ! Higgs-to-peak assignments necessary for so-called assignment groups (i.e. a set of ! observables which should take over the assignment our their leading observable, ! which should be the one with a mass measurement), the covariance matrices of the Higgs ! mass part change, and therefore also the chi^2 contribution from the Higgs mass. ! Since a cutoff chi^2(tot) < chi^2(max) applies in specific cases, this cutoff has to be ! re-evaluated a few times to converge to the correct total chi^2 evaluation. iterate=.True. Niterations=0 do while(iterate) call calculate_mu_chisq(csq0, Nmu, 2) !--Debugging ! call calculate_mu_chisq(csq0_nocorr, Nmu, 2) ! csq0 without correlations !-- call calculate_mu_chisq(csq_mu_in, Nmu, 0) call calculate_mh_chisq(csq_mh_in, Nmh) !--Debugging ! write(*,*) "chi2 values (i, max with corr, max without corr, csq_mu, csq_mh)" ! do i=1,size(csq0) ! ! write(*,*) i, csq0(i), csq0_nocorr(i), csq_mu_in(i), csq_mh_in(1,i) ! write(*,*) i, csq0(i), csq_mu_in(i), csq_mh_in(1,i) ! enddo iii=0 do i=1, size(analyses) do ii=lbound(analyses(i)%peaks,dim=1),ubound(analyses(i)%peaks,dim=1) iii=iii+1 ! write(*,*) "analyses(",i,")%peaks(",ii,")%Higgs_assignment_forced = ",analyses(i)%peaks(ii)%Higgs_assignment_forced if(analyses(i)%peaks(ii)%Higgs_assignment_forced.eq.0.and.(.not.maximalchisq).or.& & analyses(i)%peaks(ii)%Higgs_assignment_forced.eq.1.and.(.not.maximalchisq).and.pdf.eq.1) then if((csq_mu_in(iii)+sum(csq_mh_in(:,iii))).gt.csq0(iii).and.& & analyses(i)%peaks(ii)%NHiggs_comb.gt.0.and.analyses(i)%table%mhchisq.eq.1) then analyses(i)%peaks(ii)%undo_assignment=1 !---Now, undo Higgs-to-peak-assignment for the whole group (if existent) if(len(trim(analyses(i)%peaks(ii)%assignmentgroup)).ne.0) then do j=1, size(analyses) do jj=lbound(analyses(j)%peaks,dim=1),ubound(analyses(j)%peaks,dim=1) if(analyses(i)%peaks(ii)%assignmentgroup.eq.& & analyses(j)%peaks(jj)%assignmentgroup) then analyses(j)%peaks(jj)%undo_assignment=1 endif ! write(*,*) 'hello, undo assignment, j, jj = ', j, jj, ", undo assignment = ",analyses(j)%peaks(jj)%undo_assignment enddo enddo endif endif endif enddo enddo call correcting_Higgs_to_peak_assignment(iterate) if(iterate) Niterations = Niterations + 1 deallocate(csq_mu_in, csq_mh_in) enddo !! if(Niterations.gt.0) write(*,*) "Ran ",Niterations," iterations to determine Higgs to peak assignment." ! After these iterations, the code should know the correct assignments. call calculate_mh_chisq(csq_mh_in, Nmh) ! This will undo the assignments, if necessary ! call calculate_mu_chisq(csq0, Nmu, 1) ! call calculate_mu_chisq(csq0_nocorr, Nmu, 2) ! csq0 without correlations call calculate_mu_chisq(csq_mu_in, Nmu, 0) ! Need to evaluate this again with new assignments !Calculate total ndf: N = Nmu + Nmh csq_mu = 0.0D0 csq_mh = 0.0D0 csq_tot = 0.0D0 iii=0 do i=1, size(analyses) do ii=lbound(analyses(i)%peaks,dim=1),ubound(analyses(i)%peaks,dim=1) iii=iii+1 !--Only allow positive chisq contributions if wanted if(minimalchisq) then if(csq_mu_in(iii).lt.0.0D0) csq_mu_in(iii) = 0.0D0 do j=lbound(csq_mh_in, dim=1), ubound(csq_mh_in, dim=1) if(csq_mh_in(j,iii).lt.0.0D0) csq_mh_in(j,iii) = 0.0D0 enddo endif !--Assign chisq_mu and chisq_mh such that the total chisq does not exceed the maximum !--chisq csq0 if(maximalchisq) then analyses(i)%peaks(ii)%chisq_mu = min(csq_mu_in(iii),csq0(iii)) analyses(i)%peaks(ii)%chisq_mh = min(csq0(iii)-analyses(i)%peaks(ii)%chisq_mu, & & sum(csq_mh_in(:,iii))) !TESTING: comment out this --> ! elseif(analyses(i)%peaks(ii)%Higgs_assignment_forced.eq.0) then ! analyses(i)%peaks(ii)%chisq_mu = min(csq_mu_in(iii),csq0(iii)) ! analyses(i)%peaks(ii)%chisq_mh = min(csq0(iii)-analyses(i)%peaks(ii)%chisq_mu, & !& sum(csq_mh_in(:,iii))) !! write(*,*) csq0(iii),csq_mu_in(iii),sum(csq_mh_in(:,iii)) ! NEW FOR CORRECTED ASSIGNMENTS: ! elseif(analyses(i)%peaks(ii)%Higgs_assignment_forced.eq.1.and.& !& analyses(i)%peaks(ii)%domH.eq.0) then elseif(analyses(i)%peaks(ii)%domH.eq.0) then analyses(i)%peaks(ii)%chisq_mu = csq0(iii) analyses(i)%peaks(ii)%chisq_mh = 0.0D0 else !! write(*,*) "HtP assignment is forced for analysis: ",iii analyses(i)%peaks(ii)%chisq_mu = csq_mu_in(iii) analyses(i)%peaks(ii)%chisq_mh = sum(csq_mh_in(:,iii)) !! write(*,*) csq0(iii),csq_mu_in(iii),sum(csq_mh_in(:,iii)) endif analyses(i)%peaks(ii)%chisq_tot = analyses(i)%peaks(ii)%chisq_mu + & & analyses(i)%peaks(ii)%chisq_mh analyses(i)%peaks(ii)%chisq_max = csq0(iii) csq_mu = csq_mu + analyses(i)%peaks(ii)%chisq_mu csq_mh = csq_mh + analyses(i)%peaks(ii)%chisq_mh csq_tot = csq_tot + analyses(i)%peaks(ii)%chisq_tot enddo enddo deallocate(csq_mu_in, csq_mh_in) ! write(*,*) "End of subroutine calculate_total_pc_chisq." end subroutine calculate_total_pc_chisq !----------------------------------------------------------------------------------- subroutine correcting_Higgs_to_peak_assignment(iterate) !----------------------------------------------------------------------------------- use usefulbits, only : np, Hneut implicit none integer :: i, ii, k logical, intent(inout) :: iterate iterate=.False. do i=1, size(analyses) do ii=lbound(analyses(i)%peaks,dim=1),ubound(analyses(i)%peaks,dim=1) if(analyses(i)%peaks(ii)%undo_assignment.eq.1.and.analyses(i)%peaks(ii)%domH.ne.0)then !! write(*,*) "Correcting HtP." iterate=.True. do k=1,np(Hneut) analyses(i)%peaks(ii)%Higgs_comb(k)=0 enddo analyses(i)%peaks(ii)%domH=0 call evaluate_peak(analyses(i)%peaks(ii),analyses(i)%table) !! analyses(i)%peaks(ii)%undo_assignment=0 endif enddo enddo end subroutine correcting_Higgs_to_peak_assignment !------------------------------------------------------------------------------------ subroutine create_covariance_matrices() !------------------------------------------------------------------------------------ if(.not.allocated(analyses)) then stop 'Error in subroutine create_covariance_matrices: analyses is not allocated.' endif ! write(*,*) "hello: Called subroutine create_covariance_matrices..." if(allocated(cov)) deallocate(cov) call create_covariance_matrix_mu(0) if(pdf.eq.2) then ! if(useaveragemass) then if(allocated(cov_mh_av)) deallocate(cov_mh_av) call create_covariance_matrix_mh_av(0) if(allocated(cov_mh_av_max)) deallocate(cov_mh_av_max) call create_covariance_matrix_mh_av(1) ! else if(allocated(cov_mhneut)) deallocate(cov_mhneut) call create_covariance_matrix_mhneut(0) if(allocated(cov_mhneut_max)) deallocate(cov_mhneut_max) call create_covariance_matrix_mhneut(1) ! endif endif end subroutine create_covariance_matrices !------------------------------------------------------------------------------------ subroutine calculate_mu_chisq(csq_mu, N, domax) !------------------------------------------------------------------------------------ ! use usefulbits_hs, only : peaklist, cov use numerics, only : invmatrix, matmult integer :: i, ii, iii double precision, allocatable :: v(:), vmat(:,:), invcov(:,:), v2(:) double precision, allocatable, intent(out) :: csq_mu(:) character(LEN=50) :: title = "covariance matrix for signal strength mu" integer, intent(out) :: N integer, intent(in) :: domax ! if 1, then calculate maximal chisq if(allocated(cov)) deallocate(cov) call create_covariance_matrix_mu(domax) if(allocated(mu_vector)) deallocate(mu_vector) N = size(cov,dim=1) allocate(v(N), vmat(N,1),invcov(N,N), v2(N), csq_mu(N)) allocate(mu_vector(N)) !! write(*,*) ' domax = ',domax !-First construct the vector (mupred - muobs)_iii iii=0 do i=1, size(analyses, dim=1) do ii=lbound(analyses(i)%peaks,dim=1),ubound(analyses(i)%peaks,dim=1) iii=iii+1 if(domax.ge.1) then v(iii) = analyses(i)%peaks(ii)%mu else v(iii) = analyses(i)%peaks(ii)%mu - analyses(i)%peaks(ii)%total_mu endif vmat(iii,1) = v(iii) enddo enddo ! Copy vector into global module vector (for later access) mu_vector = v call invmatrix(cov,invcov) call matmult(invcov,vmat,v2,N,1) !! write(*,*) "Calculating mu chi^2. domax = ", domax do i=1, N csq_mu(i) = v(i)*v2(i) !! write(*,*) i, analyses(i)%peaks(1)%total_mu,csq_mu(i) enddo !! write(*,*) "sum = ", sum(csq_mu(:)) deallocate(v,vmat,invcov,v2) end subroutine calculate_mu_chisq !------------------------------------------------------------------------------------ subroutine calculate_mh_chisq(csq_mh_out, ndf) !------------------------------------------------------------------------------------ ! use usefulbits_hs, only : peaklist use usefulbits, only : np, Hneut, vsmall use numerics, only : invmatrix, matmult integer, intent(out) :: ndf integer :: i, ii, iii, k, nH, N, Hindex double precision, allocatable :: v(:,:), invcov(:,:), v2(:), vmat(:,:) double precision, allocatable, intent(out) :: csq_mh_out(:,:) double precision :: m_av_iii, dm_av_iii if((pdf.eq.1).or.(pdf.eq.3)) then !-First, determine number of peaks: N = 0 do i=lbound(analyses,dim=1),ubound(analyses,dim=1) do j=lbound(analyses(i)%peaks,dim=1),ubound(analyses(i)%peaks,dim=1) N = N + 1 enddo enddo nH = np(Hneut) if(useaveragemass) then allocate(csq_mh_out(1,N)) else allocate(csq_mh_out(nH,N)) endif !-First, fill the chisq vector with zeros: csq_mh_out(:,:) = 0.0D0 iii=0 do i=lbound(analyses,dim=1),ubound(analyses,dim=1) do ii=lbound(analyses(i)%peaks,dim=1),ubound(analyses(i)%peaks,dim=1) iii=iii+1 if(useaveragemass) then call get_average_mass_for_peak(analyses(i)%peaks(ii)%Higgs_comb, & & analyses(i)%peaks(ii), m_av_iii, dm_av_iii) if(m_av_iii.gt.vsmall.and.analyses(i)%table%mhchisq.eq.1) then !!! BUG FIX (TS 03/02/2015) csq_mh_out(1,iii) = csq_mh(m_av_iii, analyses(i)%peaks(ii)%mpeak, dm_av_iii, & & analyses(i)%peaks(ii)%dm) endif else do k=1,nH Hindex = analyses(i)%peaks(ii)%Higgs_comb(k) if(Hindex.ne.0.and.analyses(i)%table%mhchisq.eq.1) then csq_mh_out(Hindex,iii) = csq_mh(analyses(i)%peaks(ii)%Higgses(Hindex)%m, & & analyses(i)%peaks(ii)%mpeak,analyses(i)%peaks(ii)%Higgses(Hindex)%dm, & & analyses(i)%peaks(ii)%dm) endif enddo endif enddo enddo else if(pdf.eq.2) then if(useaveragemass) then if(allocated(cov_mh_av)) deallocate(cov_mh_av) call create_covariance_matrix_mh_av(0) N = size(cov_mh_av,dim=1) allocate(v(1,N), v2(N), csq_mh_out(1,N), vmat(N,1)) do i=1,N v(1,i) = 0.0D0 enddo iii=0 do i=lbound(analyses,dim=1),ubound(analyses,dim=1) do ii=lbound(analyses(i)%peaks,dim=1),ubound(analyses(i)%peaks,dim=1) iii=iii+1 call get_average_mass_for_peak(analyses(i)%peaks(ii)%Higgs_comb, & & analyses(i)%peaks(ii), m_av_iii, dm_av_iii) if(m_av_iii.gt.0) then v(1,iii) = m_av_iii - analyses(i)%peaks(ii)%mpeak endif enddo enddo call invmatrix(cov_mh_av(:,:),invcov) vmat(:,1)=v(1,:) call matmult(invcov,vmat,v2,N,1) do i=1, N csq_mh_out(1,i) = v(1,i)*v2(i) enddo else if(allocated(cov_mhneut)) deallocate(cov_mhneut) call create_covariance_matrix_mhneut(0) nH = size(cov_mhneut,dim=1) N = size(cov_mhneut,dim=2) allocate(v(nH,N), v2(N), csq_mh_out(nH,N), vmat(N,1)) !-Construct the vector (mhpred - mhobs)_iii. Do this for every Higgs boson !-of the model. If the Higgs boson (Hindex) is not assigned to the peak, we set !-the entry of the vector to zero. !-First, fill the vectors with zeros: do k=1,nH do i=1,N v(k,i) = 0.0D0 enddo enddo do k=1,nH iii=0 do i=lbound(analyses,dim=1),ubound(analyses,dim=1) do ii=lbound(analyses(i)%peaks,dim=1),ubound(analyses(i)%peaks,dim=1) iii=iii+1 Hindex = analyses(i)%peaks(ii)%Higgs_comb(k) if(Hindex.ne.0) then v(Hindex,iii) = analyses(i)%peaks(ii)%Higgses(Hindex)%m - & & analyses(i)%peaks(ii)%mpeak endif enddo enddo enddo do k=1,nH !-n.b.: this loops now over Hindex call invmatrix(cov_mhneut(k,:,:),invcov) vmat(:,1)=v(k,:) ! call matmult(invcov,v(k,:),v2,N,1) call matmult(invcov,vmat,v2,N,1) do i=1, N csq_mh_out(k,i) = v(k,i)*v2(i) if(csq_mh_out(k,i).ge.0.00001D0) then !! write(*,*) "hello: ",k,i,v(k,i),sign(1.0D0,v(k,i)), csq_mh_out(k,i) endif enddo enddo endif deallocate(v,v2,vmat,invcov) endif if(useaveragemass) then !--Calculate additional chi^2 contribution from the mass separation iii=0 do i=lbound(analyses,dim=1),ubound(analyses,dim=1) do ii=lbound(analyses(i)%peaks,dim=1),ubound(analyses(i)%peaks,dim=1) iii=iii+1 if(analyses(i)%table%mhchisq.eq.1) then csq_mh_out(1,iii) = csq_mh_out(1,iii) + csq_mass_separation_weighted( & & analyses(i)%peaks(ii)%Higgs_comb, analyses(i)%peaks(ii)) endif enddo enddo endif ! write(*,*) "before deallocate csq_mh_out" ! deallocate(csq_mh_out) ! write(*,*) "after deallocate csq_mh_out" !--Determine number of observables ndf. This checks for each peak whether the mass !--resolution is less than a huge number and thus the chisq evaluation from the mass !--measurement is enabled. ndf=0 if(pdf.eq.2.or.pdf.eq.3) then do i=lbound(analyses,dim=1),ubound(analyses,dim=1) do ii=lbound(analyses(i)%peaks,dim=1),ubound(analyses(i)%peaks,dim=1) if(analyses(i)%table%mhchisq.eq.1) ndf=ndf+1 enddo enddo endif ! write(*,*) "End of subroutine calculate_mh_chisq." end subroutine calculate_mh_chisq !------------------------------------------------------------------------------------ subroutine create_covariance_matrix_mhneut(domax) !------------------------------------------------------------------------------------ use usefulbits, only : np, Hneut implicit none double precision :: dratesq, dmu0sq, dmtemp character(LEN=50) :: title integer, intent(in) :: domax ! = 0 or 1. If set to 1, then fill all off-diagonal elements ! with squared theoretical mass uncertainty, corresponding to ! a complete Higgs-to-peaks assignment integer :: Npeaks,i,ii,iii,j,jj,jjj,k,Hindex_i, Hindex_j !! write(*,*) "Create Higgs mass covariance matrix" Npeaks = 0 do i=lbound(analyses,dim=1),ubound(analyses,dim=1) do j=lbound(analyses(i)%peaks,dim=1),ubound(analyses(i)%peaks,dim=1) Npeaks = Npeaks + 1 enddo enddo if(domax.eq.0) then allocate(cov_mhneut(np(Hneut),Npeaks,Npeaks)) elseif(domax.eq.1) then allocate(cov_mhneut_max(np(Hneut),Npeaks,Npeaks)) else stop 'ERROR in subroutine create_covariance_matrix_mhneut. Specify domax correctly!' endif !-First, fill all elements of the covariance matrices with zero except the diagonal !-elements which contain the experimental mass resolution squared do k=1,np(Hneut) iii=0 do i=1, size(analyses) do ii=lbound(analyses(i)%peaks,dim=1),ubound(analyses(i)%peaks,dim=1) iii=iii+1 jjj=0 do j=1, size(analyses) do jj=lbound(analyses(j)%peaks,dim=1),ubound(analyses(j)%peaks,dim=1) jjj=jjj+1 if(domax.eq.0) cov_mhneut(k,iii,jjj) = 0.0D0 if(domax.eq.1) cov_mhneut_max(k,iii,jjj) = 0.0D0 if(iii.eq.jjj) then !-----Deactivate mh chisq contributions for those analysis which are tagged mhchisq==0 !-----by setting the uncertainty to a very large value. if(analyses(i)%table%mhchisq.eq.1) then if(domax.eq.0) cov_mhneut(k,iii,jjj) = analyses(i)%peaks(ii)%dm**2 if(domax.eq.1) cov_mhneut_max(k,iii,jjj) = analyses(i)%peaks(ii)%dm**2 else if(domax.eq.0) cov_mhneut(k,iii,jjj) = vlarge**2 if(domax.eq.1) cov_mhneut_max(k,iii,jjj) = vlarge**2 endif endif enddo enddo enddo enddo enddo !-Now, look for Higgs bosons shared by 2 peaks and fill the corresponding cov. matrix !-element with the theoretical uncertainty squared of this Higgs boson. do k=1,np(Hneut) iii=0 do i=1, size(analyses) do ii=lbound(analyses(i)%peaks,dim=1),ubound(analyses(i)%peaks,dim=1) iii=iii+1 jjj=0 do j=1, size(analyses) do jj=lbound(analyses(j)%peaks,dim=1),ubound(analyses(j)%peaks,dim=1) jjj=jjj+1 ! Hindex_i = analyses(i)%peaks(ii)%Higgs_comb(k) ! Hindex_j = analyses(j)%peaks(jj)%Higgs_comb(k) ! if((Hindex_i.eq.Hindex_j).and.(Hindex_i.ne.0).and.domax.eq.0) then if(int_in_array(k,analyses(i)%peaks(ii)%Higgs_comb).and.int_in_array(k, & & analyses(j)%peaks(jj)%Higgs_comb).and.domax.eq.0) then ! write(*,*) 'debug: k = ',k,', jjj = ',jjj,' comb1 =, ', & ! & analyses(i)%peaks(ii)%Higgs_comb,' comb2 = ',analyses(j)%peaks(jj)%Higgs_comb if(correlations_mh.or.(.not.correlations_mh.and.iii.eq.jjj)) then ! if(anticorrmh) then ! cov_mhneut(k,iii,jjj)=cov_mhneut(k,iii,jjj) + & !& sign(1.0D0,(analyses(i)%peaks(ii)%Higgses(k)%m-analyses(i)%peaks(ii)%mpeak))* & !& sign(1.0D0,(analyses(j)%peaks(jj)%Higgses(k)%m-analyses(j)%peaks(jj)%mpeak))* & !& analyses(i)%peaks(ii)%Higgses(k)%dm**2 ! else cov_mhneut(k,iii,jjj)=cov_mhneut(k,iii,jjj) + & & analyses(i)%peaks(ii)%Higgses(k)%dm**2 ! endif endif elseif(domax.eq.1) then if(correlations_mh.or.(.not.correlations_mh.and.iii.eq.jjj)) then ! !NEW TEST (sign dependence): ! if(anticorrmh) then ! cov_mhneut_max(k,iii,jjj)= cov_mhneut_max(k,iii,jjj) + & !& sign(1.0D0,(analyses(i)%peaks(ii)%Higgses(k)%m-analyses(i)%peaks(ii)%mpeak))* & !& sign(1.0D0,(analyses(j)%peaks(jj)%Higgses(k)%m-analyses(j)%peaks(jj)%mpeak))* & !& analyses(i)%peaks(ii)%Higgses(k)%dm**2 ! else cov_mhneut_max(k,iii,jjj)= cov_mhneut_max(k,iii,jjj) + & & analyses(i)%peaks(ii)%Higgses(k)%dm**2 ! endif endif endif enddo enddo enddo enddo enddo !! title = "mass covariance matrix for maximal assignment, first Higgs boson" !! if(domax.eq.1) call print_dble_matrix(cov_mhneut_max(1,:,:), title) ! title = "covariance matrix for mh1" ! call print_dble_matrix(cov_mhneut(1,:,:), title) ! title = "covariance matrix for mh2" ! call print_dble_matrix(cov_mhneut(2,:,:), title) !! title = "covariance matrix for signal strength mh3" !! call print_dble_matrix(cov_mhneut(3,:,:), title) end subroutine create_covariance_matrix_mhneut !------------------------------------------------------------------------------------ subroutine create_covariance_matrix_mh_av(domax) !------------------------------------------------------------------------------------ use usefulbits, only : np, Hneut implicit none double precision :: dratesq, dmu0sq, dmtemp character(LEN=50) :: title integer, intent(in) :: domax ! = 0 or 1. If set to 1, then fill all off-diagonal elements ! with squared theoretical mass uncertainty, corresponding to ! a complete Higgs-to-peaks assignment integer :: Npeaks,i,ii,iii,j,jj,jjj,k,Hindex_i, Hindex_j integer, dimension(np(Hneut)) :: ones double precision :: m_av_iii, m_av_jjj double precision :: dm_av_iii, dm_av_jjj ! write(*,*) "Create Higgs mass covariance matrix" ones = 1 Npeaks = 0 do i=lbound(analyses,dim=1),ubound(analyses,dim=1) do j=lbound(analyses(i)%peaks,dim=1),ubound(analyses(i)%peaks,dim=1) Npeaks = Npeaks + 1 enddo enddo if(domax.eq.0) then allocate(cov_mh_av(Npeaks,Npeaks)) elseif(domax.eq.1) then allocate(cov_mh_av_max(Npeaks,Npeaks)) else stop 'ERROR in subroutine create_covariance_matrix_mh_av. Specify domax correctly!' endif !-First, fill all elements of the covariance matrices with zero except the diagonal !-elements which contain the experimental mass resolution squared ! do k=1,np(Hneut) iii=0 do i=1, size(analyses) do ii=lbound(analyses(i)%peaks,dim=1),ubound(analyses(i)%peaks,dim=1) iii=iii+1 jjj=0 do j=1, size(analyses) do jj=lbound(analyses(j)%peaks,dim=1),ubound(analyses(j)%peaks,dim=1) jjj=jjj+1 if(domax.eq.0) cov_mh_av(iii,jjj) = 0.0D0 if(domax.eq.1) cov_mh_av_max(iii,jjj) = 0.0D0 if(iii.eq.jjj) then if(analyses(i)%table%mhchisq.eq.1) then if(domax.eq.0) cov_mh_av(iii,jjj) = analyses(i)%peaks(ii)%dm**2 if(domax.eq.1) cov_mh_av_max(iii,jjj) = analyses(i)%peaks(ii)%dm**2 else if(domax.eq.0) cov_mh_av(iii,jjj) = vlarge**2 if(domax.eq.1) cov_mh_av_max(iii,jjj) = vlarge**2 endif endif enddo enddo enddo enddo !enddo !-Now, look for Higgs bosons shared by 2 peaks and fill the corresponding cov. matrix !-element with the theoretical uncertainty squared of this Higgs boson. do k=1,np(Hneut) iii=0 do i=1, size(analyses) do ii=lbound(analyses(i)%peaks,dim=1),ubound(analyses(i)%peaks,dim=1) iii=iii+1 call get_average_mass_for_peak(analyses(i)%peaks(ii)%Higgs_comb, & & analyses(i)%peaks(ii), m_av_iii, dm_av_iii) ! write(*,*) "Higgs comb = ",analyses(i)%peaks(ii)%Higgs_comb," average mass = ",m_av_iii, dm_av_iii jjj=0 do j=1, size(analyses) do jj=lbound(analyses(j)%peaks,dim=1),ubound(analyses(j)%peaks,dim=1) jjj=jjj+1 call get_average_mass_for_peak(analyses(j)%peaks(jj)%Higgs_comb, & & analyses(j)%peaks(jj), m_av_jjj, dm_av_jjj) if(int_in_array(k,analyses(i)%peaks(ii)%Higgs_comb).and.int_in_array(k, & & analyses(j)%peaks(jj)%Higgs_comb).and.domax.eq.0) then if(correlations_mh.or.(.not.correlations_mh.and.iii.eq.jjj)) then ! if(anticorrmh) then ! cov_mh_av(iii,jjj)=cov_mh_av(iii,jjj) + & !& sign(1.0D0,(m_av_iii-analyses(i)%peaks(ii)%mpeak)) * & !& sign(1.0D0,(m_av_jjj-analyses(j)%peaks(jj)%mpeak)) * & !& analyses(i)%peaks(ii)%Higgses(k)%mu/analyses(i)%peaks(ii)%total_mu * & !& analyses(j)%peaks(jj)%Higgses(k)%mu/analyses(j)%peaks(jj)%total_mu * & !& dm_av_iii * dm_av_jjj ! else cov_mh_av(iii,jjj)=cov_mh_av(iii,jjj) + & & analyses(i)%peaks(ii)%Higgses(k)%mu/analyses(i)%peaks(ii)%total_mu * & & analyses(j)%peaks(jj)%Higgses(k)%mu/analyses(j)%peaks(jj)%total_mu * & & dm_av_iii * dm_av_jjj ! endif endif elseif (domax.eq.1) then if(correlations_mh.or.(.not.correlations_mh.and.iii.eq.jjj)) then call get_average_mass_for_peak(ones, analyses(i)%peaks(ii), m_av_iii, dm_av_iii) call get_average_mass_for_peak(ones, analyses(j)%peaks(jj), m_av_jjj, dm_av_jjj) ! if(anticorrmh) then ! cov_mh_av_max(iii,jjj)=cov_mh_av_max(iii,jjj) + & !& sign(1.0D0,(m_av_iii-analyses(i)%peaks(ii)%mpeak)) * & !& sign(1.0D0,(m_av_jjj-analyses(j)%peaks(jj)%mpeak)) * & !& analyses(i)%peaks(ii)%Higgses(k)%mu/analyses(i)%peaks(ii)%total_mu * & !& analyses(j)%peaks(jj)%Higgses(k)%mu/analyses(j)%peaks(jj)%total_mu * & !& dm_av_iii * dm_av_jjj ! else cov_mh_av_max(iii,jjj)=cov_mh_av_max(iii,jjj) + & & analyses(i)%peaks(ii)%Higgses(k)%mu/analyses(i)%peaks(ii)%total_mu * & & analyses(j)%peaks(jj)%Higgses(k)%mu/analyses(j)%peaks(jj)%total_mu * & & dm_av_iii * dm_av_jjj ! endif endif endif enddo enddo enddo enddo enddo ! title = "mass averaged covariance matrix" !! if(domax.eq.1) call print_dble_matrix(cov_mh_av_max(1,:,:), title) !! title = "covariance matrix for signal strength mh2" ! call print_dble_matrix(cov_mh_av(:,:), title) !! title = "covariance matrix for signal strength mh3" !! call print_dble_matrix(cov_mh_av(3,:,:), title) end subroutine create_covariance_matrix_mh_av !------------------------------------------------------------------------------------ subroutine correct_mu_uncertainty_of_peak(peak, table) ! The mu uncertainty as given in the mutable contains also systematic uncertainties for ! the luminosity and signal rate. These uncertainties are highly correlated to other ! analyses. Therefore, we subtract them here to obtain the intrinsic mu uncertainty of ! this peak. The correlated uncertainties enter later via the covariance matrix. !------------------------------------------------------------------------------------ use usefulbits_hs, only : usescalefactor, output_level,symmetricerrors,& & absolute_errors, THU_included!, withcorrexpsyst implicit none type(mupeak), intent(inout) :: peak type(mutable), intent(in) :: table ! double precision, intent(in) :: dlumi ! Uncertainty of Luminosity (relative) integer :: j double precision :: dcsq, dmulow0sq, dmuup0sq, allsystsq, dmuaverage, dmuaverage0sq, mu dcsq = 0 do j=1, peak%Nc dcsq = dcsq + peak%channel_systSM(j)**2 enddo if(absolute_errors) then mu=peak%mu_original else mu=peak%mu endif ! if(.not.symmetricerrors) then if(THU_included) then ! if(withcorrexpsyst) then ! allsystsq = 0.0D0 ! do j=lbound(table%correxpsyst,dim=1),ubound(table%correxpsyst,dim=1) ! allsystsq = allsystsq + table%correxpsyst(j)**2 ! enddo ! dmulow0sq = (peak%dmulow)**2-(allsystsq + dcsq)*mu**2 ! dmuup0sq = (peak%dmuup)**2-(allsystsq + dcsq)*mu**2 ! else dmulow0sq = (peak%dmulow)**2-(table%dlumi*mu)**2-dcsq*mu**2 dmuup0sq = (peak%dmuup)**2-(table%dlumi*mu)**2-dcsq*mu**2 ! endif else !- In the case of future projections we usually use measurements !- without theoretical uncertainty included: dmulow0sq = (peak%dmulow)**2 dmuup0sq = (peak%dmuup)**2 endif if(usescalefactor) then dmulow0sq = peak%scale_mu**2*dmulow0sq dmuup0sq = peak%scale_mu**2*dmuup0sq endif if(.not.symmetricerrors) then peak%dmulow0sq = dmulow0sq peak%dmuup0sq = dmuup0sq else if(peak%dmulow0sq.lt.0.0d0.or.peak%dmuup0sq.lt.0.0d0) then write(*,*) "WARNING: squared intrinsic mu uncertainty is negative!" endif peak%dmulow0sq = (sqrt(abs(dmulow0sq))+sqrt(abs(dmuup0sq)))**2/4.0d0 peak%dmuup0sq = (sqrt(abs(dmulow0sq))+sqrt(abs(dmuup0sq)))**2/4.0d0 endif ! else ! dmuaverage = (peak%dmulow+peak%dmuup)/2. ! if(withcorrexpsyst) then ! allsystsq = 0.0D0 ! do j=lbound(table%correxpsyst,dim=1),ubound(table%correxpsyst,dim=1) ! allsystsq = allsystsq + table%correxpsyst(j)**2 ! enddo ! dmuaverage0sq = (dmuaverage)**2-(allsystsq + dcsq)*peak%mu**2 ! else ! dmuaverage0sq = (dmuaverage)**2-(table%dlumi*peak%mu)**2-dcsq*peak%mu**2 ! endif ! if(usescalefactor) then ! dmuaverage0sq = peak%scale_mu**2*dmuaverage0sq ! endif ! peak%dmulow0sq = dmuaverage0sq ! peak%dmuup0sq = dmuaverage0sq ! endif ! if(output_level.ne.0) then if(peak%dmulow0sq.lt.0.0D0) then write(*,*) "WARNING: Negative intrinsic (lower) error squared for observable ID = ",& peak%ID,", with value ",peak%dmulow0sq endif if(peak%dmuup0sq.lt.0.0D0) then write(*,*) "WARNING: Negative intrinsic (upper) error squared for observable ID = ",& peak%ID,", with value ",peak%dmuup0sq endif ! endif !! write(*,*) "Original / Corrected uncertainties (low): ",peak%dmulow, sqrt(dmulow0sq) !! write(*,*) "Original / Corrected uncertainties (up): ",peak%dmuup, sqrt(dmuup0sq) end subroutine correct_mu_uncertainty_of_peak !------------------------------------------------------------------------------------ subroutine create_covariance_matrix_mu(domax) !------------------------------------------------------------------------------------ use usefulbits_hs, only : withcorrexpsyst, absolute_errors, corrlist use expt_syst, only : get_expt_syst_corr_for_peaks implicit none integer, intent(in) :: domax ! if 1, then use predicted mu == 0 double precision :: dratesq, dmu0sq, s1, s2, mu_iii, mu_jjj, corrsyst, corrsystSM double precision :: obs1dmu0sq,obs2dmu0sq integer :: Npeaks integer :: i,ii,iii,j,jj,jjj,k character(LEN=50) :: title logical :: corr integer csqmax ! write(*,*) "Creating mu covariance matrix..." !---TRY TO EVALUATE THE MAX CHISQ WITHOUT CORRELATIONS---! if(domax.eq.1) then csqmax = 1 corr=correlations_mu elseif(domax.eq.2) then csqmax = 1 corr=.False. else csqmax = 0 corr=correlations_mu endif !--------------------------------------------------------! Npeaks = 0 do i=lbound(analyses,dim=1),ubound(analyses,dim=1) Npeaks = Npeaks + analyses(i)%Npeaks enddo allocate(cov(Npeaks,Npeaks)) iii=0 !--Loop twice over all peaks to construct matrix do i=1, size(analyses) do ii=lbound(analyses(i)%peaks,dim=1),ubound(analyses(i)%peaks,dim=1) iii=iii+1 if(absolute_errors) then mu_iii=analyses(i)%peaks(ii)%mu_original else mu_iii=analyses(i)%peaks(ii)%mu endif jjj=0 do j=1, size(analyses) do jj=lbound(analyses(j)%peaks,dim=1),ubound(analyses(j)%peaks,dim=1) jjj=jjj+1 if(absolute_errors) then mu_jjj=analyses(j)%peaks(jj)%mu_original else mu_jjj=analyses(j)%peaks(jj)%mu endif if(usescalefactor) then s1 = analyses(i)%peaks(ii)%scale_mu s2 = analyses(j)%peaks(jj)%scale_mu else s1 = 1.0D0 s2 = 1.0D0 endif cov(iii,jjj)=0.0D0 if(corr.or.(.not.corr.and.iii.eq.jjj)) then call get_rate_uncertainties_sq_peaks(dratesq,analyses(i)%peaks(ii),& & analyses(j)%peaks(jj),analyses(i)%table%collider, analyses(i)%table%energy,& & analyses(j)%table%collider, analyses(j)%table%energy) ! write(*,*) "... done with getting rate uncertainties..." if(anticorrmu) then !-----Treat luminosity uncertainty as correlated systematic error if same collaboration: if(analyses(i)%table%collaboration.eq.analyses(j)%table%collaboration) then cov(iii,jjj)=cov(iii,jjj)+(s1*analyses(i)%table%dlumi*s2*analyses(j)%table%dlumi)& & *(mu_iii*mu_jjj) endif corrsyst=0.0D0 !------Include correlated experimental systematic uncertainties (TS 2013-11-21) if(withcorrexpsyst) then ! write(*,*) "... getting exp syst corr... " if(iii.eq.jjj) then call get_expt_syst_corr_for_peaks(corrsystSM, analyses(i)%peaks(ii),& & mu_iii, analyses(j)%peaks(jj),mu_jjj, 0) cov(iii,jjj)=cov(iii,jjj) - corrsystSM endif call get_expt_syst_corr_for_peaks(corrsyst, analyses(i)%peaks(ii),& & mu_iii, analyses(j)%peaks(jj),mu_jjj, 1) cov(iii,jjj)=cov(iii,jjj) + corrsyst endif ! write(*,*) "... done!" !------ if(useSMweights) then cov(iii,jjj)=cov(iii,jjj)+ & & (dratesq)*(analyses(i)%peaks(ii)%mu*analyses(j)%peaks(jj)%mu) else cov(iii,jjj)=cov(iii,jjj)+ & & (dratesq)*(analyses(i)%peaks(ii)%total_mu*analyses(j)%peaks(jj)%total_mu) endif ! write(*,*) "... done with mode anticorrmu=True..." else ! anticorrmu=.False. !-----Treat luminosity uncertainty as correlated systematic error if same collaboration: if(analyses(i)%table%collaboration.eq.analyses(j)%table%collaboration) then cov(iii,jjj)=cov(iii,jjj)+(s1*analyses(i)%table%dlumi*s2*analyses(j)%table%dlumi)& & *abs(mu_iii*mu_jjj) endif if(useSMweights) then cov(iii,jjj)=cov(iii,jjj)+ & & (dratesq)*(analyses(i)%peaks(ii)%mu*analyses(j)%peaks(jj)%mu) else cov(iii,jjj)=cov(iii,jjj)+ & & (dratesq)*(analyses(i)%peaks(ii)%total_mu*analyses(j)%peaks(jj)%total_mu) endif ! write(*,*) "... done with mode anticorrmu=False..." endif endif !----Add the intrinsic (uncorrelated) uncertainty of this peak to the diagonal elements: if(iii.eq.jjj) then call get_dmu0sq_peak(dmu0sq,analyses(i)%peaks(ii),csqmax) cov(iii,jjj) = cov(iii,jjj) + dmu0sq endif !----NEW: Replace covariance matrix elements by official numbers if provided! do k= lbound(corrlist,dim=1),ubound(corrlist,dim=1) if((corrlist(k)%obsID1==analyses(i)%peaks(ii)%id.and.& & corrlist(k)%obsID2==analyses(j)%peaks(jj)%id).or.& & (corrlist(k)%obsID2==analyses(i)%peaks(ii)%id.and.& & corrlist(k)%obsID1==analyses(j)%peaks(jj)%id)) then call get_dmu0sq_peak(obs1dmu0sq,analyses(i)%peaks(ii),csqmax) call get_dmu0sq_peak(obs2dmu0sq,analyses(j)%peaks(jj),csqmax) cov(iii,jjj) = corrlist(k)%corr*sqrt(obs1dmu0sq)*sqrt(obs2dmu0sq) endif enddo ! write(*,*) iii,jjj, cov(iii,jjj) enddo enddo enddo enddo ! write(*,*) "... done!" !! write(*,*) "signal strength covariance matrix:" !! do iii=lbound(cov,dim=1),ubound(cov,dim=1) !! write(*,*) "(",iii,",",iii,") = ",cov(iii,iii) !! enddo end subroutine create_covariance_matrix_mu !------------------------------------------------------------------------------------ subroutine get_rate_uncertainties_sq_peaks_old(dratesq, peak1, peak2) ! Returns the sum of the squared theoretical uncertainties of the common ! production and decay rates of the two peak observables. !------------------------------------------------------------------------------------ use usefulbits_HS, only : mupeak, delta_rate, useSMweights type(mupeak), intent(in) :: peak1, peak2 double precision, intent(out) :: dratesq integer :: i,j,p1,d1,p2,d2 !id1,id2 double precision :: res res=0.0D0 do i=1,peak1%Nc do j=1,peak2%Nc p1 = peak1%channel_p_id(i) d1 = peak1%channel_d_id(i) p2 = peak2%channel_p_id(j) d2 = peak2%channel_d_id(j) ! id1 = peak1%channel_id(i) ! p1 = int((id1-modulo(id1,10))/dble(10)) ! d1 = modulo(id1,10) ! id2 = peak2%channel_id(j) ! p2 = int((id2-modulo(id2,10))/dble(10)) ! d2 = modulo(id2,10) ! if(p1.eq.p2) res=res+delta_rate%dCS(p1)**2*peak1%channel_w(i)*peak2%channel_w(j) ! if(d1.eq.d2) res=res+delta_rate%dBR(d1)**2*peak1%channel_w(i)*peak2%channel_w(j) if(p1.eq.p2) then if(useSMweights) then res=res+delta_rate%dCS(p1)**2*peak1%channel_w(i)*peak2%channel_w(j) else res=res+delta_rate%dCS(p1)**2*peak1%channel_w_model(i)*peak2%channel_w_model(j) endif endif if(d1.eq.d2) then if(useSMweights) then res=res+delta_rate%dBR(d1)**2*peak1%channel_w(i)*peak2%channel_w(j) else res=res+delta_rate%dBR(d1)**2*peak1%channel_w_model(i)*peak2%channel_w_model(j) endif endif enddo enddo dratesq=res end subroutine get_rate_uncertainties_sq_peaks_old !------------------------------------------------------------------------------------ subroutine get_rate_uncertainties_sq_peaks(dratesq, peak1, peak2, collider1, & energy1, collider2, energy2) ! Returns the sum of the squared theoretical uncertainties of the common ! production and decay rates of the two peak observables. !------------------------------------------------------------------------------------ use usefulbits_HS, only : mupeak, delta_rate, useSMweights use usefulbits, only : small type(mupeak), intent(in) :: peak1, peak2 character(LEN=*), intent(in) :: collider1, collider2 double precision, intent(in) :: energy1, energy2 double precision, intent(out) :: dratesq integer :: i,j,id1,p1,d1,id2,p2,d2 double precision :: res,drcov1,drcov2,drsign !, delta res=0.0D0 ! write(*,*) "... getting rate uncertainties..." ! delta=0.0D0 do i=1,peak1%Nc do j=1,peak2%Nc p1 = peak1%channel_p_id(i) d1 = peak1%channel_d_id(i) p2 = peak2%channel_p_id(j) d2 = peak2%channel_d_id(j) ! write(*,*) p1, p2, d1, d2 ! id1 = peak1%channel_id(i) ! p1 = int((id1-modulo(id1,10))/dble(10)) ! d1 = modulo(id1,10) ! id2 = peak2%channel_id(j) ! p2 = int((id2-modulo(id2,10))/dble(10)) ! d2 = modulo(id2,10) ! if(p1.eq.p2) res=res+delta_rate%dCS(p1)**2*peak1%channel_w(i)*peak2%channel_w(j) ! if(d1.eq.d2) res=res+delta_rate%dBR(d1)**2*peak1%channel_w(i)*peak2%channel_w(j) if((p1.gt.0).and.(p2.gt.0)) then if(collider1.ne.'ILC'.and.collider2.ne.'ILC') then if(delta_rate%CScov_ok.and.delta_rate%usecov) then !-- (TS 29/03/2017) Select the correct covariance matrix for the XS: if(abs(energy1-13.0d0).lt.small) then drcov1=delta_rate%CS13cov(p1,p2) else drcov1=delta_rate%CScov(p1,p2) endif drsign = sign(1.0d0,drcov1) if(abs(energy2-13.0d0).lt.small) then drcov2=delta_rate%CS13cov(p1,p2) drsign = sign(1.0d0,drcov2) ! Only overwrite sign when second peak is 13 TeV observable else drcov2=delta_rate%CScov(p1,p2) endif ! write(*,*) "done with getting the covariance matrix elements..." !-- if(useSMweights) then ! res=res+delta_rate%CScov(p1,p2)*peak1%channel_w(i)*peak2%channel_w(j) res=res+drsign*sqrt(abs(drcov1*drcov2))*peak1%channel_w(i)*peak2%channel_w(j) else ! res=res+delta_rate%CScov(p1,p2)*peak1%channel_w_model(i)*peak2%channel_w_model(j) res=res+drsign*sqrt(abs(drcov1*drcov2))*peak1%channel_w_model(i)*peak2%channel_w_model(j) endif else if(p1.eq.p2) then if(useSMweights) then res=res+delta_rate%dCS(p1)**2*peak1%channel_w(i)*peak2%channel_w(j) else res=res+delta_rate%dCS(p1)**2*peak1%channel_w_model(i)*peak2%channel_w_model(j) endif endif endif else if(collider1.eq.'ILC'.and.collider2.eq.'ILC') then if(p1.eq.p2) then if(useSMweights) then res=res+delta_rate%dCS_ILC(p1)**2*peak1%channel_w(i)*peak2%channel_w(j) else res=res+delta_rate%dCS_ILC(p1)**2*peak1%channel_w_model(i)*peak2%channel_w_model(j) endif endif endif endif ! if(collider1.ne.'ILC'.and.collider2.ne.'ILC') then ! delta=delta_rate%dCS(p1) ! else !---Set the theoretical uncertainty of production mode to zero if collider==ILC ! delta=0.0D0 ! endif ! if(useSMweights) then ! res=res+delta**2*peak1%channel_w(i)*peak2%channel_w(j) ! else ! res=res+delta**2*peak1%channel_w_model(i)*peak2%channel_w_model(j) ! endif ! endif ! write(*,*) "...getting decay rate uncertainties..." if((d1.gt.0).and.(d2.gt.0)) then if(delta_rate%BRcov_ok.and.delta_rate%usecov) then if(useSMweights) then res=res+delta_rate%BRcov(d1,d2)*peak1%channel_w(i)*peak2%channel_w(j) else res=res+delta_rate%BRcov(d1,d2)*peak1%channel_w_model(i)*peak2%channel_w_model(j) endif else if(d1.eq.d2) then if(useSMweights) then res=res+delta_rate%dBR(d1)**2*peak1%channel_w(i)*peak2%channel_w(j) else res=res+delta_rate%dBR(d1)**2*peak1%channel_w_model(i)*peak2%channel_w_model(j) endif endif endif endif ! write(*,*) "...done!" enddo enddo dratesq=res end subroutine get_rate_uncertainties_sq_peaks !------------------------------------------------------------------------------------ subroutine get_cov_mu(matrix) !------------------------------------------------------------------------------------ implicit none double precision, dimension(:,:), intent(out) :: matrix if(allocated(cov)) then if(size(cov,dim=1).eq.size(matrix,dim=1).and.size(cov,dim=2).eq.size(matrix,dim=2)) then ! allocate(matrix(size(cov,dim=1),size(cov,dim=2))) matrix = cov else write(*,*) "WARNING in subroutine get_cov_mu: different dimensions." endif else write(*,*) "WARNING in subroutine get_cov_mu: cov not allocated." endif end subroutine get_cov_mu !------------------------------------------------------------------------------------ subroutine get_cov_mh(Hindex,matrix) !------------------------------------------------------------------------------------ implicit none double precision, dimension(:,:), intent(out) :: matrix integer, intent(in) :: Hindex if(allocated(cov_mhneut)) then if(size(cov_mhneut,dim=2).eq.size(matrix,dim=1)& & .and.size(cov_mhneut,dim=3).eq.size(matrix,dim=2)) then if(Hindex.ge.lbound(cov_mhneut,dim=1).and.Hindex.le.ubound(cov_mhneut,dim=1)) then matrix = cov_mhneut(Hindex,:,:) else write(*,*) "WARNING in subroutine get_cov_mh: Hindex not in range." endif else write(*,*) "WARNING in subroutine get_cov_mh: different dimensions." endif else write(*,*) "WARNING in subroutine get_cov_mh: cov not allocated." endif end subroutine get_cov_mh !------------------------------------------------------------------------------------ subroutine print_cov_mu_to_file use usefulbits, only : file_id_common3 implicit none character(LEN=20):: formatstring open(file_id_common3, file='cov_mu.txt', form='formatted') write(formatstring,'(A1,I2,A7)') '(',size(cov,dim=2),'F20.10)' do i=lbound(cov,dim=1),ubound(cov,dim=1) write(file_id_common3, formatstring) cov(i,:) enddo close(file_id_common3) end subroutine print_cov_mu_to_file !------------------------------------------------------------------------------------ subroutine print_corr_mu_to_file use usefulbits, only : file_id_common3 implicit none character(LEN=20):: formatstring open(file_id_common3, file='corr_mu.txt', form='formatted') write(formatstring,'(A1,I2,A7)') '(',size(cov,dim=2),'F20.10)' do i=lbound(cov,dim=1),ubound(cov,dim=1) ! TS fix 14/08/2013: Took square root of this! write(file_id_common3, formatstring) (cov(i,j)/sqrt(cov(i,i)*cov(j,j)), & & j=lbound(cov,dim=2),ubound(cov,dim=2)) enddo close(file_id_common3) end subroutine print_corr_mu_to_file !------------------------------------------------------------------------------------ subroutine print_inverse_cov_mu_to_file use usefulbits, only : file_id_common3 implicit none character(LEN=20):: formatstring double precision, allocatable :: invcov(:,:) allocate(invcov(size(cov,dim=1),size(cov,dim=2))) call invmatrix(cov,invcov) open(file_id_common3, file='inverse_cov_mu.txt', form='formatted') write(formatstring,'(A1,I2,A7)') '(',size(invcov,dim=2),'F20.10)' do i=lbound(invcov,dim=1),ubound(invcov,dim=1) write(file_id_common3, formatstring) invcov(i,:) enddo close(file_id_common3) open(file_id_common3, file='mu_vector.txt', form='formatted') do i=lbound(mu_vector,dim=1),ubound(mu_vector,dim=1) write(file_id_common3, '(1F20.10)') mu_vector(i) enddo close(file_id_common3) end subroutine print_inverse_cov_mu_to_file !------------------------------------------------------------------------------------ subroutine print_inverse_cov_mh_to_file(Hindex) use usefulbits, only : file_id_common3 implicit none character(LEN=20):: formatstring, filename integer, intent(in) :: Hindex double precision, allocatable :: invcov(:,:) allocate(invcov(size(cov_mhneut,dim=2),size(cov_mhneut,dim=3))) if(useaveragemass) then call invmatrix(cov_mh_av(:,:),invcov) open(file_id_common3, file='inverse_cov_mh_average.txt', form='formatted') write(formatstring,'(A1,I2,A7)') '(',size(invcov,dim=2),'F20.10)' do i=lbound(invcov,dim=1),ubound(invcov,dim=1) write(file_id_common3, formatstring) invcov(i,:) enddo close(file_id_common3) else call invmatrix(cov_mhneut(Hindex,:,:),invcov) write(filename,'(A14,I1,A4)') 'inverse_cov_mh',Hindex,'.txt' open(file_id_common3, file=trim(adjustl(filename)), form='formatted') write(formatstring,'(A1,I2,A7)') '(',size(invcov,dim=2),'F20.10)' do i=lbound(invcov,dim=1),ubound(invcov,dim=1) write(file_id_common3, formatstring) invcov(i,:) enddo close(file_id_common3) endif end subroutine print_inverse_cov_mh_to_file !------------------------------------------------------------------------------------ subroutine print_cov_mh_to_file(Hindex) use usefulbits, only : file_id_common3 implicit none character(LEN=20):: formatstring, filename integer, intent(in) :: Hindex if(useaveragemass) then write(filename,'(A10)') 'cov_mh.txt' open(file_id_common3, file=trim(adjustl(filename)), form='formatted') write(formatstring,'(A1,I2,A7)') '(',size(cov_mh_av,dim=2),'F20.10)' do i=lbound(cov_mh_av,dim=1),ubound(cov_mh_av,dim=1) write(file_id_common3, formatstring) cov_mh_av(i,:) enddo close(file_id_common3) else write(filename,'(A6,I1,A4)') 'cov_mh',Hindex,'.txt' open(file_id_common3, file=trim(adjustl(filename)), form='formatted') write(formatstring,'(A1,I2,A7)') '(',size(cov_mhneut,dim=3),'F20.10)' do i=lbound(cov_mhneut,dim=2),ubound(cov_mhneut,dim=2) write(file_id_common3, formatstring) cov_mhneut(Hindex,i,:) enddo close(file_id_common3) endif end subroutine print_cov_mh_to_file !------------------------------------------------------------------------------------ subroutine print_peakinformation !------------------------------------------------------------------------------------ ! use usefulbits_HS, only : peaklist implicit none do i=lbound(analyses,dim=1),ubound(analyses,dim=1) do j=lbound(analyses(i)%peaks,dim=1),ubound(analyses(i)%peaks,dim=1) write(*,*) write(*,*)'#*************************************************************************#' write(*,'(A,I3,A,I3,A)') ' # Analysis ',i, & & ' Peak ',j,' #' write(*,*)'#*************************************************************************#' write(*,'(A25,1I10)') 'ID =', analyses(i)%id write(*,'(A25,4X,A3)') 'Collaboration =', analyses(i)%table%collaboration write(*,'(A25,1F10.2)') 'Energy =', analyses(i)%table%energy write(*,'(A25,4X,A100)') 'Reference =', analyses(i)%table%label write(*,'(A25,4X,A100)') 'Description =', analyses(i)%table%desc write(*,'(A25,1F10.3)') 'mass resolution =',analyses(i)%table%deltam write(*,'(A25,1F10.3)') 'peak mass =',analyses(i)%peaks(j)%mpeak write(*,'(A25,1F10.4)') 'peak mu =',analyses(i)%peaks(j)%mu write(*,'(A25,2F10.4)') 'cyan band(low,high) =',analyses(i)%peaks(j)%dmulow, & & analyses(i)%peaks(j)%dmuup ! write(*,'(A25,2F10.4)') 'dmu0 (low,high) =',analyses(i)%peaks(j)%dmulow0, & !& analyses(i)%peaks(j)%dmuup0 write(*,'(A25,4X,$)') 'Higgs combination =' do k=lbound(analyses(i)%peaks(j)%Higgs_comb,dim=1), & & ubound(analyses(i)%peaks(j)%Higgs_comb,dim=1) write(*,'(1I3,$)') analyses(i)%peaks(j)%Higgs_comb(k) enddo write(*,*) write(*,'(A25,7X,1I3)') 'Dominant Higgs =',analyses(i)%peaks(j)%domH write(*,'(A25,1F10.4)'), 'Total pred. mu =',analyses(i)%peaks(j)%total_mu write(*,'(A25,1F15.9)'), 'Chisq for mu =',analyses(i)%peaks(j)%chisq_mu write(*,'(A25,1F15.9)'), 'Chisq for mh =',analyses(i)%peaks(j)%chisq_mh write(*,'(A25,1F15.9)'), 'Chisq (total) =',analyses(i)%peaks(j)%chisq_tot write(*,'(A25,1F15.9)'), 'Chisq (max) =',analyses(i)%peaks(j)%chisq_max write(*,*)'#------------------------ Channel information ----------------------------#' write(*,*) ' p,d-ID prod. decay mu weight syst.err. ' write(*,*)'#-------------------------------------------------------------------------#' do k=1, analyses(i)%peaks(j)%Nc write(*,'(2I5,5X,2A,3F15.6)') analyses(i)%peaks(j)%channel_p_id(k),& & analyses(i)%peaks(j)%channel_d_id(k),& & analyses(i)%table%channel_description(k,:),& & analyses(i)%peaks(j)%channel_mu(k),analyses(i)%peaks(j)%channel_w_model(k),& & analyses(i)%peaks(j)%channel_syst(k) enddo write(*,*)'#-------------------------------------------------------------------------#' enddo enddo end subroutine print_peakinformation !------------------------------------------------------------------------------------ subroutine print_peakinformation_essentials !------------------------------------------------------------------------------------ !x use usefulbits_HS, only : peaklist implicit none do i=lbound(analyses,dim=1),ubound(analyses,dim=1) do j=lbound(analyses(i)%peaks,dim=1),ubound(analyses(i)%peaks,dim=1) write(*,*) write(*,*)'#*************************************************************************#' write(*,'(A,I3,A,I3,A)') ' # Analysis ',i, & & ' Peak ',j,' #' write(*,*)'#*************************************************************************#' write(*,'(A25,1I10)') 'ID =', analyses(i)%id write(*,'(A25,7X,A3)') 'Collaboration =', analyses(i)%table%collaboration write(*,'(A25,4X,F6.2)') 'cms energy =', analyses(i)%table%energy write(*,'(A25,4X,A100)') 'Reference =', analyses(i)%table%label write(*,'(A25,4X,A100)') 'Description =', analyses(i)%table%desc write(*,'(A25,1F10.2)') 'mass resolution =',analyses(i)%table%deltam write(*,'(A25,1F10.2)') 'peak mass =',analyses(i)%peaks(j)%mpeak write(*,'(A25,1F10.4)') 'peak mu =',analyses(i)%peaks(j)%mu write(*,'(A25,2F10.4)') 'cyan band(low,high) =',analyses(i)%peaks(j)%dmulow, & & analyses(i)%peaks(j)%dmuup write(*,*)'#------------------------ Channel information ----------------------------#' write(*,*)' p,d-ID prod. decay efficiency' write(*,*)'#-------------------------------------------------------------------------#' do k=1, analyses(i)%peaks(j)%Nc write(*,'(2I5,5X,2A,1F15.6)') analyses(i)%peaks(j)%channel_p_id(k), & & analyses(i)%peaks(j)%channel_d_id(k),& & analyses(i)%table%channel_description(k,:),analyses(i)%table%channel_eff(k) enddo write(*,*)'#-------------------------------------------------------------------------#' enddo enddo end subroutine print_peakinformation_essentials !------------------------------------------------------------------------------------ subroutine print_peaks_to_file !------------------------------------------------------------------------------------ use usefulbits, only : file_id_common3 use usefulbits_hs, only : StrCompress implicit none character(LEN=100) :: formatspec integer :: kk kk=0 formatspec='(I3,7X,I10,1X,F6.2,1X,4F8.4,1X,A3,1X,F6.2,1X,F6.2,1X,I3,1X,A,5X,A)' open(file_id_common3,file="peak_information.txt") write(file_id_common3,*) "#HiggsSignals-"//trim(adjustl(HSvers))// & & " with experimental dataset '"//trim(adjustl(Exptdir))//"'" write(file_id_common3,*) "#Number Analysis-ID mh_obs mu_obs dmu_low dmu_high ", & & "dmh_exp collaboration energy luminosity description reference" write(file_id_common3,*) "#" do i=lbound(analyses,dim=1),ubound(analyses,dim=1) do j=lbound(analyses(i)%peaks,dim=1),ubound(analyses(i)%peaks,dim=1) kk=kk+1 write(file_id_common3,formatspec)kk,analyses(i)%id,analyses(i)%peaks(j)%mpeak, & & analyses(i)%peaks(j)%mu, analyses(i)%peaks(j)%dmulow,analyses(i)%peaks(j)%dmuup, & & analyses(i)%table%deltam,analyses(i)%table%collaboration, analyses(i)%table%energy, & & analyses(i)%table%lumi, analyses(i)%table%mhchisq, & & trim(strcompress(analyses(i)%table%desc)), analyses(i)%table%label enddo enddo close(file_id_common3) end subroutine print_peaks_to_file !------------------------------------------------------------------------------------ subroutine print_peaks_to_LaTeX !------------------------------------------------------------------------------------ use usefulbits, only : file_id_common3 use usefulbits_hs, only : StrCompress implicit none character(LEN=100) :: formatspec integer :: kk, N, ii, id, p double precision :: weights(5) = (/ 0.0D0, 0.0D0,0.0D0,0.0D0,0.0D0 /) kk=0 open(file_id_common3,file="peak_information.tex") write(file_id_common3,*) "\begin{tabular}{lcrrrrr}" write(file_id_common3,*) "\hline" write(file_id_common3,*) "Analysis & Signal strength & \multicolumn{5}{c}{Signal contamination [in \%]} \\" write(file_id_common3,*) "& & ggH & VBF & WH & ZH & $t\bar{t}H$ \\" write(file_id_common3,*) "\hline" do i=lbound(analyses,dim=1),ubound(analyses,dim=1) do j=lbound(analyses(i)%peaks,dim=1),ubound(analyses(i)%peaks,dim=1) kk=kk+1 N = analyses(i)%peaks(j)%Nc weights = (/ 0.0D0, 0.0D0,0.0D0,0.0D0,0.0D0 /) do ii=1,N ! id = analyses(i)%peaks(j)%channel_id(ii) ! p = int((id-modulo(id,10))/dble(10)) p = analyses(i)%peaks(j)%channel_p_id(ii) if(p.le.5) then weights(p) = analyses(i)%peaks(j)%channel_w_model(ii) else write(*,*) "Warning: print_peaks_to_LaTeX only outputs information for the five main production channels!" endif enddo ! write(formatspec,"(A,I1,A,I1,A)") '(A3,1X,A,A,A,A,A,F6.2,A,F6.2,A,F6.2,A,F6.1,A,F6.1,A,F6.1,A,F6.1,A,F6.1,A,',N,'I3)' write(formatspec,"(A,I1,A,I1,A)") '(A3,1X,A,A,A,A,A,F6.2,A,F6.2,A,F6.2,A,F6.1,A,F6.1,A,F6.1,A,F6.1,A,F6.1,A)' write(file_id_common3,formatspec) analyses(i)%table%collaboration, & & "$",trim(strcompress(analyses(i)%table%desc)), "$~\cite{", & & trim(strcompress(analyses(i)%table%label)),"} & $", & & analyses(i)%peaks(j)%mu, "\substack{+",analyses(i)%peaks(j)%dmuup,"\\ -",& & abs(analyses(i)%peaks(j)%dmulow),"}$ & $",100*weights(1),"$ & $",100*weights(2),& & "$ & $",100*weights(3),"$ & $",100*weights(4),"$ & $",100*weights(5),"$\\" enddo enddo write(file_id_common3,*) "\hline" write(file_id_common3,*) "\end{tabular}" end subroutine print_peaks_to_LaTeX !------------------------------------------------------------------------------------ subroutine print_peaks_signal_rates_to_file !------------------------------------------------------------------------------------ use usefulbits, only : file_id_common3 use usefulbits_hs, only : HSres implicit none character(LEN=100) :: formatspec,formatspec2 integer :: kk double precision :: mh_pull, mu_pull, dmu kk=0 formatspec='(I3,7X,I10,1X,4F8.2,1X,6F10.4)' formatspec2='(I3,7X,I10,1X,2F8.2,1X,A7,1X,A7,1X,A7,1X,5F10.4)' open(file_id_common3,file="peak_massesandrates.txt") write(file_id_common3,*) "#HiggsSignals-"//trim(adjustl(HSvers))// & & " with experimental dataset '"//trim(adjustl(Exptdir))//"'" write(file_id_common3,*) "#pull = (predicted - observed)/(gaussian uncertainty)" write(file_id_common3,*) "#Number Analysis-ID mh_obs dmh_exp mh_pred dmh_theo mh_pull",& & " mu_obs dmu_low dmu_high mu_pred mu_pull" write(file_id_common3,*) "#" do i=lbound(analyses,dim=1),ubound(analyses,dim=1) do j=lbound(analyses(i)%peaks,dim=1),ubound(analyses(i)%peaks,dim=1) kk=kk+1 if(analyses(i)%peaks(j)%domH.ne.0) then mh_pull = (analyses(i)%peaks(j)%Higgses(analyses(i)%peaks(j)%domH)%m - & & analyses(i)%peaks(j)%mpeak)/ & & sqrt(analyses(i)%table%deltam**2+ & & analyses(i)%peaks(j)%Higgses(analyses(i)%peaks(j)%domH)%dm**2) endif call get_dmu_peak(dmu,analyses(i)%peaks(j)) mu_pull = (analyses(i)%peaks(j)%total_mu - analyses(i)%peaks(j)%mu)/dmu if(analyses(i)%peaks(j)%domH.ne.0) then write(file_id_common3,formatspec)kk,analyses(i)%id,analyses(i)%peaks(j)%mpeak, & & analyses(i)%table%deltam, analyses(i)%peaks(j)%Higgses(analyses(i)%peaks(j)%domH)%m, & & analyses(i)%peaks(j)%Higgses(analyses(i)%peaks(j)%domH)%dm, mh_pull, & & analyses(i)%peaks(j)%mu, analyses(i)%peaks(j)%dmulow,analyses(i)%peaks(j)%dmuup, & & analyses(i)%peaks(j)%total_mu, mu_pull else write(file_id_common3,formatspec2)kk,analyses(i)%id,analyses(i)%peaks(j)%mpeak, & & analyses(i)%table%deltam, 'NAN','NAN','NAN', & & analyses(i)%peaks(j)%mu, analyses(i)%peaks(j)%dmulow,analyses(i)%peaks(j)%dmuup, & & analyses(i)%peaks(j)%total_mu, mu_pull endif enddo enddo close(file_id_common3) end subroutine print_peaks_signal_rates_to_file !-------------------------------------------------------------------- -subroutine get_peakchi2(obsID, csqmu, csqmh, csqmax, csqtot) +subroutine get_peakchisq(obsID, csqmu, csqmh, csqmax, csqtot) !-------------------------------------------------------------------- implicit none integer, intent(in) :: obsID double precision, intent(out) :: csqmu, csqmh, csqmax, csqtot integer :: i, j do i=lbound(analyses,dim=1),ubound(analyses,dim=1) do j=lbound(analyses(i)%peaks,dim=1),ubound(analyses(i)%peaks,dim=1) if(obsID.eq.analyses(i)%peaks(j)%id) then csqmu = analyses(i)%peaks(j)%chisq_mu csqmh = analyses(i)%peaks(j)%chisq_mh csqmax = analyses(i)%peaks(j)%chisq_max csqtot = analyses(i)%peaks(j)%chisq_tot endif enddo enddo -end subroutine get_peakchi2 +end subroutine get_peakchisq !------------------------------------------------------------------------------------ -subroutine get_masschi2_from_separation(csq) +subroutine get_masschisq_from_separation(csq) !------------------------------------------------------------------------------------ implicit none double precision, intent(out) :: csq integer :: i, ii, iii ! write(*,*) "Calling get_masschi2_from_separation." csq =0.0D0 iii=0 do i=lbound(analyses,dim=1),ubound(analyses,dim=1) do ii=lbound(analyses(i)%peaks,dim=1),ubound(analyses(i)%peaks,dim=1) iii=iii+1 if(analyses(i)%table%mhchisq.eq.1) then csq = csq + csq_mass_separation_weighted( & & analyses(i)%peaks(ii)%Higgs_comb, analyses(i)%peaks(ii)) ! write(*,*) 'analyses(',i,')%peaks(',ii,')%Higgs_comb = ',analyses(i)%peaks(ii)%Higgs_comb endif enddo enddo ! write(*,*) 'csq_sep =', csq -end subroutine get_masschi2_from_separation +end subroutine get_masschisq_from_separation !------------------------------------------------------------------------------------ subroutine add_peaks_to_HSresults(r) !------------------------------------------------------------------------------------ ! use usefulbits_hs, only : HSresults, peaklist implicit none type(HSresults), intent(out) :: r integer :: i,j, iii if(allocated(r%obsID)) deallocate(r%obsID) if(allocated(r%mupred)) deallocate(r%mupred) if(allocated(r%domH)) deallocate(r%domH) if(allocated(r%nH)) deallocate(r%nH) !-The number of peaks should maybe be saved in a global usefulbits_HS variable in order ! to avoid multiple loops over the peaklist. iii=0 do i=lbound(analyses,dim=1),ubound(analyses,dim=1) do j=lbound(analyses(i)%peaks,dim=1),ubound(analyses(i)%peaks,dim=1) iii=iii+1 enddo enddo allocate(r%mupred(iii), r%domH(iii), r%nH(iii), r%obsID(iii)) iii=0 do i=lbound(analyses,dim=1),ubound(analyses,dim=1) do j=lbound(analyses(i)%peaks,dim=1),ubound(analyses(i)%peaks,dim=1) iii=iii+1 r%mupred(iii)=analyses(i)%peaks(j)%total_mu r%domH(iii)=analyses(i)%peaks(j)%domH r%nH(iii)=analyses(i)%peaks(j)%NHiggs_comb r%obsID(iii)=analyses(i)%peaks(j)%id enddo enddo ! write(*,*) "End of subroutine add_peaks_to_HSresults." end subroutine add_peaks_to_HSresults !------------------------------------------------------------------------------------ subroutine get_dmu0sq_peak(dmu0sq,peak,domax) !------------------------------------------------------------------------------------ use usefulbits_HS, only : mupeak, symmetricerrors, absolute_errors implicit none integer, intent(in) :: domax ! if 1, then use predicted mu == 0 double precision, intent(out) :: dmu0sq double precision :: pred_mu, mu type(mupeak), intent(in) :: peak ! TESTING: ! if(absolute_errors) then ! mu=peak%mu_original ! else mu=peak%mu ! endif if(domax.eq.1) then pred_mu = 0.0D0 else pred_mu = peak%total_mu endif if(.not.symmetricerrors) then if(pred_mu.le.mu) then dmu0sq = peak%dmulow0sq else if(pred_mu.gt.mu) then dmu0sq = peak%dmuup0sq endif else if(peak%dmulow0sq.lt.0.0d0.or.peak%dmuup0sq.lt.0.0d0) then write(*,*) "WARNING: squared intrinsic mu uncertainty is negative!" dmu0sq= (sqrt(abs(peak%dmulow0sq))+sqrt(abs(peak%dmuup0sq)))**2/4. else dmu0sq = (sqrt(peak%dmulow0sq)+sqrt(peak%dmuup0sq))**2/4. endif endif !! write(*,*) 'DEBUG: ',peak%dmulow0sq, peak%dmuup0sq, (sqrt(peak%dmulow0sq)+sqrt(peak%dmuup0sq))**2/4. end subroutine get_dmu0sq_peak !------------------------------------------------------------------------------------ subroutine get_dmu_peak(dmu,peak) !------------------------------------------------------------------------------------ use usefulbits_HS, only : mupeak implicit none double precision, intent(out) :: dmu double precision :: pred_mu type(mupeak), intent(in) :: peak pred_mu = peak%total_mu if(pred_mu.le.peak%mu) then dmu = peak%dmulow else if(pred_mu.gt.peak%mu) then dmu = peak%dmuup endif end subroutine get_dmu_peak !------------------------------------------------------------------------------------ subroutine calc_pc_chisq(pc_chisq,peak,mhchisqflag,Higgses,Higgs_dom,indices_in,iterstep) ! This subroutine calculates the chisq value for a given Higgs combination assigned ! to one peak. ! Parameters: ! ! pc_chisq: Return value (double precision) ! peak: Peak observable the Higgs bosons are assigned to (type mupeak) ! Higgses: neutral Higgs bosons considered for the assignment (type neutHiggs(:)) ! Hdom: dominantly contribution Higgs boson (int) ! indices_in: Higgs boson combination the chi squared value is evaluated for (int(:)) ! iterstep: Iteration-step of Higgs-to-peak assignment !------------------------------------------------------------------------------------ implicit none type(mupeak), intent(in) :: peak type(neutHiggs), dimension(:), intent(in) :: Higgses(:) ! integer, allocatable, intent(out) :: indices_best(:) ! integer, intent(in), optional :: Nindices_in integer, dimension(:), intent(in) :: indices_in(:) integer, intent(in) :: mhchisqflag, iterstep integer, intent(out) :: Higgs_dom double precision, intent(out) :: pc_chisq !--Internal parameters: double precision :: mutot,dmu,csq0,csq_mh_tot,csq_tot,csq_tot_tmp,csq_mh_tmp,mumax double precision :: deltam integer :: nH double precision :: m, dm call check_pdf(pdf) nH=size(Higgses) !--Calculate the maximal chisq value for this peak csq0 = csq_mu(0.0D0,peak%mu,peak%dmuup,peak%dmulow) mumax = -1.0D6 mutot = 0.0D0 csq_mh_tot=0.0D0 Higgs_dom=0 ! Calculate mutot and find dominant Higgs do i=lbound(indices_in,dim=1),ubound(indices_in,dim=1) if(indices_in(i).ne.0) then mutot = mutot + Higgses(indices_in(i))%mu if(Higgses(indices_in(i))%mu.gt.mumax) then mumax = Higgses(indices_in(i))%mu Higgs_dom = indices_in(i) endif endif enddo if(allocated(cov_mhneut_max).and.iterstep.eq.1) then !-In the first iterated step, use a Higgs mass covariance matrix, where all Higgs bosons !-are assumed to be assigned. ! write(*,*) "Warning!! called csq_mh_with_max_corr!" csq_mh_tot = csq_mh_with_max_corr(indices_in, peak%internalnumber) elseif(allocated(cov_mhneut).and.iterstep.gt.1) then !-In the second (and succeeding) iterated steps, use a the Higgs mass covariance matrix !-based on the the previous Higgs-to-peaks assignment. ! write(*,*) "Warning!! called csq_mh_with_corr!" csq_mh_tot = csq_mh_with_corr(indices_in, peak%internalnumber) else if(useaveragemass) then call get_average_mass_for_peak(indices_in, peak, m, dm) if(mhchisqflag.eq.1) then deltam = peak%dm csq_mh_tot = csq_mh(m, peak%mpeak, dm, peak%dm) else csq_mh_tot = 0.0D0 endif else do i=lbound(indices_in,dim=1),ubound(indices_in,dim=1) if(indices_in(i).ne.0) then if(mhchisqflag.eq.1) then deltam = peak%dm csq_mh_tmp = csq_mh(Higgses(indices_in(i))%m, peak%mpeak, & & Higgses(indices_in(i))%dm,deltam) else csq_mh_tmp = 0.0D0 endif csq_mh_tot = csq_mh_tot + csq_mh_tmp endif enddo endif endif if(allocated(cov)) then csq_tot = csq_mh_tot + csq_mu_with_corr(mutot, peak%internalnumber) else csq_tot = csq_mh_tot + csq_mu(mutot, peak%mu, peak%dmuup, peak%dmulow) endif pc_chisq = csq_tot end subroutine calc_pc_chisq !--------------------------------------------------------------------------- function csq_mh_with_max_corr(indices_in, peaknumber) !--------------------------------------------------------------------------- integer, dimension(:), intent(in) :: indices_in(:) integer, intent(in) :: peaknumber double precision :: csq_mh_with_max_corr double precision, allocatable :: csq_mh_per_Higgs(:) integer :: i, ii, iii, k, nH, N, Hindex double precision, allocatable :: v(:,:), invcov(:,:), v2(:) nH = size(cov_mhneut,dim=1) N = size(cov_mhneut,dim=2) allocate(v(nH,N), v2(N), csq_mh_per_Higgs(nH)) do k=1,nH iii=0 do i=1, size(analyses) do ii=lbound(analyses(i)%peaks,dim=1),ubound(analyses(i)%peaks,dim=1) iii=iii+1 v(k,iii) = analyses(i)%peaks(ii)%Higgses(k)%m - analyses(i)%peaks(ii)%mpeak if(iii.eq.peaknumber) v(k,iii) = 0.0D0 ! Will be filled later... enddo enddo enddo do k=1,nH iii=0 do i=1, size(analyses) do ii=lbound(analyses(i)%peaks,dim=1),ubound(analyses(i)%peaks,dim=1) iii=iii+1 if(iii.eq.peaknumber) then Hindex=indices_in(k) if(Hindex.ne.0) then v(Hindex,iii) = analyses(i)%peaks(ii)%Higgses(k)%m - analyses(i)%peaks(ii)%mpeak endif endif enddo enddo enddo do k=1,nH !-n.b.: this loops now over Hindex call invmatrix(cov_mhneut_max(k,:,:),invcov) call matmult(invcov,v(k,:),v2,N,1) csq_mh_per_Higgs(k) = v(k,peaknumber)*v2(peaknumber) enddo csq_mh_with_max_corr = sum(csq_mh_per_Higgs) deallocate(v,v2,csq_mh_per_Higgs) end function csq_mh_with_max_corr !--------------------------------------------------------------------------- function csq_mh_with_corr(indices_in, peaknumber) !--------------------------------------------------------------------------- integer, dimension(:), intent(in) :: indices_in(:) integer, intent(in) :: peaknumber double precision :: csq_mh_with_corr double precision, allocatable :: csq_mh_per_Higgs(:) integer :: i, ii, iii, k, nH, N, Hindex double precision, allocatable :: v(:,:), invcov(:,:), v2(:) nH = size(cov_mhneut,dim=1) N = size(cov_mhneut,dim=2) allocate(v(nH,N), v2(N), csq_mh_per_Higgs(nH)) !-First, fill the vectors with zeros: do k=1,nH do i=1,N v(k,i) = 0.0D0 enddo enddo do k=1,nH iii=0 do i=1, size(analyses) do ii=lbound(analyses(i)%peaks,dim=1),ubound(analyses(i)%peaks,dim=1) iii=iii+1 Hindex = analyses(i)%peaks(ii)%Higgs_comb(k) if(iii.eq.peaknumber) Hindex=indices_in(k) if(Hindex.ne.0) then v(Hindex,iii) = analyses(i)%peaks(ii)%Higgses(Hindex)%m - & & analyses(i)%peaks(ii)%mpeak endif enddo enddo enddo do k=1,nH !-n.b.: this loops now over Hindex call invmatrix(cov_mhneut(k,:,:),invcov) call matmult(invcov,v(k,:),v2,N,1) csq_mh_per_Higgs(k) = v(k,peaknumber)*v2(peaknumber) enddo csq_mh_with_corr = sum(csq_mh_per_Higgs) deallocate(v,v2,csq_mh_per_Higgs) end function csq_mh_with_corr !------------------------------------------------------------------------------------ function csq_mu_with_corr(mu, peaknumber) !------------------------------------------------------------------------------------ ! use usefulbits_hs, only : peaklist, cov use numerics, only : invmatrix, matmult integer, intent(in) :: peaknumber double precision, intent(in) :: mu integer :: i, ii, iii, N double precision, allocatable :: v(:), vmat(:,:), invcov(:,:), v2(:) double precision :: csq_mu_with_corr if(allocated(cov)) deallocate(cov) call create_covariance_matrix_mu(0) N = size(cov,dim=1) allocate(v(N), vmat(N,1),invcov(N,N), v2(N)) !-First construct the vector (mupred - muobs)_iii iii=0 do i=1, size(analyses) do ii=lbound(analyses(i)%peaks,dim=1),ubound(analyses(i)%peaks,dim=1) iii=iii+1 v(iii) = analyses(i)%peaks(ii)%total_mu - analyses(i)%peaks(ii)%mu if(iii.eq.peaknumber) v(iii) = mu - analyses(i)%peaks(ii)%mu vmat(iii,1) = v(iii) enddo enddo call invmatrix(cov,invcov) call matmult(invcov,vmat,v2,N,1) csq_mu_with_corr = v(peaknumber)*v2(peaknumber) deallocate(v,vmat,invcov,v2) end function csq_mu_with_corr !------------------------------------------------------------------------------------ subroutine check_pdf(pdf) !------------------------------------------------------------------------------------ implicit none integer, intent(inout) :: pdf if(.not.((pdf.eq.1).or.(pdf.eq.2).or.(pdf.eq.3))) then write(*,*) 'WARNING: pdf not properly specified. Will be set to pdf=2 (gaussian-shape)' pdf=2 endif end subroutine check_pdf !------------------------------------------------------------------------------------ function csq_mu(x, x0, dx_up, dx_low) !- x: model predicted value !- x0: observed value !- dx_up: difference between observed and upper 1sigma band (always positive) !- dx_low: difference between observed and lower 1sigma band (always positive) !------------------------------------------------------------------------------------ use usefulbits_hs, only : symmetricerrors implicit none double precision, intent(in) :: x, x0, dx_up, dx_low double precision :: csq_mu, dx if(.not.symmetricerrors) then if(x.ge.x0) then dx = dx_up else dx = dx_low endif else dx = (abs(dx_up)+abs(dx_low))/2. endif csq_mu=chisq(x, x0, dx) end function csq_mu !------------------------------------------------------------------------------------ function csq_mh(x,x0,dx1,dx2) !------------------------------------------------------------------------------------ implicit none double precision, intent(in) :: x, x0, dx1, dx2 double precision :: csq_mh, dx if(pdf.eq.1) then ! box pdf dx = dx1 + dx2 ! Add exp. and th. uncertainties linearly if(x.ge.(x0-dx).and.x.le.(x0+dx)) then csq_mh = 0.0D0 else csq_mh = 100000.0D0 !Large number endif else if(pdf.eq.2) then ! gaussian pdf dx = sqrt(dx1**2+dx2**2) ! Add uncertainties in quadrature csq_mh = chisq(x,x0,dx) !---------------------------- Have to verify boxgaussian... else if(pdf.eq.3) then ! box+gaussian pdf if(x.ge.(x0-dx1).and.x.le.(x0+dx1)) then csq_mh = 0.0D0 else if(x.ge.(x0+dx1)) then csq_mh = chisq(x,x0+dx1,dx2) else if(x.le.(x0-dx1)) then csq_mh = chisq(x,x0-dx1,dx2) endif endif end function csq_mh !------------------------------------------------------------------------------------ function csq_mass_separation_weighted(indices_in, peak) !--------------------------------------------------------------------------- use usefulbits, only : vsmall implicit none integer, dimension(:), intent(in) :: indices_in(:) type(mupeak), intent(in) :: peak double precision :: csq_mass_separation_weighted double precision :: mutotal,csq,csq_mh_tmp, m, dm integer :: i,k,NHiggs !------------------------------------------------------------------------------------ NHiggs = 0 mutotal = 0.0D0 do k=lbound(indices_in,dim=1),ubound(indices_in,dim=1) i = indices_in(k) if(i.ne.0) then mutotal = mutotal + peak%Higgses(i)%mu NHiggs=NHiggs+1 endif enddo call get_average_mass_for_peak(indices_in, peak, m, dm) csq = 0.0D0 if(abs(mutotal).gt.vsmall.and.NHiggs.gt.1) then do k=lbound(indices_in,dim=1),ubound(indices_in,dim=1) i = indices_in(k) csq_mh_tmp = 0.0D0 if(i.ne.0) then if(pdf.eq.1) then ! box pdf if(peak%Higgses(i)%m.ge.(m-peak%Higgses(i)%dm-peak%dm).and. & & peak%Higgses(i)%m.le.(m+peak%Higgses(i)%dm+peak%dm)) then csq_mh_tmp = 0.0D0 else csq_mh_tmp = 100000.0D0 !Large number endif else if(pdf.eq.2) then csq_mh_tmp = chisq(peak%Higgses(i)%m,m,sqrt(peak%dm**2+peak%Higgses(i)%dm**2)) ! write(*,*) "m, m_av, dm = ",peak%Higgses(i)%m,m,sqrt(peak%dm**2+peak%Higgses(i)%dm**2) ! write(*,*) "i, csq_mh_tmp = ", i , csq_mh_tmp else if(pdf.eq.3) then if(peak%Higgses(i)%m.ge.(m-peak%Higgses(i)%dm).and. & & peak%Higgses(i)%m.le.(m+peak%Higgses(i)%dm)) then csq_mh_tmp = 0.0D0 else if(peak%Higgses(i)%m.gt.m+peak%Higgses(i)%dm) then csq_mh_tmp = chisq(peak%Higgses(i)%m,m+peak%Higgses(i)%dm,peak%dm) else if(peak%Higgses(i)%m.lt.m-peak%Higgses(i)%dm) then csq_mh_tmp = chisq(peak%Higgses(i)%m,m-peak%Higgses(i)%dm,peak%dm) endif else stop "Error: Unknown pdf!" endif csq = csq + abs(peak%Higgses(i)%mu/mutotal)*csq_mh_tmp endif enddo endif csq_mass_separation_weighted = csq end function csq_mass_separation_weighted !------------------------------------------------------------------------------------ function chisq(x,x0,dx) !------------------------------------------------------------------------------------ implicit none double precision, intent(in) :: x,x0,dx double precision :: chisq if(dx.ne.0) then chisq=(x-x0)**2/dx**2 else write(*,*) 'WARNING, dx = 0' chisq=100000. endif end function chisq !------------------------------------------------------------------------------------ subroutine get_ncomb(ncomb, indices_truncated, indices_best) !------------------------------------------------------------------------------------ implicit none integer, dimension(:), intent(in) :: indices_best(:) integer, allocatable, intent(out) :: indices_truncated(:) integer, intent(out) :: ncomb integer :: i,j ncomb=0 do i=lbound(indices_best,dim=1),ubound(indices_best,dim=1) if(indices_best(i).ne.0) ncomb=ncomb+1 enddo allocate(indices_truncated(ncomb)) j=1 do i=lbound(indices_best,dim=1),ubound(indices_best,dim=1) if(indices_best(i).ne.0) then indices_truncated(j)=indices_best(i) j=j+1 endif enddo end subroutine get_ncomb !------------------------------------------------------------------------------------ subroutine get_weights_at_peak( peak, mutab ) ! This subroutines fills the channels weights array of the peak object with the ! Standard Model weights obtained at the peaks position. !------------------------------------------------------------------------------------ use usefulbits, only : div, small ! use theory_XS_SM_functions use usefulbits_HS, only : mutable type(mupeak), intent(inout) :: peak type(mutable), intent(in) :: mutab integer :: i, id, p, d double precision :: SMrate, mass double precision :: SMCS_lhc7_gg_H,SMCS_lhc7_bb_H,SMCS_lhc7_vbf_H,SMCS_lhc7_HW, & & SMCS_lhc7_HZ, SMCS_lhc7_ttH, SMCS_lhc8_gg_H,SMCS_lhc8_bb_H,SMCS_lhc8_vbf_H, & & SMCS_lhc8_HW, SMCS_lhc8_HZ, SMCS_lhc8_ttH, SMCS_lhc13_gg_H,SMCS_lhc13_bb_H, & & SMCS_lhc13_vbf_H, SMCS_lhc13_HW, SMCS_lhc13_HZ, SMCS_lhc13_ttH, SMCS_tev_gg_H, & & SMCS_tev_bb_H, SMCS_tev_vbf_H, SMCS_tev_HW, SMCS_tev_HZ, SMCS_tev_ttH, & & SMBR_Hgamgam,SMBR_HWW,SMBR_HZZ, SMBR_Htautau, SMBR_Hbb,SMBR_HZgam,SMBR_Hcc, & & SMBR_Hmumu,SMBR_Hgg ! Check experiment and energy flag to choose the relevant dataset mass = peak%mpeak do i=1,mutab%Nc p = mutab%channel_p_id(i) d = mutab%channel_d_id(i) ! ! id = mutab%channel_id(i) ! p = int((id-modulo(id,10))/dble(10)) ! d = modulo(id,10) !--Do the production rate for the relevant experiment and cms-energy if(mutab%collider.eq.'LHC') then if(abs(mutab%energy-7.0D0).le.small) then if(p.eq.1) then SMrate=SMCS_lhc7_gg_H(mass)+SMCS_lhc7_bb_H(mass) else if(p.eq.2) then SMrate=SMCS_lhc7_vbf_H(mass) else if(p.eq.3) then SMrate=SMCS_lhc7_HW(mass) else if(p.eq.4) then SMrate=SMCS_lhc7_HZ(mass) else if(p.eq.5) then SMrate=SMCS_lhc7_ttH(mass) endif else if(abs(mutab%energy-8.0D0).le.small) then if(p.eq.1) then SMrate=SMCS_lhc8_gg_H(mass)+SMCS_lhc8_bb_H(mass) else if(p.eq.2) then SMrate=SMCS_lhc8_vbf_H(mass) else if(p.eq.3) then SMrate=SMCS_lhc8_HW(mass) else if(p.eq.4) then SMrate=SMCS_lhc8_HZ(mass) else if(p.eq.5) then SMrate=SMCS_lhc8_ttH(mass) endif else if(abs(mutab%energy-13.0D0).le.small) then if(p.eq.1) then SMrate=SMCS_lhc13_gg_H(mass)+SMCS_lhc13_bb_H(mass) else if(p.eq.2) then SMrate=SMCS_lhc13_vbf_H(mass) else if(p.eq.3) then SMrate=SMCS_lhc13_HW(mass) else if(p.eq.4) then SMrate=SMCS_lhc13_HZ(mass) else if(p.eq.5) then SMrate=SMCS_lhc13_ttH(mass) endif endif else if(mutab%collider.eq.'TEV') then if(p.eq.1) then SMrate=SMCS_tev_gg_H(mass)+SMCS_tev_bb_H(mass) else if(p.eq.2) then SMrate=SMCS_tev_vbf_H(mass) else if(p.eq.3) then SMrate=SMCS_tev_HW(mass) else if(p.eq.4) then SMrate=SMCS_tev_HZ(mass) else if(p.eq.5) then SMrate=SMCS_tev_ttH(mass) endif endif !--Multiply now by the decay rate if(d.eq.1) then SMrate=SMrate*SMBR_Hgamgam(mass) else if(d.eq.2) then SMrate=SMrate*SMBR_HWW(mass) else if(d.eq.3) then SMrate=SMrate*SMBR_HZZ(mass) else if(d.eq.4) then SMrate=SMrate*SMBR_Htautau(mass) else if(d.eq.5) then SMrate=SMrate*SMBR_Hbb(mass) else if(d.eq.6) then SMrate=SMrate*SMBR_HZgam(mass) else if(d.eq.7) then SMrate=SMrate*SMBR_Hcc(mass) else if(d.eq.8) then SMrate=SMrate*SMBR_Hmumu(mass) else if(d.eq.9) then SMrate=SMrate*SMBR_Hgg(mass) endif peak%channel_w(i)=peak%channel_eff(i)*SMrate enddo SMrate=sum(peak%channel_w(:)) do i=1,mutab%Nc peak%channel_w(i)=div(peak%channel_w(i),SMrate,0.0D0,1.0D9) enddo end subroutine get_weights_at_peak !--------------------------------------------------------------------------- subroutine get_average_mass(indices_in, peaknumber, m, dm) !--------------------------------------------------------------------------- integer, dimension(:), intent(in) :: indices_in(:) integer, intent(in) :: peaknumber double precision, intent(out) :: m, dm integer :: i, ii, iii, k, nH, N, Hindex double precision :: num1, num2, denom nH = size(indices_in,dim=1) num1 = 0.0D0 num2 = 0.0D0 denom = 0.0D0 iii=0 do i=1, size(analyses) do ii=lbound(analyses(i)%peaks,dim=1),ubound(analyses(i)%peaks,dim=1) iii=iii+1 if(iii.eq.peaknumber) then call get_average_mass_for_peak(indices_in, analyses(i)%peaks(ii), m, dm) endif enddo enddo if(denom.ne.0.0D0) then m = num1 / denom dm = num2 / denom else m = 0.0D0 dm = 0.0D0 endif end subroutine get_average_mass !--------------------------------------------------------------------------- subroutine get_average_mass_for_peak(indices_in, peak, m, dm) !--------------------------------------------------------------------------- integer, dimension(:), intent(in) :: indices_in(:) type(mupeak), intent(in) :: peak double precision, intent(out) :: m, dm integer :: i, ii, iii, k, nH, N, Hindex double precision :: num1, num2, denom nH = size(indices_in,dim=1) num1 = 0.0D0 num2 = 0.0D0 denom = 0.0D0 do k=1,nH Hindex=indices_in(k) if(Hindex.ne.0) then num1 = num1 + peak%Higgses(Hindex)%mu * & & peak%Higgses(Hindex)%m num2 = num2 + peak%Higgses(Hindex)%mu * & & peak%Higgses(Hindex)%dm denom = denom + peak%Higgses(Hindex)%mu endif enddo if(denom.ne.0.0D0) then m = num1 / denom dm = num2 / denom else m = 0.0D0 dm = 0.0D0 endif end subroutine get_average_mass_for_peak !------------------------------------------------------------------------------------ end module pc_chisq !------------------------------------------------------------------------------------ \ No newline at end of file Index: trunk/HiggsSignals-2/pubconfigure =================================================================== --- trunk/HiggsSignals-2/pubconfigure (revision 596) +++ trunk/HiggsSignals-2/pubconfigure (revision 597) @@ -1,95 +1,136 @@ #! /bin/sh #configure script for HiggsSignals -#last modified 16.07.12 TS +#last modified 20.12.18 TS # this tells the fortran program where to look to read in tables of experimental data chmod u+x ./create_store_pathname_HS.bat ./create_store_pathname_HS.bat > store_pathname_HS.f90 -echo 'running configure script...' 1>&2 +echo ' ******************************************************** ' +echo ' * Configuring HiggsSignals... * ' 1>&2 +echo ' * * ' +echo ' * (will create makefile from makefile.in) * ' +echo ' ******************************************************** ' +echo ' You can specify the correct paths to HiggsBounds and ' +echo ' (if needed) FeynHiggs via the options ' +echo ' --hbpath=/PATH/TO/HIGGSBOUNDS' +echo ' --fhpath=/PATH/TO/FEYNHIGGS' +echo ' or manually in the configure script.' +echo '' +echo ' The Fortran compiler has to be set manually in the ' +echo ' configure script. The default is gfortran.' +echo ' ******************************************************** ' -echo ' * * * ' -echo 'Reminder: You must enter manually the correct path to HiggsBounds in the ' -echo 'configure script. Also, you may need/wish to change the fortran compiler used. ' -echo 'The default is gfortran.' -echo ' * * * ' +#---------------------------- + +# Note that you have to build HiggsBounds successfully BEFORE you build HiggsSignals. + +CONF_HBPATH="../HiggsBounds-5.3.1beta" +CONF_FHPATH="../FeynHiggs-2.14.3beta" +# For FeynHiggs: +CONF_OS=`uname -s` +CONF_MACH=`uname -m` +CONF_DEFPREFIX="$CONF_MACH-$CONF_OS" + +for arg in "$@" ; do + case "$arg" in + --hbpath=*) + CONF_HBPATH=`expr "$arg" : ".*--hbpath=\(.*\)"` ;; + --fhpath=*) + CONF_FHPATH=`expr "$arg" : ".*--fhpath=\(.*\)"` ;; + -*) + echo "Warning: $arg is not a valid option." ;; + *=*) + eval `echo $arg\" | sed 's/=/="/'` ;; + *) + echo "Warning: $arg is not a valid argument." ;; + esac +done + +# Remove slash in entered paths +if [ "${CONF_HBPATH: -1}" = "/" ]; then + CONF_HBPATH="${CONF_HBPATH%?}" +fi + +if [ "${CONF_FHPATH: -1}" = "/" ]; then + CONF_FHPATH="${CONF_FHPATH%?}" +fi +echo " hbpath=${CONF_HBPATH}" +echo " fhpath=${CONF_FHPATH}" #---------------------------- cat - makefile.in > makefile << _EOF_ # --- variables defined by configure --- # If you want to edit these variables, change ./configure, not ./makefile #---------------------------- # Put you favourite compiler and compiler options in here: - F90C = gfortran F77C = gfortran F90FLAGS = -fbounds-check -ffixed-line-length-none -# F90FLAGS = -fbounds-check -ffixed-line-length-none -fPIC +#F90FLAGS = -fbounds-check -ffixed-line-length-none -fPIC #F90FLAGS = -fbounds-check -Wall -W -# Please specify the path to your HiggsBounds (version 4.1.0 or higher) distribution. -# Note that you have to build HiggsBounds successfully BEFORE you build HiggsSignals. -HBLIBS =-L../HiggsBounds-5.3.0beta -HBINCLUDE =-I../HiggsBounds-5.3.0beta - #other useful gfortran flags: # -pg can then use gprof ./programname to look at how efficient program is # -fopenmp switches on parallel processing (see HiggsBounds.F90) # -O3 sets a high level of optimisation - #F90C = g95 #F77C = g95 #F90FLAGS = -fbounds-check -ffree-line-length-huge #F90C = pgf90 #F77C = pgf90 #F90FLAGS = -C -Ktrap=fp -Mbounds #F90C = f95 #F77C = f95 #F90FLAGS = -C #F90C = ifort #F77C = ifort #F90FLAGS = -C #if using the NAG compiler, you need the compiler flag -DNAGf90Fortran #because the subroutines flush,iargc,getarg need to use modules #caution: the use of the NAG compiler is unsupported + +HBLIBS =-L${CONF_HBPATH} +HBINCLUDE =-I${CONF_HBPATH} + + #------------------------------ # If you wish to use HiggsSignals in conjunction with FeynHiggs, # make sure these paths indicate where you've stored these packages on your system, -# for example: - -FHINCLUDE = -I/blah/blah/FeynHiggs-2.x.x/i586-linux/include -FHLIBS = -L/blah/blah/FeynHiggs-2.x.x/i586-linux/lib -lFH +FHINCLUDE = -I${CONF_FHPATH}/${CONF_DEFPREFIX}/include +FHLIBS = -L${CONF_FHPATH}/${CONF_DEFPREFIX}/lib -lFH # Note that care must be taken to ensure that consistent compilers are used # If you get error messages similar to # ... undefined reference to initialize_higgsbounds__... # and the paths the libraries are correct, it's a good idea to check # that the same compilers are used for each package. # (you may be able to work around this # e.g. if FeynHiggs was compiled with g77 it may be possible to compile HiggsBounds # with gfortran and add -lg2c to the end of the variable FHLIBS) #----------------------------- - HSLIBS = -L./ -lHS EXE = HiggsSignals #----------------------------- _EOF_ -echo 'finished configure script' 1>&2 +echo ' ******************************************************** ' +echo ' ...finished configure script.' 1>&2 +echo ' ******************************************************** ' Index: trunk/HiggsSignals-2/README =================================================================== --- trunk/HiggsSignals-2/README (revision 596) +++ trunk/HiggsSignals-2/README (revision 597) @@ -1,313 +1,313 @@ Contents of the present directory are part of the program package HiggsSignals by Philip Bechtle, Sven Heinemeyer, Oscar Stål, Tim Stefaniak and Georg Weiglein. This code is written by Oscar Stål and Tim Stefaniak. -Please contact oscar.stal@fysik.su.se or tim@th.physik.uni-bonn.de if you have any +Please contact tim.stefaniak@desy.de if you have any questions/problems/etc with this version. This README file contains: * Journal reference and website address * Software license * What the program does * How to use HiggsSignals * Additional requirements * How to install HiggsSignals * How to run the examples * Additional notes * Contents of this directory ------------------------------------------------------------------ * Journal References: ------------------------------------------------------------------ If you use the program HiggsSignals please cite Philip Bechtle, Sven Heinemeyer, Oscar Stål, Tim Stefaniak, Georg Weiglein, HiggsSignals: Confronting arbitrary Higgs sectors with measurements at the Tevatron and the LHC e-Print: arXiv:1305.1933 [hep-ph] HiggsSignals uses the HiggsBounds library, therefore please also include a citation to the following references: Philip Bechtle, Oliver Brein, Sven Heinemeyer, Georg Weiglein, Karina E. Williams, HiggsBounds: Confronting Arbitrary Higgs Sectors with Exclusion Bounds from LEP and the Tevatron, Comput.Phys.Commun.181:138-167,2010 e-Print: arXiv:0811.4169 [hep-ph] Philip Bechtle, Oliver Brein, Sven Heinemeyer, Georg Weiglein, Karina E. Williams, HiggsBounds 2.0.0: Confronting Neutral and Charged Higgs Sector Predictions with Exclusion Bounds from LEP and the Tevatron, e-Print: arXiv:1102.1898 [hep-ph] Philip Bechtle, Oliver Brein, Sven Heinemeyer, Oscar Stål, Tim Stefaniak, Georg Weiglein, Karina Williams, Recent Developments in HiggsBounds and a Preview of HiggsSignals, PoS CHARGED2012 (2012) 024, e-Print: arXiv:1301.2345 [hep-ph] Philip Bechtle, Oliver Brein, Sven Heinemeyer, Oscar Stål, Tim Stefaniak, Georg Weiglein, Karina E. Williams, HiggsBounds-4: Improved Tests of Extended Higgs Sectors against Exclusion Bounds from LEP, the Tevatron and the LHC e-Print: arXiv:1311.0055 [hep-ph] * Web site: http://projects.hepforge.org/higgsbounds/ Please have a look at the above paper for detailed information on the program. ------------------------------------------------------------------ * Software License: ------------------------------------------------------------------ HiggsSignals is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. HiggsSignals is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with HiggsSignals. If not, see http://www.gnu.org/licenses/ ------------------------------------------------------------------ * What the program does: ------------------------------------------------------------------ HiggsSignals is a computer code that performs a χ2 test of the Higgs sector predictions in arbitrary models with any number of Higgs bosons against the signal rates and masses measured in Higgs searches by the Tevatron and LHC experiments. It features two complementary methods for the χ2 evaluation: the peak-centered χ2 method, in which each observable is defined by a Higgs signal rate measured at a specific hypothetical Higgs mass, corresponding to a tentative Higgs signal. In the second method, the mass-centered χ2 method, the χ2 is evaluated by comparing the signal rate measurement to the theory prediction at the Higgs mass predicted by the model. The program allows for the simultaneous use of both methods, which is useful in testing models with multiple Higgs bosons. In the statistical procedure, systematic uncertainties of the signal rate prediction, luminosity and Higgs mass predictions are fully taken into account, including their correlations. The code automatically combines the signal rates of Higgs bosons if their signals cannot be resolved by the experimental analysis. In that case the signal rates of the corresponding Higgs bosons are added incoherently. The model input framework of HiggsSignals is based on the the HiggsBounds input format. It is therefore straightforward to use both codes in parallel, something which is highly recommended to exploit the full constraining power of Higgs search exclusion limits and the measurements of the signal seen at mH ≃ 125.5 GeV. ------------------------------------------------------------------ * How to use HiggsSignals: ------------------------------------------------------------------ The code can be invoked on the command line using the command ./HiggsSignals and a subroutine version of the code can be used in other codes by linking the library libHS.a . By running HiggsSignals without options, more detailed information on how to invoke it will be displayed. ------------------------------------------------------------------ * Additional requirements: ------------------------------------------------------------------ The program "HiggsSignals" and the FORTRAN library "libHS.a" need to be linked to the HiggsBounds (version 4 or higher) library libHB.a The sample program "HBandHSwithFH" demonstrating the use of HiggsSignals and HiggsBounds in connection with FeynHiggs needs to link to/include: libFH.a FHCouplings.h ------------------------------------------------------------------ * How to install HiggsSignals: ------------------------------------------------------------------ 1. You have to edit the file ./configure in the following way: a) You have to specify the command which invokes your FORTRAN 90 compiler F90C ( e.g. gfortran ) and the appropriate flags F90FLAGS ( e.g. -fbounds-check ) Note, that in the case of gfortran, the compiler version 4.2 (or higher) is required, since HiggsSignals makes use of allocatable arrays. b) You have to specify the location of the HiggsBounds installation, such that the HiggsSignals program can be linked correctly to the HiggsBounds library. Please specify: HBINCLUDE ( e.g. $(HOME)/Packages/HiggsBounds-4.0.0/HiggsBounds ) HBLIBS ( e.g. $(HOME)/Packages/HiggsBounds-4.0.0/HiggsBounds ) b) If you are going to use the FORTRAN 77 example program "HSandHBwithFH" you must specify the FORTRAN 77 compiler F77C ( e.g. gfortran ) You also have to specify the variables which tell the linker where to find the additional libraries. - For FeynHiggs specify: FHINCLUDE ( e.g. $(HOME)/Packages/FeynHiggs-2.9.4/i586-linux/include ) FHLIBS ( e.g. $(HOME)/Packages/FeynHiggs-2.9.4/i586-linux/lib -lFH ) Note that care must be taken to ensure that consistent compilers are used If you get error messages similar to ... undefined reference to `initialize_higgssignals__'... and the paths to the libraries are correct, it's a good idea to check that the same compilers were used for each package. (you may be able to work around this e.g. if FeynHiggs was compiled with g77 it may be possible to compile HiggsBounds and HiggsSignals with gfortran and add -lg2c to the end of the variable FHLIBS) 2. After these changes, enter ./configure at the command line, then make This will generate the program "HiggsSignals", which is the command-line version of the code, as well as the library "libHS.a". You can also enter specifically: make libHS : This will generate "libHS.a". make HSexamples : This will compile all provided sample programs in the folder "example_programs" which do not depend on further external libraries. These are the programs HSeffC HShadr HSscaleUncertainties HSwithToys HSwithSLHA HBandHSwithSLHA HS_efficiencies HS_mass make : Each example program (from the list above) can be compiled separately. make HBandHSwithFH : This will generate the executable "HSandHSwithFH" in the folder "example_programs". This program requires the correct paths to the FeynHiggs package (see above). ------------------------------------------------------------------ * Examples ------------------------------------------------------------------ - Example of command-line version of HiggsSignals The HiggsSignals package includes some sample input files in the folder example_data. For examples, to run HiggsSignals on the sample input files representing the (mA, tanb) grid of the MSSM mhmax benchmark scenario (stored in "example_data/mhmax/") use, for example: ./configure make - ./HiggsSignals latestresults peak 2 part 3 1 example_data/mhmax/mhmax_ + ./HiggsSignals LHC13 peak 2 part 3 1 example_data/mhmax/mhmax_ The output files are example_data/mhmax/mhmax_HiggsSignals_results.dat - Example of the subroutine version of HiggsSignals Several example programs using the subroutines from the HiggsBounds and HiggsSignals libraries are provided in the folder example_programs. ... short description ... (how to execute HSwithSLHA...) - Example of the use of HiggsSignals in conjunction with the publicly available program FeynHiggs The example program ./example_programs/HBandHSwithFH.F (fortran 77) uses FeynHiggs (http://www.feynhiggs.de) to generate the input required by HiggsBounds and HiggsSignals and then calls the HiggsBounds and HiggsSignals subroutines (please see the comments in this file for more information). To use, make sure FeynHiggs is installed on your system and that the paths are correctly set in the HiggsSignals configure file. Then use: ./configure make HBandHSwithFH cd example_programs ./HBandHSwithFH The HiggsBounds and HiggsSignals results are outputted to the screen and the key to the processes considered for for the exclusion limits in HiggsBounds is printed to the file Key.dat. ------------------------------------------------------------------ Please feel free to contact us with feature requests and bug reports. Enjoy! Tim --------------------- Contents of directory ---------------------- * ./ - HiggsSignals.F90 : main program for the command-line version of HiggsSignals - HiggsSignals_subroutines.F90 : contains the main HiggsSignals subroutines which are accessible to the user - io.F90 : contains subroutines associated with in- and output - pc_chisq.f90 : contains subroutines associated with the peak-centered chi^2 method - mc_chisq.f90 : contains subroutines associated with the mass-centered chi^2 method - all_chisq.f90 : contains subroutines associated with the simultaneous use of the peak- and mass-centered chi^2 methods - datatables.f90 : contains subroutines handling the experimental data - combinatorics.f90 : contains subroutines for handling internal combinatorial tasks - numberics.f90 : contains subroutines to calculate the p-value and the inverse of the covariance matrices - usefulbits_HS.f90 : defines, allocates and deallocates various variables - expt_syst.f90 : Module to include correlated experimental systematic uncertainties for certain analyses - README : contains information about the code - COPYING : The GNU General Public License - configure : sets compiler options, paths to data and libraries, creates makefile, runs the script create_store_pathname.bat - makefile.in : used by configure to create the makefile - create_store_pathname_HS.bat : creates a fortran module which stores the path to the installation directory - BRcov.in : covariance matrix for the relative BR theory uncertainties of the model - BRcovSM.in : covariance matrix for the relative BR theory uncertainties of the SM - XScov.in : covariance matrix for the relative cross section theory uncertainties of the model - XScovSM.in : covariance matrix for the relative cross section theory uncertainties of the SM - run_tests.bat : Builds HiggsSignals and runs a few checks, using provided example data and programs. Also makes nice plots if gnuplot is installed. * ./Expt_tables Contains subdirectories for the experimental datasets, which contain .txt files defining the peak observables and/or mu tables from the Tevatron and LHC experiments. The user may create a new directory containing the observables he would like to study. The subdirectory ./Expt_tables/latestresults contains the latest measurements at the time of the HiggsSignals version release. * ./example_data Contains example input files * ./example_programs - HSeffC.f90 : Performs a scan over effective Higgs couplings - HSwithSLHA.f90 : Runs HiggsSignals on SLHA files - HBandHSwithSLHA.f90 : Runs HiggsBounds and HiggsSignals on SLHA files - HSwithToys.f90 : Demonstrates how to set toy measurements to the peak observables - HSscaleUncertainties.f90 : Demonstrates how to scale the rate uncertainties of peak observables - HBandHSwithFH.F : example F77 program showing the use of HiggsBounds and HiggsSignals subroutines with the program FeynHiggs - HS_efficiencies.f90: Demonstrates the efficiency interface introduced with version 1.1.0 - HS_mass.f90: Scans the Higgs mass with the 3 mass pdf options for a SM-like Higgs boson - HShadr.f90: 2D scaling of production cross sections using the hadronic XS input * ./supplements Contains root macros to generate the covariance matrices containing relative BR and XS theory uncertainties using a toy MC.