LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
DeltaRayIdentificationAlgorithm.h
Go to the documentation of this file.
1 
8 #ifndef LAR_DELTA_RAY_IDENTIFICATION_ALGORITHM_H
9 #define LAR_DELTA_RAY_IDENTIFICATION_ALGORITHM_H 1
10 
11 #include "Pandora/Algorithm.h"
12 
13 #include <unordered_map>
14 
15 namespace lar_content
16 {
17 
21 class DeltaRayIdentificationAlgorithm : public pandora::Algorithm
22 {
23 public:
28 
29 private:
30  pandora::StatusCode Run();
31 
32  typedef std::unordered_map<const pandora::ParticleFlowObject*, const pandora::ParticleFlowObject*> PfoAssociationMap;
33 
40  void GetPfos(const std::string &inputPfoListName, pandora::PfoVector &outputPfoVector) const;
41 
49  void BuildAssociationMap(const pandora::PfoVector &inputPfos, const pandora::PfoVector &outputPfos,
50  PfoAssociationMap &pfoAssociationMap) const;
51 
61  bool IsAssociated(const pandora::ParticleFlowObject *const pDaughterPfo, const pandora::ParticleFlowObject *const pParentPfo,
62  float &displacement) const;
63 
72  float GetTwoDSeparation(const pandora::ParticleFlowObject *const pDaughterPfo, const pandora::ParticleFlowObject *const pParentPfo) const;
73 
81  void GetTwoDVertices(const pandora::ParticleFlowObject *const pPfo, const pandora::HitType &hitType,
82  pandora::CartesianPointVector &vertexVector) const;
83 
90  float GetClosestDistance(const pandora::CartesianPointVector &vertexVector, const pandora::ClusterList &clusterList) const;
91 
98  void BuildParentDaughterLinks(const PfoAssociationMap &pfoAssociationMap, pandora::PfoList &outputPfoList) const;
99 
108  const pandora::ParticleFlowObject *GetParent(const PfoAssociationMap &pfoAssociationMap, const pandora::ParticleFlowObject *const pPfo) const;
109 
110  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
111 
112  std::string m_parentPfoListName;
113  std::string m_daughterPfoListName;
114 
118 };
119 
120 } // namespace lar_content
121 
122 #endif // #ifndef LAR_DELTA_RAY_IDENTIFICATION_ALGORITHM_H
float m_distanceForMatching
Maximum allowed distance of delta ray from parent cosmic ray.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
void GetPfos(const std::string &inputPfoListName, pandora::PfoVector &outputPfoVector) const
Get the vector of Pfos, given the input list name.
const pandora::ParticleFlowObject * GetParent(const PfoAssociationMap &pfoAssociationMap, const pandora::ParticleFlowObject *const pPfo) const
For a given daughter, follow the parent/daughter links to find the overall parent.
float GetTwoDSeparation(const pandora::ParticleFlowObject *const pDaughterPfo, const pandora::ParticleFlowObject *const pParentPfo) const
Calculate 2D separation between two Pfos.
std::string m_parentPfoListName
The parent pfo list name.
float m_maxDaughterLengthSquared
Maximum allowed length of daughter delta ray.
std::string m_daughterPfoListName
The daughter pfo list name.
void GetTwoDVertices(const pandora::ParticleFlowObject *const pPfo, const pandora::HitType &hitType, pandora::CartesianPointVector &vertexVector) const
Calculate 2D separation between two Pfos.
bool IsAssociated(const pandora::ParticleFlowObject *const pDaughterPfo, const pandora::ParticleFlowObject *const pParentPfo, float &displacement) const
Determine if a given pair of Pfos have a parent/daughter association.
void BuildParentDaughterLinks(const PfoAssociationMap &pfoAssociationMap, pandora::PfoList &outputPfoList) const
Build the parent/daughter links from the map of parent/daughter associations.
void BuildAssociationMap(const pandora::PfoVector &inputPfos, const pandora::PfoVector &outputPfos, PfoAssociationMap &pfoAssociationMap) const
Build parent/daughter associations between PFOs.
float m_minParentLengthSquared
Minimum allowed length of parent cosmic ray.
float GetClosestDistance(const pandora::CartesianPointVector &vertexVector, const pandora::ClusterList &clusterList) const
Calculate closest 2D separation between a set of vertices and a set of clusters.
std::unordered_map< const pandora::ParticleFlowObject *, const pandora::ParticleFlowObject * > PfoAssociationMap