CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/RecoMuon/TrackingTools/interface/MuonSeedDetLayer.h

Go to the documentation of this file.
00001 #ifndef TrackingTools_MuonSeedDetLayer_H
00002 #define TrackingTools_MuonSeedDetLayer_H
00003 
00016 #include <functional>
00017 
00018 #include "TrackingTools/DetLayers/interface/DetLayer.h"
00019 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
00020 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00021 
00022 //              ---------------------
00023 //              -- Class Interface --
00024 //              ---------------------
00025 
00026 class MuonSeedDetLayer {
00027 
00028   public:
00029 
00031     MuonSeedDetLayer(const DetLayer* layer, 
00032                      GlobalPoint& point, 
00033                      int id, 
00034                      TrajectoryStateOnSurface& state) :
00035             theLayer(layer), thePoint(point), theID(id), theState(state) {}
00036 
00038     virtual ~MuonSeedDetLayer() {}
00039 
00041     const DetLayer* layer() const { return theLayer; }
00042 
00044     const GlobalPoint& point() const { return thePoint; }
00045 
00047     int id() const { return theID; }
00048 
00050     const TrajectoryStateOnSurface& state() const { return theState; }
00051 
00053     double radius() const { return sqrt(thePoint.x()*thePoint.x()+thePoint.y()*thePoint.y()); }
00054 
00056     double z() const { return thePoint.z(); }
00057 
00059     class HigherR : std::binary_function< const MuonSeedDetLayer, const MuonSeedDetLayer, bool>
00060 {
00061       public :
00062         bool operator()( const MuonSeedDetLayer first, const MuonSeedDetLayer second ) const {
00063           return first.radius() < second.radius();
00064         }
00065     };
00066 
00068     class LowerR : std::binary_function< const MuonSeedDetLayer, const MuonSeedDetLayer, bool>
00069 {
00070       public :
00071         bool operator()( const MuonSeedDetLayer first, const MuonSeedDetLayer second ) const {
00072           return first.radius() > second.radius();
00073         }
00074     };
00075 
00076   private:
00077 
00078     const DetLayer*          theLayer;
00079     GlobalPoint              thePoint;  
00080     int                      theID;
00081     TrajectoryStateOnSurface theState;
00082 };
00083 #endif 
00084