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>
14 
15 namespace rb{class Cluster; class CellHit;}
16 namespace sim{class Particle; class TrueEnergy;}
17 namespace cheat{struct NeutrinoEffPur; struct TrackIDE;}
18 namespace rwgt{class GENIEReweightTable;}
19 namespace g4rwgt{class G4WeightTable;}
20 namespace fxwgt{class FluxWeights;}
21 namespace g4rwgt{class G4WeightTable;}
22 
23 namespace caf
24 {
25  /// Function to fill the particle truth for a set of hits
26  SRParticleTruth FillParticleTruth(const std::vector<rb::Cluster>& sliceList,
28  std::vector<cheat::TrackIDE>& allTracks,
29  std::vector<cheat::TrackIDE>& sliceTracks,
30  std::vector<cheat::TrackIDE> &allTracksBirks,
31  std::vector<cheat::TrackIDE> &sliceTracksBirks,
32  int sliceIdx);
33 
35  std::vector<cheat::TrackIDE>& allTracks,
36  std::vector<cheat::TrackIDE>& sliceTracks,
37  std::vector<cheat::TrackIDE> &allTracksBirks,
38  std::vector<cheat::TrackIDE> &sliceTracksBirks,
39  std::vector<SRTrueParticle>* vec,
40  const std::vector<sim::TrueEnergy>& TrueEnergies);
41 
42  float FindDaughterVisE(const sim::Particle& part,
43  std::vector<cheat::TrackIDE>& allTracks);
44 
45  float FindDaughterVisENonRecur(const sim::Particle& part,
46  std::vector<cheat::TrackIDE>& allTracks);
47 
48  void AddCosmicTruthToVec(const cheat::NeutrinoEffPur* effPur,
49  std::vector<cheat::TrackIDE>& allTracks,
50  std::vector<cheat::TrackIDE>& sliceTracks,
51  std::vector<cheat::TrackIDE> &allTracksBirks,
52  std::vector<cheat::TrackIDE> &sliceTracksBirks,
53  std::vector<SRCosmic>* vec);
54 
55  void FindAndAddMichels(std::vector<const sim::Particle*> particles,
56  std::vector<cheat::TrackIDE>& allTracks,
57  std::vector<SRTrueMichelE>* michelVec);
58 
59  void AddTrueMichelEToVec(const sim::Particle& michel,
60  const sim::Particle& motherMuon,
61  std::vector<cheat::TrackIDE>& allTracks,
62  std::vector<SRTrueMichelE>* vec);
63 
64  void AddPreFSI( const art::Ptr<simb::MCTruth>& truth, SRNeutrino& nu );
65 
66  double TrueNeutrinoDistance(novadaq::cnv::DetId det, const SRNeutrino& nu);
67 
68  std::vector<SRGenieWeights> GenieReweightTable(const rwgt::GENIEReweightTable& table);
69 
70  SRFluxWeights FluxReweights(const fxwgt::FluxWeights& flxwgts);
71 
72  SRGeant4Weights Geant4Reweights(const g4rwgt::G4WeightTable& g4wgts);
73 
75 
76  std::vector<unsigned int> DecodeGeneratorVersion(const std::string& versionString);
77 }
78 
79 #endif
caf::generator_ CAFGeneratorEnum(simb::Generator_t simbGeneratorEnum)
Definition: FillTruth.cxx:905
double TrueNeutrinoDistance(novadaq::cnv::DetId det, const SRNeutrino &nu)
Definition: FillTruth.cxx:817
float FindDaughterVisE(const sim::Particle &part, std::vector< cheat::TrackIDE > &tracks)
Definition: FillTruth.cxx:487
void AddPreFSI(const art::Ptr< simb::MCTruth > &truth, SRNeutrino &nu)
Definition: FillTruth.cxx:726
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:258
enum simb::_ev_generator Generator_t
generator used to produce event, if applicable
Store +/- 1 sigma shifts for all geant4reweight channels.
Definition: FillTruth.h:19
SRGeant4Weights Geant4Reweights(const g4rwgt::G4WeightTable &g4wgts)
Definition: FillTruth.cxx:880
SRFluxWeights FluxReweights(const fxwgt::FluxWeights &flxwgts)
Definition: FillTruth.cxx:870
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:512
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:28
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:664
Use NuReweight to compute +/-1,2sigma shifts for all systematics.
Definition: FillTruth.h:18
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:922
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:698
Example routine for calculating the "ultimate e-m mother" of a particle in a simulated event...
Definition: FillTruth.h:16
code to link reconstructed objects back to the MC truth information
Definition: FillTruth.h:17
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:535
std::vector< SRGenieWeights > GenieReweightTable(const rwgt::GENIEReweightTable &table)
Definition: FillTruth.cxx:852
enum BeamMode string