Public Member Functions | Private Attributes | List of all members
lar_content::LArHitWidthHelper::SortByHigherXExtrema Class Reference

SortByHigherExtrema class. More...

#include <LArHitWidthHelper.h>

Public Member Functions

 SortByHigherXExtrema (const ClusterToParametersMap &clusterToParametersMap)
 Constructor. More...
 
bool operator() (const pandora::Cluster *const pLhs, const pandora::Cluster *const pRhs)
 Sort clusters by the higher x extremal point of their constituent hits. More...
 

Private Attributes

const ClusterToParametersMapm_clusterToParametersMap
 The map [cluster -> cluster parameters]. More...
 

Detailed Description

SortByHigherExtrema class.

Definition at line 165 of file LArHitWidthHelper.h.

Constructor & Destructor Documentation

lar_content::LArHitWidthHelper::SortByHigherXExtrema::SortByHigherXExtrema ( const ClusterToParametersMap clusterToParametersMap)
inline

Constructor.

Parameters
clusterToParametersMapthe map [cluster -> cluster parameters]

Definition at line 383 of file LArHitWidthHelper.h.

383  :
384  m_clusterToParametersMap(clusterToParametersMap)
385 {
386 }
const ClusterToParametersMap & m_clusterToParametersMap
The map [cluster -> cluster parameters].

Member Function Documentation

bool lar_content::LArHitWidthHelper::SortByHigherXExtrema::operator() ( const pandora::Cluster *const  pLhs,
const pandora::Cluster *const  pRhs 
)

Sort clusters by the higher x extremal point of their constituent hits.

Parameters
pLhsfirst cluster
pRhssecond cluster
Returns
whether the pLhs cluster has a lower higherXExtrema than the pRhs cluster

Definition at line 63 of file LArHitWidthHelper.cc.

64 {
65  const LArHitWidthHelper::ClusterParameters &lhsClusterParameters(LArHitWidthHelper::GetClusterParameters(pLhs, m_clusterToParametersMap));
66  const LArHitWidthHelper::ClusterParameters &rhsClusterParameters(LArHitWidthHelper::GetClusterParameters(pRhs, m_clusterToParametersMap));
67 
68  return (lhsClusterParameters.GetHigherXExtrema().GetX() < rhsClusterParameters.GetHigherXExtrema().GetX());
69 }
static const ClusterParameters & GetClusterParameters(const pandora::Cluster *const pCluster, const ClusterToParametersMap &clusterToParametersMap)
Return the cluster parameters of a given cluster, exception thrown if not found in map [cluster -> cl...
const ClusterToParametersMap & m_clusterToParametersMap
The map [cluster -> cluster parameters].

Member Data Documentation

const ClusterToParametersMap& lar_content::LArHitWidthHelper::SortByHigherXExtrema::m_clusterToParametersMap
private

The map [cluster -> cluster parameters].

Definition at line 186 of file LArHitWidthHelper.h.


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