#include <RecHitLessByDet.h>
Public Member Functions | |
bool | operator() (const RecHitPointer &aHit, const RecHitPointer &bHit) const |
RecHitLessByDet (const PropagationDirection &dir) | |
~RecHitLessByDet () | |
Private Types | |
typedef TransientTrackingRecHit::ConstRecHitPointer | RecHitPointer |
Private Attributes | |
PropagationDirection | theDirection |
A comparison operator for RecHits. Returns true if the hits are in the order in which they would be seen by an outgoing (or an incoming) track. Only meaningful for RecHits from the same trajectory. Ported from ORCA
Definition at line 18 of file RecHitLessByDet.h.
typedef TransientTrackingRecHit::ConstRecHitPointer RecHitLessByDet::RecHitPointer [private] |
Definition at line 20 of file RecHitLessByDet.h.
RecHitLessByDet::RecHitLessByDet | ( | const PropagationDirection & | dir | ) | [inline] |
Definition at line 23 of file RecHitLessByDet.h.
: theDirection(dir) {}
RecHitLessByDet::~RecHitLessByDet | ( | ) | [inline] |
Definition at line 26 of file RecHitLessByDet.h.
{}
bool RecHitLessByDet::operator() | ( | const RecHitPointer & | aHit, |
const RecHitPointer & | bHit | ||
) | const [inline] |
Definition at line 28 of file RecHitLessByDet.h.
References alongMomentum, mag(), and theDirection.
{ return (theDirection == alongMomentum ? (aHit->surface()->toGlobal(aHit->localPosition()).mag() < bHit->surface()->toGlobal(bHit->localPosition()).mag() ) : (aHit->surface()->toGlobal(aHit->localPosition()).mag() > bHit->surface()->toGlobal(bHit->localPosition()).mag()) ); }
Definition at line 39 of file RecHitLessByDet.h.
Referenced by operator()().