Public Member Functions | List of all members
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 104 of file Utilities.h.

Member Function Documentation

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

Definition at line 338 of file Utilities.cxx.

339 {
340  pma::Track3D* trk1 = t1.Track();
341  pma::Track3D* trk2 = t2.Track();
342  if (trk1 && trk2) {
343  double l1 = pma::Dist2(trk1->front()->Point3D(), trk1->back()->Point3D());
344  double l2 = pma::Dist2(trk2->front()->Point3D(), trk2->back()->Point3D());
345  return l1 > l2;
346  }
347  else
348  return false;
349 }
double Dist2(const TVector2 &v1, const TVector2 &v2)
Definition: Utilities.cxx:37
pma::Hit3D const * front() const
Definition: PmaTrack3D.h:98
TVector3 const & Point3D() const
Definition: PmaHit3D.h:55
pma::Hit3D const * back() const
Definition: PmaTrack3D.h:103
pma::Track3D * Track() const

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