8 #ifndef LAR_COSMIC_RAY_SPLITTING_ALGORITHM_H 9 #define LAR_COSMIC_RAY_SPLITTING_ALGORITHM_H 1 11 #include "Pandora/Algorithm.h" 30 pandora::StatusCode
Run();
31 pandora::StatusCode
ReadSettings(
const pandora::TiXmlHandle xmlHandle);
58 pandora::CartesianVector &splitDirection1, pandora::CartesianVector &splitDirection2)
const;
72 const TwoDSlidingFitResult &replacementSlidingFitResult,
const pandora::CartesianVector &splitPosition,
73 const pandora::CartesianVector &splitDirection1,
const pandora::CartesianVector &splitDirection2,
74 float &lengthSquared1,
float &lengthSquared2)
const;
85 pandora::StatusCode
PerformSingleSplit(
const pandora::Cluster *
const pBranchCluster,
const pandora::Cluster *
const pReplacementCluster,
86 const pandora::CartesianVector &splitPosition,
const pandora::CartesianVector &forwardDirection,
87 const pandora::CartesianVector &backwardDirection)
const;
99 pandora::StatusCode
PerformDoubleSplit(
const pandora::Cluster *
const pBranchCluster,
const pandora::Cluster *
const pReplacementCluster1,
100 const pandora::Cluster *
const pReplacementCluster2,
const pandora::CartesianVector &splitPosition,
101 const pandora::CartesianVector &splitDirection1,
const pandora::CartesianVector &splitDirection2)
const;
113 void GetCaloHitListToMove(
const pandora::Cluster *
const pBranchCluster,
const pandora::Cluster *
const pReplacementCluster,
114 const pandora::CartesianVector &splitPosition,
const pandora::CartesianVector &forwardDirection,
115 const pandora::CartesianVector &backwardDirection, pandora::CaloHitList &caloHitList)
const;
127 void GetCaloHitListsToMove(
const pandora::Cluster *
const pBranchCluster,
const pandora::CartesianVector &splitPosition,
128 const pandora::CartesianVector &splitDirection1,
const pandora::CartesianVector &splitDirection2,
129 pandora::CaloHitList &caloHitList1, pandora::CaloHitList &caloHitList2)
const;
139 bool IdentifyCrossedTracks(
const pandora::Cluster *
const pBranchCluster,
const pandora::Cluster *
const pReplacementCluster1,
140 const pandora::Cluster *
const pReplacementCluster2,
const pandora::CartesianVector &splitPosition)
const;
149 pandora::StatusCode
GetCaloHitListToKeep(
const pandora::Cluster *
const pBranchCluster,
const pandora::CaloHitList &caloHitListToMove,
150 pandora::CaloHitList &caloHitListToKeep)
const;
159 pandora::StatusCode
SplitCluster(
const pandora::Cluster *
const pBranchCluster,
const pandora::Cluster *
const pReplacementCluster,
160 const pandora::CaloHitList &caloHitListToMove)
const;
174 #endif // #ifndef LAR_COSMIC_RAY_SPLITTING_ALGORITHM_H
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...
void GetCaloHitListsToMove(const pandora::Cluster *const pBranchCluster, const pandora::CartesianVector &splitPosition, const pandora::CartesianVector &splitDirection1, const pandora::CartesianVector &splitDirection2, pandora::CaloHitList &caloHitList1, pandora::CaloHitList &caloHitList2) const
Get lists of calo hits to move in order to split a branch cluster into two segments for case of two r...
bool IdentifyCrossedTracks(const pandora::Cluster *const pBranchCluster, const pandora::Cluster *const pReplacementCluster1, const pandora::Cluster *const pReplacementCluster2, const pandora::CartesianVector &splitPosition) const
Identify crossed tracks formed from the branch cluster and its replacement cluster.
float m_maxLongitudinalDisplacement
maximum longitudinal displacement of associated clusters
void GetCaloHitListToMove(const pandora::Cluster *const pBranchCluster, const pandora::Cluster *const pReplacementCluster, const pandora::CartesianVector &splitPosition, const pandora::CartesianVector &forwardDirection, const pandora::CartesianVector &backwardDirection, pandora::CaloHitList &caloHitList) const
Get list of calo hits to move in order to split a branch cluster into two segments for case of one re...
pandora::StatusCode Run()
std::unordered_map< const pandora::Cluster *, TwoDSlidingFitResult > TwoDSlidingFitResultMap
float m_clusterMinLength
minimum length of clusters for this algorithm
pandora::StatusCode SplitCluster(const pandora::Cluster *const pBranchCluster, const pandora::Cluster *const pReplacementCluster, const pandora::CaloHitList &caloHitListToMove) const
Split the branch cluster and add hits to the replacement cluster.
pandora::StatusCode PerformSingleSplit(const pandora::Cluster *const pBranchCluster, const pandora::Cluster *const pReplacementCluster, const pandora::CartesianVector &splitPosition, const pandora::CartesianVector &forwardDirection, const pandora::CartesianVector &backwardDirection) const
Split a branch cluster for case of one replacement cluster.
float m_minCosMergingAngle
largest relative angle allowed when merging clusters
CosmicRaySplittingAlgorithm()
Default constructor.
pandora::StatusCode GetCaloHitListToKeep(const pandora::Cluster *const pBranchCluster, const pandora::CaloHitList &caloHitListToMove, pandora::CaloHitList &caloHitListToKeep) const
Split the branch cluster and add hits to the replacement cluster.
CosmicRaySplittingAlgorithm class.
float m_maxCosSplittingAngle
smallest scatter angle allowed when splitting cluster
float m_maxLongitudinalDisplacementSquared
longitudinal displacement squared
Header file for the lar two dimensional sliding fit result class.
pandora::StatusCode PerformDoubleSplit(const pandora::Cluster *const pBranchCluster, const pandora::Cluster *const pReplacementCluster1, const pandora::Cluster *const pReplacementCluster2, const pandora::CartesianVector &splitPosition, const pandora::CartesianVector &splitDirection1, const pandora::CartesianVector &splitDirection2) const
Split a branch cluster for case of two replacement clusters.
std::vector< art::Ptr< recob::Cluster > > ClusterVector
void BuildSlidingFitResultMap(const pandora::ClusterVector &clusterVector, TwoDSlidingFitResultMap &slidingFitResultMap) const
Build the map of sliding fit results.
float m_maxTransverseDisplacement
maximum transverse displacement of associated clusters
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
pandora::StatusCode ConfirmSplitPosition(const TwoDSlidingFitResult &branchSlidingFitResult, const TwoDSlidingFitResult &replacementSlidingFitResult, const pandora::CartesianVector &splitPosition, const pandora::CartesianVector &splitDirection1, const pandora::CartesianVector &splitDirection2, float &lengthSquared1, float &lengthSquared2) const
Find a second replacement cluster that aligns with the scatter of the first branch cluster...
pandora::StatusCode FindBestSplitPosition(const TwoDSlidingFitResult &slidingFitResult, pandora::CartesianVector &splitPosition, pandora::CartesianVector &splitDirection1, pandora::CartesianVector &splitDirection2) const
Find the position of greatest scatter along a sliding linear fit.
unsigned int m_halfWindowLayers
number of layers to use for half-window of sliding fit
TwoDSlidingFitResult class.
float m_samplingPitch
sampling pitch for walking along sliding linear fit