ATLAS Offline Software
Loading...
Searching...
No Matches
CMMRoI_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: CMMRoI_v1.cxx 638578 2015-01-09 17:00:15Z morrisj $
6
7// System include(s):
8#include <cmath>
9
10// EDM includes(s):
12
13// Local include(s):
15
16namespace xAOD{
17
19 SG::AuxElement()
20 {
21 }
22
23 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( CMMRoI_v1 , uint32_t , jetEtRoiWord , setJetEtRoiWord )
24 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( CMMRoI_v1 , uint32_t , energyRoiWord0 , setEnergyRoiWord0 )
25 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( CMMRoI_v1 , uint32_t , energyRoiWord1 , setEnergyRoiWord1 )
26 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( CMMRoI_v1 , uint32_t , energyRoiWord2 , setEnergyRoiWord2 )
27
28
30 {
31 bool valid(true);
32 int wordId = (roiWord >> s_jetEtWordIdBit) & s_jetEtWordIdMask;
34 else {
35 wordId = (roiWord >> s_wordIdBit) & s_wordIdMask;
36 if (wordId == s_wordIdVal0) setEnergyRoiWord0( roiWord );
37 else if (wordId == s_wordIdVal1) setEnergyRoiWord1( roiWord );
38 else if (wordId == s_wordIdVal2) setEnergyRoiWord2( roiWord );
39 else valid = false;
40 }
41 return valid;
42 }
43
46 {
48 }
49
52 {
54 }
55
61
67
69 int CMMRoI_v1::ex() const
70 {
72 }
73
75 int CMMRoI_v1::ey() const
76 {
78 }
79
81 int CMMRoI_v1::et() const
82 {
84 }
85
88 {
89 return ((jetEtRoiWord() >> s_jetEtParityBit) & 0x1) << 1;
90 }
91
94 {
95 return parity(energyRoiWord1()) << 1;
96 }
97
100 {
101 return parity(energyRoiWord2()) << 1;
102 }
103
106 {
107 return parity(energyRoiWord0()) << 1;
108 }
109
112 {
113 return (parity(energyRoiWord0()) << 1) | overflow(energyRoiWord0());
114 }
115
118 {
119 return (parity(energyRoiWord1()) << 1) | overflow(energyRoiWord1());
120 }
121
124 {
125 return (parity(energyRoiWord2()) << 1) | overflow(energyRoiWord2());
126 }
127
130 {
131 return (roiWord >> s_parityBit) & 0x1;
132 }
133
136 {
137 return (roiWord >> s_overflowBit) & 0x1;
138 }
139
140} // namespace xAOD
#define AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of primitive auxiliary properties.
AuxElement()
Default constructor.
Description of CMMRoI_v1.
Definition CMMRoI_v1.h:27
static const int s_missingEtHitsMask
Definition CMMRoI_v1.h:111
int eyError() const
Return Ey error flags (bit 0 Overflow, bit 1 Parity)
static const int s_sumEtHitsMask
Definition CMMRoI_v1.h:110
static const int s_jetEtWordIdVal
Definition CMMRoI_v1.h:91
static const int s_wordIdMask
Definition CMMRoI_v1.h:108
int jetEtHits() const
Return Jet-ET hits.
Definition CMMRoI_v1.cxx:45
uint32_t energyRoiWord0() const
get energyRoiWord0
int ex() const
Return Ex.
Definition CMMRoI_v1.cxx:69
static const int s_wordIdVal2
Definition CMMRoI_v1.h:94
void setEnergyRoiWord2(uint32_t)
set energyRoiWord2
int overflow(uint32_t roiWord) const
Return Energy overflow flag (0/1)
int ey() const
Return Ey.
Definition CMMRoI_v1.cxx:75
void setJetEtRoiWord(uint32_t)
set jetEtRoiWord
bool setRoiWord(uint32_t roiWord)
Set RoI word with ID check Internally works out the type of roiWord.
Definition CMMRoI_v1.cxx:29
static const int s_wordIdVal0
Definition CMMRoI_v1.h:92
static const int s_wordIdBit
Definition CMMRoI_v1.h:97
static const int s_missingEtSigHitsBit
Definition CMMRoI_v1.h:101
uint32_t jetEtRoiWord() const
get jetEtRoiWord
uint32_t energyRoiWord2() const
get energyRoiWord2
int etError() const
Return Et error flags (bit 0 Overflow, bit 1 Parity)
int missingEtError() const
Return Missing-ET error flag (bit 1 Parity)
Definition CMMRoI_v1.cxx:99
int jetEtError() const
Return Jet-ET error flag (bit 1 Parity)
Definition CMMRoI_v1.cxx:87
static const int s_overflowBit
Definition CMMRoI_v1.h:105
int sumEtHits() const
Return Sum-ET hits.
Definition CMMRoI_v1.cxx:51
static const int s_wordIdVal1
Definition CMMRoI_v1.h:93
static const int s_parityBit
Definition CMMRoI_v1.h:104
static const int s_jetEtHitsBit
Definition CMMRoI_v1.h:98
int et() const
Return Et.
Definition CMMRoI_v1.cxx:81
uint32_t energyRoiWord1() const
get energyRoiWord1
static const int s_missingEtHitsBit
Definition CMMRoI_v1.h:100
int missingEtSigHits() const
Return Missing-ET-Sig hits.
Definition CMMRoI_v1.cxx:63
static const int s_missingEtSigHitsMask
Definition CMMRoI_v1.h:112
static const int s_jetEtWordIdMask
Definition CMMRoI_v1.h:107
int missingEtHits() const
Return Missing-ET hits.
Definition CMMRoI_v1.cxx:57
void setEnergyRoiWord0(uint32_t)
set energyRoiWord0
int sumEtError() const
Return Sum-ET error flag (bit 1 Parity)
Definition CMMRoI_v1.cxx:93
static const int s_jetEtWordIdBit
Definition CMMRoI_v1.h:96
static const int s_sumEtHitsBit
Definition CMMRoI_v1.h:99
static const int s_jetEtParityBit
Definition CMMRoI_v1.h:103
int exError() const
Return Ex error flags (bit 0 Overflow, bit 1 Parity)
int missingEtSigError() const
Return Missing-ET-Sig error flag (bit 1 Parity)
void setEnergyRoiWord1(uint32_t)
set energyRoiWord1
static const int s_jetEtHitsMask
Definition CMMRoI_v1.h:109
int parity(uint32_t roiWord) const
Return Energy parity error (0/1)
static const int s_energyMask
Definition CMMRoI_v1.h:113
static const int s_energyBit
Definition CMMRoI_v1.h:102
Forward declaration.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
setBGCode setTAP setLVL2ErrorBits bool
setEventNumber uint32_t