HerdSoftware  0.1.1
PsdGeometricDigitizerAlgo.h
Go to the documentation of this file.
1 /*
2  * PsdGeometricDigitizerAlgo.h
3  *
4  * Created on: 11 Jan 2019
5  * Author: Nicola Mori
6  */
7 
8 #ifndef HERD_PSDGEOMETRICDIGITIZERALGO_H_
9 #define HERD_PSDGEOMETRICDIGITIZERALGO_H_
10 
11 // HerdSoftware headers
15 
16 // EventAnalysis headers
17 #include "algorithm/Algorithm.h"
18 
19 using namespace EA;
20 
21 namespace Herd {
22 
23 // clang-format off
76 // clang-format on
77 
78 class PsdGeometricDigitizerAlgo : public Algorithm {
79 public:
84  PsdGeometricDigitizerAlgo(const std::string &name);
85 
90  bool Initialize() override;
91 
98  bool Process() override;
99 
108  std::vector<std::string> FreeObjects(const std::vector<std::string> &objs, Memory::Status memStatus) override;
109 
110 private:
111  // Parameters
113 
114  PsdHitsColl _aggrPsdHitsColl; // New aggregated hits
115  PsdParticleHitsColl _aggrPsdParticleHitsColl; // New aggregated particle hits
116  observer_ptr<PsdGeoParamsColl> _origPsdGeoParamsColl; // Original parameters
117  std::shared_ptr<PsdGeoParamsColl> _aggrPsdGeoParamsColl; // New aggregated parameters
118 
119  StorePtr _evStore, _globStore;
120 
150  void _Aggregate(const std::vector<PsdGeoParams> &originalGeoParams, const PsdHits &originalHits,
151  observer_ptr<const PsdParticleHits> originalParticleHits, const AxesArray<int> &aggrFactors,
152  const std::vector<PsdGeoParams> &aggregatedGeoParams, PsdHits &aggregatedHits,
153  PsdParticleHits &aggregatedParticleHits);
154  // Utility variables for calling _AggregateTiles
155  SidesArray<std::array<bool, 2>> _tileCooIncreasesWithID; // true if the tile coordinate increases with the tile ID.
157 
158  CooArray<unsigned char> _AggregatedIndexes(const CooArray<unsigned char> &origIndexes,
159  const AxesArray<int> &aggrFactors);
160 };
161 
162 } // namespace Herd
163 
164 #endif /* HERD_PSDGEOMETRICDIGITIZERALGO_H_ */
CssGeoParams.h CssGeoParams class declaration.
Definition: CaloPDCalibrationAlgo.h:24
Container for the hits of a single PSD detector.
StorePtr _globStore
Definition: PsdGeometricDigitizerAlgo.h:119
SidesArray< std::array< bool, 2 > > _tileCooIncreasesWithID
Definition: PsdGeometricDigitizerAlgo.h:155
observer_ptr< PsdGeoParamsColl > _origPsdGeoParamsColl
Definition: PsdGeometricDigitizerAlgo.h:116
Algorithm that groups the Monte Carlo PSD hits based on a purely geometric criterion.
Definition: PsdGeometricDigitizerAlgo.h:78
PsdParticleHitsColl _aggrPsdParticleHitsColl
Definition: PsdGeometricDigitizerAlgo.h:115
AxesArray< int > _topAggrFactor
Definition: PsdGeometricDigitizerAlgo.h:112
Container for the particle hits of a single PSD detector.
std::shared_ptr< PsdGeoParamsColl > _aggrPsdGeoParamsColl
Definition: PsdGeometricDigitizerAlgo.h:117
SidesArray< RefFrame::Axis > _tileSecAggrAxis
Definition: PsdGeometricDigitizerAlgo.h:156
PsdHitsColl _aggrPsdHitsColl
Definition: PsdGeometricDigitizerAlgo.h:114