ATLAS Offline Software
CMXRoI.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 namespace LVL1 {
8 
9 // Static constants
10 
11 const int CMXRoI::s_wordIdVal0;
12 const int CMXRoI::s_wordIdVal1;
13 const int CMXRoI::s_wordIdVal2;
14 
15 const int CMXRoI::s_wordIdBit;
16 const int CMXRoI::s_sumEtHitsBit;
19 const int CMXRoI::s_energyBit;
20 const int CMXRoI::s_overflowBit;
21 const int CMXRoI::s_sumTypeBit;
22 
23 const int CMXRoI::s_wordIdMask;
24 const int CMXRoI::s_sumEtHitsMask;
27 const int CMXRoI::s_energyMask;
28 const int CMXRoI::s_overflowMask;
29 const int CMXRoI::s_sumTypeMask;
30 
31 const int CMXRoI::s_exOffset;
32 const int CMXRoI::s_eyOffset;
33 const int CMXRoI::s_etOffset;
34 const int CMXRoI::s_maxRoiWords;
35 
36 CMXRoI::CMXRoI() : m_roiWords(s_maxRoiWords)
37 {
38 }
39 
42  : m_roiWords(s_maxRoiWords)
43 {
44  m_roiWords[0] = roiWord0;
45  m_roiWords[1] = roiWord1;
46  m_roiWords[2] = roiWord2;
47  m_roiWords[3] = roiWord3;
48  m_roiWords[4] = roiWord4;
49  m_roiWords[5] = roiWord5;
50 }
51 
52 CMXRoI::CMXRoI(unsigned int ex, unsigned int ey, unsigned int et,
53  int exError, int eyError, int etError,
54  unsigned int sumEtHits, unsigned int missingEtHits,
55  unsigned int missingEtSigHits,
56  unsigned int exM, unsigned int eyM, unsigned int etM,
57  int exErrorM, int eyErrorM, int etErrorM,
58  unsigned int sumEtHitsM, unsigned int missingEtHitsM)
59  : m_roiWords(s_maxRoiWords)
60 {
61  int type = NORMAL;
62  int ix = s_exOffset + type;
64  m_roiWords[ix] |= type << s_sumTypeBit;
65  m_roiWords[ix] |= (ex & s_energyMask) << s_energyBit;
69  type = MASKED;
70  ix = s_exOffset + type;
72  m_roiWords[ix] |= type << s_sumTypeBit;
73  m_roiWords[ix] |= (exM & s_energyMask) << s_energyBit;
74  m_roiWords[ix] |= (exErrorM & s_overflowMask) << s_overflowBit;
75 
76  type = NORMAL;
77  ix = s_eyOffset + type;
79  m_roiWords[ix] |= type << s_sumTypeBit;
80  m_roiWords[ix] |= (ey & s_energyMask) << s_energyBit;
84  type = MASKED;
85  ix = s_eyOffset + type;
87  m_roiWords[ix] |= type << s_sumTypeBit;
88  m_roiWords[ix] |= (eyM & s_energyMask) << s_energyBit;
89  m_roiWords[ix] |= (eyErrorM & s_overflowMask) << s_overflowBit;
90  m_roiWords[ix] |= (missingEtHitsM & s_missingEtHitsMask)
92  type = NORMAL;
93  ix = s_etOffset + type;
95  m_roiWords[ix] |= type << s_sumTypeBit;
96  m_roiWords[ix] |= (et & s_energyMask) << s_energyBit;
99 
100  type = MASKED;
101  ix = s_etOffset + type;
103  m_roiWords[ix] |= type << s_sumTypeBit;
104  m_roiWords[ix] |= (etM & s_energyMask) << s_energyBit;
105  m_roiWords[ix] |= (etErrorM & s_overflowMask) << s_overflowBit;
106  m_roiWords[ix] |= (sumEtHitsM & s_sumEtHitsMask) << s_sumEtHitsBit;
107 }
108 
110 {
111 }
112 
113 // Set RoI word with ID check
114 
116 {
117  bool valid = true;
118  int wordId = (roiWord >> s_wordIdBit) & s_wordIdMask;
119  int type = (roiWord >> s_sumTypeBit) & s_sumTypeMask;
120  if (wordId == s_wordIdVal0) m_roiWords[s_exOffset+type] = roiWord;
121  else if (wordId == s_wordIdVal1) m_roiWords[s_eyOffset+type] = roiWord;
122  else if (wordId == s_wordIdVal2) m_roiWords[s_etOffset+type] = roiWord;
123  else valid = false;
124  return valid;
125 }
126 
127 } // end namespace
et
Extra patterns decribing particle interation process.
LVL1::CMXRoI::s_energyBit
static const int s_energyBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:82
LVL1::CMXRoI::s_wordIdBit
static const int s_wordIdBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:78
LVL1::CMXRoI::s_sumEtHitsMask
static const int s_sumEtHitsMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:87
LVL1::CMXRoI::s_maxRoiWords
static const int s_maxRoiWords
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:97
LVL1::CMXRoI::missingEtHits
unsigned int missingEtHits(SumType type=NORMAL) const
Return Missing-ET hits.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:139
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
LVL1::CMXRoI::s_sumTypeBit
static const int s_sumTypeBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:84
LVL1::CMXRoI::s_etOffset
static const int s_etOffset
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:96
LVL1::CMXRoI::eyError
int eyError(SumType type=NORMAL) const
Return Ey error flags (bit 0 Overflow)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:124
LVL1::CMXRoI::s_missingEtSigHitsMask
static const int s_missingEtSigHitsMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:89
LVL1::CMXRoI::s_wordIdVal0
static const int s_wordIdVal0
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:74
LVL1::CMXRoI::NORMAL
@ NORMAL
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:26
LVL1::CMXRoI::s_wordIdVal2
static const int s_wordIdVal2
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:76
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::CMXRoI::etError
int etError(SumType type=NORMAL) const
Return Et error flags (bit 0 Overflow)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:129
LVL1::CMXRoI::~CMXRoI
~CMXRoI()
Definition: CMXRoI.cxx:109
LVL1::CMXRoI::s_missingEtSigHitsBit
static const int s_missingEtSigHitsBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:81
xAOD::roiWord
roiWord
Definition: TrigMissingET_v1.cxx:36
LVL1::CMXRoI::s_overflowBit
static const int s_overflowBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:83
calibdata.valid
list valid
Definition: calibdata.py:45
LVL1::CMXRoI::s_eyOffset
static const int s_eyOffset
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:95
LVL1::CMXRoI::ex
unsigned int ex(SumType type=NORMAL) const
Return Ex.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:104
LVL1::CMXRoI::s_sumTypeMask
static const int s_sumTypeMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:92
LVL1::CMXRoI::s_energyMask
static const int s_energyMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:90
LVL1::CMXRoI::s_wordIdMask
static const int s_wordIdMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:86
LVL1::CMXRoI::ey
unsigned int ey(SumType type=NORMAL) const
Return Ey.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:109
LVL1::CMXRoI::exError
int exError(SumType type=NORMAL) const
Return Ex error flags (bit 0 Overflow)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:119
LVL1::CMXRoI::s_missingEtHitsMask
static const int s_missingEtHitsMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:88
LVL1::CMXRoI::s_overflowMask
static const int s_overflowMask
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:91
CMXRoI.h
xAOD::roiWord3
setRoIWord1 roiWord3
Definition: EnergySumRoI_v2.cxx:87
LVL1::CMXRoI::sumEtHits
unsigned int sumEtHits(SumType type=NORMAL) const
Return Sum-ET hits.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:134
LVL1::CMXRoI::MASKED
@ MASKED
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:26
LVL1::CMXRoI::setRoiWord
bool setRoiWord(uint32_t roiWord)
Set RoI word with ID check.
Definition: CMXRoI.cxx:115
LVL1::CMXRoI::s_wordIdVal1
static const int s_wordIdVal1
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:75
LVL1::CMXRoI::s_exOffset
static const int s_exOffset
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:94
xAOD::roiWord5
setRoIWord1 setRoIWord3 roiWord5
Definition: EnergySumRoI_v2.cxx:91
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LVL1::CMXRoI::s_sumEtHitsBit
static const int s_sumEtHitsBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:79
LVL1::CMXRoI::m_roiWords
std::vector< uint32_t > m_roiWords
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:100
LVL1::CMXRoI::s_missingEtHitsBit
static const int s_missingEtHitsBit
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:80
LVL1::CMXRoI::roiWord
uint32_t roiWord(int word) const
Return packed Energy RoI word (0-5)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:149
xAOD::roiWord1
roiWord1
Definition: EnergySumRoI_v1.cxx:49
LVL1::CMXRoI::CMXRoI
CMXRoI()
Definition: CMXRoI.cxx:36
LVL1::CMXRoI::missingEtSigHits
unsigned int missingEtSigHits() const
Return Missing-ET-Sig hits.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:144