EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4MvtxDigitizer.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4MvtxDigitizer.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 
4 #ifndef G4MVTX_PHG4MVTXDIGITIZER_H
5 #define G4MVTX_PHG4MVTXDIGITIZER_H
6 
7 #include <fun4all/SubsysReco.h>
8 
9 #include <gsl/gsl_rng.h>
10 
11 #include <map>
12 #include <string> // for string
13 #include <utility> // for pair, make_pair
14 #include <vector>
15 
16 
17 class PHCompositeNode;
18 
20 {
21  public:
22  PHG4MvtxDigitizer(const std::string &name = "PHG4MvtxDigitizer");
23  ~PHG4MvtxDigitizer() override;
24 
26  int Init(PHCompositeNode */*topNode*/) override { return 0; }
27 
29  int InitRun(PHCompositeNode *topNode) override;
30 
32  int process_event(PHCompositeNode *topNode) override;
33 
35  int End(PHCompositeNode */*topNode*/) override { return 0; };
36 
37  void set_adc_scale(const int layer, const unsigned short max_adc, const float energy_per_adc)
38  {
39  _max_adc.insert(std::make_pair(layer, max_adc));
40  _energy_scale.insert(std::make_pair(layer, energy_per_adc));
41  }
42 
43  void set_energy_threshold(const float threshold)
44  {
45  _energy_threshold = threshold;
46  }
47 
49 
50  private:
53 
54  std::vector<float> adc_input;
55  std::vector<int> is_populated;
56 
57  // settings
58  std::map<int, unsigned short> _max_adc;
59  std::map<int, float> _energy_scale;
61 
63  gsl_rng *RandomGenerator;
64 };
65 
66 #endif