ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Static Private Attributes | List of all members
python.L1.Base.Thresholds.LegacyThreshold Class Reference
Inheritance diagram for python.L1.Base.Thresholds.LegacyThreshold:
Collaboration diagram for python.L1.Base.Thresholds.LegacyThreshold:

Public Member Functions

def __init__ (self, name, ttype, mapping=-1)
 
def addThrValue (self, value, *args, **kwargs)
 
def addLegacyEMThresholdValue (self, value, *args, **kwargs)
 
def addLegacyJetThresholdValue (self, value, *args, **kwargs)
 
def addLegacyEnergyThresholdValue (self, value, *args, **kwargs)
 
def json (self)
 
def __str__ (self)
 
def getVarName (self)
 
def isLegacy (self)
 
def thresholdInGeV (self)
 

Static Public Member Functions

def setMenuConfig (mc)
 

Public Attributes

 ttype
 
 name
 
 mapping
 
 run
 
 thresholdValues
 

Static Public Attributes

 l1configForRegistration
 

Static Private Attributes

 __slots__
 

Detailed Description

Definition at line 150 of file Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/Thresholds.py.

Constructor & Destructor Documentation

◆ __init__()

def python.L1.Base.Thresholds.LegacyThreshold.__init__ (   self,
  name,
  ttype,
  mapping = -1 
)

Definition at line 152 of file Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/Thresholds.py.

152  def __init__(self, name, ttype, mapping = -1):
153  super(LegacyThreshold,self).__init__(name = name, ttype = ttype, mapping = mapping, run = 2)
154 

Member Function Documentation

◆ __str__()

def python.L1.Base.Thresholds.Threshold.__str__ (   self)
inherited

Definition at line 121 of file Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/Thresholds.py.

121  def __str__(self):
122  return self.name
123 

◆ addLegacyEMThresholdValue()

def python.L1.Base.Thresholds.LegacyThreshold.addLegacyEMThresholdValue (   self,
  value,
args,
**  kwargs 
)

Definition at line 164 of file Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/Thresholds.py.

164  def addLegacyEMThresholdValue(self, value, *args, **kwargs):
165  # supporting both EM and TAU
166  defargs = ThresholdValue.getDefaults(self.ttype.name)
167  posargs = dict(zip(['etamin', 'etamax', 'phimin', 'phimax', 'em_isolation', 'had_isolation', 'had_veto', 'priority', 'isobits', 'use_relIso'], args))
168  # then we evaluate the arguments: first defaults, then positional arguments, then named arguments
169  p = deepcopy(defargs)
170  p.update(posargs)
171  p.update(kwargs)
172  thrv = ThresholdValue( self.ttype, value,
173  etamin = p['etamin'],
174  etamax=p['etamax'],
175  phimin=p['phimin'],
176  phimax=p['phimax'],
177  priority = p['priority'],
178  name = self.name+'full')
179  thrv.setIsolation( em_isolation = p['em_isolation'],
180  had_isolation = p['had_isolation'],
181  had_veto = p['had_veto'],
182  isobits = p['isobits'],
183  use_relIso = p['use_relIso'])
184  thrv.checkOverlapAny( self.thresholdValues )
185  self.thresholdValues.append(thrv)
186  return self
187 

◆ addLegacyEnergyThresholdValue()

def python.L1.Base.Thresholds.LegacyThreshold.addLegacyEnergyThresholdValue (   self,
  value,
args,
**  kwargs 
)

Definition at line 205 of file Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/Thresholds.py.

205  def addLegacyEnergyThresholdValue(self, value, *args, **kwargs):
206  defargs = ThresholdValue.getDefaults(self.ttype.name)
207  posargs = dict(zip(['etamin', 'etamax', 'phimin', 'phimax', 'priority'], args))
208  p = deepcopy(defargs)
209  p.update(posargs)
210  p.update(kwargs)
211  thrv = ThresholdValue( self.ttype,
212  value,
213  etamin=p['etamin'],
214  etamax=p['etamax'],
215  phimin=p['phimin'],
216  phimax=p['phimax'],
217  priority=p['priority'],
218  name=self.name+'full')
219  self.thresholdValues.append(thrv)
220  return self
221 

◆ addLegacyJetThresholdValue()

def python.L1.Base.Thresholds.LegacyThreshold.addLegacyJetThresholdValue (   self,
  value,
args,
**  kwargs 
)

Definition at line 188 of file Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/Thresholds.py.

188  def addLegacyJetThresholdValue(self, value, *args, **kwargs):
189  defargs = ThresholdValue.getDefaults(self.ttype.name)
190  posargs = dict(zip(['etamin', 'etamax', 'phimin', 'phimax', 'window', 'priority'], args))
191  p = deepcopy(defargs)
192  p.update(posargs)
193  p.update(kwargs)
194  thrv = ThresholdValue( self.ttype, value,
195  etamin=p['etamin'],
196  etamax=p['etamax'],
197  phimin=p['phimin'],
198  phimax=p['phimax'],
199  window=p['window'],
200  priority=p['priority'],
201  name=self.name+'full')
202  self.thresholdValues.append(thrv)
203  return self
204 

◆ addThrValue()

def python.L1.Base.Thresholds.LegacyThreshold.addThrValue (   self,
  value,
args,
**  kwargs 
)

Definition at line 155 of file Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/Thresholds.py.

155  def addThrValue(self, value, *args, **kwargs):
156  if self.ttype == ThrType.EM or self.ttype == ThrType.TAU:
157  return self.addLegacyEMThresholdValue(value, *args, **kwargs)
158  if self.ttype == ThrType.JET:
159  return self.addLegacyJetThresholdValue(value, *args, **kwargs)
160  if self.ttype in [ThrType.JE, ThrType.TE, ThrType.XE, ThrType.XS ]:
161  return self.addLegacyEnergyThresholdValue(value, *args, **kwargs)
162  raise RuntimeError("addThrValue() not defined for threshold type %s (%s)" % (self.ttype, self.name))
163 

◆ getVarName()

def python.L1.Base.Thresholds.Threshold.getVarName (   self)
inherited
returns a string that can be used as a varname

Reimplemented in python.L1.Base.Thresholds.TopoThreshold.

Definition at line 124 of file Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/Thresholds.py.

124  def getVarName(self):
125  """returns a string that can be used as a varname"""
126  return self.name.replace('p','')
127 

◆ isLegacy()

def python.L1.Base.Thresholds.Threshold.isLegacy (   self)
inherited

Definition at line 128 of file Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/Thresholds.py.

128  def isLegacy(self):
129  return self.run == 2
130 

◆ json()

def python.L1.Base.Thresholds.LegacyThreshold.json (   self)

Reimplemented from python.L1.Base.Thresholds.Threshold.

Definition at line 222 of file Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/Thresholds.py.

222  def json(self):
223  confObj = odict()
224  confObj["mapping"] = self.mapping
225  if self.ttype == ThrType.EM:
226  confObj["thrValues"] = []
227  for thrV in self.thresholdValues:
228  confObj["thrValues"].append( odict([
229  ("value", thrV.value),
230  ("isobits", thrV.isobits),
231  ("etamin", thrV.etamin),
232  ("etamax", thrV.etamax),
233  ("phimin", thrV.phimin),
234  ("phimax", thrV.phimax),
235  ("priority", thrV.priority)
236  ]) )
237  elif self.ttype == ThrType.TAU:
238  confObj["isobits"] = self.thresholdValues[0].isobits
239  confObj["thrValues"] = []
240  for thrV in self.thresholdValues:
241  confObj["thrValues"].append( odict([
242  ("value", thrV.value),
243  ("etamin", thrV.etamin),
244  ("etamax", thrV.etamax),
245  ("phimin", thrV.phimin),
246  ("phimax", thrV.phimax),
247  ("priority", thrV.priority)
248  ]) )
249  elif self.ttype == ThrType.JET:
250  confObj["thrValues"] = []
251  for thrV in self.thresholdValues:
252  confObj["thrValues"].append( odict([
253  ("value", thrV.value),
254  ("etamin", thrV.etamin),
255  ("etamax", thrV.etamax),
256  ("phimin", thrV.phimin),
257  ("phimax", thrV.phimax),
258  ("window", thrV.window),
259  ("priority", thrV.priority)
260  ]) )
261  elif self.ttype == ThrType.TE:
262  if len(self.thresholdValues)==1:
263  confObj["value"] = self.thresholdValues[0].value
264  else:
265  confObj["thrValues"] = []
266  for thrV in self.thresholdValues:
267  confObj["thrValues"].append( odict([
268  ("value", thrV.value),
269  ("etamin", thrV.etamin),
270  ("etamax", thrV.etamax),
271  ("priority", thrV.priority)
272  ]) )
273  elif self.ttype == ThrType.XE:
274  if len(self.thresholdValues)==1:
275  confObj["value"] = self.thresholdValues[0].value
276  else:
277  confObj["thrValues"] = []
278  for thrV in self.thresholdValues:
279  confObj["thrValues"].append( odict([
280  ("value", thrV.value),
281  ("etamin", thrV.etamin),
282  ("etamax", thrV.etamax),
283  ("priority", thrV.priority)
284  ]) )
285  elif self.ttype == ThrType.XS:
286  confObj["value"] = self.thresholdValues[0].value
287  else:
288  raise RuntimeError("No json implementation for legacy threshold type %s" % self.ttype)
289  return confObj
290 
291 
292 

◆ setMenuConfig()

def python.L1.Base.Thresholds.Threshold.setMenuConfig (   mc)
staticinherited

Definition at line 108 of file Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/Thresholds.py.

108  def setMenuConfig(mc):
109  Threshold.l1configForRegistration = mc
110 

◆ thresholdInGeV()

def python.L1.Base.Thresholds.Threshold.thresholdInGeV (   self)
inherited

Definition at line 131 of file Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/Thresholds.py.

131  def thresholdInGeV(self):
132  if len(self.thresholdValues)==0:
133  return 0
134  else:
135  return float(self.thresholdValues[0].value)
136 

Member Data Documentation

◆ __slots__

python.L1.Base.Thresholds.Threshold.__slots__
staticprivateinherited

◆ l1configForRegistration

python.L1.Base.Thresholds.Threshold.l1configForRegistration
staticinherited

◆ mapping

python.L1.Base.Thresholds.Threshold.mapping
inherited

◆ name

python.L1.Base.Thresholds.Threshold.name
inherited

◆ run

python.L1.Base.Thresholds.Threshold.run
inherited

◆ thresholdValues

python.L1.Base.Thresholds.Threshold.thresholdValues
inherited

◆ ttype

python.L1.Base.Thresholds.LegacyThreshold.ttype

The documentation for this class was generated from the following file:
replace
std::string replace(std::string s, const std::string &s2, const std::string &s3)
Definition: hcg.cxx:307
json
nlohmann::json json
Definition: HistogramDef.cxx:9
dumpHVPathFromNtuple.append
bool append
Definition: dumpHVPathFromNtuple.py:91
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
readCCLHist.float
float
Definition: readCCLHist.py:83