ATLAS Offline Software
RecMuonRoI.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
2 
3 /***************************************************************************
4  * RecMuonRoI.h - description
5  * -------------------
6  * begin : Tue Feb 25 2003
7  * email : Thorsten Wengler
8  ***************************************************************************/
9 
10 #ifndef TRIGT1INTERFACES_RECMUONROI_H
11 #define TRIGT1INTERFACES_RECMUONROI_H
12 
13 // STL include(s):
14 #include <string>
15 #include <vector>
16 
17 // Gaudi/Athena include(s):
19 
20 // Local include(s):
22 
23 // Forward declaration(s):
24 namespace TrigConf {
25  class TriggerThreshold;
26  class L1Menu;
27 }
28 
29 namespace LVL1 {
30 
31  // Forward declaration(s):
32  class RecMuonRoiSvc;
33  class ITrigT1MuonRecRoiTool;
34 
36  enum BitMask {
37  FirsCandMask = 0x00400000,
38  SectorAddressMask = 0x003fc000,
39  SysIDMask = 0x000000c0,
40  SubSysIDMask = 0x00000001,
41  SectNumBarrelMask = 0x0000003e,
42  SectNumEndcapMask = 0x0000007e,
43  SectNumForwardMask = 0x0000003e,
44  ThresNumMask = 0x00003800,
45  RoIOvlMask = 0x000007fc,
46  BarrelRoIMask = 0x0000001f,
47  BarrelOvlMask = 0x00000180,
48  EndcapRoIMask = 0x000000ff,
49  EndcapOvlMask = 0x00000100,
50  ForwardRoIMask = 0x0000003f,
51  PadOflMask = 0x00000002,
52  SectOflMask = 0x00000001,
53  TGCCandidateSignMask = 0x08000000,
54  CandidateVetoMask = 0x10000000
55  };
56 
60  class RecMuonRoI : public iRecCoordRoI {
61 
62  public:
64  enum ChargeSign {
65  NEGATIVE = 0,
66  POSITIVE = 1,
67  UNDEFINED = 100
68  }; // enum CandidateSign
69 
70  // constructor
72 
73  // constructor using Run 1+2 configuration
74  RecMuonRoI( unsigned int roIWord, const RecMuonRoiSvc* theRecRPCRoiSvc,
75  const RecMuonRoiSvc* theRecTGCRoiSvc,
76  const std::vector< TrigConf::TriggerThreshold* >* theMuonConfig );
77 
78  RecMuonRoI( unsigned int roIWord, const ITrigT1MuonRecRoiTool* theRecRPCRoiTool,
79  const ITrigT1MuonRecRoiTool* theRecTGCRoiTool,
80  const std::vector< TrigConf::TriggerThreshold* >* theMuonConfig );
81 
83  RecMuonRoI( unsigned int roIWord, const ITrigT1MuonRecRoiTool* theRecRPCRoiTool,
84  const ITrigT1MuonRecRoiTool* theRecTGCRoiTool,
85  const TrigConf::L1Menu * const l1menu );
86 
87  // does exactly like the constructor
88  void construct( unsigned int roIWord, const RecMuonRoiSvc* theRecRPCRoiSvc,
89  const RecMuonRoiSvc* theRecTGCRoiSvc,
90  const std::vector< TrigConf::TriggerThreshold* >* theMuonConfig );
91 
92  void construct( unsigned int roIWord, const ITrigT1MuonRecRoiTool* theRecRPCRoiTool,
93  const ITrigT1MuonRecRoiTool* theRecTGCRoiTool,
94  const std::vector< TrigConf::TriggerThreshold* >* theMuonConfig );
95 
96  // using Run 3 menu
97  void construct( unsigned int roIWord, const ITrigT1MuonRecRoiTool* theRecRPCRoiTool,
98  const ITrigT1MuonRecRoiTool* theRecTGCRoiTool,
99  const TrigConf::L1Menu* const l1menu );
100 
102  virtual unsigned int roiWord() const { return m_roiWord; }
103 
105  unsigned int sysID() const { return m_sysID; }
106 
108  unsigned int subsysID() const { return m_subSysID; }
109 
111  unsigned int sectorID() const { return m_sectorID; }
112 
114  virtual double phi() const { return m_phi; }
115 
117  virtual double eta() const { return m_eta; }
118 
120  unsigned int getThresholdNumber() const { return m_thresholdNumber; }
121 
123  unsigned int getThresholdValue() const { return m_thresholdValue; }
124 
126  unsigned int getRoINumber() const { return m_roiNumber; }
127 
129  unsigned int getOverlap() const { return m_overlap; }
130 
132  bool firstCandidate() const { return m_firstCandidateFlag; }
133 
135  bool sectorOverflow() const { return m_sectorOflFlag; }
136 
138  bool padOverflow() const { return m_padOflFlag; }
139 
141  ChargeSign candidateCharge() const;
142 
144  bool candidateVetoed() const;
145 
146  std::string getDebugString();
147 
148  private:
151  unsigned int getBitMaskValue( const unsigned int * uintValue, const unsigned int mask );
152 
156  unsigned int m_roiWord { 0 };
157 
160  bool m_firstCandidateFlag { false };
161 
164  bool m_sectorOflFlag { false };
165 
168  bool m_padOflFlag { false };
169 
172  unsigned int m_thresholdNumber { 0 };
173 
176  unsigned int m_thresholdValue { 0 };
177 
180  unsigned int m_roiNumber { 0 };
181 
184  unsigned int m_overlap { 0 };
185 
188  unsigned int m_sysID { 0 };
189 
192  unsigned int m_subSysID { 0 };
193 
196  unsigned int m_sectorID { 0 };
197 
199  double m_eta { 0 };
200 
202  double m_phi { 0 };
203 
204  }; // class RecMuonRoI
205 
206 } // namespace LVL1
207 
208 /* CLID for RecMuonRoI */
209 #include "AthenaKernel/CLASS_DEF.h"
211 CLASS_DEF( LVL1::RecMuonRoI, 6080, 0 )
212 
213 #endif // TRIGT1INTERFACES_RECMUONROI_H
LVL1::RecMuonRoI::getBitMaskValue
unsigned int getBitMaskValue(const unsigned int *uintValue, const unsigned int mask)
a helper function to extract the value corresponding to a bit mask from a 32 bit unsigned int
Definition: RecMuonRoI.cxx:337
LVL1::SectOflMask
@ SectOflMask
Definition: RecMuonRoI.h:52
LVL1::RecMuonRoI::subsysID
unsigned int subsysID() const
returns sub-system ID ROI (0=-z,1=+z)
Definition: RecMuonRoI.h:108
LVL1::RecMuonRoI::m_overlap
unsigned int m_overlap
the overlap information for this RoI extracted from m_roiWord in the constructor
Definition: RecMuonRoI.h:184
LVL1::RecMuonRoI::UNDEFINED
@ UNDEFINED
Candidate coming from the RPC.
Definition: RecMuonRoI.h:67
LVL1::CandidateVetoMask
@ CandidateVetoMask
Definition: RecMuonRoI.h:54
LVL1::TGCCandidateSignMask
@ TGCCandidateSignMask
Definition: RecMuonRoI.h:53
LVL1::RecMuonRoI::padOverflow
bool padOverflow() const
returns true if there were > 1 candidates in this pad
Definition: RecMuonRoI.h:138
LVL1::RecMuonRoI::RecMuonRoI
RecMuonRoI()
Definition: RecMuonRoI.h:71
LVL1::RecMuonRoI::m_sysID
unsigned int m_sysID
the system ID for this RoI (Barrel=0, Endcap=1, Forward=2) extracted from m_roiWord in the constructo...
Definition: RecMuonRoI.h:188
LVL1::BitMask
BitMask
Bit masks used to decipher the 32 bit words of a muon candidate.
Definition: RecMuonRoI.h:36
LVL1::RecMuonRoI::construct
void construct(unsigned int roIWord, const RecMuonRoiSvc *theRecRPCRoiSvc, const RecMuonRoiSvc *theRecTGCRoiSvc, const std::vector< TrigConf::TriggerThreshold * > *theMuonConfig)
Definition: RecMuonRoI.cxx:55
LVL1::RecMuonRoI::ChargeSign
ChargeSign
Charge sign of the muon candidate.
Definition: RecMuonRoI.h:64
LVL1::RecMuonRoI::m_roiNumber
unsigned int m_roiNumber
the RoI number of this RoI - extracted from m_roiWord in the constructor
Definition: RecMuonRoI.h:180
LVL1::RecMuonRoI::m_phi
double m_phi
phi value
Definition: RecMuonRoI.h:202
LVL1::RecMuonRoI::m_eta
double m_eta
eta value
Definition: RecMuonRoI.h:199
TrigConf::L1Menu
L1 menu configuration.
Definition: L1Menu.h:28
LVL1::SubSysIDMask
@ SubSysIDMask
Definition: RecMuonRoI.h:40
LVL1::RecMuonRoI::firstCandidate
bool firstCandidate() const
returns true if this was the highest pt candidate in this sector
Definition: RecMuonRoI.h:132
LVL1::RecMuonRoI::eta
virtual double eta() const
returns eta coord of ROI
Definition: RecMuonRoI.h:117
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::RecMuonRoI::m_padOflFlag
bool m_padOflFlag
flag indicating if there was more than 1 candidate in this pad - extracted from m_roiWord in the cons...
Definition: RecMuonRoI.h:168
LVL1::RecMuonRoI::m_thresholdNumber
unsigned int m_thresholdNumber
the pt threshold number associated with this RoI - extracted from m_roiWord in the constructor
Definition: RecMuonRoI.h:172
LVL1::RecMuonRoI::m_subSysID
unsigned int m_subSysID
the subSystem ID for this RoI (0=-z,1=+z) extracted from m_roiWord in the constructor
Definition: RecMuonRoI.h:192
LVL1::RecMuonRoI::POSITIVE
@ POSITIVE
Positive (mu plus) candidate in the TGC.
Definition: RecMuonRoI.h:66
LVL1::RecMuonRoI::getThresholdNumber
unsigned int getThresholdNumber() const
returns the Threshold Number (1 to 6) associated with this RecRoI
Definition: RecMuonRoI.h:120
LVL1::RecMuonRoI::roiWord
virtual unsigned int roiWord() const
returns roi word
Definition: RecMuonRoI.h:102
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:460
LVL1::BarrelRoIMask
@ BarrelRoIMask
Definition: RecMuonRoI.h:46
LVL1::ITrigT1MuonRecRoiTool
Definition: ITrigT1MuonRecRoiTool.h:13
LVL1::FirsCandMask
@ FirsCandMask
Definition: RecMuonRoI.h:37
iRecCoordRoI
Interface for all reconstructed RoI classes.
Definition: iRecCoordRoI.h:26
TrigConf
Forward iterator to traverse the main components of the trigger configuration.
Definition: Config.h:22
LVL1::SectNumEndcapMask
@ SectNumEndcapMask
Definition: RecMuonRoI.h:42
LVL1::RoIOvlMask
@ RoIOvlMask
Definition: RecMuonRoI.h:45
LVL1::RecMuonRoI
This class defines the reconstructed Muon ROI.
Definition: RecMuonRoI.h:60
LVL1::RecMuonRoI::getThresholdValue
unsigned int getThresholdValue() const
returns the Threshold Value (in GeV) associated with this RecRoI
Definition: RecMuonRoI.h:123
iRecCoordRoI.h
LVL1::RecMuonRoiSvc
Base class for the RPC and TGC RoI reconstruction services.
Definition: RecMuonRoiSvc.h:35
LVL1::RecMuonRoI::candidateVetoed
bool candidateVetoed() const
Returns true if the candidate was vetoed in the multiplicity sum.
Definition: RecMuonRoI.cxx:328
LVL1::EndcapRoIMask
@ EndcapRoIMask
Definition: RecMuonRoI.h:48
LVL1::RecMuonRoI::m_firstCandidateFlag
bool m_firstCandidateFlag
flag indicating if this was the highest pt candidate in this sector - extracted from m_roiWord in the...
Definition: RecMuonRoI.h:160
LVL1::RecMuonRoI::sectorID
unsigned int sectorID() const
returns sector ID ROI
Definition: RecMuonRoI.h:111
LVL1::ThresNumMask
@ ThresNumMask
Definition: RecMuonRoI.h:44
LVL1::RecMuonRoI::m_sectorID
unsigned int m_sectorID
the sector number for this RoI extracted from m_roiWord in the constructor
Definition: RecMuonRoI.h:196
LVL1::RecMuonRoI::m_thresholdValue
unsigned int m_thresholdValue
The value of the threshold in GeV.
Definition: RecMuonRoI.h:176
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
LVL1::PadOflMask
@ PadOflMask
Definition: RecMuonRoI.h:51
LVL1::RecMuonRoI::phi
virtual double phi() const
returns phi coord of ROI
Definition: RecMuonRoI.h:114
LVL1::ForwardRoIMask
@ ForwardRoIMask
Definition: RecMuonRoI.h:50
LVL1::RecMuonRoI::sysID
unsigned int sysID() const
returns system ID ROI (Barrel=0, Endcap=1, Forward=2)
Definition: RecMuonRoI.h:105
LVL1::SectorAddressMask
@ SectorAddressMask
Definition: RecMuonRoI.h:38
LVL1::RecMuonRoI::m_sectorOflFlag
bool m_sectorOflFlag
flag indicating if there were more than 2 candidates in this sector - extracted from m_roiWord in the...
Definition: RecMuonRoI.h:164
LVL1::EndcapOvlMask
@ EndcapOvlMask
Definition: RecMuonRoI.h:49
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
LVL1::SectNumForwardMask
@ SectNumForwardMask
Definition: RecMuonRoI.h:43
LVL1::BarrelOvlMask
@ BarrelOvlMask
Definition: RecMuonRoI.h:47
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
python.XMLReader.l1menu
l1menu
Definition: XMLReader.py:73
LVL1::RecMuonRoI::getRoINumber
unsigned int getRoINumber() const
return RoI number in hardware numbering scheme
Definition: RecMuonRoI.h:126
LVL1::RecMuonRoI::sectorOverflow
bool sectorOverflow() const
returns true if there were > 2 candidates in this sector
Definition: RecMuonRoI.h:135
LVL1::RecMuonRoI::getDebugString
std::string getDebugString()
Definition: RecMuonRoI.cxx:355
LVL1::RecMuonRoI::candidateCharge
ChargeSign candidateCharge() const
Returns the change sign of the candidate.
Definition: RecMuonRoI.cxx:315
CLASS_DEF.h
macros to associate a CLID to a type
LVL1::RecMuonRoI::getOverlap
unsigned int getOverlap() const
return Overlap in hardware numbering scheme
Definition: RecMuonRoI.h:129
LVL1::RecMuonRoI::NEGATIVE
@ NEGATIVE
Negative (mu minus) candidate in the TGC.
Definition: RecMuonRoI.h:65
LVL1::RecMuonRoI::m_roiWord
unsigned int m_roiWord
this is the actual format of the data sent from the LVL1 hardware.
Definition: RecMuonRoI.h:156
LVL1::SectNumBarrelMask
@ SectNumBarrelMask
Definition: RecMuonRoI.h:41
LVL1::SysIDMask
@ SysIDMask
Definition: RecMuonRoI.h:39