LArSoft  v09_93_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 177 of file SlidingConePfoMopUpAlgorithm.h.

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

References m_boundedFraction1.

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

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

References m_boundedFraction2.

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

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

References m_pParentCluster.

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

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

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

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