ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4InttDigitizer.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4InttDigitizer.h
1 #ifndef G4INTT_PHG4INTTDIGITIZER_H
2 #define G4INTT_PHG4INTTDIGITIZER_H
3 
4 #include <phparameter/PHParameterInterface.h>
5 
6 #include <fun4all/SubsysReco.h>
7 
8 #include <gsl/gsl_rng.h>
9 
10 #include <map>
11 #include <string> // for string
12 #include <utility> // for pair
13 #include <vector>
14 
15 class PHCompositeNode;
16 
18 {
19  public:
20  PHG4InttDigitizer(const std::string &name = "PHG4InttDigitizer");
21  ~PHG4InttDigitizer() override;
22 
24  int InitRun(PHCompositeNode *topNode) override;
25 
27  int process_event(PHCompositeNode *topNode) override;
28 
30  int End(PHCompositeNode *topNode) override;
31 
32  void SetDefaultParameters() override;
33 
34  void Detector(const std::string &d) { detector = d; }
35 
36  void set_adc_scale(const int &layer, const std::vector<double> &userrange);
37 
38  private:
40 
41  void DigitizeLadderCells(PHCompositeNode *topNode);
42 
43  std::string detector;
44  // noise electrons
45  float added_noise();
46 
47  float mNoiseMean; // Mean of noise electron distribution
48  float mNoiseSigma; // Sigma of noise electron distribution
49  float mEnergyPerPair; // GeV/e-h pair
50 
51  // settings
52  std::map<int, unsigned int> _max_adc;
53  std::map<int, float> _energy_scale;
54 
55  // storage
56  //SvtxHitMap *_hitmap;
57 
58  const unsigned int nadcbins = 8;
59  std::map<int, std::vector<std::pair<double, double> > > _max_fphx_adc;
60 
61  unsigned int m_nCells;
62  unsigned int m_nDeadCells;
63 
65  gsl_rng *RandomGenerator;
66 };
67 
68 #endif