8 #ifndef LAR_HIT_WIDTH_HELPER_H 9 #define LAR_HIT_WIDTH_HELPER_H 1 11 #include "Objects/Cluster.h" 35 ConstituentHit(
const pandora::CartesianVector &positionVector,
const float hitWidth,
const pandora::Cluster *
const pParentClusterAddress);
105 ClusterParameters(
const pandora::Cluster *
const pCluster,
const float maxConsituentHitWidth,
const bool isUniformHits,
106 const float hitWidthScalingFactor);
118 ClusterParameters(
const pandora::Cluster *
const pCluster,
const unsigned int numCaloHits,
const float totalWeight,
119 const ConstituentHitVector &constituentHitVector,
const pandora::CartesianVector &lowerXExtrema,
120 const pandora::CartesianVector &higherXExtrema);
125 const pandora::Cluster *GetClusterAddress()
const;
130 unsigned int GetNumCaloHits()
const;
135 float GetTotalWeight()
const;
140 const ConstituentHitVector &GetConstituentHitVector()
const;
145 const pandora::CartesianVector &GetLowerXExtrema()
const;
150 const pandora::CartesianVector &GetHigherXExtrema()
const;
184 bool operator()(
const pandora::Cluster *
const pLhs,
const pandora::Cluster *
const pRhs);
210 const pandora::Cluster *
const pCluster,
const float maxConstituentHitWidth,
const float hitWidthScalingFactor);
224 const pandora::Cluster *
const pCluster,
const float maxConstituentHitWidth,
const float hitWidthScalingFactor,
const bool isUniform);
236 static void SplitHitIntoConstituents(
const pandora::CaloHit *
const pCaloHit,
const pandora::Cluster *
const pCluster,
237 const unsigned int numberOfConstituentHits,
const float constituentHitWidth, ConstituentHitVector &constituentHitVector);
291 static void GetExtremalCoordinatesX(
const ConstituentHitVector &constituentHitVector, pandora::CartesianVector &lowerXCoordinate,
292 pandora::CartesianVector &higherXCoordinate);
304 const pandora::CartesianVector &lineStart,
const pandora::CartesianVector &lineDirection,
const pandora::CaloHit *
const pCaloHit);
324 static float GetClosestDistance(
const pandora::CaloHit *
const pThisCaloHit,
const pandora::CaloHitList &caloHitList);
334 static float GetClosestDistance(
const pandora::CaloHit *
const pCaloHit1,
const pandora::CaloHit *
const pCaloHit2);
370 return m_numCaloHits;
377 return m_totalWeight;
384 return m_constituentHitVector;
391 return m_lowerXExtrema;
398 return m_higherXExtrema;
405 m_clusterToParametersMap(clusterToParametersMap)
411 #endif // #ifndef LAR_HIT_WIDTH_HELPER_H const float m_totalWeight
The total hit weight of the contituent hits.
const pandora::CartesianVector & GetLowerXExtrema() const
Returns the lower x extremal point of the constituent hits.
static float GetOriginalTotalClusterWeight(const pandora::Cluster *const pCluster)
Sum the widths of the original, unscaled hits contained within a cluster.
const pandora::CartesianVector m_higherXExtrema
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...
const pandora::Cluster * GetClusterAddress() const
Returns the address of the cluster.
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.
const pandora::CartesianVector m_lowerXExtrema
The lower x extremal point of the constituent hits.
SortByHigherXExtrema(const ClusterToParametersMap &clusterToParametersMap)
Constructor.
SortByDistanceToPoint class.
static void GetExtremalCoordinatesX(const ConstituentHitVector &constituentHitVector, pandora::CartesianVector &lowerXCoordinate, pandora::CartesianVector &higherXCoordinate)
Calculate the higher and lower x extremal points of the constituent hits.
const pandora::Cluster * GetParentClusterAddress() const
Returns the address of the parent cluster.
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 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.
float m_hitWidth
The width of the constituent hit.
SortByDistanceToPoint(const pandora::CartesianVector referencePoint)
Constructor.
SortByHigherExtrema class.
pandora::CartesianVector m_positionVector
The central position of the consituent hit.
unsigned int GetNumCaloHits() const
Returns the number of calo hits within the cluster.
const ClusterToParametersMap & m_clusterToParametersMap
The map [cluster -> cluster parameters].
const pandora::CartesianVector & GetPositionVector() const
Returns the constituent hit central position.
const pandora::CartesianVector & GetHigherXExtrema() const
Returns the higher x extremal point of the constituent hits.
std::vector< ConstituentHit > ConstituentHitVector
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.
static pandora::CartesianPointVector GetConstituentHitPositionVector(const ConstituentHitVector &constituentHitVector)
Obtain a vector of the contituent hit central positions.
float GetTotalWeight() const
Returns the total weight of the constituent hits.
static pandora::CartesianVector GetExtremalCoordinatesLowerX(const ConstituentHitVector &constituentHitVector)
Return the lower x extremal point of the constituent hits.
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...
ConstituentHit(const pandora::CartesianVector &positionVector, const float hitWidth, const pandora::Cluster *const pParentClusterAddress)
Constructor.
static pandora::CartesianVector GetExtremalCoordinatesHigherX(const ConstituentHitVector &constituentHitVector)
Return the higher x extremal point of the constituent hits.
const pandora::CartesianVector m_referencePoint
The point relative to which constituent hits are ordered.
bool operator()(const ConstituentHit &lhs, const ConstituentHit &rhs)
Sort constituent hits by their position relative to a referencePoint.
const unsigned int m_numCaloHits
The number of calo hits within the cluster.
const pandora::Cluster * m_pCluster
The address of the cluster.
const ConstituentHitVector m_constituentHitVector
The vector of constituent hits.
std::unordered_map< const pandora::Cluster *, const ClusterParameters > ClusterToParametersMap
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...
const ConstituentHitVector & GetConstituentHitVector() const
Returns the vector of constituent hits.
float GetHitWidth() const
Returns the constituent hit width.
const pandora::Cluster * m_pParentClusterAddress
The address of the cluster the constituent hit belongs to.