47 uint32_t channel)
const;
59 : sipixelSimLinksToken_(
61 sistripSimLinksToken_(
63 siphase2OTSimLinksToken_(
71 trackingParticleToken_(
73 produces<ClusterTPAssociation>();
88 descriptions.
add(
"tpClusterProducerDefault", desc);
121 auto clusterTPList = std::make_unique<ClusterTPAssociation>(TPCollectionH);
131 for (std::vector<SimTrack>::const_iterator itrk = trackingParticle->g4Track_begin();
132 itrk != trackingParticle->g4Track_end();
134 std::pair<uint32_t, EncodedEventId> trkid(itrk->trackId(),
eid);
136 mapping.insert(std::make_pair(trkid, trackingParticle));
140 if (foundPixelClusters) {
146 uint32_t detid = iter->id();
153 std::set<std::pair<uint32_t, EncodedEventId> > simTkIds;
157 std::vector<std::pair<uint32_t, EncodedEventId> > trkid(
158 getSimTrackId<PixelDigiSimLink>(sipixelSimLinks, detId, channel));
161 simTkIds.insert(trkid.begin(), trkid.end());
164 for (std::set<std::pair<uint32_t, EncodedEventId> >::const_iterator iset = simTkIds.begin();
165 iset != simTkIds.end();
167 auto ipos =
mapping.find(*iset);
177 if (foundStripClusters) {
184 if (!(*iter).isValid())
186 uint32_t detid = iter->id();
193 std::set<std::pair<uint32_t, EncodedEventId> > simTkIds;
197 for (
int istr =
first; istr <
last; ++istr) {
198 std::vector<std::pair<uint32_t, EncodedEventId> > trkid(
199 getSimTrackId<StripDigiSimLink>(sistripSimLinks, detId, istr));
202 simTkIds.insert(trkid.begin(), trkid.end());
204 for (std::set<std::pair<uint32_t, EncodedEventId> >::const_iterator iset = simTkIds.begin();
205 iset != simTkIds.end();
207 auto ipos =
mapping.find(*iset);
217 if (foundPhase2OTClusters) {
225 if (!(*iter).isValid())
227 uint32_t detid = iter->id();
236 std::set<std::pair<uint32_t, EncodedEventId> > simTkIds;
238 for (
unsigned int istr(0); istr < cluster.
size(); ++istr) {
240 std::vector<std::pair<uint32_t, EncodedEventId> > trkid(
241 getSimTrackId<PixelDigiSimLink>(siphase2OTSimLinks, detId, channel));
244 simTkIds.insert(trkid.begin(), trkid.end());
247 for (std::set<std::pair<uint32_t, EncodedEventId> >::const_iterator iset = simTkIds.begin();
248 iset != simTkIds.end();
250 auto ipos =
mapping.find(*iset);
259 clusterTPList->sortAndUnique();
263 template <
typename T>
264 std::vector<std::pair<uint32_t, EncodedEventId> >
268 uint32_t channel)
const {
270 std::vector<std::pair<uint32_t, EncodedEventId> > simTrkId;
271 auto isearch = simLinks->find(detId);
272 if (isearch != simLinks->end()) {
276 if (channel == it->channel()) {
277 simTrkId.
push_back(std::make_pair(it->SimTrackId(), it->eventId()));