ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
eIDMLInterface.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file eIDMLInterface.h
1 #ifndef eIDMLInterface_H__
2 #define eIDMLInterface_H__
3 
4 #include <fun4all/SubsysReco.h>
5 
8 class PHCompositeNode;
9 class TFile;
10 class TTree;
11 class TH1;
12 class TH2;
13 class PHCompositeNode;
15 class RawCluster;
16 class SvtxTrackMap;
17 class JetMap;
18 class GlobalVertex;
19 class PHHepMCGenEventMap;
20 class JetEvalStack;
21 class JetRecoEval;
23 class PHHepMCGenEvent;
24 class CaloTriggerInfo;
25 class JetTruthEval;
26 class JetEvalStack;
27 class SvtxEvalStack;
28 
29 #include <map>
30 #include <utility>
31 #include <vector>
32 
34 class eIDMLInterface : public SubsysReco
35 {
36  public:
38  eIDMLInterface(const std::vector<std::string> &names = {"BECAL"},
39  const std::string &fname = "eIDMLInterface.root");
40 
41  // Destructor
42  virtual ~eIDMLInterface();
43 
45  int Init(PHCompositeNode *);
46 
49 
51  int End(PHCompositeNode *);
52 
54  void setMinJetPt(float minjetpt) { m_minjetpt = minjetpt; }
55 
57  void setMinClusPt(float mincluspt) { m_mincluspt = mincluspt; }
58 
64 
65  void setEtaRange(double min, double max)
66  {
67  m_etaRange.first = min;
68  m_etaRange.second = max;
69  }
70 
71  private:
72  std::pair<double, double> m_etaRange{-.5, .5};
73  // eval stack
75  ;
76 
77  std::vector<std::string> _calo_names;
78 
79  struct CaloData
80  {
81  std::vector<float> m_TTree_proj_vec = {0, 0, 0, 0};
82  std::vector<float> m_TTree_proj_p_vec = {0, 0, 0};
83  static const int m_sizeTowerPatch = 7;
85  std::vector<float> m_TTree_Tower_dEta = std::vector<float>(m_sizeTowerPatch * m_sizeTowerPatch, 0);
86  std::vector<float> m_TTree_Tower_dPhi = std::vector<float>(m_sizeTowerPatch * m_sizeTowerPatch, 0);
87  std::vector<int> m_TTree_Tower_iEta_patch = std::vector<int>(m_sizeTowerPatch * m_sizeTowerPatch, 0);
88  std::vector<int> m_TTree_Tower_iPhi_patch = std::vector<int>(m_sizeTowerPatch * m_sizeTowerPatch, 0);
89  std::vector<float> m_TTree_Tower_E = std::vector<float>(m_sizeTowerPatch * m_sizeTowerPatch, 0);
90  float m_E3x3 = 0;
91  float m_E5x5 = 0;
92  float m_E7x7 = 0;
95 
96  void initializeVariables();
97  };
98 
99  std::map<std::string, CaloData> m_CaloDataMap;
100 
102  std::string m_outfilename;
103 
106 
108  float m_minjetpt;
109 
111  float m_mincluspt;
112 
115 
118 
121 
124 
126  TFile *m_outfile;
128  TTree *m_tracktree;
129  TTree *m_hepmctree;
130  TTree *m_truthtree;
133  TH1 *m_phi_h;
135 
137 
139  void getTracks(PHCompositeNode *topNode);
140  void getTruthJets(PHCompositeNode *topNode);
141  void getReconstructedJets(PHCompositeNode *topNode);
142  void getEMCalClusters(PHCompositeNode *topNode);
143  void getHEPMCTruth(PHCompositeNode *topNode);
144  void getPHG4Truth(PHCompositeNode *topNode);
145 
146  void initializeVariables();
147  void initializeTrees();
148 
153 
156  double m_x1;
157  double m_x2;
158  int m_mpi;
161  double m_trutheta;
162  double m_truthphi;
163  double m_truthpx;
164  double m_truthpy;
165  double m_truthpz;
166  double m_truthpt;
167  double m_truthp;
170 
172  double m_tr_px;
173  double m_tr_py;
174  double m_tr_pz;
175  double m_tr_p;
176  double m_tr_pt;
177  double m_tr_phi;
178  double m_tr_eta;
179  int m_charge;
180  double m_chisq;
181  int m_ndf;
182  double m_dca;
183  double m_tr_x;
184  double m_tr_y;
185  double m_tr_z;
199 
201  double m_recojetpt;
203  double m_recojetpx;
204  double m_recojetpy;
205  double m_recojetpz;
206  double m_recojetphi;
207  double m_recojetp;
209  double m_recojeteta;
211  double m_truthjetp;
214  double m_truthjetpt;
216  double m_truthjetpx;
217  double m_truthjetpy;
218  double m_truthjetpz;
219  double m_dR;
220 
222  double m_clusenergy;
223  double m_cluseta;
224  double m_clustheta;
225  double m_cluspt;
226  double m_clusphi;
227  double m_cluspx;
228  double m_cluspy;
229  double m_cluspz;
230  double m_E_4x4;
231 };
232 
233 #endif