LArSoft  v09_90_00
Liquid Argon Software toolkit - https://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 349 of file TrackShowerIdFeatureTool.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 1212 of file TrackShowerIdFeatureTool.cc.

1212  :
1213  m_neutrinoVertex(vertexPosition2D)
1214 {
1215 }

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 1219 of file TrackShowerIdFeatureTool.cc.

References m_neutrinoVertex.

1220 {
1221  const float distanceL((left->GetPositionVector() - m_neutrinoVertex).GetMagnitudeSquared());
1222  const float distanceR((right->GetPositionVector() - m_neutrinoVertex).GetMagnitudeSquared());
1223  return distanceL < distanceR;
1224 }
constexpr auto const & right(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:102
constexpr auto const & left(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:94

Member Data Documentation

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

Definition at line 366 of file TrackShowerIdFeatureTool.h.

Referenced by operator()().


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