ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
B0TrackFastSimEval.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file B0TrackFastSimEval.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
9 #ifndef G4TRACKFASTSIM_B0TRACKFASTSIMEVAL_H
10 #define G4TRACKFASTSIM_B0TRACKFASTSIMEVAL_H
11 
12 #include <fun4all/SubsysReco.h>
13 
14 #include <map>
15 #include <string>
16 #include <vector>
17 
18 //Forward declarations
19 class PHCompositeNode;
21 class SvtxTrackMap;
22 class SvtxVertexMap;
23 class TTree;
24 class TH2D;
25 
26 //Brief: basic ntuple and histogram creation for sim evaluation
28 {
29  public:
30  //Default constructor
31  B0TrackFastSimEval(const std::string& name = "B0TrackFastSimEval",
32  const std::string& filename = "g4eval.root",
33  const std::string& trackmapname = "SvtxTrackMap");
34 
35  //Initialization, called for initialization
36  int Init(PHCompositeNode*) override;
37 
38  //Initialization, called for initialization
39  int InitRun(PHCompositeNode*) override;
40 
41  //Process Event, called for each event
42  int process_event(PHCompositeNode*) override;
43 
44  //End, write and close files
45  int End(PHCompositeNode*) override;
46 
47  //Change output filename
48  void set_filename(const std::string& file)
49  {
51  }
52 
53  // set the name of the node with the trackmap
54  void set_trackmapname(const std::string& name)
55  {
57  }
58 
59  //User modules
60  void reset_variables();
61 
62  void AddProjection(const std::string& name);
63 
64  private:
67 
68  //Get all the nodes
70 
71  //Node pointers
75 
76  //TTrees
79 
80  //Histos
83 
84  //Event counter
86 
87  // TTree variables
89  //-- truth
92  float m_TTree_gpx;
93  float m_TTree_gpy;
94  float m_TTree_gpz;
95  float m_TTree_gvx;
96  float m_TTree_gvy;
97  float m_TTree_gvz;
98  float m_TTree_gvt;
99 
100  //-- reco
104  float m_TTree_px;
105  float m_TTree_py;
106  float m_TTree_pz;
111  float m_TTree_layer[4];
112 
114 
115  //vertex
116  float m_TTree_vx;
117  float m_TTree_vy;
118  float m_TTree_vz;
124 
125  //output filename
126  std::string m_OutFileName;
127 
128  //name of SvtxTrackMap collection
129  std::string m_TrackMapName;
130 
131  // names and index of projections
132  std::map<std::string, unsigned int> m_ProjectionNameMap;
133  // projections to cylinders and planes
134  std::vector<std::vector<float>> m_TTree_proj_vec;
135  std::vector<std::vector<float>> m_TTree_proj_p_vec;
136  // hits on reference cylinders and planes
137  std::vector<std::vector<float>> m_TTree_ref_vec;
138  std::vector<std::vector<float>> m_TTree_ref_p_vec;
139 };
140 
141 #endif //* G4TRACKFASTSIM_PHG4TRACKFASTSIMEVAL_H *//