ATLAS Offline Software
MuCTPIRoI.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // Local include(s):
7 
8 // TrigT1 include(s):
11 
12 namespace ROIB {
13 
21  : m_roIWord( RoIWord ) {}
22 
28  : m_roIWord( 0 ) {}
29 
36  return m_roIWord;
37  }
38 
52  unsigned int MuCTPIRoI::pt() const {
53  return ((m_roIWord >> LVL1::MuCTPIBits::CAND_PT_SHIFT) &
54  LVL1::MuCTPIBits::CAND_PT_MASK);
55  }
56 
66  unsigned int MuCTPIRoI::getSectorAddress() const {
68  LVL1::MuCTPIBits::CAND_SECTOR_ADDRESS_MASK);
69  }
70 
77  return (getSectorAddress() & LVL1::MuCTPIBits::SECTOR_HEMISPHERE_MASK);
78  }
79 
88  return ((m_roIWord >> LVL1::MuCTPIBits::CAND_OVERFLOW_SHIFT) &
89  LVL1::MuCTPIBits::CAND_OVERFLOW_MASK);
90  }
91 
101  return ((m_roIWord >> LVL1::MuCTPIBits::ROI_OVERFLOW_SHIFT) &
102  LVL1::MuCTPIBits::ROI_OVERFLOW_MASK);
103  }
104 
116 
117  uint16_t roi = 0;
118  switch ( getSectorLocation() ) {
119  case MuCTPI_RDO::ENDCAP:
120  roi = (m_roIWord >> LVL1::MuCTPIBits::ROI_SHIFT) & LVL1::MuCTPIBits::ENDCAP_ROI_MASK;
121  break;
122  case MuCTPI_RDO::FORWARD:
123  roi = (m_roIWord >> LVL1::MuCTPIBits::ROI_SHIFT) & LVL1::MuCTPIBits::FORWARD_ROI_MASK;
124  break;
125  case MuCTPI_RDO::BARREL:
126  roi = (m_roIWord >> LVL1::MuCTPIBits::ROI_SHIFT) & LVL1::MuCTPIBits::BARREL_ROI_MASK;
127  break;
128  default:
129  roi = 99;
130  break;
131  }
132 
133  return roi;
134  }
135 
154 
155  uint16_t ol = 0;
156  switch( getSectorLocation() ) {
157  case MuCTPI_RDO::ENDCAP:
158  ol = (m_roIWord >> LVL1::MuCTPIBits::ENDCAP_OL_SHIFT) & LVL1::MuCTPIBits::ENDCAP_OL_MASK;
159  break;
160  case MuCTPI_RDO::FORWARD:
161  ol = 0;
162  break;
163  case MuCTPI_RDO::BARREL:
164  ol = (m_roIWord >> LVL1::MuCTPIBits::BARREL_OL_SHIFT) & LVL1::MuCTPIBits::BARREL_OL_MASK;
165  break;
166  default:
167  ol = 99;
168  break;
169  }
170 
171  return ol;
172  }
173 
181 
182  if( getSectorAddress() & LVL1::MuCTPIBits::ENDCAP_ADDRESS_MASK ) {
183  return MuCTPI_RDO::ENDCAP;
184  } else if(getSectorAddress() & LVL1::MuCTPIBits::FORWARD_ADDRESS_MASK) {
185  return MuCTPI_RDO::FORWARD;
186  } else {
187  return MuCTPI_RDO::BARREL;
188  }
189  }
190 
201 
203  return ((getSectorAddress() >> 1) & LVL1::MuCTPIBits::ENDCAP_SECTORID_MASK);
204  } else {
205  return ((getSectorAddress() >> 1) & LVL1::MuCTPIBits::BARREL_SECTORID_MASK);
206  }
207  return 0;
208  }
209 
219  LVL1::MuCTPIBits::CAND_HIGHEST_PT_MASK);
220  }
221 
222 } // namespace ROIB
MuCTPI_RDO::SectorLocation
SectorLocation
Enumeration defining the different sources for the muon candidates.
Definition: MuCTPI_RDO.h:45
ROIB::MuCTPIRoI::getSectorLocation
MuCTPI_RDO::SectorLocation getSectorLocation() const
Method returning the name of the system that produced the RoI.
Definition: MuCTPIRoI.cxx:180
ROIB::MuCTPIRoI::getRoiNumber
uint16_t getRoiNumber() const
Method returning the RoI in which the candidate was detected.
Definition: MuCTPIRoI.cxx:115
MuCTPIRoI.h
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
ROIB::MuCTPIRoI::ROI_CAND_HIGHEST_PT_SHIFT
static const uint32_t ROI_CAND_HIGHEST_PT_SHIFT
Position of the "highest p<sub>T</sub> bit" in the RoI word.
Definition: MuCTPIRoI.h:75
MuCTPI_RDO::BARREL
@ BARREL
Definition: MuCTPI_RDO.h:45
MuCTPI_RDO::FORWARD
@ FORWARD
Definition: MuCTPI_RDO.h:45
ROIB::MuCTPIRoI::getRoiOverflow
uint16_t getRoiOverflow() const
Method telling whether there were more than one candidates in this candidate's RoI.
Definition: MuCTPIRoI.cxx:100
ROIB
Namespace of the LVL1 RoIB simulation.
Definition: ILvl1ResultAccessTool.h:19
ROIB::MuCTPIRoI::getCandidateIsHighestPt
uint16_t getCandidateIsHighestPt() const
Method telling whether the candidate had the highest pT in the sector.
Definition: MuCTPIRoI.cxx:217
MuCTPI_RDO::ENDCAP
@ ENDCAP
Definition: MuCTPI_RDO.h:45
ROIB::MuCTPIRoI::getHemisphere
uint16_t getHemisphere() const
Method returning the hemisphere of the candidate.
Definition: MuCTPIRoI.cxx:76
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
ROIB::MuCTPIRoI::roIWord
uint32_t roIWord() const
Method returning the RoI word.
Definition: MuCTPIRoI.cxx:35
BitOp.h
ROIB::MuCTPIRoI::MuCTPIRoI
MuCTPIRoI()
Default constructor.
Definition: MuCTPIRoI.cxx:27
ROIB::MuCTPIRoI::getSectorAddress
unsigned int getSectorAddress() const
Method returning the "electronics address" of the candidate.
Definition: MuCTPIRoI.cxx:66
MuCTPI_Bits.h
ROIB::MuCTPIRoI::m_roIWord
uint32_t m_roIWord
The RoI word itself.
Definition: MuCTPIRoI.h:79
ROIB::MuCTPIRoI::pt
unsigned int pt() const
Method returning the pT of the RoI candidate.
Definition: MuCTPIRoI.cxx:52
ROIB::MuCTPIRoI::getOverlapBits
uint16_t getOverlapBits() const
Method returning the "overlap bits" of the candidate.
Definition: MuCTPIRoI.cxx:153
ROIB::MuCTPIRoI::ROI_CAND_SECTOR_ADDRESS_SHIFT
static const uint32_t ROI_CAND_SECTOR_ADDRESS_SHIFT
Position of the sector address in the RoI word.
Definition: MuCTPIRoI.h:73
ROIB::MuCTPIRoI::getSectorID
uint16_t getSectorID() const
Method returning the number of the trigger sector producing the candidate.
Definition: MuCTPIRoI.cxx:200
ROIB::MuCTPIRoI::getSectorOverflow
uint16_t getSectorOverflow() const
Method telling whether there were more than two candidates in this candidate's sector.
Definition: MuCTPIRoI.cxx:87