LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
ems::bDistCentLess2D Class Reference

#include "DirOfGamma.h"

Inheritance diagram for ems::bDistCentLess2D:

Public Member Functions

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

Private Attributes

TVector2 center
 

Detailed Description

Definition at line 204 of file DirOfGamma.h.

Constructor & Destructor Documentation

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

Definition at line 208 of file DirOfGamma.h.

208 : center(c) {}

Member Function Documentation

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

Definition at line 210 of file DirOfGamma.h.

References ems::Hit2D::GetPointCm().

211  {
212  double dx = p1->GetPointCm().X() - center.X();
213  double dy = p1->GetPointCm().Y() - center.Y();
214  double b1 = dx * dx + dy * dy;
215  dx = p2->GetPointCm().X() - center.X();
216  dy = p2->GetPointCm().Y() - center.Y();
217  double b2 = dx * dx + dy * dy;
218 
219  return b1 < b2;
220  }

Member Data Documentation

TVector2 ems::bDistCentLess2D::center
private

Definition at line 223 of file DirOfGamma.h.


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