LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
lar_content::SlidingConeClusterMopUpAlgorithm::ClusterMerge Class Reference

ClusterMerge class. More...

Public Member Functions

 ClusterMerge (const pandora::Cluster *const pParentCluster, const float boundedFraction, const float meanRT)
 Constructor. More...
 
const pandora::Cluster * GetParentCluster () const
 Get the address of the candidate parent (shower) cluster. More...
 
float GetBoundedFraction () const
 Get the bounded fraction for algorithm-specified cone angle. More...
 
float GetMeanRT () const
 Get the mean transverse distance of all hits (whether contained or not) More...
 
bool operator< (const ClusterMerge &rhs) const
 operator < More...
 

Private Attributes

const pandora::Cluster * m_pParentCluster
 The address of the candidate parent (shower) cluster. More...
 
float m_boundedFraction
 The bounded fraction for algorithm-specified cone angle. More...
 
float m_meanRT
 The mean transverse distance of all hits (whether contained or not) More...
 

Detailed Description

ClusterMerge class.

Definition at line 33 of file SlidingConeClusterMopUpAlgorithm.h.

Constructor & Destructor Documentation

lar_content::SlidingConeClusterMopUpAlgorithm::ClusterMerge::ClusterMerge ( const pandora::Cluster *const  pParentCluster,
const float  boundedFraction,
const float  meanRT 
)
inline

Constructor.

Parameters
pParentClusterthe address of the candidate parent (shower) cluster
boundedFraction1the bounded fraction for algorithm-specified cone angle
meanRTthe mean transverse distance of all hits (whether contained or not)

Definition at line 149 of file SlidingConeClusterMopUpAlgorithm.h.

150  :
151  m_pParentCluster(pParentCluster),
152  m_boundedFraction(boundedFraction),
153  m_meanRT(meanRT)
154 {
155 }
float m_boundedFraction
The bounded fraction for algorithm-specified cone angle.
float m_meanRT
The mean transverse distance of all hits (whether contained or not)
const pandora::Cluster * m_pParentCluster
The address of the candidate parent (shower) cluster.

Member Function Documentation

float lar_content::SlidingConeClusterMopUpAlgorithm::ClusterMerge::GetBoundedFraction ( ) const
inline

Get the bounded fraction for algorithm-specified cone angle.

Returns
the bounded fraction for algorithm-specified cone angle

Definition at line 166 of file SlidingConeClusterMopUpAlgorithm.h.

References m_boundedFraction.

Referenced by lar_content::SlidingConeClusterMopUpAlgorithm::GetClusterMergeMap(), and operator<().

167 {
168  return m_boundedFraction;
169 }
float m_boundedFraction
The bounded fraction for algorithm-specified cone angle.
float lar_content::SlidingConeClusterMopUpAlgorithm::ClusterMerge::GetMeanRT ( ) const
inline

Get the mean transverse distance of all hits (whether contained or not)

Returns
the mean transverse distance of all hits (whether contained or not)

Definition at line 173 of file SlidingConeClusterMopUpAlgorithm.h.

References m_meanRT.

Referenced by operator<().

174 {
175  return m_meanRT;
176 }
float m_meanRT
The mean transverse distance of all hits (whether contained or not)
const pandora::Cluster * lar_content::SlidingConeClusterMopUpAlgorithm::ClusterMerge::GetParentCluster ( ) const
inline

Get the address of the candidate parent (shower) cluster.

Returns
the address of the candidate parent (shower) cluster

Definition at line 159 of file SlidingConeClusterMopUpAlgorithm.h.

References m_pParentCluster.

Referenced by lar_content::SlidingConeClusterMopUpAlgorithm::GetClusterMergeMap(), and operator<().

160 {
161  return m_pParentCluster;
162 }
const pandora::Cluster * m_pParentCluster
The address of the candidate parent (shower) cluster.
bool lar_content::SlidingConeClusterMopUpAlgorithm::ClusterMerge::operator< ( const ClusterMerge rhs) const

operator <

Parameters
rhsobject for comparison
Returns
boolean

Definition at line 242 of file SlidingConeClusterMopUpAlgorithm.cc.

References GetBoundedFraction(), GetMeanRT(), lar_content::PfoMopUpBaseAlgorithm::GetParentCluster(), GetParentCluster(), and lar_content::LArClusterHelper::SortByNHits().

243 {
244  if (!this->GetParentCluster() && !rhs.GetParentCluster())
245  return false;
246 
247  if (this->GetParentCluster() && !rhs.GetParentCluster())
248  return true;
249 
250  if (!this->GetParentCluster() && rhs.GetParentCluster())
251  return false;
252 
253  if (std::fabs(this->GetBoundedFraction() - rhs.GetBoundedFraction()) > std::numeric_limits<float>::epsilon())
254  return (this->GetBoundedFraction() > rhs.GetBoundedFraction());
255 
256  if (std::fabs(this->GetMeanRT() - rhs.GetMeanRT()) > std::numeric_limits<float>::epsilon())
257  return (this->GetMeanRT() < rhs.GetMeanRT());
258 
259  return LArClusterHelper::SortByNHits(this->GetParentCluster(), rhs.GetParentCluster());
260 }
static bool SortByNHits(const pandora::Cluster *const pLhs, const pandora::Cluster *const pRhs)
Sort clusters by number of hits, then layer span, then inner layer, then position, then pulse-height.
const pandora::Cluster * GetParentCluster() const
Get the address of the candidate parent (shower) cluster.
float GetMeanRT() const
Get the mean transverse distance of all hits (whether contained or not)
float GetBoundedFraction() const
Get the bounded fraction for algorithm-specified cone angle.

Member Data Documentation

float lar_content::SlidingConeClusterMopUpAlgorithm::ClusterMerge::m_boundedFraction
private

The bounded fraction for algorithm-specified cone angle.

Definition at line 77 of file SlidingConeClusterMopUpAlgorithm.h.

Referenced by GetBoundedFraction().

float lar_content::SlidingConeClusterMopUpAlgorithm::ClusterMerge::m_meanRT
private

The mean transverse distance of all hits (whether contained or not)

Definition at line 78 of file SlidingConeClusterMopUpAlgorithm.h.

Referenced by GetMeanRT().

const pandora::Cluster* lar_content::SlidingConeClusterMopUpAlgorithm::ClusterMerge::m_pParentCluster
private

The address of the candidate parent (shower) cluster.

Definition at line 76 of file SlidingConeClusterMopUpAlgorithm.h.

Referenced by GetParentCluster().


The documentation for this class was generated from the following files: