8#ifndef LAR_THREE_VIEW_SHOWERS_ALGORITHM_H
9#define LAR_THREE_VIEW_SHOWERS_ALGORITHM_H 1
22class ShowerTensorTool;
145 const ShowerPositionMapPair &positionMaps,
unsigned int &nSampledHits,
unsigned int &nMatchedHits)
const;
175 typedef std::vector<TensorType::ElementList::const_iterator>
IteratorList;
Header file for the algorithm class.
Header file for the lar shower overlap result class.
Header file for the lar two dimensional sliding shower fit result class.
Header file for the n view matching algorithm class.
Header file for the three view matching control class.
NViewMatchingAlgorithm class.
ShowerOverlapResult class.
std::vector< TensorType::ElementList::const_iterator > IteratorList
virtual bool Run(ThreeViewShowersAlgorithm *const pAlgorithm, TensorType &overlapTensor)=0
Run the algorithm tool.
ThreeViewShowersAlgorithm::MatchingType::TensorType TensorType
OverlapTensor< ShowerOverlapResult > TensorType
float m_minX
The min x value of the common x-overlap range.
float m_nPoints
The number of sampling points to be used.
float m_wMaxX
The max x value in the w view.
float m_uMinX
The min x value in the u view.
float m_maxX
The max x value of the common x-overlap range.
float m_vMinX
The min x value in the v view.
float m_uMaxX
The max x value in the u view.
float m_xOverlapSpan
The x-overlap span.
float m_vMaxX
The max x value in the v view.
pandora::StatusCode GetBin(const float x, int &xBin) const
Convert an x position into a sampling bin.
float m_wMinX
The min x value in the w view.
ThreeViewShowersAlgorithm class.
float m_minClusterLengthSquared
The min length (squared) in base cluster selection method.
void UpdateUponDeletion(const pandora::Cluster *const pDeletedCluster)
Update to reflect cluster deletion.
void CalculateOverlapResult(const pandora::Cluster *const pClusterU, const pandora::Cluster *const pClusterV, const pandora::Cluster *const pClusterW)
Calculate cluster overlap result and store in container.
void PrepareInputClusters(pandora::ClusterList &preparedClusterList)
Perform any preparatory steps required on the input clusters, e.g. caching expensive fit results.
void RemoveFromSlidingFitCache(const pandora::Cluster *const pCluster)
Remova an existing sliding fit result, for the specified cluster, from the algorithm cache.
TwoDSlidingShowerFitResultMap m_slidingFitResultMap
The sliding shower fit result map.
unsigned int m_slidingFitWindow
The layer window for the sliding linear fits.
void ExamineOverlapContainer()
Examine contents of overlap container, collect together best-matching 2D particles and modify cluster...
std::pair< ShowerPositionMap, ShowerPositionMap > ShowerPositionMapPair
std::vector< ShowerTensorTool * > TensorToolVector
TensorToolVector m_algorithmToolVector
The algorithm tool vector.
float m_minShowerMatchedFraction
The minimum shower matched sampling fraction to allow shower grouping.
unsigned int m_nMaxTensorToolRepeats
The maximum number of repeat loops over tensor tools.
unsigned int m_minClusterCaloHits
The min number of hits in base cluster selection method.
void GetShowerPositionMaps(const TwoDSlidingShowerFitResult &fitResultU, const TwoDSlidingShowerFitResult &fitResultV, const TwoDSlidingShowerFitResult &fitResultW, const XSampling &xSampling, ShowerPositionMapPair &positionMapsU, ShowerPositionMapPair &positionMapsV, ShowerPositionMapPair &positionMapsW) const
Get the shower position maps.
void TidyUp()
Tidy member variables in derived class.
ThreeViewShowersAlgorithm()
Default constructor.
void UpdateForNewCluster(const pandora::Cluster *const pNewCluster)
Update to reflect addition of a new cluster to the problem space.
bool m_ignoreUnavailableClusters
Whether to ignore (skip-over) unavailable clusters.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
void AddToSlidingFitCache(const pandora::Cluster *const pCluster)
Add a new sliding fit result, for the specified cluster, to the algorithm cache.
const TwoDSlidingShowerFitResult & GetCachedSlidingFitResult(const pandora::Cluster *const pCluster) const
Get a sliding shower fit result from the algorithm cache.
void GetBestHitOverlapFraction(const pandora::Cluster *const pCluster, const XSampling &xSampling, const ShowerPositionMapPair &positionMaps, unsigned int &nSampledHits, unsigned int &nMatchedHits) const
Get the best fraction of hits, in the common x-overlap range, contained within the provided pair of s...
unsigned int m_minShowerMatchedPoints
The minimum number of matched shower sampling points to allow shower grouping.
NViewMatchingAlgorithm< ThreeViewMatchingControl< ShowerOverlapResult > > BaseAlgorithm
void SelectInputClusters(const pandora::ClusterList *const pInputClusterList, pandora::ClusterList &selectedClusterList) const
Select a subset of input clusters for processing in this algorithm.
bool m_visualize
Visualize cluster matching procedure.
TwoDSlidingFitResult class.
TwoDSlidingShowerFitResult class.
std::unordered_map< const pandora::Cluster *, TwoDSlidingShowerFitResult > TwoDSlidingShowerFitResultMap
MANAGED_CONTAINER< const Cluster * > ClusterList
StatusCode
The StatusCode enum.