34 #include "CLHEP/Random/RandFlat.h"
37 class HepRandomEngine;
42 produces<RPCDigiCollection>();
43 produces<RPCDigitizerSimLinks>(
"RPCDigiSimLink");
50 if ( ! rng.isAvailable()) {
52 <<
"RPCDigitizer requires the RandomNumberGeneratorService\n"
53 "which is not present in the configuration file. You must add the service\n"
54 "in the configuration file or remove the modules that require it.";
103 LogDebug (
"RPCandIRPCDigiProducer")<<
"[RPCandIRPCDigiProducer::produce] got the CLHEP::HepRandomEngine engine from the edm::Event.streamID() and edm::Service<edm::RandomNumberGenerator>";
104 LogDebug (
"RPCandIRPCDigiProducer")<<
"[RPCandIRPCDigiProducer::produce] test the CLHEP::HepRandomEngine by firing once RandFlat ---- this must be the first time in SimMuon/RPCDigitizer";
105 LogDebug (
"RPCandIRPCDigiProducer")<<
"[RPCandIRPCDigiProducer::produce] to activate the test go in RPCandIRPCDigiProducer.cc and uncomment the line below";
110 std::unique_ptr<MixCollection<PSimHit> >
edm::EDGetTokenT< CrossingFrame< PSimHit > > crossingFrameToken
T getParameter(std::string const &) const
RPCandIRPCDigiProducer(const edm::ParameterSet &ps)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::Service< edm::RandomNumberGenerator > rng
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual ~RPCandIRPCDigiProducer()
RPCSimSetUp * theRPCSimSetUpRPC
virtual void beginRun(const edm::Run &, const edm::EventSetup &) override
std::string collection_for_XF
RPCSimSetUp * theRPCSimSetUpIRPC
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
void setGeometry(const RPCGeometry *geom)
sets geometry
void setGeometry(const RPCGeometry *geom)
sets geometry
IRPCDigitizer * theIRPCDigitizer
void setRPCSimSetUp(RPCSimSetUp *simsetup)
void doAction(MixCollection< PSimHit > &simHits, RPCDigiCollection &rpcDigis, RPCDigiSimLinks &rpcDigiSimLink, CLHEP::HepRandomEngine *)
RPCDigitizer * theRPCDigitizer
MuonDigiCollection< RPCDetId, RPCDigi > RPCDigiCollection
virtual void produce(edm::Event &e, const edm::EventSetup &c) override
void doAction(MixCollection< PSimHit > &simHits, RPCDigiCollection &rpcDigis, RPCDigiSimLinks &rpcDigiSimLink, CLHEP::HepRandomEngine *)
T const * product() const
void setRPCSimSetUp(RPCSimSetUp *simsetup)
const RPCGeometry * _pGeom
StreamID streamID() const
RPCDigitizer::RPCDigiSimLinks RPCDigitizerSimLinks
void setGeometry(const RPCGeometry *geom)
sets geometry
void setRPCSetUp(const std::vector< RPCStripNoises::NoiseItem > &vnoise, const std::vector< float > &vcls)