29 #ifndef NEARBYFRAGMENTSMERGINGALGORITHM_H
30 #define NEARBYFRAGMENTSMERGINGALGORITHM_H
32 #include "Pandora/Algorithm.h"
33 #include "Pandora/PandoraInputTypes.h"
39 namespace pandora {
class ClusterFitResult; }
41 namespace april_content
53 class Factory :
public pandora::AlgorithmFactory
56 pandora::Algorithm *CreateAlgorithm()
const;
60 pandora::StatusCode
Run();
61 pandora::StatusCode ReadSettings(
const pandora::TiXmlHandle xmlHandle);
65 void GetNearbyClusters(pandora::Cluster* cluster,
const std::vector<april_content::APRILCluster*>& clusterVector,
66 std::vector<april_content::APRILCluster*>& clustersInRange);
69 std::vector<april_content::APRILCluster*>& properClusters);
71 pandora::StatusCode CleanClusterForMerging(std::vector<APRILCluster*>& clusterVector);
86 pandora::StatusCode
FindClustersToMerge(
const pandora::ClusterVector &clusterVector, ClusterToClusterMap &clusterToClusterMap)
const;
104 pandora::StatusCode
GetClusterBackwardDirection(
const pandora::Cluster *
const pCluster, pandora::CartesianVector &backwardDirection, pandora::CartesianVector &innerPosition)
const;
106 void MergeFragmentsByMC(std::vector<APRILCluster*>& fragmentsToMerge);
110 bool m_allowNeutralParentMerging;
111 unsigned int m_minNCaloHits;
112 unsigned int m_maxNCaloHits;
113 unsigned int m_minNPseudoLayers;
114 unsigned int m_maxNPseudoLayers;
115 float m_chi2AssociationCut;
116 unsigned int m_nBackwardLayersFit;
117 float m_maxBackwardAngle;
118 float m_maxBackwardDistanceFine;
119 float m_maxBackwardDistanceCoarse;
120 unsigned int m_maxBackwardPseudoLayer;
121 unsigned int m_minParentClusterBackwardNHits;
122 float m_maxClusterFitDca;
123 float m_minClusterCosOpeningAngle;
124 float m_minClusterFitCosOpeningAngle;
125 float m_minClusterFitCosOpeningAngle2;
127 float m_maxStartingClusterDistance;
128 float m_maxClusterDistanceToMerge;
129 float m_maxClosestFragmentDistance;
131 bool m_mergePhotonClusters;
132 bool m_mergeChargedClusters;
133 bool m_cleanClusters;
136 arma::mat m_clusterCentroidsMatrix;
137 std::vector<APRILCluster*> m_clustersToMerge;
142 inline pandora::Algorithm *NearbyFragmentsMergingAlgorithm::Factory::CreateAlgorithm()
const
NearbyFragmentsMergingAlgorithm class.
Definition: NearbyFragmentsMergingAlgorithm.h:47
pandora::StatusCode FindClustersToMerge(const pandora::ClusterVector &clusterVector, ClusterToClusterMap &clusterToClusterMap) const
Algorithm workhorse, find associations between daughter and parent cluster.
bool m_discriminatePhotonPid
Whether to discriminate photons.
Definition: NearbyFragmentsMergingAlgorithm.h:109
Factory class for instantiating algorithm.
Definition: NearbyFragmentsMergingAlgorithm.h:53
Cluster class.
Definition: Cluster.h:89
pandora::StatusCode GetEligibleClusters(std::vector< APRILCluster * > &clusterVector) const
Get the eligible clusters for parent-daughter association.
Definition: NearbyFragmentsMergingAlgorithm.cc:585
pandora::StatusCode GetClusterBackwardDirection(const pandora::Cluster *const pCluster, pandora::CartesianVector &backwardDirection, pandora::CartesianVector &innerPosition) const
Get the cluster backward direction and the inner cluster position using a cluster fit of the n first ...
Definition: NearbyFragmentsMergingAlgorithm.cc:620
bool CanMergeCluster(const pandora::Cluster *const pCluster) const
Whether the cluster is eligible for association.
pandora::StatusCode Run()
Definition: NearbyFragmentsMergingAlgorithm.cc:57