48 clusterThresholds_{iConfig.
getParameter<
int>(
"clusterThreshold_layer1"),
49 iConfig.
getParameter<
int>(
"clusterThreshold_otherLayers")} {}
61 const uint32_t nDigis = digis.size();
64 auto collection = std::make_unique<edm::DetSetVector<PixelDigi>>();
65 auto outputClusters = std::make_unique<SiPixelClusterCollectionNew>();
69 for (uint32_t
i = 0;
i < nDigis;
i++) {
70 if (digis.pdigi(
i) == 0)
72 detDigis = &
collection->find_or_insert(digis.rawIdArr(
i));
73 if ((*detDigis).empty())
74 (*detDigis).data.reserve(64);
81 auto totClustersFilled = 0;
84 auto fillClusters = [&](uint32_t detId) {
90 for (int32_t ic = 0; ic < nclus + 1; ++ic) {
91 auto const& acluster = aclusters[ic];
94 edm::LogWarning(
"SiPixelDigisClustersFromSoA") <<
"cluster below charge Threshold "
95 <<
"Layer/DetId/clusId " <<
layer <<
'/' << detId <<
'/' << ic
96 <<
" size/charge " << acluster.isize <<
'/' << acluster.charge;
97 SiPixelCluster cluster(acluster.isize, acluster.adc, acluster.x, acluster.y, acluster.xmin, acluster.ymin, ic);
101 LogDebug(
"SiPixelDigisClustersFromSoA")
102 <<
"putting in this cluster " << ic <<
" " << cluster.
charge() <<
" " << cluster.
pixelADC().size();
109 for (int32_t ic = 0; ic < nclus + 1; ++ic)
110 aclusters[ic].
clear();
120 for (uint32_t
i = 0;
i < nDigis;
i++) {
121 if (digis.pdigi(
i) == 0)
123 if (digis.clus(
i) > 9000)
125 assert(digis.rawIdArr(
i) > 109999);
126 if ((*detDigis).detId() != digis.rawIdArr(
i)) {
127 fillClusters((*detDigis).detId());
129 detDigis = &
collection->find_or_insert(digis.rawIdArr(
i));
130 if ((*detDigis).empty())
131 (*detDigis).data.reserve(64);
133 edm::LogWarning(
"SiPixelDigisClustersFromSoA") <<
"Problem det present twice in input! " << (*detDigis).detId();
136 (*detDigis).data.emplace_back(digis.pdigi(
i));
137 auto const& dig = (*detDigis).data.back();
142 auto row = dig.row();
143 auto col = dig.column();
145 aclusters[digis.clus(
i)].add(pix, digis.adc(
i));
150 fillClusters((*detDigis).detId());
152 LogDebug(
"SiPixelDigisClustersFromSoA") <<
"filled " << totClustersFilled <<
" clusters";