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.jEMThreshold Class Reference
Inheritance diagram for python.L1.Base.Thresholds.jEMThreshold:
Collaboration diagram for python.L1.Base.Thresholds.jEMThreshold:

Public Member Functions

def __init__ (self, name, ttype='jEM', mapping=-1)
 
def isV (self)
 
def isI (self)
 
def isL (self)
 
def isM (self)
 
def setIsolation (self, iso="None", frac="None", frac2="None")
 
def addThrValue (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

 suffix
 
 iso
 
 frac
 
 frac2
 
 name
 
 ttype
 
 mapping
 
 run
 
 thresholdValues
 

Static Public Attributes

 l1configForRegistration
 

Static Private Attributes

 __slots__
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __init__()

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

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

433  def __init__(self, name, ttype = 'jEM', mapping = -1):
434  super(jEMThreshold,self).__init__(name = name, ttype = ttype, mapping = mapping, run = 3 if ttype=='jEM' else 2)
435  mres = re.match("(?P<type>[A-z]*)[0-9]*(?P<suffix>[VHILMT]*)",name).groupdict()
436  self.suffix = mres["suffix"]
437  self.iso = "None"
438  self.frac = "None"
439  self.frac2 = "None"
440 

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 

◆ addThrValue()

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

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

466  def addThrValue(self, value, *args, **kwargs):
467  # supporting both EM and TAU
468  defargs = ThresholdValue.getDefaults(self.ttype.name)
469  posargs = dict(zip(['etamin', 'etamax', 'phimin', 'phimax', 'priority'], args))
470 
471  # then we evaluate the arguments: first defaults, then positional arguments, then named arguments
472  p = deepcopy(defargs)
473  p.update(posargs)
474  p.update(kwargs)
475 
476  thrv = ThresholdValue(self.ttype, value,
477  etamin = p['etamin'], etamax=p['etamax'], phimin=p['phimin'], phimax=p['phimax'],
478  priority = p['priority'], name = self.name+'full')
479  if len(self.thresholdValues):
480  raise RuntimeError("Threshold %s of type %s cannot have multiple Et cuts" % ( self.name, self.ttype ) )
481  self.thresholdValues.append(thrv)
482  return self
483 

◆ 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 

◆ isI()

def python.L1.Base.Thresholds.jEMThreshold.isI (   self)

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

444  def isI(self):
445  return 'I' in self.suffix
446 

◆ isL()

def python.L1.Base.Thresholds.jEMThreshold.isL (   self)

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

447  def isL(self):
448  return 'L' in self.suffix
449 

◆ 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 

◆ isM()

def python.L1.Base.Thresholds.jEMThreshold.isM (   self)

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

450  def isM(self):
451  return 'M' in self.suffix
452 

◆ isV()

def python.L1.Base.Thresholds.jEMThreshold.isV (   self)

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

441  def isV(self):
442  return 'V' in self.suffix
443 

◆ json()

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

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

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

484  def json(self):
485  confObj = odict()
486  confObj["mapping"] = self.mapping
487  confObj["iso"] = self.iso
488  confObj["frac"] = self.frac
489  confObj["frac2"] = self.frac2
490  confObj["thrValues"] = []
491  for thrV in self.thresholdValues:
492  tvco = odict()
493  tvco["value"] = thrV.value
494  tvco["etamin"] = thrV.etamin
495  tvco["etamax"] = thrV.etamax
496  tvco["priority"] = thrV.priority
497  confObj["thrValues"].append( tvco )
498  return confObj
499 
500 

◆ setIsolation()

def python.L1.Base.Thresholds.jEMThreshold.setIsolation (   self,
  iso = "None",
  frac = "None",
  frac2 = "None" 
)

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

453  def setIsolation(self, iso = "None", frac = "None", frac2 = "None"):
454  allowed = [ "None", "Loose", "Medium", "Tight" ]
455  if iso not in allowed:
456  raise RuntimeError("Threshold %s of type %s: isolation wp %s not allowed for iso, must be one of %s", self.name, self.ttype, iso, ', '.join(allowed) )
457  if frac not in allowed:
458  raise RuntimeError("Threshold %s of type %s: isolation wp %s not allowed for frac, must be one of %s", self.name, self.ttype, frac, ', '.join(allowed) )
459  if frac2 not in allowed:
460  raise RuntimeError("Threshold %s of type %s: isolation wp %s not allowed for frac2, must be one of %s", self.name, self.ttype, frac2, ', '.join(allowed) )
461  self.iso = iso
462  self.frac = frac
463  self.frac2 = frac2
464  return self
465 

◆ 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

◆ frac

python.L1.Base.Thresholds.jEMThreshold.frac

◆ frac2

python.L1.Base.Thresholds.jEMThreshold.frac2

◆ iso

python.L1.Base.Thresholds.jEMThreshold.iso

◆ 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

◆ suffix

python.L1.Base.Thresholds.jEMThreshold.suffix

◆ thresholdValues

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

◆ ttype

python.L1.Base.Thresholds.Threshold.ttype
inherited

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
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
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