11 #include "TMVA/Tools.h" 12 #include "TMVA/Reader.h" 13 #include "TMVA/MethodCuts.h" 130 Float_t trackcellX[500];
131 Float_t trackcellY[500];
132 Float_t trackcellZ[500];
133 Float_t trackcellE[500];
134 Int_t trackcellADC[500];
135 Int_t trackcellPlane[500];
136 Int_t trackcellCell[500];
137 Float_t trackcellPECorr[500];
138 Float_t trackcellW[500];
146 Float_t slcellX[500];
147 Float_t slcellY[500];
148 Float_t slcellZ[500];
149 Float_t slcellE[500];
150 Int_t slcellADC[500];
151 Int_t slcellPlane[500];
152 Int_t slcellCell[500];
153 Float_t slcellPECorr[500];
154 Float_t slcellW[500];
161 Float_t prongEnergy[20];
162 Float_t prongPhi[20];
163 Float_t prongTheta[20];
164 Float_t prongStartX[20];
165 Float_t prongStartY[20];
166 Float_t prongStartZ[20];
167 Float_t prongLength[20];
168 Float_t prongStopX[20];
169 Float_t prongStopY[20];
170 Float_t prongStopZ[20];
171 Float_t prongEnergyXView[20];
172 Float_t prongEnergyYView[20];
173 Int_t prongNCells[20];
174 Int_t prongNCellsXView[20];
175 Int_t prongNCellsYView[20];
176 Int_t prongNplanes[20];
180 Int_t allprongIndex[500];
181 Float_t allprongcellX[500];
182 Float_t allprongcellY[500];
183 Float_t allprongcellZ[500];
184 Float_t allprongcellE[500];
185 Int_t allprongcellADC[500];
186 Int_t allprongcellPlane[500];
187 Int_t allprongcellCell[500];
188 Float_t allprongcellPECorr[500];
189 Float_t allprongcellW[500];
194 Float_t prong1cellX[500];
195 Float_t prong1cellY[500];
196 Float_t prong1cellZ[500];
197 Float_t prong1cellE[500];
198 Int_t prong1cellADC[500];
199 Int_t prong1cellPlane[500];
200 Int_t prong1cellCell[500];
201 Float_t prong1cellPECorr[500];
202 Float_t prong1cellW[500];
206 Int_t prong2DInXView[20];
207 Float_t prongEnergy2D[20];
208 Int_t prongNCells2D[20];
210 Float_t prongLength2D[20];
211 Float_t prongTheta2D[20];
212 Float_t prongStartX2D[20];
213 Float_t prongStartY2D[20];
214 Float_t prongStartZ2D[20];
215 Float_t prongStopX2D[20];
216 Float_t prongStopY2D[20];
217 Float_t prongStopZ2D[20];
220 Int_t allprong2DIndex[500];
221 Float_t allprong2DcellX[500];
222 Float_t allprong2DcellY[500];
223 Float_t allprong2DcellZ[500];
224 Float_t allprong2DcellE[500];
225 Int_t allprong2DcellADC[500];
226 Int_t allprong2DcellPlane[500];
227 Int_t allprong2DcellCell[500];
228 Float_t allprong2DcellPECorr[500];
238 Int_t shwNCellsXview[20];
239 Int_t shwNCellsYview[20];
240 Float_t shwLength[20];
241 Float_t shwStartX[20];
242 Float_t shwStartY[20];
243 Float_t shwStartZ[20];
244 Float_t shwStopX[20];
245 Float_t shwStopY[20];
246 Float_t shwStopZ[20];
247 Float_t shwTheta[20];
248 Float_t shwEcells[20];
253 Float_t shwcellX[500];
254 Float_t shwcellY[500];
255 Float_t shwcellZ[500];
256 Float_t shwcellE[500];
257 Int_t shwcellADC[500];
258 Int_t shwcellPlane[500];
259 Int_t shwcellCell[500];
260 Float_t shwcellPECorr[500];
261 Float_t shwcellW[500];
263 readNtuple(
const char* TypeNameIn,
const char* TypeNameOut, TChain *
tree=0);
266 virtual void Loop(
const char* TypeNameOut,
const char* TypeOpt);
272 #ifdef readNtuple_cxx 276 tree =
new TChain(
"Xnue");
279 while(
fin>>fstr) tree->Add(fstr);
283 TString histoname = (TString)TypeNameOut +
"_results.root";
284 myhists->bookHists(histoname);
286 cout<<
"********************************************"<<
endl;
287 cout<<
"Input File is "<<TypeNameIn<<
endl;
288 cout<<
"Output File is "<<histoname<<
endl;
289 cout<<
"********************************************"<<
endl;
295 delete fChain->GetCurrentFile();
298 myhists->saveHists();
309 fChain->SetBranchAddress(
"sl_runnum",&sl_runnum);
310 fChain->SetBranchAddress(
"sl_subrunnum",&sl_subrunnum);
311 fChain->SetBranchAddress(
"sl_evtnum",&sl_evtnum);
312 fChain->SetBranchAddress(
"sl_Nslices",&sl_Nslices);
313 fChain->SetBranchAddress(
"sl_goodSpill",&sl_goodSpill);
314 fChain->SetBranchAddress(
"sl_spillPOT",&sl_spillPOT);
315 fChain->SetBranchAddress(
"sliceIndex",&sliceIndex);
317 fChain->SetBranchAddress(
"sl_Ndeaddcm",&sl_Ndeaddcm);
319 fChain->SetBranchAddress(
"sl_horncurrent",&sl_horncurrent);
320 fChain->SetBranchAddress(
"sl_posX",&sl_posX);
321 fChain->SetBranchAddress(
"sl_posY",&sl_posY);
322 fChain->SetBranchAddress(
"sl_widthX",&sl_widthX);
323 fChain->SetBranchAddress(
"sl_widthY",&sl_widthY);
324 fChain->SetBranchAddress(
"sl_deltaspilltimensec",&sl_deltaspilltimensec);
326 fChain->SetBranchAddress(
"Vx",&Vx);
327 fChain->SetBranchAddress(
"Vy",&Vy);
328 fChain->SetBranchAddress(
"Vz",&Vz);
329 fChain->SetBranchAddress(
"recoVx",&recoVx);
330 fChain->SetBranchAddress(
"recoVy",&recoVy);
331 fChain->SetBranchAddress(
"recoVz",&recoVz);
333 fChain->SetBranchAddress(
"truePt",&truePt);
334 fChain->SetBranchAddress(
"trueE",&trueE);
335 fChain->SetBranchAddress(
"trueTheta",&trueTheta);
336 fChain->SetBranchAddress(
"ccnc",&ccnc);
337 fChain->SetBranchAddress(
"PDG",&PDG);
338 fChain->SetBranchAddress(
"origPDG",&origPDG);
340 fChain->SetBranchAddress(
"isQE",&isQE);
341 fChain->SetBranchAddress(
"intType",&intType);
342 fChain->SetBranchAddress(
"hitNucl",&hitNucl);
343 fChain->SetBranchAddress(
"HadX",&HadX);
344 fChain->SetBranchAddress(
"HadY",&HadY);
346 fChain->SetBranchAddress(
"qsqr",&qsqr);
347 fChain->SetBranchAddress(
"OscWt",&OscWt);
349 fChain->SetBranchAddress(
"lepPDG",&lepPDG);
350 fChain->SetBranchAddress(
"lepE",&lepE);
351 fChain->SetBranchAddress(
"lepPx",&lepPx);
352 fChain->SetBranchAddress(
"lepPy",&lepPy);
353 fChain->SetBranchAddress(
"lepPz",&lepPz);
354 fChain->SetBranchAddress(
"mesonPDG",&mesonPDG);
355 fChain->SetBranchAddress(
"mesonPx",&mesonPx);
356 fChain->SetBranchAddress(
"mesonPy",&mesonPy);
357 fChain->SetBranchAddress(
"mesonPz",&mesonPz);
359 fChain->SetBranchAddress(
"Ncells",&Ncells);
360 fChain->SetBranchAddress(
"Nplanes",&Nplanes);
361 fChain->SetBranchAddress(
"recoE",&recoE);
362 fChain->SetBranchAddress(
"MinPlane",&MinPlane);
364 fChain->SetBranchAddress(
"slcellNcell",&slcellNcell);
365 fChain->SetBranchAddress(
"slcellX",&slcellX);
366 fChain->SetBranchAddress(
"slcellY",&slcellY);
367 fChain->SetBranchAddress(
"slcellZ",&slcellZ);
368 fChain->SetBranchAddress(
"slcellE",&slcellE);
369 fChain->SetBranchAddress(
"slcellADC",&slcellADC);
370 fChain->SetBranchAddress(
"slcellPlane",&slcellPlane);
371 fChain->SetBranchAddress(
"slcellCell",&slcellCell);
372 fChain->SetBranchAddress(
"slcellPECorr",&slcellPECorr);
373 fChain->SetBranchAddress(
"slcellW",&slcellW);
375 fChain->SetBranchAddress(
"KtrackLength",&KtrackLength);
376 fChain->SetBranchAddress(
"KtrackEnergy",&KtrackEnergy);
377 fChain->SetBranchAddress(
"KtrackNcells_ratio",&KtrackNcells_ratio);
378 fChain->SetBranchAddress(
"KtrackNcells",&KtrackNcells);
379 fChain->SetBranchAddress(
"KtrackEnergy_ratio",&KtrackEnergy_ratio);
380 fChain->SetBranchAddress(
"KtrackNplanes",&KtrackNplanes);
381 fChain->SetBranchAddress(
"KtrackTheta",&KtrackTheta);
382 fChain->SetBranchAddress(
"KtrackPhi",&KtrackPhi);
383 fChain->SetBranchAddress(
"KtrackStartX",&KtrackStartX);
384 fChain->SetBranchAddress(
"KtrackStartY",&KtrackStartY);
385 fChain->SetBranchAddress(
"KtrackStartZ",&KtrackStartZ);
386 fChain->SetBranchAddress(
"KtrackStopX",&KtrackStopX);
387 fChain->SetBranchAddress(
"KtrackStopY",&KtrackStopY);
388 fChain->SetBranchAddress(
"KtrackStopZ",&KtrackStopZ);
389 fChain->SetBranchAddress(
"NKtracks",&NKtracks);
391 fChain->SetBranchAddress(
"trackcellNcell",&trackcellNcell);
392 fChain->SetBranchAddress(
"trackcellX",&trackcellX);
393 fChain->SetBranchAddress(
"trackcellY",&trackcellY);
394 fChain->SetBranchAddress(
"trackcellZ",&trackcellZ);
395 fChain->SetBranchAddress(
"trackcellE",&trackcellE);
396 fChain->SetBranchAddress(
"trackcellADC",&trackcellADC);
397 fChain->SetBranchAddress(
"trackcellPlane",&trackcellPlane);
398 fChain->SetBranchAddress(
"trackcellCell",&trackcellCell);
399 fChain->SetBranchAddress(
"trackcellPECorr",&trackcellPECorr);
400 fChain->SetBranchAddress(
"trackcellW",&trackcellW);
402 fChain->SetBranchAddress(
"Nmip",&Nmip);
403 fChain->SetBranchAddress(
"Fmip",&Fmip);
405 fChain->SetBranchAddress(
"Nprongs",&Nprongs);
406 fChain->SetBranchAddress(
"Ebalance",&Ebalance);
407 fChain->SetBranchAddress(
"Dphi",&Dphi);
409 fChain->SetBranchAddress(
"prongEnergy",&prongEnergy);
410 fChain->SetBranchAddress(
"prongPhi",&prongPhi);
411 fChain->SetBranchAddress(
"prongTheta",&prongTheta);
412 fChain->SetBranchAddress(
"prongLength",&prongLength);
413 fChain->SetBranchAddress(
"prongStartX",&prongStartX);
414 fChain->SetBranchAddress(
"prongStartY",&prongStartY);
415 fChain->SetBranchAddress(
"prongStartZ",&prongStartZ);
416 fChain->SetBranchAddress(
"prongStopX",&prongStopX);
417 fChain->SetBranchAddress(
"prongStopY",&prongStopY);
418 fChain->SetBranchAddress(
"prongStopZ",&prongStopZ);
419 fChain->SetBranchAddress(
"prongEnergyXView",&prongEnergyXView);
420 fChain->SetBranchAddress(
"prongEnergyYView",&prongEnergyYView);
421 fChain->SetBranchAddress(
"prongNCells",&prongNCells);
422 fChain->SetBranchAddress(
"prongNCellsXView",&prongNCellsXView);
423 fChain->SetBranchAddress(
"prongNCellsYView",&prongNCellsYView);
424 fChain->SetBranchAddress(
"prongNplanes",&prongNplanes);
426 fChain->SetBranchAddress(
"allprongcellNcell",&allprongcellNcell);
427 fChain->SetBranchAddress(
"allprongIndex",&allprongIndex);
428 fChain->SetBranchAddress(
"allprongcellX",&allprongcellX);
429 fChain->SetBranchAddress(
"allprongcellY",&allprongcellY);
430 fChain->SetBranchAddress(
"allprongcellZ",&allprongcellZ);
431 fChain->SetBranchAddress(
"allprongcellE",&allprongcellE);
432 fChain->SetBranchAddress(
"allprongcellADC",&allprongcellADC);
433 fChain->SetBranchAddress(
"allprongcellPlane",&allprongcellPlane);
434 fChain->SetBranchAddress(
"allprongcellCell",&allprongcellCell);
435 fChain->SetBranchAddress(
"allprongcellPECorr",&allprongcellPECorr);
436 fChain->SetBranchAddress(
"allprongcellW",&allprongcellW);
438 fChain->SetBranchAddress(
"prong1cellNcell",&prong1cellNcell);
439 fChain->SetBranchAddress(
"prong1Fmip",&prong1Fmip);
440 fChain->SetBranchAddress(
"prong1cellX",&prong1cellX);
441 fChain->SetBranchAddress(
"prong1cellY",&prong1cellY);
442 fChain->SetBranchAddress(
"prong1cellZ",&prong1cellZ);
443 fChain->SetBranchAddress(
"prong1cellE",&prong1cellE);
444 fChain->SetBranchAddress(
"prong1cellADC",&prong1cellADC);
445 fChain->SetBranchAddress(
"prong1cellPlane",&prong1cellPlane);
446 fChain->SetBranchAddress(
"prong1cellCell",&prong1cellCell);
447 fChain->SetBranchAddress(
"prong1cellPECorr",&prong1cellPECorr);
448 fChain->SetBranchAddress(
"prong1cellW",&prong1cellW);
450 fChain->SetBranchAddress(
"Nprongs2D",&Nprongs2D);
451 fChain->SetBranchAddress(
"Ebalance2D",&Ebalance2D);
452 fChain->SetBranchAddress(
"prong2DInXView",&prong2DInXView);
453 fChain->SetBranchAddress(
"prongEnergy2D",&prongEnergy2D);
454 fChain->SetBranchAddress(
"prongNCells2D",&prongNCells2D);
455 fChain->SetBranchAddress(
"prongLength2D",&prongLength2D);
456 fChain->SetBranchAddress(
"prongTheta2D",&prongTheta2D);
457 fChain->SetBranchAddress(
"prongStartX2D",&prongStartX2D);
458 fChain->SetBranchAddress(
"prongStartY2D",&prongStartY2D);
459 fChain->SetBranchAddress(
"prongStartZ2D",&prongStartZ2D);
460 fChain->SetBranchAddress(
"prongStopX2D",&prongStopX2D);
461 fChain->SetBranchAddress(
"prongStopY2D",&prongStopY2D);
462 fChain->SetBranchAddress(
"prongStopZ2D",&prongStopZ2D);
464 fChain->SetBranchAddress(
"allprong2DcellNcell",&allprong2DcellNcell);
465 fChain->SetBranchAddress(
"allprong2DIndex",&allprong2DIndex);
466 fChain->SetBranchAddress(
"allprong2DcellX",&allprong2DcellX);
467 fChain->SetBranchAddress(
"allprong2DcellY",&allprong2DcellY);
468 fChain->SetBranchAddress(
"allprong2DcellZ",&allprong2DcellZ);
469 fChain->SetBranchAddress(
"allprong2DcellE",&allprong2DcellE);
470 fChain->SetBranchAddress(
"allprong2DcellADC",&allprong2DcellADC);
471 fChain->SetBranchAddress(
"allprong2DcellPlane",&allprong2DcellPlane);
472 fChain->SetBranchAddress(
"allprong2DcellCell",&allprong2DcellCell);
473 fChain->SetBranchAddress(
"allprong2DcellPECorr",&allprong2DcellPECorr);
476 fChain->SetBranchAddress(
"lid",&lid);
477 fChain->SetBranchAddress(
"lide",&lide);
480 fChain->SetBranchAddress(
"Nshowers",&Nshowers);
481 fChain->SetBranchAddress(
"shwLID",&shwLID);
482 fChain->SetBranchAddress(
"shw3D",&shw3D);
483 fChain->SetBranchAddress(
"shwNCells",&shwNCells);
484 fChain->SetBranchAddress(
"shwNCellsXview",&shwNCellsXview);
485 fChain->SetBranchAddress(
"shwNCellsYview",&shwNCellsYview);
486 fChain->SetBranchAddress(
"shwLength",&shwLength);
487 fChain->SetBranchAddress(
"shwStartX",&shwStartX);
488 fChain->SetBranchAddress(
"shwStartY",&shwStartY);
489 fChain->SetBranchAddress(
"shwStartZ",&shwStartZ);
490 fChain->SetBranchAddress(
"shwStopX",&shwStopX);
491 fChain->SetBranchAddress(
"shwStopY",&shwStopY);
492 fChain->SetBranchAddress(
"shwStopZ",&shwStopZ);
493 fChain->SetBranchAddress(
"shwTheta",&shwTheta);
494 fChain->SetBranchAddress(
"shwEcells",&shwEcells);
495 fChain->SetBranchAddress(
"shwEnu",&shwEnu);
497 fChain->SetBranchAddress(
"shwcellNcell",&shwcellNcell);
498 fChain->SetBranchAddress(
"shwIndex",&shwIndex);
499 fChain->SetBranchAddress(
"shwcellX",&shwcellX);
500 fChain->SetBranchAddress(
"shwcellY",&shwcellY);
501 fChain->SetBranchAddress(
"shwcellZ",&shwcellZ);
502 fChain->SetBranchAddress(
"shwcellE",&shwcellE);
503 fChain->SetBranchAddress(
"shwcellADC",&shwcellADC);
504 fChain->SetBranchAddress(
"shwcellPlane",&shwcellPlane);
505 fChain->SetBranchAddress(
"shwcellCell",&shwcellCell);
506 fChain->SetBranchAddress(
"shwcellPECorr",&shwcellPECorr);
507 fChain->SetBranchAddress(
"shwcellW",&shwcellW);
511 #endif // #ifdef readNtuple_cxx
Float_t KtrackNcells_ratio
virtual void Init(TChain *tree)
readNtuple(const char *TypeNameIn, const char *TypeNameNu, const char *TypeNameInt, TChain *tree=0)
Float_t KtrackEnergy_ratio
Int_t sl_deltaspilltimensec
Int_t allprong2DcellNcell
Int_t sl_runnum
current Tree number in a TChain