26 class HepRandomEngine;
30 : digiModelString_(ps.getParameter<
std::
string>(
"digiModelString"))
32 produces<GEMDigiCollection>();
33 produces<StripDigiSimLinks>(
"GEM");
34 produces<GEMDigiSimLinks>(
"GEM");
37 if (!rng.isAvailable()){
39 <<
"GEMDigiProducer::GEMDigiProducer() - 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<GEMDigiSimLinks> gemDigiSimLinks(
new GEMDigiSimLinks() );
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 <<
"GEMDigiProducer: found " << simHits.size() <<
" hit(s) in eta partition" << rawId;
const GEMDigiSimLinks & gemDigiSimLinks() const
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void setGeometry(const GEMGeometry *geom)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::string digiModelString_
const GEMGeometry * getGeometry()
virtual void simulateNoise(const GEMEtaPartition *, CLHEP::HepRandomEngine *engine)=0
edm::DetSetVector< StripDigiSimLink > StripDigiSimLinks
GEMDigiModel * gemDigiModel_
MuonDigiCollection< GEMDetId, GEMDigi > GEMDigiCollection
virtual void simulateSignal(const GEMEtaPartition *, const edm::PSimHitContainer &, CLHEP::HepRandomEngine *engine)=0
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
const StripDigiSimLinks & stripDigiSimLinks() const
~GEMDigiProducer() override
const std::vector< const GEMEtaPartition * > & etaPartitions() const
Return a vector of all GEM eta partitions.
GEMDigiProducer(const edm::ParameterSet &ps)
edm::EDGetTokenT< CrossingFrame< PSimHit > > cf_token
T const * product() const
void beginRun(const edm::Run &, const edm::EventSetup &) override
void produce(edm::Event &, const edm::EventSetup &) override
StreamID streamID() const
edm::DetSetVector< GEMDigiSimLink > GEMDigiSimLinks
void fillDigis(int rollDetId, GEMDigiCollection &)
T get(const Candidate &c)