ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
LVL1::eFEXtauBDT Class Reference

The eFEXtauBDT class calculates the tau TOB variables. More...

#include <eFEXtauBDT.h>

Collaboration diagram for LVL1::eFEXtauBDT:

Public Member Functions

 eFEXtauBDT (AthAlgTool *log, std::string config_path)
 Constructors. More...
 
virtual ~eFEXtauBDT ()
 Destructor. More...
 
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 setPointerToBDTMinETParam (unsigned int *bdtMinEtThreshold)
 
void buildBDTVariables ()
 
void computeBDTScore ()
 
void computeETEstimate ()
 
void computeEMETEstimate ()
 
void computeHADETEstimate ()
 
void computeFracCondition ()
 
void computeBDTCondition ()
 
void computeTowers ()
 
void computeIsCentralTowerSeed ()
 
void debugPrintSCellValues ()
 
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)
 

Private Member Functions

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)
 

Private Attributes

unsigned int * m_em0cells [3][3] {}
 
unsigned int * m_em1cells [12][3] {}
 
unsigned int * m_em2cells [12][3] {}
 
unsigned int * m_em3cells [3][3] {}
 
unsigned int * m_hadcells [3][3] {}
 
unsigned int * m_fracMultipliers [3] {}
 
unsigned int * m_bdtThresholds [3] {}
 
unsigned int * m_etThreshold {}
 
unsigned int * m_maxEtThreshold {}
 
unsigned int * m_bdtMinEtThreshold {}
 
unsigned int m_bdtScore = 0
 
unsigned int m_bdtScoreShifted = 0
 
unsigned int m_eTEstimate = 0
 
bool m_eTEstimateOverflow = false
 
unsigned int m_EM_eTEstimate = 0
 
bool m_EM_eTEstimateOverflow = 0
 
unsigned int m_HAD_eTEstimate = 0
 
bool m_HAD_eTEstimateOverflow = false
 
unsigned int m_fracCondition = 0
 
unsigned int m_bdtCondition = 0
 
bool m_isSeeded = false
 
unsigned int m_hadEstimateShifted = 0
 
std::vector< unsigned int > m_emEtXMultiplier
 
std::vector< unsigned int > m_emEtXMultiplierOverflow
 
std::vector< unsigned int > m_towers
 
std::vector< unsigned int > m_bdtVars
 
std::vector< std::vector< unsigned int * > > m_bdtVarComputeSCellPointers
 
std::vector< unsigned int * > m_eTComputeSCellPointers
 
std::vector< unsigned int * > m_EM_eTComputeSCellPointers
 
std::vector< unsigned int * > m_HAD_eTComputeSCellPointers
 
std::vector< std::vector< unsigned int * > > m_towersComputeSCellPointers
 
bool m_bdtVarsComputed = false
 
eFEXBDT m_bdt
 
AthAlgToolm_log
 

Detailed Description

The eFEXtauBDT class calculates the tau TOB variables.

Definition at line 26 of file eFEXtauBDT.h.

Constructor & Destructor Documentation

◆ eFEXtauBDT()

LVL1::eFEXtauBDT::eFEXtauBDT ( AthAlgTool log,
std::string  config_path 
)

Constructors.

Definition at line 20 of file eFEXtauBDT.cxx.

21  : m_bdt(config_path), m_log(log) {
22  m_log->msg(MSG::DEBUG) << "Configured BDT with this file: " << config_path
23  << endmsg;
24  m_bdtVars.resize(m_bdt.getVariables().size());
25  m_towers.resize(m_bdt.getNTowers());
26  int n_multipliers = sizeof(m_fracMultipliers) / sizeof(m_fracMultipliers[0]);
27  m_emEtXMultiplier.resize(n_multipliers);
28  m_emEtXMultiplierOverflow.resize(n_multipliers);
29 }

◆ ~eFEXtauBDT()

LVL1::eFEXtauBDT::~eFEXtauBDT ( )
virtual

Destructor.

Definition at line 32 of file eFEXtauBDT.cxx.

32 {}

Member Function Documentation

◆ BitLeftShift()

unsigned int LVL1::eFEXtauBDT::BitLeftShift ( unsigned int  number,
int  by,
int  totalNBits 
)
inline

Definition at line 347 of file eFEXtauBDT.cxx.

348  {
349  if ((number >> (totalNBits - by)) != 0) {
350  return (1 << totalNBits) - 1;
351  }
352  return number << by;
353 }

◆ buildBDTVariables()

void LVL1::eFEXtauBDT::buildBDTVariables ( )

Definition at line 237 of file eFEXtauBDT.cxx.

237  {
239  for (size_t i = 0; i < m_bdtVarComputeSCellPointers.size(); i++) {
240  bool overflow;
242  ENERGY_WIDTH);
243  if (overflow) {
244  m_bdtVars[i] = (1 << ENERGY_WIDTH) - 1;
245  }
246  }
248  m_bdtVarsComputed = true;
249 }

◆ computeBDTCondition()

void LVL1::eFEXtauBDT::computeBDTCondition ( )

Definition at line 387 of file eFEXtauBDT.cxx.

387  {
388  computeBDTScore();
389  int n_thresholds = sizeof(m_bdtThresholds) / sizeof(m_bdtThresholds[0]);
390 
391  int toShiftRight = m_bdt.getScorePrecision() - PARAM_WIDTH;
392  // Only compare the MSB bits of the BDT score to the thresholds provided in
393  // the parameters
394  m_bdtScoreShifted = (m_bdtScore >> toShiftRight);
395 
398 
399  m_bdtCondition = (1 << (n_thresholds - 1)) - 1;
400  return;
401  }
402 
403  int i = 0;
404  for (; i < n_thresholds; i++) {
405  if (m_bdtScoreShifted < *(m_bdtThresholds[i])) {
406  break;
407  }
408  }
409  m_bdtCondition = i;
410 }

◆ computeBDTScore()

void LVL1::eFEXtauBDT::computeBDTScore ( )

Definition at line 251 of file eFEXtauBDT.cxx.

251  {
252  // Need BDT variables to be computed
253  if (m_bdtVarsComputed == false) {
255  << "BDT Variables not computed. BDT score will be garbage." << endmsg;
256  }
257 
259  m_log->msg(MSG::DEBUG) << "BDT Score: " << m_bdtScore << endmsg;
260 }

◆ computeEMETEstimate()

void LVL1::eFEXtauBDT::computeEMETEstimate ( )

Definition at line 268 of file eFEXtauBDT.cxx.

◆ computeEstimate()

unsigned int LVL1::eFEXtauBDT::computeEstimate ( std::vector< unsigned int * > &  ptr_list,
bool &  overflow,
int  resultNBits 
)
private

Definition at line 315 of file eFEXtauBDT.cxx.

316  {
317  unsigned int estimate = 0;
318  overflow = false;
319  for (unsigned int *it : ptr_list) {
320  estimate += *it;
321  if (isOverflow(estimate, resultNBits)) {
322  overflow = true;
323  }
324  }
325  return estimate;
326 }

◆ computeETEstimate()

void LVL1::eFEXtauBDT::computeETEstimate ( )

Definition at line 262 of file eFEXtauBDT.cxx.

◆ computeFracCondition()

void LVL1::eFEXtauBDT::computeFracCondition ( )

Definition at line 355 of file eFEXtauBDT.cxx.

355  {
356  int n_multipliers = sizeof(m_fracMultipliers) / sizeof(m_fracMultipliers[0]);
357 
360 
361  m_fracCondition = (1 << (n_multipliers - 1)) - 1;
362  return;
363  }
364 
366  m_fracCondition = 0;
367  return;
368  }
369 
371  int i = 0;
372  for (; i < n_multipliers; i++) {
373 
374  bool overflow;
377  m_emEtXMultiplierOverflow[i] = (int)overflow;
378 
381  break;
382  }
383  }
384  m_fracCondition = i;
385 }

◆ computeHADETEstimate()

void LVL1::eFEXtauBDT::computeHADETEstimate ( )

Definition at line 274 of file eFEXtauBDT.cxx.

◆ computeIsCentralTowerSeed()

void LVL1::eFEXtauBDT::computeIsCentralTowerSeed ( )

Definition at line 414 of file eFEXtauBDT.cxx.

414  {
415  m_isSeeded = true;
416 
417  // Get central tower ET
418  unsigned int centralET = m_towers[4];
419 
420  // Loop over all cells and check that the central tower is a local maximum
421  for (unsigned int beta = 0; beta < 3; beta++) {
422  for (unsigned int bphi = 0; bphi < 3; bphi++) {
423  int flatIndex = flatTowerIndex(beta, bphi);
424  // Don't need to compare central cell with itself
425  if ((beta == 1) && (bphi == 1)) {
426  continue;
427  }
428 
429  // Cells to the up and right must have strictly lesser ET
430  if (beta == 2 || (beta == 1 && bphi == 2)) {
431  if (centralET <= m_towers[flatIndex]) {
432  m_isSeeded = false;
433  }
434  }
435  // Cells down and to the left must have lesser or equal ET. If strictly
436  // lesser would create zero TOB if two adjacent cells had equal energy
437  else if (beta == 0 || (beta == 1 && bphi == 0)) {
438  if (centralET < m_towers[flatIndex]) {
439  m_isSeeded = false;
440  }
441  }
442  }
443  }
444 
445  if (m_eTEstimate < *m_etThreshold) {
446  m_isSeeded = false;
447  }
448 
449  m_log->msg(MSG::DEBUG) << "Seeded: " << (int)m_isSeeded << endmsg;
450 }

◆ computeTowers()

void LVL1::eFEXtauBDT::computeTowers ( )

Definition at line 294 of file eFEXtauBDT.cxx.

294  {
295  for (size_t i = 0; i < m_towers.size(); i++) {
296  bool overflow;
298  ENERGY_WIDTH);
299  if (overflow) {
300  m_towers[i] = (1 << ENERGY_WIDTH) - 1;
301  }
302  }
303 
305 }

◆ debugPrintBDTVariables()

void LVL1::eFEXtauBDT::debugPrintBDTVariables ( )

Definition at line 227 of file eFEXtauBDT.cxx.

227  {
228  std::string bdtVariables = "";
229  for (size_t i = 0; i < m_bdtVars.size(); i++) {
230  bdtVariables += std::to_string(m_bdtVars[i]) + " ";
231  }
232 
233  m_log->msg(MSG::DEBUG) << "BDT Variables: " << bdtVariables << endmsg;
234 }

◆ debugPrintSCellValues()

void LVL1::eFEXtauBDT::debugPrintSCellValues ( )

Definition at line 187 of file eFEXtauBDT.cxx.

187  {
188 
189  std::string scellValues = "";
190  std::string em0Values = "";
191  std::string em1Values = "";
192  std::string em2Values = "";
193  std::string em3Values = "";
194  std::string hadValues = "";
195  for (size_t i = 0; i < LVL1::locMap.size(); i++) {
196  int eta = LVL1::locMap[i][0];
197  int phi = LVL1::locMap[i][1];
198  int layer = LVL1::locMap[i][2];
199  scellValues += std::to_string(*superCellToPtr(eta, phi, layer)) + " ";
200  switch (layer) {
201  case 0:
202  em0Values += std::to_string(*m_em0cells[eta][phi]) + " ";
203  break;
204  case 1:
205  em1Values += std::to_string(*m_em1cells[eta][phi]) + " ";
206  break;
207  case 2:
208  em2Values += std::to_string(*m_em2cells[eta][phi]) + " ";
209  break;
210  case 3:
211  em3Values += std::to_string(*m_em3cells[eta][phi]) + " ";
212  break;
213  case 4:
214  hadValues += std::to_string(*m_hadcells[eta][phi]) + " ";
215  break;
216  }
217  }
218 
219  m_log->msg(MSG::DEBUG) << "SCell values: " << scellValues << endmsg;
220  m_log->msg(MSG::DEBUG) << "layer 0 values: " << em0Values << endmsg;
221  m_log->msg(MSG::DEBUG) << "layer 1 values: " << em1Values << endmsg;
222  m_log->msg(MSG::DEBUG) << "layer 2 values: " << em2Values << endmsg;
223  m_log->msg(MSG::DEBUG) << "layer 3 values: " << em3Values << endmsg;
224  m_log->msg(MSG::DEBUG) << "layer 4 values: " << hadValues << endmsg;
225 }

◆ debugPrintTowers()

void LVL1::eFEXtauBDT::debugPrintTowers ( )

Definition at line 280 of file eFEXtauBDT.cxx.

280  {
281  m_log->msg(MSG::DEBUG) << "Towers Estimate: " << endmsg;
282  for (int eta = 0; eta < 3; eta++) {
283  for (int phi = 0; phi < 3; phi++) {
284  int flatIndex = flatTowerIndex(eta, phi);
286  << "Tower " << flatIndex << " ET (eta=" << eta << ", phi=" << phi
287  << "): " << m_towers[flatIndex] << endmsg;
288  }
289  }
290 }

◆ flatTowerIndex()

int LVL1::eFEXtauBDT::flatTowerIndex ( int  eta,
int  phi 
)
inline

Definition at line 292 of file eFEXtauBDT.cxx.

292 { return 3 * phi + eta; }

◆ getBDTCondition()

unsigned int LVL1::eFEXtauBDT::getBDTCondition ( ) const
inline

Definition at line 87 of file eFEXtauBDT.h.

87 { return m_bdtCondition; }

◆ getBDTScore()

unsigned int LVL1::eFEXtauBDT::getBDTScore ( ) const
inline

Definition at line 89 of file eFEXtauBDT.h.

89 { return m_bdtScore; }

◆ getBDTScoreShifted()

unsigned int LVL1::eFEXtauBDT::getBDTScoreShifted ( ) const
inline

Definition at line 79 of file eFEXtauBDT.h.

79 { return m_bdtScoreShifted; }

◆ getBDTVars()

std::vector<unsigned int>& LVL1::eFEXtauBDT::getBDTVars ( )
inline

Definition at line 71 of file eFEXtauBDT.h.

71 { return m_bdtVars; }

◆ getEMETEstimate()

unsigned int LVL1::eFEXtauBDT::getEMETEstimate ( ) const
inline

Definition at line 63 of file eFEXtauBDT.h.

63 { return m_EM_eTEstimate; }

◆ getEMETEstimateOverflow()

unsigned int LVL1::eFEXtauBDT::getEMETEstimateOverflow ( ) const
inline

Definition at line 64 of file eFEXtauBDT.h.

64  {
66  }

◆ getEMMultipliedByFracParams()

std::vector<unsigned int>& LVL1::eFEXtauBDT::getEMMultipliedByFracParams ( )
inline

Definition at line 73 of file eFEXtauBDT.h.

73  {
74  return m_emEtXMultiplier;
75  }

◆ getEMMultipliedByFracParamsOverflow()

std::vector<unsigned int>& LVL1::eFEXtauBDT::getEMMultipliedByFracParamsOverflow ( )
inline

Definition at line 76 of file eFEXtauBDT.h.

76  {
78  }

◆ getET()

unsigned int LVL1::eFEXtauBDT::getET ( ) const

Definition at line 452 of file eFEXtauBDT.cxx.

452  {
453  if (m_eTEstimateOverflow) {
454  return (1 << ENERGY_WIDTH) - 1;
455  }
456  if (m_eTEstimate < *m_etThreshold) {
457  return 0;
458  }
459  return m_eTEstimate;
460 }

◆ getETEstimate()

unsigned int LVL1::eFEXtauBDT::getETEstimate ( ) const
inline

Definition at line 62 of file eFEXtauBDT.h.

62 { return m_eTEstimate; }

◆ getFracCondition()

unsigned int LVL1::eFEXtauBDT::getFracCondition ( ) const
inline

Definition at line 88 of file eFEXtauBDT.h.

88 { return m_fracCondition; }

◆ getHADETEstimate()

unsigned int LVL1::eFEXtauBDT::getHADETEstimate ( ) const
inline

Definition at line 67 of file eFEXtauBDT.h.

67 { return m_HAD_eTEstimate; }

◆ getHADETEstimateOverflow()

unsigned int LVL1::eFEXtauBDT::getHADETEstimateOverflow ( ) const
inline

Definition at line 68 of file eFEXtauBDT.h.

68  {
70  }

◆ getIsMax()

unsigned int LVL1::eFEXtauBDT::getIsMax ( ) const
inline

Definition at line 86 of file eFEXtauBDT.h.

86 { return m_isSeeded; }

◆ getTOBETOverflow()

unsigned int LVL1::eFEXtauBDT::getTOBETOverflow ( ) const
inline

Definition at line 85 of file eFEXtauBDT.h.

85 { return m_eTEstimateOverflow; }

◆ getTowers()

std::vector<unsigned int>& LVL1::eFEXtauBDT::getTowers ( )
inline

Definition at line 72 of file eFEXtauBDT.h.

72 { return m_towers; }

◆ initBDTVars()

void LVL1::eFEXtauBDT::initBDTVars ( )

Definition at line 145 of file eFEXtauBDT.cxx.

145  {
146  for (size_t i = 0; i < m_bdt.getVariables().size(); i++) {
148 
149  m_log->msg(MSG::DEBUG) << i << " is " << var.m_name << ", sum of supercells"
150  << endmsg;
151  std::vector<unsigned int *> pointersToSCells;
152  for (size_t j = 0; j < var.m_scells.size(); j++) {
153  int eta = var.m_scells[j][0];
154  int phi = var.m_scells[j][1];
155  int layer = var.m_scells[j][2];
156  m_log->msg(MSG::DEBUG) << "\teta=" << eta << "\tphi=" << phi
157  << "\tlayer=" << layer << endmsg;
158  unsigned int *ptr = superCellToPtr(eta, phi, layer);
159  if (ptr == 0) {
161  << "Could not convert eta=" << eta << " phi=" << phi
162  << " layer=" << layer
163  << " to a pointer to supercell. Are they within range?" << endmsg;
164  throw std::domain_error(
165  std::string("Could not convert eta=") + std::to_string(eta) +
166  " phi=" + std::to_string(phi) + " layer=" + std::to_string(layer) +
167  " to a pointer to supercell. Are they within range?");
168  }
169  pointersToSCells.push_back(ptr);
170  }
171 
172  m_bdtVarComputeSCellPointers.push_back(pointersToSCells);
173  }
174 }

◆ initEMETPointers()

void LVL1::eFEXtauBDT::initEMETPointers ( )

Definition at line 105 of file eFEXtauBDT.cxx.

◆ initETPointers()

void LVL1::eFEXtauBDT::initETPointers ( )

Definition at line 101 of file eFEXtauBDT.cxx.

◆ initHADETPointers()

void LVL1::eFEXtauBDT::initHADETPointers ( )

Definition at line 109 of file eFEXtauBDT.cxx.

◆ initPointers()

void LVL1::eFEXtauBDT::initPointers ( const std::vector< std::vector< int >> &  scells,
std::vector< unsigned int * > &  ptr_list 
)
private

Definition at line 113 of file eFEXtauBDT.cxx.

114  {
115  m_log->msg(MSG::DEBUG) << "Will use sum of supercells: " << endmsg;
116  for (auto scell : scells) {
117  int eta = scell[0];
118  int phi = scell[1];
119  int layer = scell[2];
120  m_log->msg(MSG::DEBUG) << "\teta=" << eta << "\tphi=" << phi
121  << "\tlayer=" << layer << endmsg;
122  unsigned int *ptr = superCellToPtr(eta, phi, layer);
123  if (ptr == 0) {
125  << "Could not convert eta=" << eta << " phi=" << phi
126  << " layer=" << layer
127  << " to a pointer to supercell. Are they within range?" << endmsg;
128  throw std::domain_error(
129  std::string("Could not convert eta=") + std::to_string(eta) +
130  " phi=" + std::to_string(phi) + " layer=" + std::to_string(layer) +
131  " to a pointer to supercell. Are they within range?");
132  }
133  ptr_list.push_back(ptr);
134  }
135 }

◆ initTowersPointers()

void LVL1::eFEXtauBDT::initTowersPointers ( )

Definition at line 137 of file eFEXtauBDT.cxx.

137  {
139  for (size_t i = 0; i < m_towers.size(); i++) {
140  m_log->msg(MSG::DEBUG) << "Tower " << i << endmsg;
142  }
143 }

◆ isOverflow()

bool LVL1::eFEXtauBDT::isOverflow ( unsigned int  number,
int  nBits 
)
inline

Definition at line 307 of file eFEXtauBDT.cxx.

307  {
308  if ((number >> nBits) != 0) {
309  return true;
310  }
311  return false;
312 }

◆ multWithOverflow()

unsigned int LVL1::eFEXtauBDT::multWithOverflow ( unsigned int  a,
unsigned int  b,
bool &  overflow,
int  resultNBits 
)

Definition at line 328 of file eFEXtauBDT.cxx.

330  {
331  overflow = false;
332  if (b == 0) {
333  return 0;
334  }
335  unsigned int result = a * b;
336  if (a != result / b) {
337  // This shouldn't happen (a and b are in reality 16 bit numbers), but just
338  // in case.
339  overflow = true;
340  }
341 
342  overflow = isOverflow(result, resultNBits);
343 
344  return result;
345 }

◆ next()

void LVL1::eFEXtauBDT::next ( )

Definition at line 176 of file eFEXtauBDT.cxx.

◆ setPointerToBDTMinETParam()

void LVL1::eFEXtauBDT::setPointerToBDTMinETParam ( unsigned int *  bdtMinEtThreshold)

Definition at line 74 of file eFEXtauBDT.cxx.

75  {
76  m_bdtMinEtThreshold = bdtMinEtThreshold;
77 }

◆ setPointerToBDTThresholdsParam()

void LVL1::eFEXtauBDT::setPointerToBDTThresholdsParam ( int  index,
unsigned int *  bdtThresholds 
)

Definition at line 60 of file eFEXtauBDT.cxx.

61  {
62  m_bdtThresholds[index] = bdtThresholdPtr;
63 }

◆ setPointerToETThresholdParam()

void LVL1::eFEXtauBDT::setPointerToETThresholdParam ( unsigned int *  etThreshold)

Definition at line 65 of file eFEXtauBDT.cxx.

65  {
66  m_etThreshold = etThreshold;
67 }

◆ setPointerToFracMultipliersParam()

void LVL1::eFEXtauBDT::setPointerToFracMultipliersParam ( int  index,
unsigned int *  fracMultipliers 
)

Definition at line 55 of file eFEXtauBDT.cxx.

56  {
57  m_fracMultipliers[index] = fracMultiplierPtr;
58 }

◆ setPointerToMaxETParam()

void LVL1::eFEXtauBDT::setPointerToMaxETParam ( unsigned int *  maxEtThreshold)

Definition at line 69 of file eFEXtauBDT.cxx.

70  {
71  m_maxEtThreshold = maxEtThreshold;
72 }

◆ setPointerToSCell()

void LVL1::eFEXtauBDT::setPointerToSCell ( int  eta,
int  phi,
int  layer,
unsigned int *  sCellPtr 
)

Definition at line 34 of file eFEXtauBDT.cxx.

35  {
36  switch (layer) {
37  case 0:
38  m_em0cells[eta][phi] = sCellPtr;
39  break;
40  case 1:
41  m_em1cells[eta][phi] = sCellPtr;
42  break;
43  case 2:
44  m_em2cells[eta][phi] = sCellPtr;
45  break;
46  case 3:
47  m_em3cells[eta][phi] = sCellPtr;
48  break;
49  case 4:
50  m_hadcells[eta][phi] = sCellPtr;
51  break;
52  }
53 }

◆ superCellToPtr()

unsigned int * LVL1::eFEXtauBDT::superCellToPtr ( int  eta,
int  phi,
int  layer 
)
private

Definition at line 79 of file eFEXtauBDT.cxx.

79  {
80  unsigned int *ptr = 0;
81  switch (layer) {
82  case 0:
83  ptr = m_em0cells[eta][phi];
84  break;
85  case 1:
86  ptr = m_em1cells[eta][phi];
87  break;
88  case 2:
89  ptr = m_em2cells[eta][phi];
90  break;
91  case 3:
92  ptr = m_em3cells[eta][phi];
93  break;
94  case 4:
95  ptr = m_hadcells[eta][phi];
96  break;
97  }
98  return ptr;
99 }

Member Data Documentation

◆ m_bdt

eFEXBDT LVL1::eFEXtauBDT::m_bdt
private

Definition at line 148 of file eFEXtauBDT.h.

◆ m_bdtCondition

unsigned int LVL1::eFEXtauBDT::m_bdtCondition = 0
private

Definition at line 125 of file eFEXtauBDT.h.

◆ m_bdtMinEtThreshold

unsigned int* LVL1::eFEXtauBDT::m_bdtMinEtThreshold {}
private

Definition at line 115 of file eFEXtauBDT.h.

◆ m_bdtScore

unsigned int LVL1::eFEXtauBDT::m_bdtScore = 0
private

Definition at line 116 of file eFEXtauBDT.h.

◆ m_bdtScoreShifted

unsigned int LVL1::eFEXtauBDT::m_bdtScoreShifted = 0
private

Definition at line 117 of file eFEXtauBDT.h.

◆ m_bdtThresholds

unsigned int* LVL1::eFEXtauBDT::m_bdtThresholds[3] {}
private

Definition at line 112 of file eFEXtauBDT.h.

◆ m_bdtVarComputeSCellPointers

std::vector<std::vector<unsigned int *> > LVL1::eFEXtauBDT::m_bdtVarComputeSCellPointers
private

Definition at line 138 of file eFEXtauBDT.h.

◆ m_bdtVars

std::vector<unsigned int> LVL1::eFEXtauBDT::m_bdtVars
private

Definition at line 133 of file eFEXtauBDT.h.

◆ m_bdtVarsComputed

bool LVL1::eFEXtauBDT::m_bdtVarsComputed = false
private

Definition at line 147 of file eFEXtauBDT.h.

◆ m_em0cells

unsigned int* LVL1::eFEXtauBDT::m_em0cells[3][3] {}
private

Definition at line 106 of file eFEXtauBDT.h.

◆ m_em1cells

unsigned int* LVL1::eFEXtauBDT::m_em1cells[12][3] {}
private

Definition at line 107 of file eFEXtauBDT.h.

◆ m_em2cells

unsigned int* LVL1::eFEXtauBDT::m_em2cells[12][3] {}
private

Definition at line 108 of file eFEXtauBDT.h.

◆ m_em3cells

unsigned int* LVL1::eFEXtauBDT::m_em3cells[3][3] {}
private

Definition at line 109 of file eFEXtauBDT.h.

◆ m_EM_eTComputeSCellPointers

std::vector<unsigned int *> LVL1::eFEXtauBDT::m_EM_eTComputeSCellPointers
private

Definition at line 143 of file eFEXtauBDT.h.

◆ m_EM_eTEstimate

unsigned int LVL1::eFEXtauBDT::m_EM_eTEstimate = 0
private

Definition at line 120 of file eFEXtauBDT.h.

◆ m_EM_eTEstimateOverflow

bool LVL1::eFEXtauBDT::m_EM_eTEstimateOverflow = 0
private

Definition at line 121 of file eFEXtauBDT.h.

◆ m_emEtXMultiplier

std::vector<unsigned int> LVL1::eFEXtauBDT::m_emEtXMultiplier
private

Definition at line 128 of file eFEXtauBDT.h.

◆ m_emEtXMultiplierOverflow

std::vector<unsigned int> LVL1::eFEXtauBDT::m_emEtXMultiplierOverflow
private

Definition at line 129 of file eFEXtauBDT.h.

◆ m_eTComputeSCellPointers

std::vector<unsigned int *> LVL1::eFEXtauBDT::m_eTComputeSCellPointers
private

Definition at line 142 of file eFEXtauBDT.h.

◆ m_eTEstimate

unsigned int LVL1::eFEXtauBDT::m_eTEstimate = 0
private

Definition at line 118 of file eFEXtauBDT.h.

◆ m_eTEstimateOverflow

bool LVL1::eFEXtauBDT::m_eTEstimateOverflow = false
private

Definition at line 119 of file eFEXtauBDT.h.

◆ m_etThreshold

unsigned int* LVL1::eFEXtauBDT::m_etThreshold {}
private

Definition at line 113 of file eFEXtauBDT.h.

◆ m_fracCondition

unsigned int LVL1::eFEXtauBDT::m_fracCondition = 0
private

Definition at line 124 of file eFEXtauBDT.h.

◆ m_fracMultipliers

unsigned int* LVL1::eFEXtauBDT::m_fracMultipliers[3] {}
private

Definition at line 111 of file eFEXtauBDT.h.

◆ m_HAD_eTComputeSCellPointers

std::vector<unsigned int *> LVL1::eFEXtauBDT::m_HAD_eTComputeSCellPointers
private

Definition at line 144 of file eFEXtauBDT.h.

◆ m_HAD_eTEstimate

unsigned int LVL1::eFEXtauBDT::m_HAD_eTEstimate = 0
private

Definition at line 122 of file eFEXtauBDT.h.

◆ m_HAD_eTEstimateOverflow

bool LVL1::eFEXtauBDT::m_HAD_eTEstimateOverflow = false
private

Definition at line 123 of file eFEXtauBDT.h.

◆ m_hadcells

unsigned int* LVL1::eFEXtauBDT::m_hadcells[3][3] {}
private

Definition at line 110 of file eFEXtauBDT.h.

◆ m_hadEstimateShifted

unsigned int LVL1::eFEXtauBDT::m_hadEstimateShifted = 0
private

Definition at line 127 of file eFEXtauBDT.h.

◆ m_isSeeded

bool LVL1::eFEXtauBDT::m_isSeeded = false
private

Definition at line 126 of file eFEXtauBDT.h.

◆ m_log

AthAlgTool* LVL1::eFEXtauBDT::m_log
private

Definition at line 149 of file eFEXtauBDT.h.

◆ m_maxEtThreshold

unsigned int* LVL1::eFEXtauBDT::m_maxEtThreshold {}
private

Definition at line 114 of file eFEXtauBDT.h.

◆ m_towers

std::vector<unsigned int> LVL1::eFEXtauBDT::m_towers
private

Definition at line 130 of file eFEXtauBDT.h.

◆ m_towersComputeSCellPointers

std::vector<std::vector<unsigned int *> > LVL1::eFEXtauBDT::m_towersComputeSCellPointers
private

Definition at line 145 of file eFEXtauBDT.h.


The documentation for this class was generated from the following files:
LVL1::eFEXtauBDT::computeBDTCondition
void computeBDTCondition()
Definition: eFEXtauBDT.cxx:387
LVL1::eFEXtauBDT::m_towers
std::vector< unsigned int > m_towers
Definition: eFEXtauBDT.h:130
beamspotnt.var
var
Definition: bin/beamspotnt.py:1394
LVL1::eFEXtauBDT::m_bdt
eFEXBDT m_bdt
Definition: eFEXtauBDT.h:148
LVL1::eFEXtauBDT::flatTowerIndex
int flatTowerIndex(int eta, int phi)
Definition: eFEXtauBDT.cxx:292
LVL1::eFEXtauBDT::m_HAD_eTEstimate
unsigned int m_HAD_eTEstimate
Definition: eFEXtauBDT.h:122
LVL1::eFEXtauBDT::m_bdtVarComputeSCellPointers
std::vector< std::vector< unsigned int * > > m_bdtVarComputeSCellPointers
Definition: eFEXtauBDT.h:138
get_generator_info.result
result
Definition: get_generator_info.py:21
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
LVL1::eFEXtauBDT::initPointers
void initPointers(const std::vector< std::vector< int >> &scells, std::vector< unsigned int * > &ptr_list)
Definition: eFEXtauBDT.cxx:113
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
eFEXBDT::getBDT
const conifer::BDT< unsigned int, unsigned int > & getBDT() const
Definition: eFEXBDT.h:72
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
LVL1::eFEXtauBDT::m_eTComputeSCellPointers
std::vector< unsigned int * > m_eTComputeSCellPointers
Definition: eFEXtauBDT.h:142
eFEXBDT::getVariables
const std::vector< BDTVariable > & getVariables() const
Definition: eFEXBDT.h:58
LVL1::eFEXtauBDT::m_maxEtThreshold
unsigned int * m_maxEtThreshold
Definition: eFEXtauBDT.h:114
skel.it
it
Definition: skel.GENtoEVGEN.py:423
LVL1::eFEXtauBDT::debugPrintBDTVariables
void debugPrintBDTVariables()
Definition: eFEXtauBDT.cxx:227
LVL1::eFEXtauBDT::debugPrintTowers
void debugPrintTowers()
Definition: eFEXtauBDT.cxx:280
LVL1::eFEXtauBDT::isOverflow
bool isOverflow(unsigned int number, int nBits)
Definition: eFEXtauBDT.cxx:307
LVL1::eFEXtauBDT::m_eTEstimateOverflow
bool m_eTEstimateOverflow
Definition: eFEXtauBDT.h:119
LVL1::eFEXtauBDT::computeETEstimate
void computeETEstimate()
Definition: eFEXtauBDT.cxx:262
LVL1::eFEXtauBDT::computeEMETEstimate
void computeEMETEstimate()
Definition: eFEXtauBDT.cxx:268
LVL1::eFEXtauBDT::m_bdtVarsComputed
bool m_bdtVarsComputed
Definition: eFEXtauBDT.h:147
ENERGY_WIDTH
#define ENERGY_WIDTH
Definition: eFEXtauBDT.cxx:16
LVL1::eFEXtauBDT::computeTowers
void computeTowers()
Definition: eFEXtauBDT.cxx:294
LVL1::eFEXtauBDT::m_bdtMinEtThreshold
unsigned int * m_bdtMinEtThreshold
Definition: eFEXtauBDT.h:115
LVL1::eFEXtauBDT::m_bdtScoreShifted
unsigned int m_bdtScoreShifted
Definition: eFEXtauBDT.h:117
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
LVL1::eFEXtauBDT::m_log
AthAlgTool * m_log
Definition: eFEXtauBDT.h:149
LVL1::eFEXtauBDT::m_hadcells
unsigned int * m_hadcells[3][3]
Definition: eFEXtauBDT.h:110
lumiFormat.i
int i
Definition: lumiFormat.py:92
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
LVL1::eFEXtauBDT::m_EM_eTComputeSCellPointers
std::vector< unsigned int * > m_EM_eTComputeSCellPointers
Definition: eFEXtauBDT.h:143
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
LVL1::eFEXtauBDT::m_towersComputeSCellPointers
std::vector< std::vector< unsigned int * > > m_towersComputeSCellPointers
Definition: eFEXtauBDT.h:145
conifer::BDT::decision_function
std::vector< U > decision_function(std::vector< T > x) const
Definition: conifer.h:121
eFEXBDT::getETSCells
const std::vector< std::vector< int > > & getETSCells() const
Definition: eFEXBDT.h:60
LVL1::eFEXtauBDT::m_em0cells
unsigned int * m_em0cells[3][3]
Definition: eFEXtauBDT.h:106
fitman.by
by
Definition: fitman.py:411
LVL1::eFEXtauBDT::m_EM_eTEstimate
unsigned int m_EM_eTEstimate
Definition: eFEXtauBDT.h:120
LVL1::eFEXtauBDT::m_hadEstimateShifted
unsigned int m_hadEstimateShifted
Definition: eFEXtauBDT.h:127
LVL1::eFEXtauBDT::m_fracCondition
unsigned int m_fracCondition
Definition: eFEXtauBDT.h:124
internal_poltrig::estimate
REAL estimate(const int &elen, REAL *e)
Definition: PolygonTriangulator.cxx:451
eFEXBDT::getEMETSCells
const std::vector< std::vector< int > > & getEMETSCells() const
Definition: eFEXBDT.h:64
LVL1::eFEXtauBDT::m_em3cells
unsigned int * m_em3cells[3][3]
Definition: eFEXtauBDT.h:109
python.selection.number
number
Definition: selection.py:20
LVL1::eFEXtauBDT::m_HAD_eTComputeSCellPointers
std::vector< unsigned int * > m_HAD_eTComputeSCellPointers
Definition: eFEXtauBDT.h:144
LVL1::eFEXtauBDT::m_emEtXMultiplier
std::vector< unsigned int > m_emEtXMultiplier
Definition: eFEXtauBDT.h:128
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
LVL1::eFEXtauBDT::m_fracMultipliers
unsigned int * m_fracMultipliers[3]
Definition: eFEXtauBDT.h:111
eFEXBDT::getNTowers
int getNTowers() const
Definition: eFEXBDT.h:80
LVL1::eFEXtauBDT::buildBDTVariables
void buildBDTVariables()
Definition: eFEXtauBDT.cxx:237
DeMoScan.index
string index
Definition: DeMoScan.py:362
LVL1::eFEXtauBDT::m_em2cells
unsigned int * m_em2cells[12][3]
Definition: eFEXtauBDT.h:108
a
TList * a
Definition: liststreamerinfos.cxx:10
eFEXBDT::getScorePrecision
int getScorePrecision() const
Definition: eFEXBDT.h:82
LVL1::eFEXtauBDT::computeBDTScore
void computeBDTScore()
Definition: eFEXtauBDT.cxx:251
LVL1::eFEXtauBDT::m_bdtScore
unsigned int m_bdtScore
Definition: eFEXtauBDT.h:116
LVL1::eFEXtauBDT::debugPrintSCellValues
void debugPrintSCellValues()
Definition: eFEXtauBDT.cxx:187
DEBUG
#define DEBUG
Definition: page_access.h:11
eFEXBDT::getTowerSCells
const std::vector< std::vector< int > > & getTowerSCells(int towerIndex) const
Definition: eFEXBDT.h:76
LVL1::eFEXtauBDT::m_isSeeded
bool m_isSeeded
Definition: eFEXtauBDT.h:126
AthCommonMsg::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
LVL1::eFEXtauBDT::computeFracCondition
void computeFracCondition()
Definition: eFEXtauBDT.cxx:355
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
PARAM_WIDTH
#define PARAM_WIDTH
Definition: eFEXtauBDT.cxx:17
LVL1::eFEXtauBDT::superCellToPtr
unsigned int * superCellToPtr(int eta, int phi, int layer)
Definition: eFEXtauBDT.cxx:79
LVL1::eFEXtauBDT::m_bdtThresholds
unsigned int * m_bdtThresholds[3]
Definition: eFEXtauBDT.h:112
LVL1::eFEXtauBDT::m_emEtXMultiplierOverflow
std::vector< unsigned int > m_emEtXMultiplierOverflow
Definition: eFEXtauBDT.h:129
LVL1::eFEXtauBDT::BitLeftShift
unsigned int BitLeftShift(unsigned int number, int by, int totalNBits)
Definition: eFEXtauBDT.cxx:347
LVL1::eFEXtauBDT::m_etThreshold
unsigned int * m_etThreshold
Definition: eFEXtauBDT.h:113
LVL1::eFEXtauBDT::m_HAD_eTEstimateOverflow
bool m_HAD_eTEstimateOverflow
Definition: eFEXtauBDT.h:123
MuonParameters::beta
@ beta
Definition: MuonParamDefs.h:144
LVL1::eFEXtauBDT::m_bdtVars
std::vector< unsigned int > m_bdtVars
Definition: eFEXtauBDT.h:133
LVL1::eFEXtauBDT::m_eTEstimate
unsigned int m_eTEstimate
Definition: eFEXtauBDT.h:118
LVL1::eFEXtauBDT::m_bdtCondition
unsigned int m_bdtCondition
Definition: eFEXtauBDT.h:125
LVL1::eFEXtauBDT::m_em1cells
unsigned int * m_em1cells[12][3]
Definition: eFEXtauBDT.h:107
LVL1::eFEXtauBDT::computeIsCentralTowerSeed
void computeIsCentralTowerSeed()
Definition: eFEXtauBDT.cxx:414
eFEXBDT::getHADETSCells
const std::vector< std::vector< int > > & getHADETSCells() const
Definition: eFEXBDT.h:68
LVL1::eFEXtauBDT::computeEstimate
unsigned int computeEstimate(std::vector< unsigned int * > &ptr_list, bool &overflow, int resultNBits)
Definition: eFEXtauBDT.cxx:315
LVL1::eFEXtauBDT::computeHADETEstimate
void computeHADETEstimate()
Definition: eFEXtauBDT.cxx:274
LVL1::eFEXtauBDT::multWithOverflow
unsigned int multWithOverflow(unsigned int a, unsigned int b, bool &overflow, int resultNBits)
Definition: eFEXtauBDT.cxx:328
BDTVariable
Definition: eFEXBDT.h:16
LVL1::eFEXtauBDT::m_EM_eTEstimateOverflow
bool m_EM_eTEstimateOverflow
Definition: eFEXtauBDT.h:121