HerdSoftware  0.1.1
FitDigitizerAlgo.h
Go to the documentation of this file.
1 /*
2  * FitDigitizerAlgo.h
3  *
4  * Created on: 20 Feb 2020
5  * Author: Valerio Formato (based on code by Junjing Wang)
6  */
7 
8 #ifndef HERD_FITDIGITIZERALGO_H_
9 #define HERD_FITDIGITIZERALGO_H_
10 
11 // HerdSoftware headers
21 
22 // EventAnalysis headers
23 #include "algorithm/Algorithm.h"
24 
25 using namespace EA;
26 
27 namespace Herd {
28 
29 // clang-format off
74 // clang-format on
75 
76 class FitDigitizerAlgo : public Algorithm {
77 public:
82  FitDigitizerAlgo(const std::string &name);
83 
88  bool Initialize() override;
89 
96  bool Process() override;
97 
98 private:
99  StorePtr _evStore, _globStore;
100 
102  observer_ptr<FitGeoParamsColl> _origFitGeoParamsColl;
103  std::shared_ptr<FitGeoParamsColl> _digFitGeoParamsColl;
104  std::shared_ptr<FitChannelInfoColl> _digFitChannelInfoColl;
105 
106  FitGeoParams _CreateGeoParams(const FitGeoParams &origGeoParams);
107  FitChannelInfo _CreateChannelInfo(const FitGeoParams &digGeoParams);
108  std::vector<float> _GenerateSipmGains(const FitGeoParams &digGeoParams);
109 
111 
112  // Parameters
113  bool _publishChannelInfo = true;
114  bool _simulateNoise = true;
115  bool _simulateIntraChannelXTalk = true;
116  unsigned int _nTopMatsPerLayer = 11;
117  unsigned int _nSideShortMatsPerLayer = 10;
118  unsigned int _nSideLongMatsPerLayer = 7;
119 
120  double _sipmGainVariation = 0.0125; // relative fluctuation of the gain
121  double _adcNoise = 0.1; // Sigma of the noise in the electronics ADC conversion
122 
123  // utility tools
124  std::unique_ptr<FitDigitizationTools::PhotonTool> m_photonTool;
125  std::unique_ptr<FitDigitizationTools::DistributionFiberTool> m_distrFiberTool;
126  std::unique_ptr<FitDigitizationTools::SiPMTool> m_sipmTool;
127 
128  std::mt19937 m_generator;
129  std::normal_distribution<double> m_gauss_dist;
130 };
131 
132 } // namespace Herd
133 
134 #endif /* HERD_PSDGEOMETRICDIGITIZERALGO_H_ */
CssGeoParams.h CssGeoParams class declaration.
Definition: CaloPDCalibrationAlgo.h:24
Definition: FitChannelInfo.h:19
std::shared_ptr< FitChannelInfoColl > _digFitChannelInfoColl
Definition: FitDigitizerAlgo.h:104
std::normal_distribution< double > m_gauss_dist
Definition: FitDigitizerAlgo.h:129
Data structure for single silicon layer geometry parameters.
Definition: FitGeoParams.h:64
SidesArray< std::vector< std::vector< float > > > m_sipmGains
Definition: FitDigitizerAlgo.h:110
std::mt19937 m_generator
Definition: FitDigitizerAlgo.h:128
observer_ptr< FitGeoParamsColl > _origFitGeoParamsColl
Definition: FitDigitizerAlgo.h:102
std::unique_ptr< FitDigitizationTools::PhotonTool > m_photonTool
Definition: FitDigitizerAlgo.h:124
StorePtr _globStore
Definition: FitDigitizerAlgo.h:99
Algorithm that digitizes the Monte Carlo FIT hits simulating the response of the SIPM reading...
Definition: FitDigitizerAlgo.h:76
std::shared_ptr< FitGeoParamsColl > _digFitGeoParamsColl
Definition: FitDigitizerAlgo.h:103
std::unique_ptr< FitDigitizationTools::DistributionFiberTool > m_distrFiberTool
Definition: FitDigitizerAlgo.h:125
std::unique_ptr< FitDigitizationTools::SiPMTool > m_sipmTool
Definition: FitDigitizerAlgo.h:126
FitHitsColl _fitParticleHitsColl
Definition: FitDigitizerAlgo.h:101