Helper class for slice id tools. More...
#include <LArPandoraSliceIdHelper.h>
Classes | |
class | SliceMetadata |
Class to hold MC metdata about slices. More... | |
Public Types | |
typedef std::vector < SliceMetadata > | SliceMetadataVector |
Static Public Member Functions | |
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. More... | |
Private Types | |
typedef std::unordered_map < art::Ptr< recob::Hit >, bool > | HitToBoolMap |
Static Private Member Functions | |
static art::Ptr< simb::MCTruth > | GetBeamNeutrinoMCTruth (const art::Event &evt, const std::string &truthLabel) |
Get the MCTruth block for the simulated beam neutrino. More... | |
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. More... | |
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 particle. More... | |
static unsigned int | CountNeutrinoHits (const HitVector &hits, const HitToBoolMap &hitToIsNuInducedMap) |
Count the number of hits in an input vector that are neutrino induced. More... | |
static void | GetPFParticleToHitsMap (const art::Event &evt, const std::string &pandoraLabel, PFParticlesToHits &pfParticleToHitsMap) |
Get the mapping from PFParticles to associated hits (via clusters) More... | |
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 hypothesis) More... | |
static void | CollectHits (const PFParticleVector &pfParticles, const PFParticlesToHits &pfParticleToHitsMap, HitVector &hits) |
Collect the hits in a given vector of PFParticles. More... | |
static void | GetSliceMetadata (const SliceVector &slices, const PFParticlesToHits &pfParticleToHitsMap, const HitToBoolMap &hitToIsNuInducedMap, const unsigned int nNuHits, SliceMetadataVector &sliceMetadata) |
Calculate the MC slice metadata. More... | |
Helper class for slice id tools.
Definition at line 34 of file LArPandoraSliceIdHelper.h.
|
private |
Definition at line 76 of file LArPandoraSliceIdHelper.h.
typedef std::vector<SliceMetadata> lar_pandora::LArPandoraSliceIdHelper::SliceMetadataVector |
Definition at line 54 of file LArPandoraSliceIdHelper.h.
|
staticprivate |
Collect the hits in a given vector of PFParticles.
pfParticles | the input vector of PFParticles |
pfParticleToHitsMap | the input mapping from PFParticles to hits |
hits | the output vector of hits |
Definition at line 214 of file LArPandoraSliceIdHelper.cxx.
|
staticprivate |
Collect all MCParticles that come from the beam neutrino interaction.
evt | the art event |
truthLabel | the label of the MCTruth producer |
mcParticleLabel | the label of the MCParticle producer |
beamNuMCTruth | the MCTruth block for the beam neutrino |
mcParticles | the output vector of neutrino induced MCParticles |
Definition at line 88 of file LArPandoraSliceIdHelper.cxx.
|
staticprivate |
Count the number of hits in an input vector that are neutrino induced.
hits | the input vector of hits |
hitToIsNuInducedMap | the mapping from hits to isNuInduced boolean |
Definition at line 143 of file LArPandoraSliceIdHelper.cxx.
|
staticprivate |
Get the MCTruth block for the simulated beam neutrino.
evt | the art event |
truthLabel | the label of the MCTruth producer |
Definition at line 50 of file LArPandoraSliceIdHelper.cxx.
|
staticprivate |
For each hit in the event, determine if any of it's charge was deposited by a neutrino induced particle.
evt | the art event |
hitLabel | the label of the Hit producer |
backtrackLabel | the label of the Hit->MCParticle association producer - backtracker |
mcParticles | the input vector of neutrino induced MCParticles |
hits | the output vector of all hits |
hitToIsNuInducedMap | the output mapping from hits to a bool = true if hit is neutrino induced |
Definition at line 105 of file LArPandoraSliceIdHelper.cxx.
|
staticprivate |
Get the mapping from PFParticles to associated hits (via clusters)
evt | the art event |
pandoraLabel | the label of the PFParticle <-> Cluster and Cluster <-> Hit associations - Pandora pattern recognition |
pfParticleToHitsMap | the output mapping from PFParticles to associated hits |
Definition at line 161 of file LArPandoraSliceIdHelper.cxx.
|
staticprivate |
Collect the hits in the slice that have been added to a PFParticle (under either reconstruction hypothesis)
slice | the input slice |
pfParticleToHitsMap | the input mapping from PFParticles to hits |
hits | the output vector of reconstructed hits in the slice |
Definition at line 205 of file LArPandoraSliceIdHelper.cxx.
|
static |
Get MC metadata about each slice.
slices | the input vector of slices |
evt | the art event |
truthLabel | the label of the MCTruth producer |
mcParticleLabel | the label of the MCParticle producer |
hitLabel | the label of the Hit producer |
backtrackLabel | the label of the Hit -> MCParticle association producer |
pandoraLabel | the label of the Pandora all outcomes producer |
sliceMetadata | the output vector of slice metadata (mapping 1:1 to the slices) |
interactionType | the output true interaction type code of the MCNeutrino |
nuEnergy | the output true energy of the neutrino |
nuNeutrino | the mc neutrino from the beam neutrino MCTruth block |
Definition at line 22 of file LArPandoraSliceIdHelper.cxx.
|
staticprivate |
Calculate the MC slice metadata.
slices | the input vector of slices |
pfParticleToHitsMap | the input mapping from PFParticles to hits |
hitToIsNuInducedMap | the input mapping from hits to isNuInduced boolean |
nNuHits | the total number of neutrino induced hits in the event |
sliceMetadata | the output vector of metadata objects correspoinding 1:1 to the input slices |
Definition at line 233 of file LArPandoraSliceIdHelper.cxx.