ATLAS Offline Software
CMXRoI_v1.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // $Id: CMXRoI_v1.cxx 723918 2016-02-15 07:52:49Z amazurov $
6 
7 // System include(s):
8 #include <cmath>
9 
10 // EDM includes(s):
12 
13 // Local include(s):
15 
16 namespace xAOD {
17 
18 CMXRoI_v1::CMXRoI_v1() : SG::AuxElement() {}
19 
20 AUXSTORE_OBJECT_SETTER_AND_GETTER(CMXRoI_v1, std::vector<uint32_t>, cmxRoIWords,
21  setCmxRoIWords)
22 
25  uint32_t roiWord2, uint32_t roiWord3,
26  uint32_t roiWord4, uint32_t roiWord5) {
27  std::vector<uint32_t> myRoIWords(s_maxRoiWords);
28  myRoIWords[0] = roiWord0;
29  myRoIWords[1] = roiWord1;
30  myRoIWords[2] = roiWord2;
31  myRoIWords[3] = roiWord3;
32  myRoIWords[4] = roiWord4;
33  myRoIWords[5] = roiWord5;
34  setCmxRoIWords(myRoIWords);
35 }
36 
38 void CMXRoI_v1::initialize(unsigned int ex, unsigned int ey, unsigned int et,
39  int exError, int eyError, int etError,
40  unsigned int sumEtHits, unsigned int missingEtHits,
41  unsigned int missingEtSigHits, unsigned int exM,
42  unsigned int eyM, unsigned int etM, int exErrorM,
43  int eyErrorM, int etErrorM, unsigned int sumEtHitsM,
44  unsigned int missingEtHitsM) {
45  std::vector<uint32_t> myRoIWords(s_maxRoiWords);
46 
47  int type = NORMAL;
48  int ix = s_exOffset + type;
49  myRoIWords[ix] = s_wordIdVal0 << s_wordIdBit;
50  myRoIWords[ix] |= type << s_sumTypeBit;
51  myRoIWords[ix] |= (ex & s_energyMask) << s_energyBit;
52  myRoIWords[ix] |= (exError & s_overflowMask) << s_overflowBit;
53  myRoIWords[ix] |= (missingEtSigHits & s_missingEtSigHitsMask)
55  type = MASKED;
56  ix = s_exOffset + type;
57  myRoIWords[ix] = s_wordIdVal0 << s_wordIdBit;
58  myRoIWords[ix] |= type << s_sumTypeBit;
59  myRoIWords[ix] |= (exM & s_energyMask) << s_energyBit;
60  myRoIWords[ix] |= (exErrorM & s_overflowMask) << s_overflowBit;
61 
62  type = NORMAL;
63  ix = s_eyOffset + type;
64  myRoIWords[ix] = s_wordIdVal1 << s_wordIdBit;
65  myRoIWords[ix] |= type << s_sumTypeBit;
66  myRoIWords[ix] |= (ey & s_energyMask) << s_energyBit;
67  myRoIWords[ix] |= (eyError & s_overflowMask) << s_overflowBit;
68  myRoIWords[ix] |= (missingEtHits & s_missingEtHitsMask) << s_missingEtHitsBit;
69  type = MASKED;
70  ix = s_eyOffset + type;
71  myRoIWords[ix] = s_wordIdVal1 << s_wordIdBit;
72  myRoIWords[ix] |= type << s_sumTypeBit;
73  myRoIWords[ix] |= (eyM & s_energyMask) << s_energyBit;
74  myRoIWords[ix] |= (eyErrorM & s_overflowMask) << s_overflowBit;
75  myRoIWords[ix] |= (missingEtHitsM & s_missingEtHitsMask)
77  type = NORMAL;
78  ix = s_etOffset + type;
79  myRoIWords[ix] = s_wordIdVal2 << s_wordIdBit;
80  myRoIWords[ix] |= type << s_sumTypeBit;
81  myRoIWords[ix] |= (et & s_energyMask) << s_energyBit;
82  myRoIWords[ix] |= (etError & s_overflowMask) << s_overflowBit;
83  myRoIWords[ix] |= (sumEtHits & s_sumEtHitsMask) << s_sumEtHitsBit;
84 
85  type = MASKED;
86  ix = s_etOffset + type;
87  myRoIWords[ix] = s_wordIdVal2 << s_wordIdBit;
88  myRoIWords[ix] |= type << s_sumTypeBit;
89  myRoIWords[ix] |= (etM & s_energyMask) << s_energyBit;
90  myRoIWords[ix] |= (etErrorM & s_overflowMask) << s_overflowBit;
91  myRoIWords[ix] |= (sumEtHitsM & s_sumEtHitsMask) << s_sumEtHitsBit;
92 
93  setCmxRoIWords(myRoIWords);
94 }
95 
97 unsigned int CMXRoI_v1::ex(SumType type) const {
99 }
101 unsigned int CMXRoI_v1::ey(SumType type) const {
103 }
105 unsigned int CMXRoI_v1::et(SumType type) const {
107 }
111 }
115 }
119 }
121 unsigned int CMXRoI_v1::sumEtHits(SumType type) const {
123 }
125 unsigned int CMXRoI_v1::missingEtHits(SumType type) const {
126  return (cmxRoIWords()[s_eyOffset + type] >> s_missingEtHitsBit) &
128 }
130 unsigned int CMXRoI_v1::missingEtSigHits() const {
133 }
134 
136 uint32_t CMXRoI_v1::roiWord(int word) const {
137  return (word < s_maxRoiWords) ? cmxRoIWords()[word] : 0;
138 }
140 unsigned int CMXRoI_v1::exWord(SumType type) const {
141  return cmxRoIWords()[s_exOffset + type];
142 }
144 unsigned int CMXRoI_v1::eyWord(SumType type) const {
145  return cmxRoIWords()[s_eyOffset + type];
146 }
148 unsigned int CMXRoI_v1::etWord(SumType type) const {
149  return cmxRoIWords()[s_etOffset + type];
150 }
151 
152 } // namespace xAOD
xAOD::CMXRoI_v1::s_missingEtHitsBit
static const int s_missingEtHitsBit
Definition: CMXRoI_v1.h:92
xAOD::CMXRoI_v1::etError
int etError(SumType type=NORMAL) const
Return Et error flags (bit 0 Overflow)
Definition: CMXRoI_v1.cxx:117
xAOD::CMXRoI_v1::s_sumTypeBit
static const int s_sumTypeBit
Definition: CMXRoI_v1.h:96
xAOD::CMXRoI_v1::s_wordIdVal1
static const int s_wordIdVal1
Definition: CMXRoI_v1.h:87
et
Extra patterns decribing particle interation process.
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
xAOD::CMXRoI_v1::missingEtSigHits
unsigned int missingEtSigHits() const
Return Missing-ET-Sig hits.
Definition: CMXRoI_v1.cxx:130
AuxStoreAccessorMacros.h
xAOD::CMXRoI_v1::eyError
int eyError(SumType type=NORMAL) const
Return Ey error flags (bit 0 Overflow)
Definition: CMXRoI_v1.cxx:113
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
xAOD::CMXRoI_v1::ex
unsigned int ex(SumType type=NORMAL) const
Return Ex.
Definition: CMXRoI_v1.cxx:97
xAOD::CMXRoI_v1::setCmxRoIWords
void setCmxRoIWords(const std::vector< uint32_t > &)
set cmxRoIWords
xAOD::CMXRoI_v1::s_etOffset
static const int s_etOffset
Definition: CMXRoI_v1.h:108
xAOD::CMXRoI_v1::s_wordIdBit
static const int s_wordIdBit
Definition: CMXRoI_v1.h:90
xAOD::CMXRoI_v1::s_energyMask
static const int s_energyMask
Definition: CMXRoI_v1.h:102
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::CMXRoI_v1::et
unsigned int et(SumType type=NORMAL) const
Return Et.
Definition: CMXRoI_v1.cxx:105
xAOD::CMXRoI_v1::s_missingEtHitsMask
static const int s_missingEtHitsMask
Definition: CMXRoI_v1.h:100
xAOD::CMXRoI_v1::eyWord
unsigned int eyWord(SumType type=NORMAL) const
Return Ey RoI word.
Definition: CMXRoI_v1.cxx:144
xAOD::CMXRoI_v1::s_overflowMask
static const int s_overflowMask
Definition: CMXRoI_v1.h:103
xAOD::CMXRoI_v1::NORMAL
@ NORMAL
Definition: CMXRoI_v1.h:30
xAOD::CMXRoI_v1::cmxRoIWords
const std::vector< uint32_t > & cmxRoIWords() const
get cmxRoIWords
xAOD::CMXRoI_v1::s_overflowBit
static const int s_overflowBit
Definition: CMXRoI_v1.h:95
xAOD::CMXRoI_v1::s_missingEtSigHitsBit
static const int s_missingEtSigHitsBit
Definition: CMXRoI_v1.h:93
xAOD::CMXRoI_v1::exWord
unsigned int exWord(SumType type=NORMAL) const
Return Ex RoI word.
Definition: CMXRoI_v1.cxx:140
xAOD::CMXRoI_v1::s_wordIdVal2
static const int s_wordIdVal2
Definition: CMXRoI_v1.h:88
xAOD::CMXRoI_v1::sumEtHits
unsigned int sumEtHits(SumType type=NORMAL) const
Return Sum-ET hits.
Definition: CMXRoI_v1.cxx:121
xAOD::CMXRoI_v1::s_wordIdVal0
static const int s_wordIdVal0
Definition: CMXRoI_v1.h:86
xAOD::CMXRoI_v1::s_exOffset
static const int s_exOffset
Definition: CMXRoI_v1.h:106
xAOD::CMXRoI_v1::exError
int exError(SumType type=NORMAL) const
Return Ex error flags (bit 0 Overflow)
Definition: CMXRoI_v1.cxx:109
xAOD::CMXRoI_v1::roiWord
uint32_t roiWord(int word) const
Return packed Energy RoI word (0-5)
Definition: CMXRoI_v1.cxx:136
xAOD::CMXRoI_v1::s_energyBit
static const int s_energyBit
Definition: CMXRoI_v1.h:94
xAOD::CMXRoI_v1::ey
unsigned int ey(SumType type=NORMAL) const
Return Ey.
Definition: CMXRoI_v1.cxx:101
xAOD::CMXRoI_v1::initialize
virtual void initialize(uint32_t roiWord0, uint32_t roiWord1, uint32_t roiWord2, uint32_t roiWord3, uint32_t roiWord4, uint32_t roiWord5)
initialize
xAOD::CMXRoI_v1::s_sumEtHitsMask
static const int s_sumEtHitsMask
Definition: CMXRoI_v1.h:99
xAOD::roiWord3
setRoIWord1 roiWord3
Definition: EnergySumRoI_v2.cxx:87
xAOD::CMXRoI_v1::s_missingEtSigHitsMask
static const int s_missingEtSigHitsMask
Definition: CMXRoI_v1.h:101
xAOD::CMXRoI_v1::etWord
unsigned int etWord(SumType type=NORMAL) const
Return ET RoI word.
Definition: CMXRoI_v1.cxx:148
xAOD::CMXRoI_v1::SumType
SumType
Definition: CMXRoI_v1.h:30
xAOD::roiWord5
setRoIWord1 setRoIWord3 roiWord5
Definition: EnergySumRoI_v2.cxx:91
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
CMXRoI_v1.h
xAOD::CMXRoI_v1::missingEtHits
unsigned int missingEtHits(SumType type=NORMAL) const
Return Missing-ET hits.
Definition: CMXRoI_v1.cxx:125
xAOD::CMXRoI_v1::s_sumEtHitsBit
static const int s_sumEtHitsBit
Definition: CMXRoI_v1.h:91
xAOD::CMXRoI_v1::MASKED
@ MASKED
Definition: CMXRoI_v1.h:30
xAOD::CMXRoI_v1::s_eyOffset
static const int s_eyOffset
Definition: CMXRoI_v1.h:107
xAOD::CMXRoI_v1
Description of CMXRoI_v1.
Definition: CMXRoI_v1.h:27
xAOD::CMXRoI_v1::s_maxRoiWords
static const int s_maxRoiWords
Definition: CMXRoI_v1.h:109
xAOD::roiWord1
roiWord1
Definition: EnergySumRoI_v1.cxx:49
xAOD::AUXSTORE_OBJECT_SETTER_AND_GETTER
AUXSTORE_OBJECT_SETTER_AND_GETTER(CaloRings_v1, RingSetLinks, ringSetLinks, setRingSetLinks) unsigned CaloRings_v1
Definition: CaloRings_v1.cxx:27
xAOD::CMXRoI_v1::CMXRoI_v1
CMXRoI_v1()
Definition: CMXRoI_v1.cxx:18