LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
TwoDSlidingFitSplittingAndSplicingAlgorithm class. More...
#include "TwoDSlidingFitSplittingAndSplicingAlgorithm.h"
Classes | |
class | ClusterExtension |
ClusterExtension class. More... | |
Public Member Functions | |
TwoDSlidingFitSplittingAndSplicingAlgorithm () | |
Default constructor. More... | |
Protected Types | |
typedef std::vector< ClusterExtension > | ClusterExtensionList |
Protected Member Functions | |
virtual pandora::StatusCode | Run () |
virtual pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
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. More... | |
Private Member Functions | |
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. More... | |
void | BuildSlidingFitResultMap (const pandora::ClusterVector &clusterVector, const unsigned int halfWindowLayers, TwoDSlidingFitResultMap &slidingFitResultMap) const |
Build the map of sliding fit results. More... | |
void | BuildClusterExtensionList (const pandora::ClusterVector &clusterVector, const TwoDSlidingFitResultMap &branchResultMap, const TwoDSlidingFitResultMap &replacementResultMap, ClusterExtensionList &clusterExtensionList) const |
Build a list of candidate splits. More... | |
void | PruneClusterExtensionList (const ClusterExtensionList &inputList, const TwoDSlidingFitResultMap &branchResultMap, const TwoDSlidingFitResultMap &replacementResultMap, ClusterExtensionList &outputList) const |
Finalize the list of candidate splits. More... | |
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. More... | |
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. More... | |
pandora::StatusCode | RunSplitAndExtension (const ClusterExtensionList &splitList, TwoDSlidingFitResultMap &branchResultMap, TwoDSlidingFitResultMap &replacementResultMap) const |
Run the machinary that performs the cluster splitting and extending. More... | |
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. More... | |
Private Attributes | |
unsigned int | m_shortHalfWindowLayers |
unsigned int | m_longHalfWindowLayers |
float | m_minClusterLength |
float | m_vetoDisplacement |
bool | m_runCosmicMode |
TwoDSlidingFitSplittingAndSplicingAlgorithm class.
Definition at line 21 of file TwoDSlidingFitSplittingAndSplicingAlgorithm.h.
|
protected |
Definition at line 85 of file TwoDSlidingFitSplittingAndSplicingAlgorithm.h.
lar_content::TwoDSlidingFitSplittingAndSplicingAlgorithm::TwoDSlidingFitSplittingAndSplicingAlgorithm | ( | ) |
Default constructor.
Definition at line 21 of file TwoDSlidingFitSplittingAndSplicingAlgorithm.cc.
|
private |
Build a list of candidate splits.
clusterVector | the input cluster vector |
branchResultMap | the sliding fit result map for branch clusters |
replacementResultMap | the sliding fit result map for replacement clusters |
clusterExtensionList | the output list of candidate splits |
Definition at line 121 of file TwoDSlidingFitSplittingAndSplicingAlgorithm.cc.
References CalculateBranchChi2(), f, and FindBestSplitPosition().
Referenced by Run().
|
private |
Build the map of sliding fit results.
clusterVector | the input cluster vector |
halfWindowLayers | the half-window to use for the sliding fits |
slidingFitResultMap | the output sliding fit result map |
Definition at line 94 of file TwoDSlidingFitSplittingAndSplicingAlgorithm.cc.
References lar_content::LArGeometryHelper::GetWireZPitch().
Referenced by Run().
|
private |
Calculate RMS deviation of branch hits relative to the split direction.
pCluster | the input branch cluster |
splitPosition | the start position of the branch |
splitDirection | the start direction of the branch |
Definition at line 290 of file TwoDSlidingFitSplittingAndSplicingAlgorithm.cc.
References f, and SplitBranchCluster().
Referenced by BuildClusterExtensionList().
|
protectedpure virtual |
Output the best split positions in branch and replacement clusters.
branchSlidingFit | the inputted sliding fit result for possible branch cluster |
pReplacementCluster | the inputted sliding fit result for possible replacement cluster |
replacementStartPosition | the outputted start position of the replacement |
branchSplitPosition | the outputted start position of the branch |
branchSplitDirection | the outputted start direction of the branch |
Implemented in lar_content::BranchSplittingAlgorithm, and lar_content::DeltaRaySplittingAlgorithm.
Referenced by BuildClusterExtensionList().
|
private |
Populate cluster vector with subset of cluster list, containing clusters judged to be clean.
pClusterList | address of the cluster list |
clusterVector | to receive the populated cluster vector |
Definition at line 77 of file TwoDSlidingFitSplittingAndSplicingAlgorithm.cc.
References lar_content::LArClusterHelper::GetLengthSquared(), m_minClusterLength, and lar_content::LArClusterHelper::SortByNHits().
Referenced by Run().
|
private |
Finalize the list of candidate splits.
inputList | the input list of possible splits |
branchResultMap | the sliding fit result map for branch clusters |
replacementResultMap | the sliding fit result map for replacement clusters |
outputList | the output list of definite splits |
Definition at line 224 of file TwoDSlidingFitSplittingAndSplicingAlgorithm.cc.
References m_vetoDisplacement, max, min, and lar_content::LArClusterHelper::SortByNHits().
Referenced by Run().
|
protectedvirtual |
Reimplemented in lar_content::BranchSplittingAlgorithm, and lar_content::DeltaRaySplittingAlgorithm.
Definition at line 418 of file TwoDSlidingFitSplittingAndSplicingAlgorithm.cc.
References m_longHalfWindowLayers, m_minClusterLength, m_runCosmicMode, m_shortHalfWindowLayers, and m_vetoDisplacement.
Referenced by lar_content::BranchSplittingAlgorithm::ReadSettings(), and lar_content::DeltaRaySplittingAlgorithm::ReadSettings().
|
private |
Remove a branch from a cluster and replace it with a second cluster.
pBranchCluster | the cluster containing a branch to be removed |
pReplacementCluster | the replacement cluster |
branchSplitPosition | the position at the start of the branch |
branchSplitDirection | the direction at the start of the branch |
Definition at line 389 of file TwoDSlidingFitSplittingAndSplicingAlgorithm.cc.
References SplitBranchCluster().
Referenced by RunSplitAndExtension().
|
protectedvirtual |
Definition at line 32 of file TwoDSlidingFitSplittingAndSplicingAlgorithm.cc.
References BuildClusterExtensionList(), BuildSlidingFitResultMap(), GetListOfCleanClusters(), m_longHalfWindowLayers, m_runCosmicMode, m_shortHalfWindowLayers, PruneClusterExtensionList(), and RunSplitAndExtension().
|
private |
Run the machinary that performs the cluster splitting and extending.
splitList | the input list of candidate splits |
branchResultMap | the sliding fit result map for branch clusters |
replacementResultMap | the sliding fit result map for replacement clusters |
Definition at line 346 of file TwoDSlidingFitSplittingAndSplicingAlgorithm.cc.
References lar_content::TwoDSlidingFitSplittingAndSplicingAlgorithm::ClusterExtension::GetBranchCluster(), lar_content::TwoDSlidingFitSplittingAndSplicingAlgorithm::ClusterExtension::GetBranchDirection(), lar_content::TwoDSlidingFitSplittingAndSplicingAlgorithm::ClusterExtension::GetBranchVertex(), lar_content::TwoDSlidingFitSplittingAndSplicingAlgorithm::ClusterExtension::GetReplacementCluster(), and ReplaceBranch().
Referenced by Run().
|
private |
Separate cluster into the branch hits to be split from the primary cluster.
pCluster | the input branch cluster |
splitPosition | the start position of the branch |
splitDirection | the start direction of the branch |
principalCaloHitList | the hits to be added to the principal cluster |
branchCaloHitList | the hits to be split off into the output branch cluster |
Definition at line 319 of file TwoDSlidingFitSplittingAndSplicingAlgorithm.cc.
Referenced by CalculateBranchChi2(), and ReplaceBranch().
|
private |
Definition at line 187 of file TwoDSlidingFitSplittingAndSplicingAlgorithm.h.
Referenced by ReadSettings(), and Run().
|
private |
Definition at line 188 of file TwoDSlidingFitSplittingAndSplicingAlgorithm.h.
Referenced by GetListOfCleanClusters(), and ReadSettings().
|
private |
Definition at line 190 of file TwoDSlidingFitSplittingAndSplicingAlgorithm.h.
Referenced by ReadSettings(), and Run().
|
private |
Definition at line 186 of file TwoDSlidingFitSplittingAndSplicingAlgorithm.h.
Referenced by ReadSettings(), and Run().
|
private |
Definition at line 189 of file TwoDSlidingFitSplittingAndSplicingAlgorithm.h.
Referenced by PruneClusterExtensionList(), and ReadSettings().