10 bool simulateBkgNoise_(
config.getParameter<
bool>(
"simulateBkgNoise"));
11 bool simulateIntrinsicNoise_(
config.getParameter<
bool>(
"simulateIntrinsicNoise"));
12 if (simulateIntrinsicNoise_) {
13 models.push_back(std::make_unique<GEMNoiseModel>(
config));
15 if (simulateBkgNoise_) {
18 models.push_back(std::make_unique<GEMSignalModel>(
config));
25 CLHEP::HepRandomEngine* engine) {
43 digis.insertDigi(
GEMDetId(rollDetId), digi);
51 std::pair<unsigned int, int> digi(
strip,
bx);
55 std::map<int, float> simTrackChargeMap;
56 std::map<int, EncodedEventId> eventIdMap;
57 float totalCharge(0.);
58 for (
auto hitItr = channelHitItr.first; hitItr != channelHitItr.second; ++hitItr) {
64 int simTrackId(
hit->trackId());
67 auto chargeItr = simTrackChargeMap.find(simTrackId);
68 if (chargeItr == simTrackChargeMap.end()) {
69 simTrackChargeMap[simTrackId] =
charge;
70 eventIdMap[simTrackId] =
hit->eventId();
72 chargeItr->second +=
charge;
77 for (
const auto&
charge : simTrackChargeMap) {
78 const int simTrackId(
charge.first);
85 std::pair<unsigned int, int> digi(
strip,
bx);
86 std::pair<DetectorHitMap::iterator, DetectorHitMap::iterator> channelHitItr =
detectorHitMap_.equal_range(digi);
88 for (DetectorHitMap::iterator hitItr = channelHitItr.first; hitItr != channelHitItr.second; ++hitItr) {
96 hit->momentumAtEntry(),
103 hit->processType()));