ATLAS Offline Software
eFEXtauBDTAlgo.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //***************************************************************************
6 // eFEXtauBDTAlgo.h -
7 // -------------------
8 // begin : 14 07 2022
9 // email : david.reikher@cern.ch
10 // ***************************************************************************/
11 
12 #ifndef eFEXtauBDTAlgo_H
13 #define eFEXtauBDTAlgo_H
14 
16 #include "AthenaKernel/CLASS_DEF.h"
21 //#include "L1CaloFEXToolInterfaces/IeFEXtauAlgo.h"
22 
23 namespace LVL1 {
24 // Doxygen class description below:
29 
30 public:
32  eFEXtauBDTAlgo(const std::string &type, const std::string &name,
33  const IInterface *parent);
34 
36  virtual StatusCode initialize() override;
37 
39  virtual ~eFEXtauBDTAlgo();
40 
41  virtual void setup(int inputTable[3][3], int efex_id, int fpga_id,
42  int central_eta) override;
43  virtual void compute() override;
44 
45  virtual std::unique_ptr<eFEXtauTOB> getTauTOB() const override;
46  virtual unsigned int rHadCore() const override;
47  virtual unsigned int rHadEnv() const override;
48  virtual unsigned int getEt() const override;
49  virtual unsigned int getBitwiseEt() const override;
50  virtual unsigned int getBDTScore() const override;
51  virtual unsigned int getBDTCondition() const override;
52  virtual unsigned int getBDTHadFracCondition() const override;
53  virtual bool isBDT() const override;
54  virtual void setThresholds(const std::vector<unsigned int> &rHadThreshold,
55  const std::vector<unsigned int> &bdtThreshold,
56  unsigned int etThreshold,
57  unsigned int etThresholdForRHad,
58  unsigned int bdtMinEtThreshold) override;
59 
60  // Seed is hard-coded to 1 to reduce eta asymmetry
61  // which is stronger when it's hard-coded to 0 and
62  // also to avoid modifications in L1Topo
63  virtual unsigned int getSeed() const override { return 1; }
64 
65 protected:
66 private:
68 
69  void setSCellPointers();
70  void setThresholdPointers();
71 
72  unsigned int m_hadFracMultipliers[3];
73  unsigned int m_bdtThresholds[3];
74  unsigned int m_etThreshold;
75  unsigned int m_maxEtThreshold;
76  unsigned int m_bdtMinEtThreshold;
77 
78  unsigned int m_bdtScore;
79 
80  // Final computed BDT variables
81  std::vector<unsigned int> m_bdtVars;
82 
83  // BDT variables are sums of supercells. The pointers to the memory locations
84  // containing the supercell ET values for each variable are stores in the
85  // following vector. Index in the vector corresponds to index of the variable.
86  std::vector<std::vector<unsigned int *>> m_bdtVarComputeSCellPointers;
87 
88  Gaudi::Property<std::string> m_bdtJsonConfigPath{
89  this, "BDTJsonConfigPath", "bdt_config_v16.json",
90  "Path to BDT json config file"};
91  std::unique_ptr<eFEXtauBDT> m_bdtAlgoImpl;
92 
93  bool m_bdtVarsComputed = false;
94 };
95 
96 } // namespace LVL1
97 
98 // CLASS_DEF( LVL1::eFEXtauBDTAlgo , 140708609 , 1 )
99 
100 #endif
LVL1::eFEXtauBDTAlgo::initBDTVars
StatusCode initBDTVars()
LVL1::eFEXtauBDTAlgo::isBDT
virtual bool isBDT() const override
Definition: eFEXtauBDTAlgo.cxx:162
LVL1::eFEXtauBDTAlgo::compute
virtual void compute() override
Definition: eFEXtauBDTAlgo.cxx:66
eTowerContainer.h
LVL1::eFEXtauBDTAlgo::setup
virtual void setup(int inputTable[3][3], int efex_id, int fpga_id, int central_eta) override
Definition: eFEXtauBDTAlgo.cxx:58
eFEXtauTOB.h
LVL1::eFEXtauBDTAlgo::getBDTCondition
virtual unsigned int getBDTCondition() const override
Definition: eFEXtauBDTAlgo.cxx:154
LVL1::eFEXtauBDTAlgo::getTauTOB
virtual std::unique_ptr< eFEXtauTOB > getTauTOB() const override
Definition: eFEXtauBDTAlgo.cxx:68
LVL1::eFEXtauBDTAlgo::getBDTScore
virtual unsigned int getBDTScore() const override
Definition: eFEXtauBDTAlgo.cxx:150
LVL1::eFEXtauBDTAlgo::m_maxEtThreshold
unsigned int m_maxEtThreshold
Definition: eFEXtauBDTAlgo.h:75
LVL1::eFEXtauBDTAlgo::rHadCore
virtual unsigned int rHadCore() const override
Definition: eFEXtauBDTAlgo.cxx:124
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::eFEXtauBDTAlgo::m_bdtMinEtThreshold
unsigned int m_bdtMinEtThreshold
Definition: eFEXtauBDTAlgo.h:76
LVL1::eFEXtauBDTAlgo::getEt
virtual unsigned int getEt() const override
Definition: eFEXtauBDTAlgo.cxx:116
LVL1::eFEXtauBDTAlgo::~eFEXtauBDTAlgo
virtual ~eFEXtauBDTAlgo()
Destructor.
Definition: eFEXtauBDTAlgo.cxx:27
LVL1::eFEXtauBDTAlgo::m_bdtThresholds
unsigned int m_bdtThresholds[3]
Definition: eFEXtauBDTAlgo.h:73
LVL1::eFEXtauAlgoBase
The eFEXtauBDTAlgo class calculates the tau BDT TOB variables.
Definition: eFEXtauAlgoBase.h:28
LVL1::eFEXtauBDTAlgo::m_bdtVars
std::vector< unsigned int > m_bdtVars
Definition: eFEXtauBDTAlgo.h:81
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
LVL1::eFEXtauBDTAlgo::m_bdtJsonConfigPath
Gaudi::Property< std::string > m_bdtJsonConfigPath
Definition: eFEXtauBDTAlgo.h:88
LVL1::eFEXtauBDTAlgo::setThresholdPointers
void setThresholdPointers()
Definition: eFEXtauBDTAlgo.cxx:100
TrigConf::name
Definition: HLTChainList.h:35
LVL1::eFEXtauBDTAlgo::setThresholds
virtual void setThresholds(const std::vector< unsigned int > &rHadThreshold, const std::vector< unsigned int > &bdtThreshold, unsigned int etThreshold, unsigned int etThresholdForRHad, unsigned int bdtMinEtThreshold) override
Definition: eFEXtauBDTAlgo.cxx:164
LVL1::eFEXtauBDTAlgo::setSCellPointers
void setSCellPointers()
Definition: eFEXtauBDTAlgo.cxx:84
LVL1::eFEXtauBDTAlgo::eFEXtauBDTAlgo
eFEXtauBDTAlgo(const std::string &type, const std::string &name, const IInterface *parent)
Constructors.
Definition: eFEXtauBDTAlgo.cxx:21
LVL1::eFEXtauBDTAlgo::rHadEnv
virtual unsigned int rHadEnv() const override
Definition: eFEXtauBDTAlgo.cxx:132
LVL1::eFEXtauBDTAlgo::m_bdtScore
unsigned int m_bdtScore
Definition: eFEXtauBDTAlgo.h:78
LVL1::eFEXtauBDTAlgo::m_bdtVarsComputed
bool m_bdtVarsComputed
Definition: eFEXtauBDTAlgo.h:93
LVL1::eFEXtauBDTAlgo::initialize
virtual StatusCode initialize() override
standard Athena-Algorithm method
Definition: eFEXtauBDTAlgo.cxx:29
eFEXtauBDT.h
LVL1::eFEXtauBDTAlgo::getBDTHadFracCondition
virtual unsigned int getBDTHadFracCondition() const override
Definition: eFEXtauBDTAlgo.cxx:158
LVL1::eFEXtauBDTAlgo::m_etThreshold
unsigned int m_etThreshold
Definition: eFEXtauBDTAlgo.h:74
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LVL1::eFEXtauBDTAlgo::getBitwiseEt
virtual unsigned int getBitwiseEt() const override
Definition: eFEXtauBDTAlgo.cxx:142
eFEXtauAlgoBase.h
LVL1::eFEXtauBDTAlgo::m_bdtAlgoImpl
std::unique_ptr< eFEXtauBDT > m_bdtAlgoImpl
Definition: eFEXtauBDTAlgo.h:91
LVL1::eFEXtauBDTAlgo
The eFEXtauBDTAlgo class calculates the tau BDT TOB variables.
Definition: eFEXtauBDTAlgo.h:28
LVL1::eFEXtauBDTAlgo::m_hadFracMultipliers
unsigned int m_hadFracMultipliers[3]
Definition: eFEXtauBDTAlgo.h:72
LVL1::eFEXtauBDTAlgo::m_bdtVarComputeSCellPointers
std::vector< std::vector< unsigned int * > > m_bdtVarComputeSCellPointers
Definition: eFEXtauBDTAlgo.h:86
CLASS_DEF.h
macros to associate a CLID to a type
LVL1::eFEXtauBDTAlgo::getSeed
virtual unsigned int getSeed() const override
Definition: eFEXtauBDTAlgo.h:63