|
|
Go to the documentation of this file.
32 #include "CLHEP/Random/RandFlat.h"
35 class HepRandomEngine;
39 produces<RPCDigiCollection>();
40 produces<RPCDigitizerSimLinks>(
"RPCDigiSimLink");
47 if (!rng.isAvailable()) {
49 <<
"RPCDigitizer requires the RandomNumberGeneratorService\n"
50 "which is not present in the configuration file. You must add the service\n"
51 "in the configuration file or remove the modules that require it.";
56 geomToken = esConsumes<RPCGeometry, MuonGeometryRecord, edm::Transition::BeginRun>();
57 noiseToken = esConsumes<RPCStripNoises, RPCStripNoisesRcd, edm::Transition::BeginRun>();
58 clsToken = esConsumes<RPCClusterSize, RPCClusterSizeRcd, edm::Transition::BeginRun>();
85 CLHEP::HepRandomEngine* engine = &rng->
getEngine(
e.streamID());
87 LogDebug(
"RPCDigiProducer") <<
"[RPCDigiProducer::produce] got the CLHEP::HepRandomEngine engine from the "
88 "edm::Event.streamID() and edm::Service<edm::RandomNumberGenerator>";
89 LogDebug(
"RPCDigiProducer") <<
"[RPCDigiProducer::produce] test the CLHEP::HepRandomEngine by firing once RandFlat "
90 "---- this must be the first time in SimMuon/RPCDigitizer";
92 <<
"[RPCDigiProducer::produce] to activate the test go in RPCDigiProducer.cc and uncomment the line below";
112 e.put(
std::move(RPCDigitSimLink),
"RPCDigiSimLink");
std::vector< NoiseItem > const & getVNoise() const
void doAction(MixCollection< PSimHit > &simHits, RPCDigiCollection &rpcDigis, RPCDigiSimLinks &rpcDigiSimLink, CLHEP::HepRandomEngine *)
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
T const * product() const
void produce(edm::Event &e, const edm::EventSetup &c) override
std::vector< ClusterSizeItem > const & getCls() const
void setRPCSimSetUp(RPCSimSetUp *simsetup)
RPCDigitizer * theDigitizer
RPCSimSetUp * theRPCSimSetUp
void setGeometry(const RPCGeometry *geom)
sets geometry
edm::ESGetToken< RPCGeometry, MuonGeometryRecord > geomToken
MuonDigiCollection< RPCDetId, RPCDigi > RPCDigiCollection
edm::ESGetToken< RPCClusterSize, RPCClusterSizeRcd > clsToken
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
RPCDigitizer::RPCDigiSimLinks RPCDigitizerSimLinks
std::string collection_for_XF
RPCDigiProducer(const edm::ParameterSet &ps)
void setGeometry(const RPCGeometry *geom)
sets geometry
T getParameter(std::string const &) const
edm::ESGetToken< RPCStripNoises, RPCStripNoisesRcd > noiseToken
void setRPCSetUp(const std::vector< RPCStripNoises::NoiseItem > &vnoise, const std::vector< float > &vcls)
void beginRun(const edm::Run &, const edm::EventSetup &) override
edm::EDGetTokenT< CrossingFrame< PSimHit > > crossingFrameToken
~RPCDigiProducer() override