FillTruth.h
Go to the documentation of this file.
1 #ifndef CAF_FILLTRUTH_H
2 #define CAF_FILLTRUTH_H
3 
5 
6 #include "NovaDAQConventions/DAQConventions.h"
7 
9 
10 #include <vector>
11 #include <iterator>
13 
14 namespace rb{class Cluster; class CellHit;}
15 namespace sim{class Particle; class TrueEnergy;}
16 namespace cheat{struct NeutrinoEffPur; struct TrackIDE;}
17 namespace rwgt{class GENIEReweightTable;}
18 namespace fxwgt{class FluxWeights;}
19 
20 namespace caf
21 {
22  /// Function to fill the particle truth for a set of hits
23  SRParticleTruth FillParticleTruth(const std::vector<rb::Cluster>& sliceList,
25  std::vector<cheat::TrackIDE>& allTracks,
26  std::vector<cheat::TrackIDE>& sliceTracks,
27  std::vector<cheat::TrackIDE> &allTracksBirks,
28  std::vector<cheat::TrackIDE> &sliceTracksBirks,
29  int sliceIdx);
30 
32  std::vector<cheat::TrackIDE>& allTracks,
33  std::vector<cheat::TrackIDE>& sliceTracks,
34  std::vector<cheat::TrackIDE> &allTracksBirks,
35  std::vector<cheat::TrackIDE> &sliceTracksBirks,
36  std::vector<SRTrueParticle>* vec,
37  const std::vector<sim::TrueEnergy>& TrueEnergies);
38 
39  float FindDaughterVisE(const sim::Particle& part,
40  std::vector<cheat::TrackIDE>& allTracks);
41 
42  float FindDaughterVisENonRecur(const sim::Particle& part,
43  std::vector<cheat::TrackIDE>& allTracks);
44 
45  void AddCosmicTruthToVec(const cheat::NeutrinoEffPur* effPur,
46  std::vector<cheat::TrackIDE>& allTracks,
47  std::vector<cheat::TrackIDE>& sliceTracks,
48  std::vector<cheat::TrackIDE> &allTracksBirks,
49  std::vector<cheat::TrackIDE> &sliceTracksBirks,
50  std::vector<SRCosmic>* vec);
51 
52  void FindAndAddMichels(std::vector<const sim::Particle*> particles,
53  std::vector<cheat::TrackIDE>& allTracks,
54  std::vector<SRTrueMichelE>* michelVec);
55 
56  void AddTrueMichelEToVec(const sim::Particle& michel,
57  const sim::Particle& motherMuon,
58  std::vector<cheat::TrackIDE>& allTracks,
59  std::vector<SRTrueMichelE>* vec);
60 
61  double TrueNeutrinoDistance(novadaq::cnv::DetId det, const SRNeutrino& nu);
62 
63  std::vector<SRGenieWeights> GenieReweightTable(const rwgt::GENIEReweightTable& table);
64 
65  SRFluxWeights FluxReweights(const fxwgt::FluxWeights& flxwgts);
66 
68 
69  std::vector<unsigned int> DecodeGeneratorVersion(const std::string& versionString);
70 }
71 
72 #endif
caf::generator_ CAFGeneratorEnum(simb::Generator_t simbGeneratorEnum)
Definition: FillTruth.cxx:786
double TrueNeutrinoDistance(novadaq::cnv::DetId det, const SRNeutrino &nu)
Definition: FillTruth.cxx:724
float FindDaughterVisE(const sim::Particle &part, std::vector< cheat::TrackIDE > &tracks)
Definition: FillTruth.cxx:484
void AddParticleToVec(const sim::Particle &part, std::vector< cheat::TrackIDE > &allTracks, std::vector< cheat::TrackIDE > &sliceTracks, std::vector< cheat::TrackIDE > &allTracksBirks, std::vector< cheat::TrackIDE > &sliceTracksBirks, std::vector< SRTrueParticle > *vec, const std::vector< sim::TrueEnergy > &TrueEnergies)
Definition: FillTruth.cxx:255
enum simb::_ev_generator Generator_t
generator used to produce event, if applicable
SRFluxWeights FluxReweights(const fxwgt::FluxWeights &flxwgts)
Definition: FillTruth.cxx:776
generator_
Known generators of neutrino interactions (extend as other generators are used)
Definition: SREnums.h:28
float FindDaughterVisENonRecur(const sim::Particle &part, std::vector< cheat::TrackIDE > &tracks)
Definition: FillTruth.cxx:509
SRParticleTruth FillParticleTruth(const std::vector< rb::Cluster > &sliceList, const art::PtrVector< rb::CellHit > &hits, std::vector< cheat::TrackIDE > &allTracks, std::vector< cheat::TrackIDE > &sliceTracks, std::vector< cheat::TrackIDE > &allTracksBirks, std::vector< cheat::TrackIDE > &sliceTracksBirks, int sliceIdx)
Function to fill the particle truth for a set of hits.
Definition: FillTruth.cxx:25
TString part[npart]
Definition: Style.C:32
void hits()
Definition: readHits.C:15
void FindAndAddMichels(std::vector< const sim::Particle * > particles, std::vector< cheat::TrackIDE > &allTracks, std::vector< SRTrueMichelE > *michelVec)
Definition: FillTruth.cxx:661
Use NuReweight to compute +/-1,2sigma shifts for all systematics.
Definition: FillTruth.h:17
Store flux weigths for neutrino correction.
Definition: FluxWeights.h:15
Eigen::VectorXd vec
std::vector< unsigned int > DecodeGeneratorVersion(const std::string &versionString)
Definition: FillTruth.cxx:803
Perform a "2 point" Hough transform on a collection of hits.
void AddTrueMichelEToVec(const sim::Particle &michel, const sim::Particle &motherMuon, std::vector< cheat::TrackIDE > &allTracks, std::vector< SRTrueMichelE > *vec)
Definition: FillTruth.cxx:695
Example routine for calculating the "ultimate e-m mother" of a particle in a simulated event...
Definition: FillTruth.h:15
::xsd::cxx::tree::string< char, simple_type > string
Definition: Database.h:154
code to link reconstructed objects back to the MC truth information
Definition: FillTruth.h:16
Store +/-1,2sigma shifts for all GENIE reweighting systematics.
This module creates Common Analysis Files.
Definition: FileReducer.h:10
void AddCosmicTruthToVec(const cheat::NeutrinoEffPur *effPur, std::vector< cheat::TrackIDE > &allTracks, std::vector< cheat::TrackIDE > &sliceTracks, std::vector< cheat::TrackIDE > &allTracksBirks, std::vector< cheat::TrackIDE > &sliceTracksBirks, std::vector< SRCosmic > *vec)
Definition: FillTruth.cxx:532
std::vector< SRGenieWeights > GenieReweightTable(const rwgt::GENIEReweightTable &table)
Definition: FillTruth.cxx:759