The eFEXtauBDT class calculates the tau TOB variables.
More...
#include <eFEXtauBDT.h>
|
| | eFEXtauBDT (AthAlgTool *log, std::string config_path) |
| | Constructors.
|
| virtual | ~eFEXtauBDT () |
| | Destructor.
|
| void | next () |
| void | setPointerToSCell (int eta, int phi, int layer, unsigned int *sCellPtr) |
| void | setPointerToFracMultipliersParam (int index, unsigned int *fracMultipliers) |
| void | setPointerToBDTThresholdsParam (int index, unsigned int *bdtThresholds) |
| void | setPointerToETThresholdParam (unsigned int *etThreshold) |
| void | setPointerToMaxETParam (unsigned int *maxEtThreshold) |
| void | setPointerToMaxETParamFrac (unsigned int *maxEtThreshold) |
| void | setPointerToBDTMinETParam (unsigned int *bdtMinEtThreshold) |
| void | buildBDTVariables () |
| void | computeBDTScore () |
| void | computeETEstimate () |
| void | computeEMETEstimate () |
| void | computeHADETEstimate () |
| void | computeFracCondition () |
| void | computeBDTCondition () |
| void | computeTowers () |
| void | computeIsCentralTowerSeed () |
| void | debugPrintBDTVariables () |
| void | debugPrintTowers () |
| void | initBDTVars () |
| void | initETPointers () |
| void | initEMETPointers () |
| void | initHADETPointers () |
| void | initTowersPointers () |
| unsigned int | getETEstimate () const |
| unsigned int | getEMETEstimate () const |
| unsigned int | getEMETEstimateOverflow () const |
| unsigned int | getHADETEstimate () const |
| unsigned int | getHADETEstimateOverflow () const |
| std::vector< unsigned int > & | getBDTVars () |
| std::vector< unsigned int > & | getTowers () |
| std::vector< unsigned int > & | getEMMultipliedByFracParams () |
| std::vector< unsigned int > & | getEMMultipliedByFracParamsOverflow () |
| unsigned int | getBDTScoreShifted () const |
| unsigned int | getET () const |
| unsigned int | getTOBETOverflow () const |
| unsigned int | getIsMax () const |
| unsigned int | getBDTCondition () const |
| unsigned int | getFracCondition () const |
| unsigned int | getBDTScore () const |
| unsigned int | multWithOverflow (unsigned int a, unsigned int b, bool &overflow, int resultNBits) |
| bool | isOverflow (unsigned int number, int nBits) |
| unsigned int | BitLeftShift (unsigned int number, int by, int totalNBits) |
| int | flatTowerIndex (int eta, int phi) |
|
| void | initPointers (const std::vector< std::vector< int > > &scells, std::vector< unsigned int * > &ptr_list) |
| unsigned int | computeEstimate (std::vector< unsigned int * > &ptr_list, bool &overflow, int resultNBits) |
| unsigned int * | superCellToPtr (int eta, int phi, int layer) |
The eFEXtauBDT class calculates the tau TOB variables.
Definition at line 26 of file eFEXtauBDT.h.
◆ eFEXtauBDT()
| LVL1::eFEXtauBDT::eFEXtauBDT |
( |
AthAlgTool * | log, |
|
|
std::string | config_path ) |
Constructors.
Definition at line 19 of file eFEXtauBDT.cxx.
21 m_log->msg(MSG::DEBUG) <<
"Configured BDT with this file: " << config_path
28}
std::vector< unsigned int > m_emEtXMultiplierOverflow
unsigned int * m_fracMultipliers[3]
std::vector< unsigned int > m_towers
std::vector< unsigned int > m_emEtXMultiplier
std::vector< unsigned int > m_bdtVars
◆ ~eFEXtauBDT()
| LVL1::eFEXtauBDT::~eFEXtauBDT |
( |
| ) |
|
|
virtual |
◆ BitLeftShift()
| unsigned int LVL1::eFEXtauBDT::BitLeftShift |
( |
unsigned int | number, |
|
|
int | by, |
|
|
int | totalNBits ) |
|
inline |
Definition at line 310 of file eFEXtauBDT.cxx.
311 {
312 if ((
number >> (totalNBits - by)) != 0) {
313 return (1 << totalNBits) - 1;
314 }
316}
std::string number(const double &d, const std::string &s)
◆ buildBDTVariables()
| void LVL1::eFEXtauBDT::buildBDTVariables |
( |
| ) |
|
Definition at line 201 of file eFEXtauBDT.cxx.
201 {
203 bool overflow;
206 if (overflow) {
208 }
209 }
212}
unsigned int computeEstimate(std::vector< unsigned int * > &ptr_list, bool &overflow, int resultNBits)
void debugPrintBDTVariables()
std::vector< std::vector< unsigned int * > > m_bdtVarComputeSCellPointers
◆ computeBDTCondition()
| void LVL1::eFEXtauBDT::computeBDTCondition |
( |
| ) |
|
Definition at line 350 of file eFEXtauBDT.cxx.
350 {
353
355
356
358
361
363 return;
364 }
365
367 for (;
i < n_thresholds;
i++) {
369 break;
370 }
371 }
373}
unsigned int * m_maxEtThreshold
unsigned int m_eTEstimate
unsigned int m_bdtCondition
bool m_eTEstimateOverflow
unsigned int * m_bdtMinEtThreshold
unsigned int * m_bdtThresholds[3]
unsigned int m_bdtScoreShifted
◆ computeBDTScore()
| void LVL1::eFEXtauBDT::computeBDTScore |
( |
| ) |
|
Definition at line 214 of file eFEXtauBDT.cxx.
214 {
215
217 m_log->msg(MSG::DEBUG)
218 <<
"BDT Variables not computed. BDT score will be garbage." <<
endmsg;
219 }
220
223}
◆ computeEMETEstimate()
| void LVL1::eFEXtauBDT::computeEMETEstimate |
( |
| ) |
|
Definition at line 231 of file eFEXtauBDT.cxx.
231 {
235}
bool m_EM_eTEstimateOverflow
std::vector< unsigned int * > m_EM_eTComputeSCellPointers
unsigned int m_EM_eTEstimate
◆ computeEstimate()
| unsigned int LVL1::eFEXtauBDT::computeEstimate |
( |
std::vector< unsigned int * > & | ptr_list, |
|
|
bool & | overflow, |
|
|
int | resultNBits ) |
|
private |
Definition at line 278 of file eFEXtauBDT.cxx.
279 {
281 overflow = false;
282 for (unsigned int *it : ptr_list) {
285 overflow = true;
286 }
287 }
289}
bool isOverflow(unsigned int number, int nBits)
REAL estimate(const int &elen, REAL *e)
◆ computeETEstimate()
| void LVL1::eFEXtauBDT::computeETEstimate |
( |
| ) |
|
Definition at line 225 of file eFEXtauBDT.cxx.
225 {
229}
std::vector< unsigned int * > m_eTComputeSCellPointers
◆ computeFracCondition()
| void LVL1::eFEXtauBDT::computeFracCondition |
( |
| ) |
|
Definition at line 318 of file eFEXtauBDT.cxx.
318 {
320
323
325 return;
326 }
327
330 return;
331 }
332
335 for (;
i < n_multipliers;
i++) {
336
337 bool overflow;
341
344 break;
345 }
346 }
348}
unsigned int BitLeftShift(unsigned int number, int by, int totalNBits)
unsigned int m_hadEstimateShifted
unsigned int multWithOverflow(unsigned int a, unsigned int b, bool &overflow, int resultNBits)
unsigned int m_fracCondition
unsigned int * m_maxEtThresholdFrac
unsigned int m_HAD_eTEstimate
bool m_HAD_eTEstimateOverflow
◆ computeHADETEstimate()
| void LVL1::eFEXtauBDT::computeHADETEstimate |
( |
| ) |
|
Definition at line 237 of file eFEXtauBDT.cxx.
237 {
241}
std::vector< unsigned int * > m_HAD_eTComputeSCellPointers
◆ computeIsCentralTowerSeed()
| void LVL1::eFEXtauBDT::computeIsCentralTowerSeed |
( |
| ) |
|
Definition at line 377 of file eFEXtauBDT.cxx.
377 {
379
380
381 unsigned int centralET =
m_towers[4];
382
383
384 for (
unsigned int beta = 0;
beta < 3;
beta++) {
385 for (unsigned int bphi = 0; bphi < 3; bphi++) {
387
388 if ((beta == 1) && (bphi == 1)) {
389 continue;
390 }
391
392
393 if (beta == 2 || (beta == 1 && bphi == 2)) {
394 if (centralET <=
m_towers[flatIndex]) {
396 }
397 }
398
399
400 else if (beta == 0 || (beta == 1 && bphi == 0)) {
401 if (centralET <
m_towers[flatIndex]) {
403 }
404 }
405 }
406 }
407
410 }
411
413}
int flatTowerIndex(int eta, int phi)
unsigned int * m_etThreshold
◆ computeTowers()
| void LVL1::eFEXtauBDT::computeTowers |
( |
| ) |
|
Definition at line 257 of file eFEXtauBDT.cxx.
257 {
258 for (
size_t i = 0;
i <
m_towers.size();
i++) {
259 bool overflow;
262 if (overflow) {
264 }
265 }
266
268}
std::vector< std::vector< unsigned int * > > m_towersComputeSCellPointers
◆ debugPrintBDTVariables()
| void LVL1::eFEXtauBDT::debugPrintBDTVariables |
( |
| ) |
|
Definition at line 191 of file eFEXtauBDT.cxx.
191 {
192 std::string bdtVariables = "";
194 bdtVariables += std::to_string(
m_bdtVars[i]) +
" ";
195 }
196
197 m_log->msg(MSG::DEBUG) <<
"BDT Variables: " << bdtVariables <<
endmsg;
198}
◆ debugPrintTowers()
| void LVL1::eFEXtauBDT::debugPrintTowers |
( |
| ) |
|
Definition at line 243 of file eFEXtauBDT.cxx.
243 {
244 m_log->msg(MSG::DEBUG) <<
"Towers Estimate: " <<
endmsg;
248 m_log->msg(MSG::DEBUG)
249 <<
"Tower " << flatIndex <<
" ET (eta=" <<
eta <<
", phi=" <<
phi
251 }
252 }
253}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
◆ flatTowerIndex()
| int LVL1::eFEXtauBDT::flatTowerIndex |
( |
int | eta, |
|
|
int | phi ) |
|
inline |
◆ getBDTCondition()
| unsigned int LVL1::eFEXtauBDT::getBDTCondition |
( |
| ) |
const |
|
inline |
◆ getBDTScore()
| unsigned int LVL1::eFEXtauBDT::getBDTScore |
( |
| ) |
const |
|
inline |
◆ getBDTScoreShifted()
| unsigned int LVL1::eFEXtauBDT::getBDTScoreShifted |
( |
| ) |
const |
|
inline |
◆ getBDTVars()
| std::vector< unsigned int > & LVL1::eFEXtauBDT::getBDTVars |
( |
| ) |
|
|
inline |
◆ getEMETEstimate()
| unsigned int LVL1::eFEXtauBDT::getEMETEstimate |
( |
| ) |
const |
|
inline |
◆ getEMETEstimateOverflow()
| unsigned int LVL1::eFEXtauBDT::getEMETEstimateOverflow |
( |
| ) |
const |
|
inline |
◆ getEMMultipliedByFracParams()
| std::vector< unsigned int > & LVL1::eFEXtauBDT::getEMMultipliedByFracParams |
( |
| ) |
|
|
inline |
◆ getEMMultipliedByFracParamsOverflow()
| std::vector< unsigned int > & LVL1::eFEXtauBDT::getEMMultipliedByFracParamsOverflow |
( |
| ) |
|
|
inline |
◆ getET()
| unsigned int LVL1::eFEXtauBDT::getET |
( |
| ) |
const |
◆ getETEstimate()
| unsigned int LVL1::eFEXtauBDT::getETEstimate |
( |
| ) |
const |
|
inline |
◆ getFracCondition()
| unsigned int LVL1::eFEXtauBDT::getFracCondition |
( |
| ) |
const |
|
inline |
◆ getHADETEstimate()
| unsigned int LVL1::eFEXtauBDT::getHADETEstimate |
( |
| ) |
const |
|
inline |
◆ getHADETEstimateOverflow()
| unsigned int LVL1::eFEXtauBDT::getHADETEstimateOverflow |
( |
| ) |
const |
|
inline |
◆ getIsMax()
| unsigned int LVL1::eFEXtauBDT::getIsMax |
( |
| ) |
const |
|
inline |
◆ getTOBETOverflow()
| unsigned int LVL1::eFEXtauBDT::getTOBETOverflow |
( |
| ) |
const |
|
inline |
◆ getTowers()
| std::vector< unsigned int > & LVL1::eFEXtauBDT::getTowers |
( |
| ) |
|
|
inline |
◆ initBDTVars()
| void LVL1::eFEXtauBDT::initBDTVars |
( |
| ) |
|
Definition at line 149 of file eFEXtauBDT.cxx.
149 {
150 for (
size_t i = 0;
i <
m_bdt.getVariables().size();
i++) {
151 BDTVariable
var =
m_bdt.getVariables()[
i];
152
153 m_log->msg(MSG::DEBUG) <<
i <<
" is " <<
var.m_name <<
", sum of supercells"
155 std::vector<unsigned int *> pointersToSCells;
156 for (
size_t j = 0; j <
var.m_scells.size(); j++) {
157 int eta =
var.m_scells[j][0];
158 int phi =
var.m_scells[j][1];
160 m_log->msg(MSG::DEBUG) <<
"\teta=" <<
eta <<
"\tphi=" <<
phi
163 if (ptr == 0) {
164 m_log->msg(MSG::DEBUG)
165 <<
"Could not convert eta=" <<
eta <<
" phi=" <<
phi
166 <<
" layer=" <<
layer
167 <<
" to a pointer to supercell. Are they within range?" <<
endmsg;
168 throw std::domain_error(
169 std::string(
"Could not convert eta=") + std::to_string(
eta) +
170 " phi=" + std::to_string(
phi) +
" layer=" + std::to_string(layer) +
171 " to a pointer to supercell. Are they within range?");
172 }
173 pointersToSCells.push_back(ptr);
174 }
175
177 }
178}
unsigned int * superCellToPtr(int eta, int phi, int layer)
◆ initEMETPointers()
| void LVL1::eFEXtauBDT::initEMETPointers |
( |
| ) |
|
Definition at line 109 of file eFEXtauBDT.cxx.
109 {
111}
void initPointers(const std::vector< std::vector< int > > &scells, std::vector< unsigned int * > &ptr_list)
◆ initETPointers()
| void LVL1::eFEXtauBDT::initETPointers |
( |
| ) |
|
◆ initHADETPointers()
| void LVL1::eFEXtauBDT::initHADETPointers |
( |
| ) |
|
◆ initPointers()
| void LVL1::eFEXtauBDT::initPointers |
( |
const std::vector< std::vector< int > > & | scells, |
|
|
std::vector< unsigned int * > & | ptr_list ) |
|
private |
Definition at line 117 of file eFEXtauBDT.cxx.
118 {
119 m_log->msg(MSG::DEBUG) <<
"Will use sum of supercells: " <<
endmsg;
120 for (const auto& scell : scells) {
123 int layer = scell[2];
124 m_log->msg(MSG::DEBUG) <<
"\teta=" <<
eta <<
"\tphi=" <<
phi
127 if (ptr == 0) {
128 m_log->msg(MSG::DEBUG)
129 <<
"Could not convert eta=" <<
eta <<
" phi=" <<
phi
130 <<
" layer=" <<
layer
131 <<
" to a pointer to supercell. Are they within range?" <<
endmsg;
132 throw std::domain_error(
133 std::string(
"Could not convert eta=") + std::to_string(
eta) +
134 " phi=" + std::to_string(
phi) +
" layer=" + std::to_string(layer) +
135 " to a pointer to supercell. Are they within range?");
136 }
137 ptr_list.push_back(ptr);
138 }
139}
◆ initTowersPointers()
| void LVL1::eFEXtauBDT::initTowersPointers |
( |
| ) |
|
◆ isOverflow()
| bool LVL1::eFEXtauBDT::isOverflow |
( |
unsigned int | number, |
|
|
int | nBits ) |
|
inline |
Definition at line 270 of file eFEXtauBDT.cxx.
270 {
271 if ((
number >> nBits) != 0) {
272 return true;
273 }
274 return false;
275}
◆ multWithOverflow()
| unsigned int LVL1::eFEXtauBDT::multWithOverflow |
( |
unsigned int | a, |
|
|
unsigned int | b, |
|
|
bool & | overflow, |
|
|
int | resultNBits ) |
Definition at line 291 of file eFEXtauBDT.cxx.
293 {
294 overflow = false;
295 if (b == 0) {
296 return 0;
297 }
299 if (
a != result / b) {
300
301
302 overflow = true;
303 }
304
306
308}
◆ next()
| void LVL1::eFEXtauBDT::next |
( |
| ) |
|
Definition at line 180 of file eFEXtauBDT.cxx.
180 {
189}
void computeHADETEstimate()
void computeBDTCondition()
void computeIsCentralTowerSeed()
void computeFracCondition()
void computeEMETEstimate()
◆ setPointerToBDTMinETParam()
| void LVL1::eFEXtauBDT::setPointerToBDTMinETParam |
( |
unsigned int * | bdtMinEtThreshold | ) |
|
◆ setPointerToBDTThresholdsParam()
| void LVL1::eFEXtauBDT::setPointerToBDTThresholdsParam |
( |
int | index, |
|
|
unsigned int * | bdtThresholds ) |
◆ setPointerToETThresholdParam()
| void LVL1::eFEXtauBDT::setPointerToETThresholdParam |
( |
unsigned int * | etThreshold | ) |
|
◆ setPointerToFracMultipliersParam()
| void LVL1::eFEXtauBDT::setPointerToFracMultipliersParam |
( |
int | index, |
|
|
unsigned int * | fracMultipliers ) |
◆ setPointerToMaxETParam()
| void LVL1::eFEXtauBDT::setPointerToMaxETParam |
( |
unsigned int * | maxEtThreshold | ) |
|
◆ setPointerToMaxETParamFrac()
| void LVL1::eFEXtauBDT::setPointerToMaxETParamFrac |
( |
unsigned int * | maxEtThreshold | ) |
|
◆ setPointerToSCell()
| void LVL1::eFEXtauBDT::setPointerToSCell |
( |
int | eta, |
|
|
int | phi, |
|
|
int | layer, |
|
|
unsigned int * | sCellPtr ) |
Definition at line 33 of file eFEXtauBDT.cxx.
34 {
35 switch (layer) {
36 case 0:
38 break;
39 case 1:
41 break;
42 case 2:
44 break;
45 case 3:
47 break;
48 case 4:
50 break;
51 }
52}
unsigned int * m_em3cells[3][3]
unsigned int * m_em1cells[12][3]
unsigned int * m_hadcells[3][3]
unsigned int * m_em2cells[12][3]
unsigned int * m_em0cells[3][3]
◆ superCellToPtr()
| unsigned int * LVL1::eFEXtauBDT::superCellToPtr |
( |
int | eta, |
|
|
int | phi, |
|
|
int | layer ) |
|
private |
Definition at line 83 of file eFEXtauBDT.cxx.
83 {
84 unsigned int *
ptr = 0;
85 switch (layer) {
86 case 0:
88 break;
89 case 1:
91 break;
92 case 2:
94 break;
95 case 3:
97 break;
98 case 4:
100 break;
101 }
103}
◆ m_bdt
◆ m_bdtCondition
| unsigned int LVL1::eFEXtauBDT::m_bdtCondition = 0 |
|
private |
◆ m_bdtMinEtThreshold
| unsigned int* LVL1::eFEXtauBDT::m_bdtMinEtThreshold {} |
|
private |
◆ m_bdtScore
| unsigned int LVL1::eFEXtauBDT::m_bdtScore = 0 |
|
private |
◆ m_bdtScoreShifted
| unsigned int LVL1::eFEXtauBDT::m_bdtScoreShifted = 0 |
|
private |
◆ m_bdtThresholds
| unsigned int* LVL1::eFEXtauBDT::m_bdtThresholds[3] {} |
|
private |
◆ m_bdtVarComputeSCellPointers
| std::vector<std::vector<unsigned int *> > LVL1::eFEXtauBDT::m_bdtVarComputeSCellPointers |
|
private |
◆ m_bdtVars
| std::vector<unsigned int> LVL1::eFEXtauBDT::m_bdtVars |
|
private |
◆ m_bdtVarsComputed
| bool LVL1::eFEXtauBDT::m_bdtVarsComputed = false |
|
private |
◆ m_em0cells
| unsigned int* LVL1::eFEXtauBDT::m_em0cells[3][3] {} |
|
private |
◆ m_em1cells
| unsigned int* LVL1::eFEXtauBDT::m_em1cells[12][3] {} |
|
private |
◆ m_em2cells
| unsigned int* LVL1::eFEXtauBDT::m_em2cells[12][3] {} |
|
private |
◆ m_em3cells
| unsigned int* LVL1::eFEXtauBDT::m_em3cells[3][3] {} |
|
private |
◆ m_EM_eTComputeSCellPointers
| std::vector<unsigned int *> LVL1::eFEXtauBDT::m_EM_eTComputeSCellPointers |
|
private |
◆ m_EM_eTEstimate
| unsigned int LVL1::eFEXtauBDT::m_EM_eTEstimate = 0 |
|
private |
◆ m_EM_eTEstimateOverflow
| bool LVL1::eFEXtauBDT::m_EM_eTEstimateOverflow = 0 |
|
private |
◆ m_emEtXMultiplier
| std::vector<unsigned int> LVL1::eFEXtauBDT::m_emEtXMultiplier |
|
private |
◆ m_emEtXMultiplierOverflow
| std::vector<unsigned int> LVL1::eFEXtauBDT::m_emEtXMultiplierOverflow |
|
private |
◆ m_eTComputeSCellPointers
| std::vector<unsigned int *> LVL1::eFEXtauBDT::m_eTComputeSCellPointers |
|
private |
◆ m_eTEstimate
| unsigned int LVL1::eFEXtauBDT::m_eTEstimate = 0 |
|
private |
◆ m_eTEstimateOverflow
| bool LVL1::eFEXtauBDT::m_eTEstimateOverflow = false |
|
private |
◆ m_etThreshold
| unsigned int* LVL1::eFEXtauBDT::m_etThreshold {} |
|
private |
◆ m_fracCondition
| unsigned int LVL1::eFEXtauBDT::m_fracCondition = 0 |
|
private |
◆ m_fracMultipliers
| unsigned int* LVL1::eFEXtauBDT::m_fracMultipliers[3] {} |
|
private |
◆ m_HAD_eTComputeSCellPointers
| std::vector<unsigned int *> LVL1::eFEXtauBDT::m_HAD_eTComputeSCellPointers |
|
private |
◆ m_HAD_eTEstimate
| unsigned int LVL1::eFEXtauBDT::m_HAD_eTEstimate = 0 |
|
private |
◆ m_HAD_eTEstimateOverflow
| bool LVL1::eFEXtauBDT::m_HAD_eTEstimateOverflow = false |
|
private |
◆ m_hadcells
| unsigned int* LVL1::eFEXtauBDT::m_hadcells[3][3] {} |
|
private |
◆ m_hadEstimateShifted
| unsigned int LVL1::eFEXtauBDT::m_hadEstimateShifted = 0 |
|
private |
◆ m_isSeeded
| bool LVL1::eFEXtauBDT::m_isSeeded = false |
|
private |
◆ m_log
◆ m_maxEtThreshold
| unsigned int* LVL1::eFEXtauBDT::m_maxEtThreshold {} |
|
private |
◆ m_maxEtThresholdFrac
| unsigned int* LVL1::eFEXtauBDT::m_maxEtThresholdFrac {} |
|
private |
◆ m_towers
| std::vector<unsigned int> LVL1::eFEXtauBDT::m_towers |
|
private |
◆ m_towersComputeSCellPointers
| std::vector<std::vector<unsigned int *> > LVL1::eFEXtauBDT::m_towersComputeSCellPointers |
|
private |
The documentation for this class was generated from the following files: