@@ -493,6 +493,7 @@ int main(int argc, char* argv[]) {
493493 vector<float >* ph2_yz = 0 ;
494494 vector<float >* ph2_zz = 0 ;
495495 vector<float >* ph2_zx = 0 ;
496+ vector<size_t >* ph2_clustSize = 0 ;
496497 vector<uint64_t >* ph2_usedMask = 0 ;
497498 vector<vector<int >>* ph2_simHitIdx = 0 ;
498499 if (hasPh2hits && applyCCC)
@@ -512,6 +513,9 @@ int main(int argc, char* argv[]) {
512513 t->SetBranchAddress (" ph2_yz" , &ph2_yz);
513514 t->SetBranchAddress (" ph2_zz" , &ph2_zz);
514515 t->SetBranchAddress (" ph2_zx" , &ph2_zx);
516+ if (t->GetBranch (" ph2_clustSize" )) {
517+ t->SetBranchAddress (" ph2_clustSize" , &ph2_clustSize);
518+ }
515519 if (writeHitIterMasks) {
516520 t->SetBranchAddress (" ph2_usedMask" , &ph2_usedMask);
517521 }
@@ -1173,7 +1177,7 @@ int main(int argc, char* argv[]) {
11731177 recHitLayIdx[ph2HitRecIdx[iph2][ih].first ][ph2HitRecIdx[iph2][ih].second ] = {ihit, ilay};
11741178 }
11751179 Hit hit (pos, err, totHits);
1176- hit.setupAsStrip (imoduleid, 0 , 1 );
1180+ hit.setupAsStrip (imoduleid, 0 , ph2_clustSize ? ph2_clustSize-> at (iph2) : 1 );
11771181 layerHits_[ilay].push_back (hit);
11781182 if (writeHitIterMasks)
11791183 layerHitMasks_[ilay].push_back (ph2_usedMask->at (iph2));
0 commit comments