HerdSoftware  0.4.0
CaloTrackInfoAlgo.h
Go to the documentation of this file.
1 /*
2  * CaloTrackInfoAlgo.h
3  *
4  * Created on: 21 Oct 2019
5  * Author: Lorenzo Pacini
6  */
7 
8 #ifndef HERD_CALOTRACKINFOALGO_H_
9 #define HERD_CALOTRACKINFOALGO_H_
10 
11 #include "algorithm/Algorithm.h"
17 #include <array>
18 
19 namespace Herd {
20 
37 class CaloTrackInfoAlgo : public EA::Algorithm {
38 public:
43  explicit CaloTrackInfoAlgo(const std::string &name);
44 
49  bool Initialize() override;
50 
55  bool Process() override;
56 
61  bool Finalize() override;
62 
63 private:
69  bool _ComputeTrackInfoForCalo(const Line &track);
70 
77  float _PntDistance(Point p1, Point p2);
78 
88  bool _CalculateExactTrackLength(const Point startingPoint, Vec3D direction, float &length,
89  float &lengthAfterInteraction);
90 
91  EA::observer_ptr<EA::EventDataStore> m_evStore;
92  EA::observer_ptr<EA::GlobalDataStore> m_globStore;
93 
94  EA::observer_ptr<MCTruth> m_mcTruth;
95  EA::observer_ptr<CaloGeoParams> m_caloGeoParams;
96 
98 
100 }; // namespace Herd
101 
102 } // namespace Herd
103 
104 #endif /* HERD_CALOTRACKINFOALGO_H_ */
Herd::TrackInfoForCalo
Container of information about the track inside the Calo.
Definition: TrackInfoForCalo.h:28
Herd::CaloTrackInfoAlgo::Process
bool Process() override
Computes the track information, so far it use the MC truth.
Definition: CaloTrackInfoAlgo.cpp:62
DirectionsArray.h
Herd::Vec3D
A class describing a vector in 3D space.
Definition: Vec3D.h:33
Herd::CaloTrackInfoAlgo::m_trackInfoCalo
TrackInfoForCalo m_trackInfoCalo
The TrackInfoForCalo object to fill with the computed information.
Definition: CaloTrackInfoAlgo.h:97
Herd::Line
Class describing a line in the 3D space.
Definition: Line.h:37
Herd::CaloTrackInfoAlgo::CaloTrackInfoAlgo
CaloTrackInfoAlgo(const std::string &name)
Constructor.
Definition: CaloTrackInfoAlgo.cpp:27
Herd::CaloTrackInfoAlgo::_CalculateExactTrackLength
bool _CalculateExactTrackLength(const Point startingPoint, Vec3D direction, float &length, float &lengthAfterInteraction)
Computes the exact track length in LYSO and the remaining length after the first inelastic interactio...
Definition: CaloTrackInfoAlgo.cpp:93
Plane.h
MCTruth.h
TrackInfoForCalo.h
Herd
CssGeoParams.h CssGeoParams class declaration.
Definition: CaloPDCalibrationAlgo.h:22
Herd::CaloTrackInfoAlgo::_ComputeTrackInfoForCalo
bool _ComputeTrackInfoForCalo(const Line &track)
Computes the information about he track in Calo.
Definition: CaloTrackInfoAlgo.cpp:247
Herd::CaloTrackInfoAlgo::Initialize
bool Initialize() override
Initializes the planes used to compute the track calo information.
Definition: CaloTrackInfoAlgo.cpp:37
Herd::CaloTrackInfoAlgo::m_evStore
EA::observer_ptr< EA::EventDataStore > m_evStore
Pointer to the event data store.
Definition: CaloTrackInfoAlgo.h:91
Herd::CaloTrackInfoAlgo::_PntDistance
float _PntDistance(Point p1, Point p2)
Computes the distance between two points (To be removed from here).
Definition: CaloTrackInfoAlgo.cpp:87
Herd::CaloTrackInfoAlgo::Finalize
bool Finalize() override
Do nothing.
Definition: CaloTrackInfoAlgo.cpp:85
CaloGeoParams.h
Herd::CaloTrackInfoAlgo
An algorithm which computes information about the track inside the Calo.
Definition: CaloTrackInfoAlgo.h:37
Herd::CaloTrackInfoAlgo::m_meanVolumeActiveFraction
float m_meanVolumeActiveFraction
Definition: CaloTrackInfoAlgo.h:99
Herd::CaloTrackInfoAlgo::m_globStore
EA::observer_ptr< EA::GlobalDataStore > m_globStore
Pointer to the global data store.
Definition: CaloTrackInfoAlgo.h:92
Herd::CaloTrackInfoAlgo::m_mcTruth
EA::observer_ptr< MCTruth > m_mcTruth
Definition: CaloTrackInfoAlgo.h:94
Herd::CaloTrackInfoAlgo::m_caloGeoParams
EA::observer_ptr< CaloGeoParams > m_caloGeoParams
Definition: CaloTrackInfoAlgo.h:95