26 class HepRandomEngine;
33 produces<ME0DigiCollection>();
34 produces<StripDigiSimLinks>(
"ME0");
35 produces<ME0DigiSimLinks>(
"ME0");
38 if (!rng.isAvailable()){
40 <<
"ME0DigiProducer::ME0DigiProducer() - RandomNumberGeneratorService is not present in configuration file.\n" 41 <<
"Add the service in the configuration file or remove the modules that require it.";
44 LogDebug(
"ME0DigiProducer") <<
"Using ME0" + ps.getParameter<
std::string>(
"digiModelString") +
"Model";
76 auto digis = std::make_unique<ME0DigiCollection>();
77 auto stripDigiSimLinks = std::make_unique<StripDigiSimLinks>();
78 auto me0DigiSimLinks = std::make_unique<ME0DigiSimLinks>();
81 std::map<uint32_t, edm::PSimHitContainer> hitMap;
83 hitMap[
hit.detUnitId()].emplace_back(
hit);
87 const auto & etaPartitions(
ME0DigiModel_->getGeometry()->etaPartitions());
89 for (
const auto& roll: etaPartitions){
91 const uint32_t rawId(detId.rawId());
92 const auto &
simHits(hitMap[rawId]);
95 <<
"ME0DigiProducer: found " << simHits.size() <<
" hit(s) in eta partition" << rawId;
100 (*stripDigiSimLinks).insert(
ME0DigiModel_->stripDigiSimLinks());
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void beginRun(const edm::Run &, const edm::EventSetup &) override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
ME0DigiProducer(const edm::ParameterSet &ps)
std::unique_ptr< ME0DigiModel > ME0DigiModel_
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
~ME0DigiProducer() override
T const * product() const
StreamID streamID() const
edm::EDGetTokenT< CrossingFrame< PSimHit > > cf_token
void produce(edm::Event &, const edm::EventSetup &) override
T get(const Candidate &c)