-
Notifications
You must be signed in to change notification settings - Fork 0
/
HiggsWidth.py
63 lines (53 loc) · 2.63 KB
/
HiggsWidth.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
from HiggsAnalysis.CombinedLimit.PhysicsModel import *
### This is the base python class to study the Higgs width
class Higgswidth(PhysicsModel):
def __init__(self):
self.mHRange = []
self.GGsmfixed = False
self.GGsmval = 1.
self.poiMap = []
self.pois = {}
self.verbose = False
self.isPdfAnalysis = False
def setModelBuilder(self, modelBuilder):
PhysicsModel.setModelBuilder(self,modelBuilder)
self.modelBuilder.doModelBOnly = False
def getYieldScale(self,bin,process):
if process == "ggH_s": return "ggH_s_func"
elif process == "ggH_b": return "ggH_b_func"
elif process == "ggH_sbi": return "ggH_sbi_func"
else: return 1
def setPhysicsOptions(self,physOptions):
for po in physOptions:
if po.startswith("GGsmVal="):
self.GGsmval = po.replace("GGsmVal=","")
print 'G/G_SM set to :', self.GGsmval
if po == "GGsmfixed":
print "Will fix CMS_zz4l_GGsm to 1 and float mu"
self.GGsmfixed = True
if po == "pdfAnalysis": self.isPdfAnalysis = True
def doParametersOfInterest(self):
"""Create POI and other parameters, and define the POI set."""
if not self.isPdfAnalysis:
self.modelBuilder.doVar("CMS_widthH_kbkg[1.,0.,2.]")
self.modelBuilder.doVar("R[0.93,0.0001,10.]")
self.modelBuilder.doVar("CMS_zz4l_GGsm[1.,0.,30.]")
if self.GGsmfixed:
self.modelBuilder.out.var("CMS_zz4l_GGsm").setVal(1.)
self.modelBuilder.out.var("CMS_zz4l_GGsm").setConstant(True)
self.modelBuilder.out.var("R").setVal(0.01,6.)
self.modelBuilder.out.var("R").setConstant(False)
print "Fixing CMS_zz4l_GGsm"
poi = "R"
else:
self.modelBuilder.out.var("CMS_zz4l_GGsm").setRange(0.0001,50.)
self.modelBuilder.out.var("CMS_zz4l_GGsm").setVal(float(self.GGsmval))
self.modelBuilder.out.var("CMS_zz4l_GGsm").setConstant(False)
self.modelBuilder.out.var("R").setVal(1.)
self.modelBuilder.out.var("R").setConstant(False)
poi = "CMS_zz4l_GGsm"
self.modelBuilder.factory_("expr::ggH_s_func(\"@0*@1-sqrt(@0*@1*@2)\",R,CMS_zz4l_GGsm,CMS_widthH_kbkg)")
self.modelBuilder.factory_("expr::ggH_b_func(\"@2-sqrt(@0*@1*@2)\",R,CMS_zz4l_GGsm,CMS_widthH_kbkg)")
self.modelBuilder.factory_("expr::ggH_sbi_func(\"sqrt(@0*@1*@2)\",R,CMS_zz4l_GGsm,CMS_widthH_kbkg)")
self.modelBuilder.doSet("POI",poi)
higgswidth = Higgswidth()