8 #ifndef LAR_TWO_D_SLIDING_FIT_SPLITTING_AND_SPLICING_ALGORITHM_H 9 #define LAR_TWO_D_SLIDING_FIT_SPLITTING_AND_SPLICING_ALGORITHM_H 1 11 #include "Pandora/Algorithm.h" 30 virtual pandora::StatusCode
Run();
31 virtual pandora::StatusCode
ReadSettings(
const pandora::TiXmlHandle xmlHandle);
48 ClusterExtension(
const pandora::Cluster *
const pBranchCluster,
const pandora::Cluster *
const pReplacementCluster,
49 const pandora::CartesianVector &replacementVertex,
const pandora::CartesianVector &branchVertex,
50 const pandora::CartesianVector &branchDirection);
97 pandora::CartesianVector &replacementStartPosition, pandora::CartesianVector &branchSplitPosition,
98 pandora::CartesianVector &branchSplitDirection)
const = 0;
148 float CalculateBranchChi2(
const pandora::Cluster *
const pCluster,
const pandora::CartesianVector &splitPosition,
149 const pandora::CartesianVector &splitDirection)
const;
160 void SplitBranchCluster(
const pandora::Cluster *
const pCluster,
const pandora::CartesianVector &splitPosition,
161 const pandora::CartesianVector &splitDirection, pandora::CaloHitList &principalCaloHitList, pandora::CaloHitList &branchCaloHitList)
const;
181 pandora::StatusCode
ReplaceBranch(
const pandora::Cluster *
const pBranchCluster,
const pandora::Cluster *
const pReplacementCluster,
182 const pandora::CartesianVector &branchSplitPosition,
const pandora::CartesianVector &branchSplitDirection)
const;
195 const pandora::Cluster *
const pReplacementCluster,
const pandora::CartesianVector &replacementVertex,
196 const pandora::CartesianVector &branchVertex,
const pandora::CartesianVector &branchDirection) :
242 #endif // #ifndef LAR_TWO_D_SLIDING_FIT_SPLITTING_AND_SPLICING_ALGORITHM_H const pandora::CartesianVector & GetReplacementVertex() const
return the start position of the replacement cluster
pandora::CartesianVector m_branchDirection
const pandora::Cluster * GetReplacementCluster() const
return the address of the replacement Cluster
virtual void FindBestSplitPosition(const TwoDSlidingFitResult &branchSlidingFit, const TwoDSlidingFitResult &replacementSlidingFit, pandora::CartesianVector &replacementStartPosition, pandora::CartesianVector &branchSplitPosition, pandora::CartesianVector &branchSplitDirection) const =0
Output the best split positions in branch and replacement clusters.
virtual pandora::StatusCode Run()
std::vector< ClusterExtension > ClusterExtensionList
const pandora::Cluster * m_pReplacementCluster
unsigned int m_longHalfWindowLayers
void BuildSlidingFitResultMap(const pandora::ClusterVector &clusterVector, const unsigned int halfWindowLayers, TwoDSlidingFitResultMap &slidingFitResultMap) const
Build the map of sliding fit results.
void BuildClusterExtensionList(const pandora::ClusterVector &clusterVector, const TwoDSlidingFitResultMap &branchResultMap, const TwoDSlidingFitResultMap &replacementResultMap, ClusterExtensionList &clusterExtensionList) const
Build a list of candidate splits.
const pandora::Cluster * GetBranchCluster() const
return the address of the branch Cluster
ClusterExtension(const pandora::Cluster *const pBranchCluster, const pandora::Cluster *const pReplacementCluster, const pandora::CartesianVector &replacementVertex, const pandora::CartesianVector &branchVertex, const pandora::CartesianVector &branchDirection)
Constructor.
const pandora::CartesianVector & GetBranchVertex() const
return the split position of the branch cluster
const pandora::CartesianVector & GetBranchDirection() const
return the split direction of the branch cluster
void GetListOfCleanClusters(const pandora::ClusterList *const pClusterList, pandora::ClusterVector &clusterVector) const
Populate cluster vector with subset of cluster list, containing clusters judged to be clean...
Header file for the cluster helper class.
pandora::CartesianVector m_replacementVertex
pandora::StatusCode RunSplitAndExtension(const ClusterExtensionList &splitList, TwoDSlidingFitResultMap &branchResultMap, TwoDSlidingFitResultMap &replacementResultMap) const
Run the machinary that performs the cluster splitting and extending.
virtual pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
TwoDSlidingFitSplittingAndSplicingAlgorithm()
Default constructor.
TwoDSlidingFitSplittingAndSplicingAlgorithm class.
pandora::StatusCode ReplaceBranch(const pandora::Cluster *const pBranchCluster, const pandora::Cluster *const pReplacementCluster, const pandora::CartesianVector &branchSplitPosition, const pandora::CartesianVector &branchSplitDirection) const
Remove a branch from a cluster and replace it with a second cluster.
std::unordered_map< const pandora::Cluster *, TwoDSlidingFitResult > TwoDSlidingFitResultMap
const pandora::Cluster * m_pBranchCluster
void SplitBranchCluster(const pandora::Cluster *const pCluster, const pandora::CartesianVector &splitPosition, const pandora::CartesianVector &splitDirection, pandora::CaloHitList &principalCaloHitList, pandora::CaloHitList &branchCaloHitList) const
Separate cluster into the branch hits to be split from the primary cluster.
float CalculateBranchChi2(const pandora::Cluster *const pCluster, const pandora::CartesianVector &splitPosition, const pandora::CartesianVector &splitDirection) const
Calculate RMS deviation of branch hits relative to the split direction.
std::vector< art::Ptr< recob::Cluster > > ClusterVector
pandora::CartesianVector m_branchVertex
unsigned int m_shortHalfWindowLayers
void PruneClusterExtensionList(const ClusterExtensionList &inputList, const TwoDSlidingFitResultMap &branchResultMap, const TwoDSlidingFitResultMap &replacementResultMap, ClusterExtensionList &outputList) const
Finalize the list of candidate splits.
TwoDSlidingFitResult class.