@@ -360,20 +360,28 @@ GPUdii() void GPUTPCNNClusterizerKernels::Thread<GPUTPCNNClusterizerKernels::pub
360360 return ;
361361 }
362362
363+ bool notSinglePad = false , notSingleTime = false ;
364+ for (uint16_t i = 0 ; i < 8 ; i++) {
365+ Delta2 d = cfconsts::InnerNeighbors[i];
366+ CfChargePos tmp_pos = peak.delta (d);
367+ notSinglePad |= (d.x != 0 ) && (static_cast <float >(chargeMap[tmp_pos].unpack ()) > 0 );
368+ notSingleTime |= (d.y != 0 ) && (static_cast <float >(chargeMap[tmp_pos].unpack ()) > 0 );
369+ }
370+
363371 if (dtype == 0 ) {
364372 pc.setFull (central_charge * clustererNN.mOutputDataReg1_16 [model_output_index + 4 ].ToFloat (),
365373 static_cast <float >(peak.pad ()) + clustererNN.mOutputDataReg1_16 [model_output_index].ToFloat (),
366- clustererNN.mOutputDataReg1_16 [model_output_index + 2 ].ToFloat (),
374+ notSinglePad ? clustererNN.mOutputDataReg1_16 [model_output_index + 2 ].ToFloat () : 0 ,
367375 (clusterer.mPmemory ->fragment ).start + static_cast <float >(peak.time ()) + clustererNN.mOutputDataReg1_16 [model_output_index + 1 ].ToFloat (),
368- clustererNN.mOutputDataReg1_16 [model_output_index + 3 ].ToFloat (),
376+ notSingleTime ? clustererNN.mOutputDataReg1_16 [model_output_index + 3 ].ToFloat () : 0 . f ,
369377 clustererNN.mClusterFlags [2 * glo_idx],
370378 clustererNN.mClusterFlags [2 * glo_idx + 1 ]);
371379 } else if (dtype == 1 ) {
372380 pc.setFull (central_charge * clustererNN.mOutputDataReg1_32 [model_output_index + 4 ],
373381 static_cast <float >(peak.pad ()) + clustererNN.mOutputDataReg1_32 [model_output_index],
374- clustererNN.mOutputDataReg1_32 [model_output_index + 2 ],
382+ notSinglePad ? clustererNN.mOutputDataReg1_32 [model_output_index + 2 ] : 0 . f ,
375383 (clusterer.mPmemory ->fragment ).start + static_cast <float >(peak.time ()) + clustererNN.mOutputDataReg1_32 [model_output_index + 1 ],
376- clustererNN.mOutputDataReg1_32 [model_output_index + 3 ],
384+ notSingleTime ? clustererNN.mOutputDataReg1_32 [model_output_index + 3 ] : 0 . f ,
377385 clustererNN.mClusterFlags [2 * glo_idx],
378386 clustererNN.mClusterFlags [2 * glo_idx + 1 ]);
379387 }
0 commit comments