HerdSoftware  0.3.2
CaloTwoThreshShowerAlgo.h
Go to the documentation of this file.
1 /*
2  * CaloTwoThreshShowerAlgo.h
3  *
4  * Created on 18 November 2021
5  * Author: Sergio Bottai
6  */
7 
10 #ifndef CALOSHOWERALGO_H_
11 #define CALOSHOWERALGO_H_
12 
13 // HerdSoftware headers
15 
16 // EventAnalysis headers
17 #include "algorithm/Algorithm.h"
18 
19 using namespace EA;
20 
21 namespace Herd {
22 // clang-format off
58 // clang-format on
59 
60 class CaloTwoThreshShowerAlgo : public Algorithm {
61 
62 public:
67  CaloTwoThreshShowerAlgo(const std::string &name);
68 
73  bool Initialize() override;
74 
79  bool Process() override;
80 
85  bool Finalize() override;
86 
87 private:
89  struct UsedObjects {
90  std::string usedAxisDataObjName;
91  size_t usedAxisIndex;
92  std::string usedCaloDataObjName;
93  size_t usedCaloCollIndex = defaultValue<decltype(usedCaloCollIndex)>;
94  };
95 
97  bool BuildShower(const CaloHits &, Line showeraxis, const UsedObjects &usedObjects);
98 
101 
104 
108  std::string m_caloHitsName;
109 
113  std::string m_trackAxisType;
114 
119 
120  std::string m_objName{"caloShowers"};
121 
123  std::shared_ptr<CaloShowers> m_caloShowers;
124 
125  // Utility variables
126  observer_ptr<EventDataStore> m_evStore; // Pointer to the event data store
127  observer_ptr<GlobalDataStore> m_globStore; // Pointer to the global data store
128 };
129 
130 #endif /* CALOSHOWERALGO_H_ */
131 }
std::string m_caloHitsName
Name of the CaloHits collections to be used for reconstruction.
Definition: CaloTwoThreshShowerAlgo.h:108
CssGeoParams.h CssGeoParams class declaration.
Definition: CaloPDCalibrationAlgo.h:24
bool m_axisInversion
Flag variable to Invert the direction of the selected trackAxisType.
Definition: CaloTwoThreshShowerAlgo.h:118
std::string usedAxisDataObjName
Definition: CaloTwoThreshShowerAlgo.h:90
observer_ptr< EventDataStore > m_evStore
Definition: CaloTwoThreshShowerAlgo.h:126
Class describing a line in the 3D space.
Definition: Line.h:34
std::string m_trackAxisType
Type of existing track used for Shower reconstruction.
Definition: CaloTwoThreshShowerAlgo.h:113
size_t usedAxisIndex
Definition: CaloTwoThreshShowerAlgo.h:91
Helper struct to keep track of the object used in the shower reconstruction.
Definition: CaloTwoThreshShowerAlgo.h:89
std::string usedCaloDataObjName
Definition: CaloTwoThreshShowerAlgo.h:92
float m_edepThreshold
Threshold (in GeV) for energy deposit in CALO hits. Only hits above threshold are used to build the C...
Definition: CaloTwoThreshShowerAlgo.h:103
bool m_processCalo
Flag variable to instruct the algorithm to process the whole calo hit collection instead of separate ...
Definition: CaloTwoThreshShowerAlgo.h:100
std::shared_ptr< CaloShowers > m_caloShowers
Pointer to CaloShowers objects.
Definition: CaloTwoThreshShowerAlgo.h:123
observer_ptr< GlobalDataStore > m_globStore
Definition: CaloTwoThreshShowerAlgo.h:127
Container for the hits of a single CALO detector.
Algorithm for Calorimeter Shower reconstruction starting from a given Axis Direction.
Definition: CaloTwoThreshShowerAlgo.h:60