ATLAS Offline Software
CMMRoI.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 namespace LVL1 {
8 
9 // Static constants
10 
11 const unsigned int CMMRoI::s_jetEtWordIdVal;
12 const unsigned int CMMRoI::s_wordIdVal0;
13 const unsigned int CMMRoI::s_wordIdVal1;
14 const unsigned int CMMRoI::s_wordIdVal2;
15 
16 const int CMMRoI::s_jetEtWordIdBit;
17 const int CMMRoI::s_wordIdBit;
18 const int CMMRoI::s_jetEtHitsBit;
19 const int CMMRoI::s_sumEtHitsBit;
22 const int CMMRoI::s_energyBit;
23 const int CMMRoI::s_jetEtParityBit;
24 const int CMMRoI::s_parityBit;
25 const int CMMRoI::s_overflowBit;
26 
28 const int CMMRoI::s_wordIdMask;
29 const int CMMRoI::s_jetEtHitsMask;
30 const int CMMRoI::s_sumEtHitsMask;
33 const int CMMRoI::s_energyMask;
34 
35 CMMRoI::CMMRoI() : m_jetEtRoiWord(0),
36  m_energyRoiWord0(0),
37  m_energyRoiWord1(0),
38  m_energyRoiWord2(0)
39 {
40 }
41 
42 CMMRoI::CMMRoI(uint32_t jetEtRoiWord, uint32_t energyRoiWord0,
43  uint32_t energyRoiWord1, uint32_t energyRoiWord2)
44  : m_jetEtRoiWord(jetEtRoiWord),
45  m_energyRoiWord0(energyRoiWord0),
46  m_energyRoiWord1(energyRoiWord1),
47  m_energyRoiWord2(energyRoiWord2)
48 {
49 }
50 
51 CMMRoI::CMMRoI(int jetEtHits, int sumEtHits, int missingEtHits,
52  int missingEtSigHits, int ex, int ey, int et,
53  int jetEtError, int sumEtError, int missingEtError,
54  int missingEtSigError, int exError, int eyError, int etError)
55 {
59 
63  m_energyRoiWord0 |= ((exError>>1) & 0x1) << s_parityBit;
67 
71  m_energyRoiWord1 |= ((eyError>>1) & 0x1) << s_parityBit;
73  m_energyRoiWord1 |= ((sumEtError>>1) & 0x1) << s_parityBit;
74 
78  m_energyRoiWord2 |= ((etError>>1) & 0x1) << s_parityBit;
82 }
83 
85 {
86 }
87 
88 // Set RoI word with ID check
89 
91 {
92  bool valid = true;
93  int wordId = (roiWord >> s_jetEtWordIdBit) & s_jetEtWordIdMask;
94  if (wordId == s_jetEtWordIdVal) m_jetEtRoiWord = roiWord;
95  else {
96  wordId = (roiWord >> s_wordIdBit) & s_wordIdMask;
97  if (wordId == s_wordIdVal0) m_energyRoiWord0 = roiWord;
98  else if (wordId == s_wordIdVal1) m_energyRoiWord1 = roiWord;
99  else if (wordId == s_wordIdVal2) m_energyRoiWord2 = roiWord;
100  else valid = false;
101  }
102  return valid;
103 }
104 
105 } // end namespace
LVL1::CMMRoI::s_missingEtSigHitsMask
static const int s_missingEtSigHitsMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:99
LVL1::CMMRoI::s_missingEtSigHitsBit
static const int s_missingEtSigHitsBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:88
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
LVL1::CMMRoI::s_jetEtHitsMask
static const int s_jetEtHitsMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:96
et
Extra patterns decribing particle interation process.
CMMRoI.h
LVL1::CMMRoI::m_energyRoiWord2
uint32_t m_energyRoiWord2
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:111
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
LVL1::CMMRoI::exError
int exError() const
Return Ex error flags (bit 0 Overflow, bit 1 Parity)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:170
LVL1::CMMRoI::sumEtHits
int sumEtHits() const
Return Sum-ET hits.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:120
LVL1::CMMRoI::s_sumEtHitsMask
static const int s_sumEtHitsMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:97
LVL1::CMMRoI::s_energyBit
static const int s_energyBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:89
LVL1::CMMRoI::s_energyMask
static const int s_energyMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:100
LVL1::CMMRoI::etError
int etError() const
Return Et error flags (bit 0 Overflow, bit 1 Parity)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:180
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::CMMRoI::s_wordIdVal1
static const unsigned int s_wordIdVal1
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:80
LVL1::CMMRoI::m_energyRoiWord1
uint32_t m_energyRoiWord1
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:110
LVL1::CMMRoI::s_missingEtHitsMask
static const int s_missingEtHitsMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:98
LVL1::CMMRoI::ex
int ex() const
Return Ex.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:135
xAOD::roiWord
roiWord
Definition: TrigMissingET_v1.cxx:36
LVL1::CMMRoI::CMMRoI
CMMRoI()
Definition: CMMRoI.cxx:35
calibdata.valid
list valid
Definition: calibdata.py:45
LVL1::CMMRoI::~CMMRoI
~CMMRoI()
Definition: CMMRoI.cxx:84
LVL1::CMMRoI::jetEtError
int jetEtError() const
Return Jet-ET error flag (bit 1 Parity)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:150
LVL1::CMMRoI::sumEtError
int sumEtError() const
Return Sum-ET error flag (bit 1 Parity)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:155
LVL1::CMMRoI::jetEtHits
int jetEtHits() const
Return Jet-ET hits.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:115
LVL1::CMMRoI::s_wordIdVal2
static const unsigned int s_wordIdVal2
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:81
LVL1::CMMRoI::s_sumEtHitsBit
static const int s_sumEtHitsBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:86
LVL1::CMMRoI::ey
int ey() const
Return Ey.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:140
LVL1::CMMRoI::s_overflowBit
static const int s_overflowBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:92
LVL1::CMMRoI::missingEtHits
int missingEtHits() const
Return Missing-ET hits.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:125
LVL1::CMMRoI::s_missingEtHitsBit
static const int s_missingEtHitsBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:87
LVL1::CMMRoI::eyError
int eyError() const
Return Ey error flags (bit 0 Overflow, bit 1 Parity)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:175
LVL1::CMMRoI::s_wordIdMask
static const int s_wordIdMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:95
LVL1::CMMRoI::s_parityBit
static const int s_parityBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:91
LVL1::CMMRoI::s_jetEtWordIdBit
static const int s_jetEtWordIdBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:83
LVL1::CMMRoI::missingEtSigError
int missingEtSigError() const
Return Missing-ET-Sig error flag (bit 1 Parity)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:165
LVL1::CMMRoI::m_jetEtRoiWord
uint32_t m_jetEtRoiWord
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:108
LVL1::CMMRoI::s_wordIdBit
static const int s_wordIdBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:84
LVL1::CMMRoI::s_jetEtWordIdVal
static const unsigned int s_jetEtWordIdVal
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:78
LVL1::CMMRoI::setRoiWord
bool setRoiWord(uint32_t roiWord)
Set RoI word with ID check.
Definition: CMMRoI.cxx:90
LVL1::CMMRoI::missingEtError
int missingEtError() const
Return Missing-ET error flag (bit 1 Parity)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:160
LVL1::CMMRoI::s_jetEtWordIdMask
static const int s_jetEtWordIdMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:94
LVL1::CMMRoI::missingEtSigHits
int missingEtSigHits() const
Return Missing-ET-Sig hits.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:130
LVL1::CMMRoI::s_jetEtHitsBit
static const int s_jetEtHitsBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:85
LVL1::CMMRoI::s_wordIdVal0
static const unsigned int s_wordIdVal0
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:79
LVL1::CMMRoI::s_jetEtParityBit
static const int s_jetEtParityBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:90
LVL1::CMMRoI::m_energyRoiWord0
uint32_t m_energyRoiWord0
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:109