23 magfield_Token = esConsumes<MagneticField, IdealMagneticFieldRecord>();
24 pdt_Token = esConsumes<ParticleDataTable, edm::DefaultRecord>();
25 produces<CSCWireDigiCollection>(
"MuonCSCWireDigi");
26 produces<CSCStripDigiCollection>(
"MuonCSCStripDigi");
27 produces<CSCComparatorDigiCollection>(
"MuonCSCComparatorDigi");
28 produces<DigiSimLinks>(
"MuonCSCWireDigiSimLinks");
29 produces<DigiSimLinks>(
"MuonCSCStripDigiSimLinks");
44 throw cms::Exception(
"Configuration") <<
"CSCDigitizer requires the RandomNumberGeneratorService\n" 45 "which is not present in the configuration file. You must add the " 47 "in the configuration file or remove the modules that require it.";
58 edm::LogVerbatim(
"CSCDigitizer") <<
"[CSCDigiProducer::produce] starting event " <<
ev.id().event() <<
" of run " 61 CLHEP::HepRandomEngine *engine = &rng->
getEngine(
ev.streamID());
73 std::unique_ptr<DigiSimLinks> pWireDigiSimLinks(
new DigiSimLinks());
74 std::unique_ptr<DigiSimLinks> pStripDigiSimLinks(
new DigiSimLinks());
77 if (
hits->size() > 0) {
97 *
hits, *pWireDigis, *pStripDigis, *pComparatorDigis, *pWireDigiSimLinks, *pStripDigiSimLinks, engine);
102 ev.put(
std::move(pStripDigis),
"MuonCSCStripDigi");
103 ev.put(
std::move(pComparatorDigis),
"MuonCSCComparatorDigi");
104 ev.put(
std::move(pWireDigiSimLinks),
"MuonCSCWireDigiSimLinks");
105 ev.put(
std::move(pStripDigiSimLinks),
"MuonCSCStripDigiSimLinks");
Log< level::Info, true > LogVerbatim
CSCDigiProducer(const edm::ParameterSet &ps)
CSCDigitizer::DigiSimLinks DigiSimLinks
T getParameter(std::string const &) const
void produce(edm::Event &e, const edm::EventSetup &c) override
CSCDigitizer theDigitizer
T const * product() const
MuonDigiCollection< CSCDetId, CSCStripDigi > CSCStripDigiCollection
CSCStripConditions * theStripConditions
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
virtual void initializeEvent(const edm::EventSetup &es)
MuonDigiCollection< CSCDetId, CSCComparatorDigi > CSCComparatorDigiCollection
~CSCDigiProducer() override
edm::EDGetTokenT< CrossingFrame< PSimHit > > cf_token
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magfield_Token
void setStripConditions(CSCStripConditions *cond)
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > geom_Token
MuonDigiCollection< CSCDetId, CSCWireDigi > CSCWireDigiCollection
void setParticleDataTable(const ParticleDataTable *pdt)
void doAction(MixCollection< PSimHit > &simHits, CSCWireDigiCollection &wireDigis, CSCStripDigiCollection &stripDigis, CSCComparatorDigiCollection &comparators, DigiSimLinks &wireDigiSimLinks, DigiSimLinks &stripDigiSimLinks, CLHEP::HepRandomEngine *)
edm::ESGetToken< ParticleDataTable, edm::DefaultRecord > pdt_Token
void setGeometry(const CSCGeometry *geom)
sets geometry
void setMagneticField(const MagneticField *field)
sets the magnetic field