本文整理汇总了Python中HiggsAnalysis.CombinedLimit.SMHiggsBuilder.SMHiggsBuilder.makeScaling方法的典型用法代码示例。如果您正苦于以下问题:Python SMHiggsBuilder.makeScaling方法的具体用法?Python SMHiggsBuilder.makeScaling怎么用?Python SMHiggsBuilder.makeScaling使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HiggsAnalysis.CombinedLimit.SMHiggsBuilder.SMHiggsBuilder
的用法示例。
在下文中一共展示了SMHiggsBuilder.makeScaling方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: LambdaduHiggs
# 需要导入模块: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder import SMHiggsBuilder [as 别名]
# 或者: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder.SMHiggsBuilder import makeScaling [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]
#.........这里部分代码省略.........
示例2: TwoHDM
# 需要导入模块: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder import SMHiggsBuilder [as 别名]
# 或者: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder.SMHiggsBuilder import makeScaling [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)')
#.........这里部分代码省略.........
示例3: PartialWidthsModel
# 需要导入模块: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder import SMHiggsBuilder [as 别名]
# 或者: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder.SMHiggsBuilder import makeScaling [as 别名]
class PartialWidthsModel(SMLikeHiggsModel):
"As in ATL-PHYS-PUB-2012-004"
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("r_WZ[1,0.0,1.0]") # bounded to 1
self.modelBuilder.doVar("r_gZ[1,0.0,2.0]")
self.modelBuilder.doVar("r_tZ[1,0.0,4.0]")
self.modelBuilder.doVar("r_bZ[1,0.0,4.0]")
self.modelBuilder.doVar("r_mZ[1,0.0,4.0]")
self.modelBuilder.doVar("r_topglu[1,0.0,4.0]")
self.modelBuilder.doVar("r_Zglu[1,0.0,4.0]")
self.modelBuilder.doVar("c_gluZ[1,0.0,3.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",'r_WZ,r_gZ,r_tZ,r_bZ,r_mZ,r_topglu,r_Zglu,c_gluZ,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",'r_WZ,r_gZ,r_tZ,r_bZ,r_mZ,r_topglu,r_Zglu,c_gluZ')
self.SMH = SMHiggsBuilder(self.modelBuilder)
self.setup()
def setup(self):
self.modelBuilder.doVar("PW_one[1]")
self.modelBuilder.factory_("prod::sr_WZ(r_WZ,r_WZ)")
self.modelBuilder.factory_("prod::sr_bZ(r_bZ,r_bZ)")
self.modelBuilder.factory_("prod::sr_tZ(r_tZ,r_tZ)")
self.modelBuilder.factory_("prod::sr_mZ(r_mZ,r_mZ)")
self.modelBuilder.factory_("prod::sr_gZ(r_gZ,r_gZ)")
self.modelBuilder.factory_("prod::sr_Zglu(r_Zglu,r_Zglu)")
self.modelBuilder.factory_("prod::sr_topglu(r_topglu,r_topglu)")
self.modelBuilder.factory_("prod::sc_gluZ(c_gluZ,c_gluZ)")
self.modelBuilder.factory_("prod::PW_XSscal_WH(sr_Zglu,sr_WZ)")
#self.modelBuilder.factory_("expr::PW_lambdaWZ(\"sqrt(@0)\",sr_WZ)")
#self.SMH.makeScaling("qqH", CW='PW_lambdaWZ', CZ="PW_one")
self.SMH.makeScaling("qqH", CW='r_WZ', CZ="PW_one")
self.modelBuilder.factory_("prod::PW_XSscal_qqH_7TeV(Scaling_qqH_7TeV,sr_Zglu)")
self.modelBuilder.factory_("prod::PW_XSscal_qqH_8TeV(Scaling_qqH_8TeV,sr_Zglu)")
self.decayScales_ = {
'hzz' : 'PW_one',
'hww' : 'sr_WZ',
'hbb' : 'sr_bZ',
'htt' : 'sr_tZ',
'hmm' : 'sr_mZ',
'hgg' : 'sr_gZ',
'hss' : 'sr_bZ',
'hcc' : 'PW_one', #
'hgluglu' : 'PW_one', #
'hzg' : 'PW_one', #
}
self.prodScales_ = {
'ggH' : 'PW_one',
'qqH' : 'PW_XSscal_qqH',
'WH' : 'PW_XSscal_WH',
'ZH' : 'sr_Zglu',
'ttH' : 'sr_topglu',
}
def getHiggsSignalYieldScale(self,production,decay,energy):
name = "c7_XSBRscal_%s_%s" % (production,decay)
if production == 'qqH': name += "_%s" % energy
if self.modelBuilder.out.function(name):
return name
dscale = self.decayScales_[decay]
pscale = self.prodScales_[production]
if production == "qqH": pscale += "_%s" % energy
print '[LOFullParametrization::PartialWidthModel]: ', name, production, decay, energy, pscale, dscale
self.modelBuilder.factory_("prod::%s(%s,sc_gluZ,%s)" % (name, dscale, pscale))
return name
示例4: LambdaWZHiggs
# 需要导入模块: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder import SMHiggsBuilder [as 别名]
# 或者: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder.SMHiggsBuilder import makeScaling [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':
#.........这里部分代码省略.........
示例5: HiggsMinimal
# 需要导入模块: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder import SMHiggsBuilder [as 别名]
# 或者: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder.SMHiggsBuilder import makeScaling [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
示例6: CvCfHiggs
# 需要导入模块: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder import SMHiggsBuilder [as 别名]
# 或者: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder.SMHiggsBuilder import makeScaling [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):
#.........这里部分代码省略.........
示例7: MepsHiggs
# 需要导入模块: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder import SMHiggsBuilder [as 别名]
# 或者: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder.SMHiggsBuilder import makeScaling [as 别名]
class MepsHiggs(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']
self.epsRange = ['-1','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, "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"
if po.startswith("epsRange="):
self.epsRange = po.replace("epsRange=","").split(":")
if len(self.epsRange) != 2:
raise RuntimeError, "epsilon range requires minimal and maximal value"
elif float(self.epsRange[0]) >= float(self.epsRange[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("M[246.22,%s,%s]" % (self.MRange[0], self.MRange[1]))
self.modelBuilder.doVar("eps[0,%s,%s]" % (self.epsRange[0], self.epsRange[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",'M,eps,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",'M,eps')
self.SMH = SMHiggsBuilder(self.modelBuilder)
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')
#.........这里部分代码省略.........
示例8: ResolvedC6
# 需要导入模块: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder import SMHiggsBuilder [as 别名]
# 或者: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder.SMHiggsBuilder import makeScaling [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()
#.........这里部分代码省略.........
示例9: CbCtauMSSMHiggs
# 需要导入模块: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder import SMHiggsBuilder [as 别名]
# 或者: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder.SMHiggsBuilder import makeScaling [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()
#.........这里部分代码省略.........
示例10: C6
# 需要导入模块: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder import SMHiggsBuilder [as 别名]
# 或者: from HiggsAnalysis.CombinedLimit.SMHiggsBuilder.SMHiggsBuilder import makeScaling [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)
self.SMH.makeScaling("tHq", CW='kV', Ctop="ktop")
self.SMH.makeScaling("tHW", CW='kV', Ctop="ktop")
## 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"
if production in [ "tHq", "tHW" ]: XSscal = "Scaling_%s_%s" % (production, energy)
BRscal = "hgg"
if decay in ["hbb", "htt"]: BRscal = decay
if decay in ["hww", "hzz"]: BRscal = "hvv"
if self.doHZg and decay == "hzg": BRscal = "hzg"
if "Scaling" in XSscal: # already squared, just put XSscal
self.modelBuilder.factory_('expr::%s("@0 * @1", %s, c6_BRscal_%s)' % (name, XSscal, BRscal))
else: # plain coupling, put (XSscal)^2
self.modelBuilder.factory_('expr::%s("@0*@0 * @1", %s, c6_BRscal_%s)' % (name, XSscal, BRscal))
return name