CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10/src/RecoLocalMuon/RPCRecHit/interface/DTSegtoRPC.h

Go to the documentation of this file.
00001 #ifndef  DTSEGTORPC_H
00002 #define  DTSEGTORPC_H
00003 
00004 
00005 #include "FWCore/Framework/interface/EDAnalyzer.h"
00006 #include "DataFormats/RPCRecHit/interface/RPCRecHit.h"
00007 #include "DataFormats/RPCRecHit/interface/RPCRecHitCollection.h"
00008 
00009 
00010 class DTSegtoRPC {
00011 public:
00012   explicit DTSegtoRPC(edm::Handle<DTRecSegment4DCollection> all4DSegments,const edm::EventSetup& iSetup, const edm::Event& iEvent,bool debug, double eyr);
00013   ~DTSegtoRPC();
00014   RPCRecHitCollection* thePoints(){return _ThePoints;}
00015    
00016 private:
00017   RPCRecHitCollection* _ThePoints; 
00018   edm::OwnVector<RPCRecHit> RPCPointVector;
00019   bool incldt;
00020   bool incldtMB4;
00021   double MinCosAng;
00022   double MaxD;
00023   double MaxDrb4;
00024   double MaxDistanceBetweenSegments;
00025   std::vector<uint32_t> extrapolatedRolls;
00026 };
00027 
00028 class DTStationIndex{
00029 public: 
00030   DTStationIndex():_region(0),_wheel(0),_sector(0),_station(0){}
00031   DTStationIndex(int region, int wheel, int sector, int station) : 
00032     _region(region),
00033     _wheel(wheel),
00034     _sector(sector),
00035     _station(station){}
00036   ~DTStationIndex(){}
00037   int region() const {return _region;}
00038   int wheel() const {return _wheel;}
00039   int sector() const {return _sector;}
00040   int station() const {return _station;}
00041   bool operator<(const DTStationIndex& dtind) const{
00042     if(dtind.region()!=this->region())
00043       return dtind.region()<this->region();
00044     else if(dtind.wheel()!=this->wheel())
00045       return dtind.wheel()<this->wheel();
00046     else if(dtind.sector()!=this->sector())
00047       return dtind.sector()<this->sector();
00048     else if(dtind.station()!=this->station())
00049       return dtind.station()<this->station();
00050     return false;
00051   }
00052 
00053 private:
00054   int _region;
00055   int _wheel;
00056   int _sector;
00057   int _station; 
00058 };
00059 
00060 class ObjectMap{
00061 public:
00062   static ObjectMap* GetInstance(const edm::EventSetup& iSetup);
00063   std::set<RPCDetId> GetRolls(DTStationIndex dtstationindex){return mapInstance->rollstoreDT[dtstationindex];}
00064 //protected:
00065   std::map<DTStationIndex,std::set<RPCDetId> > rollstoreDT;
00066   ObjectMap(const edm::EventSetup& iSetup);
00067 private:
00068   static ObjectMap* mapInstance;
00069 }; 
00070 
00071 #endif