CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/Geometry/TrackerGeometryBuilder/interface/GeomDetLess.h

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