CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2/src/SimMuon/GEMDigitizer/src/GEMSim.h

Go to the documentation of this file.
00001 #ifndef GEMDigitizer_GEMSim_h
00002 #define GEMDigitizer_GEMSim_h
00003 
00010 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00011 #include "FWCore/Framework/interface/EventSetup.h"
00012 #include "DataFormats/GEMDigi/interface/GEMDigiCollection.h"
00013 #include "DataFormats/Common/interface/DetSet.h"
00014 #include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h"
00015 #include "SimDataFormats/TrackerDigiSimLink/interface/StripDigiSimLink.h"
00016 #include "CLHEP/Random/RandomEngine.h"
00017 
00018 #include <map>
00019 #include <set>
00020 
00021 class GEMEtaPartition;
00022 class GEMGeometry;
00023 class GEMSimSetUp;
00024 class PSimHit;
00025 
00026 class GEMSim
00027 {
00028 public:
00029 
00030   typedef edm::DetSet<StripDigiSimLink> StripDigiSimLinks;
00031 
00032   virtual ~GEMSim() {}
00033 
00034   virtual void simulate(const GEMEtaPartition* roll, const edm::PSimHitContainer& rpcHits) = 0;
00035 
00036   virtual void simulateNoise(const GEMEtaPartition* roll) = 0;
00037 
00038   virtual void setRandomEngine(CLHEP::HepRandomEngine& eng) = 0;
00039 
00040   virtual void fillDigis(int rollDetId, GEMDigiCollection& digis);
00041 
00042   void setGEMSimSetUp(GEMSimSetUp* setup) { simSetUp_ = setup; }
00043 
00044   GEMSimSetUp* getGEMSimSetUp() { return simSetUp_; }
00045 
00046   const StripDigiSimLinks & stripDigiSimLinks() const { return stripDigiSimLinks_; }
00047 
00048 protected:
00049 
00050   GEMSim(const edm::ParameterSet& config) {}
00051 
00052   virtual void init() = 0;
00053 
00054   std::set< std::pair<int, int> > strips_;
00055 
00058   virtual void addLinks(unsigned int strip,int bx);
00059 
00060   // keeps track of which hits contribute to which channels
00061   typedef std::multimap<
00062       std::pair<unsigned int, int>,
00063       const PSimHit*,
00064       std::less<std::pair<unsigned int, int> >
00065     >  DetectorHitMap;
00066 
00067   DetectorHitMap detectorHitMap_;
00068   StripDigiSimLinks stripDigiSimLinks_;
00069 
00070   GEMSimSetUp* simSetUp_;
00071 };
00072 #endif