Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PhotonJet.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PhotonJet.h
1 #ifndef __PHOTONJET_H__
2 #define __PHOTONJET_H__
3 
4 #include <fun4all/SubsysReco.h>
5 #include <vector>
6 
7 #include <TFile.h>
8 #include <TH1.h>
9 #include <TH2.h>
10 #include <TMath.h>
11 #include <TTree.h>
12 
13 class PHCompositeNode;
15 class RawTowerContainer;
16 class RawCluster;
17 class SvtxTrackMap;
18 class JetMap;
19 class GlobalVertex;
20 class PHHepMCGenEventMap;
21 class JetEvalStack;
22 class JetRecoEval;
23 class SvtxTrackEval;
25 class PHHepMCGenEvent;
26 class CaloTriggerInfo;
27 class JetTruthEval;
28 
29 class PhotonJet : public SubsysReco
30 {
31  public:
32  PhotonJet(const std::string &name = "photonjet.root");
34  double minjetpt;
38  int etalow;
39  int etahigh;
42  int is_AA;
43  double mindp_pt;
44 
45  int Init(PHCompositeNode *);
47  int End(PHCompositeNode *);
48 
49  void use_trigger_emulator(int yesorno) { usetrigger = yesorno; };
50  void set_jetpt_mincut(double pt) { minjetpt = pt; };
51  void Set_Isocone_radius(double rad) { isoconeradius = rad; };
52  void set_cluspt_mincut(double pt) { mincluspt = pt; };
53  void set_directphotonpt_mincut(double pt) { mindp_pt = pt; };
54  void use_isocone_algorithm(int yes) { use_isocone = yes; }; //1 is use it, 0 is don't use it
55  void set_jetcone_size(int size) { jet_cone_size = size; } //float for jet cone size, i.e. 0.2,0.3,0.4, etc.
56  void SetFirstEventNum(int eventnum) { nevents = eventnum; } //setting the first event based on job number so that each event has an individual eventnum
57  void use_tracked_jets(int useit) { eval_tracked_jets = useit; };
58  void set_eta_lowhigh(float low, float high)
59  {
60  etalow = low;
61  etahigh = high;
62  };
63  void use_positioncorrection_CEMC(int useit) { use_pos_cor_cemc = useit; };
64  void set_AA_collisions(int isaa) { is_AA = isaa; };
65  private:
68  TFile *file;
69  TTree *tree;
70  TTree *cluster_tree;
72  TTree *truthtree;
74  TTree *tracktree;
75  TTree *truthjettree;
76  TTree *recojettree;
80  TTree *event_tree;
82 
83  float mpi;
85  int nevents;
86  TH1F *histo;
87 
88  float beam_energy;
89  float x1;
90  float x2;
91  int partid1;
92  int partid2;
93 
98 
99  //cluster info
100  float clus_energy;
101  float clus_eta;
102  float clus_phi;
103  float clus_pt;
104  float clus_px;
105  float clus_py;
106  float clus_pz;
107  float clus_theta;
109 
110  //track info
111  float tr_px, tr_py, tr_pz;
112  float tr_p;
113  float tr_pt;
114  float tr_phi;
115  float tr_eta;
116  int charge;
117  float chisq;
118  unsigned int ndf;
119  float dca;
120  float tr_x, tr_y, tr_z;
122  float truthtrackp;
123  float truthtracke;
129 
130  //all truth jets
131  float truthjetpt;
133  float truthjetphi;
134  float truthjeteta;
136  float truthjetp;
138 
139  float dR;
140  //all reco jets
141  float recojetpt;
143  float recojetphi;
144  float recojeteta;
145  float recojetmass;
146  float recojetp;
148  float recojetid;
149  float truthjetid;
150 
151  //isophot+reco jet
152  float _recojetid;
153  float _recojetpt;
155  float _recojetphi;
156  float _recojeteta;
158  float _recojetp;
160  float jetdphi;
161  float jetpout;
162  float jetdeta;
163  float _truthjetid;
164  float _truthjetpt;
169  float _truthjetp;
171 
172  //isophot+reco track jet
173  float _trecojetid;
174  float _trecojetpt;
179  float _trecojetp;
181  float tjetdphi;
182  float tjetpout;
183  float tjetdeta;
190  float _ttruthjetp;
192 
193  //isophot+reco hadron
195  float _tr_p;
196  float _tr_pt;
197  float _tr_phi;
198  float _tr_eta;
199  int _charge;
200  float _chisq;
201  unsigned int _ndf;
202  float _dca;
203  float _tr_x, _tr_y, _tr_z;
204  float haddphi;
205  float hadpout;
206  float haddeta;
217 
218  //all truth particles
220  float truthp;
221  float truthphi;
222  float trutheta;
223  float truthpt;
224  float truthenergy;
225  int truthpid;
228 
229  //clust truth variables
230  float clustruthpx;
231  float clustruthpy;
232  float clustruthpz;
234  float clustruthpt;
238 
242  float cluseventpt;
243 
244  //trigger emulator info (emcal trigger)
245  float E_4x4;
246  float phi_4x4;
247  float eta_4x4;
248  float E_2x2;
249  float phi_2x2;
250  float eta_2x2;
251 
252  void Set_Tree_Branches();
253 
254 
255  std::vector<float> constituent_dphis;
256  std::vector<float> constituent_detas;
257 
258 
259  float ConeSum(RawCluster *cluster,
260  RawClusterContainer *cluster_container,
261  SvtxTrackMap *trackmap, float coneradius,
262  GlobalVertex *vtx);
265  JetMap *jets,
266  JetMap *trackedjets,
267  JetRecoEval *recoeval,
268  SvtxTrackEval *trackeval,
269  PHG4TruthInfoContainer *alltruth,
270  JetTruthEval *trutheval,
271  JetMap *truthjets,
272  GlobalVertex *vtx);
273 
276  JetMap *recojets,
277  PHG4TruthInfoContainer *alltruth,
278  JetMap *truthjets,
279  GlobalVertex *vtx);
280 
281  void initialize_values();
282 
283  const float pi2 = -1.5707963;
284  const float threepi2 = 4.71238898;
285  const float pi = 3.1415926;
286 };
287 
288 #endif // __PHOTONJET_H__