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);
104 ClusterParameters(
const pandora::Cluster *
const pCluster,
const float maxConsituentHitWidth,
const bool isUniformHits,
105 const float hitWidthScalingFactor);
117 ClusterParameters(
const pandora::Cluster *
const pCluster,
const unsigned int numCaloHits,
const float totalWeight,
118 const ConstituentHitVector &constituentHitVector,
const pandora::CartesianVector &lowerXExtrema,
119 const pandora::CartesianVector &higherXExtrema);
124 const pandora::Cluster *GetClusterAddress()
const;
129 unsigned int GetNumCaloHits()
const;
134 float GetTotalWeight()
const;
139 const ConstituentHitVector &GetConstituentHitVector()
const;
144 const pandora::CartesianVector &GetLowerXExtrema()
const;
149 const pandora::CartesianVector &GetHigherXExtrema()
const;
183 bool operator()(
const pandora::Cluster *
const pLhs,
const pandora::Cluster *
const pRhs);
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);
235 static void SplitHitIntoConstituents(
const pandora::CaloHit *
const pCaloHit,
const pandora::Cluster *
const pCluster,
236 const unsigned int numberOfConstituentHits,
const float constituentHitWidth, ConstituentHitVector &constituentHitVector);
290 static void GetExtremalCoordinatesX(
const ConstituentHitVector &constituentHitVector, pandora::CartesianVector &lowerXCoordinate,
291 pandora::CartesianVector &higherXCoordinate);
303 const pandora::CartesianVector &lineStart,
const pandora::CartesianVector &lineDirection,
const pandora::CaloHit *
const pCaloHit);
349 return m_numCaloHits;
356 return m_totalWeight;
363 return m_constituentHitVector;
370 return m_lowerXExtrema;
377 return m_higherXExtrema;
384 m_clusterToParametersMap(clusterToParametersMap)
390 #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
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.