1 #ifndef SimMuon_GEMDigitizer_ME0DigiPreRecoProducer_h
2 #define SimMuon_GEMDigitizer_ME0DigiPreRecoProducer_h
33 class HepRandomEngine;
55 : digiPreRecoModelString_(ps.getParameter<
std::
string>(
"digiPreRecoModelString")),
57 produces<ME0DigiPreRecoCollection>();
62 <<
"ME0DigiPreRecoProducer::ME0PreRecoDigiProducer() - RandomNumberGeneratorService is not present in "
63 "configuration file.\n"
64 <<
"Add the service in the configuration file or remove the modules that require it.";
66 LogDebug(
"ME0DigiPreRecoProducer") <<
"Using ME0" + digiPreRecoModelString_ +
"Model";
71 cf_token = consumes<CrossingFrame<PSimHit> >(
edm::InputTag(mix_, collection_));
86 CLHEP::HepRandomEngine* engine = &rng->
getEngine(
e.streamID());
94 auto digis = std::make_unique<ME0DigiPreRecoCollection>();
97 std::map<uint32_t, edm::PSimHitContainer> hitMap;
99 hitMap[
hit.detUnitId()].push_back(
hit);
105 for (
const auto& roll : etaPartitions) {
107 const uint32_t rawId(detId.rawId());
108 const auto&
simHits(hitMap[rawId]);
110 LogDebug(
"ME0DigiPreRecoProducer") <<
"ME0DigiPreRecoProducer: found " <<
simHits.size()
111 <<
" hit(s) in eta partition" << rawId;