29 #include "CLHEP/Random/RandFlat.h" 32 class HepRandomEngine;
36 produces<RPCDigiCollection>();
37 produces<RPCDigitizerSimLinks>(
"RPCDigiSimLink");
44 if (!rng.isAvailable()) {
46 <<
"RPCDigitizer requires the RandomNumberGeneratorService\n" 47 "which is not present in the configuration file. You must add the service\n" 48 "in the configuration file or remove the modules that require it.";
53 geomToken = esConsumes<RPCGeometry, MuonGeometryRecord, edm::Transition::BeginRun>();
54 noiseToken = esConsumes<RPCStripNoises, RPCStripNoisesRcd, edm::Transition::BeginRun>();
55 clsToken = esConsumes<RPCClusterSize, RPCClusterSizeRcd, edm::Transition::BeginRun>();
82 CLHEP::HepRandomEngine* engine = &rng->
getEngine(
e.streamID());
84 LogDebug(
"RPCDigiProducer") <<
"[RPCDigiProducer::produce] got the CLHEP::HepRandomEngine engine from the " 85 "edm::Event.streamID() and edm::Service<edm::RandomNumberGenerator>";
86 LogDebug(
"RPCDigiProducer") <<
"[RPCDigiProducer::produce] test the CLHEP::HepRandomEngine by firing once RandFlat " 87 "---- this must be the first time in SimMuon/RPCDigitizer";
89 <<
"[RPCDigiProducer::produce] to activate the test go in RPCDigiProducer.cc and uncomment the line below";
108 e.put(
std::move(RPCDigitSimLink),
"RPCDigiSimLink");
T getParameter(std::string const &) const
std::string collection_for_XF
edm::ESGetToken< RPCGeometry, MuonGeometryRecord > geomToken
T const * product() const
std::vector< NoiseItem > const & getVNoise() const
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 *)
edm::ESGetToken< RPCClusterSize, RPCClusterSizeRcd > clsToken
RPCDigitizer::RPCDigiSimLinks RPCDigitizerSimLinks
std::vector< ClusterSizeItem > const & getCls() const
void produce(edm::Event &e, const edm::EventSetup &c) override
void beginRun(const edm::Run &, const edm::EventSetup &) override
RPCDigitizer * theDigitizer
~RPCDigiProducer() override
void setRPCSetUp(const std::vector< RPCStripNoises::NoiseItem > &vnoise, const std::vector< float > &vcls)
edm::EDGetTokenT< CrossingFrame< PSimHit > > crossingFrameToken