ATLAS Offline Software
ThresholdType.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
2 
3 from enum import Enum, unique
4 from functools import total_ordering
5 
6 from AthenaCommon.Logging import logging
7 log = logging.getLogger(__name__)
8 
9 @total_ordering
10 @unique
11 class ThrType( Enum ):
12 
13  # run 3 calo and muon thresholds
14  # cTau is the combined taus computed in the L1Topo multiplicity board matching eTAU and jTAU
15  eEM = 1; jEM = 2; eTAU = 3; jTAU = 4; cTAU=5; jJ = 6; jLJ = 7; gJ = 8; gLJ = 9; gXE = 10; gTE = 11; jXE = 12; jTE = 13; MU = 14 # noqa: E702
16  # Phase-I detector thresholds
17  LArSat=15; NSWMon=16 # noqa: E702
18 
19  # NIM thresholds
20  BCM = 21; BCMCMB = 22; LUCID = 23; ZDC = 24; BPTX = 25; CALREQ = 26; MBTS = 27; MBTSSI = 28; NIM = 29 # noqa: E702
21 
22  # legacy calo thresholds
23  EM = 41; TAU = 42; JET = 43; JE = 44; XE = 45; TE = 46; XS = 47 # noqa: E702
24 
25  # zero bias threshold on CTPIN
26  ZB = 50
27  ZBTopo = 51
28 
29  # topo thresholds
30  TOPO = 60; MUTOPO = 61; MULTTOPO = 62; R2TOPO = 63 # noqa: E702
31 
32  @staticmethod
33  def LegacyTypes():
34  return [ ThrType.EM, ThrType.TAU, ThrType.JET, ThrType.XE, ThrType.TE, ThrType.XS, ThrType.ZB ]
35 
36  @staticmethod
37  def Run3Types():
38  return [ ThrType.MU, ThrType.eEM, ThrType.jEM, ThrType.eTAU, ThrType.jTAU, ThrType.cTAU, ThrType.jJ, ThrType.jLJ, ThrType.gJ, ThrType.gLJ, ThrType.gXE, ThrType.gTE, ThrType.jXE, ThrType.jTE, ThrType.LArSat, ThrType.ZBTopo ]
39 
40  @staticmethod
41  def NIMTypes():
42  return [ ThrType.BCM, ThrType.BCMCMB, ThrType.LUCID, ThrType.ZDC, ThrType.BPTX, ThrType.CALREQ, ThrType.MBTS, ThrType.MBTSSI, ThrType.NIM ]
43 
44  @staticmethod
45  def CaloTypes():
46  return [tt for tt in ThrType.LegacyTypes()+ThrType.Run3Types() if tt != ThrType.MU]
47 
48  def __lt__(self,other):
49  return self.name < other
50 
51  def __eq__(self,other):
52  return self.name == other
53 
54  def __hash__(self):
55  return hash(self.name)
56 
57  def __repr__(self):
58  return self.name
59 
60  def __str__(self):
61  return self.name
python.L1.Base.ThresholdType.ThrType
Definition: ThresholdType.py:11
python.L1.Base.ThresholdType.ThrType.__lt__
def __lt__(self, other)
Definition: ThresholdType.py:48
python.L1.Base.ThresholdType.ThrType.__repr__
def __repr__(self)
Definition: ThresholdType.py:57
python.L1.Base.ThresholdType.ThrType.Run3Types
def Run3Types()
Definition: ThresholdType.py:37
python.L1.Base.ThresholdType.ThrType.name
name
Definition: ThresholdType.py:52
python.L1.Base.ThresholdType.ThrType.CaloTypes
def CaloTypes()
Definition: ThresholdType.py:45
python.L1.Base.ThresholdType.ThrType.LegacyTypes
def LegacyTypes()
Definition: ThresholdType.py:33
python.L1.Base.ThresholdType.ThrType.__hash__
def __hash__(self)
Definition: ThresholdType.py:54
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
python.L1.Base.ThresholdType.ThrType.__eq__
def __eq__(self, other)
Definition: ThresholdType.py:51
python.L1.Base.ThresholdType.ThrType.NIMTypes
def NIMTypes()
Definition: ThresholdType.py:41
python.L1.Base.ThresholdType.ThrType.__str__
def __str__(self)
Definition: ThresholdType.py:60