LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
ems::bDistCentLess2D Class Reference

#include "DirOfGamma.h"

Public Member Functions

 bDistCentLess2D (const TVector2 &c)
 
bool operator() (Hit2D *p1, Hit2D *p2) const
 

Private Attributes

TVector2 center
 

Detailed Description

Definition at line 211 of file DirOfGamma.h.

Constructor & Destructor Documentation

ems::bDistCentLess2D::bDistCentLess2D ( const TVector2 &  c)
inline

Definition at line 213 of file DirOfGamma.h.

213 : center(c) {}

Member Function Documentation

bool ems::bDistCentLess2D::operator() ( Hit2D p1,
Hit2D p2 
) const
inline

Definition at line 215 of file DirOfGamma.h.

References ems::Hit2D::GetPointCm().

216  {
217  double dx = p1->GetPointCm().X() - center.X();
218  double dy = p1->GetPointCm().Y() - center.Y();
219  double b1 = dx * dx + dy * dy;
220  dx = p2->GetPointCm().X() - center.X();
221  dy = p2->GetPointCm().Y() - center.Y();
222  double b2 = dx * dx + dy * dy;
223 
224  return b1 < b2;
225  }

Member Data Documentation

TVector2 ems::bDistCentLess2D::center
private

Definition at line 228 of file DirOfGamma.h.


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