LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
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 void | GetFirstVisibleMCParticles (const pandora::MCParticle *const pRoot, pandora::MCParticleList &visibleParticleList) |
Get the first visible MC particles given a root particle. For example, given a neutrino this would return the primaries (the visible final state particles or the first visible descendents of invisible final state particles - note photons and neutrons are considered visible for this purpose). 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.
typedef std::vector<MCContributionMap> lar_content::LArMCParticleHelper::MCContributionMapVector |
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.
typedef std::vector<PfoCaloHitListPair> lar_content::LArMCParticleHelper::PfoToSharedHitsVector |
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 978 of file LArMCParticleHelper.cc.
References CollectReconstructable2DHits(), lar_content::LArPfoHelper::GetAllDownstreamPfos(), and util::size().
Referenced by lar_content::LArHierarchyHelper::MCHierarchy::CollectContinuations(), and lar_content::LArHierarchyHelper::MCHierarchy::InterpretHierarchy().
|
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 |
Referenced by AreTopologicallyContinuous(), CollectReconstructableTestBeamHierarchy2DHits(), GetClusterToReconstructable2DHitsMap(), and SelectReconstructableTestBeamHierarchyMCParticles().
|
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 1101 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 1035 of file LArMCParticleHelper.cc.
References CollectReconstructable2DHits(), lar_content::LArPfoHelper::GetAllDownstreamPfos(), lar_content::LArPfoHelper::GetCaloHits(), lar_content::LArPfoHelper::GetIsolatedCaloHits(), and lar_content::LArPfoHelper::IsTestBeam().
Referenced by SelectReconstructableTestBeamHierarchyMCParticles().
|
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.
References GetLeadingMCParticle().
Referenced by SelectParticlesMatchingCriteria().
|
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.
References GetPrimaryMCParticle().
Referenced by SelectParticlesMatchingCriteria().
|
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.
Referenced by lar_content::LArMuonLeadingHelper::RejectBremsstrahlungHits().
|
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.
References util::abs().
Referenced by lar_content::LArHierarchyHelper::MCHierarchy::Node::FillFlat(), lar_content::LArHierarchyHelper::MCHierarchy::Node::FillHierarchy(), lar_content::LArHierarchyHelper::MCHierarchy::FillHierarchy(), and lar_content::LArHierarchyHelper::MCHierarchy::InterpretHierarchy().
|
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 1189 of file LArMCParticleHelper.cc.
References GetParentMCParticle().
Referenced by lar_content::VisualParticleMonitoringAlgorithm::Run().
|
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 755 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 763 of file LArMCParticleHelper.cc.
References CollectReconstructable2DHits().
|
static |
Get the first visible MC particles given a root particle. For example, given a neutrino this would return the primaries (the visible final state particles or the first visible descendents of invisible final state particles - note photons and neutrons are considered visible for this purpose).
pRoot | the input mc particle |
visibleParticleList | the output list of visible particles (if pRoot is visible this will contain only pRoot) |
Definition at line 338 of file LArMCParticleHelper.cc.
References IsVisible().
Referenced by lar_content::LArHierarchyHelper::GetMCPrimaries().
|
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.
Referenced by lar_content::LArHierarchyHelper::MCHierarchy::Node::FillHierarchy(), lar_content::LArMuonLeadingHelper::GetLeadingParticle(), lar_content::LArMuonLeadingHelper::GetLeadingProcess(), lar_content::LArMuonLeadingHelper::IsMuonLeading(), lar_content::LArMuonLeadingHelper::RejectBremsstrahlungHits(), and lar_content::HierarchyMonitoringAlgorithm::Run().
|
static |
Get the leading particle in the hierarchy, for use at ProtoDUNE.
pMCParticle | the input mc particle |
Definition at line 384 of file LArMCParticleHelper.cc.
References GetParentMCParticle(), GetPrimaryMCParticle(), IsBeamParticle(), and IsVisible().
Referenced by DoesLeadingMeetCriteria(), GetMCLeadingMap(), and IsLeading().
|
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.
References GetParentMCParticle(), IsBeamParticle(), IsLeading(), IsPrimary(), and SortByMomentum().
Referenced by SelectReconstructableTestBeamHierarchyMCParticles().
|
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 477 of file LArMCParticleHelper.cc.
References lar_content::LArPfoHelper::GetTwoDClusterList().
Referenced by lar_content::CheatingNeutrinoCreationAlgorithm::GetMCParticleToDaughterPfoMap(), lar_content::MvaPfoCharacterisationAlgorithm< T >::IsClearTrack(), lar_content::CheatingNeutrinoDaughterVerticesAlgorithm::ProcessDaughterPfo(), and lar_content::VisualParticleMonitoringAlgorithm::Run().
|
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 450 of file LArMCParticleHelper.cc.
References GetLeadingMCParticle().
Referenced by SelectReconstructableTestBeamHierarchyMCParticles().
|
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 512 of file LArMCParticleHelper.cc.
Referenced by lar_content::MvaPfoCharacterisationAlgorithm< T >::IsClearTrack(), lar_content::MCParticleMonitoringAlgorithm::PrintPrimaryMCParticles(), lar_content::LArMuonLeadingHelper::SelectReconstructableLeadingParticles(), SelectReconstructableMCParticles(), and SelectReconstructableTestBeamHierarchyMCParticles().
|
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 433 of file LArMCParticleHelper.cc.
References GetPrimaryMCParticle().
Referenced by lar_content::NeutrinoIdTool< T >::GetBestMCSliceIndex(), lar_content::BdtBeamParticleIdTool::GetBestMCSliceIndices(), lar_content::CheatingNeutrinoCreationAlgorithm::GetMCParticleToDaughterPfoMap(), lar_content::CheatingClusterCreationAlgorithm::GetMCParticleToHitListMap(), lar_content::CheatingNeutrinoDaughterVerticesAlgorithm::GetMCPrimaryMap(), lar_content::MvaPfoCharacterisationAlgorithm< T >::IsClearTrack(), lar_content::CheatingPfoCreationAlgorithm::Run(), and SelectReconstructableMCParticles().
|
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 467 of file LArMCParticleHelper.cc.
Referenced by SelectReconstructableMCParticles(), and SelectReconstructableTestBeamHierarchyMCParticles().
|
static |
Get the nuance code of an MCParticle.
Definition at line 119 of file LArMCParticleHelper.cc.
References lar_content::LArMCParticle::GetNuanceCode().
Referenced by lar_content::BdtBeamParticleIdTool::GetBestMCSliceIndices(), lar_content::NeutrinoIdTool< T >::GetNuanceCode(), IsBeamParticle(), IsCosmicRay(), IsLeadingBeamParticle(), IsNeutrino(), IsTriggeredBeamParticle(), and lar_content::NeutrinoEventValidationAlgorithm::ProcessOutput().
|
static |
Get the parent mc particle.
pMCParticle | the input mc particle |
Definition at line 232 of file LArMCParticleHelper.cc.
Referenced by lar_content::NeutrinoIdTool< T >::CountNeutrinoInducedHits(), GetBreadthFirstHierarchyRepresentation(), GetLeadingMCParticle(), GetLeadingMCParticleList(), lar_content::LArMuonLeadingHelper::GetMCToLeadingMap(), lar_content::LArMuonLeadingHelper::GetPfoMatchContamination(), IsBeamNeutrinoFinalState(), IsLeadingBeamParticle(), lar_content::LArMuonLeadingHelper::IsMuonLeading(), lar_content::BdtBeamParticleIdTool::PopulateMCParticleToHitsMap(), lar_content::NeutrinoEventValidationAlgorithm::ProcessOutput(), lar_content::LArMuonLeadingHelper::SelectLeadingMCParticles(), SelectReconstructableTestBeamHierarchyMCParticles(), and lar_content::CheatingSliceSelectionTool::SelectSlices().
|
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 686 of file LArMCParticleHelper.cc.
References GetSharedHits(), SortByMomentum(), and lar_content::LArPfoHelper::SortByNHits().
Referenced by lar_content::NeutrinoEventValidationAlgorithm::FillValidationInfo(), lar_content::CosmicRayTaggingMonitoringTool::FindAmbiguousPfos(), lar_content::MvaPfoCharacterisationAlgorithm< T >::IsClearTrack(), lar_content::MuonLeadingEventValidationAlgorithm::PerformUnfoldedMatching(), and lar_content::PfoValidationAlgorithm::Run().
|
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 |
Referenced by lar_content::NeutrinoEventValidationAlgorithm::FillValidationInfo(), lar_content::CosmicRayTaggingMonitoringTool::FindAmbiguousPfos(), lar_content::MvaPfoCharacterisationAlgorithm< T >::IsClearTrack(), lar_content::MuonLeadingEventValidationAlgorithm::PerformUnfoldedMatching(), lar_content::PfoValidationAlgorithm::Run(), and SelectReconstructableTestBeamHierarchyMCParticles().
|
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 353 of file LArMCParticleHelper.cc.
References IsVisible().
Referenced by DoesPrimaryMeetCriteria(), lar_content::ElectronInitialRegionRefinementAlgorithm::FillElectronHitMap(), GetLeadingMCParticle(), GetMCPrimaryMap(), IsPrimary(), and SelectCaloHits().
|
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.
References IsPrimary(), and SortByMomentum().
Referenced by lar_content::VertexMonitoringAlgorithm::AssessVertices(), and SelectReconstructableMCParticles().
|
static |
Get the hits in the intersection of two hit lists.
hitListA | an input hit list |
hitListB | another input hit list |
Definition at line 963 of file LArMCParticleHelper.cc.
Referenced by GetPfoMCParticleHitSharingMaps(), lar_content::ElectronInitialRegionRefinementAlgorithm::IsElectron(), and lar_content::ElectronInitialRegionRefinementAlgorithm::IsSpineCoincident().
|
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 |
Referenced by SelectReconstructableTestBeamHierarchyMCParticles().
|
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.
References IsNeutrino(), and SortByMomentum().
Referenced by lar_content::TrainedVertexSelectionAlgorithm::GetBestVertex(), lar_content::CheatingNeutrinoCreationAlgorithm::GetMCNeutrinoVector(), lar_content::NeutrinoIdTool< T >::GetNuanceCode(), lar_content::EventWritingAlgorithm::PassNeutrinoVertexFilter(), and lar_content::EventWritingAlgorithm::PassNuanceCodeFilter().
|
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.
References IsTriggeredBeamParticle(), and SortByMomentum().
Referenced by lar_content::TrainedVertexSelectionAlgorithm::GetBestVertex().
|
static |
Returns true if passed a primary neutrino final state MCParticle.
Definition at line 77 of file LArMCParticleHelper.cc.
References GetParentMCParticle(), IsNeutrino(), and IsPrimary().
Referenced by lar_content::NeutrinoEventValidationAlgorithm::FillValidationInfo(), lar_content::CosmicRayTaggingMonitoringTool::FindAmbiguousPfos(), lar_content::TrainedVertexSelectionAlgorithm::GetInteractionType(), lar_content::MvaPfoCharacterisationAlgorithm< T >::IsClearTrack(), IsCosmicRay(), lar_content::EventWritingAlgorithm::PassMCParticleFilter(), lar_content::NeutrinoEventValidationAlgorithm::ProcessOutput(), lar_content::PfoValidationAlgorithm::Run(), lar_content::MCParticleMonitoringAlgorithm::Run(), and lar_content::VisualParticleMonitoringAlgorithm::Run().
|
static |
Returns true if passed a primary beam MCParticle.
Definition at line 93 of file LArMCParticleHelper.cc.
References GetNuanceCode(), and IsPrimary().
Referenced by lar_content::CosmicRayTaggingMonitoringTool::FindAmbiguousPfos(), GetLeadingMCParticle(), GetLeadingMCParticleList(), lar_content::MvaPfoCharacterisationAlgorithm< T >::IsClearTrack(), lar_content::LArHierarchyHelper::MCHierarchy::Node::IsTestBeamParticle(), lar_content::EventWritingAlgorithm::PassMCParticleFilter(), lar_content::LArHierarchyHelper::MatchInfo::Print(), lar_content::PfoValidationAlgorithm::Run(), lar_content::MCParticleMonitoringAlgorithm::Run(), lar_content::VisualParticleMonitoringAlgorithm::Run(), lar_content::CheatingBeamParticleIdTool::SelectOutputPfos(), and SelectReconstructableTestBeamHierarchyMCParticles().
|
static |
Definition at line 778 of file LArMCParticleHelper.cc.
References lar_content::MC_PROC_E_BREM, lar_content::MC_PROC_HAD_BREM, and lar_content::MC_PROC_MU_BREM.
|
static |
Check whether or not an MC particle comes from a capture process.
pMCParticle | The MC particle to consider |
Definition at line 799 of file LArMCParticleHelper.cc.
References lar_content::MC_PROC_CHIPS_NUCLEAR_CAPTURE_AT_REST, lar_content::MC_PROC_HAD_BERTINI_CAPTURE_AT_REST, lar_content::MC_PROC_HAD_FRITIOF_CAPTURE_AT_REST, lar_content::MC_PROC_MU_MINUS_CAPTURE_AT_REST, and lar_content::MC_PROC_N_CAPTURE.
|
static |
Return true if passed a primary cosmic ray MCParticle.
Definition at line 110 of file LArMCParticleHelper.cc.
References GetNuanceCode(), IsBeamNeutrinoFinalState(), and IsPrimary().
Referenced by lar_content::MuonLeadingEventValidationAlgorithm::DetermineIncorrectlyReconstructedCosmicRays(), lar_content::NeutrinoEventValidationAlgorithm::FillValidationInfo(), lar_content::CheatingCosmicRayTaggingTool::FindAmbiguousPfos(), lar_content::CosmicRayTaggingMonitoringTool::FindAmbiguousPfos(), lar_content::LArMuonLeadingHelper::GetMCToLeadingMap(), lar_content::LArMuonLeadingHelper::GetPfoMatchContamination(), lar_content::MuonLeadingEventValidationAlgorithm::GetRecoCosmicRayHits(), lar_content::LArHierarchyHelper::MCHierarchy::Node::IsCosmicRay(), lar_content::LArMuonLeadingHelper::IsMuonLeading(), lar_content::EventWritingAlgorithm::PassMCParticleFilter(), lar_content::LArHierarchyHelper::MatchInfo::Print(), lar_content::NeutrinoEventValidationAlgorithm::ProcessOutput(), lar_content::MuonLeadingEventValidationAlgorithm::ProcessOutput(), lar_content::PfoValidationAlgorithm::Run(), lar_content::MCParticleMonitoringAlgorithm::Run(), lar_content::VisualParticleMonitoringAlgorithm::Run(), lar_content::LArMuonLeadingHelper::SelectCaloHits(), and lar_content::LArMuonLeadingHelper::SelectLeadingMCParticles().
|
static |
Check whether or not an MC particle comes from a decay process.
pMCParticle | The MC particle to consider |
Definition at line 822 of file LArMCParticleHelper.cc.
References lar_content::MC_PROC_DECAY.
Referenced by lar_content::HierarchyValidationAlgorithm::Run().
|
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 1169 of file LArMCParticleHelper.cc.
References util::abs().
|
static |
Check whether or not an MC particle came from an elastic scattering process.
pMCParticle | The MC particle to consider |
Definition at line 841 of file LArMCParticleHelper.cc.
References lar_content::MC_PROC_COULOMB_SCAT, lar_content::MC_PROC_HAD_ELASTIC, lar_content::MC_PROC_NEUTRON_INELASTIC, and lar_content::MC_PROC_RAYLEIGH.
Referenced by lar_content::LArHierarchyHelper::MCHierarchy::CollectContinuations(), and lar_content::LArHierarchyHelper::MCHierarchy::InterpretHierarchy().
|
static |
Check whether or not an MC particle came from an inelastic scattering process.
pMCParticle | The MC particle to consider |
Definition at line 863 of file LArMCParticleHelper.cc.
References lar_content::MC_PROC_ALPHA_INELASTIC, lar_content::MC_PROC_ANTI_ALPHA_INELASTIC, lar_content::MC_PROC_ANTI_DEUTERON_INELASTIC, lar_content::MC_PROC_ANTI_HE3_INELASTIC, lar_content::MC_PROC_ANTI_NEUTRON_INELASTIC, lar_content::MC_PROC_ANTI_PROTON_INELASTIC, lar_content::MC_PROC_ANTI_TRITON_INELASTIC, lar_content::MC_PROC_COMPT, lar_content::MC_PROC_DEUTERON_INELASTIC, lar_content::MC_PROC_HE3_INELASTIC, lar_content::MC_PROC_ION_INELASTIC, lar_content::MC_PROC_KAON_MINUS_INELASTIC, lar_content::MC_PROC_KAON_PLUS_INELASTIC, lar_content::MC_PROC_LAMBDA_INELASTIC, lar_content::MC_PROC_PHOTON_INELASTIC, lar_content::MC_PROC_PI_MINUS_INELASTIC, lar_content::MC_PROC_PI_PLUS_INELASTIC, lar_content::MC_PROC_PROTON_INELASTIC, and lar_content::MC_PROC_TRITON_INELASTIC.
Referenced by lar_content::LArHierarchyHelper::MCHierarchy::CollectContinuations(), and lar_content::LArHierarchyHelper::MCHierarchy::InterpretHierarchy().
|
static |
Check whether or not an MC particle comes from an ionisation process.
pMCParticle | The MC particle to consider |
Definition at line 900 of file LArMCParticleHelper.cc.
References lar_content::MC_PROC_E_IONI, lar_content::MC_PROC_HAD_IONI, lar_content::MC_PROC_ION_IONI, and lar_content::MC_PROC_MU_IONI.
|
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.
References GetLeadingMCParticle().
Referenced by GetLeadingMCParticleList(), and IsLeadingBeamParticle().
|
static |
Returns true if passed a leading beam MCParticle.
Definition at line 101 of file LArMCParticleHelper.cc.
References GetNuanceCode(), GetParentMCParticle(), and IsLeading().
|
static |
Whether a mc particle is a neutrino or antineutrino.
pMCParticle | the input mc particle |
Definition at line 131 of file LArMCParticleHelper.cc.
References util::abs(), and GetNuanceCode().
Referenced by lar_content::VertexMonitoringAlgorithm::AssessVertices(), lar_content::NeutrinoIdTool< T >::CountNeutrinoInducedHits(), lar_content::CheatingNeutrinoCreationAlgorithm::GetMCNeutrinoVector(), GetTrueNeutrinos(), IsBeamNeutrinoFinalState(), lar_content::LArHierarchyHelper::MatchInfo::Print(), lar_content::CheatingVertexCreationAlgorithm::Run(), and lar_content::CheatingCosmicRayIdentificationAlg::Run().
|
static |
Check whether or not an MC particle comes from a nuclear interaction process.
pMCParticle | The MC particle to consider |
Definition at line 922 of file LArMCParticleHelper.cc.
References lar_content::MC_PROC_ELECTRON_NUCLEAR, lar_content::MC_PROC_MU_NUCLEAR, and lar_content::MC_PROC_PHOTON_NUCLEAR.
|
static |
Check whether or not an MC particle comes from a pair production process.
pMCParticle | The MC particle to consider |
Definition at line 943 of file LArMCParticleHelper.cc.
References lar_content::MC_PROC_HAD_PAIR_PROD, and lar_content::MC_PROC_MU_PAIR_PROD.
|
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.
References GetPrimaryMCParticle().
Referenced by GetLeadingMCParticleList(), GetPrimaryMCParticleList(), IsBeamNeutrinoFinalState(), IsBeamParticle(), IsCosmicRay(), and IsTriggeredBeamParticle().
|
static |
Returns true if passed a primary triggered beam MCParticle.
Definition at line 85 of file LArMCParticleHelper.cc.
References GetNuanceCode(), and IsPrimary().
Referenced by lar_content::TrainedVertexSelectionAlgorithm::GetInteractionType(), and GetTrueTestBeamParticles().
|
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.
References util::abs().
Referenced by GetFirstVisibleMCParticles(), GetLeadingMCParticle(), and GetPrimaryMCParticle().
|
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 1335 of file LArMCParticleHelper.cc.
References util::abs().
Referenced by SelectCaloHits().
|
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 1135 of file LArMCParticleHelper.cc.
References GetPrimaryMCParticle(), and PassMCParticleChecks().
Referenced by lar_content::NeutrinoIdTool< T >::GetBestMCSliceIndex(), lar_content::BdtBeamParticleIdTool::GetBestMCSliceIndices(), SelectReconstructableMCParticles(), and SelectReconstructableTestBeamHierarchyMCParticles().
|
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 1250 of file LArMCParticleHelper.cc.
Referenced by SelectParticlesByHitCount().
|
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 1210 of file LArMCParticleHelper.cc.
References lar_content::LArMonitoringHelper::CountHitsByType(), lar_content::LArMCParticleHelper::PrimaryParameters::m_minHitsForGoodView, lar_content::LArMCParticleHelper::PrimaryParameters::m_minHitSharingFraction, lar_content::LArMCParticleHelper::PrimaryParameters::m_minPrimaryGoodHits, lar_content::LArMCParticleHelper::PrimaryParameters::m_minPrimaryGoodViews, lar_content::LArMCParticleHelper::PrimaryParameters::m_selectInputHits, and SelectGoodCaloHits().
Referenced by lar_content::LArMuonLeadingHelper::SelectReconstructableLeadingParticles(), SelectReconstructableMCParticles(), and SelectReconstructableTestBeamHierarchyMCParticles().
|
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 1306 of file LArMCParticleHelper.cc.
References DoesLeadingMeetCriteria(), DoesPrimaryMeetCriteria(), and lar_content::LArMCParticleHelper::PrimaryParameters::m_foldBackHierarchy.
Referenced by SelectReconstructableMCParticles(), and SelectReconstructableTestBeamHierarchyMCParticles().
|
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 546 of file LArMCParticleHelper.cc.
References GetMCParticleToCaloHitMatches(), GetMCPrimaryMap(), GetMCToSelfMap(), GetPrimaryMCParticleList(), lar_content::LArMCParticleHelper::PrimaryParameters::m_foldBackHierarchy, lar_content::LArMCParticleHelper::PrimaryParameters::m_maxPhotonPropagation, lar_content::LArMCParticleHelper::PrimaryParameters::m_selectInputHits, SelectCaloHits(), SelectParticlesByHitCount(), and SelectParticlesMatchingCriteria().
Referenced by lar_content::NeutrinoEventValidationAlgorithm::FillValidationInfo(), lar_content::CosmicRayTaggingMonitoringTool::FindAmbiguousPfos(), lar_content::TrainedVertexSelectionAlgorithm::GetInteractionType(), lar_content::MvaPfoCharacterisationAlgorithm< T >::IsClearTrack(), lar_content::EventWritingAlgorithm::PassMCParticleFilter(), lar_content::PfoValidationAlgorithm::Run(), lar_content::MCParticleMonitoringAlgorithm::Run(), and lar_content::VisualParticleMonitoringAlgorithm::Run().
|
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 585 of file LArMCParticleHelper.cc.
References CollectReconstructable2DHits(), CollectReconstructableTestBeamHierarchy2DHits(), GetLeadingMCParticleList(), GetMCLeadingMap(), GetMCParticleToCaloHitMatches(), GetMCToSelfMap(), GetParentMCParticle(), GetPfoToReconstructable2DHitsMap(), GetTestBeamHierarchyPfoToReconstructable2DHitsMap(), IsBeamParticle(), lar_content::LArMCParticleHelper::PrimaryParameters::m_foldBackHierarchy, lar_content::LArMCParticleHelper::PrimaryParameters::m_maxPhotonPropagation, lar_content::LArMCParticleHelper::PrimaryParameters::m_selectInputHits, SelectCaloHits(), SelectParticlesByHitCount(), and SelectParticlesMatchingCriteria().
|
static |
Sort mc particles by their momentum.
pLhs | address of first mc particle |
pRhs | address of second mc particle |
Definition at line 486 of file LArMCParticleHelper.cc.
Referenced by lar_content::CheatingClusterCreationAlgorithm::CreateClusters(), lar_content::CheatingPfoCreationAlgorithm::CreatePfos(), lar_content::LArHierarchyHelper::MCHierarchy::FillHierarchy(), lar_content::TrainedVertexSelectionAlgorithm::GetInteractionType(), GetLeadingMCParticleList(), GetPfoMCParticleHitSharingMaps(), GetPrimaryMCParticleList(), GetTrueNeutrinos(), GetTrueTestBeamParticles(), lar_content::LArHierarchyHelper::MCHierarchy::IsReconstructable(), lar_content::EventWritingAlgorithm::PassMCParticleFilter(), lar_content::LArHierarchyHelper::MatchInfo::Print(), lar_content::MuonLeadingEventValidationAlgorithm::ProcessOutput(), lar_content::MasterAlgorithm::Reset(), lar_content::HierarchyValidationAlgorithm::Run(), lar_content::LArMuonLeadingHelper::SelectLeadingMCParticles(), and lar_content::CheatingSliceSelectionTool::SelectSlices().