26 class HepRandomEngine;
30 : me0digiModelString_(ps.getParameter<
std::
string>(
"digiModelString"))
32 produces<ME0DigiCollection>();
33 produces<StripDigiSimLinks>(
"ME0");
34 produces<ME0DigiSimLinks>(
"ME0");
37 if (!rng.isAvailable()){
39 <<
"ME0DigiProducer::ME0DigiProducer() - RandomNumberGeneratorService is not present in configuration file.\n" 40 <<
"Add the service in the configuration file or remove the modules that require it.";
80 std::unique_ptr<ME0DigiSimLinks> me0DigiSimLinks(
new ME0DigiSimLinks() );
83 std::map<uint32_t, edm::PSimHitContainer> hitMap;
84 for (
const auto&
hit: *hits){
85 hitMap[
hit.detUnitId()].emplace_back(
hit);
91 for (
const auto& roll: etaPartitions){
93 const uint32_t rawId(detId.rawId());
94 const auto &
simHits(hitMap[rawId]);
97 <<
"ME0DigiProducer: found " << simHits.size() <<
" hit(s) in eta partition" << rawId;
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void fillDigis(int rollDetId, ME0DigiCollection &)
ME0DigiModel * ME0DigiModel_
virtual void beginRun(const edm::Run &, const edm::EventSetup &) override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
ME0DigiProducer(const edm::ParameterSet &ps)
virtual ~ME0DigiProducer()
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
MuonDigiCollection< ME0DetId, ME0Digi > ME0DigiCollection
void setGeometry(const ME0Geometry *geom)
virtual void simulateNoise(const ME0EtaPartition *, CLHEP::HepRandomEngine *engine)=0
edm::DetSetVector< ME0DigiSimLink > ME0DigiSimLinks
const std::vector< ME0EtaPartition const * > & etaPartitions() const
Return a vector of all ME0 eta partitions.
edm::DetSetVector< StripDigiSimLink > StripDigiSimLinks
T const * product() const
const StripDigiSimLinks & stripDigiSimLinks() const
const ME0DigiSimLinks & me0DigiSimLinks() const
const ME0Geometry * getGeometry()
StreamID streamID() const
edm::EDGetTokenT< CrossingFrame< PSimHit > > cf_token
virtual void simulateSignal(const ME0EtaPartition *, const edm::PSimHitContainer &, CLHEP::HepRandomEngine *engine)=0
std::string me0digiModelString_
virtual void produce(edm::Event &, const edm::EventSetup &) override
T get(const Candidate &c)