Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TpcSpaceChargeReconstruction.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TpcSpaceChargeReconstruction.h
1 #ifndef TPCCALIB_TPCSPACECHARGERECONSTRUCTION_H
2 #define TPCCALIB_TPCSPACECHARGERECONSTRUCTION_H
3 
8 #include <fun4all/SubsysReco.h>
9 #include <phparameter/PHParameterInterface.h>
15 
20 
21 #include <TString.h>
22 
23 #include <memory>
24 #include <vector>
25 
26 // forward declaration
27 class ActsGeometry;
28 
29 class SvtxTrack;
30 class SvtxTrackMap;
32 class TrkrCluster;
34 
35 class TFile;
36 class TH1;
37 class TH2;
38 
54 {
55  public:
56 
58  TpcSpaceChargeReconstruction( const std::string& = "TPCSPACECHARGERECONSTRUCTION" );
59 
61 
62 
65  { m_use_micromegas = value; }
66 
68  void set_min_pt( double value )
69  { m_min_pt = value; }
70 
72 
76  void set_grid_dimensions( int phibins, int rbins, int zbins );
77 
78 
81 
83  void set_histogram_outputfile(const std::string &outputfile) {m_histogramfilename = outputfile;}
84 
86 
90  { m_outputfile = filename; }
91 
93 
95  int Init(PHCompositeNode*) override;
96 
98  int InitRun(PHCompositeNode*) override;
99 
101  int process_event(PHCompositeNode*) override;
102 
104  int End(PHCompositeNode*) override;
105 
107  void SetDefaultParameters() override;
108 
109  private:
110 
112  int load_nodes( PHCompositeNode* );
113 
115  void create_histograms();
116 
118 
122  Acts::Vector3 get_global_position(TrkrDefs::cluskey, TrkrCluster*, short int /* crossing */) const;
123 
125  void process_tracks();
126 
128  bool accept_track( SvtxTrack* ) const;
129 
131  void process_track( SvtxTrack* );
132 
134  int get_cell_index( const Acts::Vector3& );
135 
137  int m_event = 0;
138 
140  std::string m_outputfile = "TpcSpaceChargeMatrices.root";
141 
143  bool m_use_micromegas = true;
144 
146  double m_min_pt = 0.5;
147 
150 
152 
153  // residual cuts in r, phi plane
154  float m_max_talpha = 0.6;
155  float m_max_drphi = 0.5;
156 
157  // residual cuts in r, z plane
158  float m_max_tbeta = 1.5;
159  float m_max_dz = 0.5;
161 
164 
166  std::unique_ptr<TpcSpaceChargeMatrixContainer> m_matrix_container;
167 
169 
170  int m_total_tracks = 0;
172 
176 
177 
179 
180 
181  bool m_savehistograms = false;
182 
184  std::string m_histogramfilename = "TpcSpaceChargeReconstruction.root";
185  std::unique_ptr<TFile> m_histogramfile;
186 
187  using TH1_map_t = std::map<int,TH1*>;
188  using TH2_map_t = std::map<int,TH2*>;
189 
195 
197 
200 
201  // crossing z correction
203 
204  // distortion corrections
208 
212 
213 };
214 
215 #endif