30 #include "CLHEP/Random/RandFlat.h"
33 class HepRandomEngine;
37 produces<RPCDigiCollection>();
38 produces<RPCDigitizerSimLinks>(
"RPCDigiSimLink");
45 if (!rng.isAvailable()) {
47 <<
"RPCDigitizer requires the RandomNumberGeneratorService\n"
48 "which is not present in the configuration file. You must add the service\n"
49 "in the configuration file or remove the modules that require it.";
54 geomToken = esConsumes<RPCGeometry, MuonGeometryRecord, edm::Transition::BeginRun>();
55 noiseToken = esConsumes<RPCStripNoises, RPCStripNoisesRcd, edm::Transition::BeginRun>();
56 clsToken = esConsumes<RPCClusterSize, RPCClusterSizeRcd, edm::Transition::BeginRun>();
85 LogDebug(
"RPCDigiProducer") <<
"[RPCDigiProducer::produce] got the CLHEP::HepRandomEngine engine from the "
86 "edm::Event.streamID() and edm::Service<edm::RandomNumberGenerator>";
87 LogDebug(
"RPCDigiProducer") <<
"[RPCDigiProducer::produce] test the CLHEP::HepRandomEngine by firing once RandFlat "
88 "---- this must be the first time in SimMuon/RPCDigitizer";
90 <<
"[RPCDigiProducer::produce] to activate the test go in RPCDigiProducer.cc and uncomment the line below";
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
std::string collection_for_XF
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::ESGetToken< RPCGeometry, MuonGeometryRecord > geomToken
RPCDigiProducer(const edm::ParameterSet &ps)
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
RPCSimSetUp * theRPCSimSetUp
edm::ESGetToken< RPCStripNoises, RPCStripNoisesRcd > noiseToken
void setRPCSimSetUp(RPCSimSetUp *simsetup)
MuonDigiCollection< RPCDetId, RPCDigi > RPCDigiCollection
void doAction(MixCollection< PSimHit > &simHits, RPCDigiCollection &rpcDigis, RPCDigiSimLinks &rpcDigiSimLink, CLHEP::HepRandomEngine *)
T const * product() const
edm::ESGetToken< RPCClusterSize, RPCClusterSizeRcd > clsToken
RPCDigitizer::RPCDigiSimLinks RPCDigitizerSimLinks
T getParameter(std::string const &) const
void produce(edm::Event &e, const edm::EventSetup &c) override
StreamID streamID() const
void beginRun(const edm::Run &, const edm::EventSetup &) override
RPCDigitizer * theDigitizer
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
~RPCDigiProducer() override
void setRPCSetUp(const std::vector< RPCStripNoises::NoiseItem > &vnoise, const std::vector< float > &vcls)
edm::EDGetTokenT< CrossingFrame< PSimHit > > crossingFrameToken