ShowerEnergyAna_module.cc
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // \file ShowerEnergyAna_module.cc
3 // \brief Analizer for eHad-EM shower energy study.
4 // Output nTuple contains hit by hit energy and source info.
5 //
6 // \author Fernanda Psihas - psihas@fnal.gov
7 ////////////////////////////////////////////////////////////////////////
8 
9 // Framework includes
21 #include "fhiclcpp/ParameterSet.h"
22 
23 // ROOT includes
24 #include "TDatabasePDG.h"
25 #include "TFile.h"
26 #include "TTree.h"
27 
28 // C/C++ includes
29 #include <cmath>
30 #include <iostream>
31 #include <ostream>
32 #include <fstream>
33 #include <sstream>
34 #include <string>
35 #include <cstdlib>
36 #include <vector>
37 
38 // NOvASoft includes
40 #include "Geometry/Geometry.h"
41 #include "GeometryObjects/Geo.h"
42 #include "MCCheater/BackTracker.h"
43 #include "RecoBase/Cluster.h"
44 #include "RecoBase/FilterList.h"
45 #include "RecoBase/RecoHit.h"
46 #include "Simulation/Particle.h"
48 #include "Utilities/func/MathUtil.h"
49 
50 namespace showere
51 {
53  {
54  public:
55  explicit ShowerEnergyAna(const fhicl::ParameterSet& pset);
57 
58  void analyze(const art::Event& evt);
59 
60  void reconfigure(const fhicl::ParameterSet& pset);
61 
62  void beginJob();
63 
64  protected:
65 
69  bool fSkipNuMu;
70 
71  private:
72 
74  double InteractionTrueE; // nu E - outgoing nu E
75  // for numu CC --> nu E - outgoing muon E
77  double IntSliceEfficiency; // slice to nu interaction efficiency
78  double IntSliceEMfraction; // slice to nu interaction efficiency
79  int InteractionCurrent; // 0 for CC, 1 for NC
80  int InteractionNuPDG; // Incoming nu PDG
81  int InteractionLepPDG; // Outgoing lepton PDG
82  int InteractionType; // Condensed category of interaction
83  int InteractionNhits; // CellHits in interaction slice
84  int InteractionNCalHits; // Calibrated RecoHits
85 
86  // Arrays for info from each CellHit in the int. slice
87 
88  int HitsNfls[1000]; // nFLS hits contributing to this CellHit
89  double HitsIsEve[1000]; // Fraction of Hit E deposited by primary
90  double HitsIsEve_e[1000]; // Fraction of Hit E deposited by primary e
91  double HitsIsEve_mu[1000]; // Fraction of Hit E deposited by primary mu
92  double HitsIsEve_tau[1000]; // Fraction of Hit E deposited by primary tau
93  double HitsIsEM[1000]; // Fraction of Hit E from EM deposition
94  double HitsEveIsEM[1000]; // Fraction of Hit E from particle with
95  // EM primary ancestor i.e. part of EM shower
96  double HitsIsMu[1000]; // Fraction of Hit E from a muon
97  double HitsEveIsMu[1000]; // Fraction of Hit E from particle with
98  // muon primary ancestor
99  double HitsADC[1000]; // CellHit ADC
100  double HitsPECorr[1000]; // RecoHit PECorr
101  double HitsTrueE[1000]; // Summed FLSHit energy
102  double HitsRecoE[1000]; // Calibrated RecoHit Energy
103 
104  bool fDoBBCcut;
105  double fMinXFid;
106  double fMinYFid;
107  double fMinZ;
108  double fMaxZ;
109  double fMaxXFid;
110  double fMaxYFid;
111 
112  }; // end class ShowerEnergyAna
113 
114  //.......................................................................
116  : EDAnalyzer(pset)
117  {
118  reconfigure(pset);
119  }
120 
121  //......................................................................
123  {
124  }
125 
126  //......................................................................
128  {
129  fSlicerLabel = pset.get<std::string >("SlicerLabel");
130  fTrackLabel = pset.get<std::string >("TrackLabel");
131  fHitLabel = pset.get<std::string >("HitLabel");
132  fSkipNuMu = pset.get<bool >("SkipNuMu");
133  // Further selection
134  fDoBBCcut = pset.get<bool >("DoBBCcut");
135  fMinXFid = pset.get< float >("MinXFid");
136  fMaxXFid = pset.get< float >("MaxXFid");
137  fMinYFid = pset.get< float >("MinYFid");
138  fMaxYFid = pset.get< float >("MaxYFid");
139  fMinZ = pset.get< float >("MinZ");
140  fMaxZ = pset.get< float >("MaxZ");
141 
142  }
143 
144  //......................................................................
146  {
148 
149  fInteractionTree = tfs->make<TTree>("InteractionTree","InteractionTree");
150  fInteractionTree->Branch("InteractionNuPDG",&InteractionNuPDG,"InteractionNuPDG/I");
151  fInteractionTree->Branch("InteractionLepPDG",&InteractionLepPDG,"InteractionLepPDG/I");
152  fInteractionTree->Branch("IntSliceEfficiency",&IntSliceEfficiency,"IntSliceEfficiency/D");
153  fInteractionTree->Branch("IntSliceEMfraction",&IntSliceEMfraction,"IntSliceEMfraction/D");
154  fInteractionTree->Branch("InteractionType",&InteractionType,"InteractionType/I");
155  fInteractionTree->Branch("InteractionCurrent",&InteractionCurrent,"InteractionCurrent/I");
156  fInteractionTree->Branch("InteractionNhits",&InteractionNhits,"InteractionNhits/I");
157  fInteractionTree->Branch("InteractionNCalHits",&InteractionNCalHits,"InteractionNCalHits/I");
158  fInteractionTree->Branch("InteractionTrueE",&InteractionTrueE,"InteractionTrueE/D");
159  fInteractionTree->Branch("InteractionRecoE",&InteractionRecoE,"InteractionRecoE/D");
160  // Vector Branches
161  fInteractionTree->Branch("HitsNfls",&HitsNfls,"HitsNfls[InteractionNCalHits]/I");
162  fInteractionTree->Branch("HitsIsEM",&HitsIsEM,"HitsIsEM[InteractionNCalHits]/D");
163  fInteractionTree->Branch("HitsEveIsEM",&HitsEveIsEM,"HitsEveIsEM[InteractionNCalHits]/D");
164  fInteractionTree->Branch("HitsIsMu",&HitsIsMu,"HitsIsMu[InteractionNCalHits]/D");
165  fInteractionTree->Branch("HitsEveIsMu",&HitsEveIsMu,"HitsEveIsMu[InteractionNCalHits]/D");
166  fInteractionTree->Branch("HitsADC",&HitsADC,"HitsADC[InteractionNCalHits]/D");
167  fInteractionTree->Branch("HitsPECorr",&HitsPECorr,"HitsPECorr[InteractionNCalHits]/D");
168  fInteractionTree->Branch("HitsTrueE",&HitsTrueE,"HitsTrueE[InteractionNCalHits]/D");
169  fInteractionTree->Branch("HitsRecoE",&HitsRecoE,"HitsRecoE[InteractionNCalHits]/D");
170  fInteractionTree->Branch("HitsIsEve",&HitsIsEve,"HitsIsEve[InteractionNCalHits]/D");
171  fInteractionTree->Branch("HitsIsEve_e",&HitsIsEve_e,"HitsIsEve_e[InteractionNCalHits]/D");
172  fInteractionTree->Branch("HitsIsEve_mu",&HitsIsEve_mu,"HitsIsEve_mu[InteractionNCalHits]/D");
173  fInteractionTree->Branch("HitsIsEve_tau",&HitsIsEve_tau,"HitsIsEve_tau[InteractionNCalHits]/D");
174 
175  }
176 
177  //......................................................................
179  {
180  // Get total interaction E (if MC) per event. Get % EM and % Had per
181  // CellHit for the neutrino slice.
182 
184 
186  const sim::ParticleNavigator& pnav = bt->ParticleNavigator();
187 
188 
189  // Get event cellhits
191  evt.getByLabel(fHitLabel, hitHandle);
193  for(unsigned int hitIdx = 0; hitIdx < hitHandle->size(); hitIdx++){
194  evthits.push_back(art::Ptr<rb::CellHit>(hitHandle,hitIdx));
195  }
196 
197 
198  // Get event slices
200  evt.getByLabel(fSlicerLabel, sliceHandle);
201  const unsigned int sliceMax = sliceHandle->size();
202 
203  // Loop over slices
204  for(unsigned int sliceIdx = 0; sliceIdx < sliceMax; ++sliceIdx){
205  if(rb::IsFiltered(evt, sliceHandle, sliceIdx)) continue;
206  art::Ptr<rb::Cluster> slice(sliceHandle, sliceIdx);
207  // Skip already filtered
208  if ( slice->IsNoise() ) continue;
209 
210  // Get nu info
211  std::vector<cheat::NeutrinoEffPur> SlicePurr = bt->SliceToMCTruth(slice->AllCells(),slice->AllCells());
212  if(SlicePurr.size()==0) continue;
213  const art::Ptr<simb::MCTruth> &SliceTruth = SlicePurr[0].neutrinoInt;
214  if(!SliceTruth->NeutrinoSet()) continue;
215 
216  std::vector<cheat::NeutrinoEffPur> SliceNuPurr = bt->SliceToNeutrinoInteractions(slice->AllCells(),evthits);
217  double sliceEfficiency = SliceNuPurr[0].efficiency;
218 
219 
220  // get nu energy
221  const simb::MCNeutrino& nu = SliceTruth->GetNeutrino();
222  double E = nu.Nu().E();
223  int nuPDG = nu.Nu().PdgCode();
224  int lepPDG = nu.Lepton().PdgCode();
225  int intType = nu.InteractionType();
226  int intCurrent = nu.CCNC();
227 
228  // Skip muons if option is provided
229  if ( fSkipNuMu && nuPDG != 12 && nuPDG != -12 ) return;
230 
231  // E should be measurable. Substract outgoing nu energy (or outgoing muon energy)
232  if ( lepPDG == 12 || lepPDG == 14 || lepPDG == 16 || lepPDG == 13 || lepPDG == -13 )
233  E -= nu.Lepton().E();
234 
235  std::vector<int> hitsNfls;
236  std::vector<double> hitsIsEve;
237  std::vector<double> hitsIsEve_e;
238  std::vector<double> hitsIsEve_mu;
239  std::vector<double> hitsIsEve_tau;
240  std::vector<double> hitsIsEM;
241  std::vector<double> hitsEveIsEM;
242  std::vector<double> hitsIsMu;
243  std::vector<double> hitsEveIsMu;
244  std::vector<double> hitsADC;
245  std::vector<double> hitsPECorr;
246  std::vector<double> hitsTrueE;
247  std::vector<double> hitsRecoE;
248 
249  // Further slice selection
250  bool selected = true;
251  float xmin[2] = { 9999, 9999};
252  float ymin[2] = { 9999, 9999};
253  float zmin[2] = { 9999, 9999};
254  float xmax[2] = {-9999,-9999};
255  float ymax[2] = {-9999,-9999};
256  float zmax[2] = {-9999,-9999};
257 
258  const int interactionNhits = slice->NCell();
259  //Loop over CellHits
260  for(int view = geo::kX; view <= geo::kY; ++view) {
261  const geo::View_t geoview = geo::View_t(view);
262  for(unsigned int j = 0; j < slice->NCell(geoview); ++j) {
263  const rb::CellHit* ch = slice->Cell(geoview,j).get();
264  art::Ptr< rb::CellHit > chptr = slice->Cell(geoview,j);
265 
266  rb::RecoHit rh = slice->RecoHit (chptr);
267  if ( ! rh.IsCalibrated() ) continue;
268 
269  float hitRecoE = rh.GeV();
270  float hitPECorr = rh.PECorr();
271  double hitADC = ch->ADC();
272 
273  const std::vector< sim::FLSHit > CellFLSs = bt->HitToFLSHit(chptr);
274  int nFLSs = CellFLSs.size();
275 
276  // Calculate total TrueE for this CellHit
277  float hitTrueE = 0;
278  if ( nFLSs == 0 ) continue;
279  if ( nFLSs == 1 ) hitTrueE = CellFLSs[0].GetEdepBirks();
280  if ( nFLSs > 1 ){
281  for ( int FlsIdx = 0; FlsIdx < nFLSs; ++FlsIdx)
282  hitTrueE += CellFLSs[FlsIdx].GetEdepBirks();
283  }// fls
284 
285  // Now calculate %E from diferent components on this CellHit
286  double hitIsEve = 0; // fraction coming from Eve particles
287  double hitIsEve_e = 0; // fraction coming from Eve electron
288  double hitIsEve_mu = 0; // fraction coming from Eve muon
289  double hitIsEve_tau = 0; // fraction coming from Eve tau
290  double hitIsEM = 0; // fraction from EM 0 (Had) to 1 (EM)
291  double hitEveIsEM = 0; // fraction from EM shower
292  double hitIsMu = 0; // fraction from muon 0 (other) to 1 (Muon)
293  double hitEveIsMu = 0; // fraction from primary muon
294 
295  for ( int flsIdx = 0; flsIdx < nFLSs; ++flsIdx){
296  sim::FLSHit fls = CellFLSs[flsIdx];
297  int trkID = fls.GetTrackID();
298  const sim::Particle * fls_p = bt->TrackIDToParticle(trkID);
299  int EveID = pnav.EveId(trkID);
300  const sim::Particle * Eve_p = bt->TrackIDToParticle(EveID);
301 
302  double thisIsEve;
303  double thisIsEve_e;
304  double thisIsEve_mu;
305  double thisIsEve_tau;
306  double thisIsEM, thisEveIsEM;
307  double thisIsMu, thisEveIsMu;
308 
309  // Determine the source of this cell hit for the categories we care about
310  if ( trkID == EveID ) thisIsEve = 1;
311  else thisIsEve = 0;
312  if ( trkID == EveID && (Eve_p->PdgCode() == 11 || Eve_p->PdgCode() == -11) ) thisIsEve_e = 1;
313  else thisIsEve_e = 0;
314  if ( trkID == EveID && (Eve_p->PdgCode() == 13 || Eve_p->PdgCode() == -13) ) thisIsEve_mu = 1;
315  else thisIsEve_mu = 0;
316  if ( trkID == EveID && (Eve_p->PdgCode() == 15 || Eve_p->PdgCode() == -15) ) thisIsEve_tau = 1;
317  else thisIsEve_tau = 0;
318 
319  if ( Eve_p->PdgCode() == 11 || Eve_p->PdgCode() == -11 ||
320  Eve_p->PdgCode() == 22 || Eve_p->PdgCode() == 111 ) thisEveIsEM = 1;
321  else thisEveIsEM = 0;
322  if ( fls_p->PdgCode() == 11 || fls_p->PdgCode() == -11 ||
323  fls_p->PdgCode() == 22 || fls_p->PdgCode() == 111 ) thisIsEM = 1;
324  else thisIsEM = 0;
325 
326  if ( Eve_p->PdgCode() == 13 || Eve_p->PdgCode() == -13 ) thisEveIsMu = 1;
327  else thisEveIsMu = 0;
328  if ( fls_p->PdgCode() == 13 || fls_p->PdgCode() == -13 ) thisIsMu = 1;
329  else thisIsMu = 0;
330 
331 
332  float thisflsE = fls.GetEdepBirks();
333  // Add % of FLSHits Edep in CellHit coming from each source
334  hitIsEve += (thisflsE/hitTrueE)*thisIsEve;
335  hitIsEve_e += (thisflsE/hitTrueE)*thisIsEve_e;
336  hitIsEve_mu += (thisflsE/hitTrueE)*thisIsEve_mu;
337  hitIsEve_tau += (thisflsE/hitTrueE)*thisIsEve_tau;
338  hitIsEM += (thisflsE/hitTrueE)*thisIsEM;
339  hitEveIsEM += (thisflsE/hitTrueE)*thisEveIsEM;
340  hitIsMu += (thisflsE/hitTrueE)*thisIsMu;
341  hitEveIsMu += (thisflsE/hitTrueE)*thisEveIsMu;
342 
343  }// fls
344 
345  hitsADC.push_back(hitADC);
346  hitsPECorr.push_back((double)hitPECorr);
347  hitsNfls.push_back(nFLSs);
348  hitsTrueE.push_back(hitTrueE);
349  hitsRecoE.push_back((double)hitRecoE);
350  hitsIsEve.push_back(hitIsEve);
351  hitsIsEve_e.push_back(hitIsEve_e);
352  hitsIsEve_mu.push_back(hitIsEve_mu);
353  hitsIsEve_tau.push_back(hitIsEve_tau);
354  hitsIsEM.push_back(hitIsEM);
355  hitsEveIsEM.push_back(hitEveIsEM);
356  hitsIsMu.push_back(hitIsMu);
357  hitsEveIsMu.push_back(hitEveIsMu);
358 
359  // ------------ Get Hit Position ----------------
360  double xyz[3];
361  geom->Plane(ch->Plane())->Cell(ch->Cell())->GetCenter(xyz);
362  const double x = xyz[0];
363  const double y = xyz[1];
364  const double z = xyz[2];
365 
366  if ( ch->View()==geo::kX ){
367  if ( x < xmin[0] ) { xmin[1] = xmin[0]; xmin[0] = x;}
368  else if ( x < xmin[1] ) xmin[1] = x;
369  if ( z < zmin[0] ) { zmin[1] = zmin[0]; zmin[0] = z;}
370  else if ( z < zmin[1] ) zmin[1] = z;
371  if ( x > xmax[0] ) { xmax[1] = xmax[0]; xmax[0] = x;}
372  else if ( x > xmax[1] ) xmax[1] = x;
373  if ( z > zmax[0] ) { zmax[1] = zmax[0]; zmax[0] = z;}
374  else if ( z > zmax[1] ) zmax[1] = zmax[0];
375  }
376  if ( ch->View()==geo::kY ){
377  if ( y < ymin[0] ) { ymin[1] = ymin[0]; ymin[0] = y;}
378  else if ( y < ymin[1] ) ymin[1] = y;
379  if ( z < zmin[0] ) { zmin[1] = zmin[0]; zmin[0] = z;}
380  else if ( z < zmin[1] ) zmin[1] = z;
381  if ( y > ymax[0] ) { ymax[1] = ymax[0]; ymax[0] = y;}
382  else if ( y > ymax[1] ) ymax[1] = y;
383  if ( z > zmax[0] ) { zmax[1] = zmax[0]; zmax[0] = z;}
384  else if ( z > zmax[1] ) zmax[1] = zmax[0];
385  }
386 
387  }// cellhit
388  }//views
389 
390  // ------------- Fill Interaction Tree Branches -------------
391  InteractionNCalHits = hitsADC.size();
392  InteractionNhits = (int)interactionNhits;
394  InteractionType = intType;
395  InteractionCurrent = intCurrent;
396  InteractionNuPDG = nuPDG;
397  InteractionLepPDG = lepPDG;
398  IntSliceEfficiency = sliceEfficiency;
399 
400  double TotalRecoE =0;
401  double TotalRecoE_EM =0;
402 
403  for(int h = 0; h < InteractionNCalHits; ++h){
404  HitsNfls[h] = hitsNfls[h];
405  HitsIsEve[h] = hitsIsEve[h];
406  HitsIsEve_e[h] = hitsIsEve_e[h];
407  HitsIsEve_mu[h] = hitsIsEve_mu[h];
408  HitsIsEve_tau[h] = hitsIsEve_tau[h];
409  HitsIsEM[h] = hitsIsEM[h];
410  HitsEveIsEM[h] = hitsEveIsEM[h];
411  HitsIsMu[h] = hitsIsMu[h];
412  HitsEveIsMu[h] = hitsEveIsMu[h];
413  HitsADC[h] = hitsADC[h];
414  HitsPECorr[h] = hitsPECorr[h];
415  HitsTrueE[h] = hitsTrueE[h];
416  HitsRecoE[h] = hitsRecoE[h];
417 
418  double EveMuness = HitsIsEve_mu[h];
419  double EMness = HitsIsEM[h];
420 
421  TotalRecoE += (1.0 -EveMuness)*(HitsRecoE[h]);
422  TotalRecoE_EM += EMness *(HitsRecoE[h]);
423  }
424 
425  double InteractionHitRecoE = TotalRecoE;
426  // Ratio of EM fraction/Total hits Reco E
427  double R_emRE_HitsRE = TotalRecoE_EM/InteractionHitRecoE;
428 
429  IntSliceEMfraction = R_emRE_HitsRE;
430 
431  // -------------------- Do All Cuts -----------------------
432  if ( fDoBBCcut ){
433  // Allow 0 hits outside containment
434  if (xmin[0] < fMinXFid || ymin[0] < fMinYFid || zmin[0] < fMinZ ||
435  xmax[0] > fMaxXFid || ymax[0] > fMaxYFid || zmax[0] > fMaxZ )
436  selected = false;
437  }
438 
439  if( !selected ) continue;
440 
441  fInteractionTree->Fill();
442 
443  }//slices
444 
445  }// end analyze
446 
447 } // end namespace showere
448 
449 
450 ////////////////////////////////////////////////////////////////////////
451 namespace showere
452 {
454 }
double E(const int i=0) const
Definition: MCParticle.h:232
back track the reconstruction to the simulation
int PdgCode() const
Definition: MCParticle.h:211
int CCNC() const
Definition: MCNeutrino.h:148
unsigned int NCell(geo::View_t view) const
Number of cells in view view.
Definition: Cluster.cxx:134
const simb::MCNeutrino & GetNeutrino() const
Definition: MCTruth.h:76
std::map< std::string, double > xmax
ShowerEnergyAna(const fhicl::ParameterSet &pset)
TH2 * rh
Definition: drawXsec.C:5
std::vector< NeutrinoEffPur > SliceToNeutrinoInteractions(const std::vector< const rb::CellHit * > &sliceHits, const std::vector< const rb::CellHit * > &allHits, bool sortPur=false) const
Given a collection of hits (often a slice), returns vector of structures of neutrino interactions...
const sim::ParticleNavigator & ParticleNavigator() const
Get a reference to the ParticleNavigator.
Definition: BackTracker.h:744
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
unsigned short Plane() const
Definition: CellHit.h:39
geo::View_t View() const
Definition: CellHit.h:41
const simb::MCParticle & Nu() const
Definition: MCNeutrino.h:146
Vertical planes which measure X.
Definition: PlaneGeo.h:28
A single unit of energy deposition in the liquid scintillator.
Definition: FLSHit.h:19
const PlaneGeo * Plane(unsigned int i) const
DEFINE_ART_MODULE(TestTMapFile)
void analyze(const art::Event &evt)
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
art::PtrVector< rb::CellHit > AllCells() const
Get all cells from both views.
Definition: Cluster.cxx:180
Calibrated quantities relying on position in the orthogonal view. To generate a rb::CellHit from a rb...
Definition: RecoHit.h:19
Double_t ymax
Definition: plot.C:25
unsigned short Cell() const
Definition: CellHit.h:40
int InteractionType() const
Definition: MCNeutrino.h:150
void reconfigure(const fhicl::ParameterSet &pset)
const simb::MCParticle & Lepton() const
Definition: MCNeutrino.h:147
void push_back(Ptr< U > const &p)
Definition: PtrVector.h:441
Float_t E
Definition: plot.C:20
std::vector< sim::FLSHit > HitToFLSHit(const rb::CellHit &hit) const
All the FLSHits that contributed to this hit, sorted from most to least light.
T get(std::string const &key) const
Definition: ParameterSet.h:231
rb::RecoHit RecoHit(const art::Ptr< rb::CellHit > &chit) const
Return calibrated hit based on assumed W coordinate.
Definition: Cluster.cxx:259
Collect Geo headers and supply basic geometry functions.
bool IsCalibrated() const
You MUST check here before accessing PECorr, MIP or GeV.
Definition: RecoHit.cxx:35
bool IsFiltered(const art::Event &evt, art::Ptr< T > x, const std::vector< std::string > &labels)
Is this Ptr marked "filtered out"?
Definition: FilterList.h:96
const double j
Definition: BetheBloch.cxx:29
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:100
z
Definition: test.py:28
float GetEdepBirks() const
Get total Energy with Birks suppression deposited into the cell for the whole FLSHit.
Definition: FLSHit.h:33
const sim::Particle * TrackIDToParticle(int const &id) const
Returns a pointer to the sim::Particle object corresponding to the given TrackID. ...
art::Ptr< rb::CellHit > Cell(geo::View_t view, unsigned int viewIdx) const
Get the ith cell from view view.
Definition: Cluster.cxx:145
::xsd::cxx::tree::string< char, simple_type > string
Definition: Database.h:154
A rawdata::RawDigit with channel information decoded.
Definition: CellHit.h:27
T * make(ARGS...args) const
float GeV() const
Definition: RecoHit.cxx:69
int GetTrackID() const
Track ID.
Definition: FLSHit.h:45
int16_t ADC(uint32_t i) const
Definition: RawDigit.cxx:58
T const * get() const
Definition: Ptr.h:321
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
void geom(int which=0)
Definition: geom.C:163
Double_t ymin
Definition: plot.C:24
bool NeutrinoSet() const
Definition: MCTruth.h:77
float PECorr() const
Definition: RecoHit.cxx:47
bool IsNoise() const
Is the noise flag set?
Definition: Cluster.h:163
Event generator information.
Definition: MCNeutrino.h:18
std::vector< NeutrinoEffPur > SliceToMCTruth(const std::vector< const rb::CellHit * > &sliceHits, const std::vector< const rb::CellHit * > &allHits, bool sortPur=false) const
Given a collection of hits (often a slice), returns vector of structures of MCTruth, efficiency, and purity of that neutrino interaction relative to the slice. Efficiency is defined as FLS energy from neutrino interaction in slice / total FLS energy from neutrino interaction in event. This vector is sorted from the highest efficiency interaction to lowest. This function returns all MCTruth, including those without neutrino interactions, i.e. cosmics.
Encapsulate the geometry of one entire detector (near, far, ndos)
int EveId(const int trackID) const