10 #ifndef MCTruthAssociations_H
11 #define MCTruthAssociations_H
16 #include "nusimdata/SimulationBase/MCTruth.h"
17 #include "nusimdata/SimulationBase/MCParticle.h"
23 #include "canvas/Persistency/Common/Assns.h"
24 #include "canvas/Persistency/Common/FindOneP.h"
33 #include "fhiclcpp/ParameterSet.h"
85 std::vector<const simb::MCParticle*>
MCTruthToParticles(art::Ptr<simb::MCTruth>
const& mct)
const;
91 std::vector<TrackIDE>
HitToTrackID(art::Ptr<recob::Hit>
const&)
const;
95 std::vector<int>
const&)
const;
99 std::vector<TrackIDE>
HitToEveID(art::Ptr<recob::Hit>
const&
hit)
const;
102 std::vector<double>
HitToXYZ(art::Ptr<recob::Hit>
const& hit)
const;
144 using HitMatchDataPair = std::pair<const recob::Hit*,const anab::BackTrackerHitMatchingData*>;
145 using PartMatchDataPair = std::pair<const simb::MCParticle*,const anab::BackTrackerHitMatchingData*>;
147 using PartToHitVecMap = std::map<const simb::MCParticle*, std::set<HitMatchDataPair>>;
165 const simb::MCParticle& part,
double dx,
166 TVector3& start, TVector3&
end, TVector3& startmom, TVector3& endmom,
167 unsigned int tpc = 0,
unsigned int cstat = 0)
const;
185 #endif // MCTruthAssociations_H
std::pair< const simb::MCParticle *, const anab::BackTrackerHitMatchingData * > PartMatchDataPair
art::Assns< simb::MCParticle, recob::Hit, anab::BackTrackerHitMatchingData > HitParticleAssociations
std::list< HitPartAssnsStruct > HitPartAssnsList
std::pair< const recob::Hit *, const anab::BackTrackerHitMatchingData * > HitMatchDataPair
MCTruthTruthVec fMCTruthVec
all the MCTruths for the event
double HitChargeCollectionEfficiency(std::set< int >, std::vector< art::Ptr< recob::Hit > > const &, std::vector< art::Ptr< recob::Hit > > const &, geo::View_t const &) const
std::vector< art::Ptr< simb::MCTruth >> MCTruthTruthVec
Particle list in DetSim contains Monte Carlo particle information.
const std::vector< std::vector< art::Ptr< recob::Hit > > > TrackIDsToHits(std::vector< art::Ptr< recob::Hit >> const &, std::vector< int > const &) const
HitToPartVecMap fHitToPartVecMap
Mapping from hits to associated MCParticle/data pairs.
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
Declaration of signal hit object.
art::Assns< simb::MCTruth, simb::MCParticle, void > MCTruthParticleAssociations
HitPartAssnsList fHitPartAssnsVec
Container for the (multiple) associations.
float fMinHitEnergyFraction
Ionization energy from a Geant4 track.
std::vector< TrackIDE > HitToEveID(art::Ptr< recob::Hit > const &hit) const
MCTruthTrackIDMap fTrackIDToMCTruthIndex
map of track ids to MCTruthList entry
PartToHitVecMap fPartToHitVecMap
Mapping from MCParticle to associated hit/data pairs.
art::FindOneP< simb::MCTruth > MCTruthAssns
std::vector< art::Ptr< simb::MCParticle >> MCParticleVec
MCTruthAssociations(fhicl::ParameterSet const &config)
float numElectrons
number of electrons from the particle detected on the wires
const simb::MCParticle * TrackIDToMotherParticle(int const &id) const
std::vector< TrackIDE > HitToTrackID(const recob::Hit *) const
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Access the description of detector geometry.
double length(const recob::Track *) const
float energy
energy from the particle with this trackID [MeV]
int calculateEvdID(int) const
std::set< int > GetSetOfTrackIDs() const
std::set< int > GetSetOfEveIDs() const
std::map< const recob::Hit *, std::set< PartMatchDataPair >> HitToPartVecMap
Obtains truth matching by using hit <–> MCParticle associations.
double HitCollectionPurity(std::set< int >, std::vector< art::Ptr< recob::Hit > > const &) const
const art::Ptr< simb::MCTruth > & TrackIDToMCTruth(int const &id) const
int trackID
Geant4 supplied trackID.
std::map< const simb::MCParticle *, std::set< HitMatchDataPair >> PartToHitVecMap
auto end(FixedBins< T, C > const &) noexcept
double HitCollectionEfficiency(std::set< int >, std::vector< art::Ptr< recob::Hit > > const &, std::vector< art::Ptr< recob::Hit > > const &, geo::View_t const &) const
double HitChargeCollectionPurity(std::set< int >, std::vector< art::Ptr< recob::Hit > > const &) const
const simb::MCParticle * TrackIDToParticle(int const &id) const
Description of geometry of one entire detector.
const art::Ptr< simb::MCTruth > & ParticleToMCTruth(const simb::MCParticle *p) const
Provides recob::Track data product.
const MCTruthParticleList & getParticleList() const
std::unordered_map< int, art::Ptr< simb::MCTruth >> MCTruthTrackIDMap
std::vector< const HitParticleAssociations * > HitParticleAssociationsVec
std::vector< double > HitToXYZ(art::Ptr< recob::Hit > const &hit) const
std::vector< double > SpacePointHitsToXYZ(art::PtrVector< recob::Hit > const &hits) const
MCTruthParticleList fParticleList
ParticleList to map track ID to.
float energyFrac
fraction of hit energy from the particle with this trackID
2D representation of charge deposited in the TDC/wire plane
std::vector< const simb::MCParticle * > MCTruthToParticles(art::Ptr< simb::MCTruth > const &mct) const
geo::GeometryCore const * fGeometry
void setup(const HitParticleAssociationsVec &, const MCParticleVec &, const MCTruthAssns &, const geo::GeometryCore &)
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track:
const MCTruthTruthVec & MCTruthVector() const