7#ifndef LAR_PANDORA_SLICE_ID_HELPER_H
8#define LAR_PANDORA_SLICE_ID_HELPER_H
26#include "canvas/Persistency/Common/Ptr.h"
29#include <unordered_map>
73 const art::Event& evt,
74 const std::string& truthLabel,
75 const std::string& mcParticleLabel,
76 const std::string& hitLabel,
77 const std::string& backtrackLabel,
78 const std::string& pandoraLabel,
80 simb::MCNeutrino& mcNeutrino);
83 typedef std::unordered_map<art::Ptr<recob::Hit>,
bool>
HitToBoolMap;
94 const std::string& truthLabel);
106 const std::string& truthLabel,
107 const std::string& mcParticleLabel,
108 const art::Ptr<simb::MCTruth>& beamNuMCTruth,
122 const std::string& hitLabel,
123 const std::string& backtrackLabel,
147 const std::string& pandoraLabel,
184 const unsigned int nNuHits,
helper function for LArPandoraInterface producer module
header for the lar pandora slice class
Helper class for slice id tools.
static unsigned int CountNeutrinoHits(const HitVector &hits, const HitToBoolMap &hitToIsNuInducedMap)
Count the number of hits in an input vector that are neutrino induced.
static void GetSliceMetadata(const SliceVector &slices, const art::Event &evt, const std::string &truthLabel, const std::string &mcParticleLabel, const std::string &hitLabel, const std::string &backtrackLabel, const std::string &pandoraLabel, SliceMetadataVector &sliceMetadata, simb::MCNeutrino &mcNeutrino)
Get MC metadata about each slice.
std::unordered_map< art::Ptr< recob::Hit >, bool > HitToBoolMap
static void CollectHits(const PFParticleVector &pfParticles, const PFParticlesToHits &pfParticleToHitsMap, HitVector &hits)
Collect the hits in a given vector of PFParticles.
static void GetPFParticleToHitsMap(const art::Event &evt, const std::string &pandoraLabel, PFParticlesToHits &pfParticleToHitsMap)
Get the mapping from PFParticles to associated hits (via clusters)
static void CollectNeutrinoMCParticles(const art::Event &evt, const std::string &truthLabel, const std::string &mcParticleLabel, const art::Ptr< simb::MCTruth > &beamNuMCTruth, MCParticleVector &mcParticles)
Collect all MCParticles that come from the beam neutrino interaction.
static void GetHitOrigins(const art::Event &evt, const std::string &hitLabel, const std::string &backtrackLabel, const MCParticleVector &mcParticles, HitVector &hits, HitToBoolMap &hitToIsNuInducedMap)
For each hit in the event, determine if any of it's charge was deposited by a neutrino induced partic...
std::vector< SliceMetadata > SliceMetadataVector
static void GetReconstructedHitsInSlice(const Slice &slice, const PFParticlesToHits &pfParticleToHitsMap, HitVector &hits)
Collect the hits in the slice that have been added to a PFParticle (under either reconstruction hypot...
static art::Ptr< simb::MCTruth > GetBeamNeutrinoMCTruth(const art::Event &evt, const std::string &truthLabel)
Get the MCTruth block for the simulated beam neutrino.
std::map< art::Ptr< recob::PFParticle >, HitVector > PFParticlesToHits
std::vector< art::Ptr< recob::Hit > > HitVector
std::vector< Slice > SliceVector
std::vector< art::Ptr< recob::PFParticle > > PFParticleVector
std::vector< art::Ptr< simb::MCParticle > > MCParticleVector