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");
33 if (stripConditions ==
"Configurable") {
35 }
else if (stripConditions ==
"Database") {
38 throw cms::Exception(
"CSCDigiProducer") <<
"Bad option for strip conditions: " << stripConditions;
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 "
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);
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
EventNumber_t event() const
CSCDigiProducer(const edm::ParameterSet &ps)
CSCDigitizer::DigiSimLinks DigiSimLinks
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void produce(edm::Event &e, const edm::EventSetup &c) override
CSCDigitizer theDigitizer
bool getByToken(EDGetToken token, Handle< PROD > &result) 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
T const * product() const
T getParameter(std::string const &) const
void setParticleDataTable(const ParticleDataTable *pdt)
void doAction(MixCollection< PSimHit > &simHits, CSCWireDigiCollection &wireDigis, CSCStripDigiCollection &stripDigis, CSCComparatorDigiCollection &comparators, DigiSimLinks &wireDigiSimLinks, DigiSimLinks &stripDigiSimLinks, CLHEP::HepRandomEngine *)
StreamID streamID() const
edm::ESGetToken< ParticleDataTable, edm::DefaultRecord > pdt_Token
void setGeometry(const CSCGeometry *geom)
sets geometry
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
void setMagneticField(const MagneticField *field)
sets the magnetic field