Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MakeAmpToolsFlat.h
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////
2 // This class has been automatically generated on
3 // Thu Apr 26 14:51:04 2018 by ROOT version 6.08/06
4 // from TTree pippimmisspb208_TreeFlat/pippimmisspb208_TreeFlat
5 // found on file: treeFlat_DSelector_Z2pi_trees_sw1pw1000_TGT_signal_100000.root
6 //////////////////////////////////////////////////////////
7 
8 #ifndef MakeAmpToolsFlat_h
9 #define MakeAmpToolsFlat_h
10 
11 #include <TROOT.h>
12 #include <TChain.h>
13 #include <TFile.h>
14 
15 // Header file for the classes stored in the TTree if any.
16 #include "TLorentzVector.h"
17 
19 public :
20  TTree *fChain; //!pointer to the analyzed TTree or TChain
21  Int_t fCurrent; //!current Tree number in a TChain
22 
23 // Fixed size dimensions of array or collections stored in the TTree if any.
24 
25  // Declaration of leaf types
26  UInt_t run;
27  ULong64_t event;
28  Float_t weight;
29  ULong64_t numtruepid_final;
30  ULong64_t truepids_decay;
31  Bool_t is_truetop;
32  Bool_t is_truecombo;
33  Bool_t is_bdtcombo;
34  Bool_t rftime;
35  Float_t kin_chisq;
36  UInt_t kin_ndf;
37  UInt_t beam_beamid;
38  Bool_t beam_isgen;
39  TLorentzVector *beam_x4_meas;
40  TLorentzVector *beam_p4_meas;
41  TLorentzVector *beam_x4_kin;
42  TLorentzVector *beam_p4_kin;
43  TLorentzVector *beam_x4_true;
44  TLorentzVector *beam_p4_true;
45  UInt_t pip_trkid;
46  TLorentzVector *pip_x4_meas;
47  TLorentzVector *pip_p4_meas;
48  TLorentzVector *pip_x4_kin;
49  TLorentzVector *pip_p4_kin;
50  Float_t pip_true_fom;
51  TLorentzVector *pip_x4_true;
52  TLorentzVector *pip_p4_true;
53  Float_t pip_beta_time;
54  Float_t pip_chisq_time;
55  UInt_t pip_ndf_time;
56  UInt_t pip_ndf_trk;
57  Float_t pip_chisq_trk;
58  UInt_t pip_ndf_dedx;
59  Float_t pip_chisq_dedx;
60  Float_t pip_dedx_cdc;
61  Float_t pip_dedx_fdc;
62  Float_t pip_dedx_tof;
63  Float_t pip_dedx_st;
64  Float_t pip_ebcal;
65  Float_t pip_eprebcal;
66  Float_t pip_efcal;
67  Float_t pip_bcal_delphi;
68  Float_t pip_bcal_delz;
69  Float_t pip_fcal_doca;
70  UInt_t pim_trkid;
71  TLorentzVector *pim_x4_meas;
72  TLorentzVector *pim_p4_meas;
73  TLorentzVector *pim_x4_kin;
74  TLorentzVector *pim_p4_kin;
75  Float_t pim_true_fom;
76  TLorentzVector *pim_x4_true;
77  TLorentzVector *pim_p4_true;
78  Float_t pim_beta_time;
79  Float_t pim_chisq_time;
80  UInt_t pim_ndf_time;
81  UInt_t pim_ndf_trk;
82  Float_t pim_chisq_trk;
83  UInt_t pim_ndf_dedx;
84  Float_t pim_chisq_dedx;
85  Float_t pim_dedx_cdc;
86  Float_t pim_dedx_fdc;
87  Float_t pim_dedx_tof;
88  Float_t pim_dedx_st;
89  Float_t pim_ebcal;
90  Float_t pim_eprebcal;
91  Float_t pim_efcal;
92  Float_t pim_bcal_delphi;
93  Float_t pim_bcal_delz;
94  Float_t pim_fcal_doca;
95  TLorentzVector *misspb_p4_kin;
96  Double_t AccWeight;
97 
98  // List of branches
99  TBranch *b_run; //!
100  TBranch *b_event; //!
101  TBranch *b_weight; //!
102  TBranch *b_numtruepid_final; //!
103  TBranch *b_truepids_decay; //!
104  TBranch *b_is_truetop; //!
105  TBranch *b_is_truecombo; //!
106  TBranch *b_is_bdtcombo; //!
107  TBranch *b_rftime; //!
108  TBranch *b_kin_chisq; //!
109  TBranch *b_kin_ndf; //!
110  TBranch *b_beam_beamid; //!
111  TBranch *b_beam_isgen; //!
112  TBranch *b_beam_x4_meas; //!
113  TBranch *b_beam_p4_meas; //!
114  TBranch *b_beam_x4_kin; //!
115  TBranch *b_beam_p4_kin; //!
116  TBranch *b_beam_x4_true; //!
117  TBranch *b_beam_p4_true; //!
118  TBranch *b_pip_trkid; //!
119  TBranch *b_pip_x4_meas; //!
120  TBranch *b_pip_p4_meas; //!
121  TBranch *b_pip_x4_kin; //!
122  TBranch *b_pip_p4_kin; //!
123  TBranch *b_pip_true_fom; //!
124  TBranch *b_pip_x4_true; //!
125  TBranch *b_pip_p4_true; //!
126  TBranch *b_pip_beta_time; //!
127  TBranch *b_pip_chisq_time; //!
128  TBranch *b_pip_ndf_time; //!
129  TBranch *b_pip_ndf_trk; //!
130  TBranch *b_pip_chisq_trk; //!
131  TBranch *b_pip_ndf_dedx; //!
132  TBranch *b_pip_chisq_dedx; //!
133  TBranch *b_pip_dedx_cdc; //!
134  TBranch *b_pip_dedx_fdc; //!
135  TBranch *b_pip_dedx_tof; //!
136  TBranch *b_pip_dedx_st; //!
137  TBranch *b_pip_ebcal; //!
138  TBranch *b_pip_eprebcal; //!
139  TBranch *b_pip_efcal; //!
140  TBranch *b_pip_bcal_delphi; //!
141  TBranch *b_pip_bcal_delz; //!
142  TBranch *b_pip_fcal_doca; //!
143  TBranch *b_pim_trkid; //!
144  TBranch *b_pim_x4_meas; //!
145  TBranch *b_pim_p4_meas; //!
146  TBranch *b_pim_x4_kin; //!
147  TBranch *b_pim_p4_kin; //!
148  TBranch *b_pim_true_fom; //!
149  TBranch *b_pim_x4_true; //!
150  TBranch *b_pim_p4_true; //!
151  TBranch *b_pim_beta_time; //!
152  TBranch *b_pim_chisq_time; //!
153  TBranch *b_pim_ndf_time; //!
154  TBranch *b_pim_ndf_trk; //!
155  TBranch *b_pim_chisq_trk; //!
156  TBranch *b_pim_ndf_dedx; //!
157  TBranch *b_pim_chisq_dedx; //!
158  TBranch *b_pim_dedx_cdc; //!
159  TBranch *b_pim_dedx_fdc; //!
160  TBranch *b_pim_dedx_tof; //!
161  TBranch *b_pim_dedx_st; //!
162  TBranch *b_pim_ebcal; //!
163  TBranch *b_pim_eprebcal; //!
164  TBranch *b_pim_efcal; //!
165  TBranch *b_pim_bcal_delphi; //!
166  TBranch *b_pim_bcal_delz; //!
167  TBranch *b_pim_fcal_doca; //!
168  TBranch *b_misspb_p4_kin; //!
169  TBranch *b_AccWeight; //!
170 
171  MakeAmpToolsFlat(TTree *tree=0);
172  virtual ~MakeAmpToolsFlat();
173  virtual Int_t Cut(Long64_t entry);
174  virtual Int_t GetEntry(Long64_t entry);
175  virtual Long64_t LoadTree(Long64_t entry);
176  virtual void Init(TTree *tree);
177  virtual void Loop(Int_t foption);
178  virtual Bool_t Notify();
179  virtual void Show(Long64_t entry = -1);
180 
181  int m_nPart;
182  int m_PID[3];
183  float m_e[3];
184  float m_px[3];
185  float m_py[3];
186  float m_pz[3];
187  float m_eBeam;
188  float m_pxBeam;
189  float m_pyBeam;
190  float m_pzBeam;
191  float m_weight;
193 
194  TTree *m_OutTree;
195  TFile *outFile;
200 };
201 
202 #endif
203 
204 #ifdef MakeAmpToolsFlat_cxx
205 MakeAmpToolsFlat::MakeAmpToolsFlat(TTree *tree) : fChain(0)
206 {
207 // if parameter tree is not specified (or zero), connect the file
208 // used to generate this class and read the Tree.
209 
210  if (_file0) {
211  tree = (TTree *) _file0->Get("pippimmisspb208_TreeFlat"); // require input file if provided!
212  }
213  if (tree == 0) {
214  cout << "*** Input file has no pippimmisspb208_TreeFlat tree" << endl;
215  /*TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("treeFlat_DSelector_Z2pi_trees_sw1pw1000_TGT_signal_100000.root");
216  if (!f || !f->IsOpen()) {
217  f = new TFile("treeFlat_DSelector_Z2pi_trees_sw1pw1000_TGT_signal_100000.root");
218  }
219  f->GetObject("pippimmisspb208_TreeFlat",tree);*/
220 
221  }
222  Init(tree);
223 }
224 
226 {
227  if (!fChain) return;
228  delete fChain->GetCurrentFile();
229 }
230 
231 Int_t MakeAmpToolsFlat::GetEntry(Long64_t entry)
232 {
233 // Read contents of entry.
234  if (!fChain) return 0;
235  return fChain->GetEntry(entry);
236 }
237 Long64_t MakeAmpToolsFlat::LoadTree(Long64_t entry)
238 {
239 // Set the environment to read one entry
240  if (!fChain) return -5;
241  Long64_t centry = fChain->LoadTree(entry);
242  if (centry < 0) return centry;
243  if (fChain->GetTreeNumber() != fCurrent) {
244  fCurrent = fChain->GetTreeNumber();
245  Notify();
246  }
247  return centry;
248 }
249 
250 void MakeAmpToolsFlat::Init(TTree *tree)
251 {
252  // The Init() function is called when the selector needs to initialize
253  // a new tree or chain. Typically here the branch addresses and branch
254  // pointers of the tree will be set.
255  // It is normally not necessary to make changes to the generated
256  // code, but the routine can be extended by the user if needed.
257  // Init() will be called many times when running on PROOF
258  // (once per file to be processed).
259 
260  // Set object pointer
261  beam_x4_meas = 0;
262  beam_p4_meas = 0;
263  beam_x4_kin = 0;
264  beam_p4_kin = 0;
265  beam_x4_true = 0;
266  beam_p4_true = 0;
267  pip_x4_meas = 0;
268  pip_p4_meas = 0;
269  pip_x4_kin = 0;
270  pip_p4_kin = 0;
271  pip_x4_true = 0;
272  pip_p4_true = 0;
273  pim_x4_meas = 0;
274  pim_p4_meas = 0;
275  pim_x4_kin = 0;
276  pim_p4_kin = 0;
277  pim_x4_true = 0;
278  pim_p4_true = 0;
279  misspb_p4_kin = 0;
280  // Set branch addresses and branch pointers
281  if (!tree) return;
282  fChain = tree;
283  fCurrent = -1;
284  fChain->SetMakeClass(1);
285 
286  fChain->SetBranchAddress("run", &run, &b_run);
287  fChain->SetBranchAddress("event", &event, &b_event);
288  fChain->SetBranchAddress("weight", &weight, &b_weight);
289  fChain->SetBranchAddress("numtruepid_final", &numtruepid_final, &b_numtruepid_final);
290  fChain->SetBranchAddress("truepids_decay", &truepids_decay, &b_truepids_decay);
291  fChain->SetBranchAddress("is_truetop", &is_truetop, &b_is_truetop);
292  fChain->SetBranchAddress("is_truecombo", &is_truecombo, &b_is_truecombo);
293  fChain->SetBranchAddress("is_bdtcombo", &is_bdtcombo, &b_is_bdtcombo);
294  fChain->SetBranchAddress("rftime", &rftime, &b_rftime);
295  fChain->SetBranchAddress("kin_chisq", &kin_chisq, &b_kin_chisq);
296  fChain->SetBranchAddress("kin_ndf", &kin_ndf, &b_kin_ndf);
297  fChain->SetBranchAddress("beam_beamid", &beam_beamid, &b_beam_beamid);
298  fChain->SetBranchAddress("beam_isgen", &beam_isgen, &b_beam_isgen);
299  fChain->SetBranchAddress("beam_x4_meas", &beam_x4_meas, &b_beam_x4_meas);
300  fChain->SetBranchAddress("beam_p4_meas", &beam_p4_meas, &b_beam_p4_meas);
301  fChain->SetBranchAddress("beam_x4_kin", &beam_x4_kin, &b_beam_x4_kin);
302  fChain->SetBranchAddress("beam_p4_kin", &beam_p4_kin, &b_beam_p4_kin);
303  fChain->SetBranchAddress("beam_x4_true", &beam_x4_true, &b_beam_x4_true);
304  fChain->SetBranchAddress("beam_p4_true", &beam_p4_true, &b_beam_p4_true);
305  fChain->SetBranchAddress("pip_trkid", &pip_trkid, &b_pip_trkid);
306  fChain->SetBranchAddress("pip_x4_meas", &pip_x4_meas, &b_pip_x4_meas);
307  fChain->SetBranchAddress("pip_p4_meas", &pip_p4_meas, &b_pip_p4_meas);
308  fChain->SetBranchAddress("pip_x4_kin", &pip_x4_kin, &b_pip_x4_kin);
309  fChain->SetBranchAddress("pip_p4_kin", &pip_p4_kin, &b_pip_p4_kin);
310  fChain->SetBranchAddress("pip_true_fom", &pip_true_fom, &b_pip_true_fom);
311  fChain->SetBranchAddress("pip_x4_true", &pip_x4_true, &b_pip_x4_true);
312  fChain->SetBranchAddress("pip_p4_true", &pip_p4_true, &b_pip_p4_true);
313  fChain->SetBranchAddress("pip_beta_time", &pip_beta_time, &b_pip_beta_time);
314  fChain->SetBranchAddress("pip_chisq_time", &pip_chisq_time, &b_pip_chisq_time);
315  fChain->SetBranchAddress("pip_ndf_time", &pip_ndf_time, &b_pip_ndf_time);
316  fChain->SetBranchAddress("pip_ndf_trk", &pip_ndf_trk, &b_pip_ndf_trk);
317  fChain->SetBranchAddress("pip_chisq_trk", &pip_chisq_trk, &b_pip_chisq_trk);
318  fChain->SetBranchAddress("pip_ndf_dedx", &pip_ndf_dedx, &b_pip_ndf_dedx);
319  fChain->SetBranchAddress("pip_chisq_dedx", &pip_chisq_dedx, &b_pip_chisq_dedx);
320  fChain->SetBranchAddress("pip_dedx_cdc", &pip_dedx_cdc, &b_pip_dedx_cdc);
321  fChain->SetBranchAddress("pip_dedx_fdc", &pip_dedx_fdc, &b_pip_dedx_fdc);
322  fChain->SetBranchAddress("pip_dedx_tof", &pip_dedx_tof, &b_pip_dedx_tof);
323  fChain->SetBranchAddress("pip_dedx_st", &pip_dedx_st, &b_pip_dedx_st);
324  fChain->SetBranchAddress("pip_ebcal", &pip_ebcal, &b_pip_ebcal);
325  fChain->SetBranchAddress("pip_eprebcal", &pip_eprebcal, &b_pip_eprebcal);
326  fChain->SetBranchAddress("pip_efcal", &pip_efcal, &b_pip_efcal);
327  fChain->SetBranchAddress("pip_bcal_delphi", &pip_bcal_delphi, &b_pip_bcal_delphi);
328  fChain->SetBranchAddress("pip_bcal_delz", &pip_bcal_delz, &b_pip_bcal_delz);
329  fChain->SetBranchAddress("pip_fcal_doca", &pip_fcal_doca, &b_pip_fcal_doca);
330  fChain->SetBranchAddress("pim_trkid", &pim_trkid, &b_pim_trkid);
331  fChain->SetBranchAddress("pim_x4_meas", &pim_x4_meas, &b_pim_x4_meas);
332  fChain->SetBranchAddress("pim_p4_meas", &pim_p4_meas, &b_pim_p4_meas);
333  fChain->SetBranchAddress("pim_x4_kin", &pim_x4_kin, &b_pim_x4_kin);
334  fChain->SetBranchAddress("pim_p4_kin", &pim_p4_kin, &b_pim_p4_kin);
335  fChain->SetBranchAddress("pim_true_fom", &pim_true_fom, &b_pim_true_fom);
336  fChain->SetBranchAddress("pim_x4_true", &pim_x4_true, &b_pim_x4_true);
337  fChain->SetBranchAddress("pim_p4_true", &pim_p4_true, &b_pim_p4_true);
338  fChain->SetBranchAddress("pim_beta_time", &pim_beta_time, &b_pim_beta_time);
339  fChain->SetBranchAddress("pim_chisq_time", &pim_chisq_time, &b_pim_chisq_time);
340  fChain->SetBranchAddress("pim_ndf_time", &pim_ndf_time, &b_pim_ndf_time);
341  fChain->SetBranchAddress("pim_ndf_trk", &pim_ndf_trk, &b_pim_ndf_trk);
342  fChain->SetBranchAddress("pim_chisq_trk", &pim_chisq_trk, &b_pim_chisq_trk);
343  fChain->SetBranchAddress("pim_ndf_dedx", &pim_ndf_dedx, &b_pim_ndf_dedx);
344  fChain->SetBranchAddress("pim_chisq_dedx", &pim_chisq_dedx, &b_pim_chisq_dedx);
345  fChain->SetBranchAddress("pim_dedx_cdc", &pim_dedx_cdc, &b_pim_dedx_cdc);
346  fChain->SetBranchAddress("pim_dedx_fdc", &pim_dedx_fdc, &b_pim_dedx_fdc);
347  fChain->SetBranchAddress("pim_dedx_tof", &pim_dedx_tof, &b_pim_dedx_tof);
348  fChain->SetBranchAddress("pim_dedx_st", &pim_dedx_st, &b_pim_dedx_st);
349  fChain->SetBranchAddress("pim_ebcal", &pim_ebcal, &b_pim_ebcal);
350  fChain->SetBranchAddress("pim_eprebcal", &pim_eprebcal, &b_pim_eprebcal);
351  fChain->SetBranchAddress("pim_efcal", &pim_efcal, &b_pim_efcal);
352  fChain->SetBranchAddress("pim_bcal_delphi", &pim_bcal_delphi, &b_pim_bcal_delphi);
353  fChain->SetBranchAddress("pim_bcal_delz", &pim_bcal_delz, &b_pim_bcal_delz);
354  fChain->SetBranchAddress("pim_fcal_doca", &pim_fcal_doca, &b_pim_fcal_doca);
355  fChain->SetBranchAddress("misspb_p4_kin", &misspb_p4_kin, &b_misspb_p4_kin);
356  fChain->SetBranchAddress("AccWeight", &AccWeight, &b_AccWeight);
357  Notify();
358 }
359 
361 {
362  // The Notify() function is called when a new file is opened. This
363  // can be either for a new TTree in a TChain or when when a new TTree
364  // is started when using PROOF. It is normally not necessary to make changes
365  // to the generated code, but the routine can be extended by the
366  // user if needed. The return value is currently not used.
367 
368  return kTRUE;
369 }
370 
371 void MakeAmpToolsFlat::Show(Long64_t entry)
372 {
373 // Print contents of entry.
374 // If entry is not specified, print current entry
375  if (!fChain) return;
376  fChain->Show(entry);
377 }
378 Int_t MakeAmpToolsFlat::Cut(Long64_t entry)
379 {
380 // This function may be called from Loop.
381 // returns 1 if entry is accepted.
382 // returns -1 otherwise.
383  return 1;
384 }
385 #endif // #ifdef MakeAmpToolsFlat_cxx
TBranch * b_beam_x4_true
TBranch * b_pim_chisq_trk
TBranch * b_pim_bcal_delz
TLorentzVector * pip_x4_true
TBranch * b_pip_eprebcal
TBranch * b_pip_chisq_dedx
TBranch * b_pim_chisq_dedx
virtual Int_t GetEntry(Long64_t entry)
TBranch * b_pip_dedx_cdc
TBranch * b_pim_dedx_cdc
TLorentzVector * beam_x4_kin
TLorentzVector * beam_p4_kin
TBranch * b_misspb_p4_kin
UInt_t run
current Tree number in a TChain
TBranch * b_pip_chisq_time
TLorentzVector * pip_p4_kin
TLorentzVector * beam_p4_meas
TBranch * b_pip_bcal_delphi
TBranch * b_pip_ndf_time
TBranch * b_pim_ndf_time
TLorentzVector * pim_x4_kin
TBranch * b_beam_x4_meas
TBranch * b_pim_beta_time
TLorentzVector * pim_x4_meas
TBranch * b_pim_fcal_doca
virtual Long64_t LoadTree(Long64_t entry)
TBranch * b_pip_ndf_dedx
TBranch * b_pip_fcal_doca
ULong64_t numtruepid_final
virtual void Loop(Int_t foption)
TLorentzVector * pip_p4_meas
TBranch * b_pip_dedx_fdc
TBranch * b_pip_chisq_trk
TLorentzVector * beam_p4_true
TBranch * b_pim_dedx_tof
TBranch * b_truepids_decay
virtual ~MakeAmpToolsFlat()
virtual Int_t Cut(Long64_t entry)
virtual void Show(Long64_t entry=-1)
TBranch * b_pim_chisq_time
Int_t foption
TBranch * b_beam_p4_true
TBranch * b_pim_ndf_dedx
MakeAmpToolsFlat(TTree *tree=0)
TLorentzVector * pip_x4_meas
TLorentzVector * pip_p4_true
TLorentzVector * pim_p4_kin
TBranch * b_pim_bcal_delphi
TLorentzVector * misspb_p4_kin
virtual void Init(TTree *tree)
TBranch * b_pip_true_fom
ULong64_t truepids_decay
virtual Bool_t Notify()
TBranch * b_numtruepid_final
TLorentzVector * beam_x4_meas
TBranch * b_beam_p4_meas
TBranch * b_is_truecombo
TLorentzVector * pip_x4_kin
TBranch * b_pip_dedx_tof
TBranch * b_pip_bcal_delz
TBranch * b_pip_beta_time
TBranch * b_pim_eprebcal
TLorentzVector * pim_p4_true
Int_t fCurrent
pointer to the analyzed TTree or TChain
TBranch * b_pim_dedx_fdc
TLorentzVector * pim_x4_true
TBranch * b_pim_true_fom
TLorentzVector * pim_p4_meas
TLorentzVector * beam_x4_true