LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
lar_content::SlidingConePfoMopUpAlgorithm::ClusterMerge Class Reference

ClusterMerge class. More...

Public Member Functions

 ClusterMerge (const pandora::Cluster *const pParentCluster, const float boundedFraction1, const float boundedFraction2)
 Constructor. More...
 
const pandora::Cluster * GetParentCluster () const
 Get the address of the candidate parent (shower) cluster. More...
 
float GetBoundedFraction1 () const
 Get the bounded fraction for algorithm-specified cone angle 1. More...
 
float GetBoundedFraction2 () const
 Get the bounded fraction for algorithm-specified cone angle 2. 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_boundedFraction1
 The bounded fraction for algorithm-specified cone angle 1. More...
 
float m_boundedFraction2
 The bounded fraction for algorithm-specified cone angle 2. More...
 

Detailed Description

ClusterMerge class.

Definition at line 33 of file SlidingConePfoMopUpAlgorithm.h.

Constructor & Destructor Documentation

lar_content::SlidingConePfoMopUpAlgorithm::ClusterMerge::ClusterMerge ( const pandora::Cluster *const  pParentCluster,
const float  boundedFraction1,
const float  boundedFraction2 
)
inline

Constructor.

Parameters
pParentClusterthe address of the candidate parent (shower) cluster
boundedFraction1the bounded fraction for algorithm-specified cone angle 1
boundedFraction2the bounded fraction for algorithm-specified cone angle 2

Definition at line 176 of file SlidingConePfoMopUpAlgorithm.h.

176  :
177  m_pParentCluster(pParentCluster),
178  m_boundedFraction1(boundedFraction1),
179  m_boundedFraction2(boundedFraction2)
180 {
181 }
float m_boundedFraction1
The bounded fraction for algorithm-specified cone angle 1.
float m_boundedFraction2
The bounded fraction for algorithm-specified cone angle 2.
const pandora::Cluster * m_pParentCluster
The address of the candidate parent (shower) cluster.

Member Function Documentation

float lar_content::SlidingConePfoMopUpAlgorithm::ClusterMerge::GetBoundedFraction1 ( ) const
inline

Get the bounded fraction for algorithm-specified cone angle 1.

Returns
the bounded fraction for algorithm-specified cone angle 1

Definition at line 192 of file SlidingConePfoMopUpAlgorithm.h.

References m_boundedFraction1.

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

193 {
194  return m_boundedFraction1;
195 }
float m_boundedFraction1
The bounded fraction for algorithm-specified cone angle 1.
float lar_content::SlidingConePfoMopUpAlgorithm::ClusterMerge::GetBoundedFraction2 ( ) const
inline

Get the bounded fraction for algorithm-specified cone angle 2.

Returns
the bounded fraction for algorithm-specified cone angle 2

Definition at line 199 of file SlidingConePfoMopUpAlgorithm.h.

References m_boundedFraction2.

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

200 {
201  return m_boundedFraction2;
202 }
float m_boundedFraction2
The bounded fraction for algorithm-specified cone angle 2.
const pandora::Cluster * lar_content::SlidingConePfoMopUpAlgorithm::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 185 of file SlidingConePfoMopUpAlgorithm.h.

References m_pParentCluster.

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

186 {
187  return m_pParentCluster;
188 }
const pandora::Cluster * m_pParentCluster
The address of the candidate parent (shower) cluster.
bool lar_content::SlidingConePfoMopUpAlgorithm::ClusterMerge::operator< ( const ClusterMerge rhs) const

operator <

Parameters
rhsobject for comparison
Returns
boolean

Definition at line 275 of file SlidingConePfoMopUpAlgorithm.cc.

References GetBoundedFraction1(), GetBoundedFraction2(), lar_content::PfoMopUpBaseAlgorithm::GetParentCluster(), GetParentCluster(), and lar_content::LArClusterHelper::SortByNHits().

276 {
277  if (!this->GetParentCluster() && !rhs.GetParentCluster())
278  return false;
279 
280  if (this->GetParentCluster() && !rhs.GetParentCluster())
281  return true;
282 
283  if (!this->GetParentCluster() && rhs.GetParentCluster())
284  return false;
285 
286  if (std::fabs(this->GetBoundedFraction1() - rhs.GetBoundedFraction1()) > std::numeric_limits<float>::epsilon())
287  return (this->GetBoundedFraction1() > rhs.GetBoundedFraction1());
288 
289  if (std::fabs(this->GetBoundedFraction2() - rhs.GetBoundedFraction2()) > std::numeric_limits<float>::epsilon())
290  return (this->GetBoundedFraction2() > rhs.GetBoundedFraction2());
291 
292  return LArClusterHelper::SortByNHits(this->GetParentCluster(), rhs.GetParentCluster());
293 }
float GetBoundedFraction2() const
Get the bounded fraction for algorithm-specified cone angle 2.
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.
float GetBoundedFraction1() const
Get the bounded fraction for algorithm-specified cone angle 1.
const pandora::Cluster * GetParentCluster() const
Get the address of the candidate parent (shower) cluster.

Member Data Documentation

float lar_content::SlidingConePfoMopUpAlgorithm::ClusterMerge::m_boundedFraction1
private

The bounded fraction for algorithm-specified cone angle 1.

Definition at line 77 of file SlidingConePfoMopUpAlgorithm.h.

Referenced by GetBoundedFraction1().

float lar_content::SlidingConePfoMopUpAlgorithm::ClusterMerge::m_boundedFraction2
private

The bounded fraction for algorithm-specified cone angle 2.

Definition at line 78 of file SlidingConePfoMopUpAlgorithm.h.

Referenced by GetBoundedFraction2().

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

The address of the candidate parent (shower) cluster.

Definition at line 76 of file SlidingConePfoMopUpAlgorithm.h.

Referenced by GetParentCluster().


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