EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4TpcPadPlaneReadout.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4TpcPadPlaneReadout.h
1 #ifndef G4TPC_PHG4TPCPADPLANEREADOUT_H
2 #define G4TPC_PHG4TPCPADPLANEREADOUT_H
3 
4 #include "PHG4TpcPadPlane.h"
5 
7 
8 #include <gsl/gsl_rng.h>
9 
10 #include <array>
11 #include <climits>
12 #include <cmath>
13 #include <string> // for string
14 #include <vector>
15 
16 class PHCompositeNode;
17 class PHG4CellContainer;
20 class TNtuple;
22 class TrkrHitTruthAssoc;
23 
25 {
26  public:
27  PHG4TpcPadPlaneReadout(const std::string &name = "PHG4TpcPadPlaneReadout");
28 
29  ~PHG4TpcPadPlaneReadout() override;
30 
32 
33  void MapToPadPlane(PHG4CellContainer *g4cells, const double x_gem, const double y_gem, const double t_gem, PHG4HitContainer::ConstIterator hiter, TNtuple *ntpad, TNtuple *nthit) override;
34 
35  void MapToPadPlane(TrkrHitSetContainer *single_hitsetcontainer, TrkrHitSetContainer *hitsetcontainer, TrkrHitTruthAssoc *hittruthassoc, const double x_gem, const double y_gem, const double t_gem, PHG4HitContainer::ConstIterator hiter, TNtuple *ntpad, TNtuple *nthit) override;
36 
37  void SetDefaultParameters() override;
38  void UpdateInternalParameters() override;
39 
40  private:
41  void populate_rectangular_phibins(const unsigned int layernum, const double phi, const double cloud_sig_rp, std::vector<int> &pad_phibin, std::vector<double> &pad_phibin_share);
42  void populate_zigzag_phibins(const unsigned int layernum, const double phi, const double cloud_sig_rp, std::vector<int> &pad_phibin, std::vector<double> &pad_phibin_share);
43  void populate_zbins(const double z, const std::array<double, 2> &cloud_sig_zz, std::vector<int> &adc_zbin, std::vector<double> &adc_zbin_share);
44 
45  std::string seggeonodename;
46 
49 
50  double rad_gem = NAN;
51  double output_radius = 0;
52 
53  static const unsigned int print_layer = 18;
54 
56 
57  std::array<int, 3> MinLayer;
58  std::array<double, 3> MinRadius;
59  std::array<double, 3> MaxRadius;
60  std::array<double, 3> Thickness;
61  double MinZ = NAN;
62  double MaxZ = NAN;
63  double sigmaT = NAN;
64  std::array<double, 2> sigmaL;
65  std::array<double, 3> PhiBinWidth;
66  double ZBinWidth = NAN;
67  double tpc_drift_velocity = NAN;
68  double tpc_adc_clock = NAN;
69 
70  int NZBins = INT_MAX;
71  std::array<int, 3> NPhiBins;
72  std::array<int, 3> NTpcLayers;
73  int zigzag_pads = INT_MAX;
74  int hit = 0;
75 
76  // gaussian sampling
77  static constexpr double _nsigmas = 5;
78 
79  double averageGEMGain = NAN;
80 
81  std::vector<int> adc_zbin;
82  std::vector<int> pad_phibin;
83  std::vector<double> pad_phibin_share;
84  std::vector<double> adc_zbin_share;
85 
86  // return random distribution of number of electrons after amplification of GEM for each initial ionizing electron
88  gsl_rng *RandomGenerator;
89 };
90 
91 #endif