eventRates.h
Go to the documentation of this file.
1 
2 //////////////////////////////////////////////////////////
3 // Created by L. Loiacono
4 // Modified by L. Fields
5 //////////////////////////////////////////////////////////
6 
7 #ifndef eventRates_h
8 #define eventRates_h
9 
10 // C++
11 #include <string>
12 #include <vector>
13 #include <fstream>
14 #include <iostream>
15 #include <iomanip>
16 #include <sstream>
17 
18 //ROOT
19 #include <TROOT.h>
20 #include <TChain.h>
21 #include <TFile.h>
22 #include <TRandom3.h>
23 
24 // Dk2nu
25 //#ifndef __CINT__
26 #include "dk2nu/tree/dk2nu.h"
27 //#endif // ifndef __ CINT__
28 
29 class eventRates {
30 public :
31 
32  TChain *fChain; //!pointer to the analyzed TTree or TChain
33  //TTree *fChain; //!pointer to the analyzed TTree or TChain
34  Int_t fCurrent; //!current Tree number in a TChain
35 
36  Double_t fTotalPOT; //total pot used for all files
37  std::string ffilename; //filename for saving histograms
38 
40  double detx; // detector location
41  double dety;
42  double detz;
43 
44  TRandom3 *rand3;
45 
46  // Declaration of leaf types
47  //LBNEDataNtp_t *data;
48  Int_t run;
49  Int_t evtno;
50  Int_t protonN;
51  Float_t beamHWidth;
52  Float_t beamVWidth;
53  Float_t beamX;
54  Float_t beamY;
55  Float_t protonX;
56  Float_t protonY;
57  Float_t protonZ;
58  Float_t protonPx;
59  Float_t protonPy;
60  Float_t protonPz;
61  Float_t nuTarZ;
62  Float_t hornCurrent;
63  Float_t Ndxdz;
64  Float_t Ndydz;
65  Float_t Npz;
66  Float_t Nenergy;
67  Float_t NdxdzNear[5];
68  Float_t NdydzNear[5];
69  Float_t NenergyN[5];
70  Double_t NWtNear[5];
71  Float_t NdxdzFar[3];
72  Float_t NdydzFar[3];
73  Float_t NenergyF[3];
74  Double_t NWtFar[3];
75  Int_t Norig;
76  Int_t Ndecay;
77  Int_t Ntype;
78  Float_t Vx;
79  Float_t Vy;
80  Float_t Vz;
81  Float_t pdPx;
82  Float_t pdPy;
83  Float_t pdPz;
84  Float_t ppdxdz;
85  Float_t ppdydz;
86  Float_t pppz;
87  Float_t ppenergy;
88  Float_t ppmedium;
89  Int_t ptype;
90  Int_t ptrkid;
91  Float_t ppvx;
92  Float_t ppvy;
93  Float_t ppvz;
94  Float_t muparpx;
95  Float_t muparpy;
96  Float_t muparpz;
97  Float_t mupare;
98  Float_t Necm;
99  Double_t Nimpwt;
100  Float_t xpoint;
101  Float_t ypoint;
102  Float_t zpoint;
103  Float_t tvx;
104  Float_t tvy;
105  Float_t tvz;
106  Float_t tpx;
107  Float_t tpy;
108  Float_t tpz;
109  Int_t tptype;
110  Int_t tgen;
111  //map<int,TrackPoint_t> fTrkPtMap;
112 
113  bool isDk2nu = false;
114 
115  // List of branches
116  bsim::Dk2Nu* dk2nu;
117 
118  TBranch *b_data_run; //!
119  TBranch *b_data_evtno; //!
120  TBranch *b_data_protonN; //!
121  TBranch *b_data_beamHWidth; //!
122  TBranch *b_data_beamVWidth; //!
123  TBranch *b_data_beamX; //!
124  TBranch *b_data_beamY; //!
125  TBranch *b_data_protonX; //!
126  TBranch *b_data_protonY; //!
127  TBranch *b_data_protonZ; //!
128  TBranch *b_data_protonPx; //!
129  TBranch *b_data_protonPy; //!
130  TBranch *b_data_protonPz; //!
131  TBranch *b_data_nuTarZ; //!
132  TBranch *b_data_hornCurrent; //!
133  TBranch *b_data_Ndxdz; //!
134  TBranch *b_data_Ndydz; //!
135  TBranch *b_data_Npz; //!
136  TBranch *b_data_Nenergy; //!
137  TBranch *b_data_NdxdzNear; //!
138  TBranch *b_data_NdydzNear; //!
139  TBranch *b_data_NenergyN; //!
140  TBranch *b_data_NWtNear; //!
141  TBranch *b_data_NdxdzFar; //!
142  TBranch *b_data_NdydzFar; //!
143  TBranch *b_data_NenergyF; //!
144  TBranch *b_data_NWtFar; //!
145  TBranch *b_data_Norig; //!
146  TBranch *b_data_Ndecay; //!
147  TBranch *b_data_Ntype; //!
148  TBranch *b_data_Vx; //!
149  TBranch *b_data_Vy; //!
150  TBranch *b_data_Vz; //!
151  TBranch *b_data_pdPx; //!
152  TBranch *b_data_pdPy; //!
153  TBranch *b_data_pdPz; //!
154  TBranch *b_data_ppdxdz; //!
155  TBranch *b_data_ppdydz; //!
156  TBranch *b_data_pppz; //!
157  TBranch *b_data_ppenergy; //!
158  TBranch *b_data_ppmedium; //!
159  TBranch *b_data_ptype; //!
160  TBranch *b_data_ptrkid; //!
161  TBranch *b_data_ppvx; //!
162  TBranch *b_data_ppvy; //!
163  TBranch *b_data_ppvz; //!
164  TBranch *b_data_muparpx; //!
165  TBranch *b_data_muparpy; //!
166  TBranch *b_data_muparpz; //!
167  TBranch *b_data_mupare; //!
168  TBranch *b_data_Necm; //!
169  TBranch *b_data_Nimpwt; //!
170  TBranch *b_data_xpoint; //!
171  TBranch *b_data_ypoint; //!
172  TBranch *b_data_zpoint; //!
173  TBranch *b_data_tvx; //!
174  TBranch *b_data_tvy; //!
175  TBranch *b_data_tvz; //!
176  TBranch *b_data_tpx; //!
177  TBranch *b_data_tpy; //!
178  TBranch *b_data_tpz; //!
179  TBranch *b_data_tptype; //!
180  TBranch *b_data_tgen; //!
181 
184  int n_files, int start_index, double pot_per_file, bool on_grid,
185  bool dk2nu);
186 
187  virtual ~eventRates();
188  virtual Int_t Cut(Long64_t entry);
189  virtual Int_t GetEntry(Long64_t entry);
190  virtual Long64_t LoadTree(Long64_t entry);
191  virtual void Init(TTree *tree);
192  virtual void Loop();
193  virtual Bool_t Notify();
194  virtual void Show(Long64_t entry = -1);
195 
196  std::string GetPOTAsString(const double dpot);
197  void SetTitles(TH1* h,
198  const std::string &xtitle = "",
199  const std::string &ytitle = "");
200 
201  double GetWeight(const std::vector<double> xdet,
202  double& nu_wght,
203  double& nu_energy);
204 
205  double GetXSec( double nu_type,
206  double nu_energy,
208 
209  void ReadXSecsFromFiles( );
210 
211  double GetOscillatedNeutrinoType(double ntype, double E);
212 
213 
214  private:
215 
216  std::ifstream fdat_file[6];
217  int fnbins;
218  int fnlines;
219  double f_e_arr[1500][6][2]; // energy bins; neutrino type; CC/NC
220  double f_xsec_arr[1500][6][2]; // energy bins; neutrino type; CC/NC
221 
222 };
223 
224 #endif
225 
226 #ifdef eventRates_cxx
227 
228 eventRates::eventRates(std::string input_user, std::string version, std::string macro, std::string current, std::string location, std::string physics_list, int n_files,int start_index, double potperfile, bool on_grid,bool dk2nu)
229 {
230  // simulation = G4PBeam (default) or Fluka
231  // macro = Nominal, etc
232  // location = LBNEFD (default), LBNEND, etc
233  // physics_list = QGSP_BERT (default), QGSP, FTFP_BERT, etc
234  // n_files = 250 (default)
235  // potperfile = 100000 (default)
236 
237  isDk2nu = dk2nu;
238 
239  // Read the cross-sections from files
241 
242  // Otherwise Set detector coordinates based on requested detector location
243  if(location=="LBNEND") {
244  detx = 0.0;
245  dety = 0.0;
246  detz = 57400.0;
247  }
248 
249  else if(location=="LBNEFD") {
250  detx = 0.0;
251  dety = 0.0;
252  detz = 129700000.0;
253  }
254 
255  detectorname = location;
256 
257  std::string input_flux_dir = "/pnfs/dune/scratch/users/"+input_user+"/fluxfiles/g4lbne/"+version+"/"+physics_list+"/"+macro+"/"+current+"/flux/";
258  if(input_user=="beam")
259  input_flux_dir = "/dune/data/beam/fluxfiles/g4lbne/"+version+"/"+physics_list+"/"+macro+"/"+current+"/flux/";
260  if(on_grid) {
261  input_flux_dir = getenv("_CONDOR_SCRATCH_DIR");
262  input_flux_dir = input_flux_dir + "/";
263  }
264 
265  std::vector<std::string> fFileVec;
266 
267 
268  for(int i = start_index; i< start_index+n_files; i++) {
269 
270  // convert index into zero-padded string
271  std::ostringstream ss_5;
272  std::ostringstream ss_3;
273  ss_5 << std::setw( 5 ) << std::setfill( '0' ) << i;
274  ss_3 << std::setw( 3 ) << std::setfill( '0' ) << i;
275  std::string index_string_5 = ss_5.str();
276  std::string index_string_3 = ss_3.str();
277 
278  std::string flux_file = input_flux_dir + "g4lbne_"+version+"_"+physics_list+"_"+macro+"_"+current+"_"+index_string_3+".root";
279 
280  if(isDk2nu)
281  flux_file = input_flux_dir + "g4lbne_"+version+"_"+physics_list+"_"+macro+"_"+current+"_dk2nu_"+index_string_5+".root";
282 
283  // check that the file exists and is a valid root file
284  TFile f(flux_file.c_str());
285  if (!f.IsZombie())
286  fFileVec.push_back(flux_file.c_str());
287  }
288 
289  //set number of pot per file !!!!!!!!!!!!!!!!!!!!!!!!!!!!
290  //
291  fTotalPOT = potperfile*(double)fFileVec.size();
292 
293  //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
294  //set the filename prefix for saving histogram plots
295  //
296  std::string start_index_string;
297  std::string end_index_string;
298 
299  std::ostringstream start_convert;
300  start_convert << start_index;
301  start_index_string = start_convert.str();
302 
303  std::ostringstream end_convert;
304  end_convert << start_index + n_files;
305  end_index_string = end_convert.str();
306 
307  // if someone is making files from someone else's flux files
308  // he/she probably wants to write to his own directory
309  // instead of someone else's
311  if(!on_grid) {
312  std::string output_user = getenv("USER");
313  output_flux_dir = "/dune/data/users/"+output_user+"/fluxfiles/g4lbne/"+version+"/"+physics_list+"/"+macro+"/"+current+"/flux/";
314  system(("mkdir -p "+output_flux_dir).c_str());
315  }
316 
317  ffilename = output_flux_dir + "histos_g4lbne_"+version+"_"+physics_list+"_"+macro+"_"+current;
318 
319  if(n_files==1)
320  ffilename = output_flux_dir + "histos_g4lbne_"+version+"_"+physics_list+"_"+macro+"_"+current+"_"+start_index_string;
321 
322  //
323  //????????????????????????????
324  //????????????????????????????
325  std::string ntuple_name = "nudata";
326  if(isDk2nu)
327  ntuple_name = "dk2nuTree";
328 
329  fChain = new TChain(ntuple_name.c_str());
330  for(std::vector<std::string>::const_iterator sit = fFileVec.begin(); sit != fFileVec.end(); ++sit)
331  {
332  fChain -> Add(sit -> c_str());
333  }
334 
335  Init(fChain);
336 
337  // initialize random numbers used for oscillation calculations
338  rand3 = new TRandom3(0);
339 
340 }
341 
343 {
344  if (!fChain) return;
345  delete fChain->GetCurrentFile();
346 }
347 
348 Int_t eventRates::GetEntry(Long64_t entry)
349 {
350 // Read contents of entry.
351  if (!fChain) return 0;
352  return fChain->GetEntry(entry);
353 }
354 Long64_t eventRates::LoadTree(Long64_t entry)
355 {
356 // Set the environment to read one entry
357  if (!fChain) return -5;
358  Long64_t centry = fChain->LoadTree(entry);
359  if (centry < 0) return centry;
360  if (!fChain->InheritsFrom(TChain::Class())) return centry;
361  TChain *chain = (TChain*)fChain;
362  if (chain->GetTreeNumber() != fCurrent) {
363  fCurrent = chain->GetTreeNumber();
364  Notify();
365  }
366  return centry;
367 }
368 
369 void eventRates::Init(TTree *tree)
370 {
371  // The Init() function is called when the selector needs to initialize
372  // a new tree or chain. Typically here the branch addresses and branch
373  // pointers of the tree will be set.
374  // It is normally not necessary to make changes to the generated
375  // code, but the routine can be extended by the user if needed.
376  // Init() will be called many times when running on PROOF
377  // (once per file to be processed).
378 
379  // Set branch addresses and branch pointers
380 
381  fCurrent = -1;
382 
383 
384 
385  if(!isDk2nu) {
386  fChain->SetMakeClass(1);
387  fChain->SetBranchAddress("run", &run, &b_data_run);
388  fChain->SetBranchAddress("evtno", &evtno, &b_data_evtno);
389  fChain->SetBranchAddress("protonN", &protonN, &b_data_protonN);
390  fChain->SetBranchAddress("beamHWidth", &beamHWidth, &b_data_beamHWidth);
391  fChain->SetBranchAddress("beamVWidth", &beamVWidth, &b_data_beamVWidth);
392  fChain->SetBranchAddress("beamX", &beamX, &b_data_beamX);
393  fChain->SetBranchAddress("beamY", &beamY, &b_data_beamY);
394  fChain->SetBranchAddress("protonX", &protonX, &b_data_protonX);
395  fChain->SetBranchAddress("protonY", &protonY, &b_data_protonY);
396  fChain->SetBranchAddress("protonZ", &protonZ, &b_data_protonZ);
397  fChain->SetBranchAddress("protonPx", &protonPx, &b_data_protonPx);
398  fChain->SetBranchAddress("protonPy", &protonPy, &b_data_protonPy);
399  fChain->SetBranchAddress("protonPz", &protonPz, &b_data_protonPz);
400  fChain->SetBranchAddress("nuTarZ", &nuTarZ, &b_data_nuTarZ);
401  fChain->SetBranchAddress("hornCurrent", &hornCurrent, &b_data_hornCurrent);
402  fChain->SetBranchAddress("Ndxdz", &Ndxdz, &b_data_Ndxdz);
403  fChain->SetBranchAddress("Ndydz", &Ndydz, &b_data_Ndydz);
404  fChain->SetBranchAddress("Npz", &Npz, &b_data_Npz);
405  fChain->SetBranchAddress("Nenergy", &Nenergy, &b_data_Nenergy);
406  fChain->SetBranchAddress("NdxdzNear[5]", NdxdzNear, &b_data_NdxdzNear);
407  fChain->SetBranchAddress("NdydzNear[5]", NdydzNear, &b_data_NdydzNear);
408  fChain->SetBranchAddress("NenergyN[5]", NenergyN, &b_data_NenergyN);
409  fChain->SetBranchAddress("NWtNear[5]", NWtNear, &b_data_NWtNear);
410  fChain->SetBranchAddress("NdxdzFar[3]", NdxdzFar, &b_data_NdxdzFar);
411  fChain->SetBranchAddress("NdydzFar[3]", NdydzFar, &b_data_NdydzFar);
412  fChain->SetBranchAddress("NenergyF[3]", NenergyF, &b_data_NenergyF);
413  fChain->SetBranchAddress("NWtFar[3]", NWtFar, &b_data_NWtFar);
414  fChain->SetBranchAddress("Norig", &Norig, &b_data_Norig);
415  fChain->SetBranchAddress("Ndecay", &Ndecay, &b_data_Ndecay);
416  fChain->SetBranchAddress("Ntype", &Ntype, &b_data_Ntype);
417  fChain->SetBranchAddress("Vx", &Vx, &b_data_Vx);
418  fChain->SetBranchAddress("Vy", &Vy, &b_data_Vy);
419  fChain->SetBranchAddress("Vz", &Vz, &b_data_Vz);
420  fChain->SetBranchAddress("pdPx", &pdPx, &b_data_pdPx);
421  fChain->SetBranchAddress("pdPy", &pdPy, &b_data_pdPy);
422  fChain->SetBranchAddress("pdPz", &pdPz, &b_data_pdPz);
423  fChain->SetBranchAddress("ppdxdz", &ppdxdz, &b_data_ppdxdz);
424  fChain->SetBranchAddress("ppdydz", &ppdydz, &b_data_ppdydz);
425  fChain->SetBranchAddress("pppz", &pppz, &b_data_pppz);
426  fChain->SetBranchAddress("ppenergy", &ppenergy, &b_data_ppenergy);
427  fChain->SetBranchAddress("ppmedium", &ppmedium, &b_data_ppmedium);
428  fChain->SetBranchAddress("ptype", &ptype, &b_data_ptype);
429  fChain->SetBranchAddress("ptrkid", &ptrkid, &b_data_ptrkid);
430  fChain->SetBranchAddress("ppvx", &ppvx, &b_data_ppvx);
431  fChain->SetBranchAddress("ppvy", &ppvy, &b_data_ppvy);
432  fChain->SetBranchAddress("ppvz", &ppvz, &b_data_ppvz);
433  fChain->SetBranchAddress("muparpx", &muparpx, &b_data_muparpx);
434  fChain->SetBranchAddress("muparpy", &muparpy, &b_data_muparpy);
435  fChain->SetBranchAddress("muparpz", &muparpz, &b_data_muparpz);
436  fChain->SetBranchAddress("mupare", &mupare, &b_data_mupare);
437  fChain->SetBranchAddress("Necm", &Necm, &b_data_Necm);
438  fChain->SetBranchAddress("Nimpwt", &Nimpwt, &b_data_Nimpwt);
439  fChain->SetBranchAddress("xpoint", &xpoint, &b_data_xpoint);
440  fChain->SetBranchAddress("ypoint", &ypoint, &b_data_ypoint);
441  fChain->SetBranchAddress("zpoint", &zpoint, &b_data_zpoint);
442  fChain->SetBranchAddress("tvx", &tvx, &b_data_tvx);
443  fChain->SetBranchAddress("tvy", &tvy, &b_data_tvy);
444  fChain->SetBranchAddress("tvz", &tvz, &b_data_tvz);
445  fChain->SetBranchAddress("tpx", &tpx, &b_data_tpx);
446  fChain->SetBranchAddress("tpy", &tpy, &b_data_tpy);
447  fChain->SetBranchAddress("tpz", &tpz, &b_data_tpz);
448  fChain->SetBranchAddress("tptype", &tptype, &b_data_tptype);
449  fChain->SetBranchAddress("tgen", &tgen, &b_data_tgen);
450  }
451 
452  else {
453  dk2nu = new bsim::Dk2Nu;
454  fChain->SetBranchAddress("dk2nu",&dk2nu);
455  fChain->GetEntry(0);
456  }
457  Notify();
458 }
459 
460 Bool_t eventRates::Notify()
461 {
462  // The Notify() function is called when a new file is opened. This
463  // can be either for a new TTree in a TChain or when when a new TTree
464  // is started when using PROOF. It is normally not necessary to make changes
465  // to the generated code, but the routine can be extended by the
466  // user if needed. The return value is currently not used.
467 
468  return kTRUE;
469 }
470 
471 void eventRates::Show(Long64_t entry)
472 {
473 // Print contents of entry.
474 // If entry is not specified, print current entry
475  if (!fChain) return;
476  fChain->Show(entry);
477 }
478 Int_t eventRates::Cut(Long64_t entry)
479 {
480 // This function may be called from Loop.
481 // returns 1 if entry is accepted.
482 // returns -1 otherwise.
483  return 1;
484 }
485 #endif // #ifdef eventRates_cxx
double GetXSec(double nu_type, double nu_energy, std::string current)
TBranch * b_data_protonN
Definition: eventRates.h:120
TBranch * b_data_zpoint
Definition: eventRates.h:172
Int_t protonN
Definition: eventRates.h:50
TBranch * b_data_ppmedium
Definition: eventRates.h:158
Float_t protonX
Definition: eventRates.h:55
Float_t NdxdzFar[3]
Definition: eventRates.h:71
TBranch * b_data_tptype
Definition: eventRates.h:179
Float_t Vy
Definition: eventRates.h:79
TBranch * b_data_NdxdzNear
Definition: eventRates.h:137
QList< Entry > entry
TBranch * b_data_NenergyN
Definition: eventRates.h:139
Float_t Necm
Definition: eventRates.h:98
virtual void Show(Long64_t entry=-1)
TBranch * b_data_run
Definition: eventRates.h:118
TBranch * b_data_protonZ
Definition: eventRates.h:127
std::string detectorname
Definition: eventRates.h:39
bsim::Dk2Nu * dk2nu
Definition: eventRates.h:116
std::string string
Definition: nybbler.cc:12
TBranch * b_data_pdPy
Definition: eventRates.h:152
TBranch * b_data_tpz
Definition: eventRates.h:178
Float_t protonZ
Definition: eventRates.h:57
std::string ffilename
Definition: eventRates.h:37
TBranch * b_data_NWtNear
Definition: eventRates.h:140
Float_t ypoint
Definition: eventRates.h:101
TBranch * b_data_tvy
Definition: eventRates.h:174
TBranch * b_data_NdydzNear
Definition: eventRates.h:138
TBranch * b_data_evtno
Definition: eventRates.h:119
TChain * fChain
Definition: eventRates.h:32
Float_t tvz
Definition: eventRates.h:105
TBranch * b_data_Vx
Definition: eventRates.h:148
Int_t evtno
Definition: eventRates.h:49
TBranch * b_data_Ndxdz
Definition: eventRates.h:133
Float_t Ndxdz
Definition: eventRates.h:63
intermediate_table::const_iterator const_iterator
TBranch * b_data_ptype
Definition: eventRates.h:159
Float_t mupare
Definition: eventRates.h:97
TBranch * b_data_Necm
Definition: eventRates.h:168
Double_t NWtNear[5]
Definition: eventRates.h:70
TBranch * b_data_beamX
Definition: eventRates.h:123
TBranch * b_data_ppdydz
Definition: eventRates.h:155
Float_t hornCurrent
Definition: eventRates.h:62
TBranch * b_data_protonPz
Definition: eventRates.h:130
Int_t Ndecay
Definition: eventRates.h:76
TBranch * b_data_protonPx
Definition: eventRates.h:128
Float_t xpoint
Definition: eventRates.h:100
string physics_list
Definition: makeScanPlots.py:5
Float_t NenergyF[3]
Definition: eventRates.h:73
Float_t beamY
Definition: eventRates.h:54
TBranch * b_data_Norig
Definition: eventRates.h:145
TBranch * b_data_Nenergy
Definition: eventRates.h:136
double detz
Definition: eventRates.h:42
Int_t run
Definition: eventRates.h:48
TBranch * b_data_ppvx
Definition: eventRates.h:161
Float_t tpx
Definition: eventRates.h:106
bool isDk2nu
Definition: eventRates.h:113
Int_t fCurrent
pointer to the analyzed TTree or TChain
Definition: eventRates.h:34
TBranch * b_data_ptrkid
Definition: eventRates.h:160
Float_t Ndydz
Definition: eventRates.h:64
TBranch * b_data_Ntype
Definition: eventRates.h:147
Float_t ppvy
Definition: eventRates.h:92
TBranch * b_data_beamHWidth
Definition: eventRates.h:121
TBranch * b_data_NdydzFar
Definition: eventRates.h:142
TBranch * b_data_ypoint
Definition: eventRates.h:171
Float_t ppmedium
Definition: eventRates.h:88
Float_t pdPx
Definition: eventRates.h:81
TBranch * b_data_Ndydz
Definition: eventRates.h:134
double dety
Definition: eventRates.h:41
virtual void Loop()
Definition: eventRatesL.cc:29
Float_t ppdxdz
Definition: eventRates.h:84
TBranch * b_data_NWtFar
Definition: eventRates.h:144
TBranch * b_data_NdxdzFar
Definition: eventRates.h:141
Float_t muparpz
Definition: eventRates.h:96
TBranch * b_data_mupare
Definition: eventRates.h:167
TBranch * b_data_xpoint
Definition: eventRates.h:170
void ReadXSecsFromFiles()
TRandom3 * rand3
Definition: eventRates.h:44
virtual Int_t Cut(Long64_t entry)
std::string getenv(std::string const &name)
Definition: getenv.cc:15
TBranch * b_data_beamY
Definition: eventRates.h:124
Int_t Norig
Definition: eventRates.h:75
string on_grid
Definition: submit_flux.py:344
TBranch * b_data_ppvy
Definition: eventRates.h:162
Float_t muparpx
Definition: eventRates.h:94
TBranch * b_data_tvx
Definition: eventRates.h:173
TBranch * b_data_Vy
Definition: eventRates.h:149
TBranch * b_data_Vz
Definition: eventRates.h:150
Float_t nuTarZ
Definition: eventRates.h:61
void SetTitles(TH1 *h, const std::string &xtitle="", const std::string &ytitle="")
Definition: eventRatesL.cc:978
Int_t ptrkid
Definition: eventRates.h:90
Float_t beamVWidth
Definition: eventRates.h:52
Float_t ppvx
Definition: eventRates.h:91
Float_t NenergyN[5]
Definition: eventRates.h:69
Float_t zpoint
Definition: eventRates.h:102
static Entry * current
virtual ~eventRates()
Float_t tvx
Definition: eventRates.h:103
Float_t protonPy
Definition: eventRates.h:59
Float_t tpy
Definition: eventRates.h:107
Float_t beamX
Definition: eventRates.h:53
Float_t NdxdzNear[5]
Definition: eventRates.h:67
TBranch * b_data_pdPx
Definition: eventRates.h:151
Int_t Ntype
Definition: eventRates.h:77
TBranch * b_data_Ndecay
Definition: eventRates.h:146
double GetOscillatedNeutrinoType(double ntype, double E)
Float_t Vx
Definition: eventRates.h:78
Q_EXPORT QTSManip setw(int w)
Definition: qtextstream.h:331
Float_t beamHWidth
Definition: eventRates.h:51
Float_t pdPz
Definition: eventRates.h:83
Float_t pppz
Definition: eventRates.h:86
Float_t tpz
Definition: eventRates.h:108
Double_t fTotalPOT
current Tree number in a TChain
Definition: eventRates.h:36
std::string GetPOTAsString(const double dpot)
Definition: eventRatesL.cc:844
TBranch * b_data_ppdxdz
Definition: eventRates.h:154
virtual Int_t GetEntry(Long64_t entry)
TBranch * b_data_ppvz
Definition: eventRates.h:163
double GetWeight(const std::vector< double > xdet, double &nu_wght, double &nu_energy)
Definition: eventRatesL.cc:993
Double_t Nimpwt
Definition: eventRates.h:99
Float_t ppdydz
Definition: eventRates.h:85
TBranch * b_data_NenergyF
Definition: eventRates.h:143
eventRates(std::string input_user, std::string version, std::string macro, std::string current, std::string location, std::string physics_list, int n_files, int start_index, double pot_per_file, bool on_grid, bool dk2nu)
Double_t NWtFar[3]
Definition: eventRates.h:74
Int_t tgen
Definition: eventRates.h:110
Float_t protonPz
Definition: eventRates.h:60
Float_t ppvz
Definition: eventRates.h:93
TBranch * b_data_protonX
Definition: eventRates.h:125
Float_t protonPx
Definition: eventRates.h:58
virtual Long64_t LoadTree(Long64_t entry)
TBranch * b_data_tgen
Definition: eventRates.h:180
Float_t tvy
Definition: eventRates.h:104
std::ifstream fdat_file[6]
Definition: eventRates.h:216
Float_t pdPy
Definition: eventRates.h:82
TBranch * b_data_muparpx
Definition: eventRates.h:164
TBranch * b_data_ppenergy
Definition: eventRates.h:157
Float_t Nenergy
Definition: eventRates.h:66
TBranch * b_data_nuTarZ
Definition: eventRates.h:131
TBranch * b_data_pppz
Definition: eventRates.h:156
Int_t tptype
Definition: eventRates.h:109
double detx
Definition: eventRates.h:40
TBranch * b_data_tpx
Definition: eventRates.h:176
TBranch * b_data_tpy
Definition: eventRates.h:177
TBranch * b_data_Npz
Definition: eventRates.h:135
double f_e_arr[1500][6][2]
Definition: eventRates.h:219
TBranch * b_data_protonPy
Definition: eventRates.h:129
TBranch * b_data_pdPz
Definition: eventRates.h:153
TBranch * b_data_Nimpwt
Definition: eventRates.h:169
Float_t Npz
Definition: eventRates.h:65
TBranch * b_data_muparpz
Definition: eventRates.h:166
Float_t Vz
Definition: eventRates.h:80
virtual void Init(TTree *tree)
Q_EXPORT QTSManip setfill(int f)
Definition: qtextstream.h:337
Int_t ptype
Definition: eventRates.h:89
Float_t NdydzNear[5]
Definition: eventRates.h:68
TBranch * b_data_tvz
Definition: eventRates.h:175
Float_t muparpy
Definition: eventRates.h:95
Float_t protonY
Definition: eventRates.h:56
h
training ###############################
Definition: train_cnn.py:186
TBranch * b_data_muparpy
Definition: eventRates.h:165
TBranch * b_data_beamVWidth
Definition: eventRates.h:122
Float_t NdydzFar[3]
Definition: eventRates.h:72
Float_t ppenergy
Definition: eventRates.h:87
double f_xsec_arr[1500][6][2]
Definition: eventRates.h:220
virtual Bool_t Notify()
TBranch * b_data_hornCurrent
Definition: eventRates.h:132
TBranch * b_data_protonY
Definition: eventRates.h:126