All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NuAna_module.cc
Go to the documentation of this file.
1 #ifndef SBND_NUANA
2 #define SBND_NUANA value
3 
4 /// Framework includes
5 #include "art/Framework/Core/EDAnalyzer.h"
6 #include "art/Framework/Core/ModuleMacros.h"
7 #include "art/Framework/Principal/Event.h"
8 #include "art/Framework/Principal/Handle.h"
9 #include "art/Framework/Principal/SubRun.h"
10 #include "art/Framework/Services/Registry/ServiceHandle.h"
11 #include "art_root_io/TFileService.h"
12 #include "fhiclcpp/ParameterSet.h"
13 
14 // Larsoft includes
16 
17 // nusoft includes
18 #include "nusimdata/SimulationBase/MCFlux.h"
19 #include "nusimdata/SimulationBase/MCNeutrino.h"
20 #include "nusimdata/SimulationBase/MCTruth.h"
21 #include "nusimdata/SimulationBase/GTruth.h"
22 #include "nusimdata/SimulationBase/MCParticle.h"
24 
25 // root includes
26 #include <TTree.h>
27 #include "TH1.h"
28 #include "TH2.h"
29 #include "TSystem.h"
30 #include "TRandom.h"
31 #include "TLorentzVector.h"
32 #include "TVector3.h"
33 #include "TROOT.h"
34 
35 // c++ includes
36 #include <vector>
37 #include <math.h>
38 #include <iomanip>
39 #include <iostream>
40 #include <fstream>
41 
42 // LArSoft includes
44 
45 
46 
47 
48 namespace sbnd{
49  /// A module to extract the info from the Monte Carlo generator GENIE
50  class NuAna : public art::EDAnalyzer {
51  public:
52  explicit NuAna(fhicl::ParameterSet const& pset);
53  virtual ~NuAna(){};
54 
55  void beginJob();
56  // void reconfigure(fhicl::ParameterSet const& pset);
57  void analyze(const art::Event& evt);
58  void beginSubRun (const art::SubRun& subrun);
59  void reset();
60 
61  private:
62 
63  // This alg does all of the computing, while this module interfaces with
64  // art and packs all of the variables into the ttree
66 
67 
68 
69  // Other variables from the fcl file
70  std::string fMode; // mode is beam mode, nu or nubar
71  double fBaseline; // baseline is 100, 470, or 600 meters
72  bool fFullOscTrue; // fullosctrue is obvious.
73 
74  //Variables needed from the .fcl file to get things out of the event
75  std::string fGenieModuleLabel;
76  std::string fLarg4ModuleLabel;
77 
78 
80 
82  std::vector<std::string> fWeights;
83  std::vector<float> fWeightRangeSigma;
84  unsigned int fRandSeed;
85  int fNWeights;
86 
87  unsigned int FinalRandSeed;
88 
89  std::vector< std::vector<float> > reweightingSigmas;
90 
91  // #---------------------------------------------------------------
92  // #This is the list of analysis variables needed for the ttree:
93  // #---------------------------------------------------------------
94  // These are the ttrees themselves:
95  TTree* fTreeTot; //This tree stores all the important information from an event
96  // TTree* PoTTree; //This tree only stores the POT of the file, nothing else.
97 
98  std::vector<std::vector<float> > eventWeights;
99 
100  std::vector<float> neutMom; // Neutrino Momentum
101 
102  // Information about the lepton:
103  // muons are tracked till they exit, electrons are just the initial
104  // particle's position and momemtum (since they are showering)
105  std::vector< std::vector<float> > leptonPos; // pos of lepton till it exits
106  std::vector< std::vector<float> > leptonMom; // mom of lepton till it exits
107  double Elep; // Energy of the produced lepton
108  double thetaLep, phiLep; // angles in the detector of the produced lepton
109 
110 
111  int NPi0FinalState; // Number of neutral pions in Final State Particles
112  int NGamma; // Number of gammas in the Final State Particles
113  int NChargedPions; // Number of charged pions in the Final State Particles
114 
115  bool foundAllPhotons; // True by default, goes to false ONLY if there
116  // are final state photons that the alg didn't
117  // find in the larg4 particle list
118 
119  // Keep track of where photons convert and what their energy is.
120  // Except in categories 1, 3, 5, these are probably not filled.
121  // The vectors here labeled p1 and p2 keep track only of photons from neutral pion decay
122  std::vector< std::vector<float> > p1PhotonConversionPos; // Store the position of conversion
123  std::vector< std::vector<float> > p1PhotonConversionMom; // Store the momentum 4vector at conversion
124  std::vector< std::vector<float> > p2PhotonConversionPos; // Store the position of conversion
125  std::vector< std::vector<float> > p2PhotonConversionMom; // Store the momentum 4vector at conversion
126 
127  // These vectors keep track of any other photon conversions we need to look at.
128  std::vector< std::vector<float> > miscPhotonConversionPos; // Store the position of conversion
129  std::vector< std::vector<float> > miscPhotonConversionMom; // Store the momentum 4vector at conversion
130 
131  std::vector< std::vector < std::vector<float> > > chargedPionPos; // store position of charged pions
132  std::vector< std::vector < std::vector<float> > > chargedPionMom; // store momentum of charged pions
133  std::vector< int > chargedPionSign; // Sign (+/-) of the charged pions, one to one with above vectors
134 
135  // Track any pions
136  // Only keeping the position of decay and the momentum at decay
137  std::vector< std::vector<float> > pionPos; // Position at decay
138  std::vector< std::vector<float> > pionMom; // Momentum at decay
139 
140  //Info from the genie truth:
141  std::vector<int> GeniePDG; // Contains the pdg of the FSP in genie generated
142  std::vector<std::vector<float>> GenieMomentum;
143  std::vector<std::string> GenieProc; // Contains the process information
144  // Genie Reweight vectors:
145  std::vector< std::vector< float > > genieReweights;
146 
147  int iflux; // represents the sample, 0 = nu, 1 = nu_fosc, 2 = nubar, 3 = nubar_fosc
148  int nuchan; // Type of neutrino interaction
149  int inno; // Type of neutrino, PDG code. Not sure why it's call inno...
150  int parid; // ID of the parent, for flux reweighing
151  int ndecay; // Type of decay, for flux reweighing
152  int isCC; // isCC event? isCC == 1 means CC, isCC == 0 means NC
153  int mode; // beam mode
154  double enugen; // Energy of the neutrino
155  double nuleng; // Length the neutrino traveled.
156  std::vector<float> vertex; // Vertex location
157  std::vector<float> neutVertexInWindow; // origin of neutrino in flux window
158  std::vector<float> ParentVertex; // Parent Vertex (not in detector)
159  std::vector<float> nuParentMomAtDecay; // nu parent momentum at the time of decay
160  std::vector<float> nuParentMomAtProd; // nu parent momentum at production point
161  std::vector<float> nuParentMomTargetExit; // parent particle moment at target exit
162  int ptype, tptype;
163  double POT; // POT of the whole file.
164 
165  /*
166  For more information on some of the neutrino parentage information, start here
167  http://genie.hepforge.org/doxygen/html/classgenie_1_1flux_1_1GSimpleNtpNuMI.html
168  */
169 
170  // #---------------------------------------------------------------
171  // # End of the list of variables for the tree
172  // #---------------------------------------------------------------
173 
174 
175  }; // end of class NuAna
176 // }
177 
178 // namespace sbnd{
179 
180  NuAna::NuAna(fhicl::ParameterSet const& pset)
181  : EDAnalyzer(pset)
182  , fMode (pset.get< std::string > ("Mode"))
183  , fBaseline (pset.get< double > ("Baseline"))
184  , fFullOscTrue (pset.get< bool > ("FullOsc"))
185  , fGenieModuleLabel (pset.get< std::string > ("GenieModuleLabel"))
186  , fLarg4ModuleLabel (pset.get< std::string > ("LArG4ModuleLabel"))
187  , fFluxReweight (pset.get< bool > ("FluxReweight"))
188  , fXSecReweight (pset.get< bool > ("XSecReweight"))
189  , fWeights (pset.get< std::vector<std::string> > ("Weights"))
190  , fRandSeed (pset.get< unsigned int > ("RandSeed"))
191  , fNWeights (pset.get< int > ("NWeights"))
192  {
193 
194  // This function sets up the ttrees
195  // get access to the TFile service
196  art::ServiceHandle<art::TFileService> tfs;
197 
198  // PoTTree = tfs->make<TTree>("POT", "POT");
199 
200  std::ofstream libraryFile;
201  libraryFile.open("loadLibs.C");
202  libraryFile << "#include <vector>\n";
203  libraryFile << "#ifdef __MAKECINT__\n";
204  libraryFile << "#pragma link C++ class std::vector<std::vector<float> >+;\n";
205  libraryFile << "#pragma link C++ class std::vector<std::vector<std::vector<float> > >+;\n";
206  libraryFile << "#endif\n";
207  libraryFile.close();
208  gROOT -> ProcessLine(".L loadLibs.C+");
209 
210  fTreeTot = tfs->make<TTree>("EventsTot", "Event info for ALL types");
211 
212  fTreeTot->Branch("POT",&POT,"POT/D");
213 
214  // Neutrino/event variables:
215  fTreeTot->Branch("iflux", &iflux, "iflux/I");
216  fTreeTot->Branch("nuchan", &nuchan, "nuchan/I");
217  fTreeTot->Branch("inno", &inno, "inno/I");
218  fTreeTot->Branch("enugen", &enugen, "enugen/D");
219  fTreeTot->Branch("nuleng", &nuleng, "nuleng/D");
220  fTreeTot->Branch("isCC", &isCC, "isCC/I");
221  fTreeTot->Branch("mode", &mode, "mode/I");
222  fTreeTot->Branch("ThetaLep", &thetaLep, "ThetaLep/D");
223  fTreeTot->Branch("PhiLep", &phiLep, "PhiLep/D");
224  fTreeTot->Branch("Elep", &Elep, "Elep/D");
225  fTreeTot->Branch("neutMom", "neutMom", &neutMom, 32000, 0);
226  fTreeTot->Branch("vertex", "vertex", &vertex, 32000, 0);
227 
228  // Genie Variables
229  fTreeTot->Branch("GeniePDG", &GeniePDG);
230  fTreeTot->Branch("GenieMomentum", "std::vector<std::vector<float> >", &GenieMomentum);
231  fTreeTot->Branch("GenieProc", &GenieProc);
232  // "var","std::vector<std::vector<float> >",&vec
233 
234  // Flux variables:
235  fTreeTot->Branch("ptype", &ptype, "ptype/I");
236  fTreeTot->Branch("tptype",&tptype,"tptype/I");
237  fTreeTot->Branch("ndecay",&ndecay,"ndecay/I");
238  fTreeTot->Branch("neutVertexInWindow", "neutVertexInWindow", &neutVertexInWindow, 32000, 0);
239  fTreeTot->Branch("ParentVertex", "ParentVertex", &ParentVertex, 32000, 0);
240  fTreeTot->Branch("nuParentMomAtDecay", "nuParentMomAtDecay", &nuParentMomAtDecay, 32000, 0);
241  fTreeTot->Branch("nuParentMomAtProd", "nuParentMomAtProd", &nuParentMomAtProd, 32000, 0);
242  fTreeTot->Branch("nuParentMomTargetExit", "nuParentMomTargetExit", &nuParentMomTargetExit, 32000, 0);
243 
244  // larg4 info
245  fTreeTot->Branch("leptonPos","std::vector< std::vector<float> > ", &leptonPos, 32000, 0);
246  fTreeTot->Branch("leptonMom","std::vector< std::vector<float> > ", &leptonMom, 32000, 0);
247  fTreeTot->Branch("NPi0FinalState", &NPi0FinalState, "NPi0FinalState/I");
248  fTreeTot->Branch("NGamma", &NGamma, "NGamma/I");
249  fTreeTot->Branch("FoundPhotons", &foundAllPhotons,"FoundAllPhotons/B");
250  fTreeTot->Branch("p1PhotonConversionPos","std::vector< std::vector<float> > ", &p1PhotonConversionPos, 32000, 0);
251  fTreeTot->Branch("p1PhotonConversionMom","std::vector< std::vector<float> > ", &p1PhotonConversionMom, 32000, 0);
252  fTreeTot->Branch("p2PhotonConversionPos","std::vector< std::vector<float> > ", &p2PhotonConversionPos, 32000, 0);
253  fTreeTot->Branch("p2PhotonConversionMom","std::vector< std::vector<float> > ", &p2PhotonConversionMom, 32000, 0);
254  fTreeTot->Branch("miscPhotonConversionPos","std::vector< std::vector<float> > ", &miscPhotonConversionPos, 32000, 0);
255  fTreeTot->Branch("miscPhotonConversionMom","std::vector< std::vector<float> > ", &miscPhotonConversionMom, 32000, 0);
256  fTreeTot->Branch("PionPos","std::vector< std::vector<float> >", &pionPos, 32000, 0);
257  fTreeTot->Branch("PionMom","std::vector< std::vector<float> >", &pionMom, 32000, 0);
258  fTreeTot->Branch("ChargedPionPos","std::vector<std::vector< std::vector<float> > >",&chargedPionPos, 32000,0);
259  fTreeTot->Branch("ChargedPionMom","std::vector<std::vector< std::vector<float> > >",&chargedPionMom, 32000,0);
260  fTreeTot->Branch("ChargedPionSign","ChargedPionSign",&chargedPionSign, 32000,0);
261 
262 
263  if (fXSecReweight){
264  fTreeTot->Branch("MultiWeight","MultiWeight",&eventWeights,32000,0);
265  fTreeTot->Branch("FinalRandSeed", &FinalRandSeed, "FinalRandSeed/I");
266  }
267  if (fFluxReweight){
268  fTreeTot->Branch("MultiWeight","MultiWeight",&eventWeights,32000,0);
269  }
270 
271  }
272 
273 
275 
276  std::cout << "\nThe mode is " << fMode << std::endl;
277  std::cout << "This set of events is ";
278  if (fFullOscTrue) std::cout << "fullosc" << std::endl;
279  else std::cout << "not fullosc" << std::endl;
280  std::cout << "The baseline for this detector is "
281  << fBaseline << "m." << std::endl << std::endl;
282 
283  reset();
284  // gROOT->ProcessLine(".L loadDictionaries.C+");
285 
286  art::ServiceHandle<geo::Geometry> geom;
287  // configure the geometry in the worker function:
289 
290  if (fXSecReweight){
291  std::vector<reweight> reweights;
292  fNuAnaAlg.parseWeights(fWeights, reweights);
296  }
297 
298  return;
299  }
300 
301 
302  void NuAna::beginSubRun(const art::SubRun& subrun){
303 
304  // Go through POTSummary objects
305  art::Handle< sumdata::POTSummary > potHandle;
306  subrun.getByLabel(fGenieModuleLabel, potHandle);
307  const sumdata::POTSummary& potSum = (*potHandle);
308  POT = potSum.totpot;
309  // PoTTree->Fill();
310  return;
311  }
312  void NuAna::reset(){
313 
314  // This method takes ANYTHING that goes into the ntuple and sets it to default.
315 
316  // Start by making sure the appropriate vectors are cleared and emptied:
317  eventWeights.clear();
318  leptonPos.clear();
319  leptonMom.clear();
320  p1PhotonConversionPos.clear();
321  p1PhotonConversionMom.clear();
322  p2PhotonConversionPos.clear();
323  p2PhotonConversionMom.clear();
324  miscPhotonConversionPos.clear();
325  miscPhotonConversionMom.clear();
326  pionPos.clear();
327  pionMom.clear();
328  chargedPionPos.clear();
329  chargedPionMom.clear();
330  chargedPionSign.clear();
331 
332  GeniePDG.clear();
333  GenieMomentum.clear();
334  GenieProc.clear();
335 
336  NPi0FinalState = 0;
337  NChargedPions = 0;
338  NGamma = 0;
339  foundAllPhotons = true;
340 
341  ptype = 0;
342  tptype = 0;
343 
344  // POT = 0;
345 
346  // Clear out the root vectors
347  vertex.clear();
348  ParentVertex.clear();
349  nuParentMomAtDecay.clear();
350  nuParentMomAtProd.clear();
351  nuParentMomTargetExit.clear();
352  neutMom.clear();
353 
354  // iflux = -999; // represents the sample, 0 = nu, 1 = nu_fosc, 2 = nubar, 3 = nubar_fosc
355  nuchan = -999; // Type of neutrino interaction
356  inno = -999; // Type of neutrino, PDG code. Not sure why it's inno...
357  parid = -999; // ID of the parent, for flux reweighing
358  ndecay = -999; // Type of decay, for flux reweighing
359  isCC = -999; // isCC event? isCC == 1 means CC, isCC == 0 means NC
360  mode = -999; // beam mode
361  enugen = -999; // Energy of the neutrino (both)
362  nuleng = -999; // Length the neutrino traveled.
363  Elep = -999;
364  thetaLep = -999;
365  phiLep = -999;
366  // POT = -999; //POT of the whole file.
367 
368  // eventReweight.clear();
369  // eventReweight.resize(7);
370  // for (auto & weight : eventReweight)
371  // {
372  // weight.clear();
373  // weight.resize(1000);
374  // }
375 
376  return;
377  }
378 
379  void NuAna::analyze(const art::Event& evt){
380 
381  this -> reset();
382 
383  //get the MC generator information out of the event
384  //these are all handles to mc information.
385  art::Handle< std::vector<simb::MCTruth> > mclistGENIE;
386  art::Handle< std::vector<simb::MCParticle> > mclistLARG4;
387  art::Handle< std::vector<simb::MCFlux> > mcflux;
388  art::Handle< std::vector<simb::GTruth> > mcgtruth;
389 
390  // Start by getting the POT for this neutrino's file:
391  // art::Handle< sumdata::POTSummary > potHandle;
392  // evt.getByLabel(fGenieModuleLabel, potHandle);
393  // POT = potHandle->totpot;
394 
395 
396  //actually go and get the stuff
397  evt.getByLabel(fGenieModuleLabel,mclistGENIE);
398  evt.getByLabel(fGenieModuleLabel,mcflux);
399  evt.getByLabel(fGenieModuleLabel,mcgtruth);
400  if (!fFullOscTrue)
401  evt.getByLabel(fLarg4ModuleLabel,mclistLARG4);
402 
403  // contains the mctruth object from genie
404  art::Ptr<simb::MCTruth> mc(mclistGENIE,0);
405 
406  // contains the mcflux object
407  art::Ptr<simb::MCFlux > flux(mcflux,0);
408 
409  // contains the gtruth object
410  art::Ptr<simb::GTruth > gtruth(mcgtruth,0);
411 
412 
413 
414  // Contains the neutrino info
415  simb::MCNeutrino neutrino = mc -> GetNeutrino();
416 
417  // std::cout << "The interaction info is: \n"
418  // << " gtruth->ftgtPDG................." << gtruth->ftgtPDG << "\n"
419  // << " gtruth->ftgtZ..................." << gtruth->ftgtZ << "\n"
420  // << " gtruth->ftgtA..................." << gtruth->ftgtA << "\n"
421  // << " gtruth->fGint..................." << gtruth->fGint << "\n"
422  // << " gtruth->fGscatter..............." << gtruth->fGscatter << "\n"
423  // << " gtruth->fweight................." << gtruth->fweight << "\n"
424  // << " neutrino.Mode()................." << neutrino.Mode() << "\n"
425  // << " neutrino.InteractionType()......" << neutrino.InteractionType() << "\n"
426  // << " neutrino.CCNC()................." << neutrino.CCNC() << "\n"
427  // << " neutrino.Target()..............." << neutrino.Target() << "\n"
428  // << std::endl;
429 
430  // Now start packing up the variables to fill the tree
431  // In general, have the algorithm do this:
432 
433 
434  // get the basic neutrino info:
435  fNuAnaAlg.packNeutrinoInfo( &neutrino,
436  nuchan,
437  inno,
438  enugen,
439  isCC,
440  mode,
441  thetaLep,
442  phiLep,
443  Elep,
444  neutMom,
445  vertex);
446 
447 
448  // Pack up the flux info:
449  fNuAnaAlg.packFluxInfo( flux,
450  ptype, tptype, ndecay,
452  ParentVertex,
456 
457  // nuleng needs special attention:
458  TVector3 length(vertex[0] - ParentVertex[0],
459  vertex[1] - ParentVertex[1],
460  100*fBaseline + vertex[2] - ParentVertex[2]);
461  nuleng = length.Mag();
462 
463  // Pack up the genie info:
465  GeniePDG,
467  GenieProc,
469  NGamma,
470  NChargedPions);
471 
472 
473  // pack up the larg4 photon info:
474  if(!fFullOscTrue)
477  leptonPos,
478  leptonMom,
485  pionPos,
486  pionMom,
490 
491 
492 
493 
494 
495 
496  // If needed, set up the weights.
497 
498  if (fFluxReweight){
500  }
501 
502  // Find a new weight for this event:
503  // std::vector<std::vector<float> > weights;
504  if (fXSecReweight){
505  fNuAnaAlg.calcWeight(mc, gtruth,eventWeights);
506  // std::cout << "Printing weights for this event:\n";
507  // for (auto s : fWeights) std::cout << s << "\t";
508  // std::cout << "Total\n";
509  // for (unsigned int row = 0; row < eventWeights.front().size(); row ++){
510  // for (unsigned int column = 0; column < eventWeights.size(); column ++){
511  // std::cout << eventWeights[column][row] << "\t";
512  // }
513  // std::cout << std::endl;
514  // }
515 
516  }
517 
518  // Fill the ttree:
519  fTreeTot->Fill();
520 
521 
522  return;
523  }
524 
525  DEFINE_ART_MODULE(NuAna)
526 
527 
528 }
529 
530 #endif
std::string fLarg4ModuleLabel
Definition: NuAna_module.cc:76
void analyze(const art::Event &evt)
std::vector< std::vector< float > > p1PhotonConversionMom
std::vector< std::string > GenieProc
double std(const std::vector< short > &wf, const double ped_mean, size_t start, size_t nsample)
Definition: UtilFunc.cxx:42
bool fXSecReweight
Definition: NuAna_module.cc:81
std::vector< float > ParentVertex
std::vector< std::vector< float > > GenieMomentum
NuAna(fhicl::ParameterSet const &pset)
std::vector< float > nuParentMomTargetExit
std::vector< float > vertex
std::vector< std::vector< float > > p2PhotonConversionMom
static constexpr bool
void beginSubRun(const art::SubRun &subrun)
bool fFluxReweight
Definition: NuAna_module.cc:79
unsigned int FinalRandSeed
Definition: NuAna_module.cc:87
bool fFullOscTrue
Definition: NuAna_module.cc:72
std::vector< std::vector< float > > miscPhotonConversionPos
double thetaLep
std::string fGenieModuleLabel
Definition: NuAna_module.cc:75
std::vector< std::vector< std::vector< float > > > chargedPionPos
TTree * fTreeTot
Definition: NuAna_module.cc:95
std::vector< std::vector< float > > reweightingSigmas
Definition: NuAna_module.cc:89
void packFluxWeight(art::Ptr< simb::MCFlux > flux, std::vector< std::vector< float >> &)
Definition: NuAnaAlg.cxx:712
std::vector< float > nuParentMomAtProd
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
double fBaseline
Definition: NuAna_module.cc:71
std::vector< std::string > fWeights
Definition: NuAna_module.cc:82
std::vector< std::vector< float > > eventWeights
Definition: NuAna_module.cc:98
std::vector< std::vector< std::vector< float > > > chargedPionMom
unsigned int fRandSeed
Definition: NuAna_module.cc:84
std::vector< std::vector< float > > genieReweights
NuAnaAlg fNuAnaAlg
Definition: NuAna_module.cc:65
void configureReWeight(const std::vector< reweight > &, const std::vector< std::vector< float >> &)
Definition: NuAnaAlg.cxx:44
void packGenieInfo(art::Ptr< simb::MCTruth > truth, std::vector< int > &GeniePDG, std::vector< std::vector< float >> &GenieMomentum, std::vector< std::string > &GenieProc, int &NPi0FinalState, int &NGamma, int &NChargedPions)
Definition: NuAnaAlg.cxx:371
createEngine fMode
void beginJob()
A module to extract the info from the Monte Carlo generator GENIE.
Definition: NuAna_module.cc:50
void packFluxInfo(art::Ptr< simb::MCFlux > flux, int &ptype, int &tptype, int &ndecay, std::vector< float > &neutVertexInWindow, std::vector< float > &ParentVertex, std::vector< float > &nuParentMomAtDecay, std::vector< float > &nuParentMomAtProd, std::vector< float > &nuParentMomTargetExit)
Definition: NuAnaAlg.cxx:333
std::vector< std::vector< float > > pionPos
std::vector< int > chargedPionSign
std::vector< std::vector< float > > pionMom
std::vector< float > fWeightRangeSigma
Definition: NuAna_module.cc:83
std::vector< float > neutMom
std::string fMode
Definition: NuAna_module.cc:70
void packLarg4Info(art::Handle< std::vector< simb::MCParticle > > mclarg4, int, int, int, int, std::vector< std::vector< float > > &leptonPos, std::vector< std::vector< float > > &leptonMom, std::vector< std::vector< float > > &p1PhotonConversionPos, std::vector< std::vector< float > > &p1PhotonConversionMom, std::vector< std::vector< float > > &p2PhotonConversionPos, std::vector< std::vector< float > > &p2PhotonConversionMom, std::vector< std::vector< float > > &miscPhotonConversionPos, std::vector< std::vector< float > > &miscPhotonConversionMom, std::vector< std::vector< float > > &pionPos, std::vector< std::vector< float > > &pionMom, std::vector< std::vector< std::vector< float > > > &chargedPionPos, std::vector< std::vector< std::vector< float > > > &chargedPionMom, std::vector< int > &chargePionSign)
Definition: NuAnaAlg.cxx:493
std::vector< int > GeniePDG
std::vector< std::vector< float > > leptonMom
virtual ~NuAna()
Definition: NuAna_module.cc:53
bool foundAllPhotons
std::vector< std::vector< float > > leptonPos
std::vector< std::vector< float > > p1PhotonConversionPos
std::vector< std::vector< float > > p2PhotonConversionPos
void configureGeometry(art::ServiceHandle< geo::Geometry >)
Definition: NuAnaAlg.cxx:14
void parseWeights(const std::vector< std::string > &, std::vector< reweight > &)
Definition: NuAnaAlg.cxx:229
stream1 can override from command line with o or output services user sbnd
Sample_t fBaseline
Waveform baseline [ADC counts].
unsigned int prepareSigmas(int, unsigned int, std::vector< std::vector< float > > &)
Definition: NuAnaAlg.cxx:211
art::ServiceHandle< art::TFileService > tfs
TCEvent evt
Definition: DataStructs.cxx:8
void packNeutrinoInfo(simb::MCNeutrino *neutrino, int &nuchan, int &inno, double &enugen, int &isCC, int &mode, double &thetaLep, double &phiLep, double &Elep, std::vector< float > &neutMom, std::vector< float > &vertex)
Definition: NuAnaAlg.cxx:287
std::vector< float > nuParentMomAtDecay
void calcWeight(art::Ptr< simb::MCTruth >, art::Ptr< simb::GTruth >, std::vector< std::vector< float >> &)
Definition: NuAnaAlg.cxx:257
std::vector< std::vector< float > > miscPhotonConversionMom
art framework interface to geometry description
BEGIN_PROLOG could also be cout
std::vector< float > neutVertexInWindow