LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
pma::bTrack3DLonger Struct Reference

#include "Utilities.h"

Public Member Functions

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

Detailed Description

Definition at line 106 of file Utilities.h.

Member Function Documentation

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

Definition at line 322 of file Utilities.cxx.

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

323 {
324  pma::Track3D* trk1 = t1.Track();
325  pma::Track3D* trk2 = t2.Track();
326  if (trk1 && trk2) {
327  double l1 = pma::Dist2(trk1->front()->Point3D(), trk1->back()->Point3D());
328  double l2 = pma::Dist2(trk2->front()->Point3D(), trk2->back()->Point3D());
329  return l1 > l2;
330  }
331  return false;
332 }
double Dist2(const TVector2 &v1, const TVector2 &v2)
Definition: Utilities.cxx:39
pma::Hit3D const * front() const
Definition: PmaTrack3D.h:87
TVector3 const & Point3D() const
Definition: PmaHit3D.h:50
pma::Hit3D const * back() const
Definition: PmaTrack3D.h:88
pma::Track3D * Track() const

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