CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/SimMuon/RPCDigitizer/src/RPCSim.h

Go to the documentation of this file.
00001 #ifndef RPCDigitizer_RPCSim_h
00002 #define RPCDigitizer_RPCSim_h
00003 
00009 #include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h"
00010 #include "DataFormats/RPCDigi/interface/RPCDigiCollection.h"
00011 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00012 #include <FWCore/Framework/interface/EventSetup.h>
00013 
00014 #include <map>
00015 #include <set>
00016 
00017 #include "DataFormats/Common/interface/DetSet.h"
00018 #include "SimDataFormats/TrackerDigiSimLink/interface/StripDigiSimLink.h"
00019 #include "SimDataFormats/RPCDigiSimLink/interface/RPCDigiSimLink.h"
00020 #include "CLHEP/Random/RandomEngine.h"
00021 
00022 class RPCRoll;
00023 class RPCGeometry;
00024 class RPCSimSetUp;
00025 class PSimHit;
00026 
00027 class RPCSim
00028 {
00029  public:
00030 
00031   typedef edm::DetSet<StripDigiSimLink> DigiSimLinks;
00032   typedef edm::DetSet<RPCDigiSimLink> RPCDigiSimLinks;
00033 
00034   virtual ~RPCSim(){};
00035 
00036   virtual void simulate(const RPCRoll* roll,
00037                         const edm::PSimHitContainer& rpcHits)=0;
00038 
00039   virtual void simulateNoise(const RPCRoll* roll)=0;
00040 
00041   virtual void setRandomEngine(CLHEP::HepRandomEngine& eng)=0;
00042 
00043   virtual void fillDigis(int rollDetId, RPCDigiCollection& digis);
00044 
00045   void setRPCSimSetUp(RPCSimSetUp* setup){theSimSetUp = setup;}
00046 
00047   RPCSimSetUp* getRPCSimSetUp(){ return theSimSetUp; }
00048 
00049   const DigiSimLinks & digiSimLinks() const {return theDigiSimLinks;}
00050   const RPCDigiSimLinks & rpcDigiSimLinks() const {return theRpcDigiSimLinks;}
00051 
00052  protected:
00053   RPCSim(const edm::ParameterSet& config);
00054   virtual void init()=0;
00055 
00056  protected:
00057   std::set< std::pair<int,int> > strips;
00058 
00059   //--------NEW---------------------
00060 
00063     virtual void addLinks(unsigned int strip,int bx);
00064 
00065   // keeps track of which hits contribute to which channels
00066     typedef std::multimap<std::pair<unsigned int,int>,const PSimHit*,std::less<std::pair<unsigned int, int> > >  DetectorHitMap;
00067 
00068   DetectorHitMap theDetectorHitMap;
00069   DigiSimLinks theDigiSimLinks;
00070   RPCDigiSimLinks theRpcDigiSimLinks;
00071   //--------------------------------
00072 
00073  protected:
00074   RPCSimSetUp* theSimSetUp;
00075 };
00076 #endif