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

Public Member Functions

def __init__ (self, name, run=3, tgcFlags="", mapping=-1)
 
def setRegion (self, det)
 
def setTGCFlags (self, flags)
 
def setRPCFlags (self, flags)
 
def setExclusionList (self, exclusionList)
 
def setThrValue (self, thr=None, ba=None, ec=None, fw=None)
 
def json (self)
 
def __str__ (self)
 
def getVarName (self)
 
def isLegacy (self)
 
def thresholdInGeV (self)
 

Static Public Member Functions

def setMenuConfig (mc)
 

Public Attributes

 thr
 
 baThr
 
 ecThr
 
 fwThr
 
 thrIdx
 
 baIdx
 
 ecIdx
 
 fwIdx
 
 tgcFlags
 
 rpcFlags
 
 region
 
 rpcExclROIList
 
 name
 
 ttype
 
 mapping
 
 run
 
 thresholdValues
 

Static Public Attributes

 l1configForRegistration
 

Static Private Attributes

 __slots__
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __init__()

def python.L1.Base.Thresholds.MuonThreshold.__init__ (   self,
  name,
  run = 3,
  tgcFlags = "",
  mapping = -1 
)

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

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

503  def __init__(self, name, run = 3, tgcFlags = "", mapping = -1):
504  super(MuonThreshold,self).__init__(name = name, ttype = 'MU', mapping = mapping, run = run)
505  self.thr = None
506  self.baThr = None
507  self.ecThr = None
508  self.fwThr = None
509  self.thrIdx = None
510  self.baIdx = None
511  self.ecIdx = None
512  self.fwIdx = None
513  self.tgcFlags = ""
514  self.rpcFlags = ""
515  self.region = "ALL"
516  self.rpcExclROIList = None
517 

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 

◆ 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.MuonThreshold.json (   self)

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

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

590  def json(self):
591  confObj = odict()
592  confObj["mapping"] = self.mapping
593  if self.isLegacy():
594  confObj["thr"] = self.thr
595  else:
596  confObj["baThr"] = self.baThr
597  confObj["ecThr"] = self.ecThr
598  confObj["fwThr"] = self.fwThr
599  confObj["baIdx"] = self.baIdx
600  confObj["ecIdx"] = self.ecIdx
601  confObj["fwIdx"] = self.fwIdx
602  confObj["tgcFlags"] = self.tgcFlags
603  confObj["rpcFlags"] = self.rpcFlags
604  confObj["region"] = self.region
605  if self.rpcExclROIList:
606  confObj["rpcExclROIList"] = self.rpcExclROIList
607  return confObj
608 

◆ setExclusionList()

def python.L1.Base.Thresholds.MuonThreshold.setExclusionList (   self,
  exclusionList 
)

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

541  def setExclusionList(self, exclusionList):
542  self.rpcExclROIList = exclusionList
543  return self
544 

◆ 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 

◆ setRegion()

def python.L1.Base.Thresholds.MuonThreshold.setRegion (   self,
  det 
)
@det can be any combination of 'BA','EC',FW' or can be 'ALL' (case doesn't matter)

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

518  def setRegion(self,det):
519  """@det can be any combination of 'BA','EC',FW' or can be 'ALL' (case doesn't matter)"""
520  tmp = set([x.strip() for x in det.split(',')])
521  for x in tmp:
522  if not x.upper() in ['BA','EC','FW','ALL']:
523  raise RuntimeError("Unknown detector specification %s for muon threshold %s" % (x, self.name))
524  tmp = sorted([x.upper() for x in tmp])
525  if 'ALL' in tmp:
526  tmp = ['ALL']
527  self.region = ','.join(tmp)
528  return self
529 

◆ setRPCFlags()

def python.L1.Base.Thresholds.MuonThreshold.setRPCFlags (   self,
  flags 
)
flags can be a logical expression like 'M'

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

535  def setRPCFlags(self, flags):
536  """flags can be a logical expression like 'M'"""
537  self.rpcFlags = flags
538  return self
539 
540 

◆ setTGCFlags()

def python.L1.Base.Thresholds.MuonThreshold.setTGCFlags (   self,
  flags 
)
flags can be a logical expression like 'F & C | F & H | C & H'

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

530  def setTGCFlags(self, flags):
531  """flags can be a logical expression like 'F & C | F & H | C & H'"""
532  self.tgcFlags = flags
533  return self
534 

◆ setThrValue()

def python.L1.Base.Thresholds.MuonThreshold.setThrValue (   self,
  thr = None,
  ba = None,
  ec = None,
  fw = None 
)
pT parameters thr, ba, ec, fw are in GeV
Specifying thr sets all: ba, ec, and fw to that value
ba, ec, fw can then be used to overwrite it for a certain region

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

545  def setThrValue(self, thr = None, ba = None, ec = None, fw = None):
546  """
547  pT parameters thr, ba, ec, fw are in GeV
548  Specifying thr sets all: ba, ec, and fw to that value
549  ba, ec, fw can then be used to overwrite it for a certain region
550  """
551  self.thr = thr
552  self.baThr = thr
553  self.ecThr = thr
554  self.fwThr = thr
555  if ba is not None:
556  self.baThr = ba
557  if ec is not None:
558  self.ecThr = ec
559  if fw is not None:
560  self.fwThr = fw
561  if self.baThr is None or self.ecThr is None or self.fwThr is None:
562  raise RuntimeError("In muon threshold %s setThrValue() at least one region is unspecified" % self.name)
563 
564  # set the threshold index from the pT value
565  muonRoads = getTypeWideThresholdConfig(ThrType.MU)["roads"]
566  try:
567  self.baIdx = muonRoads["rpc"][self.baThr]
568  except KeyError as ex:
569  log.error("Muon PT threshold %i does not have a defined road in the barrel", self.baThr)
570  log.error("Only these barrel roads are define (in L1/Config/TypeWideThresholdConfig.py): %s", ', '.join(['%i'%x for x in muonRoads["rpc"]]))
571  raise ex
572 
573  try:
574  self.ecIdx = muonRoads["tgc"][self.ecThr]
575  except KeyError as ex:
576  log.error("Muon PT threshold %i does not have a defined road in the endcap", self.ecThr)
577  log.error("Only these endcaps roads are define (in L1/Config/TypeWideThresholdConfig.py): %s", ', '.join(['%i'%x for x in muonRoads["tgc"]]))
578  raise ex
579 
580  try:
581  self.fwIdx = muonRoads["tgc"][self.fwThr]
582  except KeyError as ex:
583  log.error("Muon PT threshold %i does not have a defined road in the endcap", self.ecThr)
584  log.error("Only these endcaps roads are define (in L1/Config/TypeWideThresholdConfig.py): %s", ', '.join(['%i'%x for x in muonRoads["tgc"]]))
585  raise ex
586 
587  return self
588 
589 

◆ 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

◆ baIdx

python.L1.Base.Thresholds.MuonThreshold.baIdx

◆ baThr

python.L1.Base.Thresholds.MuonThreshold.baThr

◆ ecIdx

python.L1.Base.Thresholds.MuonThreshold.ecIdx

◆ ecThr

python.L1.Base.Thresholds.MuonThreshold.ecThr

◆ fwIdx

python.L1.Base.Thresholds.MuonThreshold.fwIdx

◆ fwThr

python.L1.Base.Thresholds.MuonThreshold.fwThr

◆ l1configForRegistration

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

◆ mapping

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

◆ name

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

◆ region

python.L1.Base.Thresholds.MuonThreshold.region

◆ rpcExclROIList

python.L1.Base.Thresholds.MuonThreshold.rpcExclROIList

◆ rpcFlags

python.L1.Base.Thresholds.MuonThreshold.rpcFlags

◆ run

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

◆ tgcFlags

python.L1.Base.Thresholds.MuonThreshold.tgcFlags

◆ thr

python.L1.Base.Thresholds.MuonThreshold.thr

◆ thresholdValues

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

◆ thrIdx

python.L1.Base.Thresholds.MuonThreshold.thrIdx

◆ 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
python.L1.Config.TypeWideThresholdConfig.getTypeWideThresholdConfig
def getTypeWideThresholdConfig(ttype, do_HI_tob_thresholds=False, do_eFex_BDT_Tau=True)
Definition: TypeWideThresholdConfig.py:102
json
nlohmann::json json
Definition: HistogramDef.cxx:9
DerivationFramework::TriggerMatchingUtils::sorted
std::vector< typename T::value_type > sorted(T begin, T end)
Helper function to create a sorted vector from an unsorted one.
CxxUtils::set
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
Definition: bitmask.h:224
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