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_) {
16 models.push_back(std::make_unique<GEMBkgModel>(config));
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) {
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) {
100 model->setGeometry(geom);
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
constexpr uint32_t rawId() const
get the raw id
GEMDigiSimLinks theGemDigiSimLinks_
GEMDigiModule(const edm::ParameterSet &)
std::vector< std::unique_ptr< GEMDigiModel > > models
void addLinksWithPartId(unsigned int strip, int bx)
edm::DetSet< GEMDigiSimLink > GEMDigiSimLinks
EncodedEventId eventId() const
T getParameter(std::string const &) const
tuple config
parse the configuration file
void fillDigis(int rollDetId, GEMDigiCollection &)
unsigned int trackId() const
DetectorHitMap detectorHitMap_
std::vector< PSimHit > PSimHitContainer
void setGeometry(const GEMGeometry *)