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.";
57 geomToken = esConsumes<RPCGeometry, MuonGeometryRecord, edm::Transition::BeginRun>();
58 noiseToken = esConsumes<RPCStripNoises, RPCStripNoisesRcd, edm::Transition::BeginRun>();
59 clsToken = esConsumes<RPCClusterSize, RPCClusterSizeRcd, edm::Transition::BeginRun>();
92 CLHEP::HepRandomEngine* engine = &rng->
getEngine(
e.streamID());
94 LogDebug(
"RPCandIRPCDigiProducer") <<
"[RPCandIRPCDigiProducer::produce] got the CLHEP::HepRandomEngine engine from " 95 "the edm::Event.streamID() and edm::Service<edm::RandomNumberGenerator>";
96 LogDebug(
"RPCandIRPCDigiProducer") <<
"[RPCandIRPCDigiProducer::produce] test the CLHEP::HepRandomEngine by firing " 97 "once RandFlat ---- this must be the first time in SimMuon/RPCDigitizer";
98 LogDebug(
"RPCandIRPCDigiProducer") <<
"[RPCandIRPCDigiProducer::produce] to activate the test go in " 99 "RPCandIRPCDigiProducer.cc and uncomment the line below";
115 e.put(
std::move(RPCDigitSimLink),
"RPCDigiSimLink");
edm::EDGetTokenT< CrossingFrame< PSimHit > > crossingFrameToken
RPCandIRPCDigiProducer(const edm::ParameterSet &ps)
T getParameter(std::string const &) const
T const * product() const
std::vector< NoiseItem > const & getVNoise() const
RPCSimSetUp * theRPCSimSetUpRPC
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
edm::ESGetToken< RPCClusterSize, RPCClusterSizeRcd > clsToken
void produce(edm::Event &e, const edm::EventSetup &c) override
void doAction(MixCollection< PSimHit > &simHits, RPCDigiCollection &rpcDigis, RPCDigiSimLinks &rpcDigiSimLink, CLHEP::HepRandomEngine *)
~RPCandIRPCDigiProducer() override
void setRPCSimSetUp(RPCSimSetUp *simsetup)
const RPCGeometry * _pGeom
edm::ESGetToken< RPCStripNoises, RPCStripNoisesRcd > noiseToken
edm::ESGetToken< RPCGeometry, MuonGeometryRecord > geomToken
std::vector< ClusterSizeItem > const & getCls() const
RPCDigitizer::RPCDigiSimLinks RPCDigitizerSimLinks
void setGeometry(const RPCGeometry *geom)
sets geometry
void setRPCSetUp(const std::vector< RPCStripNoises::NoiseItem > &vnoise, const std::vector< float > &vcls)