Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4TpcDistortion.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4TpcDistortion.h
1 // $Id: $
2 
11 #ifndef G4TPC_PHG4TPCDISTORTION_H
12 #define G4TPC_PHG4TPCDISTORTION_H
13 
14 #include <memory>
15 #include <string>
16 
17 class TFile;
18 class TH3;
19 class TTree;
20 
23 {
24  public:
26  explicit PHG4TpcDistortion() = default;
27 
29 
30 
32  double get_x_distortion_cartesian(double x, double y, double z) const;
33 
35  double get_y_distortion_cartesian(double x, double y, double z) const;
36 
38  double get_z_distortion_cartesian(double x, double y, double z) const;
39 
41  double get_r_distortion(double r, double phi, double z) const;
42 
44  double get_rphi_distortion(double r, double phi, double z) const;
45 
47  double get_z_distortion(double r, double phi, double z) const;
48 
49  //The ReachesReadout serves as a fourth axis in the distortion histogram
50  double get_reaches_readout(double r, double phi, double z) const;
51 
53  int Verbosity() const
54  {
55  return verbosity;
56  }
57 
59 
61 
62 
65  {
67  }
68 
71  {
73  }
74 
77  {
79  }
80 
83  {
85  }
86 
87  void set_read_phi_as_radians(bool flag=true){
89  }
90 
92  void Init();
93 
95  void load_event(int event_num);
96 
98  void Verbosity(const int ival)
99  {
100  verbosity = ival;
101  }
102 
104 
105  private:
107  double get_distortion(char axis, double r, double phi, double z) const;
108 
110  int verbosity = 0;
111 
114 
115 
117 
120  std::unique_ptr<TFile> m_static_tfile;
121  TH3 *hDRint[2] = {nullptr, nullptr};
122  TH3 *hDPint[2] = {nullptr, nullptr};
123  TH3 *hDZint[2] = {nullptr, nullptr};
124  TH3 *hReach[2] = {nullptr, nullptr};
126 
128 
131  std::unique_ptr<TFile> m_time_ordered_tfile;
132  TTree *TimeTree = nullptr;
133  TH3 *TimehDR[2] = {nullptr, nullptr};
134  TH3 *TimehDP[2] = {nullptr, nullptr};
135  TH3 *TimehDZ[2] = {nullptr, nullptr};
136  TH3 *TimehRR[2] = {nullptr, nullptr};
138 };
139 
140 #endif /* G4TPC_PHG4TPCDISTORTION_H */