9 if (d.second == -999)
continue;
12 GEMDigi digi(d.first, d.second);
13 digis.insertDigi(
GEMDetId(rollDetId), digi);
22 std::pair<unsigned int, int> digi(strip, bx);
26 std::map<int, float> simTrackChargeMap;
27 std::map<int, EncodedEventId> eventIdMap;
28 float totalCharge(0.);
29 for(
auto hitItr = channelHitItr.first; hitItr != channelHitItr.second; ++hitItr)
33 if(hit ==
nullptr)
continue;
37 const float charge(1.
f);
38 auto chargeItr = simTrackChargeMap.find(simTrackId);
39 if( chargeItr == simTrackChargeMap.end() )
41 simTrackChargeMap[simTrackId] = charge;
42 eventIdMap[simTrackId] = hit->
eventId();
46 chargeItr->second += charge;
48 totalCharge += charge;
51 for(
auto &charge: simTrackChargeMap)
53 const int simTrackId(charge.first);
54 auto link(
StripDigiSimLink(strip, simTrackId, eventIdMap[simTrackId], charge.second/totalCharge));
void push_back(const T &t)
EncodedEventId eventId() const
void addLinks(unsigned int strip, int bx)
creates links from Digi to SimTrack
std::set< std::pair< int, int > > strips_
unsigned int trackId() const
void fillDigis(int rollDetId, GEMDigiCollection &)
DetectorHitMap detectorHitMap_
StripDigiSimLinks stripDigiSimLinks_