HerdSoftware  0.2.3
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
77 // clang-format on
78 
79 class FitDigitizerAlgo : public Algorithm {
80 public:
85  FitDigitizerAlgo(const std::string &name);
86 
91  bool Initialize() override;
92 
99  bool Process() override;
100 
101 private:
102  StorePtr m_evStore, m_globStore;
103 
105  observer_ptr<FitGeoParamsColl> m_origFitGeoParamsColl;
106  std::shared_ptr<FitGeoParamsColl> m_digFitGeoParamsColl;
107  std::shared_ptr<FitChannelInfoColl> m_digFitChannelInfoColl;
108 
109  FitGeoParams createGeoParams(const FitGeoParams &origGeoParams);
110  FitChannelInfo createChannelInfo(const FitGeoParams &digGeoParams);
111  std::vector<float> generateSipmGains(const FitGeoParams &digGeoParams);
112 
114 
115  // Parameters
116  bool m_publishChannelInfo = true;
117  bool m_simulateNoise = true;
118  bool m_simulateIntraChannelXTalk = true;
119  unsigned int m_nTopMatsPerLayer = 11;
120  unsigned int m_nSideShortMatsPerLayer = 10;
121  unsigned int m_nSideLongMatsPerLayer = 7;
122  float m_topMatsSize = defaultValue<float>;
123  float m_sideShortMatsSize = defaultValue<float>;
124  float m_sideLongMatsSize = defaultValue<float>;
125 
126  double m_sipmGainVariation = 0.0125; // relative fluctuation of the gain
127  double m_adcNoise = 0.1; // Sigma of the noise in the electronics ADC conversion
128 
129  // utility tools
130  std::unique_ptr<FitDigitizationTools::PhotonTool> m_photonTool;
131  std::unique_ptr<FitDigitizationTools::DistributionFiberTool> m_distrFiberTool;
132  std::unique_ptr<FitDigitizationTools::SiPMTool> m_sipmTool;
133 
134  std::mt19937 m_generator;
135  std::normal_distribution<double> m_gauss_dist;
136 };
137 
138 } // namespace Herd
139 
140 #endif /* HERD_PSDGEOMETRICDIGITIZERALGO_H_ */
CssGeoParams.h CssGeoParams class declaration.
Definition: CaloPDCalibrationAlgo.h:24
Definition: FitChannelInfo.h:19
std::normal_distribution< double > m_gauss_dist
Definition: FitDigitizerAlgo.h:135
Data structure for single silicon layer geometry parameters.
Definition: FitGeoParams.h:64
SidesArray< std::vector< std::vector< float > > > m_sipmGains
Definition: FitDigitizerAlgo.h:113
std::mt19937 m_generator
Definition: FitDigitizerAlgo.h:134
observer_ptr< FitGeoParamsColl > m_origFitGeoParamsColl
Definition: FitDigitizerAlgo.h:105
std::unique_ptr< FitDigitizationTools::PhotonTool > m_photonTool
Definition: FitDigitizerAlgo.h:130
Algorithm that digitizes the Monte Carlo FIT hits simulating the response of the SIPM reading...
Definition: FitDigitizerAlgo.h:79
std::shared_ptr< FitGeoParamsColl > m_digFitGeoParamsColl
Definition: FitDigitizerAlgo.h:106
std::shared_ptr< FitChannelInfoColl > m_digFitChannelInfoColl
Definition: FitDigitizerAlgo.h:107
std::unique_ptr< FitDigitizationTools::DistributionFiberTool > m_distrFiberTool
Definition: FitDigitizerAlgo.h:131
std::unique_ptr< FitDigitizationTools::SiPMTool > m_sipmTool
Definition: FitDigitizerAlgo.h:132
FitHitsColl m_fitParticleHitsColl
Definition: FitDigitizerAlgo.h:104
StorePtr m_globStore
Definition: FitDigitizerAlgo.h:102