Loading [MathJax]/jax/output/SVG/config.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
CMMRoI.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 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 
36 
37 CMMRoI::CMMRoI(uint32_t jetEtRoiWord, uint32_t energyRoiWord0,
38  uint32_t energyRoiWord1, uint32_t energyRoiWord2)
39  : m_jetEtRoiWord(jetEtRoiWord),
40  m_energyRoiWord0(energyRoiWord0),
41  m_energyRoiWord1(energyRoiWord1),
42  m_energyRoiWord2(energyRoiWord2)
43 {
44 }
45 
46 CMMRoI::CMMRoI(int jetEtHits, int sumEtHits, int missingEtHits,
47  int missingEtSigHits, int ex, int ey, int et,
48  int jetEtError, int sumEtError, int missingEtError,
49  int missingEtSigError, int exError, int eyError, int etError)
50 {
54 
58  m_energyRoiWord0 |= ((exError>>1) & 0x1) << s_parityBit;
62 
66  m_energyRoiWord1 |= ((eyError>>1) & 0x1) << s_parityBit;
68  m_energyRoiWord1 |= ((sumEtError>>1) & 0x1) << s_parityBit;
69 
73  m_energyRoiWord2 |= ((etError>>1) & 0x1) << s_parityBit;
77 }
78 
79 
80 // Set RoI word with ID check
81 
83 {
84  bool valid = true;
85  int wordId = (roiWord >> s_jetEtWordIdBit) & s_jetEtWordIdMask;
86  if (wordId == s_jetEtWordIdVal) m_jetEtRoiWord = roiWord;
87  else {
88  wordId = (roiWord >> s_wordIdBit) & s_wordIdMask;
89  if (wordId == s_wordIdVal0) m_energyRoiWord0 = roiWord;
90  else if (wordId == s_wordIdVal1) m_energyRoiWord1 = roiWord;
91  else if (wordId == s_wordIdVal2) m_energyRoiWord2 = roiWord;
92  else valid = false;
93  }
94  return valid;
95 }
96 
97 } // end namespace
LVL1::CMMRoI::s_missingEtSigHitsMask
static const int s_missingEtSigHitsMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:98
LVL1::CMMRoI::s_missingEtSigHitsBit
static const int s_missingEtSigHitsBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:87
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
LVL1::CMMRoI::s_jetEtHitsMask
static const int s_jetEtHitsMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:95
et
Extra patterns decribing particle interation process.
CMMRoI.h
LVL1::CMMRoI::m_energyRoiWord2
uint32_t m_energyRoiWord2
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:110
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:169
LVL1::CMMRoI::sumEtHits
int sumEtHits() const
Return Sum-ET hits.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:119
LVL1::CMMRoI::s_sumEtHitsMask
static const int s_sumEtHitsMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:96
LVL1::CMMRoI::s_energyBit
static const int s_energyBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:88
LVL1::CMMRoI::s_energyMask
static const int s_energyMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:99
LVL1::CMMRoI::etError
int etError() const
Return Et error flags (bit 0 Overflow, bit 1 Parity)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:179
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:79
LVL1::CMMRoI::m_energyRoiWord1
uint32_t m_energyRoiWord1
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:109
LVL1::CMMRoI::s_missingEtHitsMask
static const int s_missingEtHitsMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:97
LVL1::CMMRoI::ex
int ex() const
Return Ex.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:134
xAOD::roiWord
roiWord
Definition: TrigMissingET_v1.cxx:36
calibdata.valid
list valid
Definition: calibdata.py:45
LVL1::CMMRoI::jetEtError
int jetEtError() const
Return Jet-ET error flag (bit 1 Parity)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:149
LVL1::CMMRoI::sumEtError
int sumEtError() const
Return Sum-ET error flag (bit 1 Parity)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:154
LVL1::CMMRoI::jetEtHits
int jetEtHits() const
Return Jet-ET hits.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:114
LVL1::CMMRoI::s_wordIdVal2
static const unsigned int s_wordIdVal2
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:80
LVL1::CMMRoI::s_sumEtHitsBit
static const int s_sumEtHitsBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:85
LVL1::CMMRoI::ey
int ey() const
Return Ey.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:139
LVL1::CMMRoI::s_overflowBit
static const int s_overflowBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:91
LVL1::CMMRoI::missingEtHits
int missingEtHits() const
Return Missing-ET hits.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:124
LVL1::CMMRoI::s_missingEtHitsBit
static const int s_missingEtHitsBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:86
LVL1::CMMRoI::CMMRoI
CMMRoI()=default
LVL1::CMMRoI::eyError
int eyError() const
Return Ey error flags (bit 0 Overflow, bit 1 Parity)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:174
LVL1::CMMRoI::s_wordIdMask
static const int s_wordIdMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:94
LVL1::CMMRoI::s_parityBit
static const int s_parityBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:90
LVL1::CMMRoI::s_jetEtWordIdBit
static const int s_jetEtWordIdBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:82
LVL1::CMMRoI::missingEtSigError
int missingEtSigError() const
Return Missing-ET-Sig error flag (bit 1 Parity)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:164
LVL1::CMMRoI::m_jetEtRoiWord
uint32_t m_jetEtRoiWord
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:107
LVL1::CMMRoI::s_wordIdBit
static const int s_wordIdBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:83
LVL1::CMMRoI::s_jetEtWordIdVal
static const unsigned int s_jetEtWordIdVal
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:77
LVL1::CMMRoI::setRoiWord
bool setRoiWord(uint32_t roiWord)
Set RoI word with ID check.
Definition: CMMRoI.cxx:82
LVL1::CMMRoI::missingEtError
int missingEtError() const
Return Missing-ET error flag (bit 1 Parity)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:159
LVL1::CMMRoI::s_jetEtWordIdMask
static const int s_jetEtWordIdMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:93
LVL1::CMMRoI::missingEtSigHits
int missingEtSigHits() const
Return Missing-ET-Sig hits.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:129
LVL1::CMMRoI::s_jetEtHitsBit
static const int s_jetEtHitsBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:84
LVL1::CMMRoI::s_wordIdVal0
static const unsigned int s_wordIdVal0
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:78
LVL1::CMMRoI::s_jetEtParityBit
static const int s_jetEtParityBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:89
LVL1::CMMRoI::m_energyRoiWord0
uint32_t m_energyRoiWord0
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:108