CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_13_patch3/src/DataFormats/DTRecHit/interface/DTRangeMapAccessor.h

Go to the documentation of this file.
00001 #ifndef DataFormats_DTRangeMapAccessor_H
00002 #define DataFormats_DTRangeMapAccessor_H
00003 
00004 #include "DataFormats/MuonDetId/interface/DTLayerId.h"
00005 
00006 #include <utility>
00007 
00016 class DTSuperLayerIdComparator {
00017 public:
00018   // Operations
00020   bool operator()(DTSuperLayerId sl1, DTSuperLayerId sl2) const {
00021     if (sl1 == sl2) return false;
00022     return (sl1 < sl2);
00023   }
00024   
00025 private:
00026 
00027 };
00028 
00029 
00030 
00039 class DTChamberIdComparator {
00040 public:
00041   // Operations
00043   bool operator()(DTChamberId ch1, DTChamberId ch2) const {
00044     if (ch1 == ch2) return false;
00045     return (ch1<ch2);
00046   }
00047 
00048 private:
00049 
00050 };
00051 
00060 class DTChamberIdDetLayerComparator {
00061  public:
00062   bool operator() (DTChamberId ch1, DTChamberId ch2) const {
00063 
00064     if (ch1.station() == ch2.station())
00065       return false;
00066     
00067     return (ch1.station() < ch2.station());
00068   }
00069 };
00070 
00071 
00080 class DTRangeMapAccessor {
00081 public:
00083   DTRangeMapAccessor();
00084 
00086   virtual ~DTRangeMapAccessor();
00087 
00088   // Operations
00089 
00091   static std::pair<DTLayerId, DTSuperLayerIdComparator>
00092   layersBySuperLayer(DTSuperLayerId slId);
00093 
00095   static std::pair<DTLayerId, DTChamberIdComparator>
00096   layersByChamber(DTChamberId chamberId);
00097   
00099   static std::pair<DTSuperLayerId, DTChamberIdComparator>
00100   superLayersByChamber(DTChamberId chamberId);
00101   
00103   static std::pair<DTChamberId, DTChamberIdDetLayerComparator>
00104     chambersByDetLayer(DTChamberId id);
00105 
00106 private:
00107 
00108 };
00109 
00110 #endif
00111