26 class HepRandomEngine;
30 : digiModelString_(ps.getParameter<std::
string>(
"digiModelString"))
32 produces<GEMDigiCollection>();
33 produces<StripDigiSimLinks>(
"GEM");
36 if (!rng.isAvailable()){
38 <<
"GEMDigiProducer::GEMDigiProducer() - RandomNumberGeneratorService is not present in configuration file.\n"
39 <<
"Add the service in the configuration file or remove the modules that require it.";
81 std::map<uint32_t, edm::PSimHitContainer> hitMap;
82 for(
auto &
hit: *hits){
83 hitMap[
hit.detUnitId()].push_back(
hit);
89 for(
auto &roll: etaPartitions){
91 const uint32_t rawId(detId.rawId());
92 const auto &
simHits(hitMap[rawId]);
95 <<
"GEMDigiProducer: found " << simHits.size() <<
" hit(s) in eta partition" << rawId;
105 e.
put(stripDigiSimLinks,
"GEM");
T getParameter(std::string const &) const
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
const StripDigiSimLinks & stripDigiSimLinks() const
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
const std::vector< const GEMEtaPartition * > & etaPartitions() const
Return a vector of all GEM chambers.
GEMDigiProducer(const edm::ParameterSet &ps)
edm::EDGetTokenT< CrossingFrame< PSimHit > > cf_token
virtual ~GEMDigiProducer()
virtual void beginRun(const edm::Run &, const edm::EventSetup &) override
T const * product() const
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &) const =0
Use this engine in event methods.
virtual void produce(edm::Event &, const edm::EventSetup &) override
StreamID streamID() const
void fillDigis(int rollDetId, GEMDigiCollection &)
T get(const Candidate &c)