34 #include "CLHEP/Random/RandFlat.h" 37 class HepRandomEngine;
41 produces<RPCDigiCollection>();
42 produces<RPCDigitizerSimLinks>(
"RPCDigiSimLink");
49 if (!rng.isAvailable()) {
51 <<
"RPCDigitizer requires the RandomNumberGeneratorService\n" 52 "which is not present in the configuration file. You must add the service\n" 53 "in the configuration file or remove the modules that require it.";
60 crossingFrameToken = consumes<CrossingFrame<PSimHit>>(
edm::InputTag(mix_, collection_for_XF));
64 delete theRPCDigitizer;
65 delete theIRPCDigitizer;
66 delete theRPCSimSetUpRPC;
67 delete theRPCSimSetUpIRPC;
82 theRPCSimSetUpRPC->setGeometry(pGeom);
83 theRPCSimSetUpRPC->setRPCSetUp(noiseRcd->
getVNoise(), clsRcd->
getCls());
84 theRPCSimSetUpIRPC->setGeometry(pGeom);
85 theRPCSimSetUpIRPC->setRPCSetUp(noiseRcd->
getVNoise(), clsRcd->
getCls());
88 theRPCDigitizer->setGeometry(pGeom);
89 theIRPCDigitizer->setGeometry(pGeom);
90 theRPCDigitizer->setRPCSimSetUp(theRPCSimSetUpRPC);
91 theIRPCDigitizer->setRPCSimSetUp(theRPCSimSetUpIRPC);
98 LogDebug(
"RPCandIRPCDigiProducer") <<
"[RPCandIRPCDigiProducer::produce] got the CLHEP::HepRandomEngine engine from " 99 "the edm::Event.streamID() and edm::Service<edm::RandomNumberGenerator>";
100 LogDebug(
"RPCandIRPCDigiProducer") <<
"[RPCandIRPCDigiProducer::produce] test the CLHEP::HepRandomEngine by firing " 101 "once RandFlat ---- this must be the first time in SimMuon/RPCDigitizer";
102 LogDebug(
"RPCandIRPCDigiProducer") <<
"[RPCandIRPCDigiProducer::produce] to activate the test go in " 103 "RPCandIRPCDigiProducer.cc and uncomment the line below";
114 theRPCDigitizer->doAction(*hits, *pDigis, *RPCDigitSimLink, engine);
115 theIRPCDigitizer->doAction(*hits, *pDigis, *RPCDigitSimLink, engine);
T getParameter(std::string const &) const
RPCandIRPCDigiProducer(const edm::ParameterSet &ps)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void beginRun(const edm::Run &, const edm::EventSetup &) override
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
MuonDigiCollection< RPCDetId, RPCDigi > RPCDigiCollection
std::vector< NoiseItem > const & getVNoise() const
void produce(edm::Event &e, const edm::EventSetup &c) override
~RPCandIRPCDigiProducer() override
T const * product() const
StreamID streamID() const
std::vector< ClusterSizeItem > const & getCls() const