All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
lar_content::SimpleClusterGrowingAlgorithm Class Reference

SimpleClusterGrowingAlgorithm class. More...

#include <SimpleClusterGrowingAlgorithm.h>

Inheritance diagram for lar_content::SimpleClusterGrowingAlgorithm:
lar_content::ClusterGrowingAlgorithm

Public Member Functions

 SimpleClusterGrowingAlgorithm ()
 Default constructor. More...
 
- Public Member Functions inherited from lar_content::ClusterGrowingAlgorithm
 ClusterGrowingAlgorithm ()
 Default constructor. More...
 

Private Member Functions

void GetListOfCleanClusters (const pandora::ClusterList *const pClusterList, pandora::ClusterVector &cleanClusters) const
 Populate cluster vector with the subset of clusters judged to be clean. More...
 
void GetListOfSeedClusters (const pandora::ClusterVector &inputClusters, pandora::ClusterVector &seedClusters) const
 Select seed clusters for growing. More...
 
pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 

Private Attributes

unsigned int m_minCaloHitsPerCluster
 The minimum number of calo hits per seed cluster. More...
 

Additional Inherited Members

- Protected Types inherited from lar_content::ClusterGrowingAlgorithm
typedef std::unordered_map
< const pandora::Cluster
*, pandora::ClusterList > 
ClusterMergeMap
 
- Protected Member Functions inherited from lar_content::ClusterGrowingAlgorithm
virtual pandora::StatusCode Run ()
 

Detailed Description

SimpleClusterGrowingAlgorithm class.

Definition at line 21 of file SimpleClusterGrowingAlgorithm.h.

Constructor & Destructor Documentation

lar_content::SimpleClusterGrowingAlgorithm::SimpleClusterGrowingAlgorithm ( )

Default constructor.

Definition at line 20 of file SimpleClusterGrowingAlgorithm.cc.

21 {
22 }
unsigned int m_minCaloHitsPerCluster
The minimum number of calo hits per seed cluster.

Member Function Documentation

void lar_content::SimpleClusterGrowingAlgorithm::GetListOfCleanClusters ( const pandora::ClusterList *const  pClusterList,
pandora::ClusterVector &  cleanClusters 
) const
privatevirtual

Populate cluster vector with the subset of clusters judged to be clean.

Parameters
pClusterListaddress of the cluster list
cleanClustersthe output vector of clean clusters

Implements lar_content::ClusterGrowingAlgorithm.

Definition at line 26 of file SimpleClusterGrowingAlgorithm.cc.

27 {
28  for (ClusterList::const_iterator iter = pClusterList->begin(), iterEnd = pClusterList->end(); iter != iterEnd; ++iter)
29  {
30  const Cluster *const pCluster = *iter;
31 
32  if (!pCluster->IsAvailable())
33  continue;
34 
35  clusterVector.push_back(pCluster);
36  }
37 
38  std::sort(clusterVector.begin(), clusterVector.end(), LArClusterHelper::SortByNHits);
39 }
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.
void lar_content::SimpleClusterGrowingAlgorithm::GetListOfSeedClusters ( const pandora::ClusterVector &  cleanClusters,
pandora::ClusterVector &  seedClusters 
) const
privatevirtual

Select seed clusters for growing.

Parameters
cleanClustersthe input vector of clean clusters
seedClustersthe output vector of seed clusters

Implements lar_content::ClusterGrowingAlgorithm.

Definition at line 43 of file SimpleClusterGrowingAlgorithm.cc.

44 {
45  for (ClusterVector::const_iterator cIter = inputClusters.begin(), cIterEnd = inputClusters.end(); cIter != cIterEnd; ++cIter)
46  {
47  const Cluster *const pCluster = *cIter;
48 
49  if (pCluster->GetNCaloHits() < m_minCaloHitsPerCluster)
50  continue;
51 
52  seedClusters.push_back(pCluster);
53  }
54 
55  std::sort(seedClusters.begin(), seedClusters.end(), LArClusterHelper::SortByNHits);
56 }
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.
unsigned int m_minCaloHitsPerCluster
The minimum number of calo hits per seed cluster.
StatusCode lar_content::SimpleClusterGrowingAlgorithm::ReadSettings ( const pandora::TiXmlHandle  xmlHandle)
privatevirtual

Reimplemented from lar_content::ClusterGrowingAlgorithm.

Definition at line 60 of file SimpleClusterGrowingAlgorithm.cc.

61 {
62  PANDORA_RETURN_RESULT_IF_AND_IF(
63  STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "MinCaloHitsPerCluster", m_minCaloHitsPerCluster));
64 
65  return ClusterGrowingAlgorithm::ReadSettings(xmlHandle);
66 }
virtual pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
unsigned int m_minCaloHitsPerCluster
The minimum number of calo hits per seed cluster.

Member Data Documentation

unsigned int lar_content::SimpleClusterGrowingAlgorithm::m_minCaloHitsPerCluster
private

The minimum number of calo hits per seed cluster.

Definition at line 35 of file SimpleClusterGrowingAlgorithm.h.


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