LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
pma::bTrack3DLonger Struct Reference

#include "Utilities.h"

Inheritance diagram for pma::bTrack3DLonger:

Public Member Functions

bool operator() (const pma::TrkCandidate &t1, const pma::TrkCandidate &t2)
 

Detailed Description

Definition at line 85 of file Utilities.h.

Member Function Documentation

bool pma::bTrack3DLonger::operator() ( const pma::TrkCandidate t1,
const pma::TrkCandidate t2 
)

Definition at line 341 of file Utilities.cxx.

References pma::Track3D::back(), pma::Dist2(), pma::Track3D::front(), pma::Hit3D::Point3D(), and pma::TrkCandidate::Track().

342 {
343  pma::Track3D* trk1 = t1.Track();
344  pma::Track3D* trk2 = t2.Track();
345  if (trk1 && trk2)
346  {
347  double l1 = pma::Dist2(trk1->front()->Point3D(), trk1->back()->Point3D());
348  double l2 = pma::Dist2(trk2->front()->Point3D(), trk2->back()->Point3D());
349  return l1 > l2;
350  }
351  else return false;
352 }
double Dist2(const TVector2 &v1, const TVector2 &v2)
Definition: Utilities.cxx:19
pma::Hit3D *& back()
Definition: PmaTrack3D.h:74
TVector3 const & Point3D(void) const
Definition: PmaHit3D.h:48
pma::Hit3D *& front()
Definition: PmaTrack3D.h:72
pma::Track3D * Track(void) const

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