ATLAS Offline Software
ITrigT1MuonRecRoiTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 
8 namespace LVL1{
9 
10  unsigned int ITrigT1MuonRecRoiTool::getBitMaskValue( const unsigned int * uintValue,
11  const unsigned int mask ) const {
12  unsigned int maskcopy = mask;
13  unsigned int result = *uintValue & mask;
14  if ( mask != 0 ) {
15  while ( ( maskcopy & 0x00000001 ) == 0 ) {
16  maskcopy = maskcopy >> 1;
17  result = result >> 1;
18  }
19  }
20  return result;
21  }
22 
24  {
25  unsigned int result = getBitMaskValue(&roiWord,SysIDMask());
26  if( result == 0x0 ) return Barrel;
27  else if( result == 0x1 ) return Forward;
28  else if( result>>1 ) return Endcap;
29  else return Undef;
30  }
31 
33  {
35  }
37  if( format == Run2 ){
38  m_IsRun3Mask = 0x80000000;
39  m_IsVetoedMask = 0x10000000;
40  m_ChargeMask = 0x08000000;
41  m_IsFirstCandMask = 0x00400000;
42  m_SectorAddressMask = 0x003fc000;
43  m_BarrelSectorIDMask = 0x000f8000;
44  m_EndcapSectorIDMask = 0x001f8000;
45  m_ForwardSectorIDMask = 0x000f8000;
46  m_SysIDMask = 0x00300000;
47  m_SubSysIDMask = 0x00004000;
48  m_ThresholdMask = 0x00003800;
49  m_BarrelRoIMask = 0x0000007c;
50  m_EndcapRoIMask = 0x000003fc;
51  m_ForwardRoIMask = 0x000000fc;
52  m_EndcapRMask = 0x000003f0;
53  m_EndcapPhiMask = 0x0000000c;
54  m_ForwardRMask = 0x000000f0;
55  m_ForwardPhiMask = 0x0000000c;
56  m_OverflowPerRoIMask = 0x00000002;
57  m_OverflowPerSectorMask = 0x00000001;
58  m_BW2Or3Mask = 0x00000000; // undef
59  m_InnerCoinMask = 0x00000000; // undef
60  m_GoodMFMask = 0x00000000; // undef
61  }else if( format == Run3 ){
62  m_IsRun3Mask = 0x80000000;
63  m_IsVetoedMask = LVL1::MuCTPIBits::RUN3_CAND_WORD_VETO_MASK << LVL1::MuCTPIBits::RUN3_CAND_WORD_VETO_SHIFT;
64  m_ChargeMask = LVL1::MuCTPIBits::RUN3_CAND_WORD_CANDFLAGS_ECFW_CHARGE_MASK << LVL1::MuCTPIBits::RUN3_CAND_WORD_CANDFLAGS_ECFW_CHARGE_SHIFT;
65  m_IsFirstCandMask = 0x00000000; // undef
66  m_SectorAddressMask = LVL1::MuCTPIBits::RUN3_CAND_SECTOR_ADDRESS_MASK << LVL1::MuCTPIBits::RUN3_CAND_SECTOR_ADDRESS_SHIFT;
67  m_BarrelSectorIDMask = LVL1::MuCTPIBits::BARREL_SECTORID_MASK << LVL1::MuCTPIBits::RUN3_CAND_SECTORID_SHIFT;
68  m_EndcapSectorIDMask = LVL1::MuCTPIBits::ENDCAP_SECTORID_MASK << LVL1::MuCTPIBits::RUN3_CAND_SECTORID_SHIFT;
69  m_ForwardSectorIDMask = LVL1::MuCTPIBits::FORWARD_SECTORID_MASK << LVL1::MuCTPIBits::RUN3_CAND_SECTORID_SHIFT;
70  m_SysIDMask = LVL1::MuCTPIBits::RUN3_SUBSYS_ADDRESS_BAFW_MASK << LVL1::MuCTPIBits::RUN3_SUBSYS_ADDRESS_SHIFT;
71  m_SubSysIDMask = LVL1::MuCTPIBits::RUN3_SUBSYS_HEMISPHERE_MASK << LVL1::MuCTPIBits::RUN3_SUBSYS_HEMISPHERE_SHIFT;
72  m_ThresholdMask = LVL1::MuCTPIBits::RUN3_CAND_PT_MASK << LVL1::MuCTPIBits::RUN3_CAND_PT_SHIFT;
73  m_BarrelRoIMask = LVL1::MuCTPIBits::BARREL_ROI_MASK << LVL1::MuCTPIBits::RUN3_ROI_SHIFT;
74  m_EndcapRoIMask = LVL1::MuCTPIBits::ENDCAP_ROI_MASK << LVL1::MuCTPIBits::RUN3_ROI_SHIFT;
75  m_ForwardRoIMask = LVL1::MuCTPIBits::FORWARD_ROI_MASK << LVL1::MuCTPIBits::RUN3_ROI_SHIFT;
76  m_EndcapRMask = LVL1::MuCTPIBits::RUN3_CAND_WORD_CANDFLAGS_EC_R_MASK << LVL1::MuCTPIBits::RUN3_CAND_WORD_CANDFLAGS_ECFW_R_SHIFT;
77  m_EndcapPhiMask = LVL1::MuCTPIBits::RUN3_CAND_WORD_CANDFLAGS_ECFW_PHI_MASK << LVL1::MuCTPIBits::RUN3_CAND_WORD_CANDFLAGS_ECFW_PHI_SHIFT;
78  m_ForwardRMask = LVL1::MuCTPIBits::RUN3_CAND_WORD_CANDFLAGS_FW_R_MASK << LVL1::MuCTPIBits::RUN3_CAND_WORD_CANDFLAGS_ECFW_R_SHIFT;
79  m_ForwardPhiMask = LVL1::MuCTPIBits::RUN3_CAND_WORD_CANDFLAGS_ECFW_PHI_MASK << LVL1::MuCTPIBits::RUN3_CAND_WORD_CANDFLAGS_ECFW_PHI_SHIFT;
80  m_OverflowPerRoIMask = LVL1::MuCTPIBits::ROI_OVERFLOW_MASK << LVL1::MuCTPIBits::RUN3_ROI_OVERFLOW_SHIFT;
81  m_OverflowPerSectorMask = LVL1::MuCTPIBits::CAND_OVERFLOW_MASK << LVL1::MuCTPIBits::RUN3_CAND_OVERFLOW_SHIFT;
82  m_BW2Or3Mask = LVL1::MuCTPIBits::RUN3_CAND_WORD_CANDFLAGS_ECFW_BW23_MASK << LVL1::MuCTPIBits::RUN3_CAND_WORD_CANDFLAGS_ECFW_BW23_SHIFT;
83  m_InnerCoinMask = LVL1::MuCTPIBits::RUN3_CAND_WORD_CANDFLAGS_ECFW_INNERCOIN_MASK << LVL1::MuCTPIBits::RUN3_CAND_WORD_CANDFLAGS_ECFW_INNERCOIN_SHIFT;
84  m_GoodMFMask = LVL1::MuCTPIBits::RUN3_CAND_WORD_CANDFLAGS_ECFW_GOODMF_MASK << LVL1::MuCTPIBits::RUN3_CAND_WORD_CANDFLAGS_ECFW_GOODMF_SHIFT;
85  }else{
86  // no update
87  }
88  }
89 
90 }
LVL1::ITrigT1MuonRecRoiTool::m_ForwardSectorIDMask
unsigned int m_ForwardSectorIDMask
Definition: ITrigT1MuonRecRoiTool.h:83
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
LVL1::ITrigT1MuonRecRoiTool::m_ForwardRMask
unsigned int m_ForwardRMask
Definition: ITrigT1MuonRecRoiTool.h:92
LVL1::ITrigT1MuonRecRoiTool::m_IsFirstCandMask
unsigned int m_IsFirstCandMask
Definition: ITrigT1MuonRecRoiTool.h:79
get_generator_info.result
result
Definition: get_generator_info.py:21
vtune_athena.format
format
Definition: vtune_athena.py:14
LVL1::ITrigT1MuonRecRoiTool::m_SysIDMask
unsigned int m_SysIDMask
Definition: ITrigT1MuonRecRoiTool.h:84
LVL1::ITrigT1MuonRecRoiTool::Run3
@ Run3
Definition: ITrigT1MuonRecRoiTool.h:37
LVL1::ITrigT1MuonRecRoiTool::ITrigT1MuonRecRoiTool
ITrigT1MuonRecRoiTool()
Definition: ITrigT1MuonRecRoiTool.cxx:32
LVL1::ITrigT1MuonRecRoiTool::m_BarrelSectorIDMask
unsigned int m_BarrelSectorIDMask
Definition: ITrigT1MuonRecRoiTool.h:81
LVL1::ITrigT1MuonRecRoiTool::getSystem
MuonTriggerSystem getSystem(const unsigned int &roiWord) const
Definition: ITrigT1MuonRecRoiTool.cxx:23
LVL1::ITrigT1MuonRecRoiTool::m_EndcapRMask
unsigned int m_EndcapRMask
Definition: ITrigT1MuonRecRoiTool.h:90
Run2
Definition: openCoraCool.cxx:137
LVL1::ITrigT1MuonRecRoiTool::MuonTriggerSystem
MuonTriggerSystem
Definition: ITrigT1MuonRecRoiTool.h:41
LVL1::ITrigT1MuonRecRoiTool::m_OverflowPerRoIMask
unsigned int m_OverflowPerRoIMask
Definition: ITrigT1MuonRecRoiTool.h:94
LVL1::ITrigT1MuonRecRoiTool::m_EndcapRoIMask
unsigned int m_EndcapRoIMask
Definition: ITrigT1MuonRecRoiTool.h:88
LVL1::ITrigT1MuonRecRoiTool::Barrel
@ Barrel
Definition: ITrigT1MuonRecRoiTool.h:42
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::ITrigT1MuonRecRoiTool::m_BW2Or3Mask
unsigned int m_BW2Or3Mask
Definition: ITrigT1MuonRecRoiTool.h:96
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:460
xAOD::roiWord
roiWord
Definition: TrigMissingET_v1.cxx:36
LVL1::ITrigT1MuonRecRoiTool::m_ChargeMask
unsigned int m_ChargeMask
Definition: ITrigT1MuonRecRoiTool.h:78
LVL1::ITrigT1MuonRecRoiTool::m_IsVetoedMask
unsigned int m_IsVetoedMask
Definition: ITrigT1MuonRecRoiTool.h:77
LVL1::ITrigT1MuonRecRoiTool::RoiWordFormat
RoiWordFormat
Definition: ITrigT1MuonRecRoiTool.h:36
LVL1::ITrigT1MuonRecRoiTool::SysIDMask
unsigned int SysIDMask() const
Definition: ITrigT1MuonRecRoiTool.h:54
LVL1::ITrigT1MuonRecRoiTool::m_IsRun3Mask
unsigned int m_IsRun3Mask
Definition: ITrigT1MuonRecRoiTool.h:76
LVL1::ITrigT1MuonRecRoiTool::m_OverflowPerSectorMask
unsigned int m_OverflowPerSectorMask
Definition: ITrigT1MuonRecRoiTool.h:95
ITrigT1MuonRecRoiTool.h
LVL1::ITrigT1MuonRecRoiTool::m_ForwardRoIMask
unsigned int m_ForwardRoIMask
Definition: ITrigT1MuonRecRoiTool.h:89
LVL1::ITrigT1MuonRecRoiTool::m_EndcapPhiMask
unsigned int m_EndcapPhiMask
Definition: ITrigT1MuonRecRoiTool.h:91
LVL1::ITrigT1MuonRecRoiTool::m_SectorAddressMask
unsigned int m_SectorAddressMask
Definition: ITrigT1MuonRecRoiTool.h:80
LVL1::ITrigT1MuonRecRoiTool::m_ForwardPhiMask
unsigned int m_ForwardPhiMask
Definition: ITrigT1MuonRecRoiTool.h:93
MuCTPI_Bits.h
LVL1::ITrigT1MuonRecRoiTool::m_EndcapSectorIDMask
unsigned int m_EndcapSectorIDMask
Definition: ITrigT1MuonRecRoiTool.h:82
LVL1::ITrigT1MuonRecRoiTool::m_SubSysIDMask
unsigned int m_SubSysIDMask
Definition: ITrigT1MuonRecRoiTool.h:85
LVL1::ITrigT1MuonRecRoiTool::m_GoodMFMask
unsigned int m_GoodMFMask
Definition: ITrigT1MuonRecRoiTool.h:98
LVL1::ITrigT1MuonRecRoiTool::Forward
@ Forward
Definition: ITrigT1MuonRecRoiTool.h:42
LVL1::ITrigT1MuonRecRoiTool::m_InnerCoinMask
unsigned int m_InnerCoinMask
Definition: ITrigT1MuonRecRoiTool.h:97
LVL1::ITrigT1MuonRecRoiTool::Endcap
@ Endcap
Definition: ITrigT1MuonRecRoiTool.h:42
LVL1::ITrigT1MuonRecRoiTool::Undef
@ Undef
Definition: ITrigT1MuonRecRoiTool.h:42
LVL1::ITrigT1MuonRecRoiTool::m_BarrelRoIMask
unsigned int m_BarrelRoIMask
Definition: ITrigT1MuonRecRoiTool.h:87
LVL1::ITrigT1MuonRecRoiTool::m_ThresholdMask
unsigned int m_ThresholdMask
Definition: ITrigT1MuonRecRoiTool.h:86
LVL1::ITrigT1MuonRecRoiTool::getBitMaskValue
unsigned int getBitMaskValue(const unsigned int *uintValue, const unsigned int mask) const
Definition: ITrigT1MuonRecRoiTool.cxx:10
LVL1::ITrigT1MuonRecRoiTool::updateBitMask
void updateBitMask(const RoiWordFormat)
Definition: ITrigT1MuonRecRoiTool.cxx:36