CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC4_patch1/src/RecoLocalMuon/RPCRecHit/interface/CSCSegtoRPC.h

Go to the documentation of this file.
00001 #ifndef  CSCSEGTORPC_H
00002 #define  CSCSEGTORPC_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 CSCSegtoRPC {
00011 public:
00012   explicit CSCSegtoRPC(edm::Handle<CSCSegmentCollection> allCSCSegments,const edm::EventSetup& iSetup, const edm::Event& iEvent, bool debug, double eyr);
00013   ~CSCSegtoRPC();
00014   RPCRecHitCollection* thePoints(){return _ThePoints;}
00015    
00016 private:
00017   RPCRecHitCollection* _ThePoints; 
00018   edm::OwnVector<RPCRecHit> RPCPointVector;
00019   bool inclcsc;
00020   double MaxD;
00021 };
00022 
00023 class CSCStationIndex{
00024 public:
00025   CSCStationIndex():_region(0),_station(0),_ring(0),_chamber(0){}
00026   CSCStationIndex(int region, int station, int ring, int chamber):
00027     _region(region),
00028     _station(station),
00029     _ring(ring),
00030     _chamber(chamber){}
00031   ~CSCStationIndex(){}
00032   int region() const {return _region;}
00033   int station() const {return _station;}
00034   int ring() const {return _ring;}
00035   int chamber() const {return _chamber;}
00036   bool operator<(const CSCStationIndex& cscind) const{
00037     if(cscind.region()!=this->region())
00038       return cscind.region()<this->region();
00039     else if(cscind.station()!=this->station())
00040       return cscind.station()<this->station();
00041     else if(cscind.ring()!=this->ring())
00042       return cscind.ring()<this->ring();
00043     else if(cscind.chamber()!=this->chamber())
00044       return cscind.chamber()<this->chamber();
00045     return false;
00046   }
00047 
00048 private:
00049   int _region;
00050   int _station;
00051   int _ring;  
00052   int _chamber;
00053 };
00054 
00055 class ObjectMapCSC{
00056 public:
00057   static ObjectMapCSC* GetInstance(const edm::EventSetup& iSetup);
00058   std::set<RPCDetId> GetRolls(CSCStationIndex cscstationindex){return mapInstance->rollstoreCSC[cscstationindex];}
00059 //protected:
00060   std::map<CSCStationIndex,std::set<RPCDetId> > rollstoreCSC;
00061   ObjectMapCSC(const edm::EventSetup& iSetup);
00062 private:
00063   static ObjectMapCSC* mapInstance;
00064 }; 
00065 
00066 #endif