13 static const std::vector<std::string>
SCALAR_VARS({ });
37 algCalorimetry(algCalorimetry),
38 labelPFPModule(labelPFPModule),
39 labelPFPTrack(labelPFPTrack),
40 labelPFPShower(labelPFPShower),
53 auto start = track->Start();
54 auto dir = track->StartDirection();
82 auto start =
shower->ShowerStart();
122 const std::vector<art::Ptr<recob::PFParticle>> particles
125 for (
const auto &particle : particles)
135 if (isTrack == isShower) {
static art::Ptr< recob::Track > GetTrack(const art::Ptr< recob::PFParticle > &pParticle, const art::Event &evt, const std::string &pParticleLabel, const std::string &trackLabel)
Get the track associated to this particle. Should only be called if IsTrack method succeeds...
calo::CalorimetryAlg & algCalorimetry
static const std::vector< std::string > VECTOR_VARS({})
void extractVars(const art::Event &evt, VarDict &vars) override
Utility containing helpful functions for end users to access information about Tracks.
std::pair< double, double > calcHitsChargeCalE(const std::vector< art::Ptr< recob::Hit >> &hits, const art::Event &evt, calo::CalorimetryAlg &algCalorimetry, unsigned int plane)
static bool IsShower(const art::Ptr< recob::PFParticle > &pParticle, const art::Event &evt, const std::string &pParticleLabel, const std::string &showerLabel)
Check if this particle has an associated shower.
void extractShowerVars(const art::Event &evt, const art::Ptr< recob::PFParticle > &particle, VarDict &vars)
static std::vector< art::Ptr< recob::Hit > > GetHits(const art::Ptr< recob::Track > &pTrack, const art::Event &evt, const std::string &label)
Get the hits associated with the track.
static art::Ptr< recob::Shower > GetShower(const art::Ptr< recob::PFParticle > &pParticle, const art::Event &evt, const std::string &pParticleLabel, const std::string &showerLabel)
Get the shower associated to this particle. Should only be called if IsShower method succeeds...
std::string labelPFPShower
static const std::vector< std::string > SCALAR_VARS({"run","subRun","event"})
Utility containing helpful functions for end users to access information about Showers.
Utility containing helpful functions for end users to access information about PFParticles.
std::string labelPFPModule
Utility containing helpful functions for end users to access products from events.
void extractTrackVars(const art::Event &evt, const art::Ptr< recob::PFParticle > &particle, VarDict &vars)
void extractBasicVars(const art::Event &evt, const std::vector< art::Ptr< recob::Hit >> &hits, VarDict &vars)
static std::vector< art::Ptr< recob::Hit > > GetHits(const art::Ptr< recob::Shower > &pShower, const art::Event &evt, const std::string &label)
Get the hits associated with the shower.
std::string labelPFPTrack
PFParticleVarExtractor(const std::string &prefix, calo::CalorimetryAlg &algCalorimetry, const std::string &labelPFPModule, const std::string &labelPFPTrack, const std::string &labelPFPShower, unsigned int plane=2)
static bool IsTrack(const art::Ptr< recob::PFParticle > &pParticle, const art::Event &evt, const std::string &pParticleLabel, const std::string &trackLabel)
Check if this particle has an associated track.
static std::vector< art::Ptr< recob::PFParticle > > GetPFParticles(const art::Event &evt, const std::string &label)
Get the particles from the event.