g3numi.h
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////
2 // This class has been automatically generated on
3 // Thu Dec 4 16:19:50 2008 by ROOT version 5.21/07
4 // from TTree g3numi/neutrino
5 // found on file: generic_g3numi.root
6 //////////////////////////////////////////////////////////
7 
8 #ifndef g3numi_h
9 #define g3numi_h
10 
11 #include <TROOT.h>
12 #include <TChain.h>
13 #include <TFile.h>
14 
15 class g3numi {
16 public :
17  TTree *fChain; //!pointer to the analyzed TTree or TChain
18  Int_t fCurrent; //!current Tree number in a TChain
19 
20  // Declaration of leaf types
21  Int_t run;
22  Int_t evtno;
23  Float_t Ndxdz;
24  Float_t Ndydz;
25  Float_t Npz;
26  Float_t Nenergy;
27  Float_t Ndxdznea;
28  Float_t Ndydznea;
29  Float_t Nenergyn;
30  Float_t Nwtnear;
31  Float_t Ndxdzfar;
32  Float_t Ndydzfar;
33  Float_t Nenergyf;
34  Float_t Nwtfar;
35  Int_t Norig;
36  Int_t Ndecay;
37  Int_t Ntype;
38  Float_t Vx;
39  Float_t Vy;
40  Float_t Vz;
41  Float_t pdpx;
42  Float_t pdpy;
43  Float_t pdpz;
44  Float_t ppdxdz;
45  Float_t ppdydz;
46  Float_t pppz;
47  Float_t ppenergy;
48  Int_t ppmedium;
49  Int_t ptype;
50  Float_t ppvx;
51  Float_t ppvy;
52  Float_t ppvz;
53  Float_t muparpx;
54  Float_t muparpy;
55  Float_t muparpz;
56  Float_t mupare;
57  Float_t Necm;
58  Float_t Nimpwt;
59  Float_t xpoint;
60  Float_t ypoint;
61  Float_t zpoint;
62  Float_t tvx;
63  Float_t tvy;
64  Float_t tvz;
65  Float_t tpx;
66  Float_t tpy;
67  Float_t tpz;
68  Int_t tptype;
69  Int_t tgen;
70  Int_t tgptype;
71  Float_t tgppx;
72  Float_t tgppy;
73  Float_t tgppz;
74  Float_t tprivx;
75  Float_t tprivy;
76  Float_t tprivz;
77  Float_t beamx;
78  Float_t beamy;
79  Float_t beamz;
80  Float_t beampx;
81  Float_t beampy;
82  Float_t beampz;
83 
84  // List of branches
85  TBranch *b_run; //!
86  TBranch *b_evtno; //!
87  TBranch *b_Ndxdz; //!
88  TBranch *b_Ndydz; //!
89  TBranch *b_Npz; //!
90  TBranch *b_Nenergy; //!
91  TBranch *b_Ndxdznea; //!
92  TBranch *b_Ndydznea; //!
93  TBranch *b_Nenergyn; //!
94  TBranch *b_Nwtnear; //!
95  TBranch *b_Ndxdzfar; //!
96  TBranch *b_Ndydzfar; //!
97  TBranch *b_Nenergyf; //!
98  TBranch *b_Nwtfar; //!
99  TBranch *b_Norig; //!
100  TBranch *b_Ndecay; //!
101  TBranch *b_Ntype; //!
102  TBranch *b_Vx; //!
103  TBranch *b_Vy; //!
104  TBranch *b_Vz; //!
105  TBranch *b_pdpx; //!
106  TBranch *b_pdpy; //!
107  TBranch *b_pdpz; //!
108  TBranch *b_ppdxdz; //!
109  TBranch *b_ppdydz; //!
110  TBranch *b_pppz; //!
111  TBranch *b_ppenergy; //!
112  TBranch *b_ppmedium; //!
113  TBranch *b_ptype; //!
114  TBranch *b_ppvx; //!
115  TBranch *b_ppvy; //!
116  TBranch *b_ppvz; //!
117  TBranch *b_muparpx; //!
118  TBranch *b_muparpy; //!
119  TBranch *b_muparpz; //!
120  TBranch *b_mupare; //!
121  TBranch *b_Necm; //!
122  TBranch *b_Nimpwt; //!
123  TBranch *b_xpoint; //!
124  TBranch *b_ypoint; //!
125  TBranch *b_zpoint; //!
126  TBranch *b_tvx; //!
127  TBranch *b_tvy; //!
128  TBranch *b_tvz; //!
129  TBranch *b_tpx; //!
130  TBranch *b_tpy; //!
131  TBranch *b_tpz; //!
132  TBranch *b_tptype; //!
133  TBranch *b_tgen; //!
134  TBranch *b_tgptype; //!
135  TBranch *b_tgppx; //!
136  TBranch *b_tgppy; //!
137  TBranch *b_tgppz; //!
138  TBranch *b_tprivx; //!
139  TBranch *b_tprivy; //!
140  TBranch *b_tprivz; //!
141  TBranch *b_beamx; //!
142  TBranch *b_beamy; //!
143  TBranch *b_beamz; //!
144  TBranch *b_beampx; //!
145  TBranch *b_beampy; //!
146  TBranch *b_beampz; //!
147 
148  g3numi(TTree *tree=0);
149  virtual ~g3numi();
150  virtual Int_t Cut(Long64_t entry);
151  virtual Int_t GetEntry(Long64_t entry);
152  virtual Long64_t LoadTree(Long64_t entry);
153  virtual void Init(TTree *tree);
154  virtual void Loop();
155  virtual Bool_t Notify();
156  virtual void Show(Long64_t entry = -1);
157 };
158 
159 #endif
160 
161 #ifdef g3numi_cxx
162 g3numi::g3numi(TTree *tree)
163 {
164 // if parameter tree is not specified (or zero), connect the file
165 // used to generate this class and read the Tree.
166  if (tree == 0) {
167  TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("generic_g3numi.root");
168  if (!f) {
169  f = new TFile("generic_g3numi.root");
170  }
171  tree = (TTree*)gDirectory->Get("g3numi");
172 
173  }
174  Init(tree);
175 }
176 
178 {
179  if (!fChain) return;
180  delete fChain->GetCurrentFile();
181 }
182 
183 Int_t g3numi::GetEntry(Long64_t entry)
184 {
185 // Read contents of entry.
186  if (!fChain) return 0;
187  return fChain->GetEntry(entry);
188 }
189 Long64_t g3numi::LoadTree(Long64_t entry)
190 {
191 // Set the environment to read one entry
192  if (!fChain) return -5;
193  Long64_t centry = fChain->LoadTree(entry);
194  if (centry < 0) return centry;
195  if (!fChain->InheritsFrom(TChain::Class())) return centry;
196  TChain *chain = (TChain*)fChain;
197  if (chain->GetTreeNumber() != fCurrent) {
198  fCurrent = chain->GetTreeNumber();
199  Notify();
200  }
201  return centry;
202 }
203 
204 void g3numi::Init(TTree *tree)
205 {
206  // The Init() function is called when the selector needs to initialize
207  // a new tree or chain. Typically here the branch addresses and branch
208  // pointers of the tree will be set.
209  // It is normally not necessary to make changes to the generated
210  // code, but the routine can be extended by the user if needed.
211  // Init() will be called many times when running on PROOF
212  // (once per file to be processed).
213 
214  // Set branch addresses and branch pointers
215  if (!tree) return;
216  fChain = tree;
217  fCurrent = -1;
218  fChain->SetMakeClass(1);
219 
220  fChain->SetBranchAddress("run", &run, &b_run);
221  fChain->SetBranchAddress("evtno", &evtno, &b_evtno);
222  fChain->SetBranchAddress("Ndxdz", &Ndxdz, &b_Ndxdz);
223  fChain->SetBranchAddress("Ndydz", &Ndydz, &b_Ndydz);
224  fChain->SetBranchAddress("Npz", &Npz, &b_Npz);
225  fChain->SetBranchAddress("Nenergy", &Nenergy, &b_Nenergy);
226  fChain->SetBranchAddress("Ndxdznea", &Ndxdznea, &b_Ndxdznea);
227  fChain->SetBranchAddress("Ndydznea", &Ndydznea, &b_Ndydznea);
228  fChain->SetBranchAddress("Nenergyn", &Nenergyn, &b_Nenergyn);
229  fChain->SetBranchAddress("Nwtnear", &Nwtnear, &b_Nwtnear);
230  fChain->SetBranchAddress("Ndxdzfar", &Ndxdzfar, &b_Ndxdzfar);
231  fChain->SetBranchAddress("Ndydzfar", &Ndydzfar, &b_Ndydzfar);
232  fChain->SetBranchAddress("Nenergyf", &Nenergyf, &b_Nenergyf);
233  fChain->SetBranchAddress("Nwtfar", &Nwtfar, &b_Nwtfar);
234  fChain->SetBranchAddress("Norig", &Norig, &b_Norig);
235  fChain->SetBranchAddress("Ndecay", &Ndecay, &b_Ndecay);
236  fChain->SetBranchAddress("Ntype", &Ntype, &b_Ntype);
237  fChain->SetBranchAddress("Vx", &Vx, &b_Vx);
238  fChain->SetBranchAddress("Vy", &Vy, &b_Vy);
239  fChain->SetBranchAddress("Vz", &Vz, &b_Vz);
240  fChain->SetBranchAddress("pdpx", &pdpx, &b_pdpx);
241  fChain->SetBranchAddress("pdpy", &pdpy, &b_pdpy);
242  fChain->SetBranchAddress("pdpz", &pdpz, &b_pdpz);
243  fChain->SetBranchAddress("ppdxdz", &ppdxdz, &b_ppdxdz);
244  fChain->SetBranchAddress("ppdydz", &ppdydz, &b_ppdydz);
245  fChain->SetBranchAddress("pppz", &pppz, &b_pppz);
246  fChain->SetBranchAddress("ppenergy", &ppenergy, &b_ppenergy);
247  fChain->SetBranchAddress("ppmedium", &ppmedium, &b_ppmedium);
248  fChain->SetBranchAddress("ptype", &ptype, &b_ptype);
249  fChain->SetBranchAddress("ppvx", &ppvx, &b_ppvx);
250  fChain->SetBranchAddress("ppvy", &ppvy, &b_ppvy);
251  fChain->SetBranchAddress("ppvz", &ppvz, &b_ppvz);
252  fChain->SetBranchAddress("muparpx", &muparpx, &b_muparpx);
253  fChain->SetBranchAddress("muparpy", &muparpy, &b_muparpy);
254  fChain->SetBranchAddress("muparpz", &muparpz, &b_muparpz);
255  fChain->SetBranchAddress("mupare", &mupare, &b_mupare);
256  fChain->SetBranchAddress("Necm", &Necm, &b_Necm);
257  fChain->SetBranchAddress("Nimpwt", &Nimpwt, &b_Nimpwt);
258  fChain->SetBranchAddress("xpoint", &xpoint, &b_xpoint);
259  fChain->SetBranchAddress("ypoint", &ypoint, &b_ypoint);
260  fChain->SetBranchAddress("zpoint", &zpoint, &b_zpoint);
261  fChain->SetBranchAddress("tvx", &tvx, &b_tvx);
262  fChain->SetBranchAddress("tvy", &tvy, &b_tvy);
263  fChain->SetBranchAddress("tvz", &tvz, &b_tvz);
264  fChain->SetBranchAddress("tpx", &tpx, &b_tpx);
265  fChain->SetBranchAddress("tpy", &tpy, &b_tpy);
266  fChain->SetBranchAddress("tpz", &tpz, &b_tpz);
267  fChain->SetBranchAddress("tptype", &tptype, &b_tptype);
268  fChain->SetBranchAddress("tgen", &tgen, &b_tgen);
269  fChain->SetBranchAddress("tgptype", &tgptype, &b_tgptype);
270  fChain->SetBranchAddress("tgppx", &tgppx, &b_tgppx);
271  fChain->SetBranchAddress("tgppy", &tgppy, &b_tgppy);
272  fChain->SetBranchAddress("tgppz", &tgppz, &b_tgppz);
273  fChain->SetBranchAddress("tprivx", &tprivx, &b_tprivx);
274  fChain->SetBranchAddress("tprivy", &tprivy, &b_tprivy);
275  fChain->SetBranchAddress("tprivz", &tprivz, &b_tprivz);
276  fChain->SetBranchAddress("beamx", &beamx, &b_beamx);
277  fChain->SetBranchAddress("beamy", &beamy, &b_beamy);
278  fChain->SetBranchAddress("beamz", &beamz, &b_beamz);
279  fChain->SetBranchAddress("beampx", &beampx, &b_beampx);
280  fChain->SetBranchAddress("beampy", &beampy, &b_beampy);
281  fChain->SetBranchAddress("beampz", &beampz, &b_beampz);
282  Notify();
283 }
284 
285 Bool_t g3numi::Notify()
286 {
287  // The Notify() function is called when a new file is opened. This
288  // can be either for a new TTree in a TChain or when when a new TTree
289  // is started when using PROOF. It is normally not necessary to make changes
290  // to the generated code, but the routine can be extended by the
291  // user if needed. The return value is currently not used.
292 
293  return kTRUE;
294 }
295 
296 void g3numi::Show(Long64_t entry)
297 {
298 // Print contents of entry.
299 // If entry is not specified, print current entry
300  if (!fChain) return;
301  fChain->Show(entry);
302 }
303 Int_t g3numi::Cut(Long64_t /* entry */)
304 {
305 // This function may be called from Loop.
306 // returns 1 if entry is accepted.
307 // returns -1 otherwise.
308  return 1;
309 }
310 #endif // #ifdef g3numi_cxx
Float_t Nwtfar
Definition: g3numi.h:34
Float_t muparpx
Definition: g3numi.h:53
Float_t pppz
Definition: g3numi.h:46
Float_t tpx
Definition: g3numi.h:65
Definition: g3numi.h:15
TBranch * b_ppdxdz
Definition: g3numi.h:108
Float_t Ndxdzfar
Definition: g3numi.h:31
Float_t pdpy
Definition: g3numi.h:42
virtual Bool_t Notify()
Float_t zpoint
Definition: g3numi.h:61
Float_t muparpz
Definition: g3numi.h:55
TBranch * b_ptype
Definition: g3numi.h:113
TBranch * b_zpoint
Definition: g3numi.h:125
Float_t tvx
Definition: g3numi.h:62
QList< Entry > entry
Float_t ppvz
Definition: g3numi.h:52
TBranch * b_ppdydz
Definition: g3numi.h:109
virtual void Loop()
virtual void Init(TTree *tree)
Float_t beampz
Definition: g3numi.h:82
TBranch * b_ppenergy
Definition: g3numi.h:111
TBranch * b_ppmedium
Definition: g3numi.h:112
TBranch * b_tpz
Definition: g3numi.h:131
virtual Long64_t LoadTree(Long64_t entry)
TBranch * b_tgppz
Definition: g3numi.h:137
virtual Int_t Cut(Long64_t entry)
Float_t beamy
Definition: g3numi.h:78
virtual Int_t GetEntry(Long64_t entry)
Float_t tgppz
Definition: g3numi.h:73
TBranch * b_tvy
Definition: g3numi.h:127
TBranch * b_Ndydz
Definition: g3numi.h:88
TBranch * b_ypoint
Definition: g3numi.h:124
TBranch * b_Nenergyf
Definition: g3numi.h:97
TBranch * b_tptype
Definition: g3numi.h:132
TBranch * b_tpx
Definition: g3numi.h:129
TBranch * b_tgppy
Definition: g3numi.h:136
TBranch * b_tgen
Definition: g3numi.h:133
Float_t muparpy
Definition: g3numi.h:54
Float_t tprivx
Definition: g3numi.h:74
Float_t Ndxdz
Definition: g3numi.h:23
TBranch * b_evtno
Definition: g3numi.h:86
TBranch * b_pdpy
Definition: g3numi.h:106
Float_t Necm
Definition: g3numi.h:57
TBranch * b_ppvy
Definition: g3numi.h:115
Float_t ppvx
Definition: g3numi.h:50
Float_t Nenergy
Definition: g3numi.h:26
TBranch * b_tprivy
Definition: g3numi.h:139
Float_t Vz
Definition: g3numi.h:40
TBranch * b_tvx
Definition: g3numi.h:126
TBranch * b_Ndecay
Definition: g3numi.h:100
Float_t Nwtnear
Definition: g3numi.h:30
TBranch * b_Nwtnear
Definition: g3numi.h:94
Int_t tgen
Definition: g3numi.h:69
Float_t tvz
Definition: g3numi.h:64
Int_t evtno
Definition: g3numi.h:22
TBranch * b_tprivx
Definition: g3numi.h:138
TBranch * b_beamy
Definition: g3numi.h:142
virtual ~g3numi()
Float_t beamz
Definition: g3numi.h:79
Float_t Nenergyf
Definition: g3numi.h:33
TBranch * b_beampx
Definition: g3numi.h:144
TBranch * b_tgptype
Definition: g3numi.h:134
Float_t Ndydz
Definition: g3numi.h:24
g3numi(TTree *tree=0)
TBranch * b_beampy
Definition: g3numi.h:145
TBranch * b_pdpz
Definition: g3numi.h:107
Int_t Ntype
Definition: g3numi.h:37
TBranch * b_muparpx
Definition: g3numi.h:117
TBranch * b_Nimpwt
Definition: g3numi.h:122
TBranch * b_ppvz
Definition: g3numi.h:116
TBranch * b_Nwtfar
Definition: g3numi.h:98
TBranch * b_tpy
Definition: g3numi.h:130
Float_t ppvy
Definition: g3numi.h:51
TBranch * b_Ndxdznea
Definition: g3numi.h:91
Int_t tgptype
Definition: g3numi.h:70
Float_t ppenergy
Definition: g3numi.h:47
TTree * fChain
Definition: g3numi.h:17
Int_t run
current Tree number in a TChain
Definition: g3numi.h:21
Int_t tptype
Definition: g3numi.h:68
TBranch * b_Npz
Definition: g3numi.h:89
TBranch * b_Nenergyn
Definition: g3numi.h:93
TBranch * b_Norig
Definition: g3numi.h:99
TBranch * b_ppvx
Definition: g3numi.h:114
TBranch * b_tvz
Definition: g3numi.h:128
Float_t tpz
Definition: g3numi.h:67
Int_t Ndecay
Definition: g3numi.h:36
Float_t mupare
Definition: g3numi.h:56
Float_t Vy
Definition: g3numi.h:39
TBranch * b_tprivz
Definition: g3numi.h:140
Float_t Ndxdznea
Definition: g3numi.h:27
Float_t Nimpwt
Definition: g3numi.h:58
Int_t fCurrent
pointer to the analyzed TTree or TChain
Definition: g3numi.h:18
Float_t Vx
Definition: g3numi.h:38
TBranch * b_Ndxdz
Definition: g3numi.h:87
Float_t Npz
Definition: g3numi.h:25
TBranch * b_Necm
Definition: g3numi.h:121
Int_t ppmedium
Definition: g3numi.h:48
Float_t ppdxdz
Definition: g3numi.h:44
TBranch * b_Ndydznea
Definition: g3numi.h:92
Float_t tgppy
Definition: g3numi.h:72
TBranch * b_pppz
Definition: g3numi.h:110
Float_t tgppx
Definition: g3numi.h:71
TBranch * b_xpoint
Definition: g3numi.h:123
Float_t ypoint
Definition: g3numi.h:60
TBranch * b_run
Definition: g3numi.h:85
Float_t xpoint
Definition: g3numi.h:59
TBranch * b_beamx
Definition: g3numi.h:141
virtual void Show(Long64_t entry=-1)
TBranch * b_Nenergy
Definition: g3numi.h:90
Float_t tprivy
Definition: g3numi.h:75
TBranch * b_beamz
Definition: g3numi.h:143
Float_t Nenergyn
Definition: g3numi.h:29
TBranch * b_muparpy
Definition: g3numi.h:118
Float_t beamx
Definition: g3numi.h:77
Float_t Ndydznea
Definition: g3numi.h:28
Int_t ptype
Definition: g3numi.h:49
TBranch * b_Ntype
Definition: g3numi.h:101
TBranch * b_tgppx
Definition: g3numi.h:135
Float_t tvy
Definition: g3numi.h:63
Float_t ppdydz
Definition: g3numi.h:45
Float_t tprivz
Definition: g3numi.h:76
Float_t beampx
Definition: g3numi.h:80
TBranch * b_muparpz
Definition: g3numi.h:119
TBranch * b_mupare
Definition: g3numi.h:120
TBranch * b_Ndxdzfar
Definition: g3numi.h:95
TBranch * b_Vy
Definition: g3numi.h:103
Float_t beampy
Definition: g3numi.h:81
TBranch * b_Ndydzfar
Definition: g3numi.h:96
TBranch * b_beampz
Definition: g3numi.h:146
Int_t Norig
Definition: g3numi.h:35
TBranch * b_Vx
Definition: g3numi.h:102
TBranch * b_pdpx
Definition: g3numi.h:105
Float_t tpy
Definition: g3numi.h:66
Float_t Ndydzfar
Definition: g3numi.h:32
Float_t pdpz
Definition: g3numi.h:43
TBranch * b_Vz
Definition: g3numi.h:104
Float_t pdpx
Definition: g3numi.h:41