23 class HepRandomEngine;
27 : digiPreRecoModelString_(ps.getParameter<
std::
string>(
"digiPreRecoModelString"))
29 produces<ME0DigiPreRecoCollection>();
32 if (!rng.isAvailable()){
34 <<
"ME0DigiPreRecoProducer::ME0PreRecoDigiProducer() - RandomNumberGeneratorService is not present in configuration file.\n" 35 <<
"Add the service in the configuration file or remove the modules that require it.";
77 std::map<uint32_t, edm::PSimHitContainer> hitMap;
78 for (
const auto&
hit: *hits){
79 hitMap[
hit.detUnitId()].push_back(
hit);
85 for (
const auto& roll: etaPartitions){
87 const uint32_t rawId(detId.rawId());
88 const auto &
simHits(hitMap[rawId]);
91 <<
"ME0DigiPreRecoProducer: 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.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void beginRun(const edm::Run &, const edm::EventSetup &) override
void fillDigis(int rollDetId, ME0DigiPreRecoCollection &)
ME0DigiPreRecoModel * me0DigiPreRecoModel_
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
ME0DigiPreRecoProducer(const edm::ParameterSet &ps)
void setGeometry(const ME0Geometry *geom)
MuonDigiCollection< ME0DetId, ME0DigiPreReco > ME0DigiPreRecoCollection
virtual void simulateNoise(const ME0EtaPartition *, CLHEP::HepRandomEngine *engine)=0
const ME0Geometry * getGeometry()
~ME0DigiPreRecoProducer() override
virtual void simulateSignal(const ME0EtaPartition *, const edm::PSimHitContainer &, CLHEP::HepRandomEngine *engine)=0
void produce(edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< CrossingFrame< PSimHit > > cf_token
const std::vector< ME0EtaPartition const * > & etaPartitions() const
Return a vector of all ME0 eta partitions.
T const * product() const
std::string digiPreRecoModelString_
StreamID streamID() const
T get(const Candidate &c)