LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
LArMuonLeadingHelper.h
Go to the documentation of this file.
1 
8 #ifndef LAR_MUON_LEADING_HELPER_H
9 #define LAR_MUON_LEADING_HELPER_H 1
10 
11 #include "Pandora/PandoraInternal.h"
12 
14 
15 namespace lar_content
16 {
21 {
22 public:
27  {
28  public:
33 
35  };
36 
37  typedef std::map<const pandora::MCParticle *, pandora::CaloHitList> LeadingMCParticleToPostBremsstrahlungHitList;
38 
47  static MCProcess GetLeadingProcess(const pandora::MCParticle *const pMCParticle);
48 
54  static bool IsDeltaRay(const pandora::MCParticle *const pMCParticle);
55 
61  static bool IsMichel(const pandora::MCParticle *const pMCParticle);
62 
68  static bool IsMuonLeading(const pandora::MCParticle *const pMCParticle);
69 
75  static const pandora::MCParticle *GetLeadingParticle(const pandora::MCParticle *const pMCParticle);
76 
86  static void SelectReconstructableLeadingParticles(const pandora::MCParticleList *pMCParticleList,
87  const pandora::CaloHitList *pCaloHitList, const ValidationParameters &parameters, const pandora::CaloHitList &recoMuonHitList,
88  LArMCParticleHelper::MCContributionMap &selectedMCParticlesToHitsMap);
89 
99  static void GetPfoMatchContamination(const pandora::MCParticle *const pLeadingParticle, const pandora::CaloHitList &matchedPfoHitList,
100  pandora::CaloHitList &parentTrackHits, pandora::CaloHitList &otherTrackHits, pandora::CaloHitList &otherShowerHits);
101 
109  static void GetMuonPfoContaminationContribution(const pandora::CaloHitList &cosmicRayPfoHitList,
110  const pandora::CaloHitList &leadingMCHitList, pandora::CaloHitList &leadingHitsInParentCosmicRay);
111 
120  static float GetClosestDistance(const pandora::Cluster *const pCluster, const pandora::CartesianPointVector &cartesianPointVector);
121 
130  static float GetClosestDistance(const pandora::CaloHit *const pCaloHit, const pandora::CartesianPointVector &cartesianPointVector);
131 
144  static pandora::StatusCode GetClosestPosition(const pandora::CartesianVector &referencePoint,
145  const pandora::CartesianPointVector &cartesianPointVector, const pandora::Cluster *const pCluster, const float maxDistanceToCluster,
146  const float maxDistanceToReferencePoint, pandora::CartesianVector &closestPosition);
147 
156  static void GetClosestPositions(const pandora::CartesianPointVector &cartesianPointVector1, const pandora::Cluster *const pCluster2,
157  pandora::CartesianVector &outputPosition1, pandora::CartesianVector &outputPosition2);
158 
159 private:
166  static void GetMCToLeadingMap(const pandora::MCParticleList *const pMCParticleList, LArMCParticleHelper::MCRelationMap &mcToLeadingMap);
167 
179  static void SelectCaloHits(const pandora::CaloHitList *const pCaloHitList, const LArMCParticleHelper::MCRelationMap &mcToTargetMCMap,
180  pandora::CaloHitList &selectedCaloHitList, const bool selectInputHits, const float minHitSharingFraction,
181  const pandora::CaloHitList &recoMuonHitList, LeadingMCParticleToPostBremsstrahlungHitList &leadingMCParticleToPostBremsstrahlungHitList);
182 
191  static bool RejectBremsstrahlungHits(
192  const pandora::CaloHit *const pCaloHit, LeadingMCParticleToPostBremsstrahlungHitList &leadingMCParticleToPostBremsstrahlungHitList);
193 
201  static void AddInPostBremsstrahlungHits(const LeadingMCParticleToPostBremsstrahlungHitList &leadingMCParticleToPostBremsstrahlungHitList,
202  const float maxBremsstrahlungSeparation, LArMCParticleHelper::MCContributionMap &leadingMCToTrueHitListMap);
203 
213  static void AddInPostBremsstrahlungHits(const pandora::MCParticle *const pLeadingParticle,
214  const LeadingMCParticleToPostBremsstrahlungHitList &leadingMCParticleToPostBremsstrahlungHitList, const float maxBremsstrahlungSeparation,
215  LArMCParticleHelper::MCContributionMap &leadingMCToTrueHitListMap, const pandora::HitType tpcView);
216 
223  static void SelectLeadingMCParticles(const pandora::MCParticleList *pMCParticleList, pandora::MCParticleVector &selectedParticles);
224 };
225 
226 } // namespace lar_content
227 
228 #endif // #ifndef LAR_MUON_LEADING_HELPER_H
static MCProcess GetLeadingProcess(const pandora::MCParticle *const pMCParticle)
Return the MCProcess of the leading particle (tier 1) in the delta ray/michel hierarchy.
static float GetClosestDistance(const pandora::Cluster *const pCluster, const pandora::CartesianPointVector &cartesianPointVector)
Get closest distance between a specified cluster and list of positions.
static void AddInPostBremsstrahlungHits(const LeadingMCParticleToPostBremsstrahlungHitList &leadingMCParticleToPostBremsstrahlungHitList, const float maxBremsstrahlungSeparation, LArMCParticleHelper::MCContributionMap &leadingMCToTrueHitListMap)
Identify the reconstructable post-bremsstrahlung radiation hits.
static void GetMuonPfoContaminationContribution(const pandora::CaloHitList &cosmicRayPfoHitList, const pandora::CaloHitList &leadingMCHitList, pandora::CaloHitList &leadingHitsInParentCosmicRay)
Determine the leading MCParticle hits within a cosmic ray pfo hit list.
static void SelectReconstructableLeadingParticles(const pandora::MCParticleList *pMCParticleList, const pandora::CaloHitList *pCaloHitList, const ValidationParameters &parameters, const pandora::CaloHitList &recoMuonHitList, LArMCParticleHelper::MCContributionMap &selectedMCParticlesToHitsMap)
Select target, reconstructable mc particles in the cosmic ray hierarchy.
std::unordered_map< const pandora::MCParticle *, pandora::CaloHitList > MCContributionMap
static bool RejectBremsstrahlungHits(const pandora::CaloHit *const pCaloHit, LeadingMCParticleToPostBremsstrahlungHitList &leadingMCParticleToPostBremsstrahlungHitList)
Identify and record the hits that are post-bremsstralung radiation in a cosmic ray hierarchy...
static const pandora::MCParticle * GetLeadingParticle(const pandora::MCParticle *const pMCParticle)
Return leading particle in the delta ray/michel hierarchy i.e. tier below cosmic ray.
LArMuonLeadingHelper class.
static void SelectLeadingMCParticles(const pandora::MCParticleList *pMCParticleList, pandora::MCParticleVector &selectedParticles)
Select all tier 0 and tier 1 MCParticles in cosmic ray hierarchies from an input list.
float m_maxBremsstrahlungSeparation
The maximum separation of a reconstructable post-bremsstrahlung hit from the pre-radiation hits...
std::map< const pandora::MCParticle *, pandora::CaloHitList > LeadingMCParticleToPostBremsstrahlungHitList
static bool IsMichel(const pandora::MCParticle *const pMCParticle)
Return true if input MCParticle is a child of a cosmic ray and has &#39;decay&#39; process tag...
Header file for the lar monte carlo particle helper helper class.
static void GetClosestPositions(const pandora::CartesianPointVector &cartesianPointVector1, const pandora::Cluster *const pCluster2, pandora::CartesianVector &outputPosition1, pandora::CartesianVector &outputPosition2)
Get the closest positions between a list of positions and a cluster.
static void GetPfoMatchContamination(const pandora::MCParticle *const pLeadingParticle, const pandora::CaloHitList &matchedPfoHitList, pandora::CaloHitList &parentTrackHits, pandora::CaloHitList &otherTrackHits, pandora::CaloHitList &otherShowerHits)
Separate a leading pfo hit list according to the true owner of the hit e.g. other shower...
std::vector< art::Ptr< simb::MCParticle > > MCParticleVector
static void SelectCaloHits(const pandora::CaloHitList *const pCaloHitList, const LArMCParticleHelper::MCRelationMap &mcToTargetMCMap, pandora::CaloHitList &selectedCaloHitList, const bool selectInputHits, const float minHitSharingFraction, const pandora::CaloHitList &recoMuonHitList, LeadingMCParticleToPostBremsstrahlungHitList &leadingMCParticleToPostBremsstrahlungHitList)
Select a subset of calo hits representing those that represent "reconstructable" regions of the event...
static void GetMCToLeadingMap(const pandora::MCParticleList *const pMCParticleList, LArMCParticleHelper::MCRelationMap &mcToLeadingMap)
Construct the hierarchy folding map (cosmic rays folded to themselves, delta ray/michel hierarchy fol...
static pandora::StatusCode GetClosestPosition(const pandora::CartesianVector &referencePoint, const pandora::CartesianPointVector &cartesianPointVector, const pandora::Cluster *const pCluster, const float maxDistanceToCluster, const float maxDistanceToReferencePoint, pandora::CartesianVector &closestPosition)
Get the closest position from an input list of projected positions that lies close to both a referenc...
HitType
Definition: HitType.h:12
static bool IsMuonLeading(const pandora::MCParticle *const pMCParticle)
Return true if input MCParticle is in tier 1 of the cosmic ray hierarchy.
std::unordered_map< const pandora::MCParticle *, const pandora::MCParticle * > MCRelationMap
static bool IsDeltaRay(const pandora::MCParticle *const pMCParticle)
Return true if input MCParticle is a child of a cosmic ray and has &#39;delta ray&#39; process tag...