12 "Connect to the ModelBuilder to get workspace, datacard and options. Should not be overloaded."
14 self.
DC = modelBuilder.DC
17 "Receive a list of strings with the physics options from command line"
20 """Create POI and other parameters, and define the POI set."""
22 self.modelBuilder.doVar(
"r[0,20]");
23 self.modelBuilder.doSet(
"POI",
"r")
25 if self.options.mass != 0:
26 if self.modelBuilder.out.var(
"MH"):
27 self.modelBuilder.out.var(
"MH").removeRange()
28 self.modelBuilder.out.var(
"MH").setVal(self.options.mass)
30 self.modelBuilder.doVar(
"MH[%g]" % self.options.mass);
32 "receive the usual list of (name,nofloat,pdf,args,errline) to be edited"
35 "Return the name of a RooAbsReal to scale this yield by or the two special values 1 and 0 (don't scale, and set to zero)"
36 return "r" if self.DC.isSignal[process] else 1;
43 raise RuntimeError,
"Not implemented"
45 "Split in production and decay, and call getHiggsSignalYieldScale; return 1 for backgrounds "
46 if not self.DC.isSignal[process]:
return 1
47 processSource = process
48 decaySource = self.options.fileName+
":"+bin
49 if "_" in process: (processSource, decaySource) = process.split(
"_")
50 if processSource
not in [
"ggH",
"qqH",
"VH",
"WH",
"ZH",
"ttH"]:
51 raise RuntimeError,
"Validation Error: signal process %s not among the allowed ones." % processSource
54 for D
in [
"hww",
"hzz",
"hgg",
"htt",
"hbb" ]:
56 if foundDecay:
raise RuntimeError,
"Validation Error: decay string %s contains multiple known decay names" % decaySource
58 if not foundDecay:
raise RuntimeError,
"Validation Error: decay string %s does not contain any known decay name" % decaySource
61 for D
in [
'7TeV',
'8TeV',
'14TeV' ]:
63 if foundEnergy:
raise RuntimeError,
"Validation Error: decay string %s contains multiple known energies" % decaySource
67 print "Warning: decay string %s does not contain any known energy, assuming %s" % (decaySource, foundEnergy)
72 "Doesn't do anything more, but validates that the signal process names are correct"
77 "assume the SM coupling but let the Higgs mass to float"
79 SMLikeHiggsModel.__init__(self)
82 for po
in physOptions:
83 if po.startswith(
"higgsMassRange="):
84 self.
mHRange = po.replace(
"higgsMassRange=",
"").
split(
",")
85 print 'The Higgs mass range:', self.
mHRange
87 raise RuntimeError,
"Higgs mass range definition requires two extrema"
89 raise RuntimeError,
"Extrama for Higgs mass range defined with inverterd order. Second must be larger the first"
91 """Create POI out of signal strength and MH"""
93 self.modelBuilder.doVar(
"r[1,0,20]")
94 if self.modelBuilder.out.var(
"MH"):
95 self.modelBuilder.out.var(
"MH").setRange(float(self.
mHRange[0]),float(self.
mHRange[1]))
96 self.modelBuilder.out.var(
"MH").setConstant(
False)
98 self.modelBuilder.doVar(
"MH[%s,%s]" % (self.
mHRange[0],self.
mHRange[1]))
99 self.modelBuilder.doSet(
"POI",
'r,MH')
105 "Float independently ggH and qqH cross sections"
107 SMLikeHiggsModel.__init__(self)
108 self.
modes = [
"ggH",
"qqH",
"VH",
"ttH" ]
111 for po
in physOptions:
112 if po.startswith(
"modes="): self.
modes = po.replace(
"modes=",
"").
split(
",")
113 if po.startswith(
"higgsMassRange="):
114 self.
mHRange = po.replace(
"higgsMassRange=",
"").
split(
",")
116 raise RuntimeError,
"Higgs mass range definition requires two extrema"
118 raise RuntimeError,
"Extrema for Higgs mass range defined with inverterd order. Second must be larger the first"
120 """Create POI and other parameters, and define the POI set."""
122 if "ggH" in self.
modes: self.modelBuilder.doVar(
"r_ggH[1,0,5]");
123 if "qqH" in self.
modes: self.modelBuilder.doVar(
"r_qqH[1,0,20]");
124 if "VH" in self.
modes: self.modelBuilder.doVar(
"r_VH[1,0,20]");
125 if "ttH" in self.
modes: self.modelBuilder.doVar(
"r_ttH[1,0,20]");
126 poi =
",".
join([
"r_"+m
for m
in self.
modes])
128 if self.modelBuilder.out.var(
"MH"):
130 print 'MH will be left floating within', self.
mHRange[0],
'and', self.
mHRange[1]
131 self.modelBuilder.out.var(
"MH").setRange(float(self.
mHRange[0]),float(self.
mHRange[1]))
132 self.modelBuilder.out.var(
"MH").setConstant(
False)
135 print 'MH will be assumed to be', self.options.mass
136 self.modelBuilder.out.var(
"MH").removeRange()
137 self.modelBuilder.out.var(
"MH").setVal(self.options.mass)
140 print 'MH will be left floating within', self.
mHRange[0],
'and', self.
mHRange[1]
141 self.modelBuilder.doVar(
"MH[%s,%s]" % (self.
mHRange[0],self.
mHRange[1]))
144 print 'MH (not there before) will be assumed to be', self.options.mass
145 self.modelBuilder.doVar(
"MH[%g]" % self.options.mass)
146 self.modelBuilder.doSet(
"POI",poi)
148 if production ==
"ggH":
return (
"r_ggH" if "ggH" in self.
modes else 1)
149 if production ==
"qqH":
return (
"r_qqH" if "qqH" in self.
modes else 1)
150 if production ==
"ttH":
return (
"r_ttH" if "ttH" in self.
modes else 1)
151 if production
in [
"WH",
"ZH",
"VH" ]:
return (
"r_VH" if "VH" in self.
modes else 1)
152 raise RuntimeError,
"Unknown production mode '%s'" % production
155 "Float independently ggH and qqH cross sections"
157 SMLikeHiggsModel.__init__(self)
158 self.
modes = [
"hbb",
"htt",
"hgg",
"hww",
"hzz" ]
161 for po
in physOptions:
162 if po.startswith(
"modes="): self.
modes = po.replace(
"modes=",
"").
split(
",")
163 if po.startswith(
"higgsMassRange="):
164 self.
mHRange = po.replace(
"higgsMassRange=",
"").
split(
",")
166 raise RuntimeError,
"Higgs mass range definition requires two extrema"
168 raise RuntimeError,
"Extrema for Higgs mass range defined with inverterd order. Second must be larger the first"
170 """Create POI and other parameters, and define the POI set."""
173 self.modelBuilder.doVar(
"r_%s[1,0,10]" % m);
174 poi =
",".
join([
"r_"+m
for m
in self.
modes])
176 if self.modelBuilder.out.var(
"MH"):
178 print 'MH will be left floating within', self.
mHRange[0],
'and', self.
mHRange[1]
179 self.modelBuilder.out.var(
"MH").setRange(float(self.
mHRange[0]),float(self.
mHRange[1]))
180 self.modelBuilder.out.var(
"MH").setConstant(
False)
183 print 'MH will be assumed to be', self.options.mass
184 self.modelBuilder.out.var(
"MH").removeRange()
185 self.modelBuilder.out.var(
"MH").setVal(self.options.mass)
188 print 'MH will be left floating within', self.
mHRange[0],
'and', self.
mHRange[1]
189 self.modelBuilder.doVar(
"MH[%s,%s]" % (self.
mHRange[0],self.
mHRange[1]))
192 print 'MH (not there before) will be assumed to be', self.options.mass
193 self.modelBuilder.doVar(
"MH[%g]" % self.options.mass)
194 self.modelBuilder.doSet(
"POI",poi)
196 if decay
in self.
modes:
198 elif decay
not in [
"hbb",
"htt",
"hgg",
"hww",
"hzz" ]:
199 raise RuntimeError,
"Unknown decay mode '%s'" % decay
def doParametersOfInterest
def getHiggsSignalYieldScale
def getHiggsSignalYieldScale
def getHiggsSignalYieldScale
def doParametersOfInterest
def doParametersOfInterest
def getHiggsSignalYieldScale
static std::string join(char **cmd)
def getHiggsSignalYieldScale
def doParametersOfInterest
Class that takes care of building a physics model by combining individual channels and processes toge...