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 ) {
138 iter != pixelClusters->end(); ++iter) {
139 uint32_t detid = iter->id();
143 di != link_pixel.
end(); ++di) {
148 std::set<std::pair<uint32_t, EncodedEventId> > simTkIds;
152 std::vector<std::pair<uint32_t, EncodedEventId> > trkid(getSimTrackId<PixelDigiSimLink>(sipixelSimLinks, detId, channel));
153 if (trkid.size()==0)
continue;
154 simTkIds.insert(trkid.begin(),trkid.end());
157 for (std::set<std::pair<uint32_t, EncodedEventId> >::const_iterator iset = simTkIds.begin();
158 iset != simTkIds.end(); iset++) {
159 auto ipos = mapping.find(*iset);
160 if (ipos != mapping.end()) {
169 if ( foundStripClusters ) {
172 iter != eter; ++iter) {
173 if (!(*iter).isValid())
continue;
174 uint32_t detid = iter->id();
178 di != link_strip.
end(); di++) {
183 std::set<std::pair<uint32_t, EncodedEventId> > simTkIds;
187 for (
int istr = first; istr <
last; ++istr) {
188 std::vector<std::pair<uint32_t, EncodedEventId> > trkid(getSimTrackId<StripDigiSimLink>(sistripSimLinks, detId, istr));
189 if (trkid.size()==0)
continue;
190 simTkIds.insert(trkid.begin(),trkid.end());
192 for (std::set<std::pair<uint32_t, EncodedEventId> >::const_iterator iset = simTkIds.begin();
193 iset != simTkIds.end(); iset++) {
194 auto ipos = mapping.find(*iset);
195 if (ipos != mapping.end()) {
204 if ( foundPhase2OTClusters ) {
207 if(phase2OTClusters.
isValid()){
209 iter != eter; ++iter) {
210 if (!(*iter).isValid())
continue;
211 uint32_t detid = iter->id();
215 di != link_phase2.
end(); di++) {
220 std::set<std::pair<uint32_t, EncodedEventId> > simTkIds;
222 for (
unsigned int istr(0); istr < cluster.
size(); ++istr) {
224 std::vector<std::pair<uint32_t, EncodedEventId> > trkid(getSimTrackId<PixelDigiSimLink>(siphase2OTSimLinks, detId, channel));
225 if (trkid.size()==0)
continue;
226 simTkIds.insert(trkid.begin(),trkid.end());
229 for (std::set<std::pair<uint32_t, EncodedEventId> >::const_iterator iset = simTkIds.begin();
230 iset != simTkIds.end(); iset++) {
231 auto ipos = mapping.find(*iset);
232 if (ipos != mapping.end()) {
241 clusterTPList->sort();
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