Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef SimMuon_RPCDigitizer_h
0002 #define SimMuon_RPCDigitizer_h
0003 //
0004 
0005 /** \class RPCDigitizer
0006  *  Digitizer class for RPC
0007  *
0008  *  \author Marcello Maggi -- INFN Bari
0009  *
0010  */
0011 #include "DataFormats/Common/interface/DetSetVector.h"
0012 #include "SimDataFormats/TrackerDigiSimLink/interface/StripDigiSimLink.h"
0013 #include "SimDataFormats/RPCDigiSimLink/interface/RPCDigiSimLink.h"
0014 #include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h"
0015 #include "DataFormats/RPCDigi/interface/RPCDigiCollection.h"
0016 #include "Geometry/RPCGeometry/interface/RPCGeometry.h"
0017 #include "SimDataFormats/CrossingFrame/interface/MixCollection.h"
0018 #include <string>
0019 #include "CLHEP/Random/RandomEngine.h"
0020 
0021 namespace edm {
0022   class ParameterSet;
0023 }
0024 
0025 class RPCRoll;
0026 class RPCSim;
0027 class RPCSimSetUp;
0028 
0029 namespace CLHEP {
0030   class HepRandomEngine;
0031 }
0032 
0033 class RPCDigitizer {
0034 public:
0035   typedef edm::DetSetVector<RPCDigiSimLink> RPCDigiSimLinks;
0036   RPCDigitizer(const edm::ParameterSet& config);
0037   ~RPCDigitizer();
0038 
0039   // *** digitize ***
0040   void doAction(MixCollection<PSimHit>& simHits,
0041                 RPCDigiCollection& rpcDigis,
0042                 RPCDigiSimLinks& rpcDigiSimLink,
0043                 CLHEP::HepRandomEngine*);
0044 
0045   /// sets geometry
0046   void setGeometry(const RPCGeometry* geom) { theGeometry = geom; }
0047 
0048   void setRPCSimSetUp(RPCSimSetUp* simsetup) { theSimSetUp = simsetup; }
0049 
0050   RPCSimSetUp* getRPCSimSetUp() { return theSimSetUp; }
0051 
0052   /// finds the rpc det unit in the geometry associated with this det ID
0053   const RPCRoll* findDet(int detId) const;
0054 
0055 private:
0056   const RPCGeometry* theGeometry;
0057   std::unique_ptr<RPCSim> theRPCSim;
0058   RPCSimSetUp* theSimSetUp;
0059   bool theNoise;
0060 };
0061 
0062 #endif