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) {
edm::DetSet< StripDigiSimLink > StripDigiSimLinks
void push_back(const T &t)
StripDigiSimLinks stripDigiSimLinks_
void simulate(const GEMEtaPartition *, const edm::PSimHitContainer &, CLHEP::HepRandomEngine *)
void addLinks(unsigned int strip, int bx)
creates links from Digi to SimTrack
GEMDigiSimLinks theGemDigiSimLinks_
GEMDigiModule(const edm::ParameterSet &)
void addLinksWithPartId(unsigned int strip, int bx)
edm::DetSet< GEMDigiSimLink > GEMDigiSimLinks
constexpr uint32_t rawId() const
get the raw id
void fillDigis(int rollDetId, GEMDigiCollection &)
DetectorHitMap detectorHitMap_
std::vector< PSimHit > PSimHitContainer
void setGeometry(const GEMGeometry *)