HerdSoftware  0.1.1
CaloPDCalibrationAlgo.h
Go to the documentation of this file.
1 /*
2  * CaloPDCalibrationAlgo.h
3  *
4  * Created on: 22 Set. 2020
5  * Author: Lorenzo Pacini
6  */
7 
8 #ifndef HERD_CALOPDCALIBRATIONALGO_H_
9 #define HERD_CALOPDCALIBRATIONALGO_H_
10 
11 // HerdSoftware headers
12 #include "dataobjects/CaloHits.h"
15 
16 // EventAnalysis headers
17 #include "algorithm/Algorithm.h"
18 
19 // C++ header
20 #include <random>
21 
22 using namespace EA;
23 
24 namespace Herd {
25 
26 // clang-format off
67 // clang-format on
68 class CaloPDCalibrationAlgo : public Algorithm {
69 public:
74  CaloPDCalibrationAlgo(const std::string &name);
75 
80  bool Initialize() override;
81 
86  bool Process() override;
87 
88 private:
89  // produced objects
90  std::shared_ptr<CaloHits> _caloLPDHitsGeV;
91  std::shared_ptr<CaloHits> _caloSPDHitsGeV;
92  std::shared_ptr<CaloHits> _caloHitsGeV;
93 
94  // consumed global objects
95  observer_ptr<CaloPDChannelInfo> _caloLPDChannelInfo;
96  observer_ptr<CaloPDChannelInfo> _caloSPDChannelInfo;
97 
98  float _MIPtoGeV;
99  bool _calibrateStitchedRange, _calibrateSinglePDs;
100 
101  StorePtr _evStore, _globStore;
102 
113  void CalibrateHit(unsigned int iVect, unsigned int ID, float eDepADC, CaloPDEventChannelInfo::Flag channelLPDFlags,
114  CaloPDEventChannelInfo::Flag channelSPDFlags, bool LPD);
115 };
116 
117 } // namespace Herd
118 
119 #endif /* HERD_CALOPDCALIBRATIONALGO_H_ */
CssGeoParams.h CssGeoParams class declaration.
Definition: CaloPDCalibrationAlgo.h:24
StorePtr _globStore
Definition: CaloPDCalibrationAlgo.h:101
Algorithm which converts calo PD hit from ADC to GeV.
Definition: CaloPDCalibrationAlgo.h:68
float _MIPtoGeV
Definition: CaloPDCalibrationAlgo.h:98
bool _calibrateStitchedRange
Definition: CaloPDCalibrationAlgo.h:99
observer_ptr< CaloPDChannelInfo > _caloSPDChannelInfo
Definition: CaloPDCalibrationAlgo.h:96
std::shared_ptr< CaloHits > _caloLPDHitsGeV
Definition: CaloPDCalibrationAlgo.h:90
std::shared_ptr< CaloHits > _caloSPDHitsGeV
Definition: CaloPDCalibrationAlgo.h:91
std::shared_ptr< CaloHits > _caloHitsGeV
Definition: CaloPDCalibrationAlgo.h:92
Flag
Enum used as index for the bitset member LSB rappresents the Gain: 1 -> high gain; 0 -> low gain...
Definition: CaloPDEventChannelInfo.h:45
observer_ptr< CaloPDChannelInfo > _caloLPDChannelInfo
Definition: CaloPDCalibrationAlgo.h:95