CMS 3D CMS Logo

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 
00021 class RPCRoll;
00022 class RPCGeometry;
00023 class RPCSimSetUp;
00024 class PSimHit;
00025 
00026 class RPCSim
00027 {
00028  public:
00029 
00030   typedef edm::DetSet<StripDigiSimLink> DigiSimLinks;
00031   typedef edm::DetSet<RPCDigiSimLink> RPCDigiSimLinks;
00032 
00033   virtual ~RPCSim(){};
00034 
00035   virtual void simulate(const RPCRoll* roll,
00036                         const edm::PSimHitContainer& rpcHits)=0;
00037 
00038   virtual void simulateNoise(const RPCRoll* roll)=0;
00039 
00040   virtual void fillDigis(int rollDetId, RPCDigiCollection& digis);
00041 
00042   void setRPCSimSetUp(RPCSimSetUp* setup){theSimSetUp = setup;}
00043 
00044   RPCSimSetUp* getRPCSimSetUp(){ return theSimSetUp; }
00045 
00046   const DigiSimLinks & digiSimLinks() const {return theDigiSimLinks;}
00047   const RPCDigiSimLinks & rpcDigiSimLinks() const {return theRpcDigiSimLinks;}
00048 
00049  protected:
00050   RPCSim(const edm::ParameterSet& config);
00051   virtual void init()=0;
00052 
00053  protected:
00054   std::set< std::pair<int,int> > strips;
00055 
00056   //--------NEW---------------------
00057 
00060     virtual void addLinks(unsigned int strip,int bx);
00061 
00062   // keeps track of which hits contribute to which channels
00063     typedef std::multimap<std::pair<unsigned int,int>,const PSimHit*,std::less<std::pair<unsigned int, int> > >  DetectorHitMap;
00064 
00065   DetectorHitMap theDetectorHitMap;
00066   DigiSimLinks theDigiSimLinks;
00067   RPCDigiSimLinks theRpcDigiSimLinks;
00068 
00069   //--------------------------------
00070 
00071  protected:
00072   RPCSimSetUp* theSimSetUp;
00073 };
00074 #endif

Generated on Tue Jun 9 17:47:42 2009 for CMSSW by  doxygen 1.5.4