EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4TpcDirectLaser.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4TpcDirectLaser.h
1 #ifndef G4TPC_PHG4TPCDIRECTLASER_H
2 #define G4TPC_PHG4TPCDIRECTLASER_H
3 
4 #include <fun4all/SubsysReco.h>
5 
6 #include <phparameter/PHParameterInterface.h>
7 
8 #include <TVector3.h>
9 
10 #include <cmath>
11 #include <string> // for string, allocator
12 #include <vector> // for vector
13 
14 class PHG4HitContainer;
15 class SvtxTrackMap;
17 class PHCompositeNode;
18 
20 {
21  public:
23  PHG4TpcDirectLaser(const std::string &name = "PHG4TpcDirectLaser");
24 
26  ~PHG4TpcDirectLaser() override = default;
27 
29  int InitRun(PHCompositeNode *) override;
30 
32  int process_event(PHCompositeNode *) override;
33 
35  void SetDefaultParameters() override;
36 
38  void Detector(const std::string &d)
39  {
40  detector = d;
41  }
42 
44  void SetPhiStepping(int n, double min, double max);
45 
47  void SetThetaStepping(int n, double min, double max);
48 
50  int GetNpatternSteps() const
51  {
52  return nPhiSteps * nThetaSteps;
53  };
54 
57  {
59  }
60 
63  {
65  };
66 
67  private:
69  /* by default there are 4 lasers on each side of the TPC */
70  void SetupLasers();
71 
73  void AimToThetaPhi(double theta, double phi);
74 
76  void AimToPatternStep(int n);
77 
79  void AimToNextPatternStep();
80 
82  class Laser
83  {
84  public:
86  TVector3 m_position;
87 
89  double m_phi = 0;
90 
92  int m_direction = 1;
93  };
94 
96  void AppendLaserTrack(double theta, double phi, const Laser &);
97 
99  std::string detector = "TPC";
100 
102  std::string hitnodename;
103 
105  std::vector<Laser> m_lasers;
106 
108  int electrons_per_cm = 300;
109 
110  // number of electrons per deposited GeV in TPC gas
116  double electrons_per_gev = NAN;
117 
119 
120  int nPhiSteps = 1;
121  int nThetaSteps = 1;
122  int nTotalSteps = 1;
123  double minPhi = 0;
124  double maxPhi = 0;
125  double minTheta = 0;
126  double maxTheta = 0;
128 
129  // current patter step
131 
134 
137 
140 
142  std::string m_track_map_name = "SvtxTrackMap";
144 };
145 
146 #endif