LArSoft  v07_13_02
Liquid Argon Software toolkit - http://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.

149  :
150  m_pParentCluster(pParentCluster),
151  m_boundedFraction(boundedFraction),
152  m_meanRT(meanRT)
153 {
154 }
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 165 of file SlidingConeClusterMopUpAlgorithm.h.

References m_boundedFraction.

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

166 {
167  return m_boundedFraction;
168 }
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 172 of file SlidingConeClusterMopUpAlgorithm.h.

References m_meanRT.

Referenced by operator<().

173 {
174  return m_meanRT;
175 }
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 158 of file SlidingConeClusterMopUpAlgorithm.h.

References m_pParentCluster.

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

159 {
160  return m_pParentCluster;
161 }
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 231 of file SlidingConeClusterMopUpAlgorithm.cc.

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

232 {
233  if (!this->GetParentCluster() && !rhs.GetParentCluster())
234  return false;
235 
236  if (this->GetParentCluster() && !rhs.GetParentCluster())
237  return true;
238 
239  if (!this->GetParentCluster() && rhs.GetParentCluster())
240  return false;
241 
242  if (std::fabs(this->GetBoundedFraction() - rhs.GetBoundedFraction()) > std::numeric_limits<float>::epsilon())
243  return (this->GetBoundedFraction() > rhs.GetBoundedFraction());
244 
245  if (std::fabs(this->GetMeanRT() - rhs.GetMeanRT()) > std::numeric_limits<float>::epsilon())
246  return (this->GetMeanRT() < rhs.GetMeanRT());
247 
248  return LArClusterHelper::SortByNHits(this->GetParentCluster(), rhs.GetParentCluster());
249 }
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: