LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
DeltaRayParentAlgorithm.h
Go to the documentation of this file.
1 
8 #ifndef LAR_DELTA_RAY_PARENT_ALGORITHM_H
9 #define LAR_DELTA_RAY_PARENT_ALGORITHM_H 1
10 
11 #include "Pandora/Algorithm.h"
12 
13 namespace lar_content
14 {
15 
19 class DeltaRayParentAlgorithm : public pandora::Algorithm
20 {
21 public:
22  typedef std::map<const pandora::ParticleFlowObject *, float> PfoLengthMap;
23 
28 
29  pandora::StatusCode Run();
30 
31 private:
39  void InitialisePfoLengthMap(const pandora::PfoList *const muonPfoList, const pandora::PfoList *const deltaRayPfoList, PfoLengthMap &pfoLengthMap) const;
40 
48  void FindParentPfo(const PfoLengthMap &pfoLengthMap, const pandora::ParticleFlowObject *const pPfo, const pandora::ParticleFlowObject *&pParentPfo) const;
49 
59  pandora::StatusCode GetTwoDSeparation(
60  const pandora::ParticleFlowObject *const pPfo1, const pandora::ParticleFlowObject *const pPfo2, float &separation) const;
61 
71  void AssignToParentPfo(const pandora::PfoList *const muonPfoList, const pandora::PfoList *const deltaRayPfoList,
72  const pandora::ParticleFlowObject *const pPfo, const pandora::ParticleFlowObject *const pParentPfo, PfoLengthMap &pfoLengthMap) const;
73 
81  void UpdatePfoLengthMap(const pandora::PfoList &pfosToRemove, const pandora::ParticleFlowObject *const pPfoToAdd, PfoLengthMap &pfoLengthMap) const;
82 
83  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
84 
85  std::string m_muonPfoListName;
86  std::string m_deltaRayPfoListName;
88 };
89 
90 } // namespace lar_content
91 
92 #endif // #ifndef LAR_DELTA_RAY_PARENT_ALGORITHM_H
pandora::StatusCode GetTwoDSeparation(const pandora::ParticleFlowObject *const pPfo1, const pandora::ParticleFlowObject *const pPfo2, float &separation) const
Get distance between two Pfos using 2D clusters.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
std::string m_muonPfoListName
The list of reconstructed muon pfos.
float m_distanceForMatching
The maximum separation of a delta ray pfo from its parent.
void AssignToParentPfo(const pandora::PfoList *const muonPfoList, const pandora::PfoList *const deltaRayPfoList, const pandora::ParticleFlowObject *const pPfo, const pandora::ParticleFlowObject *const pParentPfo, PfoLengthMap &pfoLengthMap) const
Apply parent-child link (if parent is a cosmic ray create parent-child link else merge the delta ray ...
void UpdatePfoLengthMap(const pandora::PfoList &pfosToRemove, const pandora::ParticleFlowObject *const pPfoToAdd, PfoLengthMap &pfoLengthMap) const
Update the pfo length map after a parent-child delta ray merge.
void FindParentPfo(const PfoLengthMap &pfoLengthMap, const pandora::ParticleFlowObject *const pPfo, const pandora::ParticleFlowObject *&pParentPfo) const
Identify the parent pfo of a given delta ray pfo (can be either a cosmic ray or delta ray pfo) ...
std::map< const pandora::ParticleFlowObject *, float > PfoLengthMap
void InitialisePfoLengthMap(const pandora::PfoList *const muonPfoList, const pandora::PfoList *const deltaRayPfoList, PfoLengthMap &pfoLengthMap) const
Initialise the delta ray pfo length map.
std::string m_deltaRayPfoListName
The list of reconstructed delta ray pfos.
DeltaRayParentAlgorithm class.