#include <ProtoDUNEPFParticleUtils.h>
Public Member Functions | |
ProtoDUNEPFParticleUtils () | |
~ProtoDUNEPFParticleUtils () | |
unsigned int | GetNumberPrimaryPFParticle (art::Event const &evt, const std::string particleLabel) const |
Get the number of primary PFParticles. More... | |
const std::map< unsigned int, std::vector< const recob::PFParticle * > > | GetPFParticleSliceMap (art::Event const &evt, const std::string particleLabel) const |
Get a map of slice index to the primary PFParticles within it. More... | |
const std::map< unsigned int, std::vector< const recob::PFParticle * > > | GetAllPFParticleSliceMap (art::Event const &evt, const std::string particleLabel) const |
Get a map of slice index to all of the PFParticles within it. More... | |
const std::vector< const recob::PFParticle * > | GetPFParticlesFromSlice (const unsigned short slice, art::Event const &evt, const std::string particleLabel) const |
Get the Primary PFParticles from a given slice. Returns an empty vector if the slice number is not valid. More... | |
const std::vector< const recob::PFParticle * > | GetAllPFParticlesFromSlice (const unsigned short slice, art::Event const &evt, const std::string particleLabel) const |
Get all of the PFParticles from a given slice. Returns an empty vector if the slice number is not valid. More... | |
unsigned short | GetBeamSlice (art::Event const &evt, const std::string particleLabel) const |
Try to get the slice tagged as beam. Returns 9999 if no beam slice was found. More... | |
const std::vector< const recob::PFParticle * > | GetPFParticlesFromBeamSlice (art::Event const &evt, const std::string particleLabel) const |
Return the pointers for the PFParticles in the beam slice. Returns an empty vector is no beam slice was found. More... | |
const recob::Slice * | GetPFParticleSlice (const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel) const |
Get the reconstructed slice associated with a particle. More... | |
unsigned short | GetPFParticleSliceIndex (const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel) const |
Get the reconstructed slice number associated with a particle. More... | |
const std::vector< const recob::Hit * > | GetPFParticleSliceHits (const recob::PFParticle &particlei, art::Event const &evt, const std::string particleLabel) const |
For a given PFParticle, return all hits from the slice it comes from. More... | |
const std::vector< const recob::Hit * > | GetPFParticleSliceUnassociatedHits (const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel) const |
For a given PFParticle find its slice and return all those hits not associated to any PFParticle. More... | |
std::vector< anab::CosmicTag > | GetPFParticleCosmicTag (const recob::PFParticle &particle, art::Event const &evt, std::string particleLabel) const |
Get the cosmic tag(s) from a given PFParticle. More... | |
std::vector< anab::T0 > | GetPFParticleT0 (const recob::PFParticle &particle, art::Event const &evt, std::string particleLabel) const |
Get the T0(s) from a given PFParticle. More... | |
std::vector< anab::T0 > | GetPFParticleT0 (const recob::PFParticle &particle, art::Event const &evt, std::string particleLabel, std::string t0Label) const |
float | GetBeamCosmicScore (const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel) const |
Access the BDT output used to decide if a slice is beam-like or cosmic-like. More... | |
bool | IsBeamParticle (const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel) const |
Use the pandora metadata to tell us if this is a beam particle or not. More... | |
bool | IsClearCosmic (const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel) const |
Pandora tags and removes clear cosmics before slicing, so check if this particle is a clear cosmic. More... | |
const std::vector< const recob::PFParticle * > | GetClearCosmicPFParticles (art::Event const &evt, const std::string particleLabel) const |
Get all of the clear cosmic ray particles. More... | |
const std::map< std::string, float > | GetPFParticleMetaData (const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel) const |
Get the metadata associated to a PFParticle from pandora. More... | |
const TVector3 | GetPFParticleVertex (const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel, const std::string trackLabel) const |
Function to find the interaction vertex of a primary PFParticle. More... | |
const TVector3 | GetPFParticleSecondaryVertex (const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel, const std::string trackLabel) const |
Function to find the secondary interaction vertex of a primary PFParticle. More... | |
bool | IsPFParticleTracklike (const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel, const std::string trackLabel) const |
Is the particle track-like? More... | |
bool | IsPFParticleTracklike (const recob::PFParticle &particle) const |
bool | IsPFParticleShowerlike (const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel, const std::string showerLabel) const |
Is the particle track-like? More... | |
bool | IsPFParticleShowerlike (const recob::PFParticle &particle) const |
const recob::Track * | GetPFParticleTrack (const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel, const std::string trackLabel) const |
Get the track associated to this particle. Returns a null pointer if not found. More... | |
const recob::Shower * | GetPFParticleShower (const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel, const std::string showerLabel) const |
Get the shower associated to this particle. Returns a null pointer if not found. More... | |
const std::vector< const recob::SpacePoint * > | GetPFParticleSpacePoints (const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel) const |
unsigned int | GetNumberPFParticleSpacePoints (const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel) const |
Get the number of space points. More... | |
const std::vector< const recob::Cluster * > | GetPFParticleClusters (const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel) const |
Get the clusters associated to the PFParticle. More... | |
unsigned int | GetNumberPFParticleClusters (const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel) const |
Get the number of clusters associated to the PFParticle. More... | |
const std::vector< const recob::Hit * > | GetPFParticleHits (const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel) const |
Get the hits associated to the PFParticle. More... | |
const std::vector< const recob::Hit * > | GetPFParticleHitsFromPlane (const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel, unsigned int planeID) const |
const std::vector< art::Ptr< recob::Hit > > | GetPFParticleHits_Ptrs (const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel) const |
const std::vector< art::Ptr< recob::Hit > > | GetPFParticleHitsFromPlane_Ptrs (const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel, size_t planeID) const |
unsigned int | GetNumberPFParticleHits (const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel) const |
Get the number of hits. More... | |
const std::vector< double > | GetPFParticleHitsCharge (const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel) const |
Get the total hit charge for each view. More... | |
const double | GetPFParticleEarliestHitPeakTime (const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel) const |
Get the earliest hit peak time. More... | |
const std::vector< const recob::Track * > | GetPFParticleDaughterTracks (const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel, const std::string trackLabel) const |
Get the daughter tracks from the PFParticle. More... | |
const std::vector< const recob::Shower * > | GetPFParticleDaughterShowers (const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel, const std::string showerLabel) const |
Get the daughter showers from the PFParticle. More... | |
Private Member Functions | |
const std::map< unsigned int, std::vector< const recob::PFParticle * > > | SliceMapHelper (art::Event const &evt, const std::string particleLabel, bool primaryOnly) const |
Helper to get the slice map and avoid code repetition. More... | |
bool | FindBoolInMetaData (const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel, const std::string entry) const |
Look for entries in the meta data. More... | |
float | FindFloatInMetaData (const recob::PFParticle &particle, art::Event const &evt, const std::string particleLabel, const std::string entry) const |
Definition at line 30 of file ProtoDUNEPFParticleUtils.h.
protoana::ProtoDUNEPFParticleUtils::ProtoDUNEPFParticleUtils | ( | ) |
Definition at line 15 of file ProtoDUNEPFParticleUtils.cxx.
protoana::ProtoDUNEPFParticleUtils::~ProtoDUNEPFParticleUtils | ( | ) |
Definition at line 19 of file ProtoDUNEPFParticleUtils.cxx.
|
private |
Look for entries in the meta data.
Definition at line 195 of file ProtoDUNEPFParticleUtils.cxx.
|
private |
Definition at line 208 of file ProtoDUNEPFParticleUtils.cxx.
const std::vector< const recob::PFParticle * > protoana::ProtoDUNEPFParticleUtils::GetAllPFParticlesFromSlice | ( | const unsigned short | slice, |
art::Event const & | evt, | ||
const std::string | particleLabel | ||
) | const |
Get all of the PFParticles from a given slice. Returns an empty vector if the slice number is not valid.
Definition at line 161 of file ProtoDUNEPFParticleUtils.cxx.
const std::map< unsigned int, std::vector< const recob::PFParticle * > > protoana::ProtoDUNEPFParticleUtils::GetAllPFParticleSliceMap | ( | art::Event const & | evt, |
const std::string | particleLabel | ||
) | const |
Get a map of slice index to all of the PFParticles within it.
Definition at line 72 of file ProtoDUNEPFParticleUtils.cxx.
float protoana::ProtoDUNEPFParticleUtils::GetBeamCosmicScore | ( | const recob::PFParticle & | particle, |
art::Event const & | evt, | ||
const std::string | particleLabel | ||
) | const |
Access the BDT output used to decide if a slice is beam-like or cosmic-like.
Definition at line 182 of file ProtoDUNEPFParticleUtils.cxx.
unsigned short protoana::ProtoDUNEPFParticleUtils::GetBeamSlice | ( | art::Event const & | evt, |
const std::string | particleLabel | ||
) | const |
Try to get the slice tagged as beam. Returns 9999 if no beam slice was found.
Definition at line 130 of file ProtoDUNEPFParticleUtils.cxx.
const std::vector< const recob::PFParticle * > protoana::ProtoDUNEPFParticleUtils::GetClearCosmicPFParticles | ( | art::Event const & | evt, |
const std::string | particleLabel | ||
) | const |
Get all of the clear cosmic ray particles.
Definition at line 328 of file ProtoDUNEPFParticleUtils.cxx.
unsigned int protoana::ProtoDUNEPFParticleUtils::GetNumberPFParticleClusters | ( | const recob::PFParticle & | particle, |
art::Event const & | evt, | ||
const std::string | particleLabel | ||
) | const |
Get the number of clusters associated to the PFParticle.
Definition at line 557 of file ProtoDUNEPFParticleUtils.cxx.
unsigned int protoana::ProtoDUNEPFParticleUtils::GetNumberPFParticleHits | ( | const recob::PFParticle & | particle, |
art::Event const & | evt, | ||
const std::string | particleLabel | ||
) | const |
Get the number of hits.
Definition at line 653 of file ProtoDUNEPFParticleUtils.cxx.
unsigned int protoana::ProtoDUNEPFParticleUtils::GetNumberPFParticleSpacePoints | ( | const recob::PFParticle & | particle, |
art::Event const & | evt, | ||
const std::string | particleLabel | ||
) | const |
Get the number of space points.
Definition at line 533 of file ProtoDUNEPFParticleUtils.cxx.
unsigned int protoana::ProtoDUNEPFParticleUtils::GetNumberPrimaryPFParticle | ( | art::Event const & | evt, |
const std::string | particleLabel | ||
) | const |
const std::vector< const recob::Cluster * > protoana::ProtoDUNEPFParticleUtils::GetPFParticleClusters | ( | const recob::PFParticle & | particle, |
art::Event const & | evt, | ||
const std::string | particleLabel | ||
) | const |
Get the clusters associated to the PFParticle.
Definition at line 540 of file ProtoDUNEPFParticleUtils.cxx.
std::vector< anab::CosmicTag > protoana::ProtoDUNEPFParticleUtils::GetPFParticleCosmicTag | ( | const recob::PFParticle & | particle, |
art::Event const & | evt, | ||
std::string | particleLabel | ||
) | const |
Get the cosmic tag(s) from a given PFParticle.
Definition at line 79 of file ProtoDUNEPFParticleUtils.cxx.
const std::vector< const recob::Shower * > protoana::ProtoDUNEPFParticleUtils::GetPFParticleDaughterShowers | ( | const recob::PFParticle & | particle, |
art::Event const & | evt, | ||
const std::string | particleLabel, | ||
const std::string | showerLabel | ||
) | const |
Get the daughter showers from the PFParticle.
Definition at line 716 of file ProtoDUNEPFParticleUtils.cxx.
const std::vector< const recob::Track * > protoana::ProtoDUNEPFParticleUtils::GetPFParticleDaughterTracks | ( | const recob::PFParticle & | particle, |
art::Event const & | evt, | ||
const std::string | particleLabel, | ||
const std::string | trackLabel | ||
) | const |
Get the daughter tracks from the PFParticle.
Definition at line 695 of file ProtoDUNEPFParticleUtils.cxx.
const double protoana::ProtoDUNEPFParticleUtils::GetPFParticleEarliestHitPeakTime | ( | const recob::PFParticle & | particle, |
art::Event const & | evt, | ||
const std::string | particleLabel | ||
) | const |
Get the earliest hit peak time.
Definition at line 681 of file ProtoDUNEPFParticleUtils.cxx.
const std::vector< const recob::Hit * > protoana::ProtoDUNEPFParticleUtils::GetPFParticleHits | ( | const recob::PFParticle & | particle, |
art::Event const & | evt, | ||
const std::string | particleLabel | ||
) | const |
Get the hits associated to the PFParticle.
Definition at line 564 of file ProtoDUNEPFParticleUtils.cxx.
const std::vector< art::Ptr< recob::Hit > > protoana::ProtoDUNEPFParticleUtils::GetPFParticleHits_Ptrs | ( | const recob::PFParticle & | particle, |
art::Event const & | evt, | ||
const std::string | particleLabel | ||
) | const |
Definition at line 612 of file ProtoDUNEPFParticleUtils.cxx.
const std::vector< double > protoana::ProtoDUNEPFParticleUtils::GetPFParticleHitsCharge | ( | const recob::PFParticle & | particle, |
art::Event const & | evt, | ||
const std::string | particleLabel | ||
) | const |
Get the total hit charge for each view.
Definition at line 660 of file ProtoDUNEPFParticleUtils.cxx.
const std::vector< const recob::Hit * > protoana::ProtoDUNEPFParticleUtils::GetPFParticleHitsFromPlane | ( | const recob::PFParticle & | particle, |
art::Event const & | evt, | ||
const std::string | particleLabel, | ||
unsigned int | planeID | ||
) | const |
Definition at line 585 of file ProtoDUNEPFParticleUtils.cxx.
const std::vector< art::Ptr< recob::Hit > > protoana::ProtoDUNEPFParticleUtils::GetPFParticleHitsFromPlane_Ptrs | ( | const recob::PFParticle & | particle, |
art::Event const & | evt, | ||
const std::string | particleLabel, | ||
size_t | planeID | ||
) | const |
Definition at line 631 of file ProtoDUNEPFParticleUtils.cxx.
const std::map< std::string, float > protoana::ProtoDUNEPFParticleUtils::GetPFParticleMetaData | ( | const recob::PFParticle & | particle, |
art::Event const & | evt, | ||
const std::string | particleLabel | ||
) | const |
Get the metadata associated to a PFParticle from pandora.
Definition at line 308 of file ProtoDUNEPFParticleUtils.cxx.
const TVector3 protoana::ProtoDUNEPFParticleUtils::GetPFParticleSecondaryVertex | ( | const recob::PFParticle & | particle, |
art::Event const & | evt, | ||
const std::string | particleLabel, | ||
const std::string | trackLabel | ||
) | const |
Function to find the secondary interaction vertex of a primary PFParticle.
Definition at line 407 of file ProtoDUNEPFParticleUtils.cxx.
const std::vector< const recob::PFParticle * > protoana::ProtoDUNEPFParticleUtils::GetPFParticlesFromBeamSlice | ( | art::Event const & | evt, |
const std::string | particleLabel | ||
) | const |
Return the pointers for the PFParticles in the beam slice. Returns an empty vector is no beam slice was found.
Definition at line 175 of file ProtoDUNEPFParticleUtils.cxx.
const std::vector< const recob::PFParticle * > protoana::ProtoDUNEPFParticleUtils::GetPFParticlesFromSlice | ( | const unsigned short | slice, |
art::Event const & | evt, | ||
const std::string | particleLabel | ||
) | const |
Get the Primary PFParticles from a given slice. Returns an empty vector if the slice number is not valid.
Definition at line 147 of file ProtoDUNEPFParticleUtils.cxx.
const recob::Shower * protoana::ProtoDUNEPFParticleUtils::GetPFParticleShower | ( | const recob::PFParticle & | particle, |
art::Event const & | evt, | ||
const std::string | particleLabel, | ||
const std::string | showerLabel | ||
) | const |
Get the shower associated to this particle. Returns a null pointer if not found.
Definition at line 496 of file ProtoDUNEPFParticleUtils.cxx.
const recob::Slice * protoana::ProtoDUNEPFParticleUtils::GetPFParticleSlice | ( | const recob::PFParticle & | particle, |
art::Event const & | evt, | ||
const std::string | particleLabel | ||
) | const |
Get the reconstructed slice associated with a particle.
Definition at line 223 of file ProtoDUNEPFParticleUtils.cxx.
const std::vector< const recob::Hit * > protoana::ProtoDUNEPFParticleUtils::GetPFParticleSliceHits | ( | const recob::PFParticle & | particlei, |
art::Event const & | evt, | ||
const std::string | particleLabel | ||
) | const |
For a given PFParticle, return all hits from the slice it comes from.
Definition at line 258 of file ProtoDUNEPFParticleUtils.cxx.
unsigned short protoana::ProtoDUNEPFParticleUtils::GetPFParticleSliceIndex | ( | const recob::PFParticle & | particle, |
art::Event const & | evt, | ||
const std::string | particleLabel | ||
) | const |
Get the reconstructed slice number associated with a particle.
Definition at line 235 of file ProtoDUNEPFParticleUtils.cxx.
const std::map< unsigned int, std::vector< const recob::PFParticle * > > protoana::ProtoDUNEPFParticleUtils::GetPFParticleSliceMap | ( | art::Event const & | evt, |
const std::string | particleLabel | ||
) | const |
Get a map of slice index to the primary PFParticles within it.
Definition at line 65 of file ProtoDUNEPFParticleUtils.cxx.
const std::vector< const recob::Hit * > protoana::ProtoDUNEPFParticleUtils::GetPFParticleSliceUnassociatedHits | ( | const recob::PFParticle & | particle, |
art::Event const & | evt, | ||
const std::string | particleLabel | ||
) | const |
For a given PFParticle find its slice and return all those hits not associated to any PFParticle.
Definition at line 270 of file ProtoDUNEPFParticleUtils.cxx.
const std::vector< const recob::SpacePoint * > protoana::ProtoDUNEPFParticleUtils::GetPFParticleSpacePoints | ( | const recob::PFParticle & | particle, |
art::Event const & | evt, | ||
const std::string | particleLabel | ||
) | const |
Definition at line 516 of file ProtoDUNEPFParticleUtils.cxx.
std::vector< anab::T0 > protoana::ProtoDUNEPFParticleUtils::GetPFParticleT0 | ( | const recob::PFParticle & | particle, |
art::Event const & | evt, | ||
std::string | particleLabel | ||
) | const |
Get the T0(s) from a given PFParticle.
Definition at line 101 of file ProtoDUNEPFParticleUtils.cxx.
std::vector< anab::T0 > protoana::ProtoDUNEPFParticleUtils::GetPFParticleT0 | ( | const recob::PFParticle & | particle, |
art::Event const & | evt, | ||
std::string | particleLabel, | ||
std::string | t0Label | ||
) | const |
Definition at line 107 of file ProtoDUNEPFParticleUtils.cxx.
const recob::Track * protoana::ProtoDUNEPFParticleUtils::GetPFParticleTrack | ( | const recob::PFParticle & | particle, |
art::Event const & | evt, | ||
const std::string | particleLabel, | ||
const std::string | trackLabel | ||
) | const |
Get the track associated to this particle. Returns a null pointer if not found.
Definition at line 476 of file ProtoDUNEPFParticleUtils.cxx.
const TVector3 protoana::ProtoDUNEPFParticleUtils::GetPFParticleVertex | ( | const recob::PFParticle & | particle, |
art::Event const & | evt, | ||
const std::string | particleLabel, | ||
const std::string | trackLabel | ||
) | const |
Function to find the interaction vertex of a primary PFParticle.
Definition at line 352 of file ProtoDUNEPFParticleUtils.cxx.
bool protoana::ProtoDUNEPFParticleUtils::IsBeamParticle | ( | const recob::PFParticle & | particle, |
art::Event const & | evt, | ||
const std::string | particleLabel | ||
) | const |
Use the pandora metadata to tell us if this is a beam particle or not.
Definition at line 189 of file ProtoDUNEPFParticleUtils.cxx.
bool protoana::ProtoDUNEPFParticleUtils::IsClearCosmic | ( | const recob::PFParticle & | particle, |
art::Event const & | evt, | ||
const std::string | particleLabel | ||
) | const |
Pandora tags and removes clear cosmics before slicing, so check if this particle is a clear cosmic.
Definition at line 321 of file ProtoDUNEPFParticleUtils.cxx.
bool protoana::ProtoDUNEPFParticleUtils::IsPFParticleShowerlike | ( | const recob::PFParticle & | particle, |
art::Event const & | evt, | ||
const std::string | particleLabel, | ||
const std::string | showerLabel | ||
) | const |
Is the particle track-like?
Definition at line 464 of file ProtoDUNEPFParticleUtils.cxx.
bool protoana::ProtoDUNEPFParticleUtils::IsPFParticleShowerlike | ( | const recob::PFParticle & | particle | ) | const |
Definition at line 471 of file ProtoDUNEPFParticleUtils.cxx.
bool protoana::ProtoDUNEPFParticleUtils::IsPFParticleTracklike | ( | const recob::PFParticle & | particle, |
art::Event const & | evt, | ||
const std::string | particleLabel, | ||
const std::string | trackLabel | ||
) | const |
Is the particle track-like?
Definition at line 445 of file ProtoDUNEPFParticleUtils.cxx.
bool protoana::ProtoDUNEPFParticleUtils::IsPFParticleTracklike | ( | const recob::PFParticle & | particle | ) | const |
Definition at line 452 of file ProtoDUNEPFParticleUtils.cxx.
|
private |
Helper to get the slice map and avoid code repetition.
Definition at line 40 of file ProtoDUNEPFParticleUtils.cxx.