Index: trunk/HiggsBounds-5/HiggsBounds_subroutines.F90
===================================================================
--- trunk/HiggsBounds-5/HiggsBounds_subroutines.F90 (revision 581)
+++ trunk/HiggsBounds-5/HiggsBounds_subroutines.F90 (revision 582)
@@ -1,2854 +1,2858 @@
! This file is part of HiggsBounds
! -KW
!************************************************************
subroutine initialize_HiggsBounds(nHiggsneut,nHiggsplus,whichanalyses_in)
! This the first Higgsbounds subroutine that should be called
! by the user.
! It calls subroutines to read in the tables of Standard Model data,
! read in the tables of LEP, Tevatron and LHC data,
! set up lists of processes which should be checked against
! the experimental results, allocate arrays etc
! Arguments (input):
! * nHiggs= number of neutral Higgs in the model
! (see subroutine check_nH_nHplus in input.f90 for more details)
! * nHiggsplus= number of singly,positively charged Higgs in the model
! (see subroutine check_nH_nHplus in input.f90 for more details)
! * whichanalyses_in= which combination of experimental results to use
! (see subroutine check_whichanalyses in input.f90 for more details)
!************************************************************
use usefulbits, only : np,Hneut,Hplus,Chineut,Chiplus,debug,inputmethod, &
& theo,whichanalyses,HiggsBounds_info,just_after_run,BRdirectinput,&
& file_id_debug1,file_id_debug2,allocate_if_stats_required,run_HB_classic! ,inputsub
use input, only : setup_input,check_number_of_particles,check_whichanalyses
use S95tables, only : setup_S95tables,S95_t2
use likelihoods, only : setup_likelihoods
use theory_BRfunctions, only : setup_BRSM
use theory_XS_SM_functions, only : setup_XSSM
use channels, only : setup_channels
use output, only : setup_output
#ifdef enableCHISQ
use S95tables_type3, only : clsb_t3,fillt3needs_M2_gt_2M1
#endif
#if defined(NAGf90Fortran)
use F90_UNIX_IO, only : flush
#endif
!#define FORFITTINO
implicit none
!--------------------------------------input
integer,intent(in) :: nHiggsneut
! integer,intent(in),optional :: nHiggsplus
! character(LEN=5),intent(in),optional :: whichanalyses_in
integer,intent(in) :: nHiggsplus
character(LEN=5),intent(in) :: whichanalyses_in
!-----------------------------------internal
integer :: i
logical :: messages
!-------------------------------------------
! if((.not.present(nHiggsplus)).or.(.not.present(whichanalyses_in)))then
!Actually, this doesn't work as I wanted it to
!because if initialize_HiggsBounds is called in the old way, the program
!usually just crashes..... but leaving it in for now, in case
!some compilers accept it
! call attempting_to_use_an_old_HB_version('init')
! endif
#ifdef FORFITTINO
write(*,*)'The arguments passed to initialize_HiggsBounds are:'
write(*,*)'nHiggsneut=',nHiggsneut
write(*,*)'nHiggsplus=',nHiggsplus
write(*,*)'whichanalyses_in=','~'//trim(adjustl(whichanalyses_in))//'~'
#endif
#ifdef DEBUGGING
debug=.True.
#else
debug=.False.
#endif
messages=debug.or.(inputmethod=='datfile')
! inputmethod='subrout' !('datfile' or 'website' are also possible, but not here)
np(Hneut)=nHiggsneut
np(Hplus)=nHiggsplus
np(Chineut)=0! do not change this without contacting us first!
np(Chiplus)=0! do not change this without contacting us first!
whichanalyses=whichanalyses_in
if(inputmethod=='subrout') then
if(allocated(theo))then
stop 'subroutine HiggsBounds_initialize has already been called once'
endif
if(messages)write(*,*)'doing other preliminary tasks...' ; call flush(6)
call setup_input
! allocate(inputsub( 4 )) !(1)np(Hneut)>0 (2)np(Hplus)>0 (3)np(Chineut)>0 (4)np(Chineut)>0 and np(Chiplus)>0
! | np
! |Hneu Hcha Chineut Chiplus
! | ==0 ==0 ==0 ==0
! inputsub(1)%desc='HiggsBounds_neutral_input_*'
! inputsub(1)%req=req( 0, 1, 1, 1)
! inputsub(2)%desc='HiggsBounds_charged_input'
! inputsub(2)%req=req( 1, 0, 1, 1)
! inputsub(3)%desc='SUSYBounds_neutralinoonly_input'
! inputsub(3)%req=req( 1, 1, 0, 1)
! inputsub(4)%desc='SUSYBounds_neutralinochargino_input'
! inputsub(4)%req=req( 1, 1, 0, 0)
! do i=1,ubound(inputsub,dim=1)
! inputsub(i)%stat=0
! enddo
endif
#ifndef WEBVERSION
if(inputmethod.ne.'datfile') call HiggsBounds_info
if (run_HB_classic.EQV..True.) then
PRINT *, "run_HB_classic=True - HiggsBounds is running in classic mode"
endif
#endif
if(messages)write(*,*)'reading in Standard Model tables...' ; call flush(6)
call setup_BRSM
call setup_XSSM
if(messages)write(*,*)'reading in S95tables...' ; call flush(6)
call setup_S95tables
if(messages)write(*,*)'reading in likelihoods...' ; call flush(6)
call setup_likelihoods
if(messages)then
open(file_id_debug2,file='debug_predratio.txt')
open(file_id_debug1,file='debug_channels.txt')
endif
if(messages)write(*,*)'sorting out processes to be checked...'; call flush(6)
call setup_channels
if(messages)write(*,*)'preparing output arrays...' ; call flush(6)
call setup_output
#ifdef enableCHISQ
if(allocated(allocate_if_stats_required))then
call fillt3needs_M2_gt_2M1(clsb_t3,S95_t2)
endif
#endif
just_after_run=.False.
BRdirectinput=.False.
! contains
! ! | np
! ! |Hneu Hcha Chineut Chiplus
! ! | ==0 ==0 ==0 ==0
! function req(Hneu,Hcha, Chneu, Chcha)
! integer, intent(in) ::Hneu,Hcha, Chneu, Chcha
! integer :: req
!
! req=1
! if(np(Hneut)==0) req= Hneu * req
! if(np(Hplus)==0) req= Hcha * req
! if(np(Chineut)==0)req= Chneu * req
! if(np(Chiplus)==0)req= Chcha * req
!
! end function req
end subroutine initialize_HiggsBounds
!************************************************************
!************************************************************
! Version of initialize_HiggsBounds which takes an integer as
! the third argument. More useful for library linking to
! non-Fortran codes.
subroutine initialize_HiggsBounds_int(nHn,nHp,flag)
implicit none
integer nHn,nHp,flag
interface
subroutine initialize_HiggsBounds(nHiggsneut, nHiggsplus, whichanalyses_in)
integer,intent(in) :: nHiggsneut
integer,intent(in) :: nHiggsplus
character(LEN=5),intent(in) :: whichanalyses_in
! integer,intent(in),optional :: nHiggsplus
! character(LEN=5),intent(in),optional :: whichanalyses_in
end subroutine initialize_HiggsBounds
end interface
IF (flag.EQ.1) then
call initialize_HiggsBounds(nHn,nHp, "onlyL")
elseif (flag.EQ.2) then
call initialize_HiggsBounds(nHn,nHp, "onlyH")
elseif (flag.EQ.3) then
call initialize_HiggsBounds(nHn,nHp, "LandH")
elseif (flag.EQ.4) then
call initialize_HiggsBounds(nHn,nHp, "onlyP")
else
stop "Illegal value for flag in call to initialize_HB"
endif
end subroutine
!************************************************************
!************************************************************
subroutine attempting_to_use_an_old_HB_version(subroutineid)
use usefulbits, only : vers
character(len=4),intent(in) :: subroutineid
select case(subroutineid)
case('init')
write(*,*)'The subroutine initialize_HiggsBounds has been called with the'
write(*,*)'wrong number of arguments. It should be called as:'
write(*,*)'initialize_HiggsBounds(nHiggsneut,nHiggsplus,whichanalyses)'
write(*,*)
write(*,*)'Note that in early versions of HiggsBounds (HB 1.*.*)'
write(*,*)'this subroutine was called as:'
write(*,*)'initialize_HiggsBounds(nHiggsneut,whichanalyses)'
write(*,*)
case('effC','part','hadr')
write(*,*)'The subroutine run_HiggsBounds_'//subroutineid//' has been discontinued in this'
write(*,*)'version of HiggsBounds.'
case default
stop 'wrong input to subroutine attempting_to_use_an_old_HB_version'
end select
write(*,*)'If you have code written for use with HB 1.*.*, you have two choices:'
write(*,*)
write(*,*)' (1) You can edit your code, such that it works with this'
write(*,*)' version of HiggsBounds (HB'//trim(adjustl(vers))//').'
write(*,*)' This has the advantage that you can test your model against many, many'
write(*,*)' more Higgs search limits , including charged Higgs search limits.'
write(*,*)' See the updated manual for more information.'
write(*,*)
write(*,*)' (2) You can download the most recent HB 1.*.* from the HiggsBounds'
write(*,*)' website. This contains the LEP Higgs search limits which are'
write(*,*)' generally the most useful when constraining new physics models.'
write(*,*)' We will continue to support this code.'
stop 'Incorrect call to a HiggsBounds subroutine.'
end subroutine attempting_to_use_an_old_HB_version
!************************************************************
subroutine HiggsBounds_input_SLHA(infile)
! This subroutine can be called by the user after subroutine initialize_HiggsBounds
! has been called.
! Arguments (input): SLHA filename
!************************************************************
use usefulbits, only : whichinput,infile1,theo,g2,effC,just_after_run, &
& np,Hneut,Hplus! ,inputsub
use extra_bits_for_SLHA
#if defined(NAGf90Fortran)
use F90_UNIX_IO, only : flush
#endif
implicit none
!----------------------------------------input
character(len=300),intent(in) :: infile
!--------------------------------------internal
integer :: n
!----------------------------------------------
whichinput='SLHA'
! if(np(Hneut).gt.0)inputsub(Hneut)%stat=inputsub(Hneut)%stat+1
! if(np(Hplus).gt.0)inputsub(Hplus)%stat=inputsub(Hplus)%stat+1
! note: can't be used for charginos or neutralinos yet
n=1
if(.not.allocated(theo))then
stop 'subroutine HiggsBounds_initialize must be called first'
endif
infile1=infile
call getSLHAdata(theo(n),effC(n),infile1)
just_after_run=.False.
end subroutine HiggsBounds_input_SLHA
!************************************************************
!
! HB5 GENERAL INPUT ROUTINES
!
!************************************************************
subroutine HiggsBounds_neutral_input_properties(Mh,GammaTotal_hj,CP_value)
!************************************************************
use usefulbits, only : theo,np,Hneut,just_after_run!,inputsub
#if defined(NAGf90Fortran)
use F90_UNIX_IO, only : flush
#endif
implicit none
!----------------------------------------input
double precision,intent(in) :: Mh(np(Hneut)),GammaTotal_hj(np(Hneut)),CP_value(np(Hneut))
!--------------------------------------internal
integer :: n
! integer :: subtype
!----------------------------------------------
! subtype=1
n=1
! inputsub(subtype)%stat=inputsub(subtype)%stat+1
if(.not.allocated(theo))then
stop 'subroutine HiggsBounds_initialize must be called first'
endif
if(np(Hneut).eq.0)then
write(*,*)'subroutine HiggsBounds_neutral_input_mass_width should'
write(*,*)'only be called if np(Hneut)>0'
stop 'error in subroutine HiggsBounds_neutral_input_mass_width'
endif
theo(n)%particle(Hneut)%M = Mh
theo(n)%particle(Hneut)%Mc = Mh
theo(n)%particle(Hneut)%GammaTot= GammaTotal_hj
theo(n)%CP_value = CP_value
just_after_run=.False.
end subroutine HiggsBounds_neutral_input_properties
!************************************************************
subroutine 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)!, &
! & BR_hjinvisible,BR_hjhihi_nHbynH)
! New neutral Higgs effective coupling input routine.
! BR's are set separately.
!************************************************************
use usefulbits, only : theo,np,Hneut,effC,whichinput,just_after_run!,inputsub
#if defined(NAGf90Fortran)
use F90_UNIX_IO, only : flush
#endif
implicit none
!----------------------------------------input
double precision,intent(in) :: &!Mh( np(Hneut) ),GammaTotal_hj( np(Hneut) ),&
& ghjss_s( np(Hneut) ),ghjss_p( np(Hneut) ), &
& ghjcc_s( np(Hneut) ),ghjcc_p( np(Hneut) ), &
& ghjbb_s( np(Hneut) ),ghjbb_p( np(Hneut) ), &
& ghjtt_s( np(Hneut) ),ghjtt_p( np(Hneut) ), &
& ghjmumu_s( np(Hneut) ),ghjmumu_p( np(Hneut) ), &
& ghjtautau_s( np(Hneut) ),ghjtautau_p( np(Hneut) ), &
& ghjWW( np(Hneut) ),ghjZZ( np(Hneut) ),ghjZga( np(Hneut) ), &
& ghjgaga( np(Hneut) ),ghjgg( np(Hneut) ), &
& ghjhiZ(np(Hneut),np(Hneut))
! & BR_hjinvisible( np(Hneut) ),BR_hjhihi_nHbynH(np(Hneut),np(Hneut))
!--------------------------------------internal
integer :: n
! integer :: subtype
!----------------------------------------------
whichinput='effC'
! subtype=1
n=1
! inputsub(subtype)%stat=inputsub(subtype)%stat+1
if(.not.allocated(theo))then
stop 'subroutine HiggsBounds_initialize must be called first'
endif
if(np(Hneut).eq.0)then
write(*,*)'subroutine HiggsBounds_neutral_input_effC should'
write(*,*)'only be called if np(Hneut)>0'
stop 'error in subroutine HiggsBounds_neutral_input_effC'
endif
! theo(n)%particle(Hneut)%M = Mh
! theo(n)%particle(Hneut)%Mc = Mh
! theo(n)%particle(Hneut)%GammaTot= GammaTotal_hj
effC(n)%hjss_s = ghjss_s
effC(n)%hjss_p = ghjss_p
effC(n)%hjcc_s = ghjcc_s
effC(n)%hjcc_p = ghjcc_p
effC(n)%hjbb_s = ghjbb_s
effC(n)%hjbb_p = ghjbb_p
effC(n)%hjtt_s = ghjtt_s
effC(n)%hjtt_p = ghjtt_p
effC(n)%hjmumu_s = ghjmumu_s
effC(n)%hjmumu_p = ghjmumu_p
effC(n)%hjtautau_s = ghjtautau_s
effC(n)%hjtautau_p = ghjtautau_p
effC(n)%hjWW = ghjWW
effC(n)%hjZZ = ghjZZ
effC(n)%hjZga = ghjZga
effC(n)%hjgaga = ghjgaga
effC(n)%hjgg = ghjgg
! g2(n)%hjggZ = g2hjggZ
effC(n)%hjhiZ = ghjhiZ
! theo(n)%BR_hjinvisible = BR_hjinvisible
! theo(n)%BR_hjhihi = BR_hjhihi_nHbynH
just_after_run=.False.
end subroutine HiggsBounds_neutral_input_effC
!************************************************************
subroutine HiggsBounds_neutral_input_SMBR(BR_hjss,BR_hjcc,BR_hjbb, &
& BR_hjtt,BR_hjmumu, &
& BR_hjtautau,BR_hjWW, &
& BR_hjZZ,BR_hjZga,BR_hjgaga, &
& BR_hjgg)
! Input for the SM branching ratios
!************************************************************
use usefulbits, only : theo,np,Hneut,whichinput,just_after_run,BRdirectinput
#if defined(NAGf90Fortran)
use F90_UNIX_IO, only : flush
#endif
implicit none
!----------------------------------------input
double precision,intent(in) :: BR_hjss( np(Hneut) ),BR_hjcc( np(Hneut) ), &
& BR_hjbb( np(Hneut) ),BR_hjtt( np(Hneut) ), &
& BR_hjmumu( np(Hneut) ),BR_hjtautau( np(Hneut) ), &
& BR_hjWW( np(Hneut) ),BR_hjZZ( np(Hneut) ), &
& BR_hjZga( np(Hneut) ),BR_hjgaga( np(Hneut) ), &
& BR_hjgg( np(Hneut) )
!-------------------------------------internal
integer :: n
!---------------------------------------------
n=1
if(.not.allocated(theo))then
stop 'subroutine HiggsBounds_initialize must be called first'
endif
if(np(Hneut).eq.0)then
write(*,*)'subroutine HiggsBounds_neutral_input_SMBR should'
write(*,*)'only be called if np(Hneut)>0'
stop 'error in subroutine HiggsBounds_neutral_input_SMBR'
endif
!
theo(n)%BR_hjss = BR_hjss
theo(n)%BR_hjcc = BR_hjcc
theo(n)%BR_hjbb = BR_hjbb
theo(n)%BR_hjtt = BR_hjtt
theo(n)%BR_hjmumu = BR_hjmumu
theo(n)%BR_hjtautau = BR_hjtautau
theo(n)%BR_hjWW = BR_hjWW
theo(n)%BR_hjZZ = BR_hjZZ
theo(n)%BR_hjZga = BR_hjZga
theo(n)%BR_hjgaga = BR_hjgaga
theo(n)%BR_hjgg = BR_hjgg
just_after_run=.False.
BRdirectinput=.True.
end subroutine HiggsBounds_neutral_input_SMBR
!************************************************************
subroutine HiggsBounds_neutral_input_nonSMBR(BR_hjinvisible,BR_hkhjhi,BR_hjhiZ,&
& BR_hjemu,BR_hjetau,BR_hjmutau,BR_hjHpiW)
! Input for the non-SM branching ratios
!************************************************************
use usefulbits, only : theo,np,Hneut,Hplus,whichinput,just_after_run!,inputsub
#if defined(NAGf90Fortran)
use F90_UNIX_IO, only : flush
#endif
implicit none
!----------------------------------------input
double precision,intent(in) :: BR_hjinvisible( np(Hneut) ), &
& BR_hkhjhi(np(Hneut),np(Hneut),np(Hneut)), &
& BR_hjhiZ(np(Hneut),np(Hneut)), &
& BR_hjemu(np(Hneut)),&
& BR_hjetau(np(Hneut)),&
& BR_hjmutau(np(Hneut))
double precision,intent(in) :: BR_hjHpiW(np(Hneut),np(Hplus))
!--------------------------------------internal
integer :: n
n=1
if(.not.allocated(theo))then
stop 'subroutine HiggsBounds_initialize must be called first'
endif
if(np(Hneut).eq.0)then
write(*,*)'subroutine HiggsBounds_neutral_input_nonSMBR should'
write(*,*)'only be called if np(Hneut)>0'
stop 'error in subroutine HiggsBounds_neutral_input_nonSMBR'
endif
theo(n)%BR_hjinvisible = BR_hjinvisible
theo(n)%BR_hkhjhi = BR_hkhjhi
theo(n)%BR_hjhiZ = BR_hjhiZ
theo(n)%BR_hjemu = BR_hjemu
theo(n)%BR_hjetau = BR_hjetau
theo(n)%BR_hjmutau = BR_hjmutau
! write(*,*) "HiggsBounds_neutral_input_nonSMBR"
! write(*,*) theo(n)%BR_hjHpiW
! if(present(BR_hjHpiW)) then
theo(n)%BR_hjHpiW = BR_hjHpiW
! endif
just_after_run=.False.
end subroutine HiggsBounds_neutral_input_nonSMBR
!************************************************************
subroutine HiggsBounds_neutral_input_LEP(XS_ee_hjZ_ratio,XS_ee_bbhj_ratio, &
XS_ee_tautauhj_ratio,XS_ee_hjhi_ratio)
!************************************************************
use usefulbits, only : theo,np,Hneut,whichinput,just_after_run
implicit none
!---------------------------------------------
double precision, intent(in) :: XS_ee_hjZ_ratio(np(Hneut)),&
XS_ee_bbhj_ratio(np(Hneut)),XS_ee_tautauhj_ratio(np(Hneut)),&
XS_ee_hjhi_ratio(np(Hneut),np(Hneut))
!-------------------------------------internal
integer :: n
!---------------------------------------------
whichinput='hadr' ! What if effC otherwise used?
n=1
if(.not.allocated(theo))then
stop 'subroutine HiggsBounds_initialize must be called first'
endif
if(np(Hneut).eq.0)then
write(*,*)'subroutine HiggsBounds_neutral_input_LEP should'
write(*,*)'only be called if np(Hneut)>0'
stop 'error in subroutine HiggsBounds_neutral_input_LEP'
endif
theo(n)%lep%XS_hjZ_ratio = XS_ee_hjZ_ratio
theo(n)%lep%XS_bbhj_ratio = XS_ee_bbhj_ratio
theo(n)%lep%XS_tautauhj_ratio = XS_ee_tautauhj_ratio
theo(n)%lep%XS_hjhi_ratio = XS_ee_hjhi_ratio
just_after_run=.False.
end subroutine HiggsBounds_neutral_input_LEP
!************************************************************
subroutine HiggsBounds_neutral_input_hadr(collider,CS_hj_ratio, &
& CS_gg_hj_ratio,CS_bb_hj_ratio, &
& CS_hjW_ratio,CS_hjZ_ratio, &
& CS_vbf_ratio,CS_tthj_ratio, &
& CS_thj_tchan_ratio,CS_thj_schan_ratio, &
& CS_hjhi)
!************************************************************
use usefulbits, only : theo,np,Hneut,whichinput,just_after_run,hadroncolliderdataset
#if defined(NAGf90Fortran)
use F90_UNIX_IO, only : flush
#endif
implicit none
double precision,intent(in) :: CS_hj_ratio( np(Hneut) ), &
& CS_gg_hj_ratio( np(Hneut) ),CS_bb_hj_ratio( np(Hneut) ), &
& CS_hjW_ratio( np(Hneut) ) ,CS_hjZ_ratio( np(Hneut) ), &
& CS_vbf_ratio( np(Hneut) ) ,CS_tthj_ratio( np(Hneut) ), &
& CS_thj_tchan_ratio( np(Hneut) ),CS_thj_schan_ratio( np(Hneut) ), &
& CS_hjhi( np(Hneut), np(Hneut) )
integer, intent(in) :: collider
!-------------------------------------internal
integer :: n
! type(hadroncolliderdataset) :: dataset
!---------------------------------------------
whichinput='hadr'
n=1
if(.not.allocated(theo))then
stop 'subroutine HiggsBounds_initialize must be called first'
endif
if(np(Hneut).eq.0)then
write(*,*)'subroutine HiggsBounds_neutral_input_hadr should'
write(*,*)'only be called if np(Hneut)>0'
stop 'error in subroutine HiggsBounds_neutral_input_hadr'
endif
select case(collider)
case(2)
call set_input(theo(n)%tev,CS_hj_ratio, &
& CS_gg_hj_ratio,CS_bb_hj_ratio, &
& CS_hjW_ratio,CS_hjZ_ratio, &
& CS_vbf_ratio,CS_tthj_ratio, &
& CS_thj_tchan_ratio,CS_thj_schan_ratio, &
& CS_hjhi)
case(7)
call set_input(theo(n)%lhc7,CS_hj_ratio, &
& CS_gg_hj_ratio,CS_bb_hj_ratio, &
& CS_hjW_ratio,CS_hjZ_ratio, &
& CS_vbf_ratio,CS_tthj_ratio, &
& CS_thj_tchan_ratio,CS_thj_schan_ratio, &
& CS_hjhi)
case(8)
call set_input(theo(n)%lhc8,CS_hj_ratio, &
& CS_gg_hj_ratio,CS_bb_hj_ratio, &
& CS_hjW_ratio,CS_hjZ_ratio, &
& CS_vbf_ratio,CS_tthj_ratio, &
& CS_thj_tchan_ratio,CS_thj_schan_ratio, &
& CS_hjhi)
case(13)
call set_input(theo(n)%lhc13,CS_hj_ratio, &
& CS_gg_hj_ratio,CS_bb_hj_ratio, &
& CS_hjW_ratio,CS_hjZ_ratio, &
& CS_vbf_ratio,CS_tthj_ratio, &
& CS_thj_tchan_ratio,CS_thj_schan_ratio, &
& CS_hjhi)
case default
stop 'wrong input for collider to subroutine HiggsBounds_neutral_input_hadr'
end select
just_after_run=.False.
contains
subroutine set_input(dataset,CS_hj_ratio, &
& CS_gg_hj_ratio,CS_bb_hj_ratio, &
& CS_hjW_ratio,CS_hjZ_ratio, &
& CS_vbf_ratio,CS_tthj_ratio, &
& CS_thj_tchan_ratio,CS_thj_schan_ratio, &
& CS_hjhi)
implicit none
double precision,intent(in) :: CS_hj_ratio( np(Hneut) ), &
& CS_gg_hj_ratio( np(Hneut) ),CS_bb_hj_ratio( np(Hneut) ), &
& CS_hjW_ratio( np(Hneut) ) ,CS_hjZ_ratio( np(Hneut) ), &
& CS_vbf_ratio( np(Hneut) ) ,CS_tthj_ratio( np(Hneut) ), &
& CS_thj_tchan_ratio( np(Hneut) ),CS_thj_schan_ratio( np(Hneut) ), &
& CS_hjhi( np(Hneut), np(Hneut) )
type(hadroncolliderdataset) :: dataset
dataset%XS_hj_ratio = CS_hj_ratio
dataset%XS_gg_hj_ratio = CS_gg_hj_ratio
dataset%XS_bb_hj_ratio = CS_bb_hj_ratio
dataset%XS_hjW_ratio = CS_hjW_ratio
dataset%XS_hjZ_ratio = CS_hjZ_ratio
dataset%XS_gg_hjZ_ratio = CS_hjZ_ratio ! assume here that the SM-normalized ratio is equal!
dataset%XS_qq_hjZ_ratio = CS_hjZ_ratio ! assume here that the SM-normalized ratio is equal!
dataset%XS_vbf_ratio = CS_vbf_ratio
dataset%XS_tthj_ratio = CS_tthj_ratio
dataset%XS_thj_tchan_ratio = CS_thj_tchan_ratio
dataset%XS_thj_schan_ratio = CS_thj_schan_ratio
dataset%XS_hjhi = CS_hjhi
end subroutine set_input
end subroutine HiggsBounds_neutral_input_hadr
!************************************************************
! subroutine HiggsBounds_neutral_input_ZHprod(collider,CS_qq_hjZ_ratio,CS_gg_hjZ_ratio)
!************************************************************
!************************************************************
subroutine HiggsBounds_neutral_input_hadr_channelrates(collider,channelrates)
! n.b.: Elements of the matrix channelrates with values < 0 will be overwritten
! by XS times BR using the narrow width approximation.
!************************************************************
use usefulbits, only : theo,np,Hneut,whichinput,just_after_run,hadroncolliderdataset,&
& Nprod,Ndecay
#if defined(NAGf90Fortran)
use F90_UNIX_IO, only : flush
#endif
implicit none
double precision,intent(in) :: channelrates(np(Hneut),Nprod,Ndecay)
integer, intent(in) :: collider
!-------------------------------------internal
integer :: n
!---------------------------------------------
whichinput='hadr'
n=1
if(.not.allocated(theo))then
stop 'subroutine HiggsBounds_initialize must be called first'
endif
if(np(Hneut).eq.0)then
write(*,*)'subroutine HiggsBounds_neutral_input_hadr_channelrates should'
write(*,*)'only be called if np(Hneut)>0'
stop 'error in subroutine HiggsBounds_neutral_input_hadr'
endif
select case(collider)
case(2)
theo(n)%tev%channelrates_tmp=channelrates
case(7)
theo(n)%lhc7%channelrates_tmp=channelrates
case(8)
theo(n)%lhc8%channelrates_tmp=channelrates
case(13)
theo(n)%lhc13%channelrates_tmp=channelrates
case default
stop 'wrong input for collider to subroutine HiggsBounds_neutral_input_hadr_channelrates'
end select
just_after_run=.False.
end subroutine HiggsBounds_neutral_input_hadr_channelrates
!************************************************************
subroutine HiggsBounds_charged_input(Mhplus,GammaTotal_Hpj, &
& CS_ee_HpjHmj_ratio, &
& BR_tWpb,BR_tHpjb, &
& BR_Hpjcs,BR_Hpjcb,BR_Hpjtaunu,BR_Hpjtb, &
& BR_HpjWZ,BR_HpjhiW)
! This subroutine can be called by the user after subroutine
! initialize_HiggsBounds has been called.
! Arguments (input): theoretical predictions (see manual for definitions)
! HB-5: Extended input by charged Higgs decays to tb, WZ, hiW
!************************************************************
use usefulbits, only : theo,np,Hplus,Hneut,just_after_run!,inputsub
#if defined(NAGf90Fortran)
use F90_UNIX_IO, only : flush
#endif
implicit none
!----------------------------------------input
double precision,intent(in) :: Mhplus( np(Hplus) ),GammaTotal_Hpj( np(Hplus) ), &
& CS_ee_HpjHmj_ratio( np(Hplus) ), &
& BR_tWpb,BR_tHpjb( np(Hplus) ), &
& BR_Hpjcs( np(Hplus) ),BR_Hpjcb( np(Hplus) ),BR_Hpjtaunu( np(Hplus) ), &
& BR_Hpjtb( np(Hplus) ),BR_HpjWZ( np(Hplus) )
double precision,intent(in) :: BR_HpjhiW(np(Hplus),np(Hneut))
!--------------------------------------internal
integer :: n
! integer :: j
! integer :: subtype
!----------------------------------------------
n=1
! subtype=2
! inputsub(subtype)%stat=inputsub(subtype)%stat+1
if(.not.allocated(theo))then
stop 'subroutine HiggsBounds_initialize must be called first'
endif
if(np(Hplus).eq.0)then
write(*,*)'subroutine HiggsBounds_charged_input should'
write(*,*)'only be called if np(Hplus)>0'
stop 'error in subroutine HiggsBounds_charged_input'
endif
theo(n)%particle(Hplus)%M = Mhplus
theo(n)%particle(Hplus)%Mc = Mhplus
theo(n)%particle(Hplus)%GammaTot= GammaTotal_Hpj
theo(n)%lep%XS_HpjHmj_ratio = CS_ee_HpjHmj_ratio
theo(n)%BR_tWpb = BR_tWpb
theo(n)%BR_tHpjb = BR_tHpjb
theo(n)%BR_Hpjcs = BR_Hpjcs
theo(n)%BR_Hpjcb = BR_Hpjcb
theo(n)%BR_Hpjtaunu = BR_Hpjtaunu
theo(n)%BR_Hpjtb = BR_Hpjtb
theo(n)%BR_HpjWZ = BR_HpjWZ
theo(n)%BR_HpjhiW = BR_HpjhiW
! write(*,*) 'HiggsBounds_charged_input'
! write(*,*) theo(n)%BR_HpjhiW
! if(present(BR_HpjhiW_in)) then
! write(*,*) "BR_HpjhiW given: ", BR_HpjhiW_in
! theo(n)%BR_HpjhiW = BR_HpjhiW_in
! else
! if(np(Hneut).gt.0) then
! theo(n)%BR_HpjhiW = 0.0D0
! endif
! endif
! write(*,*) theo(n)%BR_HpjhiW
just_after_run=.False.
end subroutine HiggsBounds_charged_input
!************************************************************
subroutine HiggsBounds_charged_input_hadr(collider, CS_Hpjtb, CS_Hpjcb, &
& CS_Hpjbjet, CS_Hpjcjet, CS_Hpjjetjet, CS_HpjW, &
& CS_HpjZ, CS_vbf_Hpj, CS_HpjHmj, CS_Hpjhi)
! This subroutine can be called by the user after subroutine initialize_HiggsBounds
! has been called.
! Arguments (input): theoretical predictions (see manual for definitions)
!************************************************************
use usefulbits, only : theo,np,Hplus,Hneut,just_after_run,hadroncolliderdataset!,inputsub
#if defined(NAGf90Fortran)
use F90_UNIX_IO, only : flush
#endif
implicit none
!----------------------------------------input
double precision,intent(in) :: CS_Hpjtb( np(Hplus) ), CS_Hpjcb( np(Hplus) ),&
& CS_Hpjbjet( np(Hplus) ), CS_Hpjcjet( np(Hplus) ),&
& CS_Hpjjetjet( np(Hplus) ), &
& CS_HpjW( np(Hplus) ), CS_HpjZ( np(Hplus) ),&
& CS_vbf_Hpj( np(Hplus) ), CS_HpjHmj( np(Hplus) )
integer, intent(in) :: collider
double precision,intent(in) :: CS_Hpjhi( np(Hplus),np(Hneut) )
!--------------------------------------internal
integer :: n
!----------------------------------------------
n=1
if(.not.allocated(theo))then
stop 'subroutine HiggsBounds_initialize must be called first'
endif
if(np(Hplus).eq.0)then
write(*,*)'subroutine HiggsBounds_charged_input should'
write(*,*)'only be called if np(Hplus)>0'
stop 'error in subroutine HiggsBounds_charged_input'
endif
select case(collider)
case(2)
! if(present(CS_Hpjhi)) then
call set_input(theo(n)%tev,CS_Hpjtb, CS_Hpjcb, CS_Hpjbjet, &
& CS_Hpjcjet, CS_Hpjjetjet, CS_HpjW, &
& CS_HpjZ, CS_vbf_Hpj, CS_HpjHmj, CS_Hpjhi)
! else
! call set_input(theo(n)%tev,CS_Hpjtb, CS_Hpjbjet, CS_HpjW, &
! & CS_HpjZ, CS_vbf_Hpj, CS_HpjHmj)
! endif
case(7)
! if(present(CS_Hpjhi)) then
call set_input(theo(n)%lhc7,CS_Hpjtb, CS_Hpjcb, CS_Hpjbjet, &
& CS_Hpjcjet, CS_Hpjjetjet, CS_HpjW, &
& CS_HpjZ, CS_vbf_Hpj, CS_HpjHmj, CS_Hpjhi)
! else
! call set_input(theo(n)%lhc7,CS_Hpjtb, CS_Hpjbjet, CS_HpjW, &
! & CS_HpjZ, CS_vbf_Hpj, CS_HpjHmj)
! endif
case(8)
! if(present(CS_Hpjhi)) then
call set_input(theo(n)%lhc8,CS_Hpjtb, CS_Hpjcb, CS_Hpjbjet, &
& CS_Hpjcjet, CS_Hpjjetjet, CS_HpjW, &
& CS_HpjZ, CS_vbf_Hpj, CS_HpjHmj, CS_Hpjhi)
! else
! call set_input(theo(n)%lhc8,CS_Hpjtb, CS_Hpjbjet, CS_HpjW, &
! & CS_HpjZ, CS_vbf_Hpj, CS_HpjHmj)
! endif
case(13)
! if(present(CS_Hpjhi)) then
call set_input(theo(n)%lhc13,CS_Hpjtb, CS_Hpjcb, CS_Hpjbjet, &
& CS_Hpjcjet, CS_Hpjjetjet, CS_HpjW, &
& CS_HpjZ, CS_vbf_Hpj, CS_HpjHmj, CS_Hpjhi)
! else
! call set_input(theo(n)%lhc13,CS_Hpjtb, CS_Hpjbjet, CS_HpjW, &
! & CS_HpjZ, CS_vbf_Hpj, CS_HpjHmj)
! endif
case default
stop 'wrong input for collider to subroutine HiggsBounds_charged_input_hadr'
end select
just_after_run=.False.
contains
subroutine set_input(dataset,CS_Hpjtb, CS_Hpjcb, CS_Hpjbjet, &
& CS_Hpjcjet, CS_Hpjjetjet, CS_HpjW, &
& CS_HpjZ, CS_vbf_Hpj, CS_HpjHmj, CS_Hpjhi)
double precision,intent(in) :: CS_Hpjtb( np(Hplus) ), CS_Hpjcb( np(Hplus) ),&
& CS_Hpjbjet( np(Hplus) ), CS_Hpjcjet( np(Hplus) ),&
& CS_Hpjjetjet( np(Hplus) ), &
& CS_HpjW( np(Hplus) ), CS_HpjZ( np(Hplus) ),&
& CS_vbf_Hpj( np(Hplus) ), CS_HpjHmj( np(Hplus) )
double precision,intent(in) :: CS_Hpjhi( np(Hplus),np(Hneut) )
type(hadroncolliderdataset) :: dataset
dataset%XS_Hpjtb = CS_Hpjtb
dataset%XS_Hpjcb = CS_Hpjcb
dataset%XS_Hpjbjet = CS_Hpjbjet
dataset%XS_Hpjcjet = CS_Hpjcjet
dataset%XS_Hpjjetjet = CS_Hpjjetjet
dataset%XS_vbf_Hpj = CS_vbf_Hpj
dataset%XS_HpjW = CS_HpjW
dataset%XS_HpjZ = CS_HpjZ
dataset%XS_HpjHmj = CS_HpjHmj
! if(present(CS_Hpjhi)) then
dataset%XS_Hpjhi = CS_Hpjhi
! endif
end subroutine set_input
end subroutine HiggsBounds_charged_input_hadr
!************************************************************
subroutine HiggsBounds_get_neutral_hadr_CS(i,collider,&
& singleH, ggH, bbH, VBF, WH, ZH, ttH, tH_tchan, tH_schan)
use usefulbits, only : theo, np, Hneut, hadroncolliderdataset
implicit none
integer, intent(in) :: i, collider
double precision, intent(out) :: singleH, ggH, bbH, VBF, WH, ZH, ttH, tH_tchan, tH_schan
if(.not.allocated(theo))then
stop 'subroutine HiggsBounds_initialize must be called first'
endif
if(i.gt.np(Hneut)) then
write(*,"(A,I2,A)") 'WARNING: Requested neutral Higgs h',i,' not part of the model!'
else
select case(collider)
case(2)
call get_cross_section(theo(1)%tev,i, singleH, ggH, bbH, VBF, WH, ZH, ttH, tH_tchan, tH_schan)
case(7)
call get_cross_section(theo(1)%lhc7,i, singleH, ggH, bbH, VBF, WH, ZH, ttH, tH_tchan, tH_schan)
case(8)
call get_cross_section(theo(1)%lhc8,i, singleH, ggH, bbH, VBF, WH, ZH, ttH, tH_tchan, tH_schan)
case(13)
call get_cross_section(theo(1)%lhc13,i, singleH, ggH, bbH, VBF, WH, ZH, ttH, tH_tchan, tH_schan)
case default
stop 'wrong input for collider to subroutine HiggsBounds_get_neutral_SMnormalizedCS'
end select
endif
contains
subroutine get_cross_section(dataset,i, singleH, ggH, bbH, VBF, WH, ZH, ttH, tH_tchan, tH_schan)
integer, intent(in) :: i
double precision, intent(inout) :: singleH, ggH, bbH, VBF, WH, ZH, ttH, tH_tchan, tH_schan
type(hadroncolliderdataset) :: dataset
singleH = dataset%XS_hj_ratio(i)
ggH = dataset%XS_gg_hj_ratio(i)
bbH = dataset%XS_bb_hj_ratio(i)
VBF = dataset%XS_vbf_ratio(i)
WH = dataset%XS_hjW_ratio(i)
ZH = dataset%XS_hjZ_ratio(i)
ttH = dataset%XS_tthj_ratio(i)
tH_tchan = dataset%XS_thj_tchan_ratio(i)
tH_schan = dataset%XS_thj_schan_ratio(i)
end subroutine get_cross_section
!************************************************************
end subroutine HiggsBounds_get_neutral_hadr_CS
!************************************************************
subroutine HiggsBounds_get_neutral_BR(i,BR_hjss,BR_hjcc,BR_hjbb,&
& BR_hjtt,BR_hjmumu,BR_hjtautau,BR_hjWW,BR_hjZZ,BR_hjZga,&
& BR_hjgaga,BR_hjgg)
use usefulbits, only : theo, np, Hneut
implicit none
integer, intent(in) :: i
double precision, intent(out) :: BR_hjss,BR_hjcc,BR_hjbb,&
& BR_hjtt,BR_hjmumu,BR_hjtautau,BR_hjWW,BR_hjZZ,BR_hjZga,&
& BR_hjgaga,BR_hjgg
if(.not.allocated(theo))then
stop 'subroutine HiggsBounds_initialize must be called first'
endif
if(i.gt.np(Hneut)) then
write(*,"(A,I2,A)") 'WARNING: Requested neutral Higgs h',i,' not part of the model!'
else
BR_hjss = theo(1)%BR_hjss(i)
BR_hjcc = theo(1)%BR_hjcc(i)
BR_hjbb = theo(1)%BR_hjbb(i)
BR_hjtt = theo(1)%BR_hjtt(i)
BR_hjmumu = theo(1)%BR_hjmumu(i)
BR_hjtautau = theo(1)%BR_hjtautau(i)
BR_hjWW = theo(1)%BR_hjWW(i)
BR_hjZZ = theo(1)%BR_hjZZ(i)
BR_hjZga = theo(1)%BR_hjZga(i)
BR_hjgaga = theo(1)%BR_hjgaga(i)
BR_hjgg = theo(1)%BR_hjgg(i)
endif
end subroutine HiggsBounds_get_neutral_BR
!************************************************************
subroutine HiggsBounds_set_mass_uncertainties(dMhneut, dMhch)
!************************************************************
! Assigns the mass uncertainties in the subroutine version.
!
use usefulbits, only : theo,np,Hneut,Hplus
implicit none
double precision, intent(in) :: dMhneut(np(Hneut))
double precision, intent(in) :: dMhch(np(Hplus))
theo(1)%particle(Hneut)%dMh = dMhneut
theo(1)%particle(Hplus)%dMh = dMhch
end subroutine HiggsBounds_set_mass_uncertainties
!************************************************************
subroutine get_mass_variation_param(n)
use usefulbits, only : theo,np,Hneut,Hplus,diffMhneut,diffMhch,ndmh,dmhsteps,small_mh
implicit none
integer, intent(in) :: n
double precision :: dMhneut(np(Hneut))
double precision :: dMhch(np(Hplus))
integer :: km(np(Hneut)+np(Hplus))
integer :: dm(dmhsteps**(np(Hneut)+np(Hplus)),np(Hneut)+np(Hplus))
integer i,j,k,kp
if(np(Hneut).gt.0) dMhneut = theo(n)%particle(Hneut)%dMh
if(np(Hplus).gt.0) dMhch = theo(n)%particle(Hplus)%dMh
if (modulo(dmhsteps,2).NE.1) then
stop 'Wrong number of steps in set_mass_uncertainty: must be odd (>=3)'
endif
ndmh = 0
do i=1,np(Hneut)
IF (dMhneut(i).GT.small_mh) THEN
ndmh = ndmh + 1
ENDIF
km(i)=-(dmhsteps-1)/2
enddo
do i=1,np(Hplus)
IF (dMhch(i).GT.small_mh) ndmh = ndmh + 1
km(i+np(Hneut))=-(dmhsteps-1)/2
enddo
IF (ndmh.EQ.0) THEN
RETURN
ENDIF
! print *, "Number of mass uncertainties: ", ndmh
if(allocated(diffMhneut)) deallocate(diffMhneut)
if(allocated(diffMhch)) deallocate(diffMhch)
allocate(diffMhneut(dmhsteps**(np(Hneut)+np(Hplus)),np(Hneut)))
allocate(diffMhch(dmhsteps**(np(Hneut)+np(Hplus)),np(Hplus)))
k = 1
do i=1,dmhsteps**ndmh
do j=1,ndmh
dm(i,j) = km(j)
enddo
km(k) = km(k)+1
do j=2,ndmh
IF (modulo(i,dmhsteps**(j-1)).EQ.0) THEN
km(j) = km(j)+1
km(j-1) = -1
ENDIF
ENDDO
enddo
do i=1,dmhsteps**ndmh
k=1
do j=1,np(Hneut)
IF (dMhneut(j).GT.small_mh) THEN
diffMhneut(i,j)=theo(n)%particle(Hneut)%M(j)+dm(i,k)*dMhneut(k)/((dmhsteps-1)/2)
k = k +1
ELSE
diffMhneut(i,j)=theo(n)%particle(Hneut)%M(j)
ENDIF
enddo
kp = k
do j=1,np(Hplus)
IF (dMhch(j).GT.small_mh) THEN
diffMhch(i,j)=theo(n)%particle(Hplus)%M(j)+dm(i,k)*dMhch(k-(kp-1))/((dmhsteps-1)/2)
k = k +1
ELSE
diffMhch(i,j)=theo(n)%particle(Hplus)%M(j)
ENDIF
enddo
! print *, i, (diffMhneut(i,j),j=1,np(Hneut)),(diffMhch(i,j),j=1,np(Hplus))
enddo
end subroutine get_mass_variation_param
subroutine SUSYBounds_neutralinoonly_input(MN,GammaTotal_N, &
& CS_NjNi, &
& BR_NjqqNi,BR_NjZNi &
& )
! This subroutine can be called by the user after subroutine initialize_HiggsBounds
! has been called.
! Arguments (input): theoretical predictions (see manual for definitions)
!************************************************************
use usefulbits, only : theo,np,Chineut,just_after_run!,inputsub,
#if defined(NAGf90Fortran)
use F90_UNIX_IO, only : flush
#endif
implicit none
!----------------------------------------input
double precision,intent(in) :: MN( np(Chineut) ),GammaTotal_N( np(Chineut) ) , &
& CS_NjNi( np(Chineut),np(Chineut) ), &
& BR_NjqqNi( np(Chineut),np(Chineut) ),BR_NjZNi( np(Chineut),np(Chineut) )
!--------------------------------------internal
integer :: n
! integer :: subtype
!----------------------------------------------
n=1
! subtype=3
! inputsub(subtype)%stat=inputsub(subtype)%stat+1
if(.not.allocated(theo))then
stop 'subroutine HiggsBounds_initialize must be called first'
endif
if(np(Chineut).eq.0)then
write(*,*)'subroutine SUSYBounds_neutralinoonly_input should'
write(*,*)'only be called if np(Chineut)>0'
stop 'error in SUSYBounds_neutralinoonly_input'
endif
theo(n)%particle(Chineut)%M = MN
theo(n)%particle(Chineut)%GammaTot= GammaTotal_N
theo(n)%lep%XS_NjNi = CS_NjNi
theo(n)%BR_NjqqNi = BR_NjqqNi
theo(n)%BR_NjZNi = BR_NjZNi
just_after_run=.False.
end subroutine SUSYBounds_neutralinoonly_input
!************************************************************
subroutine SUSYBounds_neutralinochargino_input(MC,GammaTotal_C, &
& CS_CpjCmj, &
& BR_CjqqNi, &
& BR_CjlnuNi, &
& BR_CjWNi &
& )
! This subroutine can be called by the user after subroutine initialize_HiggsBounds
! has been called.
! Arguments (input): theoretical predictions (see manual for definitions)
!************************************************************
use usefulbits, only : theo,np,Chineut,Chiplus,just_after_run!,inputsub
#if defined(NAGf90Fortran)
use F90_UNIX_IO, only : flush
#endif
implicit none
!----------------------------------------input
double precision,intent(in) :: MC( np(Chiplus) ),GammaTotal_C( np(Chiplus) ), &
& CS_CpjCmj( np(Chiplus) ), &
& BR_CjqqNi( np(Chiplus),np(Chineut) ), &
& BR_CjlnuNi( np(Chiplus),np(Chineut) ), &
& BR_CjWNi( np(Chiplus),np(Chineut) )
!--------------------------------------internal
integer :: n
integer :: subtype
!----------------------------------------------
n=1
! subtype=4
! inputsub(subtype)%stat=inputsub(subtype)%stat+1
if(.not.allocated(theo))then
stop 'subroutine HiggsBounds_initialize must be called first'
endif
if((np(Chineut).eq.0).or.(np(Chiplus).eq.0))then
write(*,*)'subroutine SUSYBounds_neutralinochargino_input should'
write(*,*)'only be called if np(Chineut)>0 and np(Chiplus)>0'
stop 'error in subroutine SUSYBounds_neutralinochargino_input'
endif
theo(n)%particle(Chineut)%M = MC
theo(n)%particle(Chineut)%GammaTot= GammaTotal_C
theo(n)%lep%XS_CpjCmj = CS_CpjCmj
theo(n)%BR_CjqqNi = BR_CjqqNi
theo(n)%BR_CjlnuNi = BR_CjlnuNi
theo(n)%BR_CjWNi = BR_CjWNi
just_after_run=.False.
end subroutine SUSYBounds_neutralinochargino_input
!************************************************************
subroutine run_HiggsBounds(HBresult, chan, obsratio, ncombined)
! This subroutine can be called by the user after HiggsBounds_initialize has been called.
! The input routines, where required, should be called before calling run_HiggsBounds.
! It takes theoretical predictions for a particular parameter point
! in the model and calls subroutines which compare these predictions
! to the experimental limits
! Arguments (output):
! * HBresult = 1 if point is unexcluded, 0 if excluded, -1 if parameter point is invalid
! * chan = number of channel predicted to have the highest statistical sensitivity, as defined in Key.dat
! * obsratio = ratio of the theoretical rate to the observed limit for this channel
! * ncombined = number of Higgs combined in order to calculate this obsratio
! (see manual for more precise definitions))
! (TS 30/01/2012): Note, that if many data points are tested at the same time (as for
! inputmethod==datfiles), this subroutine only returns the results of
! the last datapoint. The full results are saved in fullHBres.
use usefulbits, only : np, Hneut, Hplus, run_HB_classic
implicit none
integer HBresult, chan, ncombined
double precision obsratio
integer hbres(0:np(Hneut)+np(Hplus)), hbchan(0:np(Hneut)+np(Hplus)), hbcomb(0:np(Hneut)+np(Hplus))
double precision hbobs(0:np(Hneut)+np(Hplus))
! Check if we are using the old 'classic' method
if (run_HB_classic.EQV..True.) then
call run_HiggsBounds_classic(HBresult,chan,obsratio,ncombined)
return
endif
! Call the new ('full') method
call run_HiggsBounds_full(hbres, hbchan, hbobs, hbcomb)
! Combined results are contained in the zero elements of result arrays
HBresult = hbres(0)
chan = hbchan(0)
obsratio = hbobs(0)
ncombined = hbcomb(0)
end subroutine run_HiggsBounds
!************************************************************
subroutine run_HiggsBounds_single(h, HBresult, chan, obsratio, ncombined)
! This subroutine can be used to get the exclusion results
! for a single Higgs boson (specified by the index h).
!
! To obtain individual results from more than one Higgs boson, it
! is more efficient to use run_HiggsBounds_full rather than this method.
use usefulbits, only : np, Hneut, Hplus
implicit none
integer, intent(in) :: h
integer, intent(out) :: HBresult, chan, ncombined
double precision, intent(out) :: obsratio
integer hbres(0:np(Hneut)+np(Hplus)), hbchan(0:np(Hneut)+np(Hplus)), hbcomb(0:np(Hneut)+np(Hplus))
double precision hbobs(0:np(Hneut)+np(Hplus))
IF (h.LT.0) stop "Illegal number of Higgs boson: h < 0"
if (h.GT.np(Hneut)+np(Hplus)) stop "Illegal number of Higgs boson"
call run_HiggsBounds_full(hbres, hbchan, hbobs, hbcomb)
HBresult = hbres(h)
chan = hbchan(h)
obsratio = hbobs(h)
ncombined = hbcomb(h)
end subroutine run_HiggsBounds_single
!************************************************************
subroutine run_HiggsBounds_full( HBresult,chan, &
& obsratio, ncombined )
! This subroutine can be called by the user after HiggsBounds_initialize has been called.
! The input routines, where required, should be called before calling run_HiggsBounds.
! It takes theoretical predictions for a particular parameter point
! in the model and calls subroutines which compare these predictions
! to the experimental limits.
!
! The results are given as (n+1)-component arrays (starting from 0),
! where n is the total number of Higgs bosons in the model (neutral+charged).
! The zeroth component gives the combined results (equivalent to run_HiggsBounds).
!
! Arguments (output):
! * HBresult = 1 if point is unexcluded, 0 if excluded, -1 if parameter point is invalid
! * chan = number of channel predicted to have the highest statistical sensitivity, as defined in Key.dat
! * obsratio = ratio of the theoretical rate to the observed limit for this channel
! * ncombined = number of Higgs combined in order to calculate this obsratio
! (see manual for more precise definitions))
use usefulbits, only : theo,res,just_after_run,ndmh,debug,numres, &
& np,Hneut,Hplus,dmhsteps,ndat,fullHBres,small_mh,&
HBresult_all,ncombined_all,chan_all,obsratio_all,predratio_all
use channels, only : check_channels
!use input, only : test_input
use theo_manip, only : HB5_complete_theo, HB5_recalculate_theo_for_datapoint
#if defined(NAGf90Fortran)
use F90_UNIX_IO, only : flush
#endif
implicit none
!----------------------------------------output
integer,intent(out):: HBresult(0:np(Hneut)+np(Hplus))
integer,intent(out):: chan(0:np(Hneut)+np(Hplus))
integer,intent(out):: ncombined(0:np(Hneut)+np(Hplus))
double precision,intent(out) :: obsratio(0:np(Hneut)+np(Hplus))
double precision :: Mhneut(np(Hneut))
double precision :: Mhch(np(Hplus))
!-------------------------------------internal
integer :: n,i,j,ind,part,k
!---------------------------------------------
! print *, "Running HiggsBounds in Normal Mode (most sensitive limit considered for each Higgs boson)"
if (lbound(HBresult,dim=1).NE.0) stop "run_HiggsBounds_full: Array HBresult must begin with element 0"
if (ubound(HBresult,dim=1).NE.(np(Hneut)+np(Hplus))) then
stop "run_HiggsBounds_full: Upper limit of array HBresult must be equal to number of Higgses"
endif
if (lbound(chan,dim=1).NE.0) stop "run_HiggsBounds_full: Array chan must begin with element 0"
if (ubound(chan,dim=1).NE.(np(Hneut)+np(Hplus))) then
stop "run_HiggsBounds_full: Upper limit of array chan must be equal to number of Higgses"
endif
if (lbound(obsratio,dim=1).NE.0) stop "run_HiggsBounds_full: Array obsratio must begin with element 0"
if (ubound(obsratio,dim=1).NE.(np(Hneut)+np(Hplus))) then
stop "run_HiggsBounds_full: Upper limit of array obsratio must be equal to number of Higgses"
endif
if (lbound(ncombined,dim=1).NE.0) stop "run_HiggsBounds_full: Array ncombined must begin with element 0"
if (ubound(ncombined,dim=1).NE.(np(Hneut)+np(Hplus))) then
stop "run_HiggsBounds_full: Upper limit of array ncombined must be equal to number of Higgses"
endif
if(.not.allocated(theo))then
stop 'subroutine HiggsBounds_initialize must be called first'
endif
if(.not.allocated(HBresult_all)) allocate(HBresult_all(0:np(Hneut)+np(Hplus),numres))
if(.not.allocated(chan_all)) allocate(chan_all(0:np(Hneut)+np(Hplus),numres))
if(.not.allocated(ncombined_all)) allocate(ncombined_all(0:np(Hneut)+np(Hplus),numres))
if(.not.allocated(obsratio_all)) allocate(obsratio_all(0:np(Hneut)+np(Hplus),numres))
if(.not.allocated(predratio_all)) allocate(predratio_all(0:np(Hneut)+np(Hplus),numres))
! do i=1,ubound(inputsub,dim=1)
! if( inputsub(i)%req .ne. inputsub(i)%stat )then
! write(*,*)'subroutine '//trim(adjustl(inputsub(i)%desc))
! write(*,*)'should be called once and only once before each call to'
! write(*,*)'subroutine run_HiggsBounds.'
! stop 'error in subroutine run_HiggsBounds'
! endif
! inputsub(i)%stat=0!now we have used this input, set back to zero
! enddo
call HB5_complete_theo
do n=1,ndat
! if(debug) then
! write(*,*) "DEBUG BRs: ", theo(n)%BR_hjWW, theo(n)%BR_hjZZ, theo(n)%BR_hjgaga
! endif
theo(n)%particle(Hneut)%Mc = theo(n)%particle(Hneut)%M
theo(n)%particle(Hplus)%Mc = theo(n)%particle(Hplus)%M
call get_mass_variation_param(n)
do i=0,ubound(Hbresult,dim=1)
obsratio_all(i,:) = -999d0
predratio_all(i,:) = -999d0
HBresult_all(i,:) = 1
chan_all(i,:) = -999
ncombined_all(i,:) = -999
obsratio(i) = -999d0
HBresult(i) = 1
chan(i) = -999
ncombined(i) = -999
enddo
! Do we have mass uncertainties to take care off
IF (ndmh.GT.0) THEN
! print *, "Running HiggsBounds with Higgs mass uncertainties"
! write(*,*) theo(n)%particle(Hplus)%dM
if(np(Hneut).ne.0) Mhneut = theo(n)%particle(Hneut)%M
if(np(Hplus).ne.0) Mhch = theo(n)%particle(Hplus)%M
! Loop over all Higgses
do i=1,np(Hneut)+np(Hplus)
obsratio_all(i,:) = 1.D23
IF (i.LE.np(Hneut)) THEN
ind = i
part = Hneut
ELSE
ind = i-np(Hneut)
part = Hplus
ENDIF
! Check for mass steps for this particular Higgs boson
IF(theo(n)%particle(part)%dMh(ind).GT.small_mh) THEN
! theo(n)%particle(part)%M(ind)=theo(n)%particle(part)%M(ind) &
! & -(dmhsteps-1)/2*theo(n)%particle(part)%dMh(ind)
theo(n)%particle(part)%M(ind)=theo(n)%particle(part)%M(ind) &
& -theo(n)%particle(part)%dMh(ind)
do j=1,dmhsteps
! print *, theo(n)%particle(Hneut)%M, theo(n)%particle(Hplus)%M
call HB5_recalculate_theo_for_datapoint(n)
call check_channels(theo(n),res(n),i)
do k=1,size(res(n)%obsratio)
! write(*,*) "i,k,res(n)%obsratio(k),res(n)%chan(k) = ",i,k,res(n)%obsratio(k),res(n)%chan(k)
IF (res(n)%obsratio(k).LT.obsratio_all(i,k)) THEN
! write(*,*) "i,k,res(n)%obsratio(k),res(n)%chan(k) = ",i,k,res(n)%obsratio(k),res(n)%chan(k)
HBresult_all(i,k) = res(n)%allowed95(k)
chan_all(i,k) = res(n)%chan(k)
obsratio_all(i,k) = res(n)%obsratio(k)
predratio_all(i,k) = res(n)%predratio(k)
ncombined_all(i,k) = res(n)%ncombined(k)
ENDIF
enddo
! print *, i,theo(n)%particle(part)%M(ind),HBresult(i),chan(i),obsratio(i),ncombined(i)
theo(n)%particle(part)%M(ind)= theo(n)%particle(part)%M(ind) &
& +theo(n)%particle(part)%dMh(ind)/(dmhsteps-1)*2
enddo
else
call HB5_recalculate_theo_for_datapoint(n)
call check_channels(theo(n),res(n),i)
do k=1,size(res(n)%obsratio)
! write(*,*) "i,k,res(n)%obsratio(k),res(n)%chan(k) = ",i,k,res(n)%obsratio(k),res(n)%chan(k)
HBresult_all(i,k) = res(n)%allowed95(k)
chan_all(i,k) = res(n)%chan(k)
obsratio_all(i,k) = res(n)%obsratio(k)
predratio_all(i,k) = res(n)%predratio(k)
ncombined_all(i,k) = res(n)%ncombined(k)
enddo
! HBresult(i) = res(n)%allowed95(1)
! chan(i) = res(n)%chan(1)
! obsratio(i) = res(n)%obsratio(1)
! ncombined(i) = res(n)%ncombined(1)
endif
HBresult(i) = HBresult_all(i,1)
chan(i) = chan_all(i,1)
obsratio(i) = obsratio_all(i,1)
ncombined(i) = ncombined_all(i,1)
! Logical OR between exclusions (one Higgs excluded = combined exclusion)
HBresult(0) = HBresult(0) * HBresult(i)
! Save the data for the Higgs that has the highest ratio of theory/obs
IF (obsratio(i).GT.obsratio(0)) THEN
chan(0) = chan(i)
obsratio(0) = obsratio(i)
ncombined(0) = ncombined(i)
ENDIF
theo(n)%particle(Hneut)%M = Mhneut
theo(n)%particle(Hplus)%M = Mhch
enddo
! return
ELSE
! print *, "Running HiggsBounds without Higgs mass uncertainties"
call HB5_recalculate_theo_for_datapoint(n)
! write(*,*) "Higgses = " , np(Hneut)+np(Hplus)
do i=1,np(Hneut)+np(Hplus)
call check_channels(theo(n),res(n),i)
! do k=1,size(res(n)%obsratio)
! write(*,*) "i,k,res(n)%obsratio(k),res(n)%chan(k) = ",i,k,res(n)%obsratio(k),res(n)%chan(k)
! enddo
do k=1,size(res(n)%obsratio)
! write(*,*) "i,k,res(n)%obsratio(k),res(n)%chan(k) = ",i,k,res(n)%obsratio(k),res(n)%chan(k)
HBresult_all(i,k) = res(n)%allowed95(k)
chan_all(i,k) = res(n)%chan(k)
obsratio_all(i,k) = res(n)%obsratio(k)
predratio_all(i,k) = res(n)%predratio(k)
ncombined_all(i,k) = res(n)%ncombined(k)
enddo
HBresult(i) = HBresult_all(i,1)
chan(i) = chan_all(i,1)
obsratio(i) = obsratio_all(i,1)
ncombined(i) = ncombined_all(i,1)
! HBresult(i) = res(n)%allowed95(1)
! chan(i) = res(n)%chan(1)
! obsratio(i) = res(n)%obsratio(1)
! ncombined(i) = res(n)%ncombined(1)
!
! write(*,*) "hello: i=",i," HBres, chan, obsratio = ", HBresult(i), chan(i), obsratio(i)
HBresult(0) = HBresult(0) * res(n)%allowed95(1)
IF (obsratio(i).GT.obsratio(0)) THEN
! write(*,*) "hello: ", n, i
chan(0) = res(n)%chan(1)
obsratio(0) = res(n)%obsratio(1)
ncombined(0) = res(n)%ncombined(1)
ENDIF
! IF (i.LE.np(Hneut)) THEN
! print *, i,theo(n)%particle(Hneut)%M(i),HBresult(i),chan(i),obsratio(i),ncombined(i),HBresult(0), obsratio(0)
! ELSE
! print *, i,theo(n)%particle(Hplus)%M(i-np(Hneut)),HBresult(i),chan(i),obsratio(i),ncombined(i),HBresult(0), obsratio(0)
! endif
enddo
ENDIF
! write(*,*) "run_HB_full, obsratio: ", obsratio
! write(*,*) "run_HB_full, chan : ", chan
fullHBres(n)%allowed95=HBresult(0)
fullHBres(n)%chan=chan(0)
fullHBres(n)%obsratio=obsratio(0)
fullHBres(n)%ncombined=ncombined(0)
enddo
just_after_run=.True.
! print *, "HB: run done"
end subroutine run_HiggsBounds_full
!************************************************************
subroutine HiggsBounds_get_most_sensitive_channels_per_Higgs(nH,pos,HBresult,chan,obsratio,predratio,ncombined)
!************************************************************
use usefulbits, only : HBresult_all,obsratio_all,chan_all,ncombined_all,predratio_all,&
& just_after_run,np,Hneut,Hplus,numres
integer, intent(in) :: nH, pos
integer, intent(out) :: HBresult, chan, ncombined
double precision, intent(out) :: obsratio, predratio
HBresult = 0
chan = 0
obsratio = 0
predratio = 0
ncombined = 0
if(just_after_run.and.allocated(HBresult_all)) then
if(nH.le.np(Hneut)+np(Hplus)) then
if(pos.le.numres) then
HBresult = HBresult_all(nH,pos)
chan = chan_all(nH,pos)
obsratio = obsratio_all(nH,pos)
predratio = predratio_all(nH,pos)
ncombined = ncombined_all(nH,pos)
else
write(*,*) 'WARNING: request exceeds the number of stored most sensitive channels (',numres,')'
endif
else
write(*,*) 'WARNING: requested Higgs boson is invalid (choose between 1 and ',np(Hneut)+np(Hplus),'!)'
endif
else
write(*,*) 'WARNING: Please call run_HiggsBounds or run_HiggsBounds_full before calling',&
& ' HiggsBounds_get_most_sensitive_channels!'
endif
end subroutine HiggsBounds_get_most_sensitive_channels_per_Higgs
!************************************************************
subroutine HiggsBounds_get_most_sensitive_channels(pos,HBresult,chan,obsratio,predratio,ncombined)
!************************************************************
use usefulbits, only : HBresult_all,obsratio_all,predratio_all,chan_all,ncombined_all,&
& just_after_run,np,Hneut,Hplus,numres
integer, intent(in) :: pos
integer, intent(out) :: HBresult, chan, ncombined
double precision, intent(out) :: obsratio,predratio
integer :: i,j,count
integer,allocatable :: nH_rank(:),pos_rank(:), posflat(:)
double precision, allocatable :: predratio_tmp(:)
allocate(nH_rank(numres),pos_rank(numres),posflat(numres),predratio_tmp(numres*(np(Hneut)+np(Hplus))))
HBresult = 0
chan = 0
obsratio = 0
ncombined = 0
predratio_tmp = 0
count=0
if(just_after_run.and.allocated(HBresult_all)) then
if(pos.le.numres) then
do j=1,np(Hneut)+np(Hplus)
do i=1,numres
count=count+1
predratio_tmp(count)=predratio_all(j,i)
enddo
enddo
do i=1,numres
posflat(i) = maxloc(predratio_tmp,1)
predratio_tmp(posflat(i)) = -1.0D0
enddo
count=0
do j=1,np(Hneut)+np(Hplus)
do i=1,numres
count=count+1
do k=1,numres
if(count.eq.posflat(k)) then
nH_rank(k) = j
pos_rank(k) = i
endif
enddo
enddo
enddo
HBresult = HBresult_all(nH_rank(pos),pos_rank(pos))
chan = chan_all(nH_rank(pos),pos_rank(pos))
obsratio = obsratio_all(nH_rank(pos),pos_rank(pos))
predratio = predratio_all(nH_rank(pos),pos_rank(pos))
ncombined = ncombined_all(nH_rank(pos),pos_rank(pos))
else
write(*,*) 'WARNING: request exceeds the number of stored most sensitive channels (',numres,')'
endif
else
write(*,*) 'WARNING: Please call run_HiggsBounds or run_HiggsBounds_full before calling',&
& ' HiggsBounds_get_most_sensitive_channels!'
endif
deallocate(nH_rank,pos_rank,posflat,predratio_tmp)
end subroutine HiggsBounds_get_most_sensitive_channels
!************************************************************
subroutine run_HiggsBounds_classic( HBresult,chan,obsratio,ncombined)
! This subroutine can be called by the user after HiggsBounds_initialize has been called.
! The input routines, where required, should be called before calling run_HiggsBounds.
! It takes theoretical predictions for a particular parameter point
! in the model and calls subroutines which compare these predictions
! to the experimental limits
! Arguments (output):
! * HBresult = 1 if point is unexcluded, 0 if excluded, -1 if parameter point is invalid
! * chan = number of channel predicted to have the highest statistical sensitivity, as defined in Key.dat
! * obsratio = ratio of the theoretical rate to the observed limit for this channel
! * ncombined = number of Higgs combined in order to calculate this obsratio
! (see manual for more precise definitions))
use usefulbits, only : theo,res,debug,just_after_run,ndmh,diffmhneut,diffmhch, &
np,Hneut,Hplus,full_dmth_variation,dmhsteps, ndat,fullHBres!,inputsub
use channels, only : check_channels
!use input, only : test_input
use theo_manip, only : HB5_complete_theo, HB5_recalculate_theo_for_datapoint
#if defined(NAGf90Fortran)
use F90_UNIX_IO, only : flush
#endif
implicit none
!----------------------------------------output
integer,intent(out):: HBresult,chan,ncombined
double precision,intent(out) :: obsratio
double precision :: Mhneut(np(Hneut))
double precision :: Mhch(np(Hplus))
!-------------------------------------internal
integer :: n,i
integer :: HBresult_tmp,chan_tmp,ncombined_tmp
double precision :: obsratio_tmp
!---------------------------------------------
! n=1
! print *, "Running HiggsBounds in Classic Mode (globally most sensitive limit only)"
if(.not.allocated(theo))then
stop 'subroutine HiggsBounds_initialize must be called first'
endif
! do i=1,ubound(inputsub,dim=1)
! if( inputsub(i)%req .ne. inputsub(i)%stat )then
! write(*,*)'subroutine '//trim(adjustl(inputsub(i)%desc))
! write(*,*)'should be called once and only once before each call to'
! write(*,*)'subroutine run_HiggsBounds.'
! stop 'error in subroutine run_HiggsBounds'
! endif
! inputsub(i)%stat=0!now we have used this input, set back to zero
! enddo
call HB5_complete_theo
do n=1,ndat
theo(n)%particle(Hneut)%Mc = theo(n)%particle(Hneut)%M
call get_mass_variation_param(n)
IF (ndmh.GT.0) THEN
if(np(Hneut).ne.0) Mhneut = theo(n)%particle(Hneut)%M
if(np(Hplus).ne.0) Mhch = theo(n)%particle(Hplus)%M
obsratio_tmp = 10.0E6 ! Set to very large initial value
do i=1,dmhsteps**ndmh
theo(n)%particle(Hneut)%M = diffMhneut(i,:)
theo(n)%particle(Hplus)%M = diffMhch(i,:)
if(debug)write(*,*)'manipulating input...' ; call flush(6)
call HB5_recalculate_theo_for_datapoint(n)
if(debug)write(*,*)'compare each data point to the experimental bounds...' ; call flush(6)
call check_channels(theo(n),res(n),0)
HBresult = res(n)%allowed95(1)
chan = res(n)%chan(1)
obsratio = res(n)%obsratio(1)
ncombined = res(n)%ncombined(1)
! print *, HBresult, chan, obsratio, ncombined
IF (.NOT.full_dmth_variation) THEN
IF (HBresult.EQ.1) THEN
! theo(n)%particle(Hneut)%M = Mhneut
! theo(n)%particle(Hplus)%M = Mhch
just_after_run=.True.
exit
ENDIF
ELSE
IF (obsratio.lt.obsratio_tmp) THEN
HBresult_tmp = HBresult
chan_tmp = chan
obsratio_tmp = obsratio
ncombined_tmp = ncombined
ENDIF
ENDIF
enddo
IF (full_dmth_variation) THEN
HBresult = HBresult_tmp
chan = chan_tmp
obsratio = obsratio_tmp
ncombined = ncombined
! theo(n)%particle(Hneut)%M = Mhneut
! theo(n)%particle(Hplus)%M = Mhch
just_after_run=.True.
! return
ENDIF
theo(n)%particle(Hneut)%M = Mhneut
theo(n)%particle(Hplus)%M = Mhch
call HB5_recalculate_theo_for_datapoint(n)
call check_channels(theo(n),res(n),0)
ELSE
if(debug)write(*,*)'manipulating input...' ; call flush(6)
call HB5_recalculate_theo_for_datapoint(n)
if(debug)write(*,*)'compare each data point to the experimental bounds...' ; call flush(6)
call check_channels(theo(n),res(n),0)
HBresult = res(n)%allowed95(1)
chan = res(n)%chan(1)
obsratio = res(n)%obsratio(1)
ncombined = res(n)%ncombined(1)
just_after_run=.True.
ENDIF
fullHBres(n)%allowed95=HBresult
fullHBres(n)%chan=chan
fullHBres(n)%obsratio=obsratio
fullHBres(n)%ncombined=ncombined
enddo
just_after_run=.True.
end subroutine run_HiggsBounds_classic
!************************************************************
subroutine HiggsBounds_get_likelihood(analysisID, Hindex, nc, cbin, M, llh, obspred)
!************************************************************
use usefulbits, only : theo,np,Hneut,Hplus
use theo_manip, only : HB5_complete_theo
use likelihoods, only : get_likelihood, calcpredratio_llh
implicit none
integer, intent(in) :: analysisID
integer, intent(out) :: Hindex, nc, cbin
double precision, intent(out) :: llh, M
character(LEN=*), intent(in) :: obspred
integer :: i
double precision, allocatable :: expllh(:)
! double precision :: fact
double precision, allocatable :: mass(:) ! predratio(:)
integer, allocatable :: nclist(:)
! call complete_theo
! allocate(predratio(np(Hneut)))
! predratio = 0.0D0
! write(*,*) "Calling HiggsBounds_get_likelihood..."
allocate(expllh(np(Hneut)),mass(np(Hneut)),nclist(np(Hneut)))
expllh = 0.0D0
! select case(analysisID)
! case(14029)
! c=1
! case(16037)
! c=2
! case(170907242)
! c=3
! case default
! stop 'Unknown analysisID in subroutine HiggsBounds_get_likelihood!'
! end select
call HB5_complete_theo
! Determine most sensitive combination
do i=1,np(Hneut)
call get_likelihood(analysisID, i, theo(1), expllh(i), mass(i), nclist(i), cbin, 'pred')
enddo
Hindex = maxloc(expllh,dim=1)
call get_likelihood(analysisID, Hindex, theo(1), llh, M, nc, cbin, obspred)
deallocate(mass,nclist,expllh) !predratio
end subroutine HiggsBounds_get_likelihood
!************************************************************
subroutine HiggsBounds_get_combined_likelihood(analysisID, llh, obspred)
!************************************************************
use usefulbits, only : theo,np,Hneut,Hplus, vsmall
integer, intent(in) :: analysisID
character(LEN=*), intent(in), optional :: obspred
double precision, intent(out) :: llh
double precision :: M, llh_tmp
integer :: i, j, nc, cbin, Hindex, cbin_end, cbin_in
write(*,*) 'WARNING: The subroutine HiggsBounds_get_combined_likelihood is NOT '
write(*,*) ' officially validated and approved. Use it on your own risk!'
cbin_end = 0
do i= 1,np(Hneut)
cbin_end = cbin_end + 2**(i-1)
enddo
llh = -1.0D0
cbin_in = 0
llh_tmp = 0.0D0
do while(cbin_in.lt.cbin_end)
if(present(obspred)) then
call HiggsBounds_get_likelihood_for_comb(analysisID, cbin_in, Hindex, nc, cbin, M, llh, obspred)
else
call HiggsBounds_get_likelihood_for_comb(analysisID, cbin_in, Hindex, nc, cbin, M, llh, 'obs')
endif
if(llh.ge.0.0D0) then
llh_tmp = llh_tmp + llh
else
exit
endif
cbin_in = cbin_in + cbin
enddo
if(llh_tmp.gt.0.0D0) then
llh = llh_tmp
endif
end subroutine HiggsBounds_get_combined_likelihood
!************************************************************
subroutine HiggsBounds_get_likelihood_for_Higgs(analysisID, cbin_in, Hindex, nc, cbin, M, llh, obspred)
!************************************************************
use usefulbits, only : theo,np,Hneut,Hplus
use theo_manip, only : HB5_complete_theo
use likelihoods, only : get_likelihood, calcpredratio_llh
implicit none
integer, intent(in) :: analysisID,Hindex
integer, intent(out) :: nc, cbin
double precision, intent(out) :: llh, M
integer, intent(in) :: cbin_in
character(LEN=*), intent(in) :: obspred
integer :: i
! select case(analysisID)
! case(3316,14029)
! c=1
! case default
! stop 'Unknown analysisID in subroutine HiggsBounds_get_likelihood_for_Higgs!'
! end select
call HB5_complete_theo
call get_likelihood(analysisID, Hindex, theo(1), llh, M, nc, cbin, obspred, cbin_in)
end subroutine HiggsBounds_get_likelihood_for_Higgs
!************************************************************
subroutine HiggsBounds_get_likelihood_for_comb(analysisID, cbin_in, Hindex, nc, cbin, M, llh, obspred)
!************************************************************
use usefulbits, only : theo,np,Hneut,Hplus
use theo_manip, only : HB5_complete_theo
use likelihoods, only : get_likelihood, calcpredratio_llh
implicit none
integer, intent(in) :: analysisID, cbin_in
integer, intent(out) :: Hindex, nc, cbin
double precision, intent(out) :: llh, M
character(LEN=*), intent(in) :: obspred
integer :: i
double precision, allocatable :: obsllh(:)
double precision, allocatable :: mass(:)
integer, allocatable :: nclist(:), cbinlist(:)
allocate(obsllh(np(Hneut)),mass(np(Hneut)),nclist(np(Hneut)),cbinlist(np(Hneut)))
obsllh = 0.0D0
! select case(analysisID)
! case(3316,14029)
! c=1
! case default
! stop 'Unknown analysisID in subroutine HiggsBounds_get_likelihood_for_comb!'
! end select
call HB5_complete_theo
! Determine most sensitive combination
do i=1,np(Hneut)
call get_likelihood(analysisID, i, theo(1), obsllh(i), mass(i), nclist(i),cbinlist(i),obspred, cbin_in)
enddo
Hindex = maxloc(obsllh,dim=1)
llh = obsllh(Hindex)
M = mass(Hindex)
nc = nclist(Hindex)
cbin = cbinlist(Hindex)
deallocate(mass,nclist,obsllh,cbinlist)
end subroutine HiggsBounds_get_likelihood_for_comb
!************************************************************
subroutine HiggsBounds_SLHA_output
!**** ********************************************************
use usefulbits, only : whichinput,just_after_run
use output, only : do_output
if(.not.just_after_run)then
stop 'subroutine run_HiggsBounds should be called before subroutine HiggsBounds_SLHA_output'
endif
select case(whichinput)
case('SLHA')
call do_output
case default
stop 'The subroutine HiggsBounds_SLHA_output should only be used when whichinput=SLHA'
end select
end subroutine HiggsBounds_SLHA_output
#ifdef enableCHISQ
!************************************************************
subroutine initialize_HiggsBounds_chisqtables
! use S95tables, only : S95_t2
use S95tables_type3
use usefulbits, only : allocate_if_stats_required,theo
implicit none
if(allocated(theo))then
stop 'subroutine initialize_HiggsBounds_chisqtables should be called before subroutine HiggsBounds_initialize'
elseif(allocated(clsb_t3))then
stop 'subroutine initialize_HiggsBounds_chisqtables has already been called once'
endif
allocate(clsb_t3(ntable3))
call initializetables_type3_blank(clsb_t3)
call initializetables3(clsb_t3)
call readclsbfiles_binary
if(allocated(allocate_if_stats_required))then
stop 'error in subroutine initialize_HiggsBounds_chisqtables'
else
allocate(allocate_if_stats_required(1))
endif
end subroutine initialize_HiggsBounds_chisqtables
!************************************************************
subroutine finish_HiggsBounds_chisqtables
!************************************************************
use S95tables_type3
use usefulbits, only : allocate_if_stats_required
implicit none
integer :: x
if(.not.allocated(clsb_t3))then
stop 'initialize_HiggsBounds_chisqtables should be called first'
endif
do x=lbound(clsb_t3,dim=1),ubound(clsb_t3,dim=1)
deallocate(clsb_t3(x)%dat)
enddo
deallocate(filename)
deallocate(clsb_t3)
deallocate(allocate_if_stats_required)
end subroutine finish_HiggsBounds_chisqtables
!************************************************************
subroutine HB_calc_stats(theory_uncertainty_1s,chisq_withouttheory,chisq_withtheory,chan2)
!************************************************************
! this is in the middle of development! DO NOT USE!
use usefulbits, only : res,theo,pr,just_after_run,vsmall
use interpolate
use S95tables_type1
use S95tables_type3
use S95tables
use extra_bits_for_chisquared
implicit none
integer,intent(out)::chan2
integer :: x,c,z,y
integer :: id
double precision, intent(in) :: theory_uncertainty_1s
double precision :: chisq_withouttheory,chisq_withtheory
double precision :: low_chisq,sigma
x=1
low_chisq=1.0D-2
if(.not.allocated(theo))then
stop 'subroutine HiggsBounds_initialize must be called first'
elseif(.not.allocated(clsb_t3))then
stop 'subroutine initialize_HiggsBounds_chisqtables must be called first'
elseif(.not.just_after_run)then
stop 'subroutine run_HiggsBounds must be called first'
endif
sigma=theory_uncertainty_1s
if(sigma.lt.vsmall)then
write(*,*)'Warning: will not calculate chi^2 with theory uncertainty'
endif
chisq_withtheory = -2.0D0
chisq_withouttheory = -2.0D0
z=2;
c= res(x)%chan(z)
chan2=c
if(res(x)%allowed95(z).eq.-1)then! labels an unphysical parameter point
chisq_withtheory =-1.0D0
chisq_withouttheory =-1.0D0
elseif( c.gt.0 )then ! labels a physical parameter point and a real channel
id=S95_t1_or_S95_t2_idfromelementnumber(pr(c)%ttype,pr(c)%tlist)
y=clsb_t3elementnumber_from_S95table(pr(c)%ttype,id)
if(y.gt.0)then
!------------------------------
call get_chisq(sigma,res(x)%axis_i(z),res(x)%axis_j(z),res(x)%sfactor(z), &
& y,chisq_withouttheory,chisq_withtheory)
!-------------------------------
else
write(*,*)'hello y=',y
stop 'problem here with y'
endif
else
chisq_withtheory =0.0D0
chisq_withouttheory =0.0D0
endif
end subroutine HB_calc_stats
#endif
!************************************************************
subroutine finish_HiggsBounds
! This subroutine needs to be called right at the end, to close files
! and deallocate arrays
!************************************************************
use usefulbits, only : deallocate_usefulbits,debug,theo,debug, &
& file_id_debug1,file_id_debug2!,inputsub
use S95tables, only : deallocate_S95tables
use theory_BRfunctions, only : deallocate_BRSM
use theory_XS_SM_functions, only: deallocate_XSSM
#if defined(NAGf90Fortran)
use F90_UNIX_IO, only : flush
#endif
if(debug)then
close(file_id_debug2)
close(file_id_debug1)
endif
if(.not.allocated(theo))then
stop 'HiggsBounds_initialize should be called first'
endif
if(debug)write(*,*)'finishing off...' ; call flush(6)
call deallocate_BRSM
call deallocate_XSSM
call deallocate_S95tables
call deallocate_usefulbits
if(debug)write(*,*)'finished' ; call flush(6)
! if(allocated(inputsub)) deallocate(inputsub)
end subroutine finish_HiggsBounds
!
! HB-5 additions
! Do we need control functions to guarantee all theory input is up-to-date and reset?
!subroutine HB5_reset_input
!end subroutine HB5_reset_input
!************************************************************
!
! SIMPLIFIED EFFC INPUT ROUTINES
!
!************************************************************
subroutine HiggsBounds_neutral_input_effC_single(quantity,val)
!************************************************************
use usefulbits, only : theo,np,Hneut,effC,whichinput,just_after_run!,inputsub
implicit none
!---------------------------------------------
character(LEN=*), intent(in) :: quantity
double precision, intent(in) :: val(np(Hneut))
!-------------------------------------internal
integer :: n
! integer :: subtype
!---------------------------------------------
whichinput='effC'
! subtype=1
n=1
! inputsub(subtype)%stat=inputsub(subtype)%stat+1 ! WHAT IS THIS DOING?
if(.not.allocated(theo))then
stop 'subroutine HiggsBounds_initialize must be called first'
endif
if(np(Hneut).eq.0)then
write(*,*)'subroutine HiggsBounds_neutral_input_effC_single should'
write(*,*)'only be called if np(Hneut)>0'
stop 'error in subroutine HiggsBounds_neutral_input_effC_single'
endif
select case(trim(adjustl(quantity)))
case("ghjcc_s")
effC(n)%hjcc_s=val
case("ghjcc_p")
effC(n)%hjcc_p=val
case("ghjss_s")
effC(n)%hjss_s=val
case("ghjss_p")
effC(n)%hjss_p=val
case("ghjbb_s")
effC(n)%hjbb_s=val
case("ghjbb_p")
effC(n)%hjbb_p=val
case("ghjtt_s")
effC(n)%hjtt_s=val
case("ghjtt_p")
effC(n)%hjtt_p=val
case("ghjmumu_s")
effC(n)%hjmumu_s=val
case("ghjmumu_p")
effC(n)%hjmumu_p=val
case("ghjtautau_s")
effC(n)%hjtautau_s=val
case("ghjtautau_p")
effC(n)%hjtautau_p=val
case("ghjWW")
effC(n)%hjWW=val
case("ghjZZ")
effC(n)%hjZZ=val
case("ghjZga")
effC(n)%hjZga=val
case("ghjgaga")
effC(n)%hjgaga=val
case("ghjgg")
effC(n)%hjgg=val
case default
stop 'wrong input for quantity to subroutine HiggsBounds_neutral_input_effC_single'
end select
just_after_run=.False.
end subroutine HiggsBounds_neutral_input_effC_single
!************************************************************
subroutine HiggsBounds_neutral_input_effC_double(quantity,val)
!************************************************************
use usefulbits, only : theo,np,Hneut,effC,whichinput,just_after_run!,inputsub
implicit none
!---------------------------------------------
character(LEN=*), intent(in) :: quantity
double precision, intent(in) :: val(np(Hneut),np(Hneut))
!-------------------------------------internal
integer :: n
! integer :: subtype
!---------------------------------------------
whichinput='effC'
! subtype=1
n=1
! inputsub(subtype)%stat=inputsub(subtype)%stat+1 ! WHAT IS THIS DOING?
if(.not.allocated(theo))then
stop 'subroutine HiggsBounds_initialize must be called first'
endif
if(np(Hneut).eq.0)then
write(*,*)'subroutine HiggsBounds_neutral_input_effC_double should'
write(*,*)'only be called if np(Hneut)>0'
stop 'error in subroutine HiggsBounds_neutral_input_effC_double'
endif
select case(trim(adjustl(quantity)))
case("ghjhiZ")
effC(n)%hjhiZ = val
case default
stop 'wrong input for quantity to subroutine HiggsBounds_neutral_input_effC_double'
end select
just_after_run=.False.
end subroutine HiggsBounds_neutral_input_effC_double
!************************************************************
!
! SIMPLIFIED LEP/HADRONIC XS INPUT ROUTINES
!
!************************************************************
subroutine HiggsBounds_neutral_input_LEP_single(quantity,val)
!************************************************************
use usefulbits, only : theo,np,Hneut,whichinput,just_after_run!,inputsub
implicit none
!---------------------------------------------
character(LEN=*), intent(in) :: quantity
double precision, intent(in) :: val(np(Hneut))
!-------------------------------------internal
integer :: n
! integer :: subtype
!---------------------------------------------
whichinput='hadr'
! subtype=1
n=1
! inputsub(subtype)%stat=inputsub(subtype)%stat+1 ! WHAT IS THIS DOING?
if(.not.allocated(theo))then
stop 'subroutine HiggsBounds_initialize must be called first'
endif
if(np(Hneut).eq.0)then
write(*,*)'subroutine HiggsBounds_neutral_input_LEP_single should'
write(*,*)'only be called if np(Hneut)>0'
stop 'error in subroutine HiggsBounds_neutral_input_LEP_single'
endif
select case(trim(adjustl(quantity)))
case("XS_hjZ_ratio")
theo(n)%lep%XS_hjZ_ratio = val
case("XS_bbhj_ratio")
theo(n)%lep%XS_bbhj_ratio = val
case("XS_tautauhj_ratio")
theo(n)%lep%XS_tautauhj_ratio = val
case default
stop 'wrong input for quantity to subroutine HiggsBounds_neutral_input_LEP_single'
end select
just_after_run=.False.
end subroutine HiggsBounds_neutral_input_LEP_single
!************************************************************
subroutine HiggsBounds_neutral_input_LEP_double(quantity,val)
!************************************************************
use usefulbits, only : theo,np,Hneut,whichinput,just_after_run!,inputsub
implicit none
!---------------------------------------------
character(LEN=*), intent(in) :: quantity
double precision, intent(in) :: val(np(Hneut),np(Hneut))
!-------------------------------------internal
integer :: n
! integer :: subtype
!---------------------------------------------
whichinput='hadr'
! subtype=1
n=1
! inputsub(subtype)%stat=inputsub(subtype)%stat+1 ! WHAT IS THIS DOING?
if(.not.allocated(theo))then
stop 'subroutine HiggsBounds_initialize must be called first'
endif
if(np(Hneut).eq.0)then
write(*,*)'subroutine HiggsBounds_neutral_input_LEP_double should'
write(*,*)'only be called if np(Hneut)>0'
stop 'error in subroutine HiggsBounds_neutral_input_LEP_double'
endif
select case(trim(adjustl(quantity)))
case("XS_hjhi_ratio")
theo(n)%lep%XS_hjhi_ratio = val
case default
stop 'wrong input for quantity to subroutine HiggsBounds_neutral_input_LEP_double'
end select
just_after_run=.False.
end subroutine HiggsBounds_neutral_input_LEP_double
!************************************************************
subroutine HiggsBounds_neutral_input_hadr_single(collider,quantity,val)
!************************************************************
use usefulbits, only : theo,np,Hneut,whichinput,just_after_run, &
& hadroncolliderdataset !,inputsub
implicit none
!---------------------------------------------
integer, intent(in) :: collider
character(LEN=*), intent(in) :: quantity
double precision, intent(in) :: val(np(Hneut))
!-------------------------------------internal
integer :: n
! integer :: subtype
! type(hadroncolliderdataset) :: dataset
!---------------------------------------------
whichinput='hadr'
! subtype=1
n=1
! inputsub(subtype)%stat=inputsub(subtype)%stat+1 ! WHAT IS THIS DOING?
if(.not.allocated(theo))then
stop 'subroutine HiggsBounds_initialize must be called first'
endif
if(np(Hneut).eq.0)then
write(*,*)'subroutine HiggsBounds_neutral_input_hadr_single should'
write(*,*)'only be called if np(Hneut)>0'
stop 'error in subroutine HiggsBounds_neutral_input_hadr_single'
endif
select case(collider)
case(2)
call set_input(theo(n)%tev,quantity,val)
case(7)
call set_input(theo(n)%lhc7,quantity,val)
case(8)
call set_input(theo(n)%lhc8,quantity,val)
case(13)
call set_input(theo(n)%lhc13,quantity,val)
case default
stop 'wrong input for collider to subroutine HiggsBounds_neutral_input_hadr_single'
end select
just_after_run=.False.
contains
subroutine set_input(dataset,quantity,val)
character(LEN=*), intent(in) :: quantity
double precision, intent(in) :: val(np(Hneut))
type(hadroncolliderdataset) :: dataset
select case(trim(adjustl(quantity)))
case("XS_hj_ratio")
dataset%XS_hj_ratio=val
case("XS_gg_hj_ratio")
dataset%XS_gg_hj_ratio=val
case("XS_bb_hj_ratio")
dataset%XS_bb_hj_ratio=val
dataset%XS_hjb_ratio=val
case("XS_vbf_ratio")
dataset%XS_vbf_ratio=val
case("XS_hjZ_ratio")
dataset%XS_hjZ_ratio=val
+ case("XS_gg_hjZ_ratio")
+ dataset%XS_gg_hjZ_ratio=val
+ case("XS_qq_hjZ_ratio")
+ dataset%XS_qq_hjZ_ratio=val
case("XS_hjW_ratio")
dataset%XS_hjW_ratio=val
case("XS_tthj_ratio")
dataset%XS_tthj_ratio=val
case("XS_thj_tchan_ratio")
dataset%XS_thj_tchan_ratio=val
case("XS_thj_schan_ratio")
dataset%XS_thj_schan_ratio=val
case default
stop 'wrong input for quantity to subroutine HiggsBounds_neutral_input_hadr_single'
end select
end subroutine set_input
end subroutine HiggsBounds_neutral_input_hadr_single
!************************************************************
subroutine HiggsBounds_neutral_input_hadr_double(collider,quantity,val)
!************************************************************
use usefulbits, only : theo,np,Hneut,whichinput,just_after_run, &
& hadroncolliderdataset! ,inputsub
implicit none
!---------------------------------------------
integer, intent(in) :: collider
character(LEN=*), intent(in) :: quantity
double precision, intent(in) :: val(np(Hneut),np(Hneut))
!-------------------------------------internal
integer :: n
!---------------------------------------------
whichinput='hadr'
n=1
if(.not.allocated(theo))then
stop 'subroutine HiggsBounds_initialize must be called first'
endif
if(np(Hneut).eq.0)then
write(*,*)'subroutine HiggsBounds_neutral_input_hadr_double should'
write(*,*)'only be called if np(Hneut)>0'
stop 'error in subroutine HiggsBounds_neutral_input_hadr_double'
endif
select case(trim(adjustl(quantity)))
case("XS_hjhi")
select case(collider)
case(2)
theo(n)%tev%XS_hjhi=val
case(7)
theo(n)%lhc7%XS_hjhi=val
case(8)
theo(n)%lhc8%XS_hjhi=val
case(13)
theo(n)%lhc13%XS_hjhi=val
case default
stop 'wrong input for collider to subroutine HiggsBounds_neutral_input_hadr_double'
end select
case default
stop 'wrong input for quantity to subroutine HiggsBounds_neutral_input_hadr_double'
end select
just_after_run=.False.
end subroutine HiggsBounds_neutral_input_hadr_double
!************************************************************
subroutine HiggsBounds_neutral_input_hadr_channelrates_single(collider,nHiggs,p,d,val)
! n.b.: Elements of the matrix channelrates with values < 0 will be overwritten
! by XS times BR using the narrow width approximation.
!************************************************************
use usefulbits, only : theo,np,Hneut,whichinput,just_after_run,hadroncolliderdataset,&
& Nprod,Ndecay
#if defined(NAGf90Fortran)
use F90_UNIX_IO, only : flush
#endif
implicit none
double precision,intent(in) :: val
integer, intent(in) :: collider,p,d,nHiggs
!-------------------------------------internal
integer :: n
!---------------------------------------------
whichinput='hadr'
n=1
if(.not.allocated(theo))then
stop 'subroutine HiggsBounds_initialize must be called first'
endif
if(nHiggs.gt.np(Hneut))then
write(*,*)'subroutine HiggsBounds_neutral_input_hadr_channelrates_single should'
write(*,*)'only be called with nHiggs <= np(Hneut)'
stop 'error in subroutine HiggsBounds_neutral_input_hadr_channelrates_single'
endif
select case(collider)
case(2)
theo(n)%tev%channelrates_tmp(nHiggs,p,d)=val
case(7)
theo(n)%lhc7%channelrates_tmp(nHiggs,p,d)=val
case(8)
theo(n)%lhc8%channelrates_tmp(nHiggs,p,d)=val
case(13)
theo(n)%lhc13%channelrates_tmp(nHiggs,p,d)=val
case default
stop 'wrong input for collider to subroutine HiggsBounds_neutral_input_hadr_channelrates_single'
end select
just_after_run=.False.
end subroutine HiggsBounds_neutral_input_hadr_channelrates_single
!************************************************************
subroutine HiggsBounds_neutral_input_hadr_channelrates_clean
!************************************************************
use theo_manip,only : clean_channelrates
implicit none
call clean_channelrates
end subroutine HiggsBounds_neutral_input_hadr_channelrates_clean
!************************************************************
! HB-4 legacy routines
!************************************************************
! subroutine HiggsBounds_neutral_input_effC(Mh,GammaTotal_hj, &
! & g2hjss_s,g2hjss_p,g2hjcc_s,g2hjcc_p, &
! & g2hjbb_s,g2hjbb_p,g2hjtoptop_s,g2hjtoptop_p, &
! & g2hjmumu_s,g2hjmumu_p, &
! & g2hjtautau_s,g2hjtautau_p, &
! & g2hjWW,g2hjZZ,g2hjZga, &
! & g2hjgaga,g2hjgg,g2hjggZ,g2hjhiZ_nHbynH, &
! & BR_hjinvisible,BR_hjhihi_nHbynH )
! ! This subroutine can be called by the user after subroutine initialize_HiggsBounds
! ! has been called.
! ! Arguments (input): theoretical predictions (see manual for definitions)
! !************************************************************
! use usefulbits, only : theo,np,Hneut,g2,whichinput,just_after_run!,inputsub
!
! #if defined(NAGf90Fortran)
! use F90_UNIX_IO, only : flush
! #endif
!
! implicit none
!
! !----------------------------------------input
! double precision,intent(in) :: Mh( np(Hneut) ),GammaTotal_hj( np(Hneut) ), &
! & g2hjss_s( np(Hneut) ),g2hjss_p( np(Hneut) ),g2hjcc_s( np(Hneut) ),g2hjcc_p( np(Hneut) ), &
! & g2hjbb_s( np(Hneut) ),g2hjbb_p( np(Hneut) ),g2hjtoptop_s( np(Hneut) ),g2hjtoptop_p( np(Hneut) ),&
! & g2hjmumu_s( np(Hneut) ),g2hjmumu_p( np(Hneut) ), &
! & g2hjtautau_s( np(Hneut) ),g2hjtautau_p( np(Hneut) ), &
! & g2hjWW( np(Hneut) ),g2hjZZ( np(Hneut) ),g2hjZga( np(Hneut) ), &
! & g2hjgaga( np(Hneut) ),g2hjgg( np(Hneut) ),g2hjggZ( np(Hneut) ),g2hjhiZ_nHbynH(np(Hneut),np(Hneut)),&
! & BR_hjinvisible( np(Hneut) ),BR_hjhihi_nHbynH(np(Hneut),np(Hneut))
! !--------------------------------------internal
! integer :: n
! ! integer :: subtype
! !----------------------------------------------
!
! whichinput='effC'
! ! subtype=1
! n=1
! ! inputsub(subtype)%stat=inputsub(subtype)%stat+1
!
! if(.not.allocated(theo))then
! stop 'subroutine HiggsBounds_initialize must be called first'
! endif
!
! if(np(Hneut).eq.0)then
! write(*,*)'subroutine HiggsBounds_neutral_input_effC should'
! write(*,*)'only be called if np(Hneut)>0'
! stop 'error in subroutine HiggsBounds_neutral_input_effC'
! endif
!
! theo(n)%particle(Hneut)%M = Mh
! theo(n)%particle(Hneut)%Mc = Mh
! theo(n)%particle(Hneut)%GammaTot= GammaTotal_hj
!
! g2(n)%hjss_s = g2hjss_s
! g2(n)%hjss_p = g2hjss_p
! g2(n)%hjcc_s = g2hjcc_s
! g2(n)%hjcc_p = g2hjcc_p
! g2(n)%hjbb_s = g2hjbb_s
! g2(n)%hjbb_p = g2hjbb_p
! g2(n)%hjtoptop_s = g2hjtoptop_s
! g2(n)%hjtoptop_p = g2hjtoptop_p
! g2(n)%hjmumu_s = g2hjmumu_s
! g2(n)%hjmumu_p = g2hjmumu_p
! g2(n)%hjtautau_s = g2hjtautau_s
! g2(n)%hjtautau_p = g2hjtautau_p
!
! g2(n)%hjWW = g2hjWW
! g2(n)%hjZZ = g2hjZZ
! g2(n)%hjZga = g2hjZga
! g2(n)%hjgaga = g2hjgaga
! g2(n)%hjgg = g2hjgg
! g2(n)%hjggZ = g2hjggZ
!
! g2(n)%hjhiZ = g2hjhiZ_nHbynH
!
! theo(n)%BR_hjinvisible = BR_hjinvisible
! theo(n)%BR_hjhihi = BR_hjhihi_nHbynH
!
! just_after_run=.False.
!
! end subroutine HiggsBounds_neutral_input_effC
! !************************************************************
! subroutine HiggsBounds_neutral_input_part(Mh,GammaTotal_hj,CP_value, &
! & CS_lep_hjZ_ratio, &
! & CS_lep_bbhj_ratio,CS_lep_tautauhj_ratio, &
! & CS_lep_hjhi_ratio_nHbynH, &
! & CS_gg_hj_ratio,CS_bb_hj_ratio, &
! & CS_bg_hjb_ratio, &
! & CS_ud_hjWp_ratio,CS_cs_hjWp_ratio, &
! & CS_ud_hjWm_ratio,CS_cs_hjWm_ratio, &
! & CS_gg_hjZ_ratio, &
! & CS_dd_hjZ_ratio,CS_uu_hjZ_ratio, &
! & CS_ss_hjZ_ratio,CS_cc_hjZ_ratio, &
! & CS_bb_hjZ_ratio, &
! & CS_tev_vbf_ratio,CS_tev_tthj_ratio, &
! & CS_lhc7_vbf_ratio,CS_lhc7_tthj_ratio, &
! & CS_lhc8_vbf_ratio,CS_lhc8_tthj_ratio, &
! & BR_hjss,BR_hjcc, &
! & BR_hjbb,BR_hjmumu,BR_hjtautau, &
! & BR_hjWW,BR_hjZZ,BR_hjZga, BR_hjgaga,BR_hjgg, &
! & BR_hjinvisible,BR_hjhihi_nHbynH )
! ! This subroutine can be called by the user after subroutine initialize_HiggsBounds
! ! has been called.
! ! (see manual for full description)
! !************************************************************
! use usefulbits, only : theo,np,Hneut,partR,whichinput,just_after_run!,inputsub
!
! #if defined(NAGf90Fortran)
! use F90_UNIX_IO, only : flush
! #endif
!
! implicit none
! !----------------------------------------input
! double precision,intent(in) :: Mh( np(Hneut) ),GammaTotal_hj( np(Hneut) )
! integer,intent(in) ::CP_value( np(Hneut) )
! double precision,intent(in) :: CS_lep_hjZ_ratio( np(Hneut) ), &
! & CS_lep_bbhj_ratio( np(Hneut) ),CS_lep_tautauhj_ratio( np(Hneut) ), &
! & CS_lep_hjhi_ratio_nHbynH(np(Hneut),np(Hneut)), &
! & CS_gg_hj_ratio( np(Hneut) ),CS_bb_hj_ratio( np(Hneut) ), &
! & CS_bg_hjb_ratio( np(Hneut) ), &
! & CS_ud_hjWp_ratio( np(Hneut) ),CS_cs_hjWp_ratio( np(Hneut) ), &
! & CS_ud_hjWm_ratio( np(Hneut) ),CS_cs_hjWm_ratio( np(Hneut) ), &
! & CS_gg_hjZ_ratio( np(Hneut) ), &
! & CS_dd_hjZ_ratio( np(Hneut) ),CS_uu_hjZ_ratio( np(Hneut) ), &
! & CS_ss_hjZ_ratio( np(Hneut) ),CS_cc_hjZ_ratio( np(Hneut) ), &
! & CS_bb_hjZ_ratio( np(Hneut) ), &
! & CS_tev_vbf_ratio( np(Hneut) ),CS_tev_tthj_ratio( np(Hneut) ), &
! & CS_lhc7_vbf_ratio( np(Hneut) ),CS_lhc7_tthj_ratio( np(Hneut) ), &
! & CS_lhc8_vbf_ratio( np(Hneut) ),CS_lhc8_tthj_ratio( np(Hneut) ), &
! & BR_hjss( np(Hneut) ),BR_hjcc( np(Hneut) ), &
! & BR_hjbb( np(Hneut) ),BR_hjmumu( np(Hneut) ),BR_hjtautau( np(Hneut) ), &
! & BR_hjWW( np(Hneut) ),BR_hjZZ( np(Hneut) ),BR_hjZga( np(Hneut) ), &
! & BR_hjgaga( np(Hneut) ),BR_hjgg( np(Hneut) ), &
! & BR_hjinvisible( np(Hneut) ),BR_hjhihi_nHbynH(np(Hneut),np(Hneut))
! !---------------------------------------internal
! integer :: n
! ! integer :: subtype
! !-----------------------------------------------
!
! whichinput='part'
! ! subtype=1
! n=1
! ! inputsub(subtype)%stat=inputsub(subtype)%stat+1
!
! if(.not.allocated(theo))then
! stop 'subroutine HiggsBounds_initialize must be called first'
! endif
!
! if(np(Hneut).eq.0)then
! write(*,*)'subroutine HiggsBounds_neutral_input_part should'
! write(*,*)'only be called if np(Hneut)>0'
! stop 'error in subroutine HiggsBounds_neutral_input_part'
! endif
!
! theo(n)%particle(Hneut)%M = Mh
! theo(n)%particle(Hneut)%Mc = Mh
! theo(n)%particle(Hneut)%GammaTot= GammaTotal_hj
! theo(n)%CP_value = CP_value
! theo(n)%lep%XS_hjZ_ratio = CS_lep_hjZ_ratio
! theo(n)%lep%XS_bbhj_ratio = CS_lep_bbhj_ratio
! theo(n)%lep%XS_tautauhj_ratio = CS_lep_tautauhj_ratio
! theo(n)%lep%XS_hjhi_ratio = CS_lep_hjhi_ratio_nHbynH
! partR(n)%gg_hj = CS_gg_hj_ratio
! partR(n)%qq_hj(5,:) = CS_bb_hj_ratio
! partR(n)%bg_hjb = CS_bg_hjb_ratio
! partR(n)%qq_hjWp(1,:) = CS_ud_hjWp_ratio
! partR(n)%qq_hjWp(2,:) = CS_cs_hjWp_ratio
! partR(n)%qq_hjWm(1,:) = CS_ud_hjWm_ratio
! partR(n)%qq_hjWm(2,:) = CS_cs_hjWm_ratio
! partR(n)%gg_hjZ(:) = CS_gg_hjZ_ratio
! partR(n)%qq_hjZ(1,:) = CS_dd_hjZ_ratio
! partR(n)%qq_hjZ(2,:) = CS_uu_hjZ_ratio
! partR(n)%qq_hjZ(3,:) = CS_ss_hjZ_ratio
! partR(n)%qq_hjZ(4,:) = CS_cc_hjZ_ratio
! partR(n)%qq_hjZ(5,:) = CS_bb_hjZ_ratio
! theo(n)%tev%XS_vbf_ratio = CS_tev_vbf_ratio
! theo(n)%tev%XS_tthj_ratio = CS_tev_tthj_ratio
! theo(n)%lhc7%XS_vbf_ratio = CS_lhc7_vbf_ratio
! theo(n)%lhc7%XS_tthj_ratio= CS_lhc7_tthj_ratio
! theo(n)%lhc8%XS_vbf_ratio = CS_lhc8_vbf_ratio
! theo(n)%lhc8%XS_tthj_ratio= CS_lhc8_tthj_ratio
! theo(n)%BR_hjss = BR_hjss
! theo(n)%BR_hjcc = BR_hjcc
! theo(n)%BR_hjbb = BR_hjbb
! theo(n)%BR_hjmumu = BR_hjmumu
! theo(n)%BR_hjtautau = BR_hjtautau
! theo(n)%BR_hjWW = BR_hjWW
! theo(n)%BR_hjZZ = BR_hjZZ
! theo(n)%BR_hjZga = BR_hjZga
! theo(n)%BR_hjgaga = BR_hjgaga
! theo(n)%BR_hjgg = BR_hjgg
! theo(n)%BR_hjinvisible = BR_hjinvisible
! theo(n)%BR_hjhihi = BR_hjhihi_nHbynH
!
! just_after_run=.False.
!
! end subroutine HiggsBounds_neutral_input_part
! !************************************************************
! subroutine HiggsBounds_neutral_input_hadr(Mh,GammaTotal_hj,CP_value, &
! & CS_lep_hjZ_ratio, &
! & CS_lep_bbhj_ratio,CS_lep_tautauhj_ratio, &
! & CS_lep_hjhi_ratio_nHbynH, &
! & CS_tev_hj_ratio ,CS_tev_hjb_ratio, &
! & CS_tev_hjW_ratio,CS_tev_hjZ_ratio, &
! & CS_tev_vbf_ratio,CS_tev_tthj_ratio, &
! & CS_lhc7_hj_ratio ,CS_lhc7_hjb_ratio, &
! & CS_lhc7_hjW_ratio,CS_lhc7_hjZ_ratio, &
! & CS_lhc7_vbf_ratio,CS_lhc7_tthj_ratio, &
! & CS_lhc8_hj_ratio ,CS_lhc8_hjb_ratio, &
! & CS_lhc8_hjW_ratio,CS_lhc8_hjZ_ratio, &
! & CS_lhc8_vbf_ratio,CS_lhc8_tthj_ratio, &
! & BR_hjss,BR_hjcc, &
! & BR_hjbb, &
! & BR_hjmumu, &
! & BR_hjtautau, &
! & BR_hjWW,BR_hjZZ,BR_hjZga,BR_hjgaga, &
! & BR_hjgg, BR_hjinvisible, &
! & BR_hjhihi_nHbynH )
! ! This subroutine can be called by the user after subroutine initialize_HiggsBounds
! ! has been called.
! ! (see manual for full description)
! !************************************************************
! use usefulbits, only : theo,np,Hneut,whichinput,just_after_run!,inputsub
!
! #if defined(NAGf90Fortran)
! use F90_UNIX_IO, only : flush
! #endif
!
! implicit none
! !----------------------------------------input
! double precision,intent(in) :: Mh( np(Hneut) ),GammaTotal_hj( np(Hneut) )
! integer,intent(in) :: CP_value( np(Hneut) )
! double precision,intent(in) :: CS_lep_hjZ_ratio( np(Hneut) ), &
! & CS_lep_bbhj_ratio( np(Hneut) ),CS_lep_tautauhj_ratio( np(Hneut) ), &
! & CS_lep_hjhi_ratio_nHbynH(np(Hneut),np(Hneut)), &
! & CS_tev_hj_ratio( np(Hneut) ) ,CS_tev_hjb_ratio( np(Hneut) ), &
! & CS_tev_hjW_ratio( np(Hneut) ) ,CS_tev_hjZ_ratio( np(Hneut) ), &
! & CS_tev_vbf_ratio( np(Hneut) ) ,CS_tev_tthj_ratio( np(Hneut)), &
! & CS_lhc7_hj_ratio( np(Hneut) ),CS_lhc7_hjb_ratio( np(Hneut) ), &
! & CS_lhc7_hjW_ratio( np(Hneut) ),CS_lhc7_hjZ_ratio( np(Hneut) ), &
! & CS_lhc7_vbf_ratio( np(Hneut) ),CS_lhc7_tthj_ratio( np(Hneut)), &
! & CS_lhc8_hj_ratio( np(Hneut) ),CS_lhc8_hjb_ratio( np(Hneut) ), &
! & CS_lhc8_hjW_ratio( np(Hneut) ),CS_lhc8_hjZ_ratio( np(Hneut) ), &
! & CS_lhc8_vbf_ratio( np(Hneut) ),CS_lhc8_tthj_ratio( np(Hneut)), &
! & BR_hjss( np(Hneut) ),BR_hjcc( np(Hneut) ), &
! & BR_hjbb( np(Hneut) ), &
! & BR_hjmumu( np(Hneut) ),BR_hjtautau( np(Hneut) ), &
! & BR_hjWW( np(Hneut) ),BR_hjZZ( np(Hneut) ), &
! & BR_hjZga( np(Hneut) ),BR_hjgaga( np(Hneut) ), &
! & BR_hjgg( np(Hneut) ), BR_hjinvisible( np(Hneut) ), &
! & BR_hjhihi_nHbynH(np(Hneut),np(Hneut))
! !-------------------------------------internal
! integer :: n
! ! integer :: subtype
! !---------------------------------------------
!
! whichinput='hadr'
! ! subtype=1
! n=1
! ! inputsub(subtype)%stat=inputsub(subtype)%stat+1
!
! if(.not.allocated(theo))then
! stop 'subroutine HiggsBounds_initialize must be called first'
! endif
!
! if(np(Hneut).eq.0)then
! write(*,*)'subroutine HiggsBounds_neutral_input_hadr should'
! write(*,*)'only be called if np(Hneut)>0'
! stop 'error in subroutine HiggsBounds_neutral_input_hadr'
! endif
!
! ! write(*,*) "DEBUG HB: before hadronic input. Mass is ",theo(n)%particle(Hneut)%M
!
!
! theo(n)%particle(Hneut)%M = Mh
! theo(n)%particle(Hneut)%Mc = Mh
! theo(n)%particle(Hneut)%GammaTot= GammaTotal_hj
! theo(n)%CP_value = CP_value
! theo(n)%lep%XS_hjZ_ratio = CS_lep_hjZ_ratio
! theo(n)%lep%XS_bbhj_ratio = CS_lep_bbhj_ratio
! theo(n)%lep%XS_tautauhj_ratio = CS_lep_tautauhj_ratio
! theo(n)%lep%XS_hjhi_ratio = CS_lep_hjhi_ratio_nHbynH
! theo(n)%tev%XS_hj_ratio = CS_tev_hj_ratio
! theo(n)%tev%XS_hjb_ratio = CS_tev_hjb_ratio
! theo(n)%tev%XS_hjW_ratio = CS_tev_hjW_ratio
! theo(n)%tev%XS_hjZ_ratio = CS_tev_hjZ_ratio
! theo(n)%tev%XS_vbf_ratio = CS_tev_vbf_ratio
! theo(n)%tev%XS_tthj_ratio = CS_tev_tthj_ratio
! theo(n)%lhc7%XS_hj_ratio = CS_lhc7_hj_ratio
! theo(n)%lhc7%XS_hjb_ratio = CS_lhc7_hjb_ratio
! theo(n)%lhc7%XS_hjW_ratio = CS_lhc7_hjW_ratio
! theo(n)%lhc7%XS_hjZ_ratio = CS_lhc7_hjZ_ratio
! theo(n)%lhc7%XS_vbf_ratio = CS_lhc7_vbf_ratio
! theo(n)%lhc7%XS_tthj_ratio = CS_lhc7_tthj_ratio
! theo(n)%lhc8%XS_hj_ratio = CS_lhc8_hj_ratio
! theo(n)%lhc8%XS_hjb_ratio = CS_lhc8_hjb_ratio
! theo(n)%lhc8%XS_hjW_ratio = CS_lhc8_hjW_ratio
! theo(n)%lhc8%XS_hjZ_ratio = CS_lhc8_hjZ_ratio
! theo(n)%lhc8%XS_vbf_ratio = CS_lhc8_vbf_ratio
! theo(n)%lhc8%XS_tthj_ratio = CS_lhc8_tthj_ratio
! theo(n)%BR_hjss = BR_hjss
! theo(n)%BR_hjcc = BR_hjcc
! theo(n)%BR_hjbb = BR_hjbb
! theo(n)%BR_hjmumu = BR_hjmumu
! theo(n)%BR_hjtautau = BR_hjtautau
! theo(n)%BR_hjWW = BR_hjWW
! theo(n)%BR_hjZZ = BR_hjZZ
! theo(n)%BR_hjZga = BR_hjZga
! theo(n)%BR_hjgaga = BR_hjgaga
! theo(n)%BR_hjgg = BR_hjgg
! theo(n)%BR_hjinvisible = BR_hjinvisible
! theo(n)%BR_hjhihi = BR_hjhihi_nHbynH
!
! just_after_run=.False.
!
! ! write(*,*) "DEBUG HB: filled hadronic input. Mass is ",theo(n)%particle(Hneut)%M
!
! end subroutine HiggsBounds_neutral_input_hadr
!************************************************************
\ No newline at end of file
Index: trunk/HiggsBounds-5/AllAnalyses
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/HiggsBounds-5/usefulbits.f90
===================================================================
--- trunk/HiggsBounds-5/usefulbits.f90 (revision 581)
+++ trunk/HiggsBounds-5/usefulbits.f90 (revision 582)
@@ -1,1462 +1,1466 @@
! This file is part of HiggsBounds
! -KW
!******************************************************************
module usefulbits
!******************************************************************
implicit none
logical :: debug = .False.
logical :: full_dmth_variation = .True.
integer :: dmhsteps = 3
! Mass uncertainties smaller than 0.1 GeV are not considered
double precision :: small_mh = 0.1D0
logical :: run_HB_classic = .False.
logical :: wantkey = .True.
logical :: extrapolatewidth = .True.
! For the CMS likelihood extension
integer :: using_likelihood = 0
! For the LEP chisq extension:
logical :: chisqcut_at_mumax = .False.
! HB-5:
logical :: BRdirectinput = .False.
character(LEN=5) :: whichanalyses
character(LEN=4) :: whichinput
character(LEN=7) :: inputmethod = 'subrout'
character(LEN=9),parameter :: vers='5.2.0beta'
integer, parameter :: numres = 3
integer :: n_additional
character(len=300) :: infile1,infile2
integer,parameter :: file_id_common=10
integer,parameter :: file_id_common2=12
integer,parameter :: file_id_common3=133
integer,parameter :: file_id_common4=134
integer,parameter :: file_id_debug1=444
integer,parameter :: file_id_debug2=45
integer, allocatable :: analysislist(:)
integer, allocatable :: analysis_exclude_list(:)
!read from http://pdg.lbl.gov/ 22.10.2009
double precision,parameter :: mt=173.2D0
double precision,parameter :: ms=0.105D0
double precision,parameter :: mc=1.27D0
double precision,parameter :: mbmb=4.20D0
double precision,parameter :: mmu=105.7D-3
double precision,parameter :: mtau=1.777D0
double precision,parameter :: MZ=91.1876D0 !PDG 2009
double precision,parameter :: MW=80.398D0 !PDG 2009
double precision,parameter :: GF=1.16637D-5
double precision,parameter :: pi=3.14159265358979323846264338328D0
double precision,parameter :: alphas=0.118D0
double precision,parameter :: small=1.0D-6
double precision,parameter :: vsmall=1.0D-16
double precision,parameter :: vvsmall=1.0D-100
type particledescriptions
character(LEN=10) :: short
character(LEN=30) :: long
end type
! particle codes: (n.b. these are NOT pdg)
integer,parameter :: not_a_particle = 0
integer,parameter :: Hneut = 1 !either Mhi, Mh2 or Mh3 (says nothing about CP properties)
integer,parameter :: Hplus = 2 !single charged Higgs
integer,parameter :: Chineut = 3 !either neutralino1, neutralino2, neutralino3 or neutralino4
integer,parameter :: Chiplus = 4 !either chargino1 or chargino2
integer :: np(0:4)=1 !e.g np(Hneut) holds number of neutral Higgs considered
type(particledescriptions),allocatable :: pdesc(:)
! HB-5.2: Needed for the channelrates_matrix
! integer, parameter :: Nprod = 7
! integer, parameter :: Ndecay = 9
integer, parameter :: Nprod = 11
integer, parameter :: Ndecay = 11
!for subroutine version-------------------- (HB5: Removed!)
! type inputsubroutineinfo
! integer :: stat
! character(LEN=40) :: desc
! integer :: req
! end type
! type(inputsubroutineinfo),allocatable :: inputsub(:)
logical :: just_after_run
!associated with 'channels'----------------
integer :: ntot
type listprocesses
integer :: tlist,ttype
integer :: findi,findj
integer :: corresponding_clsb_table_element
end type
type(listprocesses), allocatable :: pr(:)
type(listprocesses), allocatable :: prsep(:,:)
!-------------------------------------------
!associated with 'input'--------------------
type particlemasses
double precision, allocatable :: M(:)
! Central value for mass with uncertainties
double precision, allocatable :: Mc(:)
double precision, allocatable :: GammaTot(:)
! Mass uncertainties (chi-2 test) used in HiggsSignals
double precision, allocatable :: dM(:)
! Mass uncertainties (variation) used in HiggsBounds
double precision, allocatable :: dMh(:)
end type
double precision, allocatable :: diffMhneut(:,:)
double precision, allocatable :: diffMhch(:,:)
double precision, allocatable :: dmn(:)
double precision, allocatable :: dmch(:)
integer ndmh
integer ndat
type lepdataset
double precision, allocatable :: XS_hjZ_ratio(:)
double precision, allocatable :: XS_bbhj_ratio(:)
double precision, allocatable :: XS_tautauhj_ratio(:)
double precision, allocatable :: XS_hjhi_ratio(:,:)
double precision, allocatable :: XS_HpjHmj_ratio(:)
double precision, allocatable :: XS_CpjCmj(:)
double precision, allocatable :: XS_NjNi(:,:)
end type
type hadroncolliderdataset
double precision, allocatable :: XS_hj_ratio(:)
double precision, allocatable :: XS_gg_hj_ratio(:) ! HB-5: for gluon fusion
double precision, allocatable :: XS_bb_hj_ratio(:) ! HB-5: for bb+Higgs production
double precision, allocatable :: XS_hjZ_ratio(:)
double precision, allocatable :: XS_gg_hjZ_ratio(:) ! HB-5 (TS 6.4.2018)
double precision, allocatable :: XS_qq_hjZ_ratio(:) ! HB-5 (TS 6.4.2018)
double precision, allocatable :: XS_hjW_ratio(:)
double precision, allocatable :: XS_hjb_ratio(:) ! still needed?
double precision, allocatable :: XS_tthj_ratio(:)
double precision, allocatable :: XS_vbf_ratio(:)
double precision, allocatable :: XS_thj_tchan_ratio(:) ! HB-5
double precision, allocatable :: XS_thj_schan_ratio(:) ! HB-5
double precision, allocatable :: XS_hjhi(:,:) ! HB-5
! SM reference cross section holders:
double precision, allocatable :: XS_HZ_SM(:)
double precision, allocatable :: XS_gg_HZ_SM(:) ! HB-5 (TS 6.4.2018)
double precision, allocatable :: XS_qq_HZ_SM(:) ! HB-5 (TS 6.4.2018)
double precision, allocatable :: XS_HW_SM(:)
double precision, allocatable :: XS_H_SM(:)
double precision, allocatable :: XS_gg_H_SM(:) ! HB-5
double precision, allocatable :: XS_bb_H_SM(:) ! HB-5
!double precision, allocatable :: XS_H_SM_9713(:),XS_H_SM_9674(:)
double precision, allocatable :: XS_ttH_SM(:)
double precision, allocatable :: XS_tH_tchan_SM(:) ! HB-5
double precision, allocatable :: XS_tH_schan_SM(:) ! HB-5
double precision, allocatable :: XS_vbf_SM(:)
! Higgs produced in association with b, where b is tagged, comes uncut and with various cuts
! see subroutines in theory_XS_SM_functions.f90 for details
double precision, allocatable :: XS_Hb_SM(:)
double precision, allocatable :: XS_Hb_c1_SM(:),XS_Hb_c2_SM(:), XS_Hb_c3_SM(:),XS_Hb_c4_SM(:)
! HB-5: Charged Higgs production cross sections (in pb)
double precision, allocatable :: XS_vbf_Hpj(:) ! for Hp_j production in VBF
double precision, allocatable :: XS_Hpjtb(:) ! for Hp_j + t + b production
double precision, allocatable :: XS_Hpjcb(:) ! for Hp_j + c + b production
double precision, allocatable :: XS_Hpjbjet(:) ! for Hp_j + b + jet production
double precision, allocatable :: XS_Hpjcjet(:) ! for Hp_j + b + jet production
double precision, allocatable :: XS_Hpjjetjet(:) ! for Hp_j + jet + jet production
double precision, allocatable :: XS_HpjW(:) ! for Hp_j + W production
double precision, allocatable :: XS_HpjZ(:) ! for Hp_j + Z production
double precision, allocatable :: XS_HpjHmj(:) ! (j,i), for Hp_j Hm_j production
double precision, allocatable :: XS_Hpjhi(:,:) ! (j,i), for Hp_j h_i production
! HB-5.2 beyond the narrow-width approximation matrix: holds the SM normalized channel rates
! with the dimensions (N_H, N_production-modes, N_decay-modes) = (N_H, 7, 9), where the
! ordering is the following
! 1: singleH, 2: VBF, 3: WH, 4: ZH, 5: ttH, 6: gg->phi, 7: bb->phi
! 1: gaga, 2: WW, 3: ZZ, 4: tautau, 5:bb, 6: Zga, 7: cc, 8: mumu, 9: gg
double precision, allocatable :: channelrates(:,:,:)
! We need a temporary copy for the interface (will be copied in complete_theo)
double precision, allocatable :: channelrates_tmp(:,:,:)
! This one holds the corresponding SM rates (in pb), assuming the NWA:
double precision, allocatable :: channelrates_SM(:,:,:)
end type
type dataset
logical :: gooddataset
integer, allocatable :: CP_value(:)
double precision, allocatable :: additional(:)
type(particlemasses), allocatable :: particle(:)
double precision, allocatable :: BR_hjss(:),BR_hjcc(:)
double precision, allocatable :: BR_hjbb(:),BR_hjtt(:) !HB-5 new H->tt
double precision, allocatable :: BR_hjmumu(:),BR_hjtautau(:)
double precision, allocatable :: BR_hjinvisible(:)
double precision, allocatable :: BR_hjhihi(:,:) ! legacy HB-4
double precision, allocatable :: BR_hkhjhi(:,:,:) ! HB-5: for the decay h_k -> h_j h_i
double precision, allocatable :: BR_hjhiZ(:,:) ! HB-5: for the decay h_j -> h_i Z
double precision, allocatable :: BR_hjemu(:), BR_hjetau(:), BR_hjmutau(:) ! HB-5
double precision, allocatable :: BR_hjHpiW(:,:) ! HB-5: for the decay h_j -> Hp_i W
type(lepdataset) :: lep
!-------------------------------------------
double precision, allocatable :: BR_hjWW(:),BR_hjgaga(:)
double precision, allocatable :: BR_hjZga(:)
double precision, allocatable :: BR_hjZZ(:),BR_hjgg(:)
double precision :: BR_tWpb
double precision, allocatable :: BR_tHpjb(:)
double precision, allocatable :: BR_Hpjcs(:)
double precision, allocatable :: BR_Hpjcb(:)
double precision, allocatable :: BR_Hpjtaunu(:)
double precision, allocatable :: BR_Hpjtb(:) ! HB-5: for the decay Hp_j -> t b
double precision, allocatable :: BR_HpjWZ(:) ! HB-5: for the decay Hp_j -> W Z
double precision, allocatable :: BR_HpjhiW(:,:) ! HB-5: for the decay Hp_j -> h_i W
double precision, allocatable :: BR_CjqqNi(:,:)
double precision, allocatable :: BR_CjlnuNi(:,:)
double precision, allocatable :: BR_CjWNi(:,:)
double precision, allocatable :: BR_NjqqNi(:,:)
double precision, allocatable :: BR_NjZNi(:,:)
type(hadroncolliderdataset) :: tev
type(hadroncolliderdataset) :: lhc7
type(hadroncolliderdataset) :: lhc8
type(hadroncolliderdataset) :: lhc13 ! HB-5
! NEW(24/09/2014, TS):
! double precision, allocatable :: gg_hj_ratio(:)
! double precision, allocatable :: bb_hj_ratio(:)
double precision, allocatable :: BR_Htt_SM(:), BR_Hbb_SM(:) !HB-5 new H->tt
double precision, allocatable :: BR_Hcc_SM(:),BR_Hss_SM(:)
double precision, allocatable :: BR_Hmumu_SM(:),BR_Htautau_SM(:)
double precision, allocatable :: BR_HWW_SM(:),BR_HZZ_SM(:),BR_HZga_SM(:),BR_Hgaga_SM(:),BR_Hgg_SM(:)
double precision, allocatable :: BR_Hjets_SM(:)
double precision, allocatable :: GammaTot_SM(:)
!-------------------------------------------
end type
type(dataset), allocatable :: theo(:)
type sqcouplratio
double precision, allocatable :: hjss_s(:),hjss_p(:)
double precision, allocatable :: hjcc_s(:),hjcc_p(:)
double precision, allocatable :: hjbb_s(:),hjbb_p(:)
double precision, allocatable :: hjtoptop_s(:),hjtoptop_p(:) ! ToDo: Change name top -> t !
double precision, allocatable :: hjmumu_s(:),hjmumu_p(:)
double precision, allocatable :: hjtautau_s(:),hjtautau_p(:)
double precision, allocatable :: hjWW(:),hjZZ(:)
double precision, allocatable :: hjZga(:)
double precision, allocatable :: hjgaga(:),hjgg(:),hjggZ(:)
double precision, allocatable :: hjhiZ(:,:)
end type
type(sqcouplratio), allocatable :: g2(:)
! HB-5: NEW! -->
type couplratio
double precision, allocatable :: hjcc_s(:),hjcc_p(:)
double precision, allocatable :: hjss_s(:),hjss_p(:)
double precision, allocatable :: hjtt_s(:),hjtt_p(:)
double precision, allocatable :: hjbb_s(:),hjbb_p(:)
double precision, allocatable :: hjmumu_s(:),hjmumu_p(:)
double precision, allocatable :: hjtautau_s(:),hjtautau_p(:)
double precision, allocatable :: hjWW(:),hjZZ(:)
double precision, allocatable :: hjZga(:)
double precision, allocatable :: hjgaga(:),hjgg(:) !,hjggZ(:)
double precision, allocatable :: hjhiZ(:,:)
end type
! <--- !
type(couplratio), allocatable :: effC(:)
type hadroncolliderextras
!nq_hjWp,nq_hjWm,nq_hj,nq_hjZ are set in allocate_hadroncolliderextras_parts below
double precision, allocatable :: qq_hjWp(:,:)
integer :: nq_hjWp!=2 i.e. (u dbar), (c sbar) e.g. allocate(tR%qq_hjWp(tR%nq_hjWp,np(Hneut)))
double precision, allocatable :: qq_hjWm(:,:)
integer :: nq_hjWm!=2 i.e. (ubar d), (cbar s)
double precision, allocatable :: gg_hj(:)
double precision, allocatable :: qq_hj(:,:)
integer :: nq_hj!=5 i.e.(d dbar), (u ubar), (s sbar), (c cbar), (b bbar)
double precision, allocatable :: gg_hjZ(:)
double precision, allocatable :: qq_hjZ(:,:)
integer :: nq_hjZ!=5 i.e.(d dbar), (u ubar), (s sbar), (c cbar), (b bbar)
double precision, allocatable :: bg_hjb(:)
end type
type(hadroncolliderextras), allocatable :: partR(:)
!-------------------------------------------
!associated with 'output'--------------------
integer rep
type results
integer, allocatable :: chan(:)
double precision, allocatable :: obsratio(:)
double precision, allocatable :: predratio(:)
double precision, allocatable :: sfactor(:)
double precision, allocatable :: axis_i(:)
double precision, allocatable :: axis_j(:)
integer, allocatable :: allowed95(:)
integer, allocatable :: ncombined(:)
character(LEN=4), allocatable :: channelselection(:)
end type
type(results), allocatable :: res(:)
!--new in HB-4:
type fullresults
integer :: chan = 0
integer :: ncombined = 0
integer :: allowed95 = 1
double precision :: obsratio = 0.0D0
end type
type(fullresults), allocatable :: fullHBres(:)
integer, allocatable :: allocate_if_stats_required(:)
! Needed to store relevant information on next-to-most sensitive channels:
integer,allocatable :: HBresult_all(:,:), chan_all(:,:), ncombined_all(:,:)
double precision,allocatable :: obsratio_all(:,:),predratio_all(:,:)
!-------------------------------------------
contains
subroutine HiggsBounds_info
implicit none
write(*,*)
write(*,*)"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
write(*,*)"~ ~"
write(*,*)"~ HiggsBounds "//adjustl(vers)//" ~"
write(*,*)"~ ~"
write(*,*)"~ Philip Bechtle, Daniel Dercks, Sven Heinemeyer, ~"
write(*,*)"~ Tim Stefaniak, Georg Weiglein ~"
write(*,*)"~ ~"
write(*,*)"~ arXiv:0811.4169, arXiv:1102.1898, ~"
write(*,*)"~ arXiv:1301.2345, arXiv:1311.0055 ~"
write(*,*)"~ arXiv:1507.06706, ~"
write(*,*)"~ http://higgsbounds.hepforge.org ~"
write(*,*)"~ ~"
write(*,*)"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
write(*,*)
write(*,*)"HiggsBounds collects together results from "
write(*,*)
write(*,*)" * the LEP collaborations and LEP Higgs Working Group"
write(*,*)" * the CDF and D0 Collaborations"
write(*,*)" * the ATLAS and CMS Collaborations"
write(*,*)" * the program HDECAY (arXiv:hep-ph/9704448)"
write(*,*)" * the program VH@NNLO"
write(*,*)" (arXiv:1210.5347,arXiv:1802.04817)"
write(*,*)" * TeV4LHC Higgs Working Group report"
write(*,*)" (see arXiv:hep-ph/0612172 and refs. therein)"
write(*,*)" * LHC Higgs Cross Section Working Group"
write(*,*)" (arXiv:1101.0593, arXiv:1201.3084, arXiv:1307.1347,"
write(*,*)" arXiv:1610.07922 and refs. therein, including the "
write(*,*)" gluon fusion N3LO prediction (arXiv:1602.00695).)"
end subroutine HiggsBounds_info
!**********************************************************
function div(a,b,divlimit,div0res)
!**********************************************************
! be careful about using this - not a mathematical limit
double precision :: div
!--------------------------------------input
double precision :: a,b,divlimit,div0res
!-----------------------------------internal
double precision :: small1,small2
!-------------------------------------------
small1 = 1.0D-28
small2 = 1.0D-20
if(abs(b).gt.small1)then
div=a/b
elseif(abs(a).lt.small2)then
div=divlimit
if(div.lt.0)stop 'error type divA (see function div in module usefulbits)'
else
div=div0res
if(div.lt.0)stop 'error type divB (see function div in module usefulbits)'
endif
end function
!--TESTING
!**********************************************************
subroutine iselementofarray(value, array, output)
!**********************************************************
implicit none
!-------------------------------------input and output
double precision, intent(in) :: value
double precision, allocatable, dimension(:), intent(in) :: array
integer, intent(out) :: output
!---------------------------------------------internal
integer :: i
double precision :: small
!-----------------------------------------------------
small = 1.0D-20
output = -1
if(allocated(array)) then
do i=lbound(array,dim=1),ubound(array,dim=1)
if(abs(value-array(i)).le.small) output = 1
enddo
else
stop 'error: Passing an unallocated array to subroutine iselementofarray!'
endif
end subroutine iselementofarray
!----
!**********************************************************
subroutine fill_pdesc
!**********************************************************
integer :: x
if(ubound(np,dim=1).ne.4)stop 'error: have made a mistake in subroutine fill_pdesc (1)'
x=0
allocate( pdesc( ubound(np,dim=1) ) )
x=x+1
pdesc(x)%short='h'
pdesc(x)%long ='neutral Higgs boson'
x=x+1
pdesc(x)%short='hplus'
pdesc(x)%long ='charged Higgs boson'
x=x+1
pdesc(x)%short='N'
pdesc(x)%long ='neutralino'
x=x+1
pdesc(x)%short='C'
pdesc(x)%long ='chargino'
if(x.ne.ubound(np,dim=1))stop 'error: have made a mistake in subroutine fill_pdesc (2)'
end subroutine fill_pdesc
!**********************************************************
subroutine allocate_dataset_parts(d,n_addit)
!**********************************************************
implicit none
!-------------------------------------------
type(dataset) :: d(:)
!--------------------------------------input
integer, intent(in) :: n_addit
!-----------------------------------internal
integer :: n_add,x,y
integer, allocatable :: np_t(:)
!-------------------------------------------
allocate(np_t(lbound(np,dim=1):ubound(np,dim=1)))
np_t=np
do x=lbound(np_t,dim=1),ubound(np_t,dim=1)
if(np(x)>0)then
np_t(x)=np(x)
elseif(np(x).eq.0)then
np_t(x)=1
else
write(*,*)'np=',np
stop 'error in subroutine allocate_dataset_parts (1)'
endif
enddo
if(n_addit>0)then
n_add=n_addit
elseif(n_addit.eq.0)then
n_add=1
else
stop 'error in subroutine allocate_dataset_parts (2)'
endif
do x=lbound(d,dim=1),ubound(d,dim=1)
allocate(d(x)%additional(n_add))
allocate(d(x)%particle( ubound(np_t,dim=1) ))
do y= 1,ubound(np_t,dim=1)
allocate(d(x)%particle(y)%M( np_t(y) ))
allocate(d(x)%particle(y)%Mc( np_t(y) ))
allocate(d(x)%particle(y)%GammaTot( np_t(y) ))
allocate(d(x)%particle(y)%dM( np_t(y) ))
allocate(d(x)%particle(y)%dMh( np_t(y) ))
enddo
allocate(d(x)%lep%XS_hjZ_ratio( np_t(Hneut) ))
allocate(d(x)%lep%XS_bbhj_ratio( np_t(Hneut) ))
allocate(d(x)%lep%XS_tautauhj_ratio( np_t(Hneut) ))
allocate(d(x)%lep%XS_hjhi_ratio( np_t(Hneut),np_t(Hneut) ))
allocate(d(x)%lep%XS_HpjHmj_ratio( np_t(Hplus) ))
allocate(d(x)%lep%XS_CpjCmj( np_t(Chiplus) ))
allocate(d(x)%lep%XS_NjNi( np_t(Chineut),np_t(Chineut) ))
allocate(d(x)%BR_hjss( np_t(Hneut) ))
allocate(d(x)%BR_hjcc( np_t(Hneut) ))
allocate(d(x)%BR_hjbb( np_t(Hneut) ))
allocate(d(x)%BR_hjtt( np_t(Hneut) ))
allocate(d(x)%BR_hjmumu( np_t(Hneut) ))
allocate(d(x)%BR_hjtautau( np_t(Hneut) ))
allocate(d(x)%BR_hkhjhi( np_t(Hneut),np_t(Hneut),np_t(Hneut) ))
allocate(d(x)%BR_hjhihi( np_t(Hneut),np_t(Hneut) ))
allocate(d(x)%BR_hjhiZ( np_t(Hneut),np_t(Hneut) ))
allocate(d(x)%BR_hjHpiW( np_t(Hneut),np_t(Hplus) ))
allocate(d(x)%BR_hjWW( np_t(Hneut) ))
allocate(d(x)%BR_hjZZ( np_t(Hneut) ))
allocate(d(x)%BR_hjZga( np_t(Hneut) ))
allocate(d(x)%BR_hjgaga( np_t(Hneut) ))
allocate(d(x)%BR_hjgg( np_t(Hneut) ))
allocate(d(x)%BR_hjinvisible( np_t(Hneut) ))
allocate(d(x)%BR_hjemu( np_t(Hneut) ))
allocate(d(x)%BR_hjetau( np_t(Hneut) ))
allocate(d(x)%BR_hjmutau( np_t(Hneut) ))
allocate(d(x)%BR_tHpjb( np_t(Hplus) ))
allocate(d(x)%BR_Hpjcs( np_t(Hplus) ))
allocate(d(x)%BR_Hpjcb( np_t(Hplus) ))
allocate(d(x)%BR_Hpjtaunu( np_t(Hplus) ))
allocate(d(x)%BR_Hpjtb( np_t(Hplus) ))
allocate(d(x)%BR_HpjWZ( np_t(Hplus) ))
allocate(d(x)%BR_HpjhiW( np_t(Hplus),np_t(Hneut) ))
allocate(d(x)%BR_CjqqNi( np_t(Chiplus),np_t(Chineut) ))
allocate(d(x)%BR_CjlnuNi( np_t(Chiplus),np_t(Chineut) ))
allocate(d(x)%BR_CjWNi( np_t(Chiplus),np_t(Chineut) ))
allocate(d(x)%BR_NjqqNi( np_t(Chineut),np_t(Chineut) ))
allocate(d(x)%BR_NjZNi( np_t(Chineut),np_t(Chineut) ))
allocate(d(x)%tev%XS_hjb_ratio( np_t(Hneut) ))
allocate(d(x)%tev%XS_tthj_ratio( np_t(Hneut) ))
allocate(d(x)%tev%XS_vbf_ratio( np_t(Hneut) ))
allocate(d(x)%tev%XS_hjZ_ratio( np_t(Hneut) ))
allocate(d(x)%tev%XS_gg_hjZ_ratio( np_t(Hneut) ))
allocate(d(x)%tev%XS_qq_hjZ_ratio( np_t(Hneut) ))
allocate(d(x)%tev%XS_hjW_ratio( np_t(Hneut) ))
allocate(d(x)%tev%XS_hj_ratio( np_t(Hneut) ))
allocate(d(x)%tev%XS_gg_hj_ratio( np_t(Hneut) ))
allocate(d(x)%tev%XS_bb_hj_ratio( np_t(Hneut) ))
allocate(d(x)%tev%XS_thj_tchan_ratio( np_t(Hneut) ))
allocate(d(x)%tev%XS_thj_schan_ratio( np_t(Hneut) ))
allocate(d(x)%tev%XS_hjhi( np_t(Hneut),np_t(Hneut) ))
allocate(d(x)%tev%XS_vbf_Hpj( np_t(Hplus) ))
allocate(d(x)%tev%XS_Hpjtb( np_t(Hplus) ))
allocate(d(x)%tev%XS_Hpjcb( np_t(Hplus) ))
allocate(d(x)%tev%XS_Hpjbjet( np_t(Hplus) ))
allocate(d(x)%tev%XS_Hpjcjet( np_t(Hplus) ))
allocate(d(x)%tev%XS_Hpjjetjet( np_t(Hplus) ))
allocate(d(x)%tev%XS_HpjW( np_t(Hplus) ))
allocate(d(x)%tev%XS_HpjZ( np_t(Hplus) ))
allocate(d(x)%tev%XS_HpjHmj( np_t(Hplus) ))
allocate(d(x)%tev%XS_Hpjhi( np_t(Hplus), np_t(Hneut) ))
allocate(d(x)%tev%channelrates(np_t(Hneut),Nprod,Ndecay))
allocate(d(x)%tev%channelrates_tmp(np_t(Hneut),Nprod,Ndecay))
allocate(d(x)%lhc7%XS_hjb_ratio( np_t(Hneut) ))
allocate(d(x)%lhc7%XS_tthj_ratio( np_t(Hneut) ))
allocate(d(x)%lhc7%XS_vbf_ratio( np_t(Hneut) ))
allocate(d(x)%lhc7%XS_hjZ_ratio( np_t(Hneut) ))
allocate(d(x)%lhc7%XS_gg_hjZ_ratio( np_t(Hneut) ))
allocate(d(x)%lhc7%XS_qq_hjZ_ratio( np_t(Hneut) ))
allocate(d(x)%lhc7%XS_hjW_ratio( np_t(Hneut) ))
allocate(d(x)%lhc7%XS_hj_ratio( np_t(Hneut) ))
allocate(d(x)%lhc7%XS_gg_hj_ratio( np_t(Hneut) ))
allocate(d(x)%lhc7%XS_bb_hj_ratio( np_t(Hneut) ))
allocate(d(x)%lhc7%XS_thj_tchan_ratio( np_t(Hneut) ))
allocate(d(x)%lhc7%XS_thj_schan_ratio( np_t(Hneut) ))
allocate(d(x)%lhc7%XS_hjhi( np_t(Hneut),np_t(Hneut) ))
allocate(d(x)%lhc7%XS_vbf_Hpj( np_t(Hplus) ))
allocate(d(x)%lhc7%XS_Hpjtb( np_t(Hplus) ))
allocate(d(x)%lhc7%XS_Hpjcb( np_t(Hplus) ))
allocate(d(x)%lhc7%XS_Hpjbjet( np_t(Hplus) ))
allocate(d(x)%lhc7%XS_Hpjcjet( np_t(Hplus) ))
allocate(d(x)%lhc7%XS_Hpjjetjet( np_t(Hplus) ))
allocate(d(x)%lhc7%XS_HpjW( np_t(Hplus) ))
allocate(d(x)%lhc7%XS_HpjZ( np_t(Hplus) ))
allocate(d(x)%lhc7%XS_HpjHmj( np_t(Hplus) ))
allocate(d(x)%lhc7%XS_Hpjhi( np_t(Hplus), np_t(Hneut) ))
allocate(d(x)%lhc7%channelrates(np_t(Hneut),Nprod,Ndecay))
allocate(d(x)%lhc7%channelrates_tmp(np_t(Hneut),Nprod,Ndecay))
allocate(d(x)%lhc8%XS_hjb_ratio( np_t(Hneut) ))
allocate(d(x)%lhc8%XS_tthj_ratio( np_t(Hneut) ))
allocate(d(x)%lhc8%XS_vbf_ratio( np_t(Hneut) ))
allocate(d(x)%lhc8%XS_hjZ_ratio( np_t(Hneut) ))
allocate(d(x)%lhc8%XS_gg_hjZ_ratio( np_t(Hneut) ))
allocate(d(x)%lhc8%XS_qq_hjZ_ratio( np_t(Hneut) ))
allocate(d(x)%lhc8%XS_hjW_ratio( np_t(Hneut) ))
allocate(d(x)%lhc8%XS_hj_ratio( np_t(Hneut) ))
allocate(d(x)%lhc8%XS_gg_hj_ratio( np_t(Hneut) ))
allocate(d(x)%lhc8%XS_bb_hj_ratio( np_t(Hneut) ))
allocate(d(x)%lhc8%XS_thj_tchan_ratio( np_t(Hneut) ))
allocate(d(x)%lhc8%XS_thj_schan_ratio( np_t(Hneut) ))
allocate(d(x)%lhc8%XS_hjhi( np_t(Hneut),np_t(Hneut) ))
allocate(d(x)%lhc8%XS_vbf_Hpj( np_t(Hplus) ))
allocate(d(x)%lhc8%XS_Hpjtb( np_t(Hplus) ))
allocate(d(x)%lhc8%XS_Hpjcb( np_t(Hplus) ))
allocate(d(x)%lhc8%XS_Hpjbjet( np_t(Hplus) ))
allocate(d(x)%lhc8%XS_Hpjcjet( np_t(Hplus) ))
allocate(d(x)%lhc8%XS_Hpjjetjet( np_t(Hplus) ))
allocate(d(x)%lhc8%XS_HpjW( np_t(Hplus) ))
allocate(d(x)%lhc8%XS_HpjZ( np_t(Hplus) ))
allocate(d(x)%lhc8%XS_HpjHmj( np_t(Hplus) ))
allocate(d(x)%lhc8%XS_Hpjhi( np_t(Hplus), np_t(Hneut) ))
allocate(d(x)%lhc8%channelrates(np_t(Hneut),Nprod,Ndecay))
allocate(d(x)%lhc8%channelrates_tmp(np_t(Hneut),Nprod,Ndecay))
allocate(d(x)%lhc13%XS_hjb_ratio( np_t(Hneut) ))
allocate(d(x)%lhc13%XS_tthj_ratio( np_t(Hneut) ))
allocate(d(x)%lhc13%XS_vbf_ratio( np_t(Hneut) ))
allocate(d(x)%lhc13%XS_hjZ_ratio( np_t(Hneut) ))
allocate(d(x)%lhc13%XS_gg_hjZ_ratio( np_t(Hneut) ))
allocate(d(x)%lhc13%XS_qq_hjZ_ratio( np_t(Hneut) ))
allocate(d(x)%lhc13%XS_hjW_ratio( np_t(Hneut) ))
allocate(d(x)%lhc13%XS_hj_ratio( np_t(Hneut) ))
allocate(d(x)%lhc13%XS_gg_hj_ratio( np_t(Hneut) ))
allocate(d(x)%lhc13%XS_bb_hj_ratio( np_t(Hneut) ))
allocate(d(x)%lhc13%XS_thj_tchan_ratio( np_t(Hneut) ))
allocate(d(x)%lhc13%XS_thj_schan_ratio( np_t(Hneut) ))
allocate(d(x)%lhc13%XS_hjhi( np_t(Hneut),np_t(Hneut) ))
allocate(d(x)%lhc13%XS_vbf_Hpj( np_t(Hplus) ))
allocate(d(x)%lhc13%XS_Hpjtb( np_t(Hplus) ))
allocate(d(x)%lhc13%XS_Hpjcb( np_t(Hplus) ))
allocate(d(x)%lhc13%XS_Hpjbjet( np_t(Hplus) ))
allocate(d(x)%lhc13%XS_Hpjcjet( np_t(Hplus) ))
allocate(d(x)%lhc13%XS_Hpjjetjet( np_t(Hplus) ))
allocate(d(x)%lhc13%XS_HpjW( np_t(Hplus) ))
allocate(d(x)%lhc13%XS_HpjZ( np_t(Hplus) ))
allocate(d(x)%lhc13%XS_HpjHmj( np_t(Hplus) ))
allocate(d(x)%lhc13%XS_Hpjhi( np_t(Hplus), np_t(Hneut) ))
allocate(d(x)%lhc13%channelrates(np_t(Hneut),Nprod,Ndecay))
allocate(d(x)%lhc13%channelrates_tmp(np_t(Hneut),Nprod,Ndecay))
allocate(d(x)%CP_value( np_t(Hneut) ))
do y= 1,ubound(np_t,dim=1)
d(x)%particle(y)%M =-1.0D0
d(x)%particle(y)%Mc =-1.0D0
d(x)%particle(y)%GammaTot =0.0D0
d(x)%particle(y)%dM =0.0D0
d(x)%particle(y)%dMh =0.0D0
enddo
d(x)%lep%XS_hjZ_ratio =0.0D0
d(x)%lep%XS_bbhj_ratio =0.0D0
d(x)%lep%XS_tautauhj_ratio =0.0D0
d(x)%lep%XS_hjhi_ratio =0.0D0
d(x)%lep%XS_HpjHmj_ratio =0.0D0
d(x)%lep%XS_CpjCmj =0.0D0
d(x)%lep%XS_NjNi =0.0D0
d(x)%BR_hjss =0.0D0
d(x)%BR_hjcc =0.0D0
d(x)%BR_hjbb =0.0D0
d(x)%BR_hjtt =0.0D0
d(x)%BR_hjmumu =0.0D0
d(x)%BR_hjtautau =0.0D0
d(x)%BR_hjWW =0.0D0
d(x)%BR_hjZZ =0.0D0
d(x)%BR_hjZga =0.0D0
d(x)%BR_hjgaga =0.0D0
d(x)%BR_hjgg =0.0D0
d(x)%BR_hjinvisible =0.0D0
d(x)%BR_hjhihi =0.0D0
d(x)%BR_hjhiZ =0.0D0
d(x)%BR_hkhjhi =0.0D0
d(x)%BR_hjHpiW =0.0D0
d(x)%BR_hjemu =0.0D0
d(x)%BR_hjetau =0.0D0
d(x)%BR_hjmutau =0.0D0
d(x)%BR_tWpb =0.0D0
d(x)%BR_tHpjb =0.0D0
d(x)%BR_Hpjcs =0.0D0
d(x)%BR_Hpjcb =0.0D0
d(x)%BR_Hpjtaunu =0.0D0
d(x)%BR_Hpjtb =0.0D0
d(x)%BR_HpjWZ =0.0D0
d(x)%BR_HpjhiW =0.0D0
d(x)%BR_CjqqNi =0.0D0
d(x)%BR_CjlnuNi =0.0D0
d(x)%BR_CjWNi =0.0D0
d(x)%BR_NjqqNi =0.0D0
d(x)%BR_NjZNi =0.0D0
d(x)%tev%XS_hjb_ratio =0.0D0
d(x)%tev%XS_tthj_ratio =0.0D0
d(x)%tev%XS_vbf_ratio =0.0D0
d(x)%tev%XS_hj_ratio =0.0D0
d(x)%tev%XS_hjW_ratio =0.0D0
d(x)%tev%XS_hjZ_ratio =0.0D0
d(x)%tev%XS_gg_hj_ratio = 0.0D0
d(x)%tev%XS_bb_hj_ratio = 0.0D0
d(x)%tev%XS_thj_tchan_ratio = 0.0D0
d(x)%tev%XS_thj_schan_ratio = 0.0D0
d(x)%tev%XS_hjhi = 0.0D0
d(x)%tev%XS_vbf_Hpj =0.0D0
d(x)%tev%XS_Hpjtb =0.0D0
d(x)%tev%XS_Hpjcb =0.0D0
d(x)%tev%XS_Hpjbjet =0.0D0
d(x)%tev%XS_Hpjcjet =0.0D0
d(x)%tev%XS_Hpjjetjet =0.0D0
d(x)%tev%XS_HpjW =0.0D0
d(x)%tev%XS_HpjZ =0.0D0
d(x)%tev%XS_HpjHmj =0.0D0
d(x)%tev%XS_Hpjhi =0.0D0
d(x)%tev%channelrates = 0.0D0
d(x)%tev%channelrates_tmp = -1.0D0
d(x)%lhc7%XS_hjb_ratio =0.0D0
d(x)%lhc7%XS_tthj_ratio =0.0D0
d(x)%lhc7%XS_vbf_ratio =0.0D0
d(x)%lhc7%XS_hj_ratio =0.0D0
d(x)%lhc7%XS_hjW_ratio =0.0D0
d(x)%lhc7%XS_hjZ_ratio =0.0D0
d(x)%lhc7%XS_gg_hj_ratio = 0.0D0
d(x)%lhc7%XS_bb_hj_ratio = 0.0D0
d(x)%lhc7%XS_thj_tchan_ratio = 0.0D0
d(x)%lhc7%XS_thj_schan_ratio = 0.0D0
d(x)%lhc7%XS_hjhi = 0.0D0
d(x)%lhc7%XS_vbf_Hpj =0.0D0
d(x)%lhc7%XS_Hpjtb =0.0D0
d(x)%lhc7%XS_Hpjcb =0.0D0
d(x)%lhc7%XS_Hpjbjet =0.0D0
d(x)%lhc7%XS_Hpjcjet =0.0D0
d(x)%lhc7%XS_Hpjjetjet =0.0D0
d(x)%lhc7%XS_HpjW =0.0D0
d(x)%lhc7%XS_HpjZ =0.0D0
d(x)%lhc7%XS_HpjHmj =0.0D0
d(x)%lhc7%XS_Hpjhi =0.0D0
d(x)%lhc7%channelrates = 0.0D0
d(x)%lhc7%channelrates_tmp = -1.0D0
d(x)%lhc8%XS_hjb_ratio =0.0D0
d(x)%lhc8%XS_tthj_ratio =0.0D0
d(x)%lhc8%XS_vbf_ratio =0.0D0
d(x)%lhc8%XS_hj_ratio =0.0D0
d(x)%lhc8%XS_hjW_ratio =0.0D0
d(x)%lhc8%XS_hjZ_ratio =0.0D0
d(x)%lhc8%XS_gg_hj_ratio = 0.0D0
d(x)%lhc8%XS_bb_hj_ratio = 0.0D0
d(x)%lhc8%XS_thj_tchan_ratio = 0.0D0
d(x)%lhc8%XS_thj_schan_ratio = 0.0D0
d(x)%lhc8%XS_hjhi = 0.0D0
d(x)%lhc8%XS_vbf_Hpj =0.0D0
d(x)%lhc8%XS_Hpjtb =0.0D0
d(x)%lhc8%XS_Hpjcb =0.0D0
d(x)%lhc8%XS_Hpjbjet =0.0D0
d(x)%lhc8%XS_Hpjcjet =0.0D0
d(x)%lhc8%XS_Hpjjetjet =0.0D0
d(x)%lhc8%XS_HpjW =0.0D0
d(x)%lhc8%XS_HpjZ =0.0D0
d(x)%lhc8%XS_HpjHmj =0.0D0
d(x)%lhc8%XS_Hpjhi =0.0D0
d(x)%lhc8%channelrates = 0.0D0
d(x)%lhc8%channelrates_tmp = -1.0D0
d(x)%lhc13%XS_hjb_ratio =0.0D0
d(x)%lhc13%XS_tthj_ratio =0.0D0
d(x)%lhc13%XS_vbf_ratio =0.0D0
d(x)%lhc13%XS_hj_ratio =0.0D0
d(x)%lhc13%XS_hjW_ratio =0.0D0
d(x)%lhc13%XS_hjZ_ratio =0.0D0
d(x)%lhc13%XS_gg_hj_ratio = 0.0D0
d(x)%lhc13%XS_bb_hj_ratio = 0.0D0
d(x)%lhc13%XS_thj_tchan_ratio = 0.0D0
d(x)%lhc13%XS_thj_schan_ratio = 0.0D0
d(x)%lhc13%XS_hjhi = 0.0D0
d(x)%lhc13%XS_vbf_Hpj =0.0D0
d(x)%lhc13%XS_Hpjtb =0.0D0
d(x)%lhc13%XS_Hpjcb =0.0D0
d(x)%lhc13%XS_Hpjbjet =0.0D0
d(x)%lhc13%XS_Hpjcjet =0.0D0
d(x)%lhc13%XS_Hpjjetjet =0.0D0
d(x)%lhc13%XS_HpjW =0.0D0
d(x)%lhc13%XS_HpjZ =0.0D0
d(x)%lhc13%XS_HpjHmj =0.0D0
d(x)%lhc13%XS_Hpjhi =0.0D0
d(x)%lhc13%channelrates = 0.0D0
d(x)%lhc13%channelrates_tmp = -1.0D0
d(x)%additional =0.0D0
d(x)%CP_value=0
enddo
select case(whichanalyses)
case('onlyH','LandH','onlyP','list ')
do x=lbound(d,dim=1),ubound(d,dim=1)
allocate(d(x)%tev%XS_HZ_SM( np_t(Hneut) ))
+ allocate(d(x)%tev%XS_gg_HZ_SM( np_t(Hneut) ))
+ allocate(d(x)%tev%XS_qq_HZ_SM( np_t(Hneut) ))
allocate(d(x)%tev%XS_HW_SM( np_t(Hneut) ))
allocate(d(x)%tev%XS_H_SM( np_t(Hneut) ))
allocate(d(x)%tev%XS_ttH_SM( np_t(Hneut) ))
allocate(d(x)%tev%XS_vbf_SM( np_t(Hneut) ))
allocate(d(x)%tev%XS_gg_H_SM( np_t(Hneut) ))
allocate(d(x)%tev%XS_bb_H_SM( np_t(Hneut) ))
allocate(d(x)%tev%XS_tH_tchan_SM( np_t(Hneut) ))
allocate(d(x)%tev%XS_tH_schan_SM( np_t(Hneut) ))
allocate(d(x)%tev%channelrates_SM(np_t(Hneut),Nprod,Ndecay))
allocate(d(x)%tev%XS_Hb_SM( np_t(Hneut) ))
allocate(d(x)%tev%XS_Hb_c1_SM( np_t(Hneut) ))
allocate(d(x)%tev%XS_Hb_c2_SM( np_t(Hneut) ))
allocate(d(x)%tev%XS_Hb_c3_SM( np_t(Hneut) ))
allocate(d(x)%tev%XS_Hb_c4_SM( np_t(Hneut) ))
allocate(d(x)%lhc7%XS_HZ_SM( np_t(Hneut) ))
allocate(d(x)%lhc7%XS_gg_HZ_SM( np_t(Hneut) ))
allocate(d(x)%lhc7%XS_qq_HZ_SM( np_t(Hneut) ))
allocate(d(x)%lhc7%XS_HW_SM( np_t(Hneut) ))
allocate(d(x)%lhc7%XS_H_SM( np_t(Hneut) ))
allocate(d(x)%lhc7%XS_ttH_SM( np_t(Hneut) ))
allocate(d(x)%lhc7%XS_vbf_SM( np_t(Hneut) ))
allocate(d(x)%lhc7%XS_gg_H_SM( np_t(Hneut) ))
allocate(d(x)%lhc7%XS_bb_H_SM( np_t(Hneut) ))
allocate(d(x)%lhc7%XS_tH_tchan_SM( np_t(Hneut) ))
allocate(d(x)%lhc7%XS_tH_schan_SM( np_t(Hneut) ))
allocate(d(x)%lhc7%channelrates_SM(np_t(Hneut),Nprod,Ndecay))
allocate(d(x)%lhc7%XS_Hb_SM( np_t(Hneut) ))
! allocate(d(x)%lhc7%XS_Hb_c1_SM( np_t(Hneut) ))
! allocate(d(x)%lhc7%XS_Hb_c2_SM( np_t(Hneut) ))
! allocate(d(x)%lhc7%XS_Hb_c3_SM( np_t(Hneut) ))
allocate(d(x)%lhc8%XS_HZ_SM( np_t(Hneut) ))
allocate(d(x)%lhc8%XS_gg_HZ_SM( np_t(Hneut) ))
allocate(d(x)%lhc8%XS_qq_HZ_SM( np_t(Hneut) ))
allocate(d(x)%lhc8%XS_HW_SM( np_t(Hneut) ))
allocate(d(x)%lhc8%XS_H_SM( np_t(Hneut) ))
allocate(d(x)%lhc8%XS_ttH_SM( np_t(Hneut) ))
allocate(d(x)%lhc8%XS_vbf_SM( np_t(Hneut) ))
allocate(d(x)%lhc8%XS_gg_H_SM( np_t(Hneut) ))
allocate(d(x)%lhc8%XS_bb_H_SM( np_t(Hneut) ))
allocate(d(x)%lhc8%XS_tH_tchan_SM( np_t(Hneut) ))
allocate(d(x)%lhc8%XS_tH_schan_SM( np_t(Hneut) ))
allocate(d(x)%lhc8%channelrates_SM(np_t(Hneut),Nprod,Ndecay))
allocate(d(x)%lhc8%XS_Hb_SM( np_t(Hneut) ))
! allocate(d(x)%lhc8%XS_Hb_c1_SM( np_t(Hneut) ))
! allocate(d(x)%lhc8%XS_Hb_c2_SM( np_t(Hneut) ))
! allocate(d(x)%lhc8%XS_Hb_c3_SM( np_t(Hneut) ))
allocate(d(x)%lhc13%XS_HZ_SM( np_t(Hneut) ))
allocate(d(x)%lhc13%XS_gg_HZ_SM( np_t(Hneut) ))
allocate(d(x)%lhc13%XS_qq_HZ_SM( np_t(Hneut) ))
allocate(d(x)%lhc13%XS_HW_SM( np_t(Hneut) ))
allocate(d(x)%lhc13%XS_H_SM( np_t(Hneut) ))
allocate(d(x)%lhc13%XS_ttH_SM( np_t(Hneut) ))
allocate(d(x)%lhc13%XS_vbf_SM( np_t(Hneut) ))
allocate(d(x)%lhc13%XS_gg_H_SM( np_t(Hneut) ))
allocate(d(x)%lhc13%XS_bb_H_SM( np_t(Hneut) ))
allocate(d(x)%lhc13%XS_tH_tchan_SM( np_t(Hneut) ))
allocate(d(x)%lhc13%XS_tH_schan_SM( np_t(Hneut) ))
allocate(d(x)%lhc13%channelrates_SM(np_t(Hneut),Nprod,Ndecay))
! allocate(d(x)%lhc8%XS_Hb_SM( np_t(Hneut) ))
allocate(d(x)%BR_Hbb_SM( np_t(Hneut) ))
allocate(d(x)%BR_Hcc_SM( np_t(Hneut) ))
allocate(d(x)%BR_Hss_SM( np_t(Hneut) ))
allocate(d(x)%BR_Htt_SM( np_t(Hneut) ))
allocate(d(x)%BR_Hmumu_SM( np_t(Hneut) ))
allocate(d(x)%BR_Htautau_SM( np_t(Hneut) ))
allocate(d(x)%BR_HWW_SM( np_t(Hneut) ))
allocate(d(x)%BR_HZZ_SM( np_t(Hneut) ))
allocate(d(x)%BR_HZga_SM( np_t(Hneut) ))
allocate(d(x)%BR_Hgaga_SM( np_t(Hneut) ))
allocate(d(x)%BR_Hgg_SM( np_t(Hneut) ))
allocate(d(x)%BR_Hjets_SM( np_t(Hneut) ))
allocate(d(x)%GammaTot_SM( np_t(Hneut) ))
enddo
case('onlyL')
case default
stop 'error in allocate_dataset_parts (3)'
end select
deallocate(np_t)
end subroutine allocate_dataset_parts
!**********************************************************
subroutine allocate_sqcouplratio_parts(gsq)
! to use this, gsq must be an array
!**********************************************************
implicit none
!-------------------------------------------
type(sqcouplratio) :: gsq(:)
!-----------------------------------internal
integer :: x
integer :: nHiggsneut
!-------------------------------------------
if(np(Hneut)>0)then
nHiggsneut=np(Hneut)
elseif(np(Hneut).eq.0)then
nHiggsneut=1
else
stop 'error in subroutine allocate_sqcouplratio_parts (1)'
endif
do x=lbound(gsq,dim=1),ubound(gsq,dim=1)
allocate(gsq(x)%hjss_s(nHiggsneut) ,gsq(x)%hjss_p(nHiggsneut))
allocate(gsq(x)%hjcc_s(nHiggsneut) ,gsq(x)%hjcc_p(nHiggsneut))
allocate(gsq(x)%hjbb_s(nHiggsneut) ,gsq(x)%hjbb_p(nHiggsneut))
allocate(gsq(x)%hjtoptop_s(nHiggsneut),gsq(x)%hjtoptop_p(nHiggsneut))
allocate(gsq(x)%hjmumu_s(nHiggsneut) ,gsq(x)%hjmumu_p(nHiggsneut))
allocate(gsq(x)%hjtautau_s(nHiggsneut),gsq(x)%hjtautau_p(nHiggsneut))
allocate(gsq(x)%hjWW(nHiggsneut) ,gsq(x)%hjZZ(nHiggsneut) )
allocate(gsq(x)%hjZga(nHiggsneut) )
allocate(gsq(x)%hjgaga(nHiggsneut) ,gsq(x)%hjgg(nHiggsneut) )
allocate(gsq(x)%hjggZ(nHiggsneut) )
allocate(gsq(x)%hjhiZ(nHiggsneut,nHiggsneut) )
gsq(x)%hjss_s =0.0D0
gsq(x)%hjss_p =0.0D0
gsq(x)%hjcc_s =0.0D0
gsq(x)%hjcc_p =0.0D0
gsq(x)%hjbb_s =0.0D0
gsq(x)%hjbb_p =0.0D0
gsq(x)%hjtoptop_s =0.0D0
gsq(x)%hjtoptop_p =0.0D0
gsq(x)%hjmumu_s =0.0D0
gsq(x)%hjmumu_p =0.0D0
gsq(x)%hjtautau_s =0.0D0
gsq(x)%hjtautau_p =0.0D0
gsq(x)%hjWW =0.0D0
gsq(x)%hjZZ =0.0D0
gsq(x)%hjZga =0.0D0
gsq(x)%hjgaga =0.0D0
gsq(x)%hjgg =0.0D0
gsq(x)%hjggZ =0.0D0
gsq(x)%hjhiZ =0.0D0
enddo
end subroutine allocate_sqcouplratio_parts
!**********************************************************
subroutine allocate_couplratio_parts(g)
! to use this, gsq must be an array
!**********************************************************
implicit none
!-------------------------------------------
type(couplratio) :: g(:)
!-----------------------------------internal
integer :: x
integer :: nHiggsneut
!-------------------------------------------
if(np(Hneut)>0)then
nHiggsneut=np(Hneut)
elseif(np(Hneut).eq.0)then
nHiggsneut=1
else
stop 'error in subroutine allocate_couplratio_parts (1)'
endif
do x=lbound(g,dim=1),ubound(g,dim=1)
allocate(g(x)%hjss_s(nHiggsneut) ,g(x)%hjss_p(nHiggsneut))
allocate(g(x)%hjcc_s(nHiggsneut) ,g(x)%hjcc_p(nHiggsneut))
allocate(g(x)%hjbb_s(nHiggsneut) ,g(x)%hjbb_p(nHiggsneut))
allocate(g(x)%hjtt_s(nHiggsneut) ,g(x)%hjtt_p(nHiggsneut))
allocate(g(x)%hjmumu_s(nHiggsneut) ,g(x)%hjmumu_p(nHiggsneut))
allocate(g(x)%hjtautau_s(nHiggsneut),g(x)%hjtautau_p(nHiggsneut))
allocate(g(x)%hjWW(nHiggsneut) ,g(x)%hjZZ(nHiggsneut))
allocate(g(x)%hjZga(nHiggsneut))
allocate(g(x)%hjgaga(nHiggsneut) ,g(x)%hjgg(nHiggsneut))
! allocate(g(x)%hjggZ(nHiggsneut) )
allocate(g(x)%hjhiZ(nHiggsneut,nHiggsneut))
g(x)%hjss_s =0.0D0
g(x)%hjss_p =0.0D0
g(x)%hjcc_s =0.0D0
g(x)%hjcc_p =0.0D0
g(x)%hjbb_s =0.0D0
g(x)%hjbb_p =0.0D0
g(x)%hjtt_s =0.0D0
g(x)%hjtt_p =0.0D0
g(x)%hjmumu_s =0.0D0
g(x)%hjmumu_p =0.0D0
g(x)%hjtautau_s =0.0D0
g(x)%hjtautau_p =0.0D0
g(x)%hjWW =0.0D0
g(x)%hjZZ =0.0D0
g(x)%hjZga =0.0D0
g(x)%hjgaga =0.0D0
g(x)%hjgg =0.0D0
! g(x)%hjggZ =0.0D0
g(x)%hjhiZ =0.0D0
enddo
end subroutine allocate_couplratio_parts
! !**********************************************************
! subroutine deallocate_sqcouplratio_parts(gsq)
! !**********************************************************
! implicit none
! !--------------------------------------input
! type(sqcouplratio) :: gsq(:)
! !-----------------------------------internal
! integer :: x
! !-------------------------------------------
!
! do x=lbound(gsq,dim=1),ubound(gsq,dim=1)
! deallocate(gsq(x)%hjbb )
! deallocate(gsq(x)%hjtautau )
! deallocate(gsq(x)%hjWW )
! deallocate(gsq(x)%hjZZ )
! deallocate(gsq(x)%hjgaga )
! deallocate(gsq(x)%hjgg )
! deallocate(gsq(x)%hjggZ )
! deallocate(gsq(x)%hjhiZ )
! enddo
!
! end subroutine deallocate_sqcouplratio_parts
!
!**********************************************************
subroutine allocate_hadroncolliderextras_parts(tR)
!**********************************************************
implicit none
!-------------------------------------------
type(hadroncolliderextras) :: tR(:)
!-----------------------------------internal
integer :: x
integer :: nHiggsneut
!-------------------------------------------
if(np(Hneut)>0)then
nHiggsneut=np(Hneut)
elseif(np(Hneut).eq.0)then
nHiggsneut=1
else
stop 'error in subroutine allocate_hadroncolliderextras_parts (1)'
endif
tR%nq_hjWp=2 ! (u dbar), (c sbar) e.g
tR%nq_hjWm=2 ! (ubar d), (cbar s)
tR%nq_hj=5 !(d dbar), (u ubar), (s sbar), (c cbar), (b bbar)
tR%nq_hjZ=5 !(d dbar), (u ubar), (s sbar), (c cbar), (b bbar)
do x=lbound(tR,dim=1),ubound(tR,dim=1)
allocate(tR(x)%qq_hjWp(tR(x)%nq_hjWp,nHiggsneut))
allocate(tR(x)%qq_hjWm(tR(x)%nq_hjWm,nHiggsneut))
allocate(tR(x)%gg_hj(nHiggsneut))
allocate(tR(x)%qq_hj(tR(x)%nq_hj,nHiggsneut))
allocate(tR(x)%gg_hjZ(nHiggsneut))
allocate(tR(x)%qq_hjZ(tR(x)%nq_hjZ,nHiggsneut))
allocate(tR(x)%bg_hjb(nHiggsneut))
tR(x)%qq_hjWp =0.0D0
tR(x)%qq_hjWm =0.0D0
tR(x)%gg_hj =0.0D0
tR(x)%qq_hj =0.0D0
tR(x)%gg_hjZ =0.0D0
tR(x)%qq_hjZ =0.0D0
tR(x)%bg_hjb =0.0D0
enddo
end subroutine allocate_hadroncolliderextras_parts
!**********************************************************
subroutine deallocate_hadroncolliderextras_parts(tR)
!**********************************************************
implicit none
!--------------------------------------input
type(hadroncolliderextras) :: tR(:)
!-----------------------------------internal
integer :: x
!-------------------------------------------
do x=lbound(tR,dim=1),ubound(tR,dim=1)
deallocate(tR(x)%qq_hjWp)
deallocate(tR(x)%qq_hjWm)
deallocate(tR(x)%gg_hj)
deallocate(tR(x)%qq_hj)
deallocate(tR(x)%gg_hjZ)
deallocate(tR(x)%qq_hjZ)
deallocate(tR(x)%bg_hjb)
enddo
end subroutine deallocate_hadroncolliderextras_parts
!**********************************************************
subroutine deallocate_usefulbits
!**********************************************************
! deallocates theo,res (and everything inside)
! deallocates c,predratio,fact
!************************************************************
implicit none
!-----------------------------------internal
integer x,y
!-------------------------------------------
deallocate(pdesc)!allocated in fill_pdesc
!these are allocated in subroutine do_input
do x=lbound(theo,dim=1),ubound(theo,dim=1)
deallocate(theo(x)%additional)
do y= 1,ubound(np,dim=1)
deallocate(theo(x)%particle(y)%M)
deallocate(theo(x)%particle(y)%GammaTot)
deallocate(theo(x)%particle(y)%dM)
deallocate(theo(x)%particle(y)%dMh)
enddo
deallocate(theo(x)%particle)
deallocate(theo(x)%lep%XS_hjZ_ratio)
deallocate(theo(x)%lep%XS_bbhj_ratio)
deallocate(theo(x)%lep%XS_tautauhj_ratio)
deallocate(theo(x)%lep%XS_hjhi_ratio)
deallocate(theo(x)%lep%XS_HpjHmj_ratio)
deallocate(theo(x)%lep%XS_CpjCmj)
deallocate(theo(x)%lep%XS_NjNi)
deallocate(theo(x)%BR_hjss)
deallocate(theo(x)%BR_hjcc)
deallocate(theo(x)%BR_hjbb)
deallocate(theo(x)%BR_hjtt)
deallocate(theo(x)%BR_hjmumu)
deallocate(theo(x)%BR_hjtautau)
deallocate(theo(x)%BR_hjhihi)
deallocate(theo(x)%BR_hjhiZ)
deallocate(theo(x)%BR_hkhjhi)
deallocate(theo(x)%BR_hjHpiW)
deallocate(theo(x)%BR_hjWW)
deallocate(theo(x)%BR_hjZZ)
deallocate(theo(x)%BR_hjZga)
deallocate(theo(x)%BR_hjgaga)
deallocate(theo(x)%BR_hjgg)
deallocate(theo(x)%BR_hjinvisible)
deallocate(theo(x)%BR_tHpjb)
deallocate(theo(x)%BR_Hpjcs)
deallocate(theo(x)%BR_Hpjcb)
deallocate(theo(x)%BR_Hpjtaunu)
deallocate(theo(x)%BR_Hpjtb)
deallocate(theo(x)%BR_HpjWZ)
deallocate(theo(x)%BR_HpjhiW)
deallocate(theo(x)%BR_CjqqNi)
deallocate(theo(x)%BR_CjlnuNi)
deallocate(theo(x)%BR_CjWNi)
deallocate(theo(x)%BR_NjqqNi)
deallocate(theo(x)%BR_NjZNi)
deallocate(theo(x)%tev%XS_hjb_ratio)
deallocate(theo(x)%tev%XS_tthj_ratio)
deallocate(theo(x)%tev%XS_vbf_ratio)
deallocate(theo(x)%tev%XS_hjZ_ratio)
deallocate(theo(x)%tev%XS_hjW_ratio)
deallocate(theo(x)%tev%XS_hj_ratio)
deallocate(theo(x)%tev%XS_gg_hj_ratio)
deallocate(theo(x)%tev%XS_bb_hj_ratio)
deallocate(theo(x)%tev%XS_thj_tchan_ratio)
deallocate(theo(x)%tev%XS_thj_schan_ratio)
deallocate(theo(x)%tev%XS_hjhi)
deallocate(theo(x)%tev%XS_vbf_Hpj)
deallocate(theo(x)%tev%XS_Hpjtb)
deallocate(theo(x)%tev%XS_Hpjcb)
deallocate(theo(x)%tev%XS_Hpjbjet)
deallocate(theo(x)%tev%XS_Hpjcjet)
deallocate(theo(x)%tev%XS_Hpjjetjet)
deallocate(theo(x)%tev%XS_HpjW)
deallocate(theo(x)%tev%XS_HpjZ)
deallocate(theo(x)%tev%XS_HpjHmj)
deallocate(theo(x)%tev%XS_Hpjhi)
deallocate(theo(x)%tev%channelrates)
deallocate(theo(x)%tev%channelrates_tmp)
deallocate(theo(x)%lhc7%XS_hjb_ratio)
deallocate(theo(x)%lhc7%XS_tthj_ratio)
deallocate(theo(x)%lhc7%XS_vbf_ratio)
deallocate(theo(x)%lhc7%XS_hjZ_ratio)
deallocate(theo(x)%lhc7%XS_qq_hjZ_ratio)
deallocate(theo(x)%lhc7%XS_gg_hjZ_ratio)
deallocate(theo(x)%lhc7%XS_hjW_ratio)
deallocate(theo(x)%lhc7%XS_hj_ratio)
deallocate(theo(x)%lhc7%XS_gg_hj_ratio)
deallocate(theo(x)%lhc7%XS_bb_hj_ratio)
deallocate(theo(x)%lhc7%XS_thj_tchan_ratio)
deallocate(theo(x)%lhc7%XS_thj_schan_ratio)
deallocate(theo(x)%lhc7%XS_hjhi)
deallocate(theo(x)%lhc7%XS_vbf_Hpj)
deallocate(theo(x)%lhc7%XS_Hpjtb)
deallocate(theo(x)%lhc7%XS_Hpjcb)
deallocate(theo(x)%lhc7%XS_Hpjbjet)
deallocate(theo(x)%lhc7%XS_Hpjcjet)
deallocate(theo(x)%lhc7%XS_Hpjjetjet)
deallocate(theo(x)%lhc7%XS_HpjW)
deallocate(theo(x)%lhc7%XS_HpjZ)
deallocate(theo(x)%lhc7%XS_HpjHmj)
deallocate(theo(x)%lhc7%XS_Hpjhi)
deallocate(theo(x)%lhc7%channelrates)
deallocate(theo(x)%lhc7%channelrates_tmp)
deallocate(theo(x)%lhc8%XS_hjb_ratio)
deallocate(theo(x)%lhc8%XS_tthj_ratio)
deallocate(theo(x)%lhc8%XS_vbf_ratio)
deallocate(theo(x)%lhc8%XS_hjZ_ratio)
deallocate(theo(x)%lhc8%XS_qq_hjZ_ratio)
deallocate(theo(x)%lhc8%XS_gg_hjZ_ratio)
deallocate(theo(x)%lhc8%XS_hjW_ratio)
deallocate(theo(x)%lhc8%XS_hj_ratio)
deallocate(theo(x)%lhc8%XS_gg_hj_ratio)
deallocate(theo(x)%lhc8%XS_bb_hj_ratio)
deallocate(theo(x)%lhc8%XS_thj_tchan_ratio)
deallocate(theo(x)%lhc8%XS_thj_schan_ratio)
deallocate(theo(x)%lhc8%XS_hjhi)
deallocate(theo(x)%lhc8%XS_vbf_Hpj)
deallocate(theo(x)%lhc8%XS_Hpjtb)
deallocate(theo(x)%lhc8%XS_Hpjcb)
deallocate(theo(x)%lhc8%XS_Hpjbjet)
deallocate(theo(x)%lhc8%XS_Hpjcjet)
deallocate(theo(x)%lhc8%XS_Hpjjetjet)
deallocate(theo(x)%lhc8%XS_HpjW)
deallocate(theo(x)%lhc8%XS_HpjZ)
deallocate(theo(x)%lhc8%XS_HpjHmj)
deallocate(theo(x)%lhc8%XS_Hpjhi)
deallocate(theo(x)%lhc8%channelrates)
deallocate(theo(x)%lhc8%channelrates_tmp)
deallocate(theo(x)%lhc13%XS_hjb_ratio)
deallocate(theo(x)%lhc13%XS_tthj_ratio)
deallocate(theo(x)%lhc13%XS_vbf_ratio)
deallocate(theo(x)%lhc13%XS_hjZ_ratio)
deallocate(theo(x)%lhc13%XS_qq_hjZ_ratio)
deallocate(theo(x)%lhc13%XS_gg_hjZ_ratio)
deallocate(theo(x)%lhc13%XS_hjW_ratio)
deallocate(theo(x)%lhc13%XS_hj_ratio)
deallocate(theo(x)%lhc13%XS_gg_hj_ratio)
deallocate(theo(x)%lhc13%XS_bb_hj_ratio)
deallocate(theo(x)%lhc13%XS_thj_tchan_ratio)
deallocate(theo(x)%lhc13%XS_thj_schan_ratio)
deallocate(theo(x)%lhc13%XS_hjhi)
deallocate(theo(x)%lhc13%XS_vbf_Hpj)
deallocate(theo(x)%lhc13%XS_Hpjtb)
deallocate(theo(x)%lhc13%XS_Hpjcb)
deallocate(theo(x)%lhc13%XS_Hpjbjet)
deallocate(theo(x)%lhc13%XS_Hpjcjet)
deallocate(theo(x)%lhc13%XS_Hpjjetjet)
deallocate(theo(x)%lhc13%XS_HpjW)
deallocate(theo(x)%lhc13%XS_HpjZ)
deallocate(theo(x)%lhc13%XS_HpjHmj)
deallocate(theo(x)%lhc13%XS_Hpjhi)
deallocate(theo(x)%lhc13%channelrates)
deallocate(theo(x)%lhc13%channelrates_tmp)
!deallocate(theo(x)%inLEPrange_Hpj)
!deallocate(theo(x)%inTEVrange_Hpj)
deallocate(theo(x)%CP_value)
enddo
select case(whichanalyses)
case('onlyH','LandH','onlyP','list ')
do x=lbound(theo,dim=1),ubound(theo,dim=1)
deallocate(theo(x)%BR_Hbb_SM)
deallocate(theo(x)%BR_Hss_SM)
deallocate(theo(x)%BR_Hcc_SM)
deallocate(theo(x)%BR_Hmumu_SM)
deallocate(theo(x)%BR_Htautau_SM)
deallocate(theo(x)%BR_HWW_SM)
deallocate(theo(x)%BR_HZZ_SM)
deallocate(theo(x)%BR_HZga_SM)
deallocate(theo(x)%BR_Hgaga_SM)
deallocate(theo(x)%BR_Hgg_SM)
deallocate(theo(x)%BR_Hjets_SM)
deallocate(theo(x)%GammaTot_SM)
deallocate(theo(x)%tev%XS_HZ_SM)
+ deallocate(theo(x)%tev%XS_gg_HZ_SM)
+ deallocate(theo(x)%tev%XS_qq_HZ_SM)
deallocate(theo(x)%tev%XS_HW_SM)
deallocate(theo(x)%tev%XS_H_SM)
deallocate(theo(x)%tev%XS_gg_H_SM)
deallocate(theo(x)%tev%XS_bb_H_SM)
deallocate(theo(x)%tev%XS_ttH_SM)
deallocate(theo(x)%tev%XS_vbf_SM)
!deallocate(theo(x)%tev%XS_H_SM_9713)
!deallocate(theo(x)%tev%XS_H_SM_9674)
deallocate(theo(x)%tev%XS_tH_tchan_SM)
deallocate(theo(x)%tev%XS_tH_schan_SM)
deallocate(theo(x)%tev%channelrates_SM)
deallocate(theo(x)%tev%XS_Hb_SM)
deallocate(theo(x)%tev%XS_Hb_c1_SM)
deallocate(theo(x)%tev%XS_Hb_c2_SM)
deallocate(theo(x)%tev%XS_Hb_c3_SM)
deallocate(theo(x)%tev%XS_Hb_c4_SM)
deallocate(theo(x)%lhc7%XS_HZ_SM)
deallocate(theo(x)%lhc7%XS_gg_HZ_SM)
deallocate(theo(x)%lhc7%XS_qq_HZ_SM)
deallocate(theo(x)%lhc7%XS_HW_SM)
deallocate(theo(x)%lhc7%XS_H_SM)
deallocate(theo(x)%lhc7%XS_gg_H_SM)
deallocate(theo(x)%lhc7%XS_bb_H_SM)
deallocate(theo(x)%lhc7%XS_ttH_SM)
deallocate(theo(x)%lhc7%XS_vbf_SM)
deallocate(theo(x)%lhc7%XS_tH_tchan_SM)
deallocate(theo(x)%lhc7%XS_tH_schan_SM)
deallocate(theo(x)%lhc7%XS_Hb_SM)
deallocate(theo(x)%lhc7%channelrates_SM)
! deallocate(theo(x)%lhc7%XS_Hb_c1_SM)
! deallocate(theo(x)%lhc7%XS_Hb_c2_SM)
! deallocate(theo(x)%lhc7%XS_Hb_c3_SM)
deallocate(theo(x)%lhc8%XS_HZ_SM)
deallocate(theo(x)%lhc8%XS_gg_HZ_SM)
deallocate(theo(x)%lhc8%XS_qq_HZ_SM)
deallocate(theo(x)%lhc8%XS_HW_SM)
deallocate(theo(x)%lhc8%XS_H_SM)
deallocate(theo(x)%lhc8%XS_gg_H_SM)
deallocate(theo(x)%lhc8%XS_bb_H_SM)
deallocate(theo(x)%lhc8%XS_ttH_SM)
deallocate(theo(x)%lhc8%XS_vbf_SM)
deallocate(theo(x)%lhc8%XS_tH_tchan_SM)
deallocate(theo(x)%lhc8%XS_tH_schan_SM)
deallocate(theo(x)%lhc8%XS_Hb_SM)
deallocate(theo(x)%lhc8%channelrates_SM)
! deallocate(theo(x)%lhc8%XS_Hb_c1_SM)
! deallocate(theo(x)%lhc8%XS_Hb_c2_SM)
! deallocate(theo(x)%lhc8%XS_Hb_c3_SM)
deallocate(theo(x)%lhc13%XS_HZ_SM)
deallocate(theo(x)%lhc13%XS_gg_HZ_SM)
deallocate(theo(x)%lhc13%XS_qq_HZ_SM)
deallocate(theo(x)%lhc13%XS_HW_SM)
deallocate(theo(x)%lhc13%XS_H_SM)
deallocate(theo(x)%lhc13%XS_gg_H_SM)
deallocate(theo(x)%lhc13%XS_bb_H_SM)
deallocate(theo(x)%lhc13%XS_ttH_SM)
deallocate(theo(x)%lhc13%XS_vbf_SM)
deallocate(theo(x)%lhc13%XS_tH_tchan_SM)
deallocate(theo(x)%lhc13%XS_tH_schan_SM)
deallocate(theo(x)%lhc13%channelrates_SM)
enddo
case('onlyL')
case default
stop 'error in deallocate_usefulbits'
end select
deallocate(theo) !allocated in subroutine do_input
!allocated in subroutine setup_output
if(allocated(res)) then
do x=lbound(res,dim=1),ubound(res,dim=1)
deallocate(res(x)%chan)
deallocate(res(x)%obsratio)
deallocate(res(x)%predratio)
deallocate(res(x)%axis_i)
deallocate(res(x)%axis_j)
deallocate(res(x)%sfactor)
deallocate(res(x)%allowed95)
deallocate(res(x)%ncombined)
enddo
deallocate(res) !allocated in subroutine setup_output
endif
if (allocated(fullHBres)) then
deallocate(fullHBres)
endif
! call deallocate_sqcouplratio_parts(g2)
do x=lbound(g2,dim=1),ubound(g2,dim=1)
deallocate(g2(x)%hjss_s)
deallocate(g2(x)%hjss_p)
deallocate(g2(x)%hjcc_s)
deallocate(g2(x)%hjcc_p)
deallocate(g2(x)%hjbb_s)
deallocate(g2(x)%hjbb_p)
deallocate(g2(x)%hjtoptop_s)
deallocate(g2(x)%hjtoptop_p)
deallocate(g2(x)%hjmumu_s)
deallocate(g2(x)%hjmumu_p)
deallocate(g2(x)%hjtautau_s)
deallocate(g2(x)%hjtautau_p)
deallocate(g2(x)%hjWW)
deallocate(g2(x)%hjZZ)
deallocate(g2(x)%hjZga)
deallocate(g2(x)%hjgaga)
deallocate(g2(x)%hjgg)
deallocate(g2(x)%hjggZ)
deallocate(g2(x)%hjhiZ)
enddo
deallocate(g2)
do x=lbound(effC,dim=1),ubound(effC,dim=1)
deallocate(effC(x)%hjss_s)
deallocate(effC(x)%hjss_p)
deallocate(effC(x)%hjcc_s)
deallocate(effC(x)%hjcc_p)
deallocate(effC(x)%hjbb_s)
deallocate(effC(x)%hjbb_p)
deallocate(effC(x)%hjtt_s)
deallocate(effC(x)%hjtt_p)
deallocate(effC(x)%hjmumu_s)
deallocate(effC(x)%hjmumu_p)
deallocate(effC(x)%hjtautau_s)
deallocate(effC(x)%hjtautau_p)
deallocate(effC(x)%hjWW)
deallocate(effC(x)%hjZZ)
deallocate(effC(x)%hjZga)
deallocate(effC(x)%hjgaga)
deallocate(effC(x)%hjgg)
! deallocate(effC(x)%hjggZ)
deallocate(effC(x)%hjhiZ)
enddo
deallocate(effC)
!these are allocated in subroutine do_input
call deallocate_hadroncolliderextras_parts(partR)
deallocate(partR) !allocated in subroutine do_input
if(allocated(pr)) deallocate(pr) !allocated in subroutine fill_pr or fill_pr_select
if(allocated(prsep)) deallocate(prsep) !allocated in subroutine fill_pr or fill_pr_select
if(allocated(diffMhneut)) deallocate(diffMhneut)
if(allocated(diffMhch)) deallocate(diffMhch)
if(allocated(dmn)) deallocate(dmn)
if(allocated(dmch)) deallocate(dmch)
if(allocated(analysislist)) deallocate(analysislist)
if(allocated(analysis_exclude_list)) deallocate(analysis_exclude_list)
if(allocated(HBresult_all)) deallocate(HBresult_all)
if(allocated(chan_all)) deallocate(chan_all)
if(allocated(ncombined_all)) deallocate(ncombined_all)
if(allocated(obsratio_all)) deallocate(obsratio_all)
if(allocated(predratio_all)) deallocate(predratio_all)
end subroutine deallocate_usefulbits
!**********************************************************
end module usefulbits
!******************************************************************
Index: trunk/HiggsSignals-2/STXS.f90
===================================================================
--- trunk/HiggsSignals-2/STXS.f90 (revision 581)
+++ trunk/HiggsSignals-2/STXS.f90 (revision 582)
@@ -1,972 +1,984 @@
module STXS
! Still to do:
! 1: Read in correlation matrix
! 2: Write chi^2 test
! use numerics
! use combinatorics
use usefulbits_hs
implicit none
! integer :: i,j,k
! double precision,parameter :: pi=3.14159265358979323846264338328D0
! integer, allocatable :: peakindices_best(:,:)
type STXS_observable
integer :: id
character(LEN=100) :: label ! Reference
character(LEN=100) :: desc ! Description
character(LEN=3) :: expt ! Experiment
character(LEN=10) :: collider
character(LEN=10) :: collaboration
double precision :: lumi,dlumi,energy
character(LEN=100) :: assignmentgroup
integer :: rate_SM_normalized
integer :: mhchisq
double precision :: massobs, dmassobs ! This one enters the chi^2 for the mass!
double precision :: mass, dmass ! This one is the mass position for the measurement and the "experimentally allowed assignment range"
double precision :: eff_ref_mass ! This is the mass for which the signal efficiencies are given.
double precision, allocatable :: model_rate_per_Higgs(:,:)
double precision, allocatable :: inclusive_SM_rate(:)
integer :: Nc
double precision :: model_total_rate
double precision :: rate, rate_up, rate_low, drate_up, drate_low
double precision :: SMrate, SMrate_up, SMrate_low, dSMrate_up, dSMrate_low ! SM rate used/quoted by the experiment
! At the moment, interpret STXS observables as "pure" channels (production, or decay rate)
character(LEN=5), allocatable :: channel_id_str(:) ! Channels array as string, dim(Nc)
! integer, allocatable :: channel_id(:)
integer, allocatable :: channel_p_id(:) ! Production channels array, dim(Nc)
integer, allocatable :: channel_d_id(:) ! Decay channels array, dim(Nc)
double precision, allocatable :: channel_efficiency(:) ! SM signal efficiency of inclusive rates (analysis-specific)
double precision, allocatable :: relative_efficiency(:,:) ! Model signal efficiency relative to SM per Higgs
double precision :: chisq
! character(LEN=10),allocatable :: channel_description(:,:)
! TODO: How do we deal with ratio of BRs?
end type
type(STXS_observable), allocatable :: STXSlist(:)
type(correlation_info), allocatable :: STXScorrlist(:)
contains
!------------------------------------------------------------------------------------
subroutine load_STXS(dataset)
!------------------------------------------------------------------------------------
use store_pathname_HS
use usefulbits, only: file_id_common2, file_id_common3, np, Hneut
use datatables, only : read_in_mass_resolution_and_assignment_group
! implicit none
character(LEN=*), intent(in) :: dataset
character(LEN=100) :: datafile(500)
character(LEN=pathname_length+150) :: fullfilename
integer, allocatable :: skip(:)
integer :: i, n, n_datafiles,n_correlations, n_correlations_tmp, ios, k, m, int1, int2
double precision :: db1
character(LEN=200) :: comment
character(LEN=1) :: firstchar
character(LEN=100) :: line
integer :: id, posperiod
call system('basename -a `ls -1 -p '//trim(adjustl(pathname_HS))// &
& 'Expt_tables/'//trim(adjustl(dataset))//'/*.stxs 2>/dev/null` > STXS_analyses.txt 2>/dev/null')
open(file_id_common3, file="STXS_analyses.txt",form='formatted')
print *, "Reading in STXS measurements from analysis-set "//&
trim(adjustl(dataset))//":"
n = 0
n_datafiles = 0
do
n = n+1
read(file_id_common3,'(A)', iostat=ios) datafile(n)
if(ios.ne.0) exit
write(*,'(I4,2X,A)') n, datafile(n)
enddo
n_datafiles = n - 1
close(file_id_common3)
allocate(STXSlist(n_datafiles),skip(n_datafiles))
do n=1,n_datafiles
skip(n)=11
open(file_id_common3, file=trim(adjustl(pathname_HS)) //'Expt_tables/'// &
& trim(adjustl(dataset))//'/' // datafile(n))
do
read(file_id_common3,'(A)') comment
comment = trim(adjustl(comment))
write(firstchar,'(A1)') comment
if(firstchar.ne.'#') then
exit
else
skip(n)=skip(n)+1
endif
enddo
backspace(file_id_common3)
read(file_id_common3,*) STXSlist(n)%id
read(file_id_common3,'(A)') STXSlist(n)%label
read(file_id_common3,*) STXSlist(n)%collider,STXSlist(n)%collaboration, &
& STXSlist(n)%expt
read(file_id_common3,'(A)') STXSlist(n)%desc
read(file_id_common3,*) STXSlist(n)%energy, STXSlist(n)%lumi, STXSlist(n)%dlumi
read(file_id_common3,*) STXSlist(n)%mhchisq, STXSlist(n)%rate_SM_normalized
if(STXSlist(n)%mhchisq == 1) then
read(file_id_common3,*) STXSlist(n)%massobs, STXSlist(n)%dmassobs
else
read(file_id_common3,*)
STXSlist(n)%massobs = 0.0D0
STXSlist(n)%dmassobs = 0.0D0
endif
!--CHECK FOR ASSIGNMENT GROUP AS SECOND COLUMN:
read(file_id_common3,*) STXSlist(n)%mass
read(file_id_common3,'(A)') line
call read_in_mass_resolution_and_assignment_group(line, STXSlist(n)%dmass,&
& STXSlist(n)%assignmentgroup)
read(file_id_common3,*) STXSlist(n)%Nc, STXSlist(n)%eff_ref_mass
allocate(STXSlist(n)%channel_id_str(STXSlist(n)%Nc))
allocate(STXSlist(n)%channel_p_id(STXSlist(n)%Nc))
allocate(STXSlist(n)%channel_d_id(STXSlist(n)%Nc))
read(file_id_common3,*) (STXSlist(n)%channel_id_str(i),i=1,STXSlist(n)%Nc)
do i=1,STXSlist(n)%Nc
posperiod = index(STXSlist(n)%channel_id_str(i),'.')
if(posperiod.eq.0) then
if(len(trim(adjustl(STXSlist(n)%channel_id_str(i)))).eq.2) then
read(STXSlist(n)%channel_id_str(i),*) id
STXSlist(n)%channel_p_id(i) = int((id-modulo(id,10))/dble(10))
STXSlist(n)%channel_d_id(i) = modulo(id,10)
else
write(*,*) " For observable ID = ",STXSlist(n)%id
stop " Error: Cannot handle channel IDs!"
endif
else
read(STXSlist(n)%channel_id_str(i)(:posperiod-1),*) STXSlist(n)%channel_p_id(i)
read(STXSlist(n)%channel_id_str(i)(posperiod+1:),*) STXSlist(n)%channel_d_id(i)
endif
enddo
! write(*,*) "Production channels = ",STXSlist(n)%channel_p_id
! write(*,*) "Decay channels = ",STXSlist(n)%channel_d_id
! allocate(STXSlist(n)%channel_id(STXSlist(n)%Nc))
! read(file_id_common3,*) (STXSlist(n)%channel_id(i),i=1,STXSlist(n)%Nc)
allocate(STXSlist(n)%channel_efficiency(STXSlist(n)%Nc))
if(STXSlist(n)%eff_ref_mass.ge.0D0) then
read(file_id_common3,*) (STXSlist(n)%channel_efficiency(i),i=1,STXSlist(n)%Nc)
else
do i=1,STXSlist(n)%Nc
STXSlist(n)%channel_efficiency(i)=1.0D0
enddo
read(file_id_common3,*)
endif
! read(file_id_common3,*) STXSlist(n)%channel_id
! read(file_id_common3,*) STXSlist(n)%relative_efficiency
read(file_id_common3,*) STXSlist(n)%rate_low, STXSlist(n)%rate, STXSlist(n)%rate_up
if(STXSlist(n)%rate_SM_normalized.eq.1) then
read(file_id_common3,*) comment
STXSlist(n)%SMrate_low = 0.0D0
STXSlist(n)%SMrate = 0.0D0
STXSlist(n)%SMrate_up = 0.0D0
else
read(file_id_common3,*) STXSlist(n)%SMrate_low, STXSlist(n)%SMrate, STXSlist(n)%SMrate_up
endif
STXSlist(n)%drate_low = STXSlist(n)%rate - STXSlist(n)%rate_low
STXSlist(n)%drate_up = STXSlist(n)%rate_up - STXSlist(n)%rate
STXSlist(n)%dSMrate_low = STXSlist(n)%SMrate - STXSlist(n)%SMrate_low
STXSlist(n)%dSMrate_up = STXSlist(n)%SMrate_up - STXSlist(n)%SMrate
close(file_id_common3)
allocate(STXSlist(n)%relative_efficiency(np(Hneut),STXSlist(n)%Nc))
do k=1, np(Hneut)
STXSlist(n)%relative_efficiency(k,:)=1.0D0
enddo
enddo
close(file_id_common3)
!NEW:
call system('basename -a `ls -1 -p '//trim(adjustl(pathname_HS))// &
& 'Expt_tables/'//trim(adjustl(dataset))//'/*.stxscorr 2>/dev/null` > STXS_correlations.txt 2>/dev/null')
call system('rm -rf STXS_ncorrelations.txt')
open(file_id_common3, file="STXS_correlations.txt",form='formatted')
print *, "Reading in correlations from the following datafiles in analysis-set "// &
trim(adjustl(Exptdir))//":"
n = 0
n_datafiles = 0
n_correlations = 0
do
n = n+1
read(file_id_common3,'(A)', iostat=ios) datafile(n)
if(ios.ne.0) exit
fullfilename=trim(adjustl(pathname_HS))//'Expt_tables/'//trim(adjustl(dataset))//'/'&
& //trim(datafile(n))
call system('cat '//trim(adjustl(fullfilename))//' | wc -l > STXS_ncorrelations.txt')
open(file_id_common2,file="STXS_ncorrelations.txt",form='formatted')
read(file_id_common2,'(I10)') n_correlations_tmp
close(file_id_common2)
write(*,'(2I4,2X,A)') n, n_correlations_tmp, datafile(n)
n_correlations = n_correlations + n_correlations_tmp
enddo
n_datafiles = n - 1
close(file_id_common3)
allocate(STXScorrlist(n_correlations))
m=0
do n=1,n_datafiles
fullfilename=trim(adjustl(pathname_HS))//'Expt_tables/'//trim(adjustl(dataset))//'/'&
& //trim(datafile(n))
open(file_id_common3,file=fullfilename)
do
m= m+1
read(file_id_common3,*,iostat=ios) int1, int2, db1
! write(*,*) m, int1, int2, db1, ios
if(ios.ne.0) exit
STXScorrlist(m)%obsID1 = int1
STXScorrlist(m)%obsID2 = int2
STXScorrlist(m)%corr = db1
enddo
m=m-1
close(file_id_common3)
enddo
end subroutine load_STXS
!------------------------------------------------------------------------------------
subroutine assign_modelefficiencies_to_STXS(obsID, Nc, relative_efficiency)
!------------------------------------------------------------------------------------
use usefulbits, only : np, Hneut
implicit none
integer, intent(in) :: obsID
integer, intent(in) :: Nc
double precision, dimension(np(Hneut),Nc), intent(in) :: relative_efficiency
integer :: i
logical :: foundid = .False.
do i=lbound(STXSlist, dim=1),ubound(STXSlist, dim=1)
if(STXSlist(i)%id.eq.obsID) then
if(Nc.ne.STXSlist(i)%Nc) then
stop 'Error: Number of channels does not match!'
else
STXSlist(i)%relative_efficiency = relative_efficiency
foundid = .True.
endif
endif
enddo
if(.not.foundid) write(*,*) "WARNING in assign_modelefficiencies_to_STXS: ",&
& "observable ID ",obsID," not known!"
end subroutine assign_modelefficiencies_to_STXS
!------------------------------------------------------------------------------------
subroutine get_chisq_from_STXS(chisq_tot, pval)
!------------------------------------------------------------------------------------
use usefulbits, only : vsmall
use usefulbits_hs, only : Nparam
use numerics, only : invmatrix, matmult, gammp
implicit none
double precision, intent(out) :: chisq_tot, pval
integer :: i,j,m,N
double precision :: cov
logical :: correlationfound, somecorrelationsmissing
double precision, allocatable :: covmat(:,:),vmat(:,:),invcovmat(:,:)
double precision, allocatable :: v(:), v2(:)
N=size(STXSlist)
allocate(covmat(N,N),invcovmat(N,N))
allocate(v(N),v2(N))
allocate(vmat(N,1))
somecorrelationsmissing = .False.
do i=1,N
do j=1,N
correlationfound=.False.
do m=lbound(STXScorrlist,dim=1), ubound(STXScorrlist,dim=1)
if((STXScorrlist(m)%obsID1.eq.STXSlist(i)%id.and.STXScorrlist(m)%obsID2.eq.STXSlist(j)%id)&
&.or.(STXScorrlist(m)%obsID2.eq.STXSlist(i)%id.and.STXScorrlist(m)%obsID1.eq.STXSlist(j)%id)) then
covmat(i,j) = STXScorrlist(m)%corr*get_drate(i)*get_drate(j)
correlationfound=.True.
endif
enddo
if(.not.correlationfound) then
! Use a unit-matrix for the correlations here.
! if(.not.somecorrelationsmissing) then
! write(*,*) "Warning: Correlation matrix element not found for observable ids: ",STXSlist(i)%id, STXSlist(j)%id
! write(*,*) " Suppressing future warnings about missing correlation matrix elements..."
! endif
covmat(i,j) = 0.0D0
somecorrelationsmissing = .True.
if(STXSlist(i)%id.eq.STXSlist(j)%id) then
covmat(i,j) = get_drate(i)*get_drate(j)
endif
endif
enddo
v(i) = STXSlist(i)%rate - STXSlist(i)%model_total_rate
vmat(i,1) = v(i)
enddo
! if(somecorrelationsmissing) then
! write(*,*) "Warning: Some correlation matrix elements were not found."
! endif
call invmatrix(covmat,invcovmat)
call matmult(invcovmat,vmat,v2,N,1)
chisq_tot= 0.0D0
do i=1,N
STXSlist(i)%chisq = v(i)*v2(i)
chisq_tot = chisq_tot + STXSlist(i)%chisq
enddo
pval = 1.0D0
if(chisq_tot.gt.vsmall.and.(N-Nparam).gt.0) then
pval = 1 - gammp(dble(N-Nparam)/2,chisq_tot/2)
endif
deallocate(covmat,invcovmat,v,v2,vmat)
end subroutine get_chisq_from_STXS
!------------------------------------------------------------------------------------
subroutine get_number_of_STXS_observables(Nobs_rates, Nobs_mh)
integer, intent(out) :: Nobs_rates, Nobs_mh
Nobs_rates=size(STXSlist)
Nobs_mh = 0
end subroutine get_number_of_STXS_observables
!------------------------------------------------------------------------------------
function get_drate(i)
!------------------------------------------------------------------------------------
implicit none
integer :: i
double precision get_drate
if(STXSlist(i)%model_total_rate.le.STXSlist(i)%rate) then
get_drate = STXSlist(i)%drate_low
else
get_drate = STXSlist(i)%drate_up
endif
end function get_drate
!------------------------------------------------------------------------------------
subroutine calculate_model_predictions_for_STXS()
!------------------------------------------------------------------------------------
use usefulbits, only : theo
use theo_manip, only : HB5_complete_theo
integer :: i
call HB5_complete_theo
do i=lbound(STXSlist,dim=1), ubound(STXSlist,dim=1)
call evaluate_model_for_STXS(STXSlist(i),theo(1))
enddo
end subroutine calculate_model_predictions_for_STXS
!------------------------------------------------------------------------------------
subroutine evaluate_model_for_STXS(STXSobs, t)
!------------------------------------------------------------------------------------
use usefulbits, only : theo, div, small, np, Hneut, dataset, vsmall
use usefulbits_HS, only : normalize_rates_to_reference_position, &
& normalize_rates_to_reference_position_outside_dmtheo, &
& assignmentrange_STXS
! use_SMrate_at_reference_position_for_STXS,
use theory_XS_SM_functions
use theory_BRfunctions
use theo_manip, only : HB5_complete_theo
implicit none
type(STXS_observable), intent(inout) :: STXSobs
type(dataset), intent(in) :: t
double precision :: norm_rate, SMrate, SMrate_refmass, refmass, BR_SMref
integer :: i, j, id, p, d
STXSobs%model_total_rate = 0.0D0
if(.not.allocated(theo))then
stop 'subroutine HiggsSignals_initialize must be called first'
endif
if(.not.allocated(STXSobs%model_rate_per_Higgs)) then
allocate(STXSobs%model_rate_per_Higgs(np(Hneut),STXSobs%Nc))
endif
if(.not.allocated(STXSobs%inclusive_SM_rate)) then
! allocate(STXSobs%inclusive_SM_rate(np(Hneut),STXSobs%Nc))
allocate(STXSobs%inclusive_SM_rate(STXSobs%Nc))
endif
! write(*,*) 'DEBUG HS: id = ', STXSobs%id
! write(*,*) 'DEBUG HS, channel = ',STXSobs%channel_id
refmass = STXSobs%mass
do i=1,STXSobs%Nc
! id = STXSobs%channel_id(i)
! p = int((id-modulo(id,10))/dble(10))
! d = modulo(id,10)
p = STXSobs%channel_p_id(i)
d = STXSobs%channel_d_id(i)
do j=1, np(Hneut)
! write(*,*) 'DEBUG HS, m = ', t%particle(Hneut)%M(j)
!--Do the production rate for the relevant experiment and cms-energy
if(STXSobs%collider.eq.'LHC') then
if(abs(STXSobs%energy-7.0D0).le.small) then
if(p.eq.1) then
norm_rate=t%lhc7%XS_hj_ratio(j)
SMrate=t%lhc7%XS_H_SM(j)
SMrate_refmass=XS_lhc7_gg_H_SM(refmass)+XS_lhc7_bb_H_SM(refmass)
! STXSobs%channel_description(i,1)='singleH'
else if(p.eq.2) then
norm_rate=t%lhc7%XS_vbf_ratio(j)
SMrate=t%lhc7%XS_vbf_SM(j)
SMrate_refmass=XS_lhc7_vbf_SM(refmass)
! STXSobs%channel_description(i,1)='VBF'
else if(p.eq.3) then
norm_rate=t%lhc7%XS_hjW_ratio(j)
SMrate=t%lhc7%XS_HW_SM(j)
SMrate_refmass=XS_lhc7_HW_SM(refmass)
! STXSobs%channel_description(i,1)='HW'
else if(p.eq.4) then
norm_rate=t%lhc7%XS_hjZ_ratio(j)
SMrate=t%lhc7%XS_HZ_SM(j)
- SMrate_refmass=XS_lhc7_HZ_SM(refmass)
+ SMrate_refmass=ZH_cpmix_nnlo_ggqqbb(refmass,'LHC7 ',1.0D0,1.0D0,1.0D0,0.0D0,0.0D0,.True.)
! STXSobs%channel_description(i,1)='HZ'
else if(p.eq.5) then
norm_rate=t%lhc7%XS_tthj_ratio(j)
SMrate=t%lhc7%XS_ttH_SM(j)
SMrate_refmass=XS_lhc7_ttH_SM(refmass)
! STXSobs%channel_description(i,1)='ttH'
else if(p.eq.6) then
norm_rate=t%lhc7%XS_gg_hj_ratio(j)
SMrate=t%lhc7%XS_gg_H_SM(j)
SMrate_refmass=XS_lhc7_gg_H_SM(refmass)
! mutab%channel_description(i,1)='ggH'
else if(p.eq.7) then
norm_rate=t%lhc7%XS_bb_hj_ratio(j)
SMrate=t%lhc7%XS_bb_H_SM(j)
SMrate_refmass=XS_lhc7_bb_H_SM(refmass)
! mutab%channel_description(i,1)='bbH'
else if(p.eq.8) then
norm_rate=t%lhc7%XS_thj_tchan_ratio(j)
SMrate=t%lhc7%XS_tH_tchan_SM(j)
SMrate_refmass=XS_lhc7_tH_tchan_SM(refmass)
! mutab%channel_description(i,1)='tH (t-channel)'
else if(p.eq.9) then
norm_rate=t%lhc7%XS_thj_schan_ratio(j)
SMrate=t%lhc7%XS_tH_schan_SM(j)
SMrate_refmass=XS_lhc7_tH_schan_SM(refmass)
! mutab%channel_description(i,1)='tH (s-channel)'
else if(p.eq.10) then
norm_rate=t%lhc7%XS_qq_hjZ_ratio(j)
SMrate=t%lhc7%XS_qq_HZ_SM(j)
- SMrate_refmass=XS_lhc7_HZ_SM(refmass) ! WARNING: This is still the inclusive rate!!!
-! rate_SMref=XS_lhc7_qq_HZ_SM(refmass) !Need to create this function yet!
+ SMrate_refmass=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
norm_rate=t%lhc7%XS_gg_hjZ_ratio(j)
SMrate=t%lhc7%XS_gg_HZ_SM(j)
- SMrate_refmass=XS_lhc7_HZ_SM(refmass) ! WARNING: This is still the inclusive rate!!!
-! rate_SMref=XS_lhc7_gg_HZ_SM(refmass) !Need to create this function yet!
+ SMrate_refmass=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
norm_rate=1.0D0
SMrate=1.0D0
SMrate_refmass=1.0D0
! STXSobs%channel_description(i,1)='none'
+ else
+ write(*,*) "WARNING: Unknown production mode id p=",p," for STXS observable id = ",STXSobs%id
endif
else if(abs(STXSobs%energy-8.0D0).le.small) then
if(p.eq.1) then
norm_rate=t%lhc8%XS_hj_ratio(j)
SMrate=t%lhc8%XS_H_SM(j)
SMrate_refmass=XS_lhc8_gg_H_SM(refmass)+XS_lhc8_bb_H_SM(refmass)
! STXSobs%channel_description(i,1)='singleH'
else if(p.eq.2) then
norm_rate=t%lhc8%XS_vbf_ratio(j)
SMrate=t%lhc8%XS_vbf_SM(j)
SMrate_refmass=XS_lhc8_vbf_SM(refmass)
! STXSobs%channel_description(i,1)='VBF'
else if(p.eq.3) then
norm_rate=t%lhc8%XS_hjW_ratio(j)
SMrate=t%lhc8%XS_HW_SM(j)
SMrate_refmass=XS_lhc8_HW_SM(refmass)
! STXSobs%channel_description(i,1)='HW'
else if(p.eq.4) then
norm_rate=t%lhc8%XS_hjZ_ratio(j)
SMrate=t%lhc8%XS_HZ_SM(j)
- SMrate_refmass=XS_lhc8_HZ_SM(refmass)
+ SMrate_refmass=ZH_cpmix_nnlo_ggqqbb(refmass,'LHC8 ',1.0D0,1.0D0,1.0D0,0.0D0,0.0D0,.True.)
! STXSobs%channel_description(i,1)='HZ'
else if(p.eq.5) then
norm_rate=t%lhc8%XS_tthj_ratio(j)
SMrate=t%lhc8%XS_ttH_SM(j)
SMrate_refmass=XS_lhc8_ttH_SM(refmass)
! STXSobs%channel_description(i,1)='ttH'
else if(p.eq.6) then
norm_rate=t%lhc8%XS_gg_hj_ratio(j)
SMrate=t%lhc8%XS_gg_H_SM(j)
SMrate_refmass=XS_lhc8_gg_H_SM(refmass)
! mutab%channel_description(i,1)='ggH'
else if(p.eq.7) then
norm_rate=t%lhc8%XS_bb_hj_ratio(j)
SMrate=t%lhc8%XS_bb_H_SM(j)
SMrate_refmass=XS_lhc8_bb_H_SM(refmass)
! mutab%channel_description(i,1)='bbH'
else if(p.eq.8) then
norm_rate=t%lhc8%XS_thj_tchan_ratio(j)
SMrate=t%lhc8%XS_tH_tchan_SM(j)
SMrate_refmass=XS_lhc8_tH_tchan_SM(refmass)
! mutab%channel_description(i,1)='tH (t-channel)'
else if(p.eq.9) then
norm_rate=t%lhc8%XS_thj_schan_ratio(j)
SMrate=t%lhc8%XS_tH_schan_SM(j)
SMrate_refmass=XS_lhc8_tH_schan_SM(refmass)
! mutab%channel_description(i,1)='tH (s-channel)'
else if(p.eq.10) then
norm_rate=t%lhc8%XS_qq_hjZ_ratio(j)
SMrate=t%lhc8%XS_qq_HZ_SM(j)
- SMrate_refmass=XS_lhc8_HZ_SM(refmass) ! WARNING: This is still the inclusive rate!!!
-! rate_SMref=XS_lhc8_qq_HZ_SM(refmass) !Need to create this function yet!
+ SMrate_refmass=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
norm_rate=t%lhc8%XS_gg_hjZ_ratio(j)
SMrate=t%lhc8%XS_gg_HZ_SM(j)
- SMrate_refmass=XS_lhc8_HZ_SM(refmass) ! WARNING: This is still the inclusive rate!!!
-! rate_SMref=XS_lhc8_gg_HZ_SM(refmass) !Need to create this function yet!
-
+ SMrate_refmass=ZH_cpmix_nnlo_gg(refmass,'LHC8 ',1.0D0,1.0D0,1.0D0,0.0D0,0.0D0,.True.)
else if(p.eq.0) then
norm_rate=1.0D0
SMrate=1.0D0
SMrate_refmass=1.0D0
! STXSobs%channel_description(i,1)='none'
+ else
+ write(*,*) "WARNING: Unknown production mode id p=",p," for STXS observable id = ",STXSobs%id
endif
else if(abs(STXSobs%energy-13.0D0).le.small) then
if(p.eq.1) then
norm_rate=t%lhc13%XS_hj_ratio(j)
SMrate=t%lhc13%XS_H_SM(j)
SMrate_refmass=XS_lhc13_gg_H_SM(refmass)+XS_lhc13_bb_H_SM(refmass)
! STXSobs%channel_description(i,1)='singleH'
else if(p.eq.2) then
norm_rate=t%lhc13%XS_vbf_ratio(j)
SMrate=t%lhc13%XS_vbf_SM(j)
SMrate_refmass=XS_lhc13_vbf_SM(refmass)
! STXSobs%channel_description(i,1)='VBF'
else if(p.eq.3) then
norm_rate=t%lhc13%XS_hjW_ratio(j)
SMrate=t%lhc13%XS_HW_SM(j)
SMrate_refmass=XS_lhc13_HW_SM(refmass)
! STXSobs%channel_description(i,1)='HW'
else if(p.eq.4) then
norm_rate=t%lhc13%XS_hjZ_ratio(j)
SMrate=t%lhc13%XS_HZ_SM(j)
- SMrate_refmass=XS_lhc13_HZ_SM(refmass)
+ SMrate_refmass=ZH_cpmix_nnlo_ggqqbb(refmass,'LHC13',1.0D0,1.0D0,1.0D0,0.0D0,0.0D0,.True.)
! STXSobs%channel_description(i,1)='HZ'
else if(p.eq.5) then
norm_rate=t%lhc13%XS_tthj_ratio(j)
SMrate=t%lhc13%XS_ttH_SM(j)
SMrate_refmass=XS_lhc13_ttH_SM(refmass)
! STXSobs%channel_description(i,1)='ttH'
else if(p.eq.6) then
norm_rate=t%lhc13%XS_gg_hj_ratio(j)
SMrate=t%lhc13%XS_gg_H_SM(j)
SMrate_refmass=XS_lhc13_gg_H_SM(refmass)
! mutab%channel_description(i,1)='ggH'
else if(p.eq.7) then
norm_rate=t%lhc13%XS_bb_hj_ratio(j)
SMrate=t%lhc13%XS_bb_H_SM(j)
SMrate_refmass=XS_lhc13_bb_H_SM(refmass)
! mutab%channel_description(i,1)='bbH'
else if(p.eq.8) then
norm_rate=t%lhc13%XS_thj_tchan_ratio(j)
SMrate=t%lhc13%XS_tH_tchan_SM(j)
SMrate_refmass=XS_lhc13_tH_tchan_SM(refmass)
! mutab%channel_description(i,1)='tH (t-channel)'
else if(p.eq.9) then
norm_rate=t%lhc13%XS_thj_schan_ratio(j)
SMrate=t%lhc13%XS_tH_schan_SM(j)
SMrate_refmass=XS_lhc13_tH_schan_SM(refmass)
! mutab%channel_description(i,1)='tH (s-channel)'
else if(p.eq.10) then
norm_rate=t%lhc13%XS_qq_hjZ_ratio(j)
SMrate=t%lhc13%XS_qq_HZ_SM(j)
- SMrate_refmass=XS_lhc13_HZ_SM(refmass) ! WARNING: This is still the inclusive rate!!!
-! rate_SMref=XS_lhc13_qq_HZ_SM(refmass) !Need to create this function yet!
+ SMrate_refmass=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
norm_rate=t%lhc13%XS_gg_hjZ_ratio(j)
SMrate=t%lhc13%XS_gg_HZ_SM(j)
- SMrate_refmass=XS_lhc13_HZ_SM(refmass) ! WARNING: This is still the inclusive rate!!!
-! rate_SMref=XS_lhc13_gg_HZ_SM(refmass) !Need to create this function yet!
+ SMrate_refmass=ZH_cpmix_nnlo_gg(refmass,'LHC13',1.0D0,1.0D0,1.0D0,0.0D0,0.0D0,.True.)
else if(p.eq.0) then
norm_rate=1.0D0
SMrate=1.0D0
SMrate_refmass=1.0D0
! STXSobs%channel_description(i,1)='none'
- endif
+ else
+ write(*,*) "WARNING: Unknown production mode id p=",p," for STXS observable id = ",STXSobs%id
+ endif
endif
else if(STXSobs%collider.eq.'TEV') then
if(p.eq.1) then
norm_rate=t%tev%XS_hj_ratio(j)
SMrate=t%tev%XS_H_SM(j)
SMrate_refmass=XS_tev_gg_H_SM(refmass)+XS_tev_bb_H_SM(refmass)
! STXSobs%channel_description(i,1)='singleH'
else if(p.eq.2) then
norm_rate=t%tev%XS_vbf_ratio(j)
SMrate=t%tev%XS_vbf_SM(j)
SMrate_refmass=XS_tev_vbf_SM(refmass)
! STXSobs%channel_description(i,1)='VBF'
else if(p.eq.3) then
norm_rate=t%tev%XS_hjW_ratio(j)
SMrate=t%tev%XS_HW_SM(j)
SMrate_refmass=XS_tev_HW_SM(refmass)
! STXSobs%channel_description(i,1)='HW'
else if(p.eq.4) then
norm_rate=t%tev%XS_hjZ_ratio(j)
SMrate=t%tev%XS_HZ_SM(j)
- SMrate_refmass=XS_tev_HZ_SM(refmass)
+ SMrate_refmass=ZH_cpmix_nnlo_ggqqbb(refmass,'TEV ',1.0D0,1.0D0,1.0D0,0.0D0,0.0D0,.True.)
! STXSobs%channel_description(i,1)='HZ'
else if(p.eq.5) then
norm_rate=t%tev%XS_tthj_ratio(j)
SMrate=t%tev%XS_ttH_SM(j)
SMrate_refmass=XS_tev_ttH_SM(refmass)
! STXSobs%channel_description(i,1)='ttH'
+ else if(p.eq.10) then
+ norm_rate=t%tev%XS_qq_hjZ_ratio(j)
+ SMrate=t%tev%XS_qq_HZ_SM(j)
+ SMrate_refmass=ZH_cpmix_nnlo_qqbb(refmass,'TEV ',1.0D0,1.0D0,1.0D0,0.0D0,0.0D0,.True.)
+! mutab%channel_description(i,1)='qq-HZ'
+ else if(p.eq.11) then
+ norm_rate=t%tev%XS_gg_hjZ_ratio(j)
+ SMrate=t%tev%XS_gg_HZ_SM(j)
+ SMrate_refmass=ZH_cpmix_nnlo_gg(refmass,'TEV ',1.0D0,1.0D0,1.0D0,0.0D0,0.0D0,.True.)
else if(p.eq.0) then
norm_rate=1.0D0
SMrate=1.0D0
SMrate_refmass=1.0D0
! STXSobs%channel_description(i,1)='none'
- endif
+ else
+ write(*,*) "WARNING: Unknown production mode id p=",p," for STXS observable id = ",STXSobs%id
+ endif
else if(STXSobs%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 ',STXSobs%id
norm_rate=0.0D0
SMrate=1.0D0
SMrate_refmass=1.0D0
! STXSobs%channel_description(i,1)='unknown'
else if(p.eq.3) then
norm_rate=t%lhc8%XS_hjW_ratio(j)
SMrate=t%lhc8%XS_HW_SM(j)
SMrate_refmass=XS_lhc8_HW_SM(refmass)
! STXSobs%channel_description(i,1)='WBF'
else if(p.eq.4) then
norm_rate=t%lhc8%XS_hjZ_ratio(j)
SMrate=t%lhc8%XS_HZ_SM(j)
SMrate_refmass=XS_lhc8_HZ_SM(refmass)
! STXSobs%channel_description(i,1)='HZ'
else if(p.eq.5) then
norm_rate=t%lhc8%XS_tthj_ratio(j)
SMrate=t%lhc8%XS_ttH_SM(j)
SMrate_refmass=XS_lhc8_ttH_SM(refmass)
! STXSobs%channel_description(i,1)='ttH'
else if(p.eq.0) then
norm_rate=1.0D0
SMrate=1.0D0
SMrate_refmass=1.0D0
-! STXSobs%channel_description(i,1)='none'
+! STXSobs%channel_description(i,1)='none'
+ else
+ write(*,*) "WARNING: Unknown production mode id p=",p," for STXS observable id = ",STXSobs%id
endif
endif
!--Multiply now by the decay rate
if(d.eq.1) then
norm_rate=norm_rate*div(t%BR_hjgaga(j),t%BR_Hgaga_SM(j),0.0D0,1.0D0)
SMrate=SMrate*t%BR_Hgaga_SM(j)
SMrate_refmass = SMrate_refmass*BRSM_Hgaga(refmass)
! STXSobs%channel_description(i,2)='gammagamma'
else if(d.eq.2) then
norm_rate=norm_rate*div(t%BR_hjWW(j),t%BR_HWW_SM(j),0.0D0,1.0D0)
SMrate=SMrate*t%BR_HWW_SM(j)
SMrate_refmass = SMrate_refmass*BRSM_HWW(refmass)
! STXSobs%channel_description(i,2)='WW'
else if(d.eq.3) then
norm_rate=norm_rate*div(t%BR_hjZZ(j),t%BR_HZZ_SM(j),0.0D0,1.0D0)
SMrate=SMrate*t%BR_HZZ_SM(j)
SMrate_refmass = SMrate_refmass*BRSM_HZZ(refmass)
! STXSobs%channel_description(i,2)='ZZ'
else if(d.eq.4) then
norm_rate=norm_rate*div(t%BR_hjtautau(j),t%BR_Htautau_SM(j),0.0D0,1.0D0)
SMrate=SMrate*t%BR_Htautau_SM(j)
SMrate_refmass = SMrate_refmass*BRSM_Htautau(refmass)
! STXSobs%channel_description(i,2)='tautau'
else if(d.eq.5) then
norm_rate=norm_rate*div(t%BR_hjbb(j),t%BR_Hbb_SM(j),0.0D0,1.0D0)
SMrate=SMrate*t%BR_Hbb_SM(j)
SMrate_refmass = SMrate_refmass*BRSM_Hbb(refmass)
! STXSobs%channel_description(i,2)='bb'
else if(d.eq.6) then
norm_rate=norm_rate*div(t%BR_hjZga(j),t%BR_HZga_SM(j),0.0D0,1.0D0)
SMrate=SMrate*t%BR_HZga_SM(j)
SMrate_refmass = SMrate_refmass*BRSM_HZga(refmass)
! STXSobs%channel_description(i,2)='Zgamma'
else if(d.eq.7) then
norm_rate=norm_rate*div(t%BR_hjcc(j),t%BR_Hcc_SM(j),0.0D0,1.0D0)
SMrate=SMrate*t%BR_Hcc_SM(j)
SMrate_refmass = SMrate_refmass*BRSM_Hcc(refmass)
! STXSobs%channel_description(i,2)='cc'
else if(d.eq.8) then
norm_rate=norm_rate*div(t%BR_hjmumu(j),t%BR_Hmumu_SM(j),0.0D0,1.0D0)
SMrate=SMrate*t%BR_Hmumu_SM(j)
SMrate_refmass = SMrate_refmass*BRSM_Hmumu(refmass)
! STXSobs%channel_description(i,2)='mumu'
else if(d.eq.9) then
norm_rate=norm_rate*div(t%BR_hjgg(j),t%BR_Hgg_SM(j),0.0D0,1.0D0)
SMrate=SMrate*t%BR_Hgg_SM(j)
SMrate_refmass = SMrate_refmass*BRSM_Hgg(refmass)
! STXSobs%channel_description(i,2)='gg'
else if(d.eq.10) then
norm_rate=norm_rate*div(t%BR_hjss(j),t%BR_Hss_SM(j),0.0D0,1.0D0)
SMrate=SMrate*t%BR_Hss_SM(j)
SMrate_refmass = SMrate_refmass*BRSM_Hss(refmass)
! mutab%channel_description(i,2)='ss'
else if(d.eq.11) then
norm_rate=norm_rate*div(t%BR_hjtt(j),t%BR_Htt_SM(j),0.0D0,1.0D0)
SMrate=SMrate*t%BR_Htt_SM(j)
SMrate_refmass = SMrate_refmass*BRSM_Htoptop(refmass)
! mutab%channel_description(i,2)='tt'
else if(d.eq.0) then
norm_rate=norm_rate*1.0D0
SMrate=SMrate*1.0D0
SMrate_refmass = SMrate_refmass*1.0D0
! STXSobs%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)
! BR_SMref_mpeak = BRSM_Hgg(refmass)
case(11)
BR_SMref = t%BR_Htt_SM(j)
! BR_SMref_mpeak = BRSM_Htoptop(refmass)
end select
if(STXSobs%collider.eq.'LHC') then
if(abs(STXSobs%energy-7.0D0).le.small) then
if(t%lhc7%channelrates(j,p,d).ge.0.0d0) then
norm_rate=div(t%lhc7%channelrates(j,p,d),BR_SMref,0.0D0,1.0D0)
endif
else if(abs(STXSobs%energy-8.0D0).le.small) then
if(t%lhc8%channelrates(j,p,d).ge.0.0d0) then
norm_rate=div(t%lhc8%channelrates(j,p,d),BR_SMref,0.0D0,1.0D0)
endif
else if(abs(STXSobs%energy-13.0D0).le.small) then
if(t%lhc13%channelrates(j,p,d).ge.0.0d0) then
norm_rate=div(t%lhc13%channelrates(j,p,d),BR_SMref,0.0D0,1.0D0)
endif
endif
else if(STXSobs%collider.eq.'TEV') then
if(t%tev%channelrates(j,p,d).ge.0.0d0) then
norm_rate=div(t%tev%channelrates(j,p,d),BR_SMref,0.0D0,1.0D0)
endif
endif
endif
!-------------------------
if(abs(t%particle(Hneut)%M(j) - STXSobs%mass).le.(assignmentrange_STXS * &
sqrt(t%particle(Hneut)%dM(j)**2.0D0+STXSobs%dmass**2.0D0))) then
! if(STXSobs%rate_SM_normalized.eq.1) then
if(normalize_rates_to_reference_position) then
STXSobs%model_rate_per_Higgs(j,i)=norm_rate*SMrate/(SMrate_refmass)
else
STXSobs%model_rate_per_Higgs(j,i)=norm_rate !! OLD WAY
endif
if(normalize_rates_to_reference_position_outside_dmtheo) then
if(abs(STXSobs%mass-t%particle(Hneut)%M(j)).ge.t%particle(Hneut)%dM(j)) then
STXSobs%model_rate_per_Higgs(j,i)=norm_rate*SMrate/(SMrate_refmass)
endif
endif
! else
! if(use_SMrate_at_reference_position_for_STXS) then
!---
! n.B.: Need to use officially quoted SM prediction here, because HB/HS do not contain
! SM predictions for exclusive STXS bins (but only inclusive SM rates).
!---
! STXSobs%model_rate_per_Higgs(j,i)=norm_rate*STXSobs%SMrate
! else
! STXSobs%model_rate=norm_rate*SMrate
! endif
! endif
else
STXSobs%model_rate_per_Higgs(j,i) = 0.0D0
! STXSobs%inclusive_SM_rate(j,i) = 0.0D0
endif
! Inclusive SM rate must always be evaluated at the mass position of the measurement!
STXSobs%inclusive_SM_rate(i) = SMrate_refmass * STXSobs%channel_efficiency(i)
! write(*,*) "j, i, STXSobs%model_rate_per_Higgs(j,i) = ",j,i, STXSobs%model_rate_per_Higgs(j,i)
! Turn normalized rate into absolute rate (per Higgs per channel)
STXSobs%model_rate_per_Higgs(j,i) = STXSobs%model_rate_per_Higgs(j,i) * &
& STXSobs%relative_efficiency(j,i) * &
& STXSobs%inclusive_SM_rate(i)
!& SMrate * STXSobs%channel_efficiency(i)
! write(*,*) "j, i, absolute STXSobs%model_rate_per_Higgs(j,i), STXSobs%inclusive_SM_rate(i) = ",&
! & j, i, STXSobs%model_rate_per_Higgs(j,i), STXSobs%inclusive_SM_rate(j,i)
!---
! Take into account model-dependent signal efficiency (relative to SM).
! These have to be given by the user for each observable using the subroutine
! assign_modelefficiencies_to_STXS:
!---
enddo
enddo
! write(*,*) "STXSobs%id = " , STXSobs%id
! write(*,*) " model_rate_per_Higgs = ",STXSobs%model_rate_per_Higgs
! write(*,*) " inclusive SM rate = ",STXSobs%inclusive_SM_rate
if(sum(STXSobs%inclusive_SM_rate).ge.vsmall) then
STXSobs%model_total_rate = sum(STXSobs%model_rate_per_Higgs)/sum(STXSobs%inclusive_SM_rate) ! Mistake: Don't divide by the sum over SM!!
else
STXSobs%model_total_rate = 0.0D0
endif
! write(*,*) "STXSobs%model_total_rate (SM norm)= ", STXSobs%model_total_rate
if(STXSobs%rate_SM_normalized.eq.0) then
STXSobs%model_total_rate = STXSobs%model_total_rate * STXSobs%SMrate
! write(*,*) "STXSobs%model_total_rate (absolute)= ", STXSobs%model_total_rate
endif
! write(*,*) "#--------------- ", STXSobs%id, " ---------------#"
! do i=1,STXSobs%Nc
! write(*,*) "channel id = ", STXSobs%channel_id(i), " rate = ", &
! & sum(STXSobs%model_rate_per_Higgs(:,i))/sum(STXSobs%inclusive_SM_rate)*STXSobs%SMrate
! enddo
! STXSobs%model_total_rate + STXSobs%relative_efficiency(j) * STXSobs%model_rate_per_Higgs(j)
! write(*,*) "Total rate: ", STXSobs%model_total_rate
end subroutine evaluate_model_for_STXS
!------------------------------------------------------------------------------------
subroutine print_STXS()
!------------------------------------------------------------------------------------
implicit none
integer :: i
character(LEN=100) :: formatter
do i=lbound(STXSlist,dim=1), ubound(STXSlist,dim=1)
write(*,*) "#--------------------------------------------------#"
write(*,*) "#- STXS observable ",i," -#"
write(*,*) "#--------------------------------------------------#"
write(*,'(A,I10)') " ID = ", STXSlist(i)%id
write(*,'(A,A)') " Label = ", STXSlist(i)%label
write(*,'(A,A)') " Description = ", STXSlist(i)%desc
write(*,'(A,A)') " Experiment = ", STXSlist(i)%expt
write(*,'(A,2F6.2)') " Energy, Luminosity = ", STXSlist(i)%energy, STXSlist(i)%lumi
write(*,'(A,F10.5,A,F10.5,A,F10.5)') " Obs Signal rate [pb] = ",&
& STXSlist(i)%rate, " + ", STXSlist(i)%drate_up, " - ", STXSlist(i)%drate_low
write(*,'(A,F10.5,A,F10.5,A,F10.5)') " SM Signal rate [pb] = ",&
& STXSlist(i)%SMrate, " + ", STXSlist(i)%dSMrate_up, " - ", STXSlist(i)%dSMrate_low
write(*,'(A,F10.5)') " Pred. Signal rate [pb] = ", STXSlist(i)%model_total_rate
write(formatter,*) "(A,",STXSlist(i)%Nc,"I10)"
formatter = trim(adjustl(formatter))
write(*,'(A)') " Channels = ", STXSlist(i)%channel_id_str
write(formatter,*) "(A,",STXSlist(i)%Nc,"F10.5)"
formatter = trim(adjustl(formatter))
write(*,formatter) " Channel efficiency = ", STXSlist(i)%channel_efficiency
enddo
write(*,*) "#--------------------------------------------------#"
end subroutine print_STXS
!------------------------------------------------------------------------------------
subroutine print_STXS_to_file
!------------------------------------------------------------------------------------
use usefulbits, only : file_id_common3
use usefulbits_hs, only : StrCompress
implicit none
character(LEN=100) :: formatspec
integer :: i
formatspec='(I3,7X,I10,1X,F6.2,1X,6F10.6,1X,A3,1X,F6.2,1X,F6.2,1X,A,5X,A)'
open(file_id_common3,file="STXS_information.txt")
write(file_id_common3,*) "#HiggsSignals-"//trim(adjustl(HSvers))// &
& " with experimental dataset '"//trim(adjustl(Exptdir))//"'"
write(file_id_common3,*) "#Number STXS-ID mass-pos rate_obs drate_low drate_high ", &
& "rate_SM dSMrate_low dSMrate_high collaboration energy luminosity description reference"
write(file_id_common3,*) "#"
do i=lbound(STXSlist,dim=1),ubound(STXSlist,dim=1)
write(file_id_common3,formatspec) i ,STXSlist(i)%id,STXSlist(i)%mass, &
& STXSlist(i)%rate, STXSlist(i)%drate_low,STXSlist(i)%drate_up, &
& STXSlist(i)%SMrate, STXSlist(i)%dSMrate_low,STXSlist(i)%dSMrate_up, &
& STXSlist(i)%collaboration, STXSlist(i)%energy, &
& STXSlist(i)%lumi, trim(strcompress(STXSlist(i)%desc)), STXSlist(i)%label
enddo
close(file_id_common3)
end subroutine print_STXS_to_file
!------------------------------------------------------------------------------------
subroutine clear_STXS()
!------------------------------------------------------------------------------------
implicit none
integer :: i
do i=lbound(STXSlist,dim=1), ubound(STXSlist,dim=1)
deallocate(STXSlist(i)%model_rate_per_Higgs)
deallocate(STXSlist(i)%inclusive_SM_rate)
deallocate(STXSlist(i)%channel_id_str)
deallocate(STXSlist(i)%channel_p_id)
deallocate(STXSlist(i)%channel_d_id)
deallocate(STXSlist(i)%channel_efficiency)
deallocate(STXSlist(i)%relative_efficiency)
enddo
deallocate(STXSlist)
if(allocated(STXScorrlist)) deallocate(STXScorrlist)
end subroutine clear_STXS
!------------------------------------------------------------------------------------
end module STXS
!------------------------------------------------------------------------------------
\ No newline at end of file
Index: trunk/HiggsSignals-2/expt_syst.f90
===================================================================
--- trunk/HiggsSignals-2/expt_syst.f90 (revision 581)
+++ trunk/HiggsSignals-2/expt_syst.f90 (revision 582)
@@ -1,661 +1,661 @@
module expt_syst
! use usefulbits_hs
implicit none
- integer,parameter :: Nprod = 5
+ integer,parameter :: Nprod = 11
! ggH, VBF, WH, ZH, ttH
integer,parameter :: Ndecay = 9
integer,parameter :: Nsyst = 57
! 1: CMS H->gaga untagged 0-1 7 TeV event migration
! 2: CMS H->gaga untagged 1-2 7 TeV event migration
! 3: CMS H->gaga untagged 2-3 7 TeV event migration
! 4: CMS H->gaga untagged 0-1 8 TeV event migration
! 5: CMS H->gaga untagged 1-2 8 TeV event migration
! 6: CMS H->gaga untagged 2-3 8 TeV event migration
! 7: CMS H->gaga dijet 8 TeV event migration 0-1
! 8: Dijet tagging efficiency in dijet selection of CMS H->gaga analyses
! 9: ETmiss cut efficiency in ETmiss selection of CMS H->gaga analyses
! 10: ATLAS H->tautau ggH differential pT distribution and QCD scale
! 11: ATLAS H->tautau Top and Z->ll BG normalization (for hadlep and leplep channels)
! 12: ATLAS H->tautau hadronic tau identification and energy scale
! 13: ATLAS H->tautau JES eta calibration
! 14: ATLAS H->tautau Z->tautau normalization (for hadlep)
! 15: ATLAS H->tautau fake backgrounds (for leplep)
! 16: ATLAS H->tautau ditau(had) tagging efficiency
! 17: ATLAS H->gaga gg->H + (>2jets) cross section (affects VBF and VH(hadronic) channel)
! 18: ATLAS H->gaga gg->H + (3 jets) cross section (affect only VBF channels)
! 19: ATLAS H->gaga Underlying Event on gg->H yield
! 20: ATLAS H->gaga Underlying Event on ttH yield
! 21: ATLAS H->gaga pT spectrum modelling: migration between high- and low-pT categories of gg->H yield (central)
! 22: ATLAS H->gaga pT spectrum modelling: migration between high- and low-pT categories of gg->H yield (forward)
! 23: ATLAS H->gaga 2-jet Delta(Phi) angular distribution of gg->H in VBF categories
! 24: ATLAS H->gaga 2-jet Delta(Eta*) angular distribution of gg->H in VBF categories
! 25: ATLAS H->gaga gg->H contribution to ttH categories
! 26: ATLAS H->gaga heavy flavor fraction of gg->H, VBF, WH contribution to ttH categories
! 27: ATLAS H->gaga experimental: jet energy scale / resolution and vertex fraction
! 28: ATLAS H->gaga experimental: ETmiss energy scale and resolution
! 29: ATLAS H->gaga diphoton mass resolution (Tab. XII): Constant term
! 30: ATLAS H->gaga diphoton mass resolution (Tab. XII): Sampling term
! 31: ATLAS H->gaga diphoton mass resolution (Tab. XII): Material modeling
! 32: ATLAS H->gaga diphoton mass resolution (Tab. XII): Noise term
! 33: ATLAS H->gaga experimental: Photon Isolation (Tab. IX)
! 34: ATLAS H->gaga experimental: Photon ID (Tab. IX)
! 35: ATLAS H->gaga experimental: b-tagging efficiency
! 36: ATLAS H->gaga migration (not official): between VBF categories
! 37: ATLAS H->gaga migration (not official): between gg->H(forward) and VBF categories
! 38: ATLAS H->gaga unofficial VH error
! 39: CMS H->gaga untagged 3-4 8 TeV event migration
! 40: CMS H->gaga dijet 7 TeV event migration 0-1
! 41: CMS H->gaga dijet 8 TeV event migration 1-2
! 42: CMS H->gaga VH tight-loose migration 8 TeV
! 43: CMS H->gaga VH tight-loose common systematic 8 TeV
! 44: CMS H->gaga ttH(lepton)-VH tight migration
! 45: CMS H->gaga VH(loose)-VBF(dijet) migration
! 46: CMS H->gaga VBF(dijet2)-VH(ETmiss) migration
! 47: CMS H->gaga VH(ETmiss)-ttH multijet migration
! 48: CMS H->gaga ttH(multijet)-VH(dijet) migration
! 49: CMS H->gaga VH(dijet)-untagged migration
! 50: CMS H->gaga VBF uncertainty in untagged
! NEW 13 TeV results:
! CMS-16-020, H->gaga
! 51: UE and parton shower, jet energy scale/smearing: VBF-VBF Tag migration, 7% and 4-15%, respectively.
! 52: UE and parton shower, jet energy scale/smearing: VBF-untagged Tag migration, 9% and 4-15%, respectively.
! 53: Event migration untagged 0-1
! 54: Event migration untagged 1-2
! 55: Event migration untagged 2-3
! n.b: QCD scale uncertainty and energy scale/resolution, all categories, ~5-10% and ~6%, respectively. -> makes fit worse!
! 56: ggF contamination in VBF, ttH categories, ~39%
! 57: ggF contamination: VBF-VBF Tag migration, ~10%
double precision :: rel_corr_err(2,0:Nprod,0:Ndecay,Nsyst)
! scaletype determines whether the systematic uncertainty is scaled with the
! observed (typical for BG uncertainties) [0] or with the predicted mu (typical
! for signal uncertainties) [1].
integer :: scaletype(Nsyst)
contains
!------------------------------------------------
subroutine fill_scaletype
!------------------------------------------------
! Set scaletypes (default is scaling with predicted)
scaletype(:)=1
! Set to 0 for mostly background-affecting systematics
scaletype(11)=0
scaletype(12)=0
scaletype(13)=0
scaletype(14)=0
scaletype(15)=0
scaletype(16)=0
scaletype(27)=0
scaletype(28)=0
scaletype(29)=0
scaletype(30)=0
scaletype(31)=0
scaletype(32)=0
scaletype(33)=0
scaletype(34)=0
scaletype(35)=0
! scaletype(53)=0
end subroutine fill_scaletype
!------------------------------------------------
subroutine fill_rel_corr_err(ID,N)
!------------------------------------------------
implicit none
integer, intent(in) :: ID, N
rel_corr_err(N,:,:,:) = 0.0D0
select case(ID)
! ----------------------------------------------------------------------
! This is for an outdated CMS CONF-Note for H->gamma gamma, which should not
! be used in conjunction with the updated CMS results for this analysis (0558...)
! ----------------------------------------------------------------------
case(13001107) ! untagged 0 7TeV
rel_corr_err(N,:,1,1)= +0.125D0
case(13001108) ! untagged 1 7TeV
rel_corr_err(N,:,1,1)= -0.125D0
rel_corr_err(N,:,1,2)= +0.125D0
case(13001109) ! untagged 2 7TeV
rel_corr_err(N,:,1,2)= -0.125D0
rel_corr_err(N,:,1,3)= +0.125D0
case(13001110) ! untagged 3 7TeV
rel_corr_err(N,:,1,3)= -0.125D0
case(13001111) ! untagged 0 8TeV
rel_corr_err(N,:,1,4)= +0.125D0
case(13001112) ! untagged 1 8TeV
rel_corr_err(N,:,1,4)= -0.125D0
rel_corr_err(N,:,1,5)= +0.125D0
case(13001113) ! untagged 2 8TeV
rel_corr_err(N,:,1,5)= -0.125D0
rel_corr_err(N,:,1,6)= +0.125D0
case(13001114) ! untagged 3 8TeV
rel_corr_err(N,:,1,6)= -0.125D0
case(13001105) ! CMS H->gaga dijet loose tagged categories (8 TeV)
rel_corr_err(N,:,1,7)= + 0.15D0
rel_corr_err(N,1,1,8)= - 0.3D0
rel_corr_err(N,2,1,8)= + 0.1D0
case(13001106) ! CMS H->gaga dijet tight tagged categories (8 TeV)
rel_corr_err(N,:,1,7)= - 0.15D0
rel_corr_err(N,1,1,8)= - 0.3D0
rel_corr_err(N,2,1,8)= + 0.15D0
case(12015103) ! CMS H->gaga dijet tagged category (7 TeV)
rel_corr_err(N,1,1,8)= - 0.3D0
rel_corr_err(N,2,1,8)= + 0.1D0
case(13001102) ! CMS H->gaga ETmiss tagged categories
rel_corr_err(N,1,1,9)= 0.15D0
rel_corr_err(N,2,1,9)= 0.15D0
rel_corr_err(N,3,1,9)= 0.04D0
rel_corr_err(N,4,1,9)= 0.04D0
rel_corr_err(N,5,1,9)= 0.04D0
! ----------------------------------------------------------------------
! updated (full LHC I run) CMS H->gamma gamma results
! partly using the same systematics than in older results
! ----------------------------------------------------------------------
case(0558101) ! untagged 0 7TeV
rel_corr_err(N,:,1,1)= +0.2D0
case(0558102) ! untagged 1 7TeV
rel_corr_err(N,:,1,1)= -0.2D0
rel_corr_err(N,:,1,2)= +0.2D0
case(0558103) ! untagged 2 7TeV
rel_corr_err(N,:,1,2)= -0.2D0
rel_corr_err(N,:,1,3)= +0.2D0
case(0558104) ! untagged 3 7TeV
rel_corr_err(N,:,1,3)= -0.2D0
case(0558111) ! untagged 0 8TeV
rel_corr_err(N,:,1,4)= +0.2D0
case(0558112) ! untagged 1 8TeV
rel_corr_err(N,:,1,4)= -0.2D0
rel_corr_err(N,:,1,5)= +0.2D0
case(0558113) ! untagged 2 8TeV
rel_corr_err(N,:,1,5)= -0.2D0
rel_corr_err(N,:,1,6)= +0.2D0
case(0558114) ! untagged 3 8TeV
rel_corr_err(N,:,1,6)= -0.2D0
rel_corr_err(N,:,1,39)= +0.2D0
case(0558115) ! untagged 4 8TeV
rel_corr_err(N,:,1,39)= -0.2D0
case(0558116) ! CMS H->gaga VBF dijet 0 categories (8 TeV)
rel_corr_err(N,:,1,7)= + 0.3D0
rel_corr_err(N,1,1,8)= - 0.3D0
rel_corr_err(N,2,1,8)= + 0.1D0
rel_corr_err(N,:,1,45)= -0.2D0
case(0558117) ! CMS H->gaga VBF dijet 1 categories (8 TeV)
rel_corr_err(N,:,1,7)= - 0.3D0
rel_corr_err(N,:,1,41)= + 0.3D0
rel_corr_err(N,1,1,8)= - 0.3D0
rel_corr_err(N,2,1,8)= + 0.15D0
case(0558118) ! CMS H->gaga VBF dijet 2 categories (8 TeV)
rel_corr_err(N,:,1,41)= - 0.3D0
rel_corr_err(N,1,1,8)= - 0.3D0
rel_corr_err(N,2,1,8)= + 0.15D0
rel_corr_err(N,:,1,46)= +0.2D0
case(0558105) ! CMS H->gaga VBF dijet 0 categories (7 TeV)
rel_corr_err(N,:,1,40)= + 0.15D0
rel_corr_err(N,1,1,8)= - 0.3D0
rel_corr_err(N,2,1,8)= + 0.05D0
rel_corr_err(N,:,1,44)= +0.2D0
case(0558106) ! CMS H->gaga VBF dijet 1 categories (7 TeV)
rel_corr_err(N,:,1,40)= - 0.15D0
rel_corr_err(N,1,1,8)= - 0.3D0
rel_corr_err(N,2,1,8)= + 0.05D0
rel_corr_err(N,:,1,44)= +0.2D0
case(0558108) ! CMS H->gaga VH ETmiss 7 TeV
rel_corr_err(N,1,1,9)= 0.15D0
rel_corr_err(N,2,1,9)= 0.15D0
rel_corr_err(N,3,1,9)= 0.04D0
rel_corr_err(N,4,1,9)= 0.04D0
rel_corr_err(N,5,1,9)= 0.04D0
case(0558121) ! CMS H->gaga VH ETmiss 8 TeV
rel_corr_err(N,1,1,9)= 0.15D0
rel_corr_err(N,2,1,9)= 0.15D0
rel_corr_err(N,3,1,9)= 0.04D0
rel_corr_err(N,4,1,9)= 0.04D0
rel_corr_err(N,5,1,9)= 0.04D0
rel_corr_err(N,:,1,46)= -0.2D0
rel_corr_err(N,:,1,47)= +0.2D0
case(0558109) ! CMS H->gaga VH dijet 7 TeV
rel_corr_err(N,1,1,8)= - 0.3D0
rel_corr_err(N,2,1,8)= + 0.1D0
case(0558110) ! CMS H->gaga ttH multijets 7 TeV
rel_corr_err(N,1,1,8)= - 0.3D0
rel_corr_err(N,2,1,8)= + 0.1D0
case(0558122) ! CMS H->gaga VH dijet 8 TeV
rel_corr_err(N,1,1,8)= - 0.3D0
rel_corr_err(N,2,1,8)= + 0.1D0
rel_corr_err(N,:,1,48)= +0.2D0
case(0558124) ! CMS H->gaga ttH multijets 8 TeV
rel_corr_err(N,1,1,8)= - 0.3D0
rel_corr_err(N,2,1,8)= + 0.1D0
rel_corr_err(N,:,1,47)= -0.2D0
rel_corr_err(N,:,1,48)= +0.2D0
case(0558119) ! CMS H->gaga VH tight
rel_corr_err(N,:,1,42)= + 0.2D0
rel_corr_err(N,:,1,43)= + 0.15D0
rel_corr_err(N,:,1,44)= -0.2D0
case(0558120) ! CMS H->gaga VH loose
rel_corr_err(N,:,1,42)= - 0.2D0
rel_corr_err(N,:,1,43)= + 0.15D0
rel_corr_err(N,:,1,45)= +0.2D0
case(0558123) ! CMS H->gaga ttH lepton
rel_corr_err(N,:,1,44)= +0.2D0
! ----------------------------------------------------------------------
case(2012160101,2014061101) ! ATL H->tautau leplep boosted category
rel_corr_err(N,1,4,10)= 0.32D0
rel_corr_err(N,:,4,11)= 0.15D0
! rel_corr_err(N,2,4,13)= -0.12D0
rel_corr_err(N,:,4,15)= 0.12D0
case(2012160102,2014061102) ! ATL H->tautau leplep VBF category
rel_corr_err(N,1,4,10)= 0.08D0
rel_corr_err(N,:,4,11)= 0.15D0
rel_corr_err(N,:,4,13)= 0.12D0
! rel_corr_err(N,2,4,13)= -0.12D0
rel_corr_err(N,:,4,15)= 0.12D0
case(2012160103,2014061103) ! ATL H->tautau hadlep boosted category
rel_corr_err(N,1,4,10)= 0.32D0
rel_corr_err(N,:,4,11)= 0.15D0
rel_corr_err(N,:,4,12)= 0.04D0
! rel_corr_err(N,2,4,13)= -0.12D0
rel_corr_err(N,:,4,14)= 0.10D0
case(2012160104,2014061104) ! ATL H->tautau hadlep VBF category
rel_corr_err(N,1,4,10)= 0.08D0
rel_corr_err(N,:,4,11)= 0.15D0
rel_corr_err(N,:,4,12)= 0.04D0!
rel_corr_err(N,:,4,13)= 0.12D0
! rel_corr_err(N,2,4,13)= -0.12D0
rel_corr_err(N,:,4,14)= 0.10D0
case(2012160105,2014061105) ! ATL H->tautau hadhad boosted category
rel_corr_err(N,1,4,10)= 0.22D0
rel_corr_err(N,:,4,12)= 0.12D0
! rel_corr_err(N,2,4,13)= -0.12D0
rel_corr_err(N,:,4,16)= 0.07D0
case(2012160106,2014061106) ! ATL H->tautau hadhad VBF category
rel_corr_err(N,1,4,10)= 0.05D0
rel_corr_err(N,:,4,12)= 0.12D0
rel_corr_err(N,:,4,13)= 0.12D0
! rel_corr_err(N,2,4,13)= -0.12D0
rel_corr_err(N,:,4,16)= 0.07D0
!---NEW SUMMER 2014 results
case(7084101) ! ATLAS H->gaga central low-pT
rel_corr_err(N,1,1,17)= -0.10D0 ! n.b.: not official, guess of migration to VBF/VH(had) categories (>2jet)
rel_corr_err(N,1,1,19)= -0.05D0 ! n.b.: not official, guess of migration due to UE
rel_corr_err(N,1,1,21)= 0.24D0
rel_corr_err(N,1,1,27)= 0.001D0
rel_corr_err(N,2,1,27)= 0.029D0
rel_corr_err(N,3,1,27)= 0.001D0
rel_corr_err(N,4,1,27)= 0.001D0
rel_corr_err(N,5,1,27)= 0.04D0
rel_corr_err(N,3,1,28)= 0.001D0
rel_corr_err(N,4,1,28)= 0.002D0
rel_corr_err(N,5,1,28)= 0.002D0
rel_corr_err(N,:,1,29)= 0.075D0
rel_corr_err(N,:,1,30)= 0.026D0
rel_corr_err(N,:,1,31)= 0.049D0
rel_corr_err(N,:,1,32)= 0.026D0
rel_corr_err(N,:,1,33)= 0.023D0
rel_corr_err(N,:,1,34)= 0.010D0
rel_corr_err(N,2,1,37)= -0.50D0 ! n.B.: not official, trying migration between VBF categories
! rel_corr_err(N,1,1,39)= 0.15D0 ! n.B.: overall gg->H uncertainty in untagged categories
case(7084102) ! ATLAS H->gaga central high-pT
rel_corr_err(N,1,1,17)= -0.10D0 ! n.b.: not official, guess of migration to VBF/VH(had) categories (>2jet)
rel_corr_err(N,1,1,19)= -0.05D0 ! n.b.: not official, guess of migration due to UE
rel_corr_err(N,1,1,21)= -0.24D0
rel_corr_err(N,1,1,27)= 0.011D0
rel_corr_err(N,2,1,27)= 0.045D0
rel_corr_err(N,3,1,27)= 0.014D0
rel_corr_err(N,4,1,27)= 0.014D0
rel_corr_err(N,5,1,27)= 0.035D0
rel_corr_err(N,3,1,28)= 0.001D0
rel_corr_err(N,4,1,28)= 0.002D0
rel_corr_err(N,5,1,28)= 0.002D0
rel_corr_err(N,:,1,29)= 0.096D0
rel_corr_err(N,:,1,30)= 0.056D0
rel_corr_err(N,:,1,31)= 0.062D0
rel_corr_err(N,:,1,32)= 0.017D0
rel_corr_err(N,:,1,33)= 0.023D0
rel_corr_err(N,:,1,34)= 0.010D0
rel_corr_err(N,2,1,37)= -0.500D0 ! n.B.: not official, trying migration between VBF categories
! rel_corr_err(N,1,1,39)= 0.15D0 ! n.B.: overall gg->H uncertainty in untagged categories
case(7084103) ! ATLAS H->gaga forward low-pT
rel_corr_err(N,1,1,17)= -0.15D0 ! n.b.: not official, guess of migration to VBF/VH(had) categories (>2jet)
rel_corr_err(N,1,1,18)= -0.10D0 ! n.b.: not official, guess of migration to VBF categories (3jet)
rel_corr_err(N,1,1,19)= -0.05D0 ! n.b.: not official, guess of migration due to UE
rel_corr_err(N,1,1,22)= 0.24D0
rel_corr_err(N,1,1,27)= 0.001D0
rel_corr_err(N,2,1,27)= 0.029D0
rel_corr_err(N,3,1,27)= 0.001D0
rel_corr_err(N,4,1,27)= 0.001D0
rel_corr_err(N,5,1,27)= 0.04D0
rel_corr_err(N,3,1,28)= 0.001D0
rel_corr_err(N,4,1,28)= 0.002D0
rel_corr_err(N,5,1,28)= 0.002D0
rel_corr_err(N,:,1,29)= 0.099D0
rel_corr_err(N,:,1,30)= 0.013D0
rel_corr_err(N,:,1,31)= 0.060D0
rel_corr_err(N,:,1,32)= 0.021D0
rel_corr_err(N,:,1,33)= 0.023D0
rel_corr_err(N,:,1,34)= 0.010D0
rel_corr_err(N,2,1,37)= -0.300D0 ! n.B.: not official, trying migration between VBF categories
! rel_corr_err(N,1,1,39)= 0.15D0 ! n.B.: overall gg->H uncertainty in untagged categories
case(7084104) ! ATLAS H->gaga forward high-pT
rel_corr_err(N,1,1,17)= -0.15D0 ! n.b.: not official, guess of migration to VBF/VH(had) categories (>2jet)
rel_corr_err(N,1,1,18)= -0.10D0 ! n.b.: not official, guess of migration to VBF categories (3jet)
rel_corr_err(N,1,1,19)= -0.05D0 ! n.b.: not official, guess of migration due to UE
rel_corr_err(N,1,1,22)= -0.24D0
rel_corr_err(N,1,1,27)= 0.011D0
rel_corr_err(N,2,1,27)= 0.045D0
rel_corr_err(N,3,1,27)= 0.014D0
rel_corr_err(N,4,1,27)= 0.014D0
rel_corr_err(N,5,1,27)= 0.035D0
rel_corr_err(N,3,1,28)= 0.001D0
rel_corr_err(N,4,1,28)= 0.002D0
rel_corr_err(N,5,1,28)= 0.002D0
rel_corr_err(N,:,1,29)= 0.120D0
rel_corr_err(N,:,1,30)= 0.028D0
rel_corr_err(N,:,1,31)= 0.078D0
rel_corr_err(N,:,1,32)= 0.019D0
rel_corr_err(N,:,1,33)= 0.023D0
rel_corr_err(N,:,1,34)= 0.010D0
rel_corr_err(N,2,1,37)= -0.300D0 ! n.B.: not official, trying migration between VBF categories
! rel_corr_err(N,1,1,39)= 0.15D0 ! n.B.: overall gg->H uncertainty in untagged categories
case(7084105) ! ATLAS H->gaga VBF loose
rel_corr_err(N,1,1,17)= 0.20D0
rel_corr_err(N,1,1,18)= 0.25D0
rel_corr_err(N,1,1,19)= 0.06D0
rel_corr_err(N,1,1,23)= 0.089D0
rel_corr_err(N,1,1,24)= 0.048D0
rel_corr_err(N,1,1,27)= 0.120D0
rel_corr_err(N,2,1,27)= 0.044D0
rel_corr_err(N,3,1,27)= 0.130D0
rel_corr_err(N,4,1,27)= 0.130D0
rel_corr_err(N,5,1,27)= 0.076D0
rel_corr_err(N,3,1,28)= 0.001D0
rel_corr_err(N,4,1,28)= 0.002D0
rel_corr_err(N,5,1,28)= 0.010D0
rel_corr_err(N,:,1,29)= 0.094D0
rel_corr_err(N,:,1,30)= 0.026D0
rel_corr_err(N,:,1,31)= 0.060D0
rel_corr_err(N,:,1,32)= 0.021D0
rel_corr_err(N,:,1,33)= 0.023D0
rel_corr_err(N,:,1,34)= 0.010D0
rel_corr_err(N,2,1,36)= 0.500D0 ! n.B.: not official, add theory error for VBF
rel_corr_err(N,2,1,37)= 0.250D0 ! n.B.: not official, trying migration between VBF categories
case(7084106) ! ATLAS H->gaga VBF tight
rel_corr_err(N,1,1,17)= 0.20D0
rel_corr_err(N,1,1,18)= 0.52D0
rel_corr_err(N,1,1,19)= 0.06D0
rel_corr_err(N,1,1,23)= 0.112D0
rel_corr_err(N,1,1,24)= 0.066D0
rel_corr_err(N,1,1,27)= 0.130D0
rel_corr_err(N,2,1,27)= 0.091D0
rel_corr_err(N,3,1,27)= 0.170D0
rel_corr_err(N,4,1,27)= 0.170D0
rel_corr_err(N,5,1,27)= 0.063D0
rel_corr_err(N,3,1,28)= 0.011D0
rel_corr_err(N,5,1,28)= 0.027D0
rel_corr_err(N,:,1,29)= 0.100D0
rel_corr_err(N,:,1,30)= 0.038D0
rel_corr_err(N,:,1,31)= 0.065D0
rel_corr_err(N,:,1,32)= 0.021D0
rel_corr_err(N,:,1,33)= 0.023D0
rel_corr_err(N,:,1,34)= 0.010D0
rel_corr_err(N,2,1,36)= 0.500D0 ! n.B.: not official, add theory error for VBF
rel_corr_err(N,2,1,37)= 0.250D0 ! n.B.: not official, trying migration between VBF categories
case(7084107) ! ATLAS H->gaga VH hadronic
rel_corr_err(N,1,1,17)= 0.20D0
rel_corr_err(N,1,1,27)= 0.028D0
rel_corr_err(N,2,1,27)= 0.041D0
rel_corr_err(N,3,1,27)= 0.025D0
rel_corr_err(N,4,1,27)= 0.025D0
rel_corr_err(N,5,1,27)= 0.095D0
rel_corr_err(N,4,1,28)= 0.001D0
rel_corr_err(N,5,1,28)= 0.007D0
rel_corr_err(N,:,1,29)= 0.110D0
rel_corr_err(N,:,1,30)= 0.040D0
rel_corr_err(N,:,1,31)= 0.072D0
rel_corr_err(N,:,1,32)= 0.016D0
rel_corr_err(N,:,1,33)= 0.038D0
rel_corr_err(N,:,1,34)= 0.041D0
rel_corr_err(N,1,1,35)= -0.15D0 ! n.b.: not official, guess of migration due to b-tagging uncertainty
rel_corr_err(N,3,1,38)= 0.50D0 !n.b.: not official, added theory error on VH
rel_corr_err(N,4,1,38)= 0.50D0 !n.b.: not official, added theory error on VH
case(7084108) ! ATLAS H->gaga VH ETmiss
rel_corr_err(N,1,1,27)= 0.026D0
rel_corr_err(N,2,1,27)= 0.090D0
rel_corr_err(N,3,1,27)= 0.002D0
rel_corr_err(N,4,1,27)= 0.002D0
rel_corr_err(N,5,1,27)= 0.012D0
rel_corr_err(N,1,1,28)= -0.35D0
rel_corr_err(N,2,1,28)= -0.35D0
rel_corr_err(N,3,1,28)= -0.013D0
rel_corr_err(N,4,1,28)= -0.009D0
rel_corr_err(N,5,1,28)= -0.011D0
rel_corr_err(N,:,1,29)= 0.110D0
rel_corr_err(N,:,1,30)= 0.036D0
rel_corr_err(N,:,1,31)= 0.074D0
rel_corr_err(N,:,1,32)= 0.017D0
rel_corr_err(N,:,1,33)= 0.038D0
rel_corr_err(N,:,1,34)= 0.041D0
rel_corr_err(N,3,1,38)= 0.50D0 !n.b.: not official, added theory error on VH
rel_corr_err(N,4,1,38)= 0.50D0 !n.b.: not official, added theory error on VH
case(7084109) ! ATLAS H->gaga VH one-lepton
rel_corr_err(N,1,1,27)= 0.049D0
rel_corr_err(N,2,1,27)= 0.062D0
rel_corr_err(N,3,1,27)= 0.005D0
rel_corr_err(N,4,1,27)= 0.005D0
rel_corr_err(N,5,1,27)= 0.028D0
rel_corr_err(N,1,1,28)= 0.045D0
rel_corr_err(N,2,1,28)= 0.045D0
rel_corr_err(N,3,1,28)= 0.004D0
rel_corr_err(N,4,1,28)= 0.040D0
rel_corr_err(N,5,1,28)= 0.006D0
rel_corr_err(N,:,1,29)= 0.098D0
rel_corr_err(N,:,1,30)= 0.028D0
rel_corr_err(N,:,1,31)= 0.063D0
rel_corr_err(N,:,1,32)= 0.021D0
rel_corr_err(N,:,1,33)= 0.038D0
rel_corr_err(N,:,1,34)= 0.041D0
rel_corr_err(N,3,1,35)= -0.05D0 ! n.b.: not official, guess of migration due to b-tagging uncertainty
rel_corr_err(N,3,1,38)= 0.50D0 !n.b.: not official, added theory error on VH
rel_corr_err(N,4,1,38)= 0.50D0 !n.b.: not official, added theory error on VH
case(7084110) ! ATLAS H->gaga ttH hadronic
rel_corr_err(N,1,1,19)= 0.60D0
rel_corr_err(N,5,1,20)= 0.11D0
rel_corr_err(N,1,1,25)= 0.50D0
rel_corr_err(N,1,1,26)= 1.00D0
rel_corr_err(N,1,2,26)= 1.00D0
rel_corr_err(N,1,3,26)= 1.00D0
rel_corr_err(N,1,1,27)= 0.11D0
rel_corr_err(N,2,1,27)= 0.21D0
rel_corr_err(N,3,1,27)= 0.22D0
rel_corr_err(N,4,1,27)= 0.22D0
rel_corr_err(N,5,1,27)= 0.073D0
rel_corr_err(N,:,1,29)= 0.096D0
rel_corr_err(N,:,1,30)= 0.036D0
rel_corr_err(N,:,1,31)= 0.063D0
rel_corr_err(N,:,1,32)= 0.019D0
rel_corr_err(N,:,1,33)= 0.038D0
rel_corr_err(N,:,1,34)= 0.041D0
rel_corr_err(N,1,1,35)= 0.30D0
case(7084111) ! ATLAS H->gaga ttH leptonic
rel_corr_err(N,5,1,20)= 0.03D0
rel_corr_err(N,1,1,25)= 0.50D0
rel_corr_err(N,1,1,26)= 1.00D0
rel_corr_err(N,1,2,26)= 1.00D0
rel_corr_err(N,1,3,26)= 1.00D0
rel_corr_err(N,1,1,27)= 0.37D0
rel_corr_err(N,2,1,27)= 0.077D0
rel_corr_err(N,3,1,27)= 0.074D0
rel_corr_err(N,4,1,27)= 0.074D0
rel_corr_err(N,5,1,27)= 0.005D0
rel_corr_err(N,1,1,28)= 0.019D0
rel_corr_err(N,2,1,28)= 0.019D0
rel_corr_err(N,3,1,28)= 0.010D0
rel_corr_err(N,4,1,28)= 0.030D0
rel_corr_err(N,5,1,28)= 0.001D0
rel_corr_err(N,:,1,29)= 0.095D0
rel_corr_err(N,:,1,30)= 0.034D0
rel_corr_err(N,:,1,31)= 0.062D0
rel_corr_err(N,:,1,32)= 0.021D0
rel_corr_err(N,:,1,33)= 0.038D0
rel_corr_err(N,:,1,34)= 0.041D0
rel_corr_err(N,3,1,35)= 0.07D0
! LHC 13 TeV results
! CMS H-gaga, CMS-16-020:
! 51: UE and parton shower, jet energy scale/smearing: VBF-VBF Tag migration, 7% and 4-15%, respectively.
! 52: UE and parton shower, jet energy scale/smearing: VBF-untagged Tag migration, 9% and 4-15%, respectively.
! 53: Event migration untagged 0-1
! 54: Event migration untagged 1-2
! 55: Event migration untagged 2-3
! n.b: QCD scale uncertainty and energy scale/resolution, all categories, ~5-10% and ~6%, respectively. -> makes fit worse!
! 56: ggF contamination in VBF, ttH categories, ~39%
! 57: ggF contamination: VBF-VBF Tag migration, ~10%
case(1602011) ! untagged 0
! rel_corr_err(N,1,1,52)= -0.24D0
rel_corr_err(N,2,1,52)= +0.10D0
! rel_corr_err(N,:,1,53)= +0.10D0
rel_corr_err(N,:,1,53)= +0.10D0
case(1602012) ! untagged 1
! rel_corr_err(N,1,1,52)= -0.24D0
rel_corr_err(N,2,1,52)= +0.05D0
! rel_corr_err(N,:,1,53)= +0.10D0
rel_corr_err(N,:,1,53)= -0.10D0
rel_corr_err(N,:,1,54)= +0.10D0
case(1602013) ! untagged 2
! rel_corr_err(N,1,1,52)= -0.24D0
rel_corr_err(N,2,1,52)= +0.05D0
! rel_corr_err(N,:,1,53)= +0.10D0
rel_corr_err(N,:,1,54)= -0.10D0
rel_corr_err(N,:,1,55)= +0.10D0
case(1602014) ! untagged 3
! rel_corr_err(N,1,1,52)= -0.24D0
rel_corr_err(N,2,1,52)= +0.05D0
! rel_corr_err(N,:,1,53)= +0.10D0
rel_corr_err(N,:,1,55)= -0.10D0
case(1602015) ! VBF tag 0
rel_corr_err(N,:,1,51)= +0.10D0
! rel_corr_err(N,2,1,51)= -0.22D0
rel_corr_err(N,2,1,52)= -0.10D0
! rel_corr_err(N,2,1,52)= -0.24D0
! rel_corr_err(N,:,1,53)= +0.10D0
rel_corr_err(N,1,1,56)= +0.39D0
rel_corr_err(N,1,1,57)= +0.10D0
case(1602016) ! VBF tag 1
rel_corr_err(N,:,1,51)= -0.10D0
! rel_corr_err(N,2,1,51)= +0.22D0
! rel_corr_err(N,1,1,52)= +0.24D0
rel_corr_err(N,:,1,52)= -0.15D0
! rel_corr_err(N,:,1,53)= +0.10D0
rel_corr_err(N,1,1,56)= +0.39D0
rel_corr_err(N,1,1,57)= -0.10D0
case(1602017) ! TTH tag hadr
! rel_corr_err(N,:,1,53)= +0.10D0
rel_corr_err(N,1,1,56)= +0.39D0
case(1602018) ! TTH tag lept
! rel_corr_err(N,:,1,53)= +0.10D0
rel_corr_err(N,1,1,56)= +0.39D0
case default
end select
end subroutine fill_rel_corr_err
!------------------------------------------------
subroutine get_expt_syst_corr_for_peaks(value, peak1, mu1, peak2, mu2, model)
!------------------------------------------------
use usefulbits_hs, only : mupeak, print_dble_matrix
implicit none
type(mupeak), intent(in) :: peak1, peak2
integer, intent(in) :: model
double precision, intent(in) :: mu1, mu2 ! observed mu
double precision, intent(out) :: value
integer :: id1, p1, d1, id2, p2, d2
integer :: i,j,k
call fill_rel_corr_err(peak1%id,1)
call fill_rel_corr_err(peak2%id,2)
! if(peak1%id.eq.13001105.and.peak2%id.eq.13001106) then
! write(*,*)'#-------------- ',peak1%id,' --------------#'
! do k=1,Nprod
! write(*,*) rel_corr_err(1,k,1,:)
! enddo
! write(*,*)'#-------------- ',peak2%id,' --------------#'
! do k=1,Nprod
! write(*,*) rel_corr_err(2,k,1,:)
! enddo
! endif
value = 0.0D0
do i=lbound(peak1%channel_p_id,dim=1),ubound(peak1%channel_p_id,dim=1)
do j=lbound(peak2%channel_p_id,dim=1),ubound(peak2%channel_p_id,dim=1)
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(peak1%id.eq.13001105.and.peak2%id.eq.13001106) then
! write(*,*) id1, p1, d1, id2, p2, d2
! write(*,*) value
! endif
do k=1,Nsyst
if(model.eq.1) then
if(scaletype(k).eq.1) then
value = value + &
& peak1%channel_w_model(i)*rel_corr_err(1,p1,d1,k)*peak1%total_mu* &
& peak2%channel_w_model(j)*rel_corr_err(2,p2,d2,k)*peak2%total_mu
elseif(scaletype(k).eq.0) then
value = value + &
& peak1%channel_w(i)*rel_corr_err(1,p1,d1,k)*mu1* &
& peak2%channel_w(j)*rel_corr_err(2,p2,d2,k)*mu2
else
write(*,*) "WARNING in get_expt_syst_corr_for peaks: Unknown scaletype of ",k
endif
else
value = value + &
& peak1%channel_w(i)*rel_corr_err(1,p1,d1,k)*mu1* &
& peak2%channel_w(j)*rel_corr_err(2,p2,d2,k)*mu2
endif
enddo
enddo
enddo
! if(abs(value).ge.0.0000001D0) then
! write(*,*) "Non-zero correlated systematics:", peak1%id, peak2%id, mu1, mu2, value
! write(*,*) "1st weights: ",peak1%channel_w_model
! do k=1,Nprod
! write(*,*) rel_corr_err(1,k,1,:)
! enddo
! write(*,*) "2nd weights: ",peak2%channel_w_model
! do k=1,Nprod
! write(*,*) rel_corr_err(2,k,1,:)
! enddo
!
! if(peak1%id.eq.13001105.and.peak2%id.eq.13001105) write(22,*) value
! if(peak1%id.eq.13001106.and.peak2%id.eq.13001106) write(23,*) value, peak1%channel_w_model(1)*mu1
! if(peak1%id.eq.12015103.and.peak2%id.eq.12015103) write(24,*) value, peak1%channel_w_model(1)*mu1
! if(peak1%id.eq.13001105.and.peak2%id.eq.13001106) write(25,*) value
! if(peak1%id.eq.12015103.and.peak2%id.eq.13001106) write(26,*) value
end subroutine get_expt_syst_corr_for_peaks
!------------------------------------------------
end module
\ No newline at end of file
Index: trunk/HiggsSignals-2/Expt_tables/LHC13-2.3.0-dev/ATL_VH_Vbb_0lep_13TeV_79.8fb-1_125GeV_1808082381.txt
===================================================================
--- trunk/HiggsSignals-2/Expt_tables/LHC13-2.3.0-dev/ATL_VH_Vbb_0lep_13TeV_79.8fb-1_125GeV_1808082381.txt (revision 0)
+++ trunk/HiggsSignals-2/Expt_tables/LHC13-2.3.0-dev/ATL_VH_Vbb_0lep_13TeV_79.8fb-1_125GeV_1808082381.txt (revision 582)
@@ -0,0 +1,13 @@
+# Data taken from Tab.2 and Tab. 11, arXiv:1808.08238
+1808082381 1808082381 1
+arXiv:1808.08238
+LHC, ATL, ATL
+(pp)->Vh,h->bb (0-lepton)
+13 79.8 0.02
+1 0
+15
+125 125 1.0
+3 125
+3.5 10.5 11.5
+1 8.90035 16.4011
+125.0 0.72 1.04 1.38
Index: trunk/HiggsSignals-2/Expt_tables/LHC13-2.3.0-dev/ATL_VH_Vbb_1lep_13TeV_79.8fb-1_125GeV_1808082382.txt
===================================================================
--- trunk/HiggsSignals-2/Expt_tables/LHC13-2.3.0-dev/ATL_VH_Vbb_1lep_13TeV_79.8fb-1_125GeV_1808082382.txt (revision 0)
+++ trunk/HiggsSignals-2/Expt_tables/LHC13-2.3.0-dev/ATL_VH_Vbb_1lep_13TeV_79.8fb-1_125GeV_1808082382.txt (revision 582)
@@ -0,0 +1,13 @@
+# Data taken from Tab.2 and Tab. 11, arXiv:1808.08238
+1808082382 1808082382 1
+arXiv:1808.08238
+LHC, ATL, ATL
+(pp)->Vh,h->bb (1-lepton)
+13 79.8 0.02
+1 0
+15
+125 125 1.0
+3 125
+3.5 10.5 11.5
+1 0.0315 0.063
+125.0 0.67 1.09 1.55
Index: trunk/HiggsSignals-2/Expt_tables/LHC13-2.3.0-dev/ATL_VH_Vbb_2lep_13TeV_79.8fb-1_125GeV_1808082383.txt
===================================================================
--- trunk/HiggsSignals-2/Expt_tables/LHC13-2.3.0-dev/ATL_VH_Vbb_2lep_13TeV_79.8fb-1_125GeV_1808082383.txt (revision 0)
+++ trunk/HiggsSignals-2/Expt_tables/LHC13-2.3.0-dev/ATL_VH_Vbb_2lep_13TeV_79.8fb-1_125GeV_1808082383.txt (revision 582)
@@ -0,0 +1,13 @@
+# Data taken from Tab.2 and Tab. 11, arXiv:1808.08238
+1808082383 1808082383 1
+arXiv:1808.08238
+LHC, ATL, ATL
+(pp)->Vh,h->bb (2-lepton)
+13 79.8 0.02
+1 0
+15
+125 125 1.0
+2 125
+10.5 11.5
+1 2.25
+125.0 0.96 1.38 1.84
Index: trunk/HiggsSignals-2/usefulbits_HS.f90
===================================================================
--- trunk/HiggsSignals-2/usefulbits_HS.f90 (revision 581)
+++ trunk/HiggsSignals-2/usefulbits_HS.f90 (revision 582)
@@ -1,553 +1,553 @@
!--------------------------------------------------------------------
! This file is part of HiggsSignals (TS 03/03/2013)
!--------------------------------------------------------------------
module usefulbits_HS
!--------------------------------------------------------------------
implicit none
- character(LEN=9),parameter :: HSvers='2.2.0beta'
+ character(LEN=9),parameter :: HSvers='2.2.1beta'
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 = .True.
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
! 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
! 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 /)
! double precision :: dBR_SM(5) = (/ 0.054D0, 0.048D0, 0.048D0, 0.061D0, 0.028D0 /)
! double precision :: dBR(5) = (/ 0.054D0, 0.048D0, 0.048D0, 0.061D0, 0.028D0 /)
!- 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
!- HiggsBounds
You can download the latest beta version of HiggsBounds-5 here (HiggsBounds-5.2.0beta.tar.gz). Important changes in the input framework for HiggsBounds-5 are documented here (draft version). The last full HiggsBounds version (4.3.1) is found here: HiggsBounds-4.3.1.tar.gz . HiggsBounds is using Fortran 90/2003. As always, please contact us if you have any problems with the installation. ( show history )
Further information can be found in the following references:
In particular, consult the latest version of the HiggsBounds 4.x.x manual. We are currently working on an updated HiggsBounds 5 manual!
If you download the code, we recommend that you sign up to the HiggsBounds-announce mailing list, in order to be informed when new releases are available.
If you have any questions, comments, bug reports or feature requests please let us know. Contact Tim.
If you use HiggsBounds, please cite the references listed above.
HiggsBounds incorporates many results from experimental searches and SM calculations. To make it quicker for users to access these references, we provide a list as a .bib file and a .bbl file. (This example .tex file cites each of these sources once, creating this .pdf file).
.tar.gz
file cd
to the HiggsBounds directory./configure
make
HiggsBounds
using the command-line options
./HiggsBounds whichanalyses whichinput nHzero nHplus prefixFor example,
./HiggsBounds LandH effC 3 1 'example_data/mhmodplus/mhmod+_'will run
HiggsBounds
whichanalyses=LandH
)whichinput=effC
) nHzero=3
) nHplus=1
) example_data/mhmodplus/mhmod+_MH_GammaTot.dat example_data/mhmodplus/mhmod+_MHall_uncertainties.dat example_data/mhmodplus/mhmod+_MHplus_GammaTot.dat example_data/mhmodplus/mhmod+_effC.dat example_data/mhmodplus/mhmod+_BR_H_NP.dat example_data/mhmodplus/mhmod+_BR_t.dat example_data/mhmodplus/mhmod+_BR_Hplus.dat example_data/mhmodplus/mhmod+_LEP_HpHm_CS_ratios.dat example_data/mhmodplus/mhmod+_additional.dat
example_data/mhmodplus/mhmod+_HiggsBounds_results.dat
For the model-independent LEP Higgs searches the full information on CLs and CLsb have been made available to the HiggsBounds team, such that we can derive a chi-squared measure (assuming the Gaussian limit) for the LEP exclusion. For more information, see the HiggsBounds 4.x.x manual.
In order to enable the LEP chi-squared extension, please download csboutput_trans_binary.tar.gz, which contains the necessary experimental tables, and follow the descriptions in the HiggsBounds manual.
Note that the LEP chi-squared extension is only supported for the usage of HiggsBounds via the Fortran subroutines/library.
-You can download the beta version of HiggsSignals-2 here (HiggsSignals-2.2.0beta.tar.gz). HiggsSignals is using Fortran 90/2003. HiggsSignals-2 needs to be linked to the HiggsBounds version 5 library. The latest stable HiggsSignals version (1.4.0) can be found here: HiggsSignals-1.4.0.tar.gz . As always, please contact us if you have any problems with the installation. ( show history ) +You can download the beta version of HiggsSignals-2 here (HiggsSignals-2.2.1beta.tar.gz). HiggsSignals is using Fortran 90/2003. HiggsSignals-2 needs to be linked to the HiggsBounds version 5 library. The latest stable HiggsSignals version (1.4.0) can be found here: HiggsSignals-1.4.0.tar.gz . As always, please contact us if you have any problems with the installation. ( show history )
The program is documented in:
We are currently working on an updated HiggsSignals 2 manual!
Please consult the latest version of the HiggsSignals 1.x.x manual. Further information on the program and related issues can be found in
Announcements about HiggsSignals will also be given to the HiggsBounds-announce mailing list.
If you have any questions, comments, bug reports or feature requests please let us know. Contact Tim.
If you use HiggsSignals, please cite the HiggsSignals as well as HiggsBounds references listed above. Furthermore, please do not forget to include citations to the experimental measurements, which are used as observables in your project.
.tar.gz
file cd
to the HiggsSignals directoryconfigure
for the correct link to the HiggsBounds library and compiler settings../run_tests.bat
. (Note: The script uses gnuplot to create results from test runs.)
HiggsBounds and HiggsSignalsHiggsBounds (last release: 15 August 2018)(P. Bechtle, D. Dercks, S. Heinemeyer, T. Klingl, T. Stefaniak, G. Weiglein, former members: O. Brein, O. Stål, K. Williams)HiggsBounds takes a selection of Higgs sector predictions for any particular model as input and then uses the experimental topological cross section limits from Higgs searches at LEP, the Tevatron and the LHC to determine if this parameter point has been excluded at 95% C.L.. A beta version of HiggsBounds-5 is available which includes the LHC 13 TeV results. The "beta" indicates that some features are still being developed and a complete documentation is still missing. More information on the download page. Further information can be found in the following references:
In particular, consult the latest version of the HiggsBounds 4.x.x manual. |
The HiggsBounds source files can be obtained from our download page.
You can also quickly run HiggsBounds via our online version (see below).
If you have any questions or comments, contact Tim.
HiggsSignals performs a statistical test of the Higgs sector predictions of arbitrary models (using the HiggsBounds input routines) with the measurements of Higgs boson signal rates and masses from the Tevatron and the LHC.
A beta version of HiggsSignals-2 is available which includes the LHC 13 TeV results. The "beta" indicates that some features are still being developed and a complete documentation is still missing. More information on the download page.
The program is documented in:
The latest version of the user manual can be found here: HiggsSignals 1.x.x manual. Further information on the program and related issues can be found in
The HiggsSignals source files can be obtained from our download page.
If you have any questions or comments, contact Tim or Daniel.
To recieve emails announcing new releases of HiggsBounds and HiggsSignals, we recommend to subscribe to the HiggsBounds-announce mailing list.
Start with Step 1 if you'd like to test a general model or skip most of the steps by using one of the examples below.
Examples
You can also access HiggsBounds results for mSUGRA and MSSM-7+ scenarios (and many supersymmetric dark matter calculations) via DarkSUSY online.
Index: trunk/testsuite/ZH_implementation/test_HS.f90 =================================================================== --- trunk/testsuite/ZH_implementation/test_HS.f90 (revision 0) +++ trunk/testsuite/ZH_implementation/test_HS.f90 (revision 582) @@ -0,0 +1,91 @@ +program test_HS + use theory_colliderSfunctions + use STXS + implicit none + + double precision :: SMBR_HZZ, SMBR_Htoptop, SMBR_Hbb, SMGamma_h + + double precision :: SMGammaTotal, Mh, GammaTotal, BR_hjbb + double precision :: ghjZZ, ghjtt_s, ghjtt_p, ghjbb_s, ghjbb_p + double precision :: Chisq_STXS_rates, Chisq_STXS_mh, Chisq_STXS, Pvalue_STXS + integer :: nobs_STXS, nobs_peak, i,j + double precision :: ZH_rate_ggqq, ZH_rate_incl, ZH_rate_gg, ZH_rate_qq + double precision :: Chisq_peak_mu, Chisq_peak_mh, Chisq_peak, Pvalue_peak + + + call initialize_HiggsSignals(1,0,"LHC13-2.3.0-dev") + +! call load_STXS("LHC13") + +! do j = 1,3 + do i = 1, 81 + + Mh = 125.09D0 + + ghjZZ = 0.80D0 + (i-1)*0.005D0 + ghjtt_s = 1.0D0 + ghjtt_p = 0.0D0 + ghjbb_s = 1.0D0 + ghjbb_p = 0.0D0 + +! ghjZZ = 0.80D0 + (j-1)*0.2D0 +! ghjtt_s = 1.0D0 - (i-1)*0.1D0 +! ghjtt_p = sqrt(1.0D0 - ghjtt_s**2.0D0) +! ghjbb_s = 1.0D0 - (i-1)*0.1D0 +! ghjbb_p = sqrt(1.0D0 - ghjbb_s**2.0D0) + + SMGammaTotal = SMGamma_h(Mh) + + GammaTotal = SMGammaTotal * (1 + (ghjZZ**2.0 - 1)*SMBR_HZZ(Mh) + & + & (ghjtt_s**2.0 + ghjtt_p**2.0 - 1)*SMBR_Htoptop(Mh) + & + & (ghjbb_s**2.0 + ghjbb_p**2.0 - 1)*SMBR_Hbb(Mh) ) + + BR_hjbb = SMBR_Hbb(125.0D0) + + + call HiggsBounds_neutral_input_properties(Mh,GammaTotal) + +! call HiggsBounds_neutral_input_effC( & +! & 1.0D0,0.0D0,1.0D0,0.0D0, & +! & ghjbb_s,ghjbb_p,ghjtt_s,ghjtt_p, & +! & 1.0D0,0.0D0, & +! & 1.0D0,0.0D0, & +! & 1.0D0,ghjZZ,1.0D0, & +! & 1.0D0,1.0D0, 0.0D0) + +call HiggsBounds_neutral_input_SMBR(0.0D0,0.0D0,BR_hjbb, & + & 0.0D0,0.0D0, & + & 0.0D0,0.0D0, & + & 0.0D0,0.0D0,0.0D0, & + & 0.0D0) + +call HiggsBounds_neutral_input_hadr_single(13,"XS_hjZ_ratio",ghjZZ) +call HiggsBounds_neutral_input_hadr_single(13,"XS_qq_hjZ_ratio",ghjZZ) +call HiggsBounds_neutral_input_hadr_single(13,"XS_gg_hjZ_ratio",ghjZZ) +call HiggsBounds_neutral_input_hadr_single(13,"XS_hjW_ratio",ghjZZ) + + +! call run_HiggsSignals_STXS(Chisq_STXS_rates, Chisq_STXS_mh, Chisq_STXS, nobs_STXS, Pvalue_STXS) + + + call run_HiggsSignals( 1, Chisq_peak_mu, Chisq_peak_mh, Chisq_peak, nobs_peak, Pvalue_peak) + +! write(*,*) Chisq_STXS_rates, Chisq_STXS_mh, Chisq_STXS, nobs_STXS, Pvalue_STXS + + call get_rates_str(1,4,2,(/"10.0","11.0"/),ZH_rate_ggqq) + + call get_rates_str(1,4,1,(/"4.0"/),ZH_rate_incl) + + call get_rates_str(1,4,1,(/"11.0"/),ZH_rate_gg) + + call get_rates_str(1,4,1,(/"10.0"/),ZH_rate_qq) + +! write(*,*) ghjZZ, ghjtt_s, ghjtt_p, ghjbb_s, ghjbb_p, ZH_rate_ggqq, ZH_rate_incl, ZH_rate_gg, ZH_rate_qq, Chisq_STXS_rates + write(*,*) ghjZZ, ghjtt_s, ghjtt_p, ghjbb_s, ghjbb_p, ZH_rate_ggqq, ZH_rate_incl, ZH_rate_gg, ZH_rate_qq, Chisq_peak_mu + + enddo +! enddo + + call finish_HiggsSignals + +end program test_HS \ No newline at end of file Index: trunk/testsuite/ZH_implementation/makefile =================================================================== --- trunk/testsuite/ZH_implementation/makefile (revision 0) +++ trunk/testsuite/ZH_implementation/makefile (revision 582) @@ -0,0 +1,16 @@ +F90C = gfortran +F90FLAGS = -fbounds-check -ffixed-line-length-none + +HBLIBS = -L../../HiggsBounds-5/ -lHB +HBINCLUDE = -I../../HiggsBounds-5/ + +HSLIBS = -L../../HiggsSignals-2/ -lHS +HSINCLUDE = -I../../HiggsSignals-2/ + + + +test_ZH: + $(F90C) $(F90FLAGS) $(HBINCLUDE) test_ZH.f90 -o test_ZH $(HBLIBS) + +test_HS: + $(F90C) $(F90FLAGS) $(HBINCLUDE) $(HSINCLUDE) test_HS.f90 -o test_HS $(HBLIBS) $(HSLIBS) Index: trunk/testsuite/ZH_implementation/test_ZH.f90 =================================================================== --- trunk/testsuite/ZH_implementation/test_ZH.f90 (revision 0) +++ trunk/testsuite/ZH_implementation/test_ZH.f90 (revision 582) @@ -0,0 +1,69 @@ +program test_ZH + + use theory_XS_SM_functions + implicit none + + integer :: i + double precision :: ghz,ght,ghb,gat,gab,mh,nnlo_sum,nnlo_incl + + call initialize_HiggsBounds(1,0,'LandH') + + ghz = 0.0D0 + ght = 0.0D0 + ghb = 0.0D0 + gat = 0.0D0 + gab = 10.0D0 + +! write(*,*) "Mass NNLO,incl. k(NNLO/NLO,incl) NNLO(gg,qq,bb) k(NNLO/NLO,gg,qq,bb) ",& +! & "k(NNLO/NLO,gg) k(NNLO/NLO,qq) k(NNLO/NLO,bb)" + +! write(*,*) "Tevatron" +! do i = 1,10 +! mh = 10.0D0 + (i-1)*25.0D0 +! nnlo_sum = ZH_cpmix_nnlo_ggqqbb(mh,'TEV ',ghz,ght,ghb,gat,gab) +! nnlo_incl = ZH_cpmix_nnlo(mh,'TEV ',ghz,ght,ghb,gat,gab) +! write(*,*) mh, nnlo_sum, nnlo_sum/nnlo_incl, XS_tev_HZ_SM(mh) +! enddo + + +! write(*,*) "LHC7" +! do i = 1,10 +! mh = 10.0D0 + (i-1)*25.0D0 +! nnlo_sum = ZH_cpmix_nnlo_ggqqbb(mh,'LHC7 ',ghz,ght,ghb,gat,gab) +! nnlo_incl = ZH_cpmix_nnlo(mh,'LHC7 ',ghz,ght,ghb,gat,gab) +! write(*,*) mh, nnlo_sum, nnlo_sum/nnlo_incl, XS_lhc7_HZ_SM(mh,.True.,.False.), XS_lhc7_HZ_SM(mh,.True.,.True.) +! enddo + +! write(*,*) "LHC8" +! do i = 1,10 +! mh = 10.0D0 + (i-1)*25.0D0 +! nnlo_sum = ZH_cpmix_nnlo_ggqqbb(mh,'LHC8 ',ghz,ght,ghb,gat,gab) +! nnlo_incl = ZH_cpmix_nnlo(mh,'LHC8 ',ghz,ght,ghb,gat,gab) +! write(*,*) mh, nnlo_sum, nnlo_sum/nnlo_incl, XS_lhc8_HZ_SM(mh,.True.,.False.), XS_lhc8_HZ_SM(mh,.True.,.True.) +! enddo + + write(*,*) "LHC13" + do i = 1,10 + mh = 10.0D0 + (i-1)*25.0D0 + nnlo_sum = ZH_cpmix_nnlo_ggqqbb(mh,'LHC13',ghz,ght,ghb,gat,gab) + nnlo_incl = ZH_cpmix_nnlo(mh,'LHC13',ghz,ght,ghb,gat,gab) + write(*,*) mh, nnlo_sum, nnlo_sum/nnlo_incl, XS_lhc13_HZ_SM(mh,.True.,.False.), XS_lhc13_HZ_SM(mh,.True.,.True.),& + & ZH_cpmix_nnlo_gg(mh,'LHC13',ghz,ght,ghb,gat,gab), ZH_cpmix_nnlo_bb(mh,'LHC13',ghb,gab) + enddo + +! write(*,*) "Tevatron WH" +! do i = 1,10 +! mh = 10.0D0 + (i-1)*25.0D0 +! write(*,*) mh, WH_nnlo(mh,'TEV ',ghz,ght,ghb), WH_nnlo_SM(mh,'TEV '), XS_tev_HW_SM(mh,.True.) +! enddo +! +! write(*,*) "LHC 13" +! do i = 1,10 +! mh = 10.0D0 + (i-1)*25.0D0 +! write(*,*) mh, WH_nnlo(mh,'LHC13',ghz,ght,ghb), WH_nnlo_SM(mh,'LHC13'), XS_lhc13_HW_SM(mh,.True.,.False.) +! enddo + + +! '(11F12.5)' + call finish_HiggsBounds +end program test_ZH \ No newline at end of file