ATLAS Offline Software
Egamma1BaselineAlgTool.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_EGAMMA1BASELINEALGTOOL_H
6 #define GLOBALSIM_EGAMMA1BASELINEALGTOOL_H
7 
12 #include "../IGlobalSimAlgTool.h"
13 #include "../IO/LArStripNeighborhoodContainer.h"
14 
15 #include "ap_int.h"
16 #include "ap_fixed.h"
17 #include "Digitizer.h"
18 
20 
21 #include <string>
22 #include <vector>
23 
24 namespace GlobalSim {
25  class Egamma1BaselineAlgTool: public extends<AthAlgTool, IGlobalSimAlgTool> {
26 
27  public:
28  Egamma1BaselineAlgTool(const std::string& type,
29  const std::string& name,
30  const IInterface* parent);
31 
32  virtual ~Egamma1BaselineAlgTool() = default;
33 
34  StatusCode initialize() override;
35 
36  virtual StatusCode run(const EventContext& ctx) const override;
37 
38  virtual std::string toString() const override;
39 
40  private:
41 
42 
43  Gaudi::Property<bool>
45  "enableDump",
46  {false},
47  "flag to enable dumps"};
48 
49  // input to the Baseline Algorithm
52  this,
53  "LArNeighborhoodContainerReadKey",
54  "stripNeighborhoodContainer",
55  "key to read inLArNeighborhoodReadKeys"};
56 
59  this,
60  "eRatioKey",
61  "eRatio"};
62 
65  this,
66  "eRatioSimpleKey",
67  "eRatioSimple"};
68 
69  std::vector<double> combine_phi(const LArStripNeighborhood*) const;
70  ap_int<16> secondPeakSearch(const std::vector<ap_int<16>>& input, const ap_int<16> peak,
71  const int startCell, const int endCell,
72  const ap_int<16> noiseMargin) const;
73 
74  // a neighborhood has 3 vectors of strip energies (phi_low, phi_center.
75  // phi_high). Provide the length thes vectors must have for the Baseline to be
76  // evaluated
77  static inline constexpr int s_required_phi_len = 17;
78 
79  // the three strip energy vectors are combined to form a single vector.
80  // the length of this vector have the following length.
81  static inline constexpr int s_combination_len = 51;
82  };
83 }
84 #endif
ap_fixed.h
GlobalSim::Egamma1BaselineAlgTool::toString
virtual std::string toString() const override
Definition: Egamma1BaselineAlgTool.cxx:190
GlobalSim::Egamma1BaselineAlgTool::run
virtual StatusCode run(const EventContext &ctx) const override
Definition: Egamma1BaselineAlgTool.cxx:29
GlobalSim::Egamma1BaselineAlgTool::m_eRatioKey
SG::WriteHandleKey< std::vector< float > > m_eRatioKey
Definition: Egamma1BaselineAlgTool.h:58
GlobalSim::Egamma1BaselineAlgTool::initialize
StatusCode initialize() override
Definition: Egamma1BaselineAlgTool.cxx:19
Digitizer.h
GlobalSim::Egamma1BaselineAlgTool::s_required_phi_len
static constexpr int s_required_phi_len
Definition: Egamma1BaselineAlgTool.h:77
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
GlobalSim::Egamma1BaselineAlgTool::m_enableDump
Gaudi::Property< bool > m_enableDump
Definition: Egamma1BaselineAlgTool.h:44
GlobalSim
AlgTool to obtain a selection of eFex RoIs read in from the event store.
Definition: dump.h: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::Egamma1BaselineAlgTool
Definition: Egamma1BaselineAlgTool.h:25
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::Egamma1BaselineAlgTool::m_eRatioSimpleKey
SG::WriteHandleKey< std::vector< float > > m_eRatioSimpleKey
Definition: Egamma1BaselineAlgTool.h:64
GlobalSim::Egamma1BaselineAlgTool::m_nbhdContainerReadKey
SG::ReadHandleKey< LArStripNeighborhoodContainer > m_nbhdContainerReadKey
Definition: Egamma1BaselineAlgTool.h:51
GlobalSim::Egamma1BaselineAlgTool::~Egamma1BaselineAlgTool
virtual ~Egamma1BaselineAlgTool()=default
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
GlobalSim::Egamma1BaselineAlgTool::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: Egamma1BaselineAlgTool.cxx:118
GlobalSim::Egamma1BaselineAlgTool::s_combination_len
static constexpr int s_combination_len
Definition: Egamma1BaselineAlgTool.h:81
ap_int.h
GlobalSim::LArStripNeighborhood
Definition: LArStripNeighborhood.h:28
GlobalSim::Egamma1BaselineAlgTool::combine_phi
std::vector< double > combine_phi(const LArStripNeighborhood *) const
Definition: Egamma1BaselineAlgTool.cxx:162
GlobalSim::Egamma1BaselineAlgTool::Egamma1BaselineAlgTool
Egamma1BaselineAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: Egamma1BaselineAlgTool.cxx:13