116 auto clusterTPList = std::make_unique<ClusterTPAssociation>(TPCollectionH);
121 itp < TPCollectionH.
product()->size(); ++itp) {
127 for (std::vector<SimTrack>::const_iterator itrk = trackingParticle->g4Track_begin();
128 itrk != trackingParticle->g4Track_end(); ++itrk) {
129 std::pair<uint32_t, EncodedEventId> trkid(itrk->trackId(),
eid);
131 mapping.insert(std::make_pair(trkid, trackingParticle));
135 if ( foundPixelClusters ) {
137 clusterTPList->addKeyID(pixelClusters.
id());
139 iter != pixelClusters->end(); ++iter) {
140 uint32_t detid = iter->id();
144 di != link_pixel.
end(); ++di) {
149 std::set<std::pair<uint32_t, EncodedEventId> > simTkIds;
153 std::vector<std::pair<uint32_t, EncodedEventId> > trkid(getSimTrackId<PixelDigiSimLink>(sipixelSimLinks, detId, channel));
154 if (trkid.empty())
continue;
155 simTkIds.insert(trkid.begin(),trkid.end());
158 for (std::set<std::pair<uint32_t, EncodedEventId> >::const_iterator iset = simTkIds.begin();
159 iset != simTkIds.end(); iset++) {
160 auto ipos = mapping.find(*iset);
161 if (ipos != mapping.end()) {
170 if ( foundStripClusters ) {
172 clusterTPList->addKeyID(stripClusters.
id());
174 iter != eter; ++iter) {
175 if (!(*iter).isValid())
continue;
176 uint32_t detid = iter->id();
180 di != link_strip.
end(); di++) {
185 std::set<std::pair<uint32_t, EncodedEventId> > simTkIds;
189 for (
int istr = first; istr <
last; ++istr) {
190 std::vector<std::pair<uint32_t, EncodedEventId> > trkid(getSimTrackId<StripDigiSimLink>(sistripSimLinks, detId, istr));
191 if (trkid.empty())
continue;
192 simTkIds.insert(trkid.begin(),trkid.end());
194 for (std::set<std::pair<uint32_t, EncodedEventId> >::const_iterator iset = simTkIds.begin();
195 iset != simTkIds.end(); iset++) {
196 auto ipos = mapping.find(*iset);
197 if (ipos != mapping.end()) {
206 if ( foundPhase2OTClusters ) {
208 clusterTPList->addKeyID(phase2OTClusters.
id());
209 if(phase2OTClusters.
isValid()){
211 iter != eter; ++iter) {
212 if (!(*iter).isValid())
continue;
213 uint32_t detid = iter->id();
217 di != link_phase2.
end(); di++) {
222 std::set<std::pair<uint32_t, EncodedEventId> > simTkIds;
224 for (
unsigned int istr(0); istr < cluster.
size(); ++istr) {
226 std::vector<std::pair<uint32_t, EncodedEventId> > trkid(getSimTrackId<PixelDigiSimLink>(siphase2OTSimLinks, detId, channel));
227 if (trkid.empty())
continue;
228 simTkIds.insert(trkid.begin(),trkid.end());
231 for (std::set<std::pair<uint32_t, EncodedEventId> >::const_iterator iset = simTkIds.begin();
232 iset != simTkIds.end(); iset++) {
233 auto ipos = mapping.find(*iset);
234 if (ipos != mapping.end()) {
243 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)
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
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_
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