111 auto const&
input = *hclusters;
115 int numberOfDetUnits = 0;
116 int numberOfClusters = 0;
117 for (
auto const& dsv :
input) {
119 unsigned int detid = dsv.detId();
120 DetId detIdObject(detid);
122 auto gind = genericDet->
index();
128 auto nhits = lc - fc;
131 LogDebug(
"SiPixelRecHitFromCUDA") <<
"in det " << gind <<
": conv " <<
nhits <<
" hits from " << dsv.size()
132 <<
" legacy clusters" <<
' ' << fc <<
',' << lc;
133 if (
nhits > maxHitsInModule)
135 "Too many clusters %d in module %d. Only the first %d hits will be converted",
nhits, gind, maxHitsInModule);
138 LogDebug(
"SiPixelRecHitFromCUDA") <<
"in det " << gind <<
"conv " <<
nhits <<
" hits from " << dsv.size()
139 <<
" legacy clusters" <<
' ' << lc <<
',' << fc;
143 auto jnd = [&](
int k) {
return fc +
k; };
145 if (
nhits != dsv.size()) {
148 for (
auto const& clust : dsv) {
149 assert(clust.originalId() >= 0);
150 assert(clust.originalId() < dsv.size());
151 if (clust.originalId() >=
nhits)
153 auto ij = jnd(clust.originalId());
170 recHitsOnDetUnit.emplace_back(lp, le, rqw, *genericDet, cluster);
173 LogDebug(
"SiPixelRecHitFromCUDA") <<
"cluster " << numberOfClusters <<
" at " << lp <<
' ' << le;
178 LogDebug(
"SiPixelRecHitFromCUDA") <<
"found " << recHitsOnDetUnit.size() <<
" RecHits on " << detid;
182 LogDebug(
"SiPixelRecHitFromCUDA") <<
"found " << numberOfDetUnits <<
" dets, " << numberOfClusters <<
" clusters";
const edm::EDGetTokenT< SiPixelClusterCollectionNew > clusterToken_
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)
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
constexpr uint32_t maxHitsInModule()
static std::string const input
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
cms::cuda::host::unique_ptr< float[]> store32_
constexpr uint16_t maxNumModules
OrphanHandle< PROD > emplace(EDPutTokenT< PROD > token, Args &&...args)
puts a new product
cms::cuda::host::unique_ptr< uint32_t[]> hitsModuleStart_
Pixel cluster – collection of neighboring pixels above threshold.
unsigned int QualWordType
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
const edm::EDPutTokenT< HMSstorage > hostPutToken_
Log< level::Warning, false > LogWarning
const edm::EDPutTokenT< SiPixelRecHitCollection > rechitsPutToken_