本文整理汇总了Python中HiggsAnalysis.CombinedLimit.SMHiggsBuilder.SMHiggsBuilder.makeBR方法的典型用法代码示例。如果您正苦于以下问题:Python SMHiggsBuilder.makeBR方法的具体用法?Python SMHiggsBuilder.makeBR怎么用?Python SMHiggsBuilder.makeBR使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HiggsAnalysis.CombinedLimit.SMHiggsBuilder.SMHiggsBuilder
的用法示例。
在下文中一共展示了SMHiggsBuilder.makeBR方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: RwzHiggs
# 需要导入模块: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder import SMHiggsBuilder [as 别名]
# 或者: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder.SMHiggsBuilder import makeBR [as 别名]
class RwzHiggs(SMLikeHiggsModel):
"scale WW by mu and ZZ by cZW^2 * mu"
def __init__(self):
SMLikeHiggsModel.__init__(self) # not using 'super(x,self).__init__' since I don't understand it
self.floatMass = False
def setPhysicsOptions(self,physOptions):
for po in physOptions:
if po.startswith("higgsMassRange="):
self.floatMass = True
self.mHRange = po.replace("higgsMassRange=","").split(",")
print 'The Higgs mass range:', self.mHRange
if len(self.mHRange) != 2:
raise RuntimeError, "Higgs mass range definition requires two extrema."
elif float(self.mHRange[0]) >= float(self.mHRange[1]):
raise RuntimeError, "Extrema for Higgs mass range defined with inverterd order. Second must be larger the first."
def doParametersOfInterest(self):
"""Create POI out of signal strength and MH"""
# --- Signal Strength as only POI ---
self.modelBuilder.doVar("Rwz[1,0,10]")
if self.floatMass:
if self.modelBuilder.out.var("MH"):
self.modelBuilder.out.var("MH").setRange(float(self.mHRange[0]),float(self.mHRange[1]))
self.modelBuilder.out.var("MH").setConstant(False)
else:
self.modelBuilder.doVar("MH[%s,%s]" % (self.mHRange[0],self.mHRange[1]))
self.modelBuilder.doSet("POI",'Rwz,MH')
else:
if self.modelBuilder.out.var("MH"):
self.modelBuilder.out.var("MH").setVal(self.options.mass)
self.modelBuilder.out.var("MH").setConstant(True)
else:
self.modelBuilder.doVar("MH[%g]" % self.options.mass)
self.modelBuilder.doSet("POI",'Rwz')
self.SMH = SMHiggsBuilder(self.modelBuilder)
self.setup()
def setup(self):
for d in [ "hww", "hzz" ]:
self.SMH.makeBR(d)
self.modelBuilder.doVar("Rhzz[1,0,10]")
self.modelBuilder.factory_('expr::Rhww("@0*@1", Rhzz, Rwz)')
def getHiggsSignalYieldScale(self,production,decay,energy):
if decay not in ['hww', 'hzz']:
return 0
else:
return 'R%s' % decay
示例2: FermiophobicHiggs
# 需要导入模块: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder import SMHiggsBuilder [as 别名]
# 或者: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder.SMHiggsBuilder import makeBR [as 别名]
class FermiophobicHiggs(SMLikeHiggsModel):
"assume the SM coupling but let the Higgs mass to float"
def __init__(self):
SMLikeHiggsModel.__init__(self) # not using 'super(x,self).__init__' since I don't understand it
self.mHRange = ['115','135'] # default
def setPhysicsOptions(self,physOptions):
for po in physOptions:
if po.startswith("higgsMassRange="):
self.mHRange = po.replace("higgsMassRange=","").split(",")
print 'The Higgs mass range:', self.mHRange
if len(self.mHRange) != 2:
raise RuntimeError, "Higgs mass range definition requires two extrema"
elif float(self.mHRange[0]) >= float(self.mHRange[1]):
raise RuntimeError, "Extrama for Higgs mass range defined with inverterd order. Second must be larger the first"
def doParametersOfInterest(self):
"""Create POI out of signal strength and MH"""
# --- Signal Strength as only POI ---
self.modelBuilder.doVar("r[1,0,20]")
if self.modelBuilder.out.var("MH"):
self.modelBuilder.out.var("MH").setRange(float(self.mHRange[0]),float(self.mHRange[1]))
self.modelBuilder.out.var("MH").setConstant(False)
else:
self.modelBuilder.doVar("MH[%s,%s]" % (self.mHRange[0],self.mHRange[1]))
self.modelBuilder.doSet("POI",'r,MH')
self.SMH = SMHiggsBuilder(self.modelBuilder)
self.setup()
def setup(self):
## Add FP BRs
datadir = os.environ['CMSSW_BASE']+'/src/HiggsAnalysis/CombinedLimit/data/lhc-hxswg'
self.SMH.textToSpline( 'FP_BR_hww', os.path.join(datadir, 'fp/BR.txt'), ycol=4 );
self.SMH.textToSpline( 'FP_BR_hzz', os.path.join(datadir, 'fp/BR.txt'), ycol=5 );
self.SMH.textToSpline( 'FP_BR_hgg', os.path.join(datadir, 'fp/BR.txt'), ycol=2 );
self.SMH.textToSpline( 'FP_BR_hzg', os.path.join(datadir, 'fp/BR.txt'), ycol=3 );
for decay in ['hww','hzz','hgg','hzg']:
self.SMH.makeBR(decay)
self.modelBuilder.factory_('expr::FP_BRScal_%s("@0*@1/@2",r,FP_BR_%s,SM_BR_%s)'%(decay,decay,decay))
self.modelBuilder.out.Print()
def getHiggsSignalYieldScale(self,production,decay,energy):
if production not in ['VH', 'WH', 'ZH', 'qqH']:
return 0
if decay not in ['hww','hzz','hgg','hzg']:
return 0
return 'FP_BRScal_%s' % decay
示例3: Higgswidth
# 需要导入模块: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder import SMHiggsBuilder [as 别名]
# 或者: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder.SMHiggsBuilder import makeBR [as 别名]
#.........这里部分代码省略.........
self.modelBuilder.doVar("kV[1.,0.,8.]")
#self.modelBuilder.doVar("CMS_zz4l_GGsm[1.,0.,30.]")
self.modelBuilder.doVar("CMS_zz4l_GGsm[1.,0.,60.]")
#self.modelBuilder.doVar("kV[0.0,0.0,1.0]")
self.modelBuilder.doVar("ktau[0.0,0.0,2.0]")
self.modelBuilder.doVar("ktop[0.0,0.0,4.0]")
self.modelBuilder.doVar("kbottom[0.0,0.0,3.0]")
#self.modelBuilder.doVar("kgluon[0.0,0.0,2.0]")
self.modelBuilder.doVar("kgamma[0.0,0.0,2.5]")
#self.modelBuilder.doVar("BRInvUndet[0,0,1]")
self.modelBuilder.doVar("CMS_zz4l_scalerK[1.0,0.0,1.0]")
self.modelBuilder.doVar("SM_BR_hww[0.0,0.0,1.0]")
self.modelBuilder.doVar("SM_BR_hzz[0.0,0.0,1.0]")
self.modelBuilder.doVar("SM_BR_htt[0.0,0.0,1.0]")
self.modelBuilder.doVar("SM_BR_hmm[0.0,0.0,1.0]")
self.modelBuilder.doVar("SM_BR_htoptop[0.0,0.0,1.0]")
self.modelBuilder.doVar("SM_BR_hcc[0.0,0.0,1.0]")
self.modelBuilder.doVar("SM_BR_hbb[0.0,0.0,1.0]")
self.modelBuilder.doVar("SM_BR_hss[0.0,0.0,1.0]")
self.modelBuilder.doVar("SM_BR_hgluglu[0.0,0.0,1.0]")
self.modelBuilder.doVar("SM_BR_hgg[0.0,0.0,1.0]")
self.modelBuilder.doVar("SM_BR_hzg[0.0,0.0,1.0]")
self.modelBuilder.factory_('expr::CMS_zz4l_Gscal_Vectors("@0*@0 * (@[email protected])*abs([email protected])", kV, SM_BR_hzz, SM_BR_hww, CMS_zz4l_scalerK)')
self.modelBuilder.factory_('expr::CMS_zz4l_Gscal_tau("@0*@0 * (@[email protected])*abs([email protected])", ktau, SM_BR_htt, SM_BR_hmm, CMS_zz4l_scalerK)')
self.modelBuilder.factory_('expr::CMS_zz4l_Gscal_top("@0*@0 * (@[email protected])*abs([email protected])", ktop, SM_BR_htoptop, SM_BR_hcc, CMS_zz4l_scalerK)')
self.modelBuilder.factory_('expr::CMS_zz4l_Gscal_bottom("@0*@0 * (@[email protected])*abs([email protected])", kbottom, SM_BR_hbb, SM_BR_hss, CMS_zz4l_scalerK)')
self.modelBuilder.factory_('expr::CMS_zz4l_Gscal_gluon("@0*@0 * @1*abs([email protected])", kgluon, SM_BR_hgluglu, CMS_zz4l_scalerK)')
self.modelBuilder.factory_('expr::CMS_zz4l_Gscal_gamma("@0*@0 * (@[email protected])*abs([email protected])", kgamma, SM_BR_hgg, SM_BR_hzg, CMS_zz4l_scalerK)')
self.modelBuilder.factory_('sum::gammaK(CMS_zz4l_Gscal_Vectors, CMS_zz4l_Gscal_tau, CMS_zz4l_Gscal_top, CMS_zz4l_Gscal_bottom, CMS_zz4l_Gscal_gluon, CMS_zz4l_Gscal_gamma, CMS_zz4l_scalerK)')
self.SMH = SMHiggsBuilder(self.modelBuilder)
for d in [ "htt", "hbb", "hcc", "hww", "hzz", "hgluglu", "htoptop", "hgg", "hzg", "hmm", "hss" ]: self.SMH.makeBR(d)
if self.useKframework:
self.modelBuilder.out.var("CMS_zz4l_scalerK").setVal(0.0)
else:
self.modelBuilder.out.var("CMS_zz4l_scalerK").setVal(1.0)
if not self.is2l2nu:
self.modelBuilder.out.var("SM_BR_hww").setVal(0.0)
self.modelBuilder.out.var("SM_BR_hww").setConstant(True)
self.modelBuilder.out.var("SM_BR_hzz").setVal(0.0)
self.modelBuilder.out.var("SM_BR_hzz").setConstant(True)
self.modelBuilder.out.var("SM_BR_htt").setVal(0.0)
self.modelBuilder.out.var("SM_BR_hmm").setVal(0.0)
self.modelBuilder.out.var("SM_BR_htt").setConstant(True)
self.modelBuilder.out.var("SM_BR_hmm").setConstant(True)
self.modelBuilder.out.var("SM_BR_htoptop").setVal(0.0)
self.modelBuilder.out.var("SM_BR_hcc").setVal(0.0)
self.modelBuilder.out.var("SM_BR_htoptop").setConstant(True)
self.modelBuilder.out.var("SM_BR_hcc").setConstant(True)
self.modelBuilder.out.var("SM_BR_hbb").setVal(0.0)
self.modelBuilder.out.var("SM_BR_hss").setVal(0.0)
self.modelBuilder.out.var("SM_BR_hbb").setConstant(True)
self.modelBuilder.out.var("SM_BR_hss").setConstant(True)
self.modelBuilder.out.var("SM_BR_hgluglu").setVal(0.0)
self.modelBuilder.out.var("SM_BR_hgg").setVal(0.0)
self.modelBuilder.out.var("SM_BR_hgluglu").setConstant(True)
self.modelBuilder.out.var("SM_BR_hgg").setConstant(True)
self.modelBuilder.out.var("SM_BR_hzg").setVal(0.0)
self.modelBuilder.out.var("SM_BR_hzg").setConstant(True)
self.modelBuilder.out.var("CMS_zz4l_scalerK").setConstant(True)
if self.GGsmfixed:
开发者ID:amassiro,项目名称:LimitCombine,代码行数:70,代码来源:HiggsWidthKappaCustodialMHSscaleWWOriginalWithBkgUnc.py
示例4: TwoHDM
# 需要导入模块: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder import SMHiggsBuilder [as 别名]
# 或者: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder.SMHiggsBuilder import makeBR [as 别名]
class TwoHDM(SMLikeHiggsModel):
"assume the SM coupling but let the Higgs mass to float"
def __init__(self):
SMLikeHiggsModel.__init__(self) # not using 'super(x,self).__init__' since I don't understand it
self.floatMass = False
self.thdmtype = ['1']
def setPhysicsOptions(self,physOptions):
for po in physOptions:
if po.startswith("higgsMassRange="):
self.floatMass = True
self.mHRange = po.replace("higgsMassRange=","").split(",")
print 'The Higgs mass range:', self.mHRange
if len(self.mHRange) != 2:
raise RuntimeError, "Higgs mass range definition requires two extrema"
elif float(self.mHRange[0]) >= float(self.mHRange[1]):
raise RuntimeError, "Extrama for Higgs mass range defined with inverterd order. Second must be larger the first"
if po.startswith("thdmtype="):
self.thdmtype= po.replace("thdmtype=","")
if len(self.thdmtype) != 1:
raise RuntimeError, "2HDM type requires one value"
elif int(self.thdmtype[0]) != 1 and int(self.thdmtype[0]) !=2 and int(self.thdmtype[0]) !=3 and int(self.thdmtype[0]) !=4:
raise RuntimeError, "2HDM type must be 1 (default) or 2 or 3 or 4 "
def doParametersOfInterest(self):
"""Create POI out of signal strength and MH"""
self.modelBuilder.doVar("cosbma[0,-1,1]")
self.modelBuilder.doVar("tanbeta[0,0.0,10]")
if self.floatMass:
if self.modelBuilder.out.var("MH"):
self.modelBuilder.out.var("MH").setRange(float(self.mHRange[0]),float(self.mHRange[1]))
self.modelBuilder.out.var("MH").setConstant(False)
else:
self.modelBuilder.doVar("MH[%s,%s]" % (self.mHRange[0],self.mHRange[1]))
self.modelBuilder.doSet("POI",'cosbma,tanbeta,MH')
else:
if self.modelBuilder.out.var("MH"):
self.modelBuilder.out.var("MH").setVal(self.options.mass)
self.modelBuilder.out.var("MH").setConstant(True)
else:
self.modelBuilder.doVar("MH[%g]" % self.options.mass)
self.modelBuilder.doSet("POI",'cosbma,tanbeta')
self.SMH = SMHiggsBuilder(self.modelBuilder)
self.setup()
def setup(self):
self.modelBuilder.factory_('expr::kV("sqrt([email protected]*@0)",cosbma)')
self.modelBuilder.factory_('expr::tana("(@0*@[email protected])/(@[email protected]*@2)", tanbeta, cosbma, kV)')
self.modelBuilder.factory_('expr::cosa("1/sqrt([email protected]*@0)",tana)')
self.modelBuilder.factory_('expr::sinb("tanbeta/sqrt([email protected]*@0)",tanbeta)')
self.modelBuilder.factory_('expr::ku("@0/@1", cosa, sinb)')
if int(self.thdmtype[0]) == 1:
self.modelBuilder.factory_('expr::kd("@0", ku)')
self.modelBuilder.factory_('expr::kl("@0", ku)')
elif int(self.thdmtype[0]) == 2:
self.modelBuilder.factory_('expr::cosb("1/sqrt([email protected]*@0)",tanbeta)')
self.modelBuilder.factory_('expr::sina("tana/sqrt([email protected]*@0)",tana)')
self.modelBuilder.factory_('expr::kd("[email protected]/@1", sina,cosb)')
self.modelBuilder.factory_('expr::kl("@0", kd)')
elif int(self.thdmtype[0]) == 3:
self.modelBuilder.factory_('expr::cosb("1/sqrt([email protected]*@0)",tanbeta)')
self.modelBuilder.factory_('expr::sina("tana/sqrt([email protected]*@0)",tana)')
self.modelBuilder.factory_('expr::kd("@0", ku)')
self.modelBuilder.factory_('expr::kl("[email protected]/@1", sina,cosb)')
elif int(self.thdmtype[0]) == 4:
self.modelBuilder.factory_('expr::cosb("1/sqrt([email protected]*@0)",tanbeta)')
self.modelBuilder.factory_('expr::sina("tana/sqrt([email protected]*@0)",tana)')
self.modelBuilder.factory_('expr::kd("[email protected]/@1", sina,cosb)')
self.modelBuilder.factory_('expr::kl("@0", ku)')
self.decayScaling = {
'hgg':'hgg',
'hzg':'hzg',
'hww':'hvv',
'hzz':'hvv',
'hbb':'hdd',
'htt':'hll',
'hss':'hdd',
'hmm':'hll',
'hcc':'huu',
'hgluglu':'hgluglu',
}
self.productionScaling = {
'ttH':'ku',
'qqH':'kV',
'WH':'kV',
'ZH':'kV',
'VH':'kV',
}
# scalings of the loops
self.SMH.makeScaling('ggH', Cb='kd', Ctop='ku')
self.SMH.makeScaling('hgg', Cb='kd', Ctop='ku', CW='kV', Ctau='kl')
self.SMH.makeScaling('hzg', Cb='kd', Ctop='ku', CW='kV', Ctau='kl')
self.SMH.makeScaling('hgluglu', Cb='kd', Ctop='ku')
# SM BR
for d in [ "htt", "hbb", "hcc", "hww", "hzz", "hgluglu", "htoptop", "hgg", "hzg", "hmm", "hss" ]:
self.SMH.makeBR(d)
## total witdhs, normalized to the SM one
self.modelBuilder.factory_('expr::twohdm_Gscal_Vectors("@0*@0 * (@[email protected])", kV, SM_BR_hzz, SM_BR_hww)')
#.........这里部分代码省略.........
示例5: CWidth
# 需要导入模块: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder import SMHiggsBuilder [as 别名]
# 或者: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder.SMHiggsBuilder import makeBR [as 别名]
class CWidth(SMLikeHiggsModel):
"assume the SM coupling but let the Higgs mass to float"
def __init__(self):
SMLikeHiggsModel.__init__(self) # not using 'super(x,self).__init__' since I don't understand it
self.floatMass = False
self.doHZg = False
self.doHInv = False
self.doWidth = False
def setPhysicsOptions(self,physOptions):
for po in physOptions:
if po.startswith("higgsMassRange="):
self.floatMass = True
self.mHRange = po.replace("higgsMassRange=","").split(",")
print 'The Higgs mass range:', self.mHRange
if len(self.mHRange) != 2:
raise RuntimeError, "Higgs mass range definition requires two extrema"
elif float(self.mHRange[0]) >= float(self.mHRange[1]):
raise RuntimeError, "Extrama for Higgs mass range defined with inverterd order. Second must be larger the first"
if po == 'doHZg':
self.doHZg = True
if po == 'doHInv':
self.doHInv = True
if po == 'doWidth':
self.doWidth = True
def doParametersOfInterest(self):
"""Create POI out of signal strength and MH"""
self.modelBuilder.doVar("kV[1,0.0,1.0]") # bounded to 1
self.modelBuilder.doVar("ktau[1,0.0,2.0]")
self.modelBuilder.doVar("ktop[1,0.0,4.0]")
self.modelBuilder.doVar("kbottom[1,0.0,3.0]")
self.modelBuilder.doVar("kgluon[1,0.0,2.0]")
self.modelBuilder.doVar("kgamma[1,0.0,2.5]")
if self.doWidth:
self.modelBuilder.doVar("Gscale[1,0,10]")
pois = 'kV,ktau,ktop,kbottom,kgluon,kgamma,Gscale'
else:
self.modelBuilder.doVar("BRInvUndet[0,0,1]")
pois = 'kV,ktau,ktop,kbottom,kgluon,kgamma,BRInvUndet'
if self.doHZg:
self.modelBuilder.doVar("kZgamma[1,0.0,30.0]")
pois += ",kZgamma"
if self.floatMass:
if self.modelBuilder.out.var("MH"):
self.modelBuilder.out.var("MH").setRange(float(self.mHRange[0]),float(self.mHRange[1]))
self.modelBuilder.out.var("MH").setConstant(False)
else:
self.modelBuilder.doVar("MH[%s,%s]" % (self.mHRange[0],self.mHRange[1]))
self.modelBuilder.doSet("POI",pois+',MH')
else:
if self.modelBuilder.out.var("MH"):
self.modelBuilder.out.var("MH").setVal(self.options.mass)
self.modelBuilder.out.var("MH").setConstant(True)
else:
self.modelBuilder.doVar("MH[%g]" % self.options.mass)
self.modelBuilder.doSet("POI",pois)
self.SMH = SMHiggsBuilder(self.modelBuilder)
self.setup()
def setup(self):
# SM BR
for d in [ "htt", "hbb", "hcc", "hww", "hzz", "hgluglu", "htoptop", "hgg", "hzg", "hmm", "hss" ]: self.SMH.makeBR(d)
## total witdhs, normalized to the SM one
self.modelBuilder.factory_('expr::c7_Gscal_Vectors("@0*@0 * (@[email protected])", kV, SM_BR_hzz, SM_BR_hww)')
self.modelBuilder.factory_('expr::c7_Gscal_tau("@0*@0 * (@[email protected])", ktau, SM_BR_htt, SM_BR_hmm)')
self.modelBuilder.factory_('expr::c7_Gscal_top("@0*@0 * (@[email protected])", ktop, SM_BR_htoptop, SM_BR_hcc)')
self.modelBuilder.factory_('expr::c7_Gscal_bottom("@0*@0 * (@[email protected])", kbottom, SM_BR_hbb, SM_BR_hss)')
self.modelBuilder.factory_('expr::c7_Gscal_gluon("@0*@0 * @1", kgluon, SM_BR_hgluglu)')
if not self.doHZg:
self.modelBuilder.factory_('expr::c7_Gscal_gamma("@0*@0 * (@[email protected])", kgamma, SM_BR_hgg, SM_BR_hzg)')
else:
self.modelBuilder.factory_('expr::c7_Gscal_gamma("@0*@0 *@[email protected]*@2*@3", kgamma, SM_BR_hgg, kZgamma, SM_BR_hzg)')
#
#RooFormulaVar::c7_Gscal_tot[ actualVars=(Gscale,c7_Gscal_Vectors,c7_Gscal_tau,c7_Gscal_top,c7_Gscal_bottom,c7_Gscal_gluon,c7_Gscal_gamma) formula="(@[email protected][email protected][email protected][email protected][email protected])<[email protected][email protected]:0.001" ] = 0.001
#root [8] w->function("c7_Gscal_tau")->Print()
#RooFormulaVar::c7_Gscal_tau[ actualVars=(ktau,SM_BR_htt,SM_BR_hmm) formula="@0*@0*(@[email protected])" ] = 0.063419
#root [9] w->function("c7_Gscal_top")->Print()
#RooFormulaVar::c7_Gscal_top[ actualVars=(ktop,SM_BR_htoptop,SM_BR_hcc) formula="@0*@0*(@[email protected])" ] = 0.0291
#root [10] w->function("c7_Gscal_bottom")->Print()
#RooFormulaVar::c7_Gscal_bottom[ actualVars=(kbottom,SM_BR_hbb,SM_BR_hss) formula="@0*@0*(@[email protected])" ] = 0.577246 #### The spline interpolation has small difference w.r.t YR3 number 5.769462E-01
#root [11] w->function("c7_Gscal_gluon")->Print()
#RooFormulaVar::c7_Gscal_gluon[ actualVars=(kgluon,SM_BR_hgluglu) formula="@0*@0*@1" ] = 0.0857
#root [12] w->function("c7_Gscal_gamma")->Print()
#RooFormulaVar::c7_Gscal_gamma[ actualVars=(kgamma,SM_BR_hgg,SM_BR_hzg) formula="@0*@0*(@[email protected])" ] = 0.00382
#root [13] w->function("c7_Gscal_Vectors")->Print()
#RooFormulaVar::c7_Gscal_Vectors[ actualVars=(kV,SM_BR_hzz,SM_BR_hww) formula="@0*@0*(@[email protected])" ] = 0.2414
#############################Then the above sum = 1.000685 , so that the asimov data set will be generated with c7_Gscal_tot = 0.0001, and BRInv = -100
#root [14] w->var("ktau")->Print()
#RooRealVar::ktau = 1 L(0 - 2)
#root [15] w->var("ktop")->Print()
#RooRealVar::ktop = 1 L(0 - 4)
#root [16] w->var("kgluon")->Print()
#RooRealVar::kgluon = 1 L(0 - 2)
#root [17] w->var("kgamma")->Print()
#RooRealVar::kgamma = 1 L(0 - 2.5)
############################either generate asimov dataset with kbottom slightly less 1 i.e. kb=0.999 is fine
#.........这里部分代码省略.........
示例6: HiggsMinimal
# 需要导入模块: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder import SMHiggsBuilder [as 别名]
# 或者: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder.SMHiggsBuilder import makeBR [as 别名]
class HiggsMinimal(SMLikeHiggsModel):
"assume the SM coupling but let the Higgs mass to float"
def __init__(self):
SMLikeHiggsModel.__init__(self) # not using 'super(x,self).__init__' since I don't understand it
self.floatMass = False
def setPhysicsOptions(self,physOptions):
for po in physOptions:
if po.startswith("higgsMassRange="):
self.floatMass = True
self.mHRange = po.replace("higgsMassRange=","").split(",")
print 'The Higgs mass range:', self.mHRange
if len(self.mHRange) != 2:
raise RuntimeError, "Higgs mass range definition requires two extrema"
elif float(self.mHRange[0]) >= float(self.mHRange[1]):
raise RuntimeError, "Extrama for Higgs mass range defined with inverterd order. Second must be larger the first"
def doParametersOfInterest(self):
"""Create POI out of signal strength and MH"""
self.modelBuilder.doVar("kgluon[1,0,2]")
self.modelBuilder.doVar("kgamma[1,0,3]")
self.modelBuilder.doVar("kV[1,0,3]")
self.modelBuilder.doVar("kf[1,0,3]")
if self.floatMass:
if self.modelBuilder.out.var("MH"):
self.modelBuilder.out.var("MH").setRange(float(self.mHRange[0]),float(self.mHRange[1]))
self.modelBuilder.out.var("MH").setConstant(False)
else:
self.modelBuilder.doVar("MH[%s,%s]" % (self.mHRange[0],self.mHRange[1]))
self.modelBuilder.doSet("POI",'kgluon,kgamma,kV,kf,MH')
else:
if self.modelBuilder.out.var("MH"):
self.modelBuilder.out.var("MH").setVal(self.options.mass)
self.modelBuilder.out.var("MH").setConstant(True)
else:
self.modelBuilder.doVar("MH[%g]" % self.options.mass)
self.modelBuilder.doSet("POI",'kgluon,kgamma,kV,kf')
self.SMH = SMHiggsBuilder(self.modelBuilder)
self.setup()
def setup(self):
self.decayScaling = {
'hgg':'hgg',
'hZg':'hZg',
'hww':'hvv',
'hzz':'hvv',
'hbb':'hff',
'htt':'hff',
}
self.productionScaling = {
'ggH':'kgluon',
'ttH':'kf',
'qqH':'kV',
'WH':'kV',
'ZH':'kV',
'VH':'kV',
}
self.SMH.makeScaling('hZg', Cb='kf', Ctop='kf', CW='kV', Ctau='kf')
# SM BR
for d in [ "htt", "hbb", "hcc", "hww", "hzz", "hgluglu", "htoptop", "hgg", "hZg", "hmm", "hss" ]:
self.SMH.makeBR(d)
## total witdh, normalized to the SM one
self.modelBuilder.factory_('expr::minimal_Gscal_gg("@0*@0 * @1", kgamma, SM_BR_hgg)')
self.modelBuilder.factory_('expr::minimal_Gscal_gluglu("@0*@0 * @1", kgluon, SM_BR_hgluglu)')
self.modelBuilder.factory_('expr::minimal_Gscal_sumf("@0*@0 * (@[email protected][email protected][email protected][email protected][email protected])", kf, SM_BR_hbb, SM_BR_htt, SM_BR_hcc, SM_BR_htoptop, SM_BR_hmm, SM_BR_hss)')
self.modelBuilder.factory_('expr::minimal_Gscal_sumv("@0*@0 * (@[email protected])", kV, SM_BR_hww, SM_BR_hzz)')
self.modelBuilder.factory_('expr::minimal_Gscal_Zg("@0 * @1", Scaling_hZg, SM_BR_hZg)')
self.modelBuilder.factory_('sum::minimal_Gscal_tot(minimal_Gscal_sumf, minimal_Gscal_sumv, minimal_Gscal_Zg, minimal_Gscal_gg, minimal_Gscal_gluglu)')
## BRs, normalized to the SM ones: they scale as (partial/partial_SM)^2 / (total/total_SM)^2
self.modelBuilder.factory_('expr::minimal_BRscal_hgg("@0*@0/@1", kgamma, minimal_Gscal_tot)')
self.modelBuilder.factory_('expr::minimal_BRscal_hZg("@0/@1", Scaling_hZg, minimal_Gscal_tot)')
self.modelBuilder.factory_('expr::minimal_BRscal_hff("@0*@0/@1", kf, minimal_Gscal_tot)')
self.modelBuilder.factory_('expr::minimal_BRscal_hvv("@0*@0/@1", kV, minimal_Gscal_tot)')
# verbosity
#self.modelBuilder.out.Print()
def getHiggsSignalYieldScale(self,production,decay,energy):
name = "minimal_XSBRscal_%s_%s" % (production,decay)
if self.modelBuilder.out.function(name):
return name
XSscal = self.productionScaling[production]
BRscal = self.decayScaling[decay]
self.modelBuilder.factory_('expr::%s("@0*@0 * @1", %s, minimal_BRscal_%s)' % (name, XSscal, BRscal))
return name
示例7: LambdaWZHiggs
# 需要导入模块: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder import SMHiggsBuilder [as 别名]
# 或者: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder.SMHiggsBuilder import makeBR [as 别名]
class LambdaWZHiggs(SMLikeHiggsModel):
def __init__(self):
SMLikeHiggsModel.__init__(self)
self.floatMass = False
self.floatKF = True
def setPhysicsOptions(self,physOptions):
for po in physOptions:
if po.startswith("higgsMassRange="):
self.floatMass = True
self.mHRange = po.replace("higgsMassRange=","").split(",")
print 'The Higgs mass range:', self.mHRange
if len(self.mHRange) != 2:
raise RuntimeError, "Higgs mass range definition requires two extrema."
elif float(self.mHRange[0]) >= float(self.mHRange[1]):
raise RuntimeError, "Extrema for Higgs mass range defined with inverterd order. Second must be larger the first."
if po == "fixKF":
self.floatKF = False
def doParametersOfInterest(self):
"""Create POI out of signal strength and MH"""
self.modelBuilder.doVar("kZ[1,0,2]")
if self.floatKF:
self.modelBuilder.doVar("kf[1,0,2]")
else:
self.modelBuilder.doVar("kf[1]")
self.modelBuilder.doVar("lambdaWZ[1,0,2]")
if self.floatMass:
if self.modelBuilder.out.var("MH"):
self.modelBuilder.out.var("MH").setRange(float(self.mHRange[0]),float(self.mHRange[1]))
self.modelBuilder.out.var("MH").setConstant(False)
else:
self.modelBuilder.doVar("MH[%s,%s]" % (self.mHRange[0],self.mHRange[1]))
self.modelBuilder.doSet("POI",'kZ,lambdaWZ,kf,MH' if self.floatKF else 'kZ,lambdaWZ,MH')
else:
if self.modelBuilder.out.var("MH"):
self.modelBuilder.out.var("MH").setVal(self.options.mass)
self.modelBuilder.out.var("MH").setConstant(True)
else:
self.modelBuilder.doVar("MH[%g]" % self.options.mass)
self.modelBuilder.doSet("POI",'kZ,lambdaWZ,kf' if self.floatKF else 'kZ,lambdaWZ')
self.SMH = SMHiggsBuilder(self.modelBuilder)
self.setup()
def setup(self):
self.decayScaling = {
'hgg':'hgg',
'hzg':'hzg',
'hww':'hww',
'hzz':'hzz',
'hbb':'hff',
'htt':'hff',
'hmm':'hff',
'hcc':'hff',
'hss':'hff',
'hgluglu':'hff',
}
self.productionScaling = {
'ggH':'kf',
'ttH':'kf',
'WH':'kW',
'ZH':'kZ',
}
# define kW as lambdaWZ*kZ
self.modelBuilder.factory_('expr::kW("@0*@1",kZ, lambdaWZ)')
# scalings of the loops
self.SMH.makeScaling('hgg', Cb='kf', Ctop='kf', CW='kW', Ctau='kf')
self.SMH.makeScaling('hzg', Cb='kf', Ctop='kf', CW='kW', Ctau='kf')
self.SMH.makeScaling('qqH', CW='kW', CZ='kZ')
# SM BR
for d in [ "htt", "hbb", "hcc", "hww", "hzz", "hgluglu", "htoptop", "hgg", "hzg", "hmm", "hss" ]:
self.SMH.makeBR(d)
## total witdhs, normalized to the SM one
self.modelBuilder.factory_('expr::lambdaWZ_Gscal_Z("@0*@0 * @1", kZ, SM_BR_hzz)')
self.modelBuilder.factory_('expr::lambdaWZ_Gscal_W("@0*@0 * @1", kW, SM_BR_hww)')
self.modelBuilder.factory_('expr::lambdaWZ_Gscal_fermions("@0*@0 * (@[email protected][email protected][email protected][email protected][email protected][email protected])", kf, SM_BR_hbb, SM_BR_htt, SM_BR_hcc, SM_BR_htoptop, SM_BR_hgluglu, SM_BR_hmm, SM_BR_hss)')
self.modelBuilder.factory_('expr::lambdaWZ_Gscal_gg("@0 * @1", Scaling_hgg, SM_BR_hgg)')
self.modelBuilder.factory_('expr::lambdaWZ_Gscal_Zg("@0 * @1", Scaling_hzg, SM_BR_hzg)')
self.modelBuilder.factory_('sum::lambdaWZ_Gscal_tot(lambdaWZ_Gscal_Z, lambdaWZ_Gscal_W, lambdaWZ_Gscal_fermions, lambdaWZ_Gscal_gg, lambdaWZ_Gscal_Zg)')
## BRs, normalized to the SM ones: they scale as (partial/partial_SM) / (total/total_SM)
self.modelBuilder.factory_('expr::lambdaWZ_BRscal_hzz("@0*@0/@1", kZ, lambdaWZ_Gscal_tot)')
self.modelBuilder.factory_('expr::lambdaWZ_BRscal_hww("@0*@0/@1", kW, lambdaWZ_Gscal_tot)')
self.modelBuilder.factory_('expr::lambdaWZ_BRscal_hff("@0*@0/@1", kf, lambdaWZ_Gscal_tot)')
self.modelBuilder.factory_('expr::lambdaWZ_BRscal_hgg("@0/@1", Scaling_hgg, lambdaWZ_Gscal_tot)')
self.modelBuilder.factory_('expr::lambdaWZ_BRscal_hzg("@0/@1", Scaling_hzg, lambdaWZ_Gscal_tot)')
# verbosity
#self.modelBuilder.out.Print()
def getHiggsSignalYieldScale(self,production,decay,energy):
name = 'lambdaWZ_XSBRscal_%(production)s_%(decay)s' % locals()
#Special case that depends on Energy
if production == 'qqH':
#.........这里部分代码省略.........
示例8: CvCfHiggs
# 需要导入模块: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder import SMHiggsBuilder [as 别名]
# 或者: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder.SMHiggsBuilder import makeBR [as 别名]
class CvCfHiggs(SMLikeHiggsModel):
"assume the SM coupling but let the Higgs mass to float"
def __init__(self):
SMLikeHiggsModel.__init__(self) # not using 'super(x,self).__init__' since I don't understand it
self.floatMass = False
def setPhysicsOptions(self,physOptions):
for po in physOptions:
if po.startswith("higgsMassRange="):
self.floatMass = True
self.mHRange = po.replace("higgsMassRange=","").split(",")
print 'The Higgs mass range:', self.mHRange
if len(self.mHRange) != 2:
raise RuntimeError, "Higgs mass range definition requires two extrema."
elif float(self.mHRange[0]) >= float(self.mHRange[1]):
raise RuntimeError, "Extrema for Higgs mass range defined with inverterd order. Second must be larger the first."
def doParametersOfInterest(self):
"""Create POI out of signal strength and MH"""
# --- Signal Strength as only POI ---
self.modelBuilder.doVar("CV[1,0.0,1.5]")
self.modelBuilder.doVar("CF[1,-2,2]")
if self.floatMass:
if self.modelBuilder.out.var("MH"):
self.modelBuilder.out.var("MH").setRange(float(self.mHRange[0]),float(self.mHRange[1]))
self.modelBuilder.out.var("MH").setConstant(False)
else:
self.modelBuilder.doVar("MH[%s,%s]" % (self.mHRange[0],self.mHRange[1]))
self.modelBuilder.doSet("POI",'CV,CF,MH')
else:
if self.modelBuilder.out.var("MH"):
self.modelBuilder.out.var("MH").setVal(self.options.mass)
self.modelBuilder.out.var("MH").setConstant(True)
else:
self.modelBuilder.doVar("MH[%g]" % self.options.mass)
self.modelBuilder.doSet("POI",'CV,CF')
self.SMH = SMHiggsBuilder(self.modelBuilder)
self.setup()
def setup(self):
## Coefficient for couplings to photons
# arXiv 1202.3144v2, below eq. 2.6: 2/9*cF - 1.04*cV, and then normalize to SM
# FIXME: this should be replaced with the proper MH dependency
#self.modelBuilder.factory_("expr::CvCf_cgamma(\"-0.271*@0+1.27*@1\",CF,CV)")
#########################################################################
## Coefficient for coupling to di-photons
# Based on Eq 1--4 of Nuclear Physics B 453 (1995)17-82
# ignoring b quark contributions
# Taylor series around MH=125 including terms up to O(MH-125)^2 in Horner polynomial form
CF = self.modelBuilder.out.function('CF')
CF.setVal(1.0)
self.modelBuilder.factory_('expr::CvCf_cgammaSq("\
@0*@0*(1.524292518396496 + (0.005166702799572456 - 0.00003355715038472727*@2)*@2) + \
@1*(@1*(0.07244520735564258 + (0.0008318872718720393 - 6.16997610275555e-6*@2)*@2) + \
@0*(-0.5967377257521194 + (-0.005998590071444782 + 0.00003972712648748393*@2)*@2))\
",CV,CF,MH)')
## partial witdhs, normalized to the SM one, for decays scaling with F, V and total
for d in [ "htt", "hbb", "hcc", "hww", "hzz", "hgluglu", "htoptop", "hgg", "hzg", "hmm", "hss" ]:
self.SMH.makeBR(d)
self.modelBuilder.factory_("expr::CvCf_Gscal_sumf(\"@0*@0 * (@[email protected][email protected][email protected][email protected][email protected][email protected])\", CF, SM_BR_hbb, SM_BR_htt, SM_BR_hcc, SM_BR_htoptop, SM_BR_hgluglu, SM_BR_hmm, SM_BR_hss)")
self.modelBuilder.factory_("expr::CvCf_Gscal_sumv(\"@0*@0 * (@[email protected][email protected])\", CV, SM_BR_hww, SM_BR_hzz, SM_BR_hzg)")
self.modelBuilder.factory_("expr::CvCf_Gscal_gg(\"@0 * @1\", CvCf_cgammaSq, SM_BR_hgg)")
self.modelBuilder.factory_( "sum::CvCf_Gscal_tot(CvCf_Gscal_sumf, CvCf_Gscal_sumv, CvCf_Gscal_gg)")
## BRs, normalized to the SM ones: they scale as (coupling/coupling_SM)^2 / (totWidth/totWidthSM)^2
self.modelBuilder.factory_("expr::CvCf_BRscal_hgg(\"@0/@1\", CvCf_cgammaSq, CvCf_Gscal_tot)")
self.modelBuilder.factory_("expr::CvCf_BRscal_hf(\"@0*@0/@1\", CF, CvCf_Gscal_tot)")
self.modelBuilder.factory_("expr::CvCf_BRscal_hv(\"@0*@0/@1\", CV, CvCf_Gscal_tot)")
#self.modelBuilder.out.Print()
def getHiggsSignalYieldScale(self,production,decay,energy):
name = "CvCf_XSBRscal_%s_%s" % (production,decay)
if self.modelBuilder.out.function(name) == None:
XSscal = 'CF' if production in ["ggH","ttH"] else 'CV'
BRscal = "hgg"
if decay in ["hww", "hzz"]: BRscal = "hv"
if decay in ["hbb", "htt"]: BRscal = "hf"
self.modelBuilder.factory_('expr::%s("@0*@0 * @1", %s, CvCf_BRscal_%s)' % (name, XSscal, BRscal))
return name
示例9: LambdaduHiggs
# 需要导入模块: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder import SMHiggsBuilder [as 别名]
# 或者: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder.SMHiggsBuilder import makeBR [as 别名]
class LambdaduHiggs(SMLikeHiggsModel):
"assume the SM coupling but let the Higgs mass to float"
def __init__(self):
SMLikeHiggsModel.__init__(self) # not using 'super(x,self).__init__' since I don't understand it
self.floatMass = False
def setPhysicsOptions(self,physOptions):
for po in physOptions:
if po.startswith("higgsMassRange="):
self.floatMass = True
self.mHRange = po.replace("higgsMassRange=","").split(",")
print 'The Higgs mass range:', self.mHRange
if len(self.mHRange) != 2:
raise RuntimeError, "Higgs mass range definition requires two extrema"
elif float(self.mHRange[0]) >= float(self.mHRange[1]):
raise RuntimeError, "Extrama for Higgs mass range defined with inverterd order. Second must be larger the first"
def doParametersOfInterest(self):
"""Create POI out of signal strength and MH"""
self.modelBuilder.doVar("kV[1,0,2]")
self.modelBuilder.doVar("lambdadu[1,-3,3]")
self.modelBuilder.doVar("ku[1,0,2]")
if self.floatMass:
if self.modelBuilder.out.var("MH"):
self.modelBuilder.out.var("MH").setRange(float(self.mHRange[0]),float(self.mHRange[1]))
self.modelBuilder.out.var("MH").setConstant(False)
else:
self.modelBuilder.doVar("MH[%s,%s]" % (self.mHRange[0],self.mHRange[1]))
self.modelBuilder.doSet("POI",'kV,lambdadu,ku,MH')
else:
if self.modelBuilder.out.var("MH"):
self.modelBuilder.out.var("MH").setVal(self.options.mass)
self.modelBuilder.out.var("MH").setConstant(True)
else:
self.modelBuilder.doVar("MH[%g]" % self.options.mass)
self.modelBuilder.doSet("POI",'kV,lambdadu,ku')
self.SMH = SMHiggsBuilder(self.modelBuilder)
self.setup()
def setup(self):
self.decayScaling = {
'hgg':'hgg',
'hZg':'hZg',
'hww':'hvv',
'hzz':'hvv',
'hbb':'hdd',
'htt':'hdd',
}
self.productionScaling = {
'ttH':'ku',
'qqH':'kV',
'WH':'kV',
'ZH':'kV',
'VH':'kV',
}
# define kd as lambdadu*ku
self.modelBuilder.factory_('expr::kd("@0*@1",ku, lambdadu)')
# scalings of the loops
self.SMH.makeScaling('ggH', Cb='kd', Ctop='ku')
self.SMH.makeScaling('hgg', Cb='kd', Ctop='ku', CW='kV', Ctau='kd')
self.SMH.makeScaling('hZg', Cb='kd', Ctop='ku', CW='kV', Ctau='kd')
self.SMH.makeScaling('hgluglu', Cb='kd', Ctop='ku')
# SM BR
for d in [ "htt", "hbb", "hcc", "hww", "hzz", "hgluglu", "htoptop", "hgg", "hZg", "hmm", "hss" ]:
self.SMH.makeBR(d)
## total witdhs, normalized to the SM one
self.modelBuilder.factory_('expr::lambdadu_Gscal_Vectors("@0*@0 * (@[email protected])", kV, SM_BR_hzz, SM_BR_hww)')
self.modelBuilder.factory_('expr::lambdadu_Gscal_up("@0*@0 * (@[email protected])", ku, SM_BR_hcc, SM_BR_htoptop)')
self.modelBuilder.factory_('expr::lambdadu_Gscal_down("@0*@0 * (@[email protected][email protected][email protected])", kd, SM_BR_hbb, SM_BR_htt, SM_BR_hmm, SM_BR_hss)')
self.modelBuilder.factory_('expr::lambdadu_Gscal_gg("@0 * @1", Scaling_hgg, SM_BR_hgg)')
self.modelBuilder.factory_('expr::lambdadu_Gscal_Zg("@0 * @1", Scaling_hZg, SM_BR_hZg)')
self.modelBuilder.factory_('expr::lambdadu_Gscal_gluglu("@0 * @1", Scaling_hgluglu, SM_BR_hgluglu)')
self.modelBuilder.factory_('sum::lambdadu_Gscal_tot(lambdadu_Gscal_Vectors, lambdadu_Gscal_up, lambdadu_Gscal_down, lambdadu_Gscal_gg, lambdadu_Gscal_Zg, lambdadu_Gscal_gluglu)')
## BRs, normalized to the SM ones: they scale as (partial/partial_SM)^2 / (total/total_SM)^2
self.modelBuilder.factory_('expr::lambdadu_BRscal_hvv("@0*@0/@1", kV, lambdadu_Gscal_tot)')
self.modelBuilder.factory_('expr::lambdadu_BRscal_huu("@0*@0/@1", ku, lambdadu_Gscal_tot)')
self.modelBuilder.factory_('expr::lambdadu_BRscal_hdd("@0*@0/@1", kd, lambdadu_Gscal_tot)')
self.modelBuilder.factory_('expr::lambdadu_BRscal_hgg("@0/@1", Scaling_hgg, lambdadu_Gscal_tot)')
self.modelBuilder.factory_('expr::lambdadu_BRscal_hZg("@0/@1", Scaling_hZg, lambdadu_Gscal_tot)')
# verbosity
#self.modelBuilder.out.Print()
def getHiggsSignalYieldScale(self,production,decay,energy):
name = 'lambdadu_XSBRscal_%(production)s_%(decay)s' % locals()
#Special case that depends on Energy
if production == 'ggH':
self.productionScaling[production] = 'Scaling_ggH_' + energy
name += '_%(energy)s' % locals()
if self.modelBuilder.out.function(name):
return name
XSscal = self.productionScaling[production]
#.........这里部分代码省略.........
示例10: CvCfHiggs
# 需要导入模块: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder import SMHiggsBuilder [as 别名]
# 或者: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder.SMHiggsBuilder import makeBR [as 别名]
class CvCfHiggs(SMLikeHiggsModel):
"assume the SM coupling but let the Higgs mass to float"
def __init__(self):
SMLikeHiggsModel.__init__(self) # not using 'super(x,self).__init__' since I don't understand it
self.floatMass = False
self.cVRange = ['0','2']
self.cFRange = ['-2','2']
def setPhysicsOptions(self,physOptions):
for po in physOptions:
if po.startswith("higgsMassRange="):
self.floatMass = True
self.mHRange = po.replace("higgsMassRange=","").split(",")
print 'The Higgs mass range:', self.mHRange
if len(self.mHRange) != 2:
raise RuntimeError, "Higgs mass range definition requires two extrema."
elif float(self.mHRange[0]) >= float(self.mHRange[1]):
raise RuntimeError, "Extrema for Higgs mass range defined with inverterd order. Second must be larger the first."
if po.startswith("cVRange="):
self.cVRange = po.replace("cVRange=","").split(":")
if len(self.cVRange) != 2:
raise RuntimeError, "cV signal strength range requires minimal and maximal value"
elif float(self.cVRange[0]) >= float(self.cVRange[1]):
raise RuntimeError, "minimal and maximal range swapped. Second value must be larger first one"
if po.startswith("cFRange="):
self.cFRange = po.replace("cFRange=","").split(":")
if len(self.cFRange) != 2:
raise RuntimeError, "cF signal strength range requires minimal and maximal value"
elif float(self.cFRange[0]) >= float(self.cFRange[1]):
raise RuntimeError, "minimal and maximal range swapped. Second value must be larger first one"
def doParametersOfInterest(self):
"""Create POI out of signal strength and MH"""
# --- Signal Strength as only POI ---
self.modelBuilder.doVar("CV[1,%s,%s]" % (self.cVRange[0], self.cVRange[1]))
self.modelBuilder.doVar("CF[1,%s,%s]" % (self.cFRange[0], self.cFRange[1]))
if self.floatMass:
if self.modelBuilder.out.var("MH"):
self.modelBuilder.out.var("MH").setRange(float(self.mHRange[0]),float(self.mHRange[1]))
self.modelBuilder.out.var("MH").setConstant(False)
else:
self.modelBuilder.doVar("MH[%s,%s]" % (self.mHRange[0],self.mHRange[1]))
self.modelBuilder.doSet("POI",'CV,CF,MH')
else:
if self.modelBuilder.out.var("MH"):
self.modelBuilder.out.var("MH").setVal(self.options.mass)
self.modelBuilder.out.var("MH").setConstant(True)
else:
self.modelBuilder.doVar("MH[%g]" % self.options.mass)
self.modelBuilder.doSet("POI",'CV,CF')
self.SMH = SMHiggsBuilder(self.modelBuilder)
self.setup()
def setup(self):
self.decayScaling = {
'hgg':'hgg',
'hzg':'hzg',
'hww':'hvv',
'hzz':'hvv',
'hbb':'hff',
'hcc':'hff',
'hss':'hff',
'htt':'hff',
'hmm':'hff',
'hgluglu':'hff',
}
self.productionScaling = {
'ggH':'CF',
'ttH':'CF',
'qqH':'CV',
'WH':'CV',
'ZH':'CV',
'VH':'CV',
}
self.SMH.makeScaling('hgg', Cb='CF', Ctop='CF', CW='CV', Ctau='CF')
self.SMH.makeScaling('hzg', Cb='CF', Ctop='CF', CW='CV', Ctau='CF')
# Ideas for a cleaner future
# self.SMH.makeScaling('hww', 'CV*CV') -> Scaling_hww("@0*@0",CV)
# self.SMH.makeScaling('total', hbb='CF*CF', htoptop='CF*CF', hww='CV*CV', hzz='CV', hgg='Scaling_hgg', hgluglu='Scaling_hgluglu' )
## partial widths, normalized to the SM one, for decays scaling with F, V and total
for d in [ "htt", "hbb", "hcc", "hww", "hzz", "hgluglu", "htoptop", "hgg", "hzg", "hmm", "hss" ]:
self.SMH.makeBR(d)
self.modelBuilder.factory_('expr::CvCf_Gscal_sumf("@0*@0 * (@[email protected][email protected][email protected][email protected][email protected][email protected])", CF, SM_BR_hbb, SM_BR_htt, SM_BR_hcc, SM_BR_htoptop, SM_BR_hgluglu, SM_BR_hmm, SM_BR_hss)')
self.modelBuilder.factory_('expr::CvCf_Gscal_sumv("@0*@0 * (@[email protected])", CV, SM_BR_hww, SM_BR_hzz)')
self.modelBuilder.factory_('expr::CvCf_Gscal_gg("@0 * @1", Scaling_hgg, SM_BR_hgg)')
self.modelBuilder.factory_('expr::CvCf_Gscal_Zg("@0 * @1", Scaling_hzg, SM_BR_hzg)')
self.modelBuilder.factory_('sum::CvCf_Gscal_tot(CvCf_Gscal_sumf, CvCf_Gscal_sumv, CvCf_Gscal_gg, CvCf_Gscal_Zg)')
## BRs, normalized to the SM ones: they scale as (coupling/coupling_SM)^2 / (totWidth/totWidthSM)^2
self.modelBuilder.factory_('expr::CvCf_BRscal_hgg("@0/@1", Scaling_hgg, CvCf_Gscal_tot)')
self.modelBuilder.factory_('expr::CvCf_BRscal_hzg("@0/@1", Scaling_hzg, CvCf_Gscal_tot)')
self.modelBuilder.factory_('expr::CvCf_BRscal_hff("@0*@0/@1", CF, CvCf_Gscal_tot)')
self.modelBuilder.factory_('expr::CvCf_BRscal_hvv("@0*@0/@1", CV, CvCf_Gscal_tot)')
self.modelBuilder.out.Print()
def getHiggsSignalYieldScale(self,production,decay,energy):
name = "CvCf_XSBRscal_%s_%s" % (production,decay)
if self.modelBuilder.out.function(name):
#.........这里部分代码省略.........
示例11: CfXgHiggs
# 需要导入模块: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder import SMHiggsBuilder [as 别名]
# 或者: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder.SMHiggsBuilder import makeBR [as 别名]
class CfXgHiggs(SMLikeHiggsModel):
"assume the SM coupling but let the Higgs mass to float"
def __init__(self):
SMLikeHiggsModel.__init__(self) # not using 'super(x,self).__init__' since I don't understand it
self.floatMass = False
def setPhysicsOptions(self,physOptions):
for po in physOptions:
if po.startswith("higgsMassRange="):
self.floatMass = True
self.mHRange = po.replace("higgsMassRange=","").split(",")
print 'The Higgs mass range:', self.mHRange
if len(self.mHRange) != 2:
raise RuntimeError, "Higgs mass range definition requires two extrema."
elif float(self.mHRange[0]) >= float(self.mHRange[1]):
raise RuntimeError, "Extrema for Higgs mass range defined with inverterd order. Second must be larger the first."
def doParametersOfInterest(self):
"""Create POI out of signal strength and MH"""
# --- Signal Strength as only POI ---
self.modelBuilder.doVar("CV[1]")
self.modelBuilder.doVar("CF[1,-1.5,1.5]")
self.modelBuilder.doVar("XG[0,-4,4]")
if self.floatMass:
if self.modelBuilder.out.var("MH"):
self.modelBuilder.out.var("MH").setRange(float(self.mHRange[0]),float(self.mHRange[1]))
self.modelBuilder.out.var("MH").setConstant(False)
else:
self.modelBuilder.doVar("MH[%s,%s]" % (self.mHRange[0],self.mHRange[1]))
self.modelBuilder.doSet("POI",'CF,XG,MH')
else:
if self.modelBuilder.out.var("MH"):
self.modelBuilder.out.var("MH").setVal(self.options.mass)
self.modelBuilder.out.var("MH").setConstant(True)
else:
self.modelBuilder.doVar("MH[%g]" % self.options.mass)
self.modelBuilder.doSet("POI",'CF,XG')
self.SMH = SMHiggsBuilder(self.modelBuilder)
self.setup()
def setup(self):
## Add some common ingredients
datadir = os.environ['CMSSW_BASE']+'/src/HiggsAnalysis/CombinedLimit/data/lhc-hxswg'
self.SMH.textToSpline( 'mb', os.path.join(datadir, 'running_constants.txt'), ycol=2 );
mb = self.modelBuilder.out.function('mb')
mH = self.modelBuilder.out.var('MH')
CF = self.modelBuilder.out.var('CF')
CV = self.modelBuilder.out.var('CV')
XG = self.modelBuilder.out.var('XG')
RHggCfXg = ROOT.RooScaleHGamGamLOSMPlusX('CfXg_cgammaSq', 'LO SM Hgamgam scaling', mH, CF, CV, mb, CF, XG)
self.modelBuilder.out._import(RHggCfXg)
#Rgluglu = ROOT.RooScaleHGluGluLOSMPlusX('Rgluglu', 'LO SM Hgluglu scaling', mH, CF, mb, CF)
#self.modelBuilder.out._import(Rgluglu)
## partial witdhs, normalized to the SM one, for decays scaling with F, V and total
for d in [ "htt", "hbb", "hcc", "hww", "hzz", "hgluglu", "htoptop", "hgg", "hzg", "hmm", "hss" ]:
self.SMH.makeBR(d)
self.modelBuilder.factory_('expr::CfXg_Gscal_sumf("@0*@0 * (@[email protected][email protected][email protected][email protected][email protected][email protected])", CF, SM_BR_hbb, SM_BR_htt, SM_BR_hcc, SM_BR_htoptop, SM_BR_hgluglu, SM_BR_hmm, SM_BR_hss)')
self.modelBuilder.factory_('sum::CfXg_Gscal_sumv(SM_BR_hww, SM_BR_hzz, SM_BR_hzg)')
self.modelBuilder.factory_('expr::CfXg_Gscal_gg("@0 * @1", CfXg_cgammaSq, SM_BR_hgg)')
self.modelBuilder.factory_('sum::CfXg_Gscal_tot(CfXg_Gscal_sumf, CfXg_Gscal_sumv, CfXg_Gscal_gg)')
## BRs, normalized to the SM ones: they scale as (coupling/coupling_SM)^2 / (totWidth/totWidthSM)^2
self.modelBuilder.factory_('expr::CfXg_BRscal_hgg("@0/@1", CfXg_cgammaSq, CfXg_Gscal_tot)')
self.modelBuilder.factory_('expr::CfXg_BRscal_hf("@0*@0/@1", CF, CfXg_Gscal_tot)')
self.modelBuilder.factory_('expr::CfXg_BRscal_hv("1.0/@0", CfXg_Gscal_tot)')
self.modelBuilder.out.Print()
def getHiggsSignalYieldScale(self,production,decay,energy):
name = "CfXg_XSBRscal_%s_%s" % (production,decay)
if self.modelBuilder.out.function(name) == None:
XSscal = 'CF' if production in ["ggH","ttH"] else 'CV'
BRscal = "hgg"
if decay in ["hww", "hzz"]: BRscal = "hv"
if decay in ["hbb", "htt"]: BRscal = "hf"
self.modelBuilder.factory_('expr::%s("@0*@0 * @1", %s, CfXg_BRscal_%s)' % (name, XSscal, BRscal))
return name
示例12: MepsHiggs
# 需要导入模块: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder import SMHiggsBuilder [as 别名]
# 或者: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder.SMHiggsBuilder import makeBR [as 别名]
#.........这里部分代码省略.........
self.setup()
def setup(self):
self.modelBuilder.doVar("SM_VEV[246.22]")
self.msbar = {
'top' : (160, (-4.3,+4.8)),
'b' : (4.18, (-0.03,+0.03)),
'tau' : (1.77682, (-0.16,+0.16)),
'mu' : (0.105658, (-0.0000035,+0.0000035)),
'W' : (80.385, (-0.015,+0.015)),
'Z' : (91.1876, (-0.0021,+0.0021)),
}
for name, vals in self.msbar.iteritems():
#self.modelBuilder.doVar("M%s_MSbar[%s,%s,%s]" % (name, vals[0], vals[0]+vals[1][0], vals[0]+vals[1][1]))
self.modelBuilder.doVar("M%s_MSbar[%s]" % (name, vals[0]))
if name in ('W','Z'):
# # Ellis cv == v (mv^(2 e)/M^(1 + 2 e))
# self.modelBuilder.factory_(
# 'expr::C%(name)s("@0 * TMath::Power(@3,2*@2) / TMath::Power(@1,1+2*@2)", SM_VEV, M, eps, M%(name)s_MSbar)' % locals() )
# # AD k = (M/v) eps m^(N(eps-1))
# self.modelBuilder.factory_(
# 'expr::C%(name)s("@1 * @2 * TMath::Power(@3,2*(@2-1)) / @0", SM_VEV, M, eps, M%(name)s_MSbar)' % locals() )
# # GP k = (v/M)^2 (m/M)^(2eps)
self.modelBuilder.factory_(
'expr::C%(name)s("TMath::Power(@0/@1,2) * TMath::Power(@3/@1,2*@2)", SM_VEV, M, eps, M%(name)s_MSbar)' % locals() )
else:
# # Ellis cf == v (mf^e/M^(1 + e))
# self.modelBuilder.factory_(
# 'expr::C%(name)s("@0 * TMath::Power(@3,@2) / TMath::Power(@1,[email protected])", SM_VEV, M, eps, M%(name)s_MSbar)' % locals() )
# AD k = (M/v) eps m^(N(eps-1))
# self.modelBuilder.factory_(
# 'expr::C%(name)s("@1 * @2 * TMath::Power(@3,@2-1) / @0", SM_VEV, M, eps, M%(name)s_MSbar)' % locals() )
# GP k = (v/M) (m/M)^eps
self.modelBuilder.factory_(
'expr::C%(name)s("(@0/@1) * TMath::Power(@3/@1,@2)", SM_VEV, M, eps, M%(name)s_MSbar)' % locals() )
self.productionScaling = {
'ttH':'Ctop',
'WH':'CW',
'ZH':'CZ',
}
self.SMH.makeScaling('ggH', Cb='Cb', Ctop='Ctop')
self.SMH.makeScaling('qqH', CW='CW', CZ='CZ')
self.SMH.makeScaling('hgluglu', Cb='Cb', Ctop='Ctop')
self.SMH.makeScaling('hgg', Cb='Cb', Ctop='Ctop', CW='CW', Ctau='Ctau')
self.SMH.makeScaling('hzg', Cb='Cb', Ctop='Ctop', CW='CW', Ctau='Ctau')
## partial widths, normalized to the SM one, for decays scaling with F, V and total
for d in [ "htt", "hbb", "hcc", "hww", "hzz", "hgluglu", "htoptop", "hgg", "hzg", "hmm", "hss" ]:
self.SMH.makeBR(d)
self.modelBuilder.factory_('expr::Meps_Gscal_w("@0*@0 * @1", CW, SM_BR_hww)')
self.modelBuilder.factory_('expr::Meps_Gscal_z("@0*@0 * @1", CZ, SM_BR_hzz)')
self.modelBuilder.factory_('expr::Meps_Gscal_b("@0*@0 * @1", Cb, SM_BR_hbb)')
self.modelBuilder.factory_('expr::Meps_Gscal_tau("@0*@0 * @1", Ctau, SM_BR_htt)')
self.modelBuilder.factory_('expr::Meps_Gscal_mu("@0*@0 * @1", Cmu, SM_BR_hmm)')
self.modelBuilder.factory_('expr::Meps_Gscal_top("@0*@0 * @1", Ctop, SM_BR_htoptop)')
self.modelBuilder.factory_('expr::Meps_Gscal_glu("@0 * @1", Scaling_hgluglu, SM_BR_hgluglu)')
self.modelBuilder.factory_('expr::Meps_Gscal_gg("@0 * @1", Scaling_hgg, SM_BR_hgg)')
self.modelBuilder.factory_('expr::Meps_Gscal_zg("@0 * @1", Scaling_hzg, SM_BR_hzg)')
self.modelBuilder.factory_('sum::Meps_Gscal_tot(Meps_Gscal_w, Meps_Gscal_z, Meps_Gscal_b, Meps_Gscal_tau, Meps_Gscal_mu, Meps_Gscal_top, Meps_Gscal_glu, Meps_Gscal_gg, Meps_Gscal_zg, SM_BR_hcc, SM_BR_hss)')
## BRs, normalized to the SM ones: they scale as (coupling/coupling_SM)^2 / (totWidth/totWidthSM)^2
self.modelBuilder.factory_('expr::Meps_BRscal_hww("@0*@0/@1", CW, Meps_Gscal_tot)')
self.modelBuilder.factory_('expr::Meps_BRscal_hzz("@0*@0/@1", CZ, Meps_Gscal_tot)')
self.modelBuilder.factory_('expr::Meps_BRscal_hbb("@0*@0/@1", Cb, Meps_Gscal_tot)')
self.modelBuilder.factory_('expr::Meps_BRscal_htt("@0*@0/@1", Ctau, Meps_Gscal_tot)')
self.modelBuilder.factory_('expr::Meps_BRscal_hmm("@0*@0/@1", Cmu, Meps_Gscal_tot)')
self.modelBuilder.factory_('expr::Meps_BRscal_hgg("@0/@1", Scaling_hgg, Meps_Gscal_tot)')
self.modelBuilder.factory_('expr::Meps_BRscal_hzg("@0/@1", Scaling_hzg, Meps_Gscal_tot)')
self.modelBuilder.out.Print()
def getHiggsSignalYieldScale(self,production,decay,energy):
name = 'Meps_XSBRscal_%(production)s_%(decay)s' % locals()
if production in ('ggH','qqH'):
self.productionScaling[production]='Scaling_'+production+'_'+energy
name += '_%(energy)s' % locals()
if self.modelBuilder.out.function(name):
return name
if production == "VH":
print "WARNING: You are trying to use a VH production mode in a model that needs WH and ZH separately. "\
"The best I can do is to scale [%(production)s, %(decay)s, %(energy)s] with the decay BR only but this is wrong..." % locals()
self.modelBuilder.factory_('expr::%(name)s("1.0*@0", Meps_BRscal_%(decay)s)' % locals())
return name
XSscal = self.productionScaling[production]
if production == 'ggH':
self.modelBuilder.factory_('expr::%(name)s("@0 * @1", %(XSscal)s, Meps_BRscal_%(decay)s)' % locals())
else:
self.modelBuilder.factory_('expr::%(name)s("@0*@0 * @1", %(XSscal)s, Meps_BRscal_%(decay)s)' % locals())
return name
示例13: ResolvedC6
# 需要导入模块: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder import SMHiggsBuilder [as 别名]
# 或者: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder.SMHiggsBuilder import makeBR [as 别名]
class ResolvedC6(SMLikeHiggsModel):
"assume the SM coupling but let the Higgs mass to float"
def __init__(self):
SMLikeHiggsModel.__init__(self) # not using 'super(x,self).__init__' since I don't understand it
self.floatMass = False
self.MRange = ['150','350']
def setPhysicsOptions(self,physOptions):
for po in physOptions:
if po.startswith("higgsMassRange="):
self.floatMass = True
self.mHRange = po.replace("higgsMassRange=","").split(",")
print 'The Higgs mass range:', self.mHRange
if len(self.mHRange) != 2:
raise RuntimeError, "Higgs mass range definition requires two extrema."
elif float(self.mHRange[0]) >= float(self.mHRange[1]):
raise RuntimeError, "Extrema for Higgs mass range defined with inverterd order. Second must be larger the first."
if po.startswith("MRange="):
self.MRange = po.replace("MRange=","").split(":")
if len(self.MRange) != 2:
raise RuntimeError, "M range requires minimal and maximal value"
elif float(self.MRange[0]) >= float(self.MRange[1]):
raise RuntimeError, "minimal and maximal range swapped. Second value must be larger first one"
def doParametersOfInterest(self):
"""Create POI out of signal strength and MH"""
# --- Signal Strength as only POI ---
self.modelBuilder.doVar("CW[1.0,0.0,5.0]")
self.modelBuilder.doVar("CZ[1.0,0.0,5.0]")
self.modelBuilder.doVar("Ctop[1.0,0.0,5.0]")
self.modelBuilder.doVar("Cb[1.0,0.0,5.0]")
self.modelBuilder.doVar("Ctau[1.0,0.0,5.0]")
self.modelBuilder.doVar("Cmu[1.0,0.0,5.0]")
if self.floatMass:
if self.modelBuilder.out.var("MH"):
self.modelBuilder.out.var("MH").setRange(float(self.mHRange[0]),float(self.mHRange[1]))
self.modelBuilder.out.var("MH").setConstant(False)
else:
self.modelBuilder.doVar("MH[%s,%s]" % (self.mHRange[0],self.mHRange[1]))
self.modelBuilder.doSet("POI",'MH,CW,CZ,Ctop,Cb,Ctau,Cmu')
else:
if self.modelBuilder.out.var("MH"):
self.modelBuilder.out.var("MH").setVal(self.options.mass)
self.modelBuilder.out.var("MH").setConstant(True)
else:
self.modelBuilder.doVar("MH[%g]" % self.options.mass)
self.modelBuilder.doSet("POI",'CW,CZ,Ctop,Cb,Ctau,Cmu')
self.SMH = SMHiggsBuilder(self.modelBuilder)
self.setup()
def setup(self):
self.productionScaling = {
'ttH':'Ctop',
'WH':'CW',
'ZH':'CZ',
}
self.SMH.makeScaling('ggH', Cb='Cb', Ctop='Ctop')
self.SMH.makeScaling('qqH', CW='CW', CZ='CZ')
self.SMH.makeScaling('hgluglu', Cb='Cb', Ctop='Ctop')
self.SMH.makeScaling('hgg', Cb='Cb', Ctop='Ctop', CW='CW', Ctau='Ctau')
self.SMH.makeScaling('hzg', Cb='Cb', Ctop='Ctop', CW='CW', Ctau='Ctau')
## partial widths, normalized to the SM one, for decays scaling with F, V and total
for d in [ "htt", "hbb", "hcc", "hww", "hzz", "hgluglu", "htoptop", "hgg", "hzg", "hmm", "hss" ]:
self.SMH.makeBR(d)
self.modelBuilder.factory_('expr::wztbtm_Gscal_w("@0*@0 * @1", CW, SM_BR_hww)')
self.modelBuilder.factory_('expr::wztbtm_Gscal_z("@0*@0 * @1", CZ, SM_BR_hzz)')
self.modelBuilder.factory_('expr::wztbtm_Gscal_b("@0*@0 * @1", Cb, SM_BR_hbb)')
self.modelBuilder.factory_('expr::wztbtm_Gscal_tau("@0*@0 * @1", Ctau, SM_BR_htt)')
self.modelBuilder.factory_('expr::wztbtm_Gscal_mu("@0*@0 * @1", Cmu, SM_BR_hmm)')
self.modelBuilder.factory_('expr::wztbtm_Gscal_top("@0*@0 * @1", Ctop, SM_BR_htoptop)')
self.modelBuilder.factory_('expr::wztbtm_Gscal_glu("@0 * @1", Scaling_hgluglu, SM_BR_hgluglu)')
self.modelBuilder.factory_('expr::wztbtm_Gscal_gg("@0 * @1", Scaling_hgg, SM_BR_hgg)')
self.modelBuilder.factory_('expr::wztbtm_Gscal_zg("@0 * @1", Scaling_hzg, SM_BR_hzg)')
self.modelBuilder.factory_('sum::wztbtm_Gscal_tot(wztbtm_Gscal_w, wztbtm_Gscal_z, wztbtm_Gscal_b, wztbtm_Gscal_tau, wztbtm_Gscal_mu, wztbtm_Gscal_top, wztbtm_Gscal_glu, wztbtm_Gscal_gg, wztbtm_Gscal_zg, SM_BR_hcc, SM_BR_hss)')
## BRs, normalized to the SM ones: they scale as (coupling/coupling_SM)^2 / (totWidth/totWidthSM)^2
self.modelBuilder.factory_('expr::wztbtm_BRscal_hww("@0*@0/@1", CW, wztbtm_Gscal_tot)')
self.modelBuilder.factory_('expr::wztbtm_BRscal_hzz("@0*@0/@1", CZ, wztbtm_Gscal_tot)')
self.modelBuilder.factory_('expr::wztbtm_BRscal_hbb("@0*@0/@1", Cb, wztbtm_Gscal_tot)')
self.modelBuilder.factory_('expr::wztbtm_BRscal_hss("@0*@0/@1", Cb, wztbtm_Gscal_tot)')
self.modelBuilder.factory_('expr::wztbtm_BRscal_htt("@0*@0/@1", Ctau, wztbtm_Gscal_tot)')
self.modelBuilder.factory_('expr::wztbtm_BRscal_hcc("@0*@0/@1", Ctop, wztbtm_Gscal_tot)')
self.modelBuilder.factory_('expr::wztbtm_BRscal_hmm("@0*@0/@1", Cmu, wztbtm_Gscal_tot)')
self.modelBuilder.factory_('expr::wztbtm_BRscal_hgg("@0/@1", Scaling_hgg, wztbtm_Gscal_tot)')
self.modelBuilder.factory_('expr::wztbtm_BRscal_hzg("@0/@1", Scaling_hzg, wztbtm_Gscal_tot)')
self.modelBuilder.factory_('expr::wztbtm_BRscal_hgluglu("@0/@1", Scaling_hgluglu, wztbtm_Gscal_tot)')
self.modelBuilder.out.Print()
def getHiggsSignalYieldScale(self,production,decay,energy):
name = 'wztbtm_XSBRscal_%(production)s_%(decay)s' % locals()
if production in ('ggH','qqH'):
self.productionScaling[production]='Scaling_'+production+'_'+energy
name += '_%(energy)s' % locals()
#.........这里部分代码省略.........
示例14: CbCtauMSSMHiggs
# 需要导入模块: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder import SMHiggsBuilder [as 别名]
# 或者: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder.SMHiggsBuilder import makeBR [as 别名]
class CbCtauMSSMHiggs(MSSMLikeHiggsModel):
"testing Cb and Ctau. MH is fixed for now. In ggH loop assume SM for all but Cb. Everything normalized to SM."
def __init__(self):
MSSMLikeHiggsModel.__init__(self) # not using 'super(x,self).__init__' since I don't understand it
self.floatMass = False
#self.mARange = []
self.tanb = 30
self.cbRange = ['-2','2']
self.ctauRange = ['-2','2']
def setPhysicsOptions(self,physOptions):
for po in physOptions:
if po.startswith("higgsMassRange="):
self.floatMass = True
self.mARange = po.replace("higgsMassRange=","").split(",")
print 'The Higgs mass range:', self.mARange
if len(self.mARange) != 2:
raise RuntimeError, "Higgs mass range definition requires two extrema."
elif float(self.mARange[0]) >= float(self.mARange[1]):
raise RuntimeError, "Extrema for Higgs mass range defined with inverterd order. Second must be larger the first."
if po.startswith("cbRange="):
self.cbRange = po.replace("cbRange=","").split(":")
if len(self.cbRange) != 2:
raise RuntimeError, "cb signal strength range requires minimal and maximal value"
elif float(self.cbRange[0]) >= float(self.cbRange[1]):
raise RuntimeError, "minimal and maximal range swapped. Second value must be larger first one"
if po.startswith("ctauRange="):
self.ctauRange = po.replace("ctauRange=","").split(":")
if len(self.ctauRange) != 2:
raise RuntimeError, "ctau signal strength range requires minimal and maximal value"
elif float(self.ctauRange[0]) >= float(self.ctauRange[1]):
raise RuntimeError, "minimal and maximal range swapped. Second value must be larger first one"
def doParametersOfInterest(self):
"""Create POI out of signal strength and MH"""
# --- Signal Strength as only POI ---
self.modelBuilder.doVar("Cb[1,%s,%s]" % (self.cbRange[0], self.cbRange[1]))
self.modelBuilder.doVar("Ctau[1,%s,%s]" % (self.ctauRange[0], self.ctauRange[1]))
if self.floatMass:
if self.modelBuilder.out.var("MH"):
self.modelBuilder.out.var("MH").setRange(float(self.mARange[0]),float(self.mARange[1]))
self.modelBuilder.out.var("MH").setConstant(False)
else:
self.modelBuilder.doVar("MH[%s,%s]" % (self.mARange[0],self.mARange[1]))
self.modelBuilder.doSet("POI",'Cb,Ctau,MH')
else:
if self.modelBuilder.out.var("MH"):
self.modelBuilder.out.var("MH").setVal(self.options.mass)
self.modelBuilder.out.var("MH").setConstant(True)
else:
self.modelBuilder.doVar("MH[%g]" % self.options.mass)
self.modelBuilder.doSet("POI",'Cb,Ctau')
self.SMH = SMHiggsBuilder(self.modelBuilder)
self.setup()
def setup(self):
self.decayScaling = {
'htt':'htautau',
'hbb':'hbb',
}
self.productionScaling = {
'bbH':'Cb',
}
# scalings of the loops
## self.BSMscaling('ggH', Cb='Cb', Ctau='Ctau')
## self.BSMscaling('hgg', Cb='Cb', Ctau='Ctau')
## self.BSMscaling('hzg', Cb='Cb', Ctau='Ctau')
self.SMH.makeScaling('ggH', Cb='Cb', Ctop='1')
self.SMH.makeScaling('hgg', Cb='Cb', Ctop='1', CW='1', Ctau='Ctau')
self.SMH.makeScaling('hzg', Cb='Cb', Ctop='1', CW='1', Ctau='Ctau')
##partial widths, normalized to SM, for decays scaling with b, tau and total
for d in [ "htt", "hbb", "hcc", "hww", "hzz", "hgluglu", "htoptop", "hgg", "hzg", "hmm", "hss"]:
self.SMH.makeBR(d)
self.modelBuilder.factory_('expr::CbCtau_Gscal_sumb("@0*@0 * @1", Cb, SM_BR_hbb)')
self.modelBuilder.factory_('expr::CbCtau_Gscal_sumtau("@0*@0 * @1", Ctau, SM_BR_htt)')
self.modelBuilder.factory_('expr::CbCtau_Gscal_gg("@0 * @1", Scaling_hgg, SM_BR_hgg)')
self.modelBuilder.factory_('expr::CbCtau_Gscal_Zg("@0 * @1", Scaling_hzg, SM_BR_hzg)')
self.modelBuilder.factory_('sum::CbCtau_Gscal_tot(CbCtau_Gscal_sumb, CbCtau_Gscal_sumtau, CbCtau_Gscal_gg, CbCtau_Gscal_Zg, SM_BR_hcc, SM_BR_htoptop, SM_BR_hgluglu, SM_BR_hmm, SM_BR_hss, SM_BR_hww, SM_BR_hzz)')
## BRs, normalized to SM: they scale as (coupling/partial_SM)^2 / (totWidth/total_SM)^2
self.modelBuilder.factory_('expr::CbCtau_BRscal_hbb("@0*@0/@1", Cb, CbCtau_Gscal_tot)')
self.modelBuilder.factory_('expr::CbCtau_BRscal_htautau("@0*@0/@1", Ctau, CbCtau_Gscal_tot)')
self.modelBuilder.out.Print()
def getHiggsSignalYieldScale(self,production,decay,energy):
#print production, decay, energy
name = "CbCtau_XSBRscal_%s_%s" % (production,decay)
#Special case that depends on Energy
if production == 'ggH':
self.productionScaling[production] = 'Scaling_ggH_' + energy
name += '_%(energy)s' % locals()
#.........这里部分代码省略.........
示例15: C6
# 需要导入模块: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder import SMHiggsBuilder [as 别名]
# 或者: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder.SMHiggsBuilder import makeBR [as 别名]
class C6(SMLikeHiggsModel):
"assume the SM coupling but let the Higgs mass to float"
def __init__(self):
SMLikeHiggsModel.__init__(self) # not using 'super(x,self).__init__' since I don't understand it
self.floatMass = False
self.doHZg = False
def setPhysicsOptions(self,physOptions):
for po in physOptions:
if po.startswith("higgsMassRange="):
self.floatMass = True
self.mHRange = po.replace("higgsMassRange=","").split(",")
print 'The Higgs mass range:', self.mHRange
if len(self.mHRange) != 2:
raise RuntimeError, "Higgs mass range definition requires two extrema"
elif float(self.mHRange[0]) >= float(self.mHRange[1]):
raise RuntimeError, "Extrama for Higgs mass range defined with inverterd order. Second must be larger the first"
if po == 'doHZg':
self.doHZg = True
def doParametersOfInterest(self):
"""Create POI out of signal strength and MH"""
self.modelBuilder.doVar("kV[1,0.0,2.0]")
self.modelBuilder.doVar("ktau[1,0.0,2.0]")
self.modelBuilder.doVar("ktop[1,0.0,2.0]")
self.modelBuilder.doVar("kbottom[1,0.0,2.0]")
self.modelBuilder.doVar("kgluon[1,0.0,2.0]")
self.modelBuilder.doVar("kgamma[1,0.0,2.0]")
pois = 'kV,ktau,ktop,kbottom,kgluon,kgamma'
if self.doHZg:
self.modelBuilder.doVar("kZgamma[1,0.0,30.0]")
pois += ",kZgamma"
if self.floatMass:
if self.modelBuilder.out.var("MH"):
self.modelBuilder.out.var("MH").setRange(float(self.mHRange[0]),float(self.mHRange[1]))
self.modelBuilder.out.var("MH").setConstant(False)
else:
self.modelBuilder.doVar("MH[%s,%s]" % (self.mHRange[0],self.mHRange[1]))
self.modelBuilder.doSet("POI",pois+',MH')
else:
if self.modelBuilder.out.var("MH"):
self.modelBuilder.out.var("MH").setVal(self.options.mass)
self.modelBuilder.out.var("MH").setConstant(True)
else:
self.modelBuilder.doVar("MH[%g]" % self.options.mass)
self.modelBuilder.doSet("POI",pois)
self.SMH = SMHiggsBuilder(self.modelBuilder)
self.setup()
def setup(self):
# SM BR
for d in [ "htt", "hbb", "hcc", "hww", "hzz", "hgluglu", "htoptop", "hgg", "hzg", "hmm", "hss" ]: self.SMH.makeBR(d)
## total witdhs, normalized to the SM one
self.modelBuilder.factory_('expr::c6_Gscal_Vectors("@0*@0 * (@[email protected])", kV, SM_BR_hzz, SM_BR_hww)')
self.modelBuilder.factory_('expr::c6_Gscal_tau("@0*@0 * (@[email protected])", ktau, SM_BR_htt, SM_BR_hmm)')
self.modelBuilder.factory_('expr::c6_Gscal_top("@0*@0 * (@[email protected])", ktop, SM_BR_htoptop, SM_BR_hcc)')
self.modelBuilder.factory_('expr::c6_Gscal_bottom("@0*@0 * (@[email protected])", kbottom, SM_BR_hbb, SM_BR_hss)')
self.modelBuilder.factory_('expr::c6_Gscal_gluon("@0*@0 * @1", kgluon, SM_BR_hgluglu)')
if not self.doHZg:
self.modelBuilder.factory_('expr::c6_Gscal_gamma("@0*@0 * (@[email protected])", kgamma, SM_BR_hgg, SM_BR_hzg)')
else:
self.modelBuilder.factory_('expr::c6_Gscal_gamma("@0*@0 *@[email protected]*@2*@3", kgamma, SM_BR_hgg, kZgamma, SM_BR_hzg)')
self.modelBuilder.factory_('sum::c6_Gscal_tot(c6_Gscal_Vectors, c6_Gscal_tau, c6_Gscal_top, c6_Gscal_bottom, c6_Gscal_gluon, c6_Gscal_gamma)')
## BRs, normalized to the SM ones: they scale as (partial/partial_SM)^2 / (total/total_SM)^2
self.modelBuilder.factory_('expr::c6_BRscal_hvv("@0*@0/@1", kV, c6_Gscal_tot)')
self.modelBuilder.factory_('expr::c6_BRscal_htt("@0*@0/@1", ktau, c6_Gscal_tot)')
self.modelBuilder.factory_('expr::c6_BRscal_hbb("@0*@0/@1", kbottom, c6_Gscal_tot)')
self.modelBuilder.factory_('expr::c6_BRscal_hgg("@0*@0/@1", kgamma, c6_Gscal_tot)')
if self.doHZg:
self.modelBuilder.factory_('expr::c6_BRscal_hzg("@0*@0/@1", kZgamma, c6_Gscal_tot)')
def getHiggsSignalYieldScale(self,production,decay,energy):
name = "c6_XSBRscal_%s_%s" % (production,decay)
print '[LOFullParametrization::C6]'
print name, production, decay, energy
if self.modelBuilder.out.function(name) == None:
XSscal = "kgluon"
if production in ["WH","ZH","VH","qqH"]: XSscal = "kV"
if production == "ttH": XSscal = "ktop"
BRscal = "hgg"
if decay in ["hbb", "htt"]: BRscal = decay
if decay in ["hww", "hzz"]: BRscal = "hvv"
if self.doHZg and decay == "hzg": BRscal = "hzg"
self.modelBuilder.factory_('expr::%s("@0*@0 * @1", %s, c6_BRscal_%s)' % (name, XSscal, BRscal))
return name