Skip to content

Commit c595deb

Browse files
committed
Fix shared clusters calculation in TrackingStudy
1 parent f83ef77 commit c595deb

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Detectors/GlobalTrackingWorkflow/study/src/TrackingStudy.cxx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,8 @@ void TrackingStudySpec::process(o2::globaltracking::RecoContainer& recoData)
254254

255255
auto fillTPCClInfo = [&recoData, this](const o2::tpc::TrackTPC& trc, o2::dataformats::TrackInfoExt& trExt, float timestampTB = -1e9) {
256256
const auto clRefs = recoData.getTPCTracksClusterRefs();
257-
const auto shMap = recoData.clusterShMapTPC.data();
257+
const auto tpcClusAcc = recoData.getTPCClusters();
258+
const auto shMap = recoData.clusterShMapTPC;
258259
if (recoData.inputsTPCclusters) {
259260
uint8_t clSect = 0, clRow = 0, clRowP = -1;
260261
uint32_t clIdx = 0;
@@ -264,13 +265,14 @@ void TrackingStudySpec::process(o2::globaltracking::RecoContainer& recoData)
264265
trExt.rowCountTPC++;
265266
clRowP = clRow;
266267
}
267-
if (shMap[clRefs[ic + trc.getClusterRef().getFirstEntry()]]) {
268+
unsigned int absoluteIndex = tpcClusAcc.clusterOffset[clSect][clRow] + clIdx;
269+
if (shMap[absoluteIndex] & GPUCA_NAMESPACE::gpu::GPUTPCGMMergedTrackHit::flagShared) {
268270
trExt.nClTPCShared++;
269271
}
270272
}
271273
trc.getClusterReference(clRefs, trc.getNClusterReferences() - 1, clSect, clRow, clIdx);
272274
trExt.rowMinTPC = clRow;
273-
const auto& clus = recoData.inputsTPCclusters->clusterIndex.clusters[clSect][clRow][clIdx];
275+
const auto& clus = tpcClusAcc.clusters[clSect][clRow][clIdx];
274276
this->mTPCCorrMapsLoader.Transform(clSect, clRow, clus.getPad(), clus.getTime(), trExt.innerTPCPos0[0], trExt.innerTPCPos0[1], trExt.innerTPCPos0[2], trc.getTime0()); // nominal time of the track
275277
if (timestampTB > -1e8) {
276278
this->mTPCCorrMapsLoader.Transform(clSect, clRow, clus.getPad(), clus.getTime(), trExt.innerTPCPos[0], trExt.innerTPCPos[1], trExt.innerTPCPos[2], timestampTB); // time assigned from the global track track
@@ -284,7 +286,6 @@ void TrackingStudySpec::process(o2::globaltracking::RecoContainer& recoData)
284286

285287
auto getTPCPairSharing = [&recoData, this](const o2::tpc::TrackTPC& trc0, const o2::tpc::TrackTPC& trc1) {
286288
const auto clRefs = recoData.getTPCTracksClusterRefs();
287-
const auto shMap = recoData.clusterShMapTPC.data();
288289
uint8_t nsh = 0, nshRows = 0, lastSharedRow = -1;
289290
if (recoData.inputsTPCclusters) {
290291
uint8_t clSect0 = 0, clRow0 = 0, clSect1 = 0, clRow1 = 0;

0 commit comments

Comments
 (0)