ATLAS Offline Software
Egamma1eRatioAlgTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef GLOBALSIM_EGAMMA1ERATIOALGTOOL_H
6 #define GLOBALSIM_EGAMMA1ERATIOALGTOOL_H
7 
12 #include "../GlobalSimComponents/IGlobalSimAlgTool.h"
13 #include "../IO/LArStripNeighborhoodContainer.h"
14 #include "../IO/IeEmNbhoodTOBContainer.h"
15 #include "../IO/IeEmNbhoodTOB.h"
16 #include "../IO/IeEmEg1eRatioTOBContainer.h"
17 #include "../IO/IeEmEg1eRatioTOB.h"
18 
19 #include "ap_int.h"
20 #include "ap_fixed.h"
21 #include "Digitizer.h"
22 
24 
25 #include <string>
26 #include <vector>
27 
28 namespace GlobalSim {
29  class Egamma1eRatioAlgTool: public extends<AthAlgTool, IGlobalSimAlgTool> {
30 
31  public:
32  Egamma1eRatioAlgTool(const std::string& type,
33  const std::string& name,
34  const IInterface* parent);
35 
36  virtual ~Egamma1eRatioAlgTool() = default;
37 
38  StatusCode initialize() override;
39 
40  virtual StatusCode run(const EventContext& ctx) const override;
41 
42  virtual std::string toString() const override;
43 
44  private:
45 
46  Gaudi::Property<bool>
48  "enableDump",
49  {false},
50  "flag to enable dumps"};
51 
52  // input to the eRatio Algorithm
55  this,
56  "LArNeighborhoodTOBContainerReadKey",
57  "stripNeighborhoodTOBContainer",
58  "key to read inLArNeighborhoodTOBsReadKeys"};
59 
62  this,
63  "eRatioResultKey",
64  "eRatioResult"};
65 
68  this,
69  "eRatioKey",
70  "eRatio"};
71 
74  this,
75  "eRatioSimpleKey",
76  "eRatioSimple"};
77 
78  std::vector<double> combine_phi(const IOBitwise::IeEmNbhoodTOB*) const;
79  ap_int<16> secondPeakSearch(const std::vector<ap_int<16>>& input, const ap_int<16> peak,
80  const int startCell, const int endCell,
81  const ap_int<16> noiseMargin) const;
82 
83  // a neighborhood has 3 vectors of strip energies (phi_low, phi_center.
84  // phi_high). Provide the length thes vectors must have for the eRatio to be
85  // evaluated
86  static inline constexpr int s_required_phi_len = 17;
87 
88  // the three strip energy vectors are combined to form a single vector.
89  // the length of this vector have the following length.
90  static inline constexpr int s_combination_len = 51;
91  };
92 }
93 #endif
GlobalSim::Egamma1eRatioAlgTool::secondPeakSearch
ap_int< 16 > secondPeakSearch(const std::vector< ap_int< 16 >> &input, const ap_int< 16 > peak, const int startCell, const int endCell, const ap_int< 16 > noiseMargin) const
Definition: Egamma1eRatioAlgTool.cxx:134
GlobalSim::Egamma1eRatioAlgTool::m_eRatioSimpleKey
SG::WriteHandleKey< std::vector< float > > m_eRatioSimpleKey
Definition: Egamma1eRatioAlgTool.h:73
ap_fixed.h
GlobalSim::Egamma1eRatioAlgTool::~Egamma1eRatioAlgTool
virtual ~Egamma1eRatioAlgTool()=default
GlobalSim::Egamma1eRatioAlgTool::combine_phi
std::vector< double > combine_phi(const IOBitwise::IeEmNbhoodTOB *) const
Definition: Egamma1eRatioAlgTool.cxx:178
Digitizer.h
GlobalSim::Egamma1eRatioAlgTool::Egamma1eRatioAlgTool
Egamma1eRatioAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: Egamma1eRatioAlgTool.cxx:15
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
GlobalSim::Egamma1eRatioAlgTool::toString
virtual std::string toString() const override
Definition: Egamma1eRatioAlgTool.cxx:206
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
GlobalSim::Egamma1eRatioAlgTool
Definition: Egamma1eRatioAlgTool.h:29
GlobalSim
AlgTool that to test whether expected the TIP values generated by data supplied by eEmMultTestBench c...
Definition: CommonSelector.cxx:8
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
GlobalSim::ap_int
Definition: ap_int.h:23
GlobalSim::Egamma1eRatioAlgTool::s_required_phi_len
static constexpr int s_required_phi_len
Definition: Egamma1eRatioAlgTool.h:86
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
GlobalSim::Egamma1eRatioAlgTool::m_eRatioKey
SG::WriteHandleKey< std::vector< int > > m_eRatioKey
Definition: Egamma1eRatioAlgTool.h:67
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
GlobalSim::Egamma1eRatioAlgTool::m_nbhdTOBContainerReadKey
SG::ReadHandleKey< IOBitwise::IeEmNbhoodTOBContainer > m_nbhdTOBContainerReadKey
Definition: Egamma1eRatioAlgTool.h:54
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
GlobalSim::Egamma1eRatioAlgTool::initialize
StatusCode initialize() override
Definition: Egamma1eRatioAlgTool.cxx:21
GlobalSim::Egamma1eRatioAlgTool::s_combination_len
static constexpr int s_combination_len
Definition: Egamma1eRatioAlgTool.h:90
ap_int.h
GlobalSim::Egamma1eRatioAlgTool::m_enableDump
Gaudi::Property< bool > m_enableDump
Definition: Egamma1eRatioAlgTool.h:47
GlobalSim::Egamma1eRatioAlgTool::run
virtual StatusCode run(const EventContext &ctx) const override
Definition: Egamma1eRatioAlgTool.cxx:32
GlobalSim::IOBitwise::IeEmNbhoodTOB
Class to hold an eFexRoI and LAr strip neighbourhood.
Definition: IeEmNbhoodTOB.h:28
GlobalSim::Egamma1eRatioAlgTool::m_eRatioResultKey
SG::WriteHandleKey< IOBitwise::IeEmEg1eRatioTOBContainer > m_eRatioResultKey
Definition: Egamma1eRatioAlgTool.h:61