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

177  :
178  m_pParentCluster(pParentCluster),
179  m_boundedFraction1(boundedFraction1),
180  m_boundedFraction2(boundedFraction2)
181 {
182 }
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 193 of file SlidingConePfoMopUpAlgorithm.h.

References m_boundedFraction1.

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

194 {
195  return m_boundedFraction1;
196 }
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 200 of file SlidingConePfoMopUpAlgorithm.h.

References m_boundedFraction2.

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

201 {
202  return m_boundedFraction2;
203 }
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 186 of file SlidingConePfoMopUpAlgorithm.h.

References m_pParentCluster.

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

187 {
188  return m_pParentCluster;
189 }
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 306 of file SlidingConePfoMopUpAlgorithm.cc.

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

307 {
308  if (!this->GetParentCluster() && !rhs.GetParentCluster())
309  return false;
310 
311  if (this->GetParentCluster() && !rhs.GetParentCluster())
312  return true;
313 
314  if (!this->GetParentCluster() && rhs.GetParentCluster())
315  return false;
316 
317  if (std::fabs(this->GetBoundedFraction1() - rhs.GetBoundedFraction1()) > std::numeric_limits<float>::epsilon())
318  return (this->GetBoundedFraction1() > rhs.GetBoundedFraction1());
319 
320  if (std::fabs(this->GetBoundedFraction2() - rhs.GetBoundedFraction2()) > std::numeric_limits<float>::epsilon())
321  return (this->GetBoundedFraction2() > rhs.GetBoundedFraction2());
322 
323  return LArClusterHelper::SortByNHits(this->GetParentCluster(), rhs.GetParentCluster());
324 }
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: