8#ifndef LAR_HIT_WIDTH_HELPER_H
9#define LAR_HIT_WIDTH_HELPER_H 1
105 const float hitWidthScalingFactor);
209 const pandora::Cluster *
const pCluster,
const float maxConstituentHitWidth,
const float hitWidthScalingFactor);
223 const pandora::Cluster *
const pCluster,
const float maxConstituentHitWidth,
const float hitWidthScalingFactor,
const bool isUniform);
236 const unsigned int numberOfConstituentHits,
const float constituentHitWidth,
ConstituentHitVector &constituentHitVector);
354 return m_pParentClusterAddress;
369 return m_numCaloHits;
376 return m_totalWeight;
383 return m_constituentHitVector;
390 return m_lowerXExtrema;
397 return m_higherXExtrema;
404 m_clusterToParametersMap(clusterToParametersMap)
Header file for the cluster class.
const pandora::CartesianVector m_lowerXExtrema
The lower x extremal point of the constituent hits.
const pandora::CartesianVector m_higherXExtrema
The higher x extremal point of the constituent hits.
const pandora::CartesianVector & GetHigherXExtrema() const
Returns the higher x extremal point of the constituent hits.
float GetTotalWeight() const
Returns the total weight of the constituent hits.
const ConstituentHitVector m_constituentHitVector
The vector of constituent hits.
const float m_totalWeight
The total hit weight of the contituent hits.
const unsigned int m_numCaloHits
The number of calo hits within the cluster.
unsigned int GetNumCaloHits() const
Returns the number of calo hits within the cluster.
const pandora::CartesianVector & GetLowerXExtrema() const
Returns the lower x extremal point of the constituent hits.
const ConstituentHitVector & GetConstituentHitVector() const
Returns the vector of constituent hits.
const pandora::Cluster * GetClusterAddress() const
Returns the address of the cluster.
const pandora::Cluster * m_pCluster
The address of the cluster.
SortByDistanceToPoint class.
SortByDistanceToPoint(const pandora::CartesianVector referencePoint)
Constructor.
bool operator()(const ConstituentHit &lhs, const ConstituentHit &rhs)
Sort constituent hits by their position relative to a referencePoint.
const pandora::CartesianVector m_referencePoint
The point relative to which constituent hits are ordered.
float GetHitWidth() const
Returns the constituent hit width.
float m_hitWidth
The width of the constituent hit.
const pandora::Cluster * GetParentClusterAddress() const
Returns the address of the parent cluster.
const pandora::Cluster * m_pParentClusterAddress
The address of the cluster the constituent hit belongs to.
pandora::CartesianVector m_positionVector
The central position of the consituent hit.
const pandora::CartesianVector & GetPositionVector() const
Returns the constituent hit central position.
SortByHigherExtrema class.
bool operator()(const pandora::Cluster *const pLhs, const pandora::Cluster *const pRhs)
Sort clusters by the higher x extremal point of their constituent hits.
const ClusterToParametersMap & m_clusterToParametersMap
The map [cluster -> cluster parameters].
SortByHigherXExtrema(const ClusterToParametersMap &clusterToParametersMap)
Constructor.
static void GetExtremalCoordinatesX(const ConstituentHitVector &constituentHitVector, pandora::CartesianVector &lowerXCoordinate, pandora::CartesianVector &higherXCoordinate)
Calculate the higher and lower x extremal points of the constituent hits.
static unsigned int GetNProposedConstituentHits(const pandora::Cluster *const pCluster, const float maxConstituentHitWidth, const float hitWidthScalingFactor)
Return the number of constituent hits that a given cluster would be broken into.
std::vector< ConstituentHit > ConstituentHitVector
static void SplitHitIntoConstituents(const pandora::CaloHit *const pCaloHit, const pandora::Cluster *const pCluster, const unsigned int numberOfConstituentHits, const float constituentHitWidth, ConstituentHitVector &constituentHitVector)
Break up the calo hit into constituent hits.
std::unordered_map< const pandora::Cluster *, const ClusterParameters > ClusterToParametersMap
static pandora::CartesianPointVector GetConstituentHitPositionVector(const ConstituentHitVector &constituentHitVector)
Obtain a vector of the contituent hit central positions.
static pandora::CartesianVector GetExtremalCoordinatesHigherX(const ConstituentHitVector &constituentHitVector)
Return the higher x extremal point of the constituent hits.
static const ClusterParameters & GetClusterParameters(const pandora::Cluster *const pCluster, const ClusterToParametersMap &clusterToParametersMap)
Return the cluster parameters of a given cluster, exception thrown if not found in map [cluster -> cl...
static float GetOriginalTotalClusterWeight(const pandora::Cluster *const pCluster)
Sum the widths of the original, unscaled hits contained within a cluster.
static pandora::CartesianVector GetClosestPointToLine2D(const pandora::CartesianVector &lineStart, const pandora::CartesianVector &lineDirection, const pandora::CaloHit *const pCaloHit)
Consider the hit width to find the closest position of a calo hit to a specified line.
static ConstituentHitVector GetConstituentHits(const pandora::Cluster *const pCluster, const float maxConstituentHitWidth, const float hitWidthScalingFactor, const bool isUniform)
Break up the cluster hits into constituent hits.
static float GetClosestDistance(const pandora::CaloHit *const pThisCaloHit, const pandora::CaloHitList &caloHitList)
Find the smallest separation between a hit and a list of hits, with the consideration of their hit wi...
static float GetTotalClusterWeight(const ConstituentHitVector &constituentHitVector)
Sum the widths of constituent hits.
static float GetClosestDistanceToPoint2D(const pandora::CaloHit *const pCaloHit, const pandora::CartesianVector &point2D)
Consider the hit width to find the smallest distance between a calo hit and a given point.
static pandora::CartesianVector GetExtremalCoordinatesLowerX(const ConstituentHitVector &constituentHitVector)
Return the lower x extremal point of the constituent hits.
std::vector< CartesianVector > CartesianPointVector
MANAGED_CONTAINER< const CaloHit * > CaloHitList