LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
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 166 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 404 of file LArHitWidthHelper.h.

404  :
405  m_clusterToParametersMap(clusterToParametersMap)
406 {
407 }
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.

References lar_content::LArHitWidthHelper::GetClusterParameters(), and lar_content::LArHitWidthHelper::ClusterParameters::GetHigherXExtrema().

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 187 of file LArHitWidthHelper.h.


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