CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/RecoMuon/Navigation/interface/MuonDetLayerMap.h

Go to the documentation of this file.
00001 #ifndef MuonDetLayerMap_h
00002 #define MuonDetLayerMap_h
00003 
00004 #include "TrackingTools/DetLayers/interface/BarrelDetLayer.h"
00005 #include "TrackingTools/DetLayers/interface/ForwardDetLayer.h"
00006 #include "RecoMuon/Navigation/interface/MuonEtaRange.h"
00007 
00008 #include <map>
00009 #include <functional>
00010 
00023 struct MuonDetLayerComp {
00024     bool operator()(BarrelDetLayer* l1, BarrelDetLayer* l2) const {
00025       if ( l1->specificSurface().radius() < l2->specificSurface().radius() ) return true;
00026       return false;
00027     }
00028 
00029     bool operator()(ForwardDetLayer* l1, ForwardDetLayer* l2) const {
00030       if ( fabs(l1->surface().position().z()) < fabs(l2->surface().position().z()) ) return true;
00031       return false;
00032     }
00033 };
00034 
00035 
00036 // FIXME: these names are too generic...
00037 typedef std::map<BarrelDetLayer*, MuonEtaRange, MuonDetLayerComp> MapB;
00038 typedef std::map<ForwardDetLayer*, MuonEtaRange, MuonDetLayerComp> MapE;
00039 typedef MapB::const_iterator MapBI;
00040 typedef MapE::const_iterator MapEI;
00041 
00042 #endif
00043