Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:30:15

0001 #ifndef SimMuon_GEMDigitizer_GEMDigiModule_h
0002 #define SimMuon_GEMDigitizer_GEMDigiModule_h
0003 
0004 /** 
0005  *  \class GEMDigiModule
0006  *
0007  *  Base Class for the GEM strip response simulation 
0008  *  
0009  *  \author Sven Dildick
0010  *  \modified by Yechan Kang
0011  */
0012 
0013 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0014 #include "FWCore/Framework/interface/EventSetup.h"
0015 #include "DataFormats/GEMDigi/interface/GEMDigiCollection.h"
0016 #include "DataFormats/Common/interface/DetSet.h"
0017 #include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h"
0018 #include "SimDataFormats/TrackerDigiSimLink/interface/StripDigiSimLink.h"
0019 #include "SimDataFormats/GEMDigiSimLink/interface/GEMDigiSimLink.h"
0020 #include "SimDataFormats/CrossingFrame/interface/MixCollection.h"
0021 #include "SimMuon/GEMDigitizer/interface/GEMDigiModel.h"
0022 
0023 #include <map>
0024 #include <set>
0025 
0026 namespace CLHEP {
0027   class HepRandomEngine;
0028 }
0029 
0030 class GEMDigiModel;
0031 class GEMEtaPartition;
0032 class GEMGeometry;
0033 class PSimHit;
0034 
0035 class GEMDigiModule {
0036 public:
0037   GEMDigiModule(const edm::ParameterSet&);
0038 
0039   ~GEMDigiModule();
0040 
0041   typedef edm::DetSet<StripDigiSimLink> StripDigiSimLinks;
0042   typedef edm::DetSet<GEMDigiSimLink> GEMDigiSimLinks;
0043 
0044   void setGeometry(const GEMGeometry*);
0045 
0046   void simulate(const GEMEtaPartition*, const edm::PSimHitContainer&, CLHEP::HepRandomEngine*);
0047 
0048   void fillDigis(int rollDetId, GEMDigiCollection&);
0049 
0050   const StripDigiSimLinks& stripDigiSimLinks() const { return stripDigiSimLinks_; }
0051   const GEMDigiSimLinks& gemDigiSimLinks() const { return theGemDigiSimLinks_; }
0052 
0053 private:
0054   const GEMGeometry* geometry_;
0055 
0056   std::vector<std::unique_ptr<GEMDigiModel> > models;
0057 
0058   /// creates links from Digi to SimTrack
0059   void addLinks(unsigned int strip, int bx);
0060   void addLinksWithPartId(unsigned int strip, int bx);
0061 
0062   Strips strips_;
0063   DetectorHitMap detectorHitMap_;
0064   StripDigiSimLinks stripDigiSimLinks_;
0065   GEMDigiSimLinks theGemDigiSimLinks_;
0066 };
0067 #endif