LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
lar_content::ThreeDChargeFeatureTool::VertexComparator Class Reference

VertexComparator class for comparison of two points wrt neutrino vertex position. More...

#include "TrackShowerIdFeatureTool.h"

Public Member Functions

 VertexComparator (const pandora::CartesianVector vertexPosition2D)
 Constructor. More...
 
bool operator() (const pandora::CaloHit *const left, const pandora::CaloHit *const right) const
 operator < More...
 

Public Attributes

pandora::CartesianVector m_neutrinoVertex
 

Detailed Description

VertexComparator class for comparison of two points wrt neutrino vertex position.

Definition at line 236 of file TrackShowerIdFeatureTool.h.

Constructor & Destructor Documentation

lar_content::ThreeDChargeFeatureTool::VertexComparator::VertexComparator ( const pandora::CartesianVector  vertexPosition2D)

Constructor.

Definition at line 745 of file TrackShowerIdFeatureTool.cc.

745  :
746  m_neutrinoVertex(vertexPosition2D)
747 {
748 }

Member Function Documentation

bool lar_content::ThreeDChargeFeatureTool::VertexComparator::operator() ( const pandora::CaloHit *const  left,
const pandora::CaloHit *const  right 
) const

operator <

Parameters
rhsobject for comparison
Returns
boolean

Definition at line 752 of file TrackShowerIdFeatureTool.cc.

References m_neutrinoVertex.

753 {
754  float distanceL((left->GetPositionVector()-m_neutrinoVertex).GetMagnitudeSquared());
755  float distanceR((right->GetPositionVector()-m_neutrinoVertex).GetMagnitudeSquared());
756  return distanceL < distanceR;
757 }
constexpr auto const & right(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:112
constexpr auto const & left(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:104

Member Data Documentation

pandora::CartesianVector lar_content::ThreeDChargeFeatureTool::VertexComparator::m_neutrinoVertex

Definition at line 253 of file TrackShowerIdFeatureTool.h.

Referenced by operator()().


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