ATLAS Offline Software
Loading...
Searching...
No Matches
Egamma1BDTAlgTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef GLOBALSIM_EGAMMA1BDTALGTOOL_H
6#define GLOBALSIM_EGAMMA1BDTALGTOOL_H
7
11
14#include "../IO/eEmNbhoodTOB.h"
15#include "../IO/eEmEg1BDTTOB.h"
16
18
19#include "ap_int.h"
20#include "ap_fixed.h"
22
23#include "./Egamma1BDT/BDT.h"
24
26
27#include <string>
28#include <vector>
29
30namespace GlobalSim {
31
32 class Egamma1BDTAlgTool: public extends<AthAlgTool, IGlobalSimAlgTool> {
33
36
37 public:
38 Egamma1BDTAlgTool(const std::string& type,
39 const std::string& name,
40 const IInterface* parent);
41
42 virtual ~Egamma1BDTAlgTool() = default;
43
44 StatusCode initialize() override;
45
46 virtual StatusCode run(const std::unique_ptr<IDataCollector>&,
47 const EventContext& ctx) const override;
48
49 virtual std::string toString() const override;
50
51 static constexpr std::size_t BDT_ouput_width = 10;
52
53 private:
54
55
56 Gaudi::Property<bool>
58 "enableDump",
59 {false},
60 "flag to enable dumps"};
61
64 this,
65 "BDTScoreKey",
66 "eGamma1BDT"};
67
68 // input to the BDT Algorithm
71 this,
72 "LArNeighborhoodTOBContainerReadKey",
73 "stripNeighborhoodTOBContainer",
74 "key to read inLArNeighborhoodTOBsReadKeys"};
75
78 this,
79 "eEmEg1BDTTOBContainerKey",
80 "eEmEg1BDTTOBContainer"};
81
82 int bitSetToInt(std::bitset<BDT_ouput_width> bitSet) const;
83 std::vector<double> combine_phi(const IOBitwise::eEmNbhoodTOB*) const;
84
85 // a neighborhood has 3 vectors of strip energies (phi_low, phi_center.
86 // phi_high). Provide the length thes vectors must have for the BDT to be
87 // evaluated
88 static inline constexpr int s_required_phi_len = 17;
89
90 // the three strip energy vectors are combined to form a single vector.
91 // the length of this vector have the following length.
92 static inline constexpr int s_combination_len = 18;
93 };
94}
95#endif
virtual ~Egamma1BDTAlgTool()=default
static constexpr int s_combination_len
virtual StatusCode run(const std::unique_ptr< IDataCollector > &, const EventContext &ctx) const override
Egamma1BDTAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
GlobalSim::IOBitwise::eEmNbhoodTOBContainer eEmNbhoodTOBContainer
Gaudi::Property< bool > m_enableDump
std::vector< double > combine_phi(const IOBitwise::eEmNbhoodTOB *) const
GlobalSim::IOBitwise::eEmEg1BDTTOBContainer eEmEg1BDTTOBContainer
SG::WriteHandleKey< std::vector< float > > m_BDTScoreKey
StatusCode initialize() override
static constexpr std::size_t BDT_ouput_width
int bitSetToInt(std::bitset< BDT_ouput_width > bitSet) const
SG::ReadHandleKey< eEmNbhoodTOBContainer > m_nbhdTOBContainerReadKey
static constexpr int s_required_phi_len
virtual std::string toString() const override
SG::WriteHandleKey< eEmEg1BDTTOBContainer > m_eEmEg1BDTTOBContainerKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
DataVector< GlobalSim::IOBitwise::eEmEg1BDTTOB > eEmEg1BDTTOBContainer
DataVector< GlobalSim::IOBitwise::eEmNbhoodTOB > eEmNbhoodTOBContainer
AlgTool to read in LArStripNeighborhoods, and run the BDT Algorithm.