ATLAS Offline Software
Egamma1BDTAlgTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef GLOBALSIM_EGAMMA1BDTALGTOOL_H
6 #define GLOBALSIM_EGAMMA1BDTALGTOOL_H
7 
12 #include "../IGlobalSimAlgTool.h"
13 #include "../IO/LArStripNeighborhoodContainer.h"
14 
15 #include "../NumericTypes/ap_int.h"
16 #include "../NumericTypes/ap_fixed.h"
17 
18 #include "Egamma1BDT/BDT.h"
19 
21 
22 #include <string>
23 #include <vector>
24 
25 namespace GlobalSim {
26  class Egamma1BDTAlgTool: public extends<AthAlgTool, IGlobalSimAlgTool> {
27 
28  public:
29  Egamma1BDTAlgTool(const std::string& type,
30  const std::string& name,
31  const IInterface* parent);
32 
33  virtual ~Egamma1BDTAlgTool() = default;
34 
35  StatusCode initialize() override;
36 
37  virtual StatusCode run(const EventContext& ctx) const override;
38 
39  virtual std::string toString() const override;
40 
41  private:
42 
43 
44  Gaudi::Property<bool>
46  "enableDump",
47  {false},
48  "flag to enable dumps"};
49 
50  // input to the BDT Algorithm
53  this,
54  "LArNeighborhoodContainerReadKey",
55  "stripNeighborhoodContainer",
56  "key to read inLArNeighborhoodReadKeys"};
57 
58  std::vector<double> combine_phi(const LArStripNeighborhood*) const;
59  std::vector<ap_int<10>> digitize(const std::vector<double>&) const;
60 
61  // a neighborhood has 3 vectors of strip energies (phi_low, phi_center.
62  // phi_high). Provide the length thes vectors must have for the BDT to be
63  // evaluated
64  static inline constexpr int s_required_phi_len = 17;
65 
66  // the three strip energy vectors are combined to form a single vector.
67  // the length of this vector have the following length.
68  static inline constexpr int s_combination_len = 18;
69  };
70 }
71 #endif
GlobalSim::Egamma1BDTAlgTool::m_enableDump
Gaudi::Property< bool > m_enableDump
Definition: Egamma1BDTAlgTool.h:45
GlobalSim::Egamma1BDTAlgTool::run
virtual StatusCode run(const EventContext &ctx) const override
Definition: Egamma1BDTAlgTool.cxx:28
GlobalSim::Egamma1BDTAlgTool::digitize
std::vector< ap_int< 10 > > digitize(const std::vector< double > &) const
Definition: Egamma1BDTAlgTool.cxx:117
GlobalSim::Egamma1BDTAlgTool::~Egamma1BDTAlgTool
virtual ~Egamma1BDTAlgTool()=default
GlobalSim::Egamma1BDTAlgTool::s_combination_len
static constexpr int s_combination_len
Definition: Egamma1BDTAlgTool.h:68
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
GlobalSim::Egamma1BDTAlgTool::combine_phi
std::vector< double > combine_phi(const LArStripNeighborhood *) const
Definition: Egamma1BDTAlgTool.cxx:76
GlobalSim
AlgTool to obtain a selection of eFex RoIs read in from the event store.
Definition: dump.h:8
GlobalSim::Egamma1BDTAlgTool::s_required_phi_len
static constexpr int s_required_phi_len
Definition: Egamma1BDTAlgTool.h:64
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
GlobalSim::Egamma1BDTAlgTool::initialize
StatusCode initialize() override
Definition: Egamma1BDTAlgTool.cxx:20
GlobalSim::Egamma1BDTAlgTool::toString
virtual std::string toString() const override
Definition: Egamma1BDTAlgTool.cxx:139
GlobalSim::Egamma1BDTAlgTool::Egamma1BDTAlgTool
Egamma1BDTAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: Egamma1BDTAlgTool.cxx:14
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
GlobalSim::Egamma1BDTAlgTool::m_nbhdContainerReadKey
SG::ReadHandleKey< LArStripNeighborhoodContainer > m_nbhdContainerReadKey
Definition: Egamma1BDTAlgTool.h:52
GlobalSim::Egamma1BDTAlgTool
Definition: Egamma1BDTAlgTool.h:26
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
BDT.h
GlobalSim::LArStripNeighborhood
Definition: LArStripNeighborhood.h:28