LArMCParticleHelper class. More...
#include <LArMCParticleHelper.h>
Classes | |
class | PrimaryParameters |
PrimaryParameters class. More... | |
Public Types | |
typedef std::unordered_map< const pandora::MCParticle *, const pandora::MCParticle * > | MCRelationMap |
typedef std::unordered_map< const pandora::MCParticle *, int > | MCParticleIntMap |
typedef std::unordered_map< const pandora::MCParticle *, const pandora::ParticleFlowObject * > | MCToPfoMap |
typedef std::unordered_map< const pandora::CaloHit *, const pandora::MCParticle * > | CaloHitToMCMap |
typedef std::unordered_map< const pandora::CaloHit *, const pandora::ParticleFlowObject * > | CaloHitToPfoMap |
typedef std::unordered_map< const pandora::MCParticle *, pandora::CaloHitList > | MCContributionMap |
typedef std::vector< MCContributionMap > | MCContributionMapVector |
typedef std::unordered_map< const pandora::Cluster *, pandora::CaloHitList > | ClusterContributionMap |
typedef std::unordered_map< const pandora::ParticleFlowObject *, pandora::CaloHitList > | PfoContributionMap |
typedef std::unordered_map< const pandora::MCParticle *, PfoContributionMap > | MCToPfoMatchingMap |
typedef std::pair< const pandora::MCParticle *, pandora::CaloHitList > | MCParticleCaloHitListPair |
typedef std::pair< const pandora::ParticleFlowObject *, pandora::CaloHitList > | PfoCaloHitListPair |
typedef std::pair< const pandora::Cluster *, pandora::CaloHitList > | ClusterCaloHitListPair |
typedef std::vector< MCParticleCaloHitListPair > | MCParticleToSharedHitsVector |
typedef std::vector< PfoCaloHitListPair > | PfoToSharedHitsVector |
typedef std::map< const pandora::ParticleFlowObject *, MCParticleToSharedHitsVector > | PfoToMCParticleHitSharingMap |
typedef std::map< const pandora::MCParticle *, PfoToSharedHitsVector > | MCParticleToPfoHitSharingMap |
Static Public Member Functions | |
static bool | DoesPrimaryMeetCriteria (const pandora::MCParticle *const pMCParticle, std::function< bool(const pandora::MCParticle *const)> fCriteria) |
Returns true if passed particle whose primary meets the passed criteria. More... | |
static bool | DoesLeadingMeetCriteria (const pandora::MCParticle *const pMCParticle, std::function< bool(const pandora::MCParticle *const)> fCriteria) |
Returns true if passed particle whose leading meets the passed criteria. More... | |
static bool | IsBeamNeutrinoFinalState (const pandora::MCParticle *const pMCParticle) |
Returns true if passed a primary neutrino final state MCParticle. More... | |
static bool | IsTriggeredBeamParticle (const pandora::MCParticle *const pMCParticle) |
Returns true if passed a primary triggered beam MCParticle. More... | |
static bool | IsBeamParticle (const pandora::MCParticle *const pMCParticle) |
Returns true if passed a primary beam MCParticle. More... | |
static bool | IsLeadingBeamParticle (const pandora::MCParticle *const pMCParticle) |
Returns true if passed a leading beam MCParticle. More... | |
static bool | IsCosmicRay (const pandora::MCParticle *const pMCParticle) |
Return true if passed a primary cosmic ray MCParticle. More... | |
static unsigned int | GetNuanceCode (const pandora::MCParticle *const pMCParticle) |
Get the nuance code of an MCParticle. More... | |
static bool | IsNeutrino (const pandora::MCParticle *const pMCParticle) |
Whether a mc particle is a neutrino or antineutrino. More... | |
static bool | IsPrimary (const pandora::MCParticle *const pMCParticle) |
Whether a provided mc particle matches the implemented definition of being primary. More... | |
static bool | IsLeading (const pandora::MCParticle *const pMCParticle) |
Whether a provided mc particle matches the implemented definition of being leading. More... | |
static int | GetHierarchyTier (const pandora::MCParticle *const pMCParticle) |
Determine the position in the hierarchy for the MCParticle. More... | |
static bool | IsVisible (const pandora::MCParticle *const pMCParticle) |
Whether a mc particle is visible (i.e. long-lived charged particle) More... | |
static void | GetTrueNeutrinos (const pandora::MCParticleList *const pMCParticleList, pandora::MCParticleVector &trueNeutrinos) |
Get neutrino MC particles from an input MC particle list. More... | |
static void | GetTrueTestBeamParticles (const pandora::MCParticleList *const pMCParticleList, pandora::MCParticleVector &trueTestBeamParticles) |
Get triggered test beam MC particles from an input MC particle list. More... | |
static const pandora::MCParticle * | GetPrimaryMCParticle (const pandora::MCParticle *const pMCParticle) |
Get the primary parent mc particle. More... | |
static const pandora::MCParticle * | GetLeadingMCParticle (const pandora::MCParticle *const pMCParticle, const int hierarchyTierLimit=1) |
Get the leading particle in the hierarchy, for use at ProtoDUNE. More... | |
static void | GetPrimaryMCParticleList (const pandora::MCParticleList *const pMCParticleList, pandora::MCParticleVector &mcPrimaryVector) |
Get vector of primary MC particles from an input list of MC particles. More... | |
static void | GetLeadingMCParticleList (const pandora::MCParticleList *const pMCParticleList, pandora::MCParticleVector &mcLeadingVector) |
Get vector of leading MC particles from an input list of MC particles. More... | |
static const pandora::MCParticle * | GetParentMCParticle (const pandora::MCParticle *const pMCParticle) |
Get the parent mc particle. More... | |
static void | GetAllDescendentMCParticles (const pandora::MCParticle *const pMCParticle, pandora::MCParticleList &descendentMCParticleList) |
Get all descendent mc particles. More... | |
static void | GetAllDescendentMCParticles (const pandora::MCParticle *const pMCParticle, pandora::MCParticleList &descendentTrackParticles, pandora::MCParticleList &leadingShowerParticles, pandora::MCParticleList &leadingNeutrons) |
Get all descendent mc particles, separated into track-like, shower-like and neutron branches. This method collects together all track-like particles (i.e. not electron, photon or neutron) downstream of the root particle, stopping at a leading shower or neutron and then storing that leading shower or neutron in a separate list. More... | |
static void | GetAllAncestorMCParticles (const pandora::MCParticle *const pMCParticle, pandora::MCParticleList &ancestorMCParticleList) |
Get all ancestor mc particles. More... | |
static void | GetMCPrimaryMap (const pandora::MCParticleList *const pMCParticleList, MCRelationMap &mcPrimaryMap) |
Get mapping from individual mc particles (in a provided list) and their primary parent mc particles. More... | |
static void | GetMCLeadingMap (const pandora::MCParticleList *const pMCParticleList, MCRelationMap &mcLeadingMap) |
Get mapping from individual mc particles (in a provided list) and their leading parent mc particles. More... | |
static void | GetMCToSelfMap (const pandora::MCParticleList *const pMCParticleList, MCRelationMap &mcToSelfMap) |
Get mapping from individual mc particles (in a provided list) to themselves (to be used when not folding particles to their primaries) More... | |
static const pandora::MCParticle * | GetMainMCParticle (const pandora::ParticleFlowObject *const pPfo) |
Find the mc particle making the largest contribution to 2D clusters in a specified pfo. More... | |
static bool | SortByMomentum (const pandora::MCParticle *const pLhs, const pandora::MCParticle *const pRhs) |
Sort mc particles by their momentum. More... | |
static void | GetMCParticleToCaloHitMatches (const pandora::CaloHitList *const pCaloHitList, const MCRelationMap &mcToTargetMCMap, CaloHitToMCMap &hitToMCMap, MCContributionMap &mcToTrueHitListMap) |
Match calo hits to their parent particles. More... | |
static void | SelectReconstructableMCParticles (const pandora::MCParticleList *pMCParticleList, const pandora::CaloHitList *pCaloHitList, const PrimaryParameters ¶meters, std::function< bool(const pandora::MCParticle *const)> fCriteria, MCContributionMap &selectedMCParticlesToHitsMap) |
Select target, reconstructable mc particles that match given criteria. More... | |
static void | SelectReconstructableTestBeamHierarchyMCParticles (const pandora::MCParticleList *pMCParticleList, const pandora::CaloHitList *pCaloHitList, const PrimaryParameters ¶meters, std::function< bool(const pandora::MCParticle *const)> fCriteria, MCContributionMap &selectedMCParticlesToHitsMap) |
Select target, reconstructable mc particles in the relevant hierarchy that match given criteria. More... | |
static void | GetPfoToReconstructable2DHitsMap (const pandora::PfoList &pfoList, const MCContributionMap &selectedMCParticleToHitsMap, PfoContributionMap &pfoToReconstructable2DHitsMap, const bool foldBackHierarchy) |
Get mapping from Pfo to reconstructable 2D hits (=good hits belonging to a selected reconstructable MCParticle) More... | |
static void | GetTestBeamHierarchyPfoToReconstructable2DHitsMap (const pandora::PfoList &pfoList, const MCContributionMap &selectedMCParticleToHitsMap, PfoContributionMap &pfoToReconstructable2DHitsMap, const bool foldBackHierarchy) |
Get mapping from Pfo in reconstructed test beam hierarchy to reconstructable 2D hits (=good hits belonging to a selected reconstructable MCParticle) More... | |
static void | GetPfoToReconstructable2DHitsMap (const pandora::PfoList &pfoList, const MCContributionMapVector &selectedMCParticleToHitsMaps, PfoContributionMap &pfoToReconstructable2DHitsMap, const bool foldBackHierarchy) |
Get mapping from Pfo to reconstructable 2D hits (=good hits belonging to a selected reconstructable MCParticle) More... | |
static void | GetTestBeamHierarchyPfoToReconstructable2DHitsMap (const pandora::PfoList &pfoList, const MCContributionMapVector &selectedMCParticleToHitsMaps, PfoContributionMap &pfoToReconstructable2DHitsMap, const bool foldBackHierarchy) |
Get mapping from Pfo in reconstructed test beam hierarchy to reconstructable 2D hits (=good hits belonging to a selected reconstructable MCParticle) More... | |
static void | GetClusterToReconstructable2DHitsMap (const pandora::ClusterList &clusterList, const MCContributionMap &selectedMCToHitsMap, ClusterContributionMap &clusterToReconstructable2DHitsMap) |
Get mapping from cluster to reconstructable 2D hits (=good hits belonging to a selected reconstructable MCParticle) More... | |
static void | GetClusterToReconstructable2DHitsMap (const pandora::ClusterList &clusterList, const MCContributionMapVector &selectedMCToHitsMaps, ClusterContributionMap &clusterToReconstructable2DHitsMap) |
Get mapping from cluster to reconstructable 2D hits (=good hits belonging to a selected reconstructable MCParticle) More... | |
static void | GetPfoMCParticleHitSharingMaps (const PfoContributionMap &pfoToReconstructable2DHitsMap, const MCContributionMapVector &selectedMCParticleToHitsMaps, PfoToMCParticleHitSharingMap &pfoToMCParticleHitSharingMap, MCParticleToPfoHitSharingMap &mcParticleToPfoHitSharingMap) |
Get the mappings from Pfo -> pair (reconstructable MCparticles, number of reconstructable 2D hits shared with Pfo) reconstructable MCParticle -> pair (Pfo, number of reconstructable 2D hits shared with MCParticle) More... | |
static void | SelectCaloHits (const pandora::CaloHitList *const pCaloHitList, const MCRelationMap &mcToTargetMCMap, pandora::CaloHitList &selectedCaloHitList, const bool selectInputHits, const float maxPhotonPropagation) |
Select a subset of calo hits representing those that represent "reconstructable" regions of the event. More... | |
static bool | IsDescendentOf (const pandora::MCParticle *const pMCParticle, const int pdg, const bool isChargeSensitive=false) |
Determine if the MC particle is a descendent of a particle with the given PDG code. More... | |
static void | GetBreadthFirstHierarchyRepresentation (const pandora::MCParticle *const pMCParticle, pandora::MCParticleList &mcParticleList) |
Retrieve a linearised representation of the MC particle hierarchy in breadth first order. This iterates over the MC hierarchy in a manor that sees primaries at the front of the list, with progressively deeper tiers later in the list. This is useful for some visualisation cases. More... | |
static void | SelectParticlesByHitCount (const pandora::MCParticleVector &candidateTargets, const MCContributionMap &mcToTrueHitListMap, const MCRelationMap &mcToTargetMCMap, const PrimaryParameters ¶meters, MCContributionMap &selectedMCParticlesToHitsMap) |
Filter an input vector of MCParticles to ensure they have sufficient good hits to be reconstructable. More... | |
static pandora::CaloHitList | GetSharedHits (const pandora::CaloHitList &hitListA, const pandora::CaloHitList &hitListB) |
Get the hits in the intersection of two hit lists. More... | |
static bool | IsBremsstrahlung (const pandora::MCParticle *const pMCParticle) |
static bool | IsCapture (const pandora::MCParticle *const pMCParticle) |
Check whether or not an MC particle comes from a capture process. More... | |
static bool | IsDecay (const pandora::MCParticle *const pMCParticle) |
Check whether or not an MC particle comes from a decay process. More... | |
static bool | IsElasticScatter (const pandora::MCParticle *const pMCParticle) |
Check whether or not an MC particle came from an elastic scattering process. More... | |
static bool | IsInelasticScatter (const pandora::MCParticle *const pMCParticle) |
Check whether or not an MC particle came from an inelastic scattering process. More... | |
static bool | IsIonisation (const pandora::MCParticle *const pMCParticle) |
Check whether or not an MC particle comes from an ionisation process. More... | |
static bool | IsNuclear (const pandora::MCParticle *const pMCParticle) |
Check whether or not an MC particle comes from a nuclear interaction process. More... | |
static bool | IsPairProduction (const pandora::MCParticle *const pMCParticle) |
Check whether or not an MC particle comes from a pair production process. More... | |
static bool | AreTopologicallyContinuous (const pandora::MCParticle *const pMCParent, const pandora::MCParticle *const pMCChild, const float cosAngleTolerance) |
Determine if two MC particles are topologically continuous within a given tolerance. If the parent does not travel any distance, a travelling parent is sought and the comparison made between this and the child. If no travelling parent can be found, the particles are treated as continuous. More... | |
Static Private Member Functions | |
static void | CollectReconstructable2DHits (const pandora::ParticleFlowObject *const pPfo, const MCContributionMapVector &selectedMCParticleToHitsMaps, pandora::CaloHitList &reconstructableCaloHitList2D, const bool foldBackHierarchy) |
For a given Pfo, collect the hits which are reconstructable (=good hits belonging to a selected reconstructable MCParticle) More... | |
static void | CollectReconstructableTestBeamHierarchy2DHits (const pandora::ParticleFlowObject *const pPfo, const MCContributionMapVector &selectedMCParticleToHitsMaps, pandora::CaloHitList &reconstructableCaloHitList2D, const bool foldBackHierarchy) |
For a given Pfo, collect the hits which are reconstructable (=good hits belonging to a selected reconstructable MCParticle) and belong in the test beam particle interaction hierarchy. More... | |
static void | CollectReconstructable2DHits (const pandora::PfoList &pfoList, const MCContributionMapVector &selectedMCParticleToHitsMaps, pandora::CaloHitList &reconstructableCaloHitList2D) |
For a given Pfo list, collect the hits which are reconstructable (=good hits belonging to a selected reconstructable MCParticle) More... | |
static void | CollectReconstructable2DHits (const pandora::Cluster *const pCluster, const MCContributionMapVector &selectedMCParticleToHitsMaps, pandora::CaloHitList &reconstructableCaloHitList2D) |
For a given cluster, collect the hits which are reconstructable (=good hits belonging to a selected reconstructable MCParticle) More... | |
static void | SelectGoodCaloHits (const pandora::CaloHitList *const pSelectedCaloHitList, const MCRelationMap &mcToTargetMCMap, pandora::CaloHitList &selectedGoodCaloHitList, const bool selectInputHits, const float minHitSharingFraction) |
Apply further selection criteria to end up with a collection of "good" calo hits that can be use to define whether a target mc particle is reconstructable. More... | |
static void | SelectParticlesMatchingCriteria (const pandora::MCParticleVector &inputMCParticles, std::function< bool(const pandora::MCParticle *const)> fCriteria, pandora::MCParticleVector &selectedParticles, const PrimaryParameters ¶meters, const bool isTestBeam) |
Select mc particles matching given criteria from an input list. More... | |
static bool | PassMCParticleChecks (const pandora::MCParticle *const pOriginalPrimary, const pandora::MCParticle *const pThisMCParticle, const pandora::MCParticle *const pHitMCParticle, const float maxPhotonPropagation) |
Whether it is possible to navigate from a primary mc particle to a downstream mc particle without "passing through" a neutron. More... | |
LArMCParticleHelper class.
Definition at line 24 of file LArMCParticleHelper.h.
typedef std::unordered_map<const pandora::CaloHit *, const pandora::MCParticle *> lar_content::LArMCParticleHelper::CaloHitToMCMap |
Definition at line 32 of file LArMCParticleHelper.h.
typedef std::unordered_map<const pandora::CaloHit *, const pandora::ParticleFlowObject *> lar_content::LArMCParticleHelper::CaloHitToPfoMap |
Definition at line 33 of file LArMCParticleHelper.h.
typedef std::pair<const pandora::Cluster *, pandora::CaloHitList> lar_content::LArMCParticleHelper::ClusterCaloHitListPair |
Definition at line 44 of file LArMCParticleHelper.h.
typedef std::unordered_map<const pandora::Cluster *, pandora::CaloHitList> lar_content::LArMCParticleHelper::ClusterContributionMap |
Definition at line 38 of file LArMCParticleHelper.h.
typedef std::unordered_map<const pandora::MCParticle *, pandora::CaloHitList> lar_content::LArMCParticleHelper::MCContributionMap |
Definition at line 35 of file LArMCParticleHelper.h.
Definition at line 36 of file LArMCParticleHelper.h.
typedef std::pair<const pandora::MCParticle *, pandora::CaloHitList> lar_content::LArMCParticleHelper::MCParticleCaloHitListPair |
Definition at line 42 of file LArMCParticleHelper.h.
typedef std::unordered_map<const pandora::MCParticle *, int> lar_content::LArMCParticleHelper::MCParticleIntMap |
Definition at line 28 of file LArMCParticleHelper.h.
typedef std::map<const pandora::MCParticle *, PfoToSharedHitsVector> lar_content::LArMCParticleHelper::MCParticleToPfoHitSharingMap |
Definition at line 50 of file LArMCParticleHelper.h.
typedef std::vector<MCParticleCaloHitListPair> lar_content::LArMCParticleHelper::MCParticleToSharedHitsVector |
Definition at line 46 of file LArMCParticleHelper.h.
typedef std::unordered_map<const pandora::MCParticle *, const pandora::MCParticle *> lar_content::LArMCParticleHelper::MCRelationMap |
Definition at line 27 of file LArMCParticleHelper.h.
typedef std::unordered_map<const pandora::MCParticle *, const pandora::ParticleFlowObject *> lar_content::LArMCParticleHelper::MCToPfoMap |
Definition at line 30 of file LArMCParticleHelper.h.
typedef std::unordered_map<const pandora::MCParticle *, PfoContributionMap> lar_content::LArMCParticleHelper::MCToPfoMatchingMap |
Definition at line 40 of file LArMCParticleHelper.h.
typedef std::pair<const pandora::ParticleFlowObject *, pandora::CaloHitList> lar_content::LArMCParticleHelper::PfoCaloHitListPair |
Definition at line 43 of file LArMCParticleHelper.h.
typedef std::unordered_map<const pandora::ParticleFlowObject *, pandora::CaloHitList> lar_content::LArMCParticleHelper::PfoContributionMap |
Definition at line 39 of file LArMCParticleHelper.h.
typedef std::map<const pandora::ParticleFlowObject *, MCParticleToSharedHitsVector> lar_content::LArMCParticleHelper::PfoToMCParticleHitSharingMap |
Definition at line 49 of file LArMCParticleHelper.h.
Definition at line 47 of file LArMCParticleHelper.h.
|
static |
Determine if two MC particles are topologically continuous within a given tolerance. If the parent does not travel any distance, a travelling parent is sought and the comparison made between this and the child. If no travelling parent can be found, the particles are treated as continuous.
pMCParent | The parent MC particle |
pMCChild | The child MC particle |
cosAngleTolerance | The cosine of the maximum acceptable angular deviation |
Definition at line 959 of file LArMCParticleHelper.cc.
|
staticprivate |
For a given Pfo, collect the hits which are reconstructable (=good hits belonging to a selected reconstructable MCParticle)
pPfo | the input pfo |
selectedMCParticleToHitsMaps | the input mappings from selected reconstructable MCParticles to hits |
reconstructableCaloHitList2D | the output list of reconstructable 2D calo hits in the input pfo |
foldBackHierarchy | whether to fold the particle hierarchy back to primaries |
|
staticprivate |
For a given Pfo list, collect the hits which are reconstructable (=good hits belonging to a selected reconstructable MCParticle)
pfoList | the input pfo list |
selectedMCParticleToHitsMaps | the input mappings from selected reconstructable MCParticles to hits |
reconstructableCaloHitList2D | the output list of reconstructable 2D calo hits in the input pfo |
|
staticprivate |
For a given cluster, collect the hits which are reconstructable (=good hits belonging to a selected reconstructable MCParticle)
pCluster | the input cluster |
selectedMCToHitsMaps | the input mappings from selected reconstructable MCParticles to hits |
reconstructableCaloHitList2D | the output list of reconstructable 2D calo hits in the input pfo |
Definition at line 1082 of file LArMCParticleHelper.cc.
|
staticprivate |
For a given Pfo, collect the hits which are reconstructable (=good hits belonging to a selected reconstructable MCParticle) and belong in the test beam particle interaction hierarchy.
pPfo | the input pfo |
selectedMCParticleToHitsMaps | the input mappings from selected reconstructable MCParticles to hits |
reconstructableCaloHitList2D | the output list of reconstructable 2D calo hits in the input pfo |
foldBackHierarchy | whether to fold the particle hierarchy back to leading particles |
Definition at line 1016 of file LArMCParticleHelper.cc.
|
static |
Returns true if passed particle whose leading meets the passed criteria.
pMCParticle | the input mc particle |
fCriteria | the given criteria |
Definition at line 61 of file LArMCParticleHelper.cc.
|
static |
Returns true if passed particle whose primary meets the passed criteria.
pMCParticle | the input mc particle |
fCriteria | the given criteria |
Definition at line 45 of file LArMCParticleHelper.cc.
|
static |
Get all ancestor mc particles.
pMCParticle | the input mc particle |
ancestorMCParticleList | the output ancestor mc particle list |
Definition at line 290 of file LArMCParticleHelper.cc.
|
static |
Get all descendent mc particles.
pMCParticle | the input mc particle |
descendentMCParticleList | the output descendent mc particle list |
Definition at line 249 of file LArMCParticleHelper.cc.
|
static |
Get all descendent mc particles, separated into track-like, shower-like and neutron branches. This method collects together all track-like particles (i.e. not electron, photon or neutron) downstream of the root particle, stopping at a leading shower or neutron and then storing that leading shower or neutron in a separate list.
pMCParticle | the input mc particle |
descendentTrackParticles | the output list of descendent track-like particles |
leadingShowerParticles | the output list of leading shower particles |
leadingNeutrons | the output list of leading neutrons |
|
static |
Retrieve a linearised representation of the MC particle hierarchy in breadth first order. This iterates over the MC hierarchy in a manor that sees primaries at the front of the list, with progressively deeper tiers later in the list. This is useful for some visualisation cases.
pMCParticle | an MC particle in the hierarchy - can be any particle |
mcParticleList | the output MC particle list |
Definition at line 1170 of file LArMCParticleHelper.cc.
|
static |
Get mapping from cluster to reconstructable 2D hits (=good hits belonging to a selected reconstructable MCParticle)
clusterList | the input list of clusters |
selectedMCToHitsMap | the input mapping from selected reconstructable MCParticles to their hits |
clusterToReconstructable2DHitsMap | the output mapping from clusters to their reconstructable 2D hits |
Definition at line 736 of file LArMCParticleHelper.cc.
|
static |
Get mapping from cluster to reconstructable 2D hits (=good hits belonging to a selected reconstructable MCParticle)
clusterList | the input list of clusters |
selectedMCToHitsMaps | the input vector of mappings from selected reconstructable MCParticles to their hits |
clusterToReconstructable2DHitsMap | the output mapping from cluster to their reconstructable 2D hits |
Definition at line 744 of file LArMCParticleHelper.cc.
|
static |
Determine the position in the hierarchy for the MCParticle.
pMCParticle | the address of the mc particle |
Definition at line 173 of file LArMCParticleHelper.cc.
|
static |
Get the leading particle in the hierarchy, for use at ProtoDUNE.
pMCParticle | the input mc particle |
Definition at line 369 of file LArMCParticleHelper.cc.
|
static |
Get vector of leading MC particles from an input list of MC particles.
pMCParticleList | the input mc particle list |
mcLeadingVector | the output mc particle vector |
Definition at line 321 of file LArMCParticleHelper.cc.
|
static |
Find the mc particle making the largest contribution to 2D clusters in a specified pfo.
pPfo | address of the pfo to examine |
Definition at line 462 of file LArMCParticleHelper.cc.
|
static |
Get mapping from individual mc particles (in a provided list) and their leading parent mc particles.
pMCParticleList | the input mc particle list |
mcLeadingMap | the output mapping between mc particles and their leading parent |
Definition at line 435 of file LArMCParticleHelper.cc.
|
static |
Match calo hits to their parent particles.
pCaloHitList | the input list of calo hits |
mcToTargetMCMap | the mc particle to target (primary or self) mc particle map |
hitToMCMap | output mapping between calo hits and their main MC particle |
mcToTrueHitListMap | output mapping between MC particles and their associated hits |
Definition at line 497 of file LArMCParticleHelper.cc.
|
static |
Get mapping from individual mc particles (in a provided list) and their primary parent mc particles.
pMCParticleList | the input mc particle list |
mcPrimaryMap | the output mapping between mc particles and their parents |
Definition at line 418 of file LArMCParticleHelper.cc.
|
static |
Get mapping from individual mc particles (in a provided list) to themselves (to be used when not folding particles to their primaries)
pMCParticleList | the input mc particle list |
mcToSelfMap | the output mapping between mc particles and themselves |
Definition at line 452 of file LArMCParticleHelper.cc.
|
static |
Get the nuance code of an MCParticle.
Definition at line 119 of file LArMCParticleHelper.cc.
|
static |
Get the parent mc particle.
pMCParticle | the input mc particle |
Definition at line 232 of file LArMCParticleHelper.cc.
|
static |
Get the mappings from Pfo -> pair (reconstructable MCparticles, number of reconstructable 2D hits shared with Pfo) reconstructable MCParticle -> pair (Pfo, number of reconstructable 2D hits shared with MCParticle)
pfoToReconstructable2DHitsMap | the input mapping from Pfos to reconstructable 2D hits |
selectedMCParticleToHitsMaps | the input mappings from selected reconstructable MCParticles to hits |
pfoToMCParticleHitSharingMap | the output mapping from Pfos to selected reconstructable MCParticles and the number hits shared |
mcParticleToPfoHitSharingMap | the output mapping from selected reconstructable MCParticles to Pfos and the number hits shared |
Definition at line 671 of file LArMCParticleHelper.cc.
|
static |
Get mapping from Pfo to reconstructable 2D hits (=good hits belonging to a selected reconstructable MCParticle)
pfoList | the input list of Pfos |
selectedMCParticleToHitsMap | the input mapping from selected reconstructable MCParticles to their hits |
pfoToReconstructable2DHitsMap | the output mapping from Pfos to their reconstructable 2D hits |
foldBackHierarchy | whether to fold the particle hierarchy back to the primaries |
|
static |
Get mapping from Pfo to reconstructable 2D hits (=good hits belonging to a selected reconstructable MCParticle)
pfoList | the input list of Pfos |
selectedMCParticleToHitsMaps | the input vector of mappings from selected reconstructable MCParticles to their hits |
pfoToReconstructable2DHitsMap | the output mapping from Pfos to their reconstructable 2D hits |
foldToHierarchy | whether to fold the particle hierarchy back to the primaries |
|
static |
Get the primary parent mc particle.
pMCParticle | the input mc particle |
Definition at line 338 of file LArMCParticleHelper.cc.
|
static |
Get vector of primary MC particles from an input list of MC particles.
pMCParticleList | the input mc particle list |
mcPrimaryVector | the output mc particle vector |
Definition at line 308 of file LArMCParticleHelper.cc.
|
static |
Get the hits in the intersection of two hit lists.
hitListA | an input hit list |
hitListB | another input hit list |
Definition at line 944 of file LArMCParticleHelper.cc.
|
static |
Get mapping from Pfo in reconstructed test beam hierarchy to reconstructable 2D hits (=good hits belonging to a selected reconstructable MCParticle)
pfoList | the input list of Pfos |
selectedMCParticleToHitsMap | the input mapping from selected reconstructable MCParticles to their hits |
pfoToReconstructable2DHitsMap | the output mapping from Pfos to their reconstructable 2D hits |
foldBackHierarchy | whether to fold the particle hierarchy back to the leading particles |
|
static |
Get mapping from Pfo in reconstructed test beam hierarchy to reconstructable 2D hits (=good hits belonging to a selected reconstructable MCParticle)
pfoList | the input list of Pfos |
selectedMCParticleToHitsMaps | the input vector of mappings from selected reconstructable MCParticles to their hits |
pfoToReconstructable2DHitsMap | the output mapping from Pfos to their reconstructable 2D hits |
foldBackHierarchy | whether to fold the particle hierarchy back to the leading particles |
|
static |
Get neutrino MC particles from an input MC particle list.
pMCParticleList | the input MC particle list |
trueNeutrinos | to receive the vector of neutrino MC particles |
Definition at line 206 of file LArMCParticleHelper.cc.
|
static |
Get triggered test beam MC particles from an input MC particle list.
pMCParticleList | the input MC particle list |
trueTestBeamParticles | to receive the vector of neutrino MC particles |
Definition at line 219 of file LArMCParticleHelper.cc.
|
static |
Returns true if passed a primary neutrino final state MCParticle.
Definition at line 77 of file LArMCParticleHelper.cc.
|
static |
Returns true if passed a primary beam MCParticle.
Definition at line 93 of file LArMCParticleHelper.cc.
|
static |
Definition at line 759 of file LArMCParticleHelper.cc.
|
static |
Check whether or not an MC particle comes from a capture process.
pMCParticle | The MC particle to consider |
Definition at line 780 of file LArMCParticleHelper.cc.
|
static |
Return true if passed a primary cosmic ray MCParticle.
Definition at line 110 of file LArMCParticleHelper.cc.
|
static |
Check whether or not an MC particle comes from a decay process.
pMCParticle | The MC particle to consider |
Definition at line 803 of file LArMCParticleHelper.cc.
|
static |
Determine if the MC particle is a descendent of a particle with the given PDG code.
pMCParticle | the descendent particle |
pdg | the PDG code of the ancestor particle |
isChargeSensitive | whether or not to consider the sign of the PDG code when looking for the ancestor (default: false) |
Definition at line 1150 of file LArMCParticleHelper.cc.
|
static |
Check whether or not an MC particle came from an elastic scattering process.
pMCParticle | The MC particle to consider |
Definition at line 822 of file LArMCParticleHelper.cc.
|
static |
Check whether or not an MC particle came from an inelastic scattering process.
pMCParticle | The MC particle to consider |
Definition at line 844 of file LArMCParticleHelper.cc.
|
static |
Check whether or not an MC particle comes from an ionisation process.
pMCParticle | The MC particle to consider |
Definition at line 881 of file LArMCParticleHelper.cc.
|
static |
Whether a provided mc particle matches the implemented definition of being leading.
pMCParticle | the address of the mc particle |
Definition at line 158 of file LArMCParticleHelper.cc.
|
static |
Returns true if passed a leading beam MCParticle.
Definition at line 101 of file LArMCParticleHelper.cc.
|
static |
Whether a mc particle is a neutrino or antineutrino.
pMCParticle | the input mc particle |
Definition at line 131 of file LArMCParticleHelper.cc.
|
static |
Check whether or not an MC particle comes from a nuclear interaction process.
pMCParticle | The MC particle to consider |
Definition at line 903 of file LArMCParticleHelper.cc.
|
static |
Check whether or not an MC particle comes from a pair production process.
pMCParticle | The MC particle to consider |
Definition at line 924 of file LArMCParticleHelper.cc.
|
static |
Whether a provided mc particle matches the implemented definition of being primary.
pMCParticle | the address of the mc particle |
Definition at line 143 of file LArMCParticleHelper.cc.
|
static |
Returns true if passed a primary triggered beam MCParticle.
Definition at line 85 of file LArMCParticleHelper.cc.
|
static |
Whether a mc particle is visible (i.e. long-lived charged particle)
pMCParticle | the input mc particle |
Definition at line 192 of file LArMCParticleHelper.cc.
|
staticprivate |
Whether it is possible to navigate from a primary mc particle to a downstream mc particle without "passing through" a neutron.
pOriginalPrimary | the address of the original primary mc particle |
pThisMCParticle | the address of the current mc particle in the primary decay chain |
pHitMCParticle | the address of the mc particle associated to a calo hit |
maxPhotonPropagation | the maximum photon propagation length |
Definition at line 1316 of file LArMCParticleHelper.cc.
|
static |
Select a subset of calo hits representing those that represent "reconstructable" regions of the event.
pCaloHitList | the address of the input calo hit list |
mcToTargetMCMap | the mc particle to target (primary or self) mc particle map |
selectedCaloHitList | to receive the populated selected calo hit list |
selectInputHits | whether to select input hits |
maxPhotonPropagation | the maximum photon propagation length |
Definition at line 1116 of file LArMCParticleHelper.cc.
|
staticprivate |
Apply further selection criteria to end up with a collection of "good" calo hits that can be use to define whether a target mc particle is reconstructable.
pSelectedCaloHitList | the address of the calo hit list (typically already been through some selection procedure) |
mcToTargetMCMap | the mc particle to target (primary or self) mc particle map |
selectedGoodCaloHitList | to receive the populated good selected calo hit list |
selectInputHits | whether to select input hits |
minHitSharingFraction | the minimum Hit sharing fraction |
Definition at line 1231 of file LArMCParticleHelper.cc.
|
static |
Filter an input vector of MCParticles to ensure they have sufficient good hits to be reconstructable.
candidateTargets | candidate reconstructable MCParticles |
mcToTrueHitListMap | mapping from candidates reconstructable MCParticles to their true hits |
mcToTargetMCMap | the mc particle to target (primary or self) mc particle map |
parameters | validation parameters to decide when an MCParticle is considered reconstructable |
selectedMCParticlesToHitsMap | the output mapping from selected mcparticles to their hits |
Definition at line 1191 of file LArMCParticleHelper.cc.
|
staticprivate |
Select mc particles matching given criteria from an input list.
inputMCParticles | input vector of MCParticles |
fCriteria | a function which returns a bool (= shouldSelect) for a given input MCParticle |
selectedParticles | the output vector of particles selected |
parameters | validation parameters to decide when an MCParticle is considered reconstructable |
isTestBeam | whether the mc particles correspond to the test beam case or the neutrino case |
Definition at line 1287 of file LArMCParticleHelper.cc.
|
static |
Select target, reconstructable mc particles that match given criteria.
pMCParticleList | the address of the list of MCParticles |
pCaloHitList | the address of the list of CaloHits |
parameters | validation parameters to decide when an MCParticle is considered reconstructable |
fCriteria | a function which returns a bool (= shouldSelect) for a given input MCParticle |
selectedMCParticlesToHitsMap | the output mapping from selected mcparticles to their hits |
Definition at line 531 of file LArMCParticleHelper.cc.
|
static |
Select target, reconstructable mc particles in the relevant hierarchy that match given criteria.
pMCParticleList | the address of the list of MCParticles |
pCaloHitList | the address of the list of CaloHits |
parameters | validation parameters to decide when an MCParticle is considered reconstructable |
fCriteria | a function which returns a bool (= shouldSelect) for a given input MCParticle |
selectedMCParticlesToHitsMap | the output mapping from selected mcparticles to their hits |
Definition at line 570 of file LArMCParticleHelper.cc.
|
static |
Sort mc particles by their momentum.
pLhs | address of first mc particle |
pRhs | address of second mc particle |
Definition at line 471 of file LArMCParticleHelper.cc.