CMS 3D CMS Logo

RecHitLessByDet.h
Go to the documentation of this file.
1 #ifndef CD_RecHitLessByDet_H_
2 #define CD_RecHitLessByDet_H_
3 
15 
18 
19 public:
21 
23 
24  bool operator()(const RecHitPointer& aHit, const RecHitPointer& bHit) const {
25  return (theDirection == alongMomentum ? (aHit->surface()->toGlobal(aHit->localPosition()).mag() <
26  bHit->surface()->toGlobal(bHit->localPosition()).mag())
27  : (aHit->surface()->toGlobal(aHit->localPosition()).mag() >
28  bHit->surface()->toGlobal(bHit->localPosition()).mag()));
29  }
30 
31 private:
33 };
34 #endif //CD_RecHitLessByDet_H_
bool operator()(const RecHitPointer &aHit, const RecHitPointer &bHit) const
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
PropagationDirection
RecHitLessByDet(const PropagationDirection &dir)
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
PropagationDirection theDirection
TransientTrackingRecHit::ConstRecHitPointer RecHitPointer