Xcalo_r5387.h
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////
2 // This class has been automatically generated on
3 // Mon Sep 9 15:17:32 2019 by ROOT version 6.16/00
4 // from TTree Event/Event Tree from Reco
5 // found on file: /dune/data2/users/apaudel/prod2_calib/r5387_sce.root
6 //////////////////////////////////////////////////////////
7 
8 #ifndef Xcalo_r5387_h
9 #define Xcalo_r5387_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 
17 class Xcalo_r5387 {
18 public :
19  TTree *fChain; //!pointer to the analyzed TTree or TChain
20  Int_t fCurrent; //!current Tree number in a TChain
21 
22 // Fixed size dimensions of array or collections stored in the TTree if any.
23 
24  // Declaration of leaf types
25  Int_t event;
26  Double_t evttime;
27  Int_t run;
28  Int_t subrun;
30  Int_t hour_min_sec;
31  Int_t cross_trks;
33  Int_t all_trks;
35  Float_t trackthetaxz[30]; //[cross_trks]
36  Float_t trackthetayz[30]; //[cross_trks]
37  Float_t trkstartx[30]; //[cross_trks]
38  Float_t trkstarty[30]; //[cross_trks]
39  Float_t trkstartz[30]; //[cross_trks]
40  Float_t trkendx[30]; //[cross_trks]
41  Float_t trkendy[30]; //[cross_trks]
42  Float_t trkendz[30]; //[cross_trks]
43  Float_t trklen[30]; //[cross_trks]
44  Float_t peakT_max[30]; //[cross_trks]
45  Float_t peakT_min[30]; //[cross_trks]
46  Int_t TrkID[30]; //[cross_trks]
47  Float_t trkstartcosxyz[30][3]; //[cross_trks]
48  Float_t trkendcosxyz[30][3]; //[cross_trks]
49  Int_t ntrkhits[30][3]; //[cross_trks]
50  Float_t trkdqdx[30][3][3000]; //[cross_trks]
51  Float_t trkdedx[30][3][3000]; //[cross_trks]
52  Float_t trkresrange[30][3][3000]; //[cross_trks]
53  Float_t trkhitx[30][3][3000]; //[cross_trks]
54  Float_t trkhity[30][3][3000]; //[cross_trks]
55  Float_t trkhitz[30][3][3000]; //[cross_trks]
56  Float_t trkpitch[30][3][3000]; //[cross_trks]
57  Float_t dist_min[30]; //[cross_trks]
58  Int_t adjacent_hits[30]; //[cross_trks]
59  Int_t lastwire[30]; //[cross_trks]
60  Float_t lastpeakt[30]; //[cross_trks]
61  Int_t endtpc[30]; //[cross_trks]
62 
63  // List of branches
64  TBranch *b_event; //!
65  TBranch *b_evttime; //!
66  TBranch *b_run; //!
67  TBranch *b_surbrun; //!
68  TBranch *b_year_month_date; //!
69  TBranch *b_hour_min_sec; //!
70  TBranch *b_cross_trks; //!
71  TBranch *b_stopping_trks; //!
72  TBranch *b_all_trks; //!
73  TBranch *b_unbroken_trks; //!
74  TBranch *b_trackthetaxz; //!
75  TBranch *b_trackthetayz; //!
76  TBranch *b_trkstartx; //!
77  TBranch *b_trkstarty; //!
78  TBranch *b_trkstartz; //!
79  TBranch *b_trkendx; //!
80  TBranch *b_trkendy; //!
81  TBranch *b_trkendz; //!
82  TBranch *b_trklen; //!
83  TBranch *b_peakT_max; //!
84  TBranch *b_peakT_min; //!
85  TBranch *b_TrkID; //!
86  TBranch *b_trkstartcosxyz; //!
87  TBranch *b_trkendcosxyz; //!
88  TBranch *b_ntrkhits; //!
89  TBranch *b_trkdqdx; //!
90  TBranch *b_trkdedx; //!
91  TBranch *b_trkresrange; //!
92  TBranch *b_trkhitx; //!
93  TBranch *b_trkhity; //!
94  TBranch *b_trkhitz; //!
95  TBranch *b_trkpitch; //!
96  TBranch *b_dist_min; //!
97  TBranch *b_adjacent_hits; //!
98  TBranch *b_lastwire; //!
99  TBranch *b_lastpeakt; //!
100  TBranch *b_endtpc; //!
101 
102  Xcalo_r5387(TTree *tree=0);
103  virtual ~Xcalo_r5387();
104  virtual Int_t Cut(Long64_t entry);
105  virtual Int_t GetEntry(Long64_t entry);
106  virtual Long64_t LoadTree(Long64_t entry);
107  virtual void Init(TTree *tree);
108  virtual void Loop();
109  virtual Bool_t Notify();
110  virtual void Show(Long64_t entry = -1);
111 };
112 
113 #endif
114 
115 #ifdef Xcalo_r5387_cxx
117 {
118 // if parameter tree is not specified (or zero), connect the file
119 // used to generate this class and read the Tree.
120  if (tree == 0) {
121  TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("/dune/data2/users/apaudel/prod2_calib/r5387_sce.root");
122  if (!f || !f->IsOpen()) {
123  f = new TFile("/dune/data2/users/apaudel/prod2_calib/r5387_sce.root");
124  }
125  TDirectory * dir = (TDirectory*)f->Get("/dune/data2/users/apaudel/prod2_calib/r5387_sce.root:/michelremoving");
126  dir->GetObject("Event",tree);
127 
128  }
129  Init(tree);
130 }
131 
133 {
134  if (!fChain) return;
135  delete fChain->GetCurrentFile();
136 }
137 
138 Int_t Xcalo_r5387::GetEntry(Long64_t entry)
139 {
140 // Read contents of entry.
141  if (!fChain) return 0;
142  return fChain->GetEntry(entry);
143 }
144 Long64_t Xcalo_r5387::LoadTree(Long64_t entry)
145 {
146 // Set the environment to read one entry
147  if (!fChain) return -5;
148  Long64_t centry = fChain->LoadTree(entry);
149  if (centry < 0) return centry;
150  if (fChain->GetTreeNumber() != fCurrent) {
151  fCurrent = fChain->GetTreeNumber();
152  Notify();
153  }
154  return centry;
155 }
156 
157 void Xcalo_r5387::Init(TTree *tree)
158 {
159  // The Init() function is called when the selector needs to initialize
160  // a new tree or chain. Typically here the branch addresses and branch
161  // pointers of the tree will be set.
162  // It is normally not necessary to make changes to the generated
163  // code, but the routine can be extended by the user if needed.
164  // Init() will be called many times when running on PROOF
165  // (once per file to be processed).
166 
167  // Set branch addresses and branch pointers
168  if (!tree) return;
169  fChain = tree;
170  fCurrent = -1;
171  fChain->SetMakeClass(1);
172 
173  fChain->SetBranchAddress("event", &event, &b_event);
174  fChain->SetBranchAddress("evttime", &evttime, &b_evttime);
175  fChain->SetBranchAddress("run", &run, &b_run);
176  fChain->SetBranchAddress("subrun", &subrun, &b_surbrun);
177  fChain->SetBranchAddress("year_month_date", &year_month_date, &b_year_month_date);
178  fChain->SetBranchAddress("hour_min_sec", &hour_min_sec, &b_hour_min_sec);
179  fChain->SetBranchAddress("cross_trks", &cross_trks, &b_cross_trks);
180  fChain->SetBranchAddress("stopping_trks", &stopping_trks, &b_stopping_trks);
181  fChain->SetBranchAddress("all_trks", &all_trks, &b_all_trks);
182  fChain->SetBranchAddress("unbroken_trks", &unbroken_trks, &b_unbroken_trks);
183  fChain->SetBranchAddress("trackthetaxz", trackthetaxz, &b_trackthetaxz);
184  fChain->SetBranchAddress("trackthetayz", trackthetayz, &b_trackthetayz);
185  fChain->SetBranchAddress("trkstartx", trkstartx, &b_trkstartx);
186  fChain->SetBranchAddress("trkstarty", trkstarty, &b_trkstarty);
187  fChain->SetBranchAddress("trkstartz", trkstartz, &b_trkstartz);
188  fChain->SetBranchAddress("trkendx", trkendx, &b_trkendx);
189  fChain->SetBranchAddress("trkendy", trkendy, &b_trkendy);
190  fChain->SetBranchAddress("trkendz", trkendz, &b_trkendz);
191  fChain->SetBranchAddress("trklen", trklen, &b_trklen);
192  fChain->SetBranchAddress("peakT_max", peakT_max, &b_peakT_max);
193  fChain->SetBranchAddress("peakT_min", peakT_min, &b_peakT_min);
194  fChain->SetBranchAddress("TrkID", TrkID, &b_TrkID);
195  fChain->SetBranchAddress("trkstartcosxyz", trkstartcosxyz, &b_trkstartcosxyz);
196  fChain->SetBranchAddress("trkendcosxyz", trkendcosxyz, &b_trkendcosxyz);
197  fChain->SetBranchAddress("ntrkhits", ntrkhits, &b_ntrkhits);
198  fChain->SetBranchAddress("trkdqdx", trkdqdx, &b_trkdqdx);
199  fChain->SetBranchAddress("trkdedx", trkdedx, &b_trkdedx);
200  fChain->SetBranchAddress("trkresrange", trkresrange, &b_trkresrange);
201  fChain->SetBranchAddress("trkhitx", trkhitx, &b_trkhitx);
202  fChain->SetBranchAddress("trkhity", trkhity, &b_trkhity);
203  fChain->SetBranchAddress("trkhitz", trkhitz, &b_trkhitz);
204  fChain->SetBranchAddress("trkpitch", trkpitch, &b_trkpitch);
205  fChain->SetBranchAddress("dist_min", dist_min, &b_dist_min);
206  fChain->SetBranchAddress("adjacent_hits", adjacent_hits, &b_adjacent_hits);
207  fChain->SetBranchAddress("lastwire", lastwire, &b_lastwire);
208  fChain->SetBranchAddress("lastpeakt", lastpeakt, &b_lastpeakt);
209  fChain->SetBranchAddress("endtpc", endtpc, &b_endtpc);
210  Notify();
211 }
212 
213 Bool_t Xcalo_r5387::Notify()
214 {
215  // The Notify() function is called when a new file is opened. This
216  // can be either for a new TTree in a TChain or when when a new TTree
217  // is started when using PROOF. It is normally not necessary to make changes
218  // to the generated code, but the routine can be extended by the
219  // user if needed. The return value is currently not used.
220 
221  return kTRUE;
222 }
223 
224 void Xcalo_r5387::Show(Long64_t entry)
225 {
226 // Print contents of entry.
227 // If entry is not specified, print current entry
228  if (!fChain) return;
229  fChain->Show(entry);
230 }
231 Int_t Xcalo_r5387::Cut(Long64_t entry)
232 {
233 // This function may be called from Loop.
234 // returns 1 if entry is accepted.
235 // returns -1 otherwise.
236  return 1;
237 }
238 #endif // #ifdef Xcalo_r5387_cxx
TTree * fChain
Definition: Xcalo_r5387.h:19
TBranch * b_trklen
Definition: Xcalo_r5387.h:82
virtual Long64_t LoadTree(Long64_t entry)
TBranch * b_trkendx
Definition: Xcalo_r5387.h:79
TBranch * b_run
Definition: Xcalo_r5387.h:66
Int_t adjacent_hits[30]
Definition: Xcalo_r5387.h:58
QList< Entry > entry
TBranch * b_trkstartx
Definition: Xcalo_r5387.h:76
Float_t trkstartx[30]
Definition: Xcalo_r5387.h:37
virtual void Show(Long64_t entry=-1)
TBranch * b_trkendcosxyz
Definition: Xcalo_r5387.h:87
TBranch * b_trkhitz
Definition: Xcalo_r5387.h:94
TBranch * b_unbroken_trks
Definition: Xcalo_r5387.h:73
Float_t peakT_min[30]
Definition: Xcalo_r5387.h:45
Float_t trackthetayz[30]
Definition: Xcalo_r5387.h:36
Float_t trkendy[30]
Definition: Xcalo_r5387.h:41
Float_t lastpeakt[30]
Definition: Xcalo_r5387.h:60
TBranch * b_ntrkhits
Definition: Xcalo_r5387.h:88
TBranch * b_cross_trks
Definition: Xcalo_r5387.h:70
Float_t trkendx[30]
Definition: Xcalo_r5387.h:40
Float_t trkstartz[30]
Definition: Xcalo_r5387.h:39
Int_t lastwire[30]
Definition: Xcalo_r5387.h:59
TBranch * b_trkdqdx
Definition: Xcalo_r5387.h:89
string dir
TBranch * b_trkdedx
Definition: Xcalo_r5387.h:90
Float_t trkendz[30]
Definition: Xcalo_r5387.h:42
Float_t trkstartcosxyz[30][3]
Definition: Xcalo_r5387.h:47
Int_t event
current Tree number in a TChain
Definition: Xcalo_r5387.h:25
virtual void Init(TTree *tree)
Int_t TrkID[30]
Definition: Xcalo_r5387.h:46
TBranch * b_trkhitx
Definition: Xcalo_r5387.h:92
TBranch * b_adjacent_hits
Definition: Xcalo_r5387.h:97
Float_t peakT_max[30]
Definition: Xcalo_r5387.h:44
TBranch * b_endtpc
Definition: Xcalo_r5387.h:100
TBranch * b_trackthetayz
Definition: Xcalo_r5387.h:75
Float_t trkresrange[30][3][3000]
Definition: Xcalo_r5387.h:52
TBranch * b_year_month_date
Definition: Xcalo_r5387.h:68
Float_t trkhity[30][3][3000]
Definition: Xcalo_r5387.h:54
Float_t trkpitch[30][3][3000]
Definition: Xcalo_r5387.h:56
Int_t endtpc[30]
Definition: Xcalo_r5387.h:61
Int_t subrun
Definition: Xcalo_r5387.h:28
Float_t trkhitx[30][3][3000]
Definition: Xcalo_r5387.h:53
Float_t dist_min[30]
Definition: Xcalo_r5387.h:57
Float_t trkstarty[30]
Definition: Xcalo_r5387.h:38
virtual void Loop()
TBranch * b_trkpitch
Definition: Xcalo_r5387.h:95
Int_t stopping_trks
Definition: Xcalo_r5387.h:32
TBranch * b_lastpeakt
Definition: Xcalo_r5387.h:99
TBranch * b_trkresrange
Definition: Xcalo_r5387.h:91
TBranch * b_hour_min_sec
Definition: Xcalo_r5387.h:69
Int_t all_trks
Definition: Xcalo_r5387.h:33
Float_t trklen[30]
Definition: Xcalo_r5387.h:43
Int_t cross_trks
Definition: Xcalo_r5387.h:31
TBranch * b_trkstarty
Definition: Xcalo_r5387.h:77
Xcalo_r5387(TTree *tree=0)
Int_t fCurrent
pointer to the analyzed TTree or TChain
Definition: Xcalo_r5387.h:20
TBranch * b_stopping_trks
Definition: Xcalo_r5387.h:71
TBranch * b_trkstartz
Definition: Xcalo_r5387.h:78
Float_t trackthetaxz[30]
Definition: Xcalo_r5387.h:35
Int_t unbroken_trks
Definition: Xcalo_r5387.h:34
virtual Int_t GetEntry(Long64_t entry)
TBranch * b_peakT_max
Definition: Xcalo_r5387.h:83
TBranch * b_evttime
Definition: Xcalo_r5387.h:65
Int_t hour_min_sec
Definition: Xcalo_r5387.h:30
Float_t trkdqdx[30][3][3000]
Definition: Xcalo_r5387.h:50
virtual ~Xcalo_r5387()
TBranch * b_dist_min
Definition: Xcalo_r5387.h:96
TBranch * b_lastwire
Definition: Xcalo_r5387.h:98
virtual Bool_t Notify()
TBranch * b_all_trks
Definition: Xcalo_r5387.h:72
Float_t trkhitz[30][3][3000]
Definition: Xcalo_r5387.h:55
TBranch * b_surbrun
Definition: Xcalo_r5387.h:67
TBranch * b_trackthetaxz
Definition: Xcalo_r5387.h:74
TBranch * b_trkendy
Definition: Xcalo_r5387.h:80
TBranch * b_trkstartcosxyz
Definition: Xcalo_r5387.h:86
TBranch * b_event
Definition: Xcalo_r5387.h:64
TBranch * b_trkhity
Definition: Xcalo_r5387.h:93
virtual Int_t Cut(Long64_t entry)
TBranch * b_TrkID
Definition: Xcalo_r5387.h:85
Int_t ntrkhits[30][3]
Definition: Xcalo_r5387.h:49
Double_t evttime
Definition: Xcalo_r5387.h:26
Event finding and building.
Float_t trkdedx[30][3][3000]
Definition: Xcalo_r5387.h:51
Float_t trkendcosxyz[30][3]
Definition: Xcalo_r5387.h:48
TBranch * b_trkendz
Definition: Xcalo_r5387.h:81
Int_t year_month_date
Definition: Xcalo_r5387.h:29
TBranch * b_peakT_min
Definition: Xcalo_r5387.h:84