Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TruthCaloTree.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TruthCaloTree.h
1 // Truth Calorimeter Calibration TreeMaker
2 
3 #ifndef __TRUTHCALOTREE_H__
4 #define __TRUTHCALOTREE_H__
5 
6 #include <fun4all/SubsysReco.h>
7 #include <string>
8 #include <vector>
9 #include <map>
10 #include "TTree.h"
11 #include "TFile.h"
12 #include "TH2.h"
13 #include <set>
14 
16 #include <phool/PHCompositeNode.h>
17 #include <g4main/PHG4Hit.h>
19 
20 #include <calobase/RawTowerGeomContainer_Cylinderv1.h>
21 #include <calobase/RawTowerGeomContainer.h>
22 #include <calobase/RawTowerContainer.h>
23 
24 class PHCompositeNode;
25 class RawTowerContainer;
28 class PHG4HitContainer;
29 
30 class TruthCaloTree: public SubsysReco {
31  public:
32 
33  TruthCaloTree(const std::string &name = "TruthCaloTree.root");
34 
35  virtual ~TruthCaloTree() {}
36 
37  int Init(PHCompositeNode *);
38 
39  int reset_tree_vars();
40 
42 
44 
45  int End(PHCompositeNode *);
46 
47  private:
48  std::string _foutname; // outfile name
52 
62 
63  TTree* _tree;
64  TFile* _file;
65 
67 
68  static const bool _debug = false;
69  static const int nTowers = 10000;
70  static const int nTruth = 100000;
71  static const int nTruths = 100000;
72  static const bool recursive_shower = false;
73 
74  // outer Hcal
75 
82 
83  // inner HCal
84 
85  int _b_hcalIN_sim_n = 0;
91 
92  // EMCal
93 
94  int _b_EMcal_sim_n = 0;
100 
101  // Primary truth particles
102 
103  int _b_n_truth = 0;
111 
112  // Secondary truth particles
113 
114  int n_child = 0;
118  float child_px[nTruth];
119  float child_py[nTruth];
120  float child_pz[nTruth];
122 
123  // Truth particle vertices
124 
125  int n_vertex = 0;
127  float vertex_x[nTruth];
128  float vertex_y[nTruth];
129  float vertex_z[nTruth];
130 
131  // BH particles
132 
133  int _nBH = 0;
134  float _BH_e[nTruth];
135  float _BH_px[nTruth];
136  float _BH_py[nTruth];
137  float _BH_pz[nTruth];
139 
140 };
141 
142 #endif