Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
CosmicRaySplittingAlgorithm.h
Go to the documentation of this file.
1
8#ifndef LAR_COSMIC_RAY_SPLITTING_ALGORITHM_H
9#define LAR_COSMIC_RAY_SPLITTING_ALGORITHM_H 1
10
11#include "Pandora/Algorithm.h"
12
14
15namespace lar_content
16{
17
22{
23public:
28
29private:
32
39 void GetListOfCleanClusters(const pandora::ClusterList *const pClusterList, pandora::ClusterVector &clusterVector) const;
40
47 void BuildSlidingFitResultMap(const pandora::ClusterVector &clusterVector, TwoDSlidingFitResultMap &slidingFitResultMap) const;
48
58 pandora::CartesianVector &splitDirection1, pandora::CartesianVector &splitDirection2) const;
59
71 pandora::StatusCode ConfirmSplitPosition(const TwoDSlidingFitResult &branchSlidingFitResult, const TwoDSlidingFitResult &replacementSlidingFitResult,
72 const pandora::CartesianVector &splitPosition, const pandora::CartesianVector &splitDirection1,
73 const pandora::CartesianVector &splitDirection2, float &lengthSquared1, float &lengthSquared2) const;
74
84 pandora::StatusCode PerformSingleSplit(const pandora::Cluster *const pBranchCluster, const pandora::Cluster *const pReplacementCluster,
85 const pandora::CartesianVector &splitPosition, const pandora::CartesianVector &forwardDirection,
86 const pandora::CartesianVector &backwardDirection) const;
87
98 pandora::StatusCode PerformDoubleSplit(const pandora::Cluster *const pBranchCluster, const pandora::Cluster *const pReplacementCluster1,
99 const pandora::Cluster *const pReplacementCluster2, const pandora::CartesianVector &splitPosition,
100 const pandora::CartesianVector &splitDirection1, const pandora::CartesianVector &splitDirection2) const;
101
112 void GetCaloHitListToMove(const pandora::Cluster *const pBranchCluster, const pandora::Cluster *const pReplacementCluster,
113 const pandora::CartesianVector &splitPosition, const pandora::CartesianVector &forwardDirection,
114 const pandora::CartesianVector &backwardDirection, pandora::CaloHitList &caloHitList) const;
115
126 void GetCaloHitListsToMove(const pandora::Cluster *const pBranchCluster, const pandora::CartesianVector &splitPosition,
127 const pandora::CartesianVector &splitDirection1, const pandora::CartesianVector &splitDirection2,
128 pandora::CaloHitList &caloHitList1, pandora::CaloHitList &caloHitList2) const;
129
138 bool IdentifyCrossedTracks(const pandora::Cluster *const pBranchCluster, const pandora::Cluster *const pReplacementCluster1,
139 const pandora::Cluster *const pReplacementCluster2, const pandora::CartesianVector &splitPosition) const;
140
148 pandora::StatusCode GetCaloHitListToKeep(const pandora::Cluster *const pBranchCluster, const pandora::CaloHitList &caloHitListToMove,
149 pandora::CaloHitList &caloHitListToKeep) const;
150
158 pandora::StatusCode SplitCluster(const pandora::Cluster *const pBranchCluster, const pandora::Cluster *const pReplacementCluster,
159 const pandora::CaloHitList &caloHitListToMove) const;
160
162 unsigned int m_halfWindowLayers;
169};
170
171} // namespace lar_content
172
173#endif // #ifndef LAR_COSMIC_RAY_SPLITTING_ALGORITHM_H
Header file for the algorithm class.
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.
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.
float m_minCosMergingAngle
largest relative angle allowed when merging clusters
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.
float m_maxCosSplittingAngle
smallest scatter angle allowed when splitting cluster
float m_maxLongitudinalDisplacement
maximum longitudinal displacement of associated clusters
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
float m_maxLongitudinalDisplacementSquared
longitudinal displacement squared
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.
float m_maxTransverseDisplacement
maximum transverse displacement of associated clusters
pandora::StatusCode Run()
Run the algorithm.
unsigned int m_halfWindowLayers
number of layers to use for half-window of sliding fit
void BuildSlidingFitResultMap(const pandora::ClusterVector &clusterVector, TwoDSlidingFitResultMap &slidingFitResultMap) const
Build the map of sliding fit results.
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.
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...
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.
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.
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.
float m_samplingPitch
sampling pitch for walking along sliding linear fit
float m_clusterMinLength
minimum length of clusters for this algorithm
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...
Algorithm class. Algorithm addresses are held only by the algorithm manager. They have a fully define...
Definition Algorithm.h:21
CartesianVector class.
Cluster class.
Definition Cluster.h:31
std::unordered_map< const pandora::Cluster *, TwoDSlidingFitResult > TwoDSlidingFitResultMap
std::vector< const Cluster * > ClusterVector
MANAGED_CONTAINER< const Cluster * > ClusterList
MANAGED_CONTAINER< const CaloHit * > CaloHitList
StatusCode
The StatusCode enum.