ATLAS Offline Software
eFexTauRoI_v1.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef XAODTRIGGER_VERSIONS_EFEXTAUROI_V1_H
8 #define XAODTRIGGER_VERSIONS_EFEXTAUROI_V1_H
9 
10 // System include(s):
11 extern "C" {
12 # include <stdint.h>
13 }
14 #include <vector>
15 #include <string>
16 
17 // xAOD include(s):
19 
20 namespace xAOD {
21 
29  class eFexTauRoI_v1 : public SG::AuxElement {
30 
31  public:
33  eFexTauRoI_v1();
34 
36  void initialize( unsigned int eFexNumber, unsigned int shelf, uint32_t word0 );
38 
40  enum ObjectType {
41  xTOB = 0,
42  TOB = 1
43  };
44 
46  enum AlgoType {
47  Heuristic = 0,
48  BDT = 1
49  };
50 
52  uint32_t word0() const;
53  uint32_t word1() const;
57 
58  // Shelf number (decoded from second xTOB word)
59  unsigned int shelfNumber() const;
60 
61  // eFEX number (decoded from second xTOB word)
62  unsigned int eFexNumber() const;
63 
65  float et() const;
66  void setEt( float value);
67 
69  float eta() const;
70  void setEta( float value);
71  int iEta() const;
72  unsigned int seed() const;
73 
75  float phi() const;
76  void setPhi( float value);
77  int iPhi() const;
78 
80  int iEtaTopo() const;
81  int iPhiTopo() const;
82 
85  float rCore() const;
86  float rHad() const;
87 
97 
99  char isTOB() const;
100  void setIsTOB( char value);
101 
103  uint32_t tobWord() const;
104 
105 
107 
109  unsigned int tobVersion() const;
110 
112  ObjectType type() const;
113 
114 
116  unsigned int fpga() const;
117 
119  unsigned int fpgaEta() const;
120 
122  unsigned int fpgaPhi() const;
123 
125  bool upNotDown() const;
126 
128  unsigned int etTOB() const;
129 
131  unsigned int etXTOB() const;
132 
134  unsigned int rCoreThresholds() const;
135 
137  unsigned int bdtThresholds() const;
138 
140  unsigned int rHadThresholds() const;
141 
143  unsigned int tauOneThresholds() const;
144 
146  unsigned int tauTwoThresholds() const;
147 
149  unsigned int tauThreeThresholds() const;
150 
152  bool seedMax() const;
153 
154  //? Bunch crossing number (last 4 bits, xTOB only)
155  unsigned int bcn4() const;
156 
158  unsigned int bdtScore() const;
159 
160  private:
161 
164  float computeEta() const;
165 
167  static const float s_tobEtScale;
168  static const float s_xTobEtScale;
169  static const float s_towerEtaWidth;
170 
171 
177  // Data locations within word
178  static const int s_fpgaBit = 30;
179  static const int s_etaBit = 27;
180  static const int s_phiBit = 24;
181  static const int s_veto3Bit = 22;
182  static const int s_veto2Bit = 20;
183  static const int s_veto1Bit = 18;
184  static const int s_seedBit = 16;
185  static const int s_updownBit = 15;
186  static const int s_maxBit = 14;
187  static const int s_versionBit = 12;
188  static const int s_etBit = 0;
189  static const int s_etBitXTOB = 2;
190  static const int s_bcn4Bit = 28;
191  static const int s_shelfBit = 24;
192  static const int s_eFexBit = 20;
193  static const int s_bdtScoreBit = 0;
194 
195  // Data masks
196  static const int s_fpgaMask = 0x3;
197  static const int s_etaMask = 0x7;
198  static const int s_phiMask = 0x7;
199  static const int s_veto1Mask = 0x3;
200  static const int s_veto2Mask = 0x3;
201  static const int s_veto3Mask = 0x3;
202  static const int s_seedMask = 0x3;
203  static const int s_updownMask = 0x1;
204  static const int s_maxMask = 0x1;
205  static const int s_versionMask = 0x3;
206  static const int s_etMask = 0xfff;
207  static const int s_etFullMask = 0xffff;
208  static const int s_bcn4Mask = 0xf;
209  static const int s_eFexMask = 0xf;
210  static const int s_shelfMask = 0xf;
211  static const int s_bdtScoreMask = 0xfff;
212 
213  // For decoding coordinates
214  //
215  static const int s_numPhi = 64;
216  static const int s_eFexPhiMask = 0xf;
217  static const int s_eFexPhiBit = 0;
218  static const int s_eFexPhiWidth = 8;
219  static const int s_eFexPhiOffset = 2;
220  static const int s_eFexEtaMask = 0xf;
221  static const int s_eFexEtaBit = 4;
222  static const int s_eFexEtaWidth = 16;
223  static const int s_fpgaEtaWidth = 4;
224  static const int s_shelfPhiWidth = 4;
225  static const int s_minEta = -25;
226 
227  }; // class eFexTauRoI_v1
228 
229 } // namespace xAOD
230 
231 // Declare the inheritance of the type:
232 #include "xAODCore/BaseInfo.h"
234 
235 #endif // XAODTRIGGER_VERSIONS_EFEXTAUROI_V1_H
xAOD::eFexTauRoI_v1::s_eFexEtaBit
static const int s_eFexEtaBit
Definition: eFexTauRoI_v1.h:221
xAOD::eFexTauRoI_v1::rCoreThresholds
unsigned int rCoreThresholds() const
Tau Condition 1 (rCore) results.
Definition: eFexTauRoI_v1.cxx:188
xAOD::eFexTauRoI_v1::word1
uint32_t word1() const
xAOD::eFexTauRoI_v1::iEtaTopo
int iEtaTopo() const
Getter for integer phi index (0-63)
Definition: eFexTauRoI_v1.cxx:284
xAOD::eFexTauRoI_v1::s_shelfPhiWidth
static const int s_shelfPhiWidth
Definition: eFexTauRoI_v1.h:224
xAOD::eFexTauRoI_v1::s_updownBit
static const int s_updownBit
Definition: eFexTauRoI_v1.h:185
xAOD::eFexTauRoI_v1::s_bcn4Bit
static const int s_bcn4Bit
Definition: eFexTauRoI_v1.h:190
xAOD::eFexTauRoI_v1::et
float et() const
TOB ET (decoded from TOB, stored for convenience)
xAOD::eFexTauRoI_v1::setWord1
void setWord1(uint32_t value)
xAOD::eFexTauRoI_v1::AlgoType
AlgoType
Tau id algorithm types.
Definition: eFexTauRoI_v1.h:46
xAOD::eFexTauRoI_v1::s_seedBit
static const int s_seedBit
Definition: eFexTauRoI_v1.h:184
xAOD::eFexTauRoI_v1::BDT
@ BDT
This object is generated by the BDT algorithm.
Definition: eFexTauRoI_v1.h:48
xAOD::eFexTauRoI_v1::s_phiMask
static const int s_phiMask
Definition: eFexTauRoI_v1.h:198
xAOD::eFexTauRoI_v1::s_numPhi
static const int s_numPhi
Definition: eFexTauRoI_v1.h:215
xAOD::eFexTauRoI_v1::s_versionMask
static const int s_versionMask
Definition: eFexTauRoI_v1.h:205
xAOD::eFexTauRoI_v1::xTOB
@ xTOB
This object is an xTOB (2*32 bit words)
Definition: eFexTauRoI_v1.h:41
xAOD::eFexTauRoI_v1::s_tobEtScale
static const float s_tobEtScale
Constants used in converting to ATLAS units.
Definition: eFexTauRoI_v1.h:167
xAOD::eFexTauRoI_v1::setRHadNumerator
void setRHadNumerator(uint16_t value)
xAOD::eFexTauRoI_v1::eta
float eta() const
setter for the above
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
xAOD::eFexTauRoI_v1::rHadDenominator
uint16_t rHadDenominator() const
xAOD::eFexTauRoI_v1::s_veto3Mask
static const int s_veto3Mask
Definition: eFexTauRoI_v1.h:201
xAOD::eFexTauRoI_v1::seedMax
bool seedMax() const
Seed = max flag. Is this really useful?
Definition: eFexTauRoI_v1.cxx:154
SG_BASE
SG_BASE(xAOD::eFexTauRoI_v1, SG::AuxElement)
SG::AuxElement
Base class for elements of a container that can have aux data.
Definition: AuxElement.h:483
xAOD::eFexTauRoI_v1::setWord0
void setWord0(uint32_t value)
Set the "raw" 32-bit words describing the e/gamma candidate.
xAOD::eFexTauRoI_v1::initialize
void initialize(unsigned int eFexNumber, unsigned int shelf, uint32_t word0)
Initialise the object with its most important properties.
Definition: eFexTauRoI_v1.cxx:28
xAOD::eFexTauRoI_v1::tauTwoThresholds
unsigned int tauTwoThresholds() const
Tau Condition 2 (generic) results.
Definition: eFexTauRoI_v1.cxx:209
xAOD::eFexTauRoI_v1::s_seedMask
static const int s_seedMask
Definition: eFexTauRoI_v1.h:202
xAOD::eFexTauRoI_v1::word0
uint32_t word0() const
The "raw" 32-bit words describing the e/gamma candidate.
BaseInfo.h
xAOD::eFexTauRoI_v1::rCore
float rCore() const
Jet Discriminants Derived floating point values (not used in actual algorithm)
Definition: eFexTauRoI_v1.cxx:236
athena.value
value
Definition: athena.py:124
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::eFexTauRoI_v1::tobWord
uint32_t tobWord() const
Return TOB word corresponding to this TOB or xTOB.
Definition: eFexTauRoI_v1.cxx:223
xAOD::eFexTauRoI_v1::s_maxMask
static const int s_maxMask
Definition: eFexTauRoI_v1.h:204
xAOD::eFexTauRoI_v1::s_eFexEtaMask
static const int s_eFexEtaMask
Definition: eFexTauRoI_v1.h:220
xAOD::eFexTauRoI_v1::setEt
void setEt(float value)
floating point value (MeV, TOB scale)
xAOD::eFexTauRoI_v1::ObjectType
ObjectType
Object types.
Definition: eFexTauRoI_v1.h:40
xAOD::eFexTauRoI_v1::shelfNumber
unsigned int shelfNumber() const
Shelf number.
Definition: eFexTauRoI_v1.cxx:123
xAOD::eFexTauRoI_v1::s_fpgaMask
static const int s_fpgaMask
Definition: eFexTauRoI_v1.h:196
xAOD::eFexTauRoI_v1::setRHadDenominator
void setRHadDenominator(uint16_t value)
xAOD::eFexTauRoI_v1::etXTOB
unsigned int etXTOB() const
Cluster ET (xTOB ET scale, 25 MeV/count)
Definition: eFexTauRoI_v1.cxx:173
xAOD::eFexTauRoI_v1::s_eFexMask
static const int s_eFexMask
Definition: eFexTauRoI_v1.h:209
xAOD::eFexTauRoI_v1::setEta
void setEta(float value)
Floating point, full precision (0.025)
xAOD::eFexTauRoI_v1::s_eFexPhiWidth
static const int s_eFexPhiWidth
Definition: eFexTauRoI_v1.h:218
xAOD::eFexTauRoI_v1::s_fpgaBit
static const int s_fpgaBit
Constants used in decoding TOB words For TOB word format changes these can be replaced by arrays in t...
Definition: eFexTauRoI_v1.h:178
xAOD::eFexTauRoI_v1::s_versionBit
static const int s_versionBit
Definition: eFexTauRoI_v1.h:187
xAOD::eFexTauRoI_v1::fpga
unsigned int fpga() const
FPGA number.
Definition: eFexTauRoI_v1.cxx:134
xAOD::eFexTauRoI_v1::s_eFexPhiOffset
static const int s_eFexPhiOffset
Definition: eFexTauRoI_v1.h:219
xAOD::eFexTauRoI_v1::tauOneThresholds
unsigned int tauOneThresholds() const
Tau Condition 1 (generic) results.
Definition: eFexTauRoI_v1.cxx:205
xAOD::eFexTauRoI_v1::s_shelfMask
static const int s_shelfMask
Definition: eFexTauRoI_v1.h:210
xAOD::eFexTauRoI_v1::tobVersion
unsigned int tobVersion() const
Data decoded from the TOB/RoI word and eFEX number.
Definition: eFexTauRoI_v1.cxx:113
xAOD::eFexTauRoI_v1::s_shelfBit
static const int s_shelfBit
Definition: eFexTauRoI_v1.h:191
xAOD::eFexTauRoI_v1::s_etBit
static const int s_etBit
Definition: eFexTauRoI_v1.h:188
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
xAOD::eFexTauRoI_v1::iPhiTopo
int iPhiTopo() const
Return phi index in the range used by L1Topo (0->127)
Definition: eFexTauRoI_v1.cxx:276
xAOD::eFexTauRoI_v1::s_maxBit
static const int s_maxBit
Definition: eFexTauRoI_v1.h:186
xAOD::eFexTauRoI_v1::TOB
@ TOB
This object is a TOB (1*32 bit word)
Definition: eFexTauRoI_v1.h:42
xAOD::eFexTauRoI_v1
Class describing a LVL1 eFEX tau region of interest.
Definition: eFexTauRoI_v1.h:29
xAOD::eFexTauRoI_v1::s_eFexEtaWidth
static const int s_eFexEtaWidth
Definition: eFexTauRoI_v1.h:222
xAOD::eFexTauRoI_v1::isTOB
char isTOB() const
Is this one a TOB (or xTOB partner of a TOB)?
xAOD::eFexTauRoI_v1::eFexTauRoI_v1
eFexTauRoI_v1()
Default constructor.
Definition: eFexTauRoI_v1.cxx:23
xAOD::eFexTauRoI_v1::rHad
float rHad() const
Definition: eFexTauRoI_v1.cxx:241
xAOD::eFexTauRoI_v1::s_updownMask
static const int s_updownMask
Definition: eFexTauRoI_v1.h:203
xAOD::eFexTauRoI_v1::s_minEta
static const int s_minEta
Definition: eFexTauRoI_v1.h:225
xAOD::eFexTauRoI_v1::Heuristic
@ Heuristic
This object is generated by the heuristic algorithm.
Definition: eFexTauRoI_v1.h:47
xAOD::eFexTauRoI_v1::bdtThresholds
unsigned int bdtThresholds() const
Alternative Tau Condition 1 (BDT) results.
Definition: eFexTauRoI_v1.cxx:194
xAOD::eFexTauRoI_v1::iPhi
int iPhi() const
Setter for the above.
Definition: eFexTauRoI_v1.cxx:249
xAOD::eFexTauRoI_v1::s_bdtScoreBit
static const int s_bdtScoreBit
Definition: eFexTauRoI_v1.h:193
xAOD::eFexTauRoI_v1::s_eFexPhiMask
static const int s_eFexPhiMask
Definition: eFexTauRoI_v1.h:216
xAOD::eFexTauRoI_v1::fpgaPhi
unsigned int fpgaPhi() const
phi index within FPGA
Definition: eFexTauRoI_v1.cxx:142
xAOD::eFexTauRoI_v1::computeEta
float computeEta() const
Compute TOB eta.
Definition: eFexTauRoI_v1.cxx:292
xAOD::eFexTauRoI_v1::seed
unsigned int seed() const
getter for integer eta index (-25->24)
Definition: eFexTauRoI_v1.cxx:150
xAOD::eFexTauRoI_v1::s_xTobEtScale
static const float s_xTobEtScale
Definition: eFexTauRoI_v1.h:168
xAOD::eFexTauRoI_v1::phi
float phi() const
Seed supercell index within central tower (0 -> 3)
xAOD::eFexTauRoI_v1::eFexNumber
unsigned int eFexNumber() const
eFEX number
Definition: eFexTauRoI_v1.cxx:118
xAOD::eFexTauRoI_v1::upNotDown
bool upNotDown() const
Cluster up/down flag (1 = up, 0 = down)
Definition: eFexTauRoI_v1.cxx:146
xAOD::eFexTauRoI_v1::s_etMask
static const int s_etMask
Definition: eFexTauRoI_v1.h:206
xAOD::eFexTauRoI_v1::s_etaMask
static const int s_etaMask
Definition: eFexTauRoI_v1.h:197
xAOD::eFexTauRoI_v1::rHadNumerator
uint16_t rHadNumerator() const
xAOD::eFexTauRoI_v1::s_towerEtaWidth
static const float s_towerEtaWidth
Definition: eFexTauRoI_v1.h:169
xAOD::eFexTauRoI_v1::s_bdtScoreMask
static const int s_bdtScoreMask
Definition: eFexTauRoI_v1.h:211
xAOD::eFexTauRoI_v1::s_veto3Bit
static const int s_veto3Bit
Definition: eFexTauRoI_v1.h:181
xAOD::eFexTauRoI_v1::fpgaEta
unsigned int fpgaEta() const
eta index within FPGA
Definition: eFexTauRoI_v1.cxx:138
xAOD::eFexTauRoI_v1::bcn4
unsigned int bcn4() const
Last 4 bits of BCN (xTOB only)
Definition: eFexTauRoI_v1.cxx:218
xAOD::eFexTauRoI_v1::s_etFullMask
static const int s_etFullMask
Definition: eFexTauRoI_v1.h:207
xAOD::eFexTauRoI_v1::etTOB
unsigned int etTOB() const
Cluster ET (TOB ET scale, 100 MeV/count)
Definition: eFexTauRoI_v1.cxx:159
xAOD::eFexTauRoI_v1::rCoreNumerator
uint16_t rCoreNumerator() const
Actual values used in algorithm (setters and getters)
xAOD::eFexTauRoI_v1::s_veto1Bit
static const int s_veto1Bit
Definition: eFexTauRoI_v1.h:183
xAOD::eFexTauRoI_v1::bdtScore
unsigned int bdtScore() const
BDT Score (xTOB only)
Definition: eFexTauRoI_v1.cxx:180
xAOD::eFexTauRoI_v1::iEta
int iEta() const
setter for the above
Definition: eFexTauRoI_v1.cxx:265
xAOD::eFexTauRoI_v1::setRCoreDenominator
void setRCoreDenominator(uint16_t value)
xAOD::eFexTauRoI_v1::s_etBitXTOB
static const int s_etBitXTOB
Definition: eFexTauRoI_v1.h:189
xAOD::eFexTauRoI_v1::s_veto2Mask
static const int s_veto2Mask
Definition: eFexTauRoI_v1.h:200
xAOD::eFexTauRoI_v1::s_veto2Bit
static const int s_veto2Bit
Definition: eFexTauRoI_v1.h:182
xAOD::eFexTauRoI_v1::s_eFexPhiBit
static const int s_eFexPhiBit
Definition: eFexTauRoI_v1.h:217
xAOD::eFexTauRoI_v1::setIsTOB
void setIsTOB(char value)
xAOD::eFexTauRoI_v1::s_etaBit
static const int s_etaBit
Definition: eFexTauRoI_v1.h:179
xAOD::eFexTauRoI_v1::s_phiBit
static const int s_phiBit
Definition: eFexTauRoI_v1.h:180
xAOD::eFexTauRoI_v1::setPhi
void setPhi(float value)
Floating point, ATLAS phi convention (-pi -> pi)
xAOD::eFexTauRoI_v1::setRCoreNumerator
void setRCoreNumerator(uint16_t value)
xAOD::eFexTauRoI_v1::s_eFexBit
static const int s_eFexBit
Definition: eFexTauRoI_v1.h:192
xAOD::eFexTauRoI_v1::s_bcn4Mask
static const int s_bcn4Mask
Definition: eFexTauRoI_v1.h:208
xAOD::eFexTauRoI_v1::s_fpgaEtaWidth
static const int s_fpgaEtaWidth
Definition: eFexTauRoI_v1.h:223
xAOD::eFexTauRoI_v1::s_veto1Mask
static const int s_veto1Mask
Definition: eFexTauRoI_v1.h:199
AuxElement.h
Base class for elements of a container that can have aux data.
xAOD::eFexTauRoI_v1::rCoreDenominator
uint16_t rCoreDenominator() const
xAOD::eFexTauRoI_v1::rHadThresholds
unsigned int rHadThresholds() const
Tau Condition 2 (Had/EM) results.
Definition: eFexTauRoI_v1.cxx:200
xAOD::eFexTauRoI_v1::tauThreeThresholds
unsigned int tauThreeThresholds() const
Tau Condition 3 (unused) results.
Definition: eFexTauRoI_v1.cxx:213
xAOD::eFexTauRoI_v1::type
ObjectType type() const
Object type (TOB or xTOB)
Definition: eFexTauRoI_v1.cxx:128