Page MenuHomeHEPForge

HSwithToys.f90
No OneTemporary

HSwithToys.f90

program HSwithToys
!
! This example program shows how HiggsSignals can used to run Toy Experiments.
! The mode
!
!******************************************************
!#ifdef NAGf90Fortran
! use F90_UNIX_ENV, only : iargc,getarg
!#endif
! use usefulbits, only : analysislist
use pc_chisq, only : set_pdf, set_significance
use io, only : HiggsSignals_SLHA_output
use usefulbits_hs, only : mutables
implicit none
integer :: nH,nHplus,ndf, ii
double precision :: Chisq, Pvalue
double precision, allocatable :: dMh(:), dCS(:), dBR(:), dCS_SM(:), dBR_SM(:)
double precision :: SMGammaTotal,SMGamma_hgg,Gamma_hgg,SMGamma_h,SMBR_Hgg,FGMGammaTotal
double precision :: Mh,GammaTotal,g2hjss_s,g2hjss_p,g2hjcc_s,g2hjcc_p, &
& g2hjbb_s,g2hjbb_p,g2hjtt_s,g2hjtt_p, &
& g2hjmumu_s,g2hjmumu_p,g2hjtautau_s,g2hjtautau_p, &
& g2hjWW,g2hjZZ,g2hjZga,g2hjgaga,g2hjgg,g2hjggZ, &
& g2hjhiZ,BR_hjhihi,BR_hjinvisible
double precision,allocatable :: Toys_muobs(:), Toys_mhobs(:)
integer :: Nanalyses
integer :: i,npoints
! integer,parameter :: fileid=78
character(len=8) :: istring
character(len=300) :: inputfilename,outputfilename
character(len=300) :: stem
character(LEN=300) :: temp
integer :: number_args
!#ifndef NAGf90Fortran
! integer :: iargc
!#endif
!---Note here: We only run HiggsSignals on the lightest Higgs boson. This can be easily
!---extended to all 3 MSSM neutral Higgs bosons. In that case, the effective couplings
!---and mass uncertainties have to be given as arrays of size=nH! (Cf. the Higgsbounds
!---manual for HB-3.x.x for how to call HiggsBounds_neutral_input_effC correctly!)
nH=1
nHplus=0
allocate(dMh(nH))
!-Primitive way of including Rate uncertainties (only for LHC yet).
!--Give estimates on (relative!) systematic uncertainties 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
allocate(dCS(5),dCS_SM(5),dBR(5),dBR_SM(5))
!---from https://twiki.cern.ch/twiki/bin/view/LHCPhysics/CrossSections
dCS_SM = (/ 0.15D0, 0.027D0, 0.043D0, 0.051D0, 0.178D0 /)
dBR_SM = (/ 0.05D0, 0.043D0, 0.043D0, 0.057D0, 0.033D0 /)
!--Enter now the rate uncertainties for your model:
dCS = (/ 0.2D0, 0.04D0, 0.05D0, 0.08D0, 0.2D0 /)
dBR = (/ 0.05D0, 0.043D0, 0.043D0, 0.057D0, 0.033D0 /)
!--n.b. have to set theoretical uncertainties on Higgs mass dMh (in GeV) (by hand for now):
dMh = (/ 2.0D0, 2.0D0, 2.0D0 /)
!-------------------------- HiggsSignals ------------------------------!
call initialize_HiggsSignals(nH,nHplus)
call HiggsSignals_neutral_input_MassUncertainty(dMh)
call setup_rate_uncertainties(dCS_SM, dCS, dBR_SM, dBR)
call set_significance(3.0D0)
!--Set the Higgs mass pdf (1: box, 2: gaussian, 3: theory-box + exp-gaussian)
call set_pdf(2)
!----HiggsBounds/Signals effective couplings input.
! These have to be inserted for the model which we want to test, i.e. we would have
! to write an interface to set via arguments in the executables call, or reading
! in a text file, etc.
!----For now, we set them by hand to the SM values (for demonstration):
g2hjss_s=1d0
g2hjss_p=0d0
g2hjcc_s=1d0
g2hjcc_p=0d0
g2hjbb_s=1d0
g2hjbb_p=0d0
g2hjtt_s=1d0
g2hjtt_p=0d0
g2hjmumu_s=1d0
g2hjmumu_p=0d0
g2hjtautau_s=1d0
g2hjtautau_p=0d0
g2hjWW=1d0
g2hjZZ=1d0
g2hjZga=1d0
g2hjgaga=1d0
g2hjgg=1d0
g2hjggZ=1d0
g2hjhiZ=0d0
BR_hjhihi=0d0
BR_hjinvisible=0d0
Mh=dble(127.1)
GammaTotal=SMGamma_h(Mh)
!----Now, have to set the toy measurements for the peaks (also has to be interfaced!)
Nanalyses=16
allocate(Toys_muobs(Nanalyses), Toys_mhobs(Nanalyses))
Toys_muobs(1) = 0.8
Toys_muobs(2) = -1.7
Toys_muobs(3) = 0.9
Toys_muobs(4) = 1.0
Toys_muobs(5) = 0.2
Toys_muobs(6) = -1.0
Toys_muobs(7) = 2.0
Toys_muobs(8) = 0.1
Toys_muobs(9) = -0.2
Toys_muobs(10) = 1.0
Toys_muobs(11) = 3.0
Toys_muobs(12) = 1.0
Toys_muobs(13) = 0.1
Toys_muobs(14) = -1.2
Toys_muobs(15) = 2.0
Toys_muobs(16) = 1.0
Toys_mhobs(1) = 124.8
Toys_mhobs(2) = 126.7
Toys_mhobs(3) = 122.9
Toys_mhobs(4) = 134.0
Toys_mhobs(5) = 121.2
Toys_mhobs(6) = 125.0
Toys_mhobs(7) = 126.0
Toys_mhobs(8) = 127.1
Toys_mhobs(9) = 122.2
Toys_mhobs(10) = 124.0
Toys_mhobs(11) = 132.0
Toys_mhobs(12) = 122.0
Toys_mhobs(13) = 117.1
Toys_mhobs(14) = 123.2
Toys_mhobs(15) = 125.0
Toys_mhobs(16) = 126.0
call HiggsBounds_neutral_input_effC(Mh,GammaTotal, &
& g2hjss_s,g2hjss_p,g2hjcc_s,g2hjcc_p,g2hjbb_s,g2hjbb_p, &
& g2hjtt_s,g2hjtt_p, &
& g2hjmumu_s,g2hjmumu_p,g2hjtautau_s,g2hjtautau_p, &
& g2hjWW,g2hjZZ,g2hjZga,g2hjgaga,g2hjgg,g2hjggZ, &
& g2hjhiZ, BR_hjinvisible,BR_hjhihi)
!----Set now the (random) toy measurements for the peaks. In our case, every analysis
! has only one peak, so we can simply put the second and third argument to 1:
do ii=lbound(mutables,dim=1),ubound(mutables,dim=1)
call assign_toyvalues_to_mutable(ii, 1, 1, Toys_muobs(ii), Toys_mhobs(ii))
enddo
call run_HiggsSignals(Pvalue, Chisq, ndf, 'peak')
!This will collect the main HiggsSignals results together into one file
! write(fileid,*)i,Pvalue,Chisq,ndf
call finish_HiggsSignals
end program HSwithToys

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 1:16 PM (1 d, 1 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4022920
Default Alt Text
HSwithToys.f90 (5 KB)

Event Timeline