CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RecHitLessByDet.h
Go to the documentation of this file.
1 #ifndef CD_RecHitLessByDet_H_
2 #define CD_RecHitLessByDet_H_
3 
17 
19 
21 public:
22 
24  theDirection(dir) {}
25 
27 
28  bool operator()(const RecHitPointer& aHit, const RecHitPointer& bHit) const{
29 
30  return (theDirection == alongMomentum ?
31  (aHit->surface()->toGlobal(aHit->localPosition()).mag() <
32  bHit->surface()->toGlobal(bHit->localPosition()).mag() ) :
33  (aHit->surface()->toGlobal(aHit->localPosition()).mag() >
34  bHit->surface()->toGlobal(bHit->localPosition()).mag()) );
35  }
36 
37 private:
38 
40 
41 };
42 #endif //CD_RecHitLessByDet_H_
bool operator()(const RecHitPointer &aHit, const RecHitPointer &bHit) const
PropagationDirection
RecHitLessByDet(const PropagationDirection &dir)
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
PropagationDirection theDirection
TransientTrackingRecHit::ConstRecHitPointer RecHitPointer
dbl *** dir
Definition: mlp_gen.cc:35