All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 107 of file larreco/larreco/RecoAlg/PMAlg/Utilities.h.

Member Function Documentation

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

Definition at line 341 of file larreco/larreco/RecoAlg/PMAlg/Utilities.cxx.

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

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