127 auto clusterTPList = std::make_unique<ClusterTPAssociation>();
136 auto clusterTPList = std::make_unique<ClusterTPAssociation>();
145 auto clusterTPList = std::make_unique<ClusterTPAssociation>();
154 auto clusterTPList = std::make_unique<ClusterTPAssociation>();
159 auto clusterTPList = std::make_unique<ClusterTPAssociation>(TPCollectionH);
162 std::unordered_map<UniqueSimTrackId, TrackingParticleRef, UniqueSimTrackIdHash> mapping;
163 auto const& tpColl = *TPCollectionH.
product();
166 auto const& trackingParticle = tpColl[itp];
170 for (
auto const& trk : trackingParticle.g4Tracks()) {
173 mapping.insert(std::make_pair(trkid, trackingParticleRef));
177 std::unordered_set<UniqueSimTrackId, UniqueSimTrackIdHash> simTkIds;
178 std::vector<UniqueSimTrackId> trkid;
179 if (foundPixelClusters) {
181 clusterTPList->addKeyID(pixelClusters.
id());
183 iter != pixelClusters->end();
185 uint32_t detid = iter->id();
197 getSimTrackId<PixelDigiSimLink>(trkid, sipixelSimLinks, detId, channel);
198 simTkIds.insert(trkid.begin(), trkid.end());
201 for (
auto iset = simTkIds.begin(); iset != simTkIds.end(); iset++) {
202 auto ipos = mapping.find(*iset);
203 if (ipos != mapping.end()) {
212 if (foundStripClusters) {
214 clusterTPList->addKeyID(stripClusters.
id());
216 eter = stripClusters->end(
false);
219 if (!(*iter).isValid())
221 uint32_t detid = iter->id();
232 for (
int istr = first; istr <
last; ++istr) {
234 getSimTrackId<StripDigiSimLink>(trkid, sistripSimLinks, detId, istr);
235 simTkIds.insert(trkid.begin(), trkid.end());
237 for (
auto iset = simTkIds.begin(); iset != simTkIds.end(); iset++) {
238 auto ipos = mapping.find(*iset);
239 if (ipos != mapping.end()) {
248 if (foundPhase2OTClusters) {
250 clusterTPList->addKeyID(phase2OTClusters.
id());
251 if (phase2OTClusters.
isValid()) {
253 eter = phase2OTClusters->end(
false);
256 if (!(*iter).isValid())
258 uint32_t detid = iter->id();
269 for (
unsigned int istr(0); istr < cluster.
size(); ++istr) {
272 getSimTrackId<PixelDigiSimLink>(trkid, siphase2OTSimLinks, detId, channel);
273 simTkIds.insert(trkid.begin(), trkid.end());
276 for (
auto iset = simTkIds.begin(); iset != simTkIds.end(); iset++) {
277 auto ipos = mapping.find(*iset);
278 if (ipos != mapping.end()) {
286 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.
std::pair< uint32_t, EncodedEventId > UniqueSimTrackId
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< edmNew::DetSetVector< Phase2TrackerCluster1D > > phase2OTClustersToken_
SiStripCluster const & amplitudes() const
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.
bool throwOnMissingCollections_
static int pixelToChannel(int row, int col)
edm::EDGetTokenT< edm::DetSetVector< StripDigiSimLink > > sistripSimLinksToken_