1 #ifndef SimMuon_GEMDigitizer_ME0DigiPreRecoProducer_h
2 #define SimMuon_GEMDigitizer_ME0DigiPreRecoProducer_h
34 class HepRandomEngine;
57 : digiPreRecoModelString_(ps.getParameter<
std::
string>(
"digiPreRecoModelString")),
59 produces<ME0DigiPreRecoCollection>();
64 <<
"ME0DigiPreRecoProducer::ME0PreRecoDigiProducer() - RandomNumberGeneratorService is not present in "
65 "configuration file.\n"
66 <<
"Add the service in the configuration file or remove the modules that require it.";
68 LogDebug(
"ME0DigiPreRecoProducer") <<
"Using ME0" + digiPreRecoModelString_ +
"Model";
73 cf_token = consumes<CrossingFrame<PSimHit> >(
edm::InputTag(mix_, collection_));
74 geom_token_ = esConsumes<ME0Geometry, MuonGeometryRecord, edm::Transition::BeginRun>();
88 CLHEP::HepRandomEngine* engine = &rng->
getEngine(
e.streamID());
96 auto digis = std::make_unique<ME0DigiPreRecoCollection>();
99 std::map<uint32_t, edm::PSimHitContainer> hitMap;
101 hitMap[
hit.detUnitId()].push_back(
hit);
107 for (
const auto& roll : etaPartitions) {
109 const uint32_t rawId(detId.rawId());
110 const auto&
simHits(hitMap[rawId]);
112 LogDebug(
"ME0DigiPreRecoProducer") <<
"ME0DigiPreRecoProducer: found " <<
simHits.size()
113 <<
" hit(s) in eta partition" << rawId;