Analysis Software
Documentation for sPHENIX simulation 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, std::vector<double> userrange_copy);
37 
38  private:
40 
41  void DigitizeLadderCells(PHCompositeNode *topNode);
42 
43  // noise electrons
44  float added_noise();
45 
47 
48  float mNoiseMean = 457.2; // Mean of noise electron distribution
49  float mNoiseSigma = 166.6; // Sigma of noise electron distribution
50  float mEnergyPerPair = 3.62e-9; // GeV/e-h pair
51 
52  // settings
53  std::map<int, unsigned int> _max_adc;
54  std::map<int, float> _energy_scale;
55 
56  // storage
57  //SvtxHitMap *_hitmap;
58 
59  const unsigned int nadcbins = 8;
60  std::map<int, std::vector<double>> _max_fphx_adc;
61 
62  unsigned int m_nCells = 0;
63  unsigned int m_nDeadCells = 0;
64 
66  gsl_rng *RandomGenerator = nullptr;
67 };
68 
69 #endif