Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4MicromegasHitReco.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4MicromegasHitReco.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 
4 #ifndef G4MICROMEGAS_PHG4MICROMEGASHITRECO_H
5 #define G4MICROMEGAS_PHG4MICROMEGASHITRECO_H
6 
12 #include <phparameter/PHParameterInterface.h>
13 
14 #include <fun4all/SubsysReco.h>
15 
16 #include <gsl/gsl_rng.h>
17 #include <memory>
18 #include <string>
19 #include <utility>
20 #include <vector>
21 
22 class ActsGeometry;
23 
25 class PHCompositeNode;
26 class PHG4Hit;
27 class TVector2;
28 
30 {
31  public:
32  explicit PHG4MicromegasHitReco(const std::string& name = "PHG4MicromegasHitReco");
33 
35  int InitRun(PHCompositeNode*) override;
36 
38  int process_event(PHCompositeNode*) override;
39 
41  void SetDefaultParameters() override;
42 
43  private:
46  {
47  return "CYLINDERGEOM_MICROMEGAS_FULL";
48  }
49 
51 
52  uint get_primary_electrons(PHG4Hit*) const;
53 
56 
58  using charge_pair_t = std::pair<int, double>;
59 
61  using charge_list_t = std::vector<charge_pair_t>;
62 
64  charge_list_t distribute_charge(CylinderGeomMicromegas*, uint tileid, const TVector2& local_position, double sigma) const;
65 
68 
70  double m_tmin = -20;
71 
73  double m_tmax = 800;
74 
76  double m_electrons_per_gev = 0;
77 
79  double m_gain = 0;
80 
82  double m_cloud_sigma = 0.04;
83 
85  double m_diffusion_trans = 0.03;
86 
88 
91 
93  class Deleter
94  {
95  public:
97  void operator()(gsl_rng* rng) const { gsl_rng_free(rng); }
98  };
99 
101 
102  std::unique_ptr<gsl_rng, Deleter> m_rng;
103 };
104 
105 #endif