8#ifndef LAR_CANDIDATE_VERTEX_CREATION_ALGORITHM_H
9#define LAR_CANDIDATE_VERTEX_CREATION_ALGORITHM_H 1
15#include <unordered_map>
Header file for the algorithm class.
Header file for the lar two dimensional sliding fit result class.
CandidateVertexCreationAlgorithm::Algorithm class.
void CreateEndpointVertex(const pandora::CartesianVector &position1, const pandora::HitType hitType1, const TwoDSlidingFitResult &fitResult2) const
Create a candidate vertex position, using an end-point position from one cluster and sliding fit to a...
float m_selectionCutFactorMax
Maximum factor to multiply the base cluster selection cuts.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
void AddInputVertices() const
Add candidate vertices from any input vertices.
const TwoDSlidingFitResult & GetCachedSlidingFitResult(const pandora::Cluster *const pCluster) const
Get a sliding fit result from the algorithm cache.
unsigned int m_extrapolationNSteps
Number of extrapolation steps, at each end of cluster, of specified size.
void FindCrossingPoints(const pandora::ClusterVector &clusterVector, pandora::CartesianPointVector &crossingPoints) const
Identify where (extrapolated) clusters plausibly cross in 2D.
bool m_enableEndpointCandidates
Whether to create endpoint-based candidates.
float m_maxCrossingXDiscrepancy
The max cluster endpoint discrepancy.
bool m_enableCrossingCandidates
Whether to create crossing vertex candidates.
float m_maxCrossingSeparationSquared
The separation (squared) between spacepoints below which a crossing can be identified.
void GetSpacepoints(const pandora::Cluster *const pCluster, pandora::CartesianPointVector &spacePoints) const
Get a list of spacepoints representing cluster 2D hit positions and extrapolated positions.
void SelectClusters(pandora::ClusterVector &clusterVectorU, pandora::ClusterVector &clusterVectorV, pandora::ClusterVector &clusterVectorW)
Select a subset of input clusters (contained in the input list names) for processing in this algorith...
void CreateEndpointCandidates(const pandora::ClusterVector &clusterVector1, const pandora::ClusterVector &clusterVector2) const
Create candidate vertex positions by comparing pairs of cluster end positions.
TwoDSlidingFitResultMap m_slidingFitResultMap
The sliding fit result map.
float m_nClustersPassingMaxCutsPar
Parameter for number of clusters passing the max base cluster selection cuts.
std::unordered_map< const pandora::Cluster *, pandora::CartesianPointVector > ClusterToSpacepointsMap
void CreateCrossingCandidates(const pandora::ClusterVector &clusterVectorU, const pandora::ClusterVector &clusterVectorV, const pandora::ClusterVector &clusterVectorW) const
Extrapolate 2D clusters, find where they cross, and match crossing points between views to create ver...
void CreateCrossingVertices(const pandora::CartesianPointVector &crossingPoints1, const pandora::CartesianPointVector &crossingPoints2, const pandora::HitType hitType1, const pandora::HitType hitType2, unsigned int &nCrossingCandidates) const
Attempt to create candidate vertex positions, using 2D crossing points in 2 views.
void TidyUp()
Clear relevant algorithm member variables between events.
float m_maxEndpointXDiscrepancy
The max cluster endpoint discrepancy.
std::string m_outputVertexListName
The name under which to save the output vertex list.
bool m_replaceCurrentVertexList
Whether to replace the current vertex list with the output list.
unsigned int m_slidingFitWindow
The layer window for the sliding linear fits.
unsigned int m_nMaxCrossingCandidates
The max number of crossing candidates to create.
float m_minClusterLengthSquared
The min length (squared) in base cluster selection method.
std::string m_inputVertexListName
The list name for existing candidate vertices.
CandidateVertexCreationAlgorithm()
Default constructor.
bool m_reducedCandidates
Whether to reduce the number of candidates.
pandora::StringVector m_inputClusterListNames
The list of cluster list names.
float m_minNearbyCrossingDistanceSquared
The minimum allowed distance between identified crossing positions.
unsigned int m_minClusterCaloHits
The min number of hits in base cluster selection method.
void AddToSlidingFitCache(const pandora::Cluster *const pCluster)
Creates a 2D sliding fit of a cluster and stores it for later use.
float m_chiSquaredCut
The chi squared cut (accept only 3D vertex positions with values below cut)
float m_extrapolationStepSize
The extrapolation step size in cm.
pandora::StatusCode Run()
Run the algorithm.
TwoDSlidingFitResult class.
Algorithm class. Algorithm addresses are held only by the algorithm manager. They have a fully define...
std::unordered_map< const pandora::Cluster *, TwoDSlidingFitResult > TwoDSlidingFitResultMap
HitType
Calorimeter hit type enum.
std::vector< const Cluster * > ClusterVector
std::vector< std::string > StringVector
std::vector< CartesianVector > CartesianPointVector
StatusCode
The StatusCode enum.