CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/RecoTracker/TrackProducer/interface/TrackingRecHitLessFromGlobalPosition.h

Go to the documentation of this file.
00001 #ifndef TrackCandidate_TrackingRecHitLessFromGlobalPosition_H
00002 #define TrackCandidate_TrackingRecHitLessFromGlobalPosition_H
00003 
00004 #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h"
00005 #include "Geometry/CommonDetUnit/interface/GeomDet.h"
00006 #include <functional>
00007 #include "Geometry/TrackerGeometryBuilder/interface/GeomDetLess.h"
00008 #include "Geometry/CommonDetUnit/interface/TrackingGeometry.h"
00009 #include "DataFormats/TrackingRecHit/interface/TrackingRecHit.h"
00015 class TrackingRecHitLessFromGlobalPosition {
00016 public:
00017 
00018   TrackingRecHitLessFromGlobalPosition( const TrackingGeometry * geometry_, PropagationDirection dir = alongMomentum) :
00019     geometry(geometry_), theDir(dir){  }
00020   
00021   
00022   bool operator()( const TrackingRecHit& a, const TrackingRecHit& b) const {
00023     if (theDir == alongMomentum) return insideOutLess( a, b);
00024     else return insideOutLess( b, a);
00025   }
00026   
00027  private:
00028 
00029   bool insideOutLess(  const TrackingRecHit& a, const TrackingRecHit& b) const;
00030   
00031   bool barrelForwardLess(  const TrackingRecHit& a, const TrackingRecHit& b) const;
00032   
00033   
00034   const TrackingGeometry * geometry;
00035   PropagationDirection theDir;
00036 };
00037 #endif