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) {
142 clusterTPList->addKeyID(pixelClusters.
id());
144 iter != pixelClusters->end();
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);
168 if (ipos != mapping.end()) {
177 if (foundStripClusters) {
179 clusterTPList->addKeyID(stripClusters.
id());
181 eter = stripClusters->end(
false);
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);
208 if (ipos != mapping.end()) {
217 if (foundPhase2OTClusters) {
219 clusterTPList->addKeyID(phase2OTClusters.
id());
220 if (phase2OTClusters.
isValid()) {
222 eter = phase2OTClusters->end(
false);
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);
251 if (ipos != mapping.end()) {
259 clusterTPList->sortAndUnique();
edm::Ref< typename HandleT::element_type, typename HandleT::element_type::value_type::value_type > makeRefTo(const HandleT &iHandle, typename HandleT::element_type::value_type::const_iterator itIter)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< edmNew::DetSetVector< Phase2TrackerCluster1D > > phase2OTClustersToken_
uint16_t firstStrip() const
data_type const * const_iterator
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > siphase2OTSimLinksToken_
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > pixelClustersToken_
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > stripClustersToken_
unsigned int firstRow() const
unsigned int column() const
static PackedDigiType pixelToChannel(unsigned int row, unsigned int col)
edm::EDGetTokenT< TrackingParticleCollection > trackingParticleToken_
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
T const * product() const
edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > sipixelSimLinksToken_
Pixel cluster – collection of neighboring pixels above threshold.
static int pixelToChannel(int row, int col)
edm::EDGetTokenT< edm::DetSetVector< StripDigiSimLink > > sistripSimLinksToken_
const std::vector< uint8_t > & amplitudes() const