From 60642b1eacfbbea9418c17af8d084ff5e207529a Mon Sep 17 00:00:00 2001 From: shahoian Date: Sun, 9 Feb 2025 19:32:39 +0100 Subject: [PATCH] store distance of the innermost pad from the sector edge --- .../include/GlobalTrackingStudy/TrackInfoExt.h | 3 ++- .../study/include/GlobalTrackingStudy/V0Ext.h | 4 +++- .../GlobalTrackingWorkflow/study/src/SVStudy.cxx | 13 +++++++++++++ .../study/src/TrackingStudy.cxx | 5 +++++ 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/Detectors/GlobalTrackingWorkflow/study/include/GlobalTrackingStudy/TrackInfoExt.h b/Detectors/GlobalTrackingWorkflow/study/include/GlobalTrackingStudy/TrackInfoExt.h index 6fd06e5265946..935e57873bbd9 100644 --- a/Detectors/GlobalTrackingWorkflow/study/include/GlobalTrackingStudy/TrackInfoExt.h +++ b/Detectors/GlobalTrackingWorkflow/study/include/GlobalTrackingStudy/TrackInfoExt.h @@ -45,6 +45,7 @@ struct TrackInfoExt { uint8_t pattITS = 0; uint8_t nClITS = 0; uint8_t rowMinTPC = 0; + uint8_t padFromEdge = -1; uint8_t rowMaxTPC = 0; uint8_t rowCountTPC = 0; @@ -55,7 +56,7 @@ struct TrackInfoExt { float getTPCInY0() const { return innerTPCPos0[1]; } float getTPCInZ0() const { return innerTPCPos0[2]; } - ClassDefNV(TrackInfoExt, 4); + ClassDefNV(TrackInfoExt, 5); }; } // namespace dataformats diff --git a/Detectors/GlobalTrackingWorkflow/study/include/GlobalTrackingStudy/V0Ext.h b/Detectors/GlobalTrackingWorkflow/study/include/GlobalTrackingStudy/V0Ext.h index 79221b893882d..b1a9f6923f04d 100644 --- a/Detectors/GlobalTrackingWorkflow/study/include/GlobalTrackingStudy/V0Ext.h +++ b/Detectors/GlobalTrackingWorkflow/study/include/GlobalTrackingStudy/V0Ext.h @@ -26,11 +26,13 @@ struct ProngInfoExt { int nClITS = 0; int pattITS = 0; float chi2ITSTPC = 0.f; + uint8_t lowestRow = -1; + uint8_t padFromEdge = -1; int8_t corrGlo = -1; int8_t corrITSTPC = -1; int8_t corrITS = -1; int8_t corrTPC = -1; - ClassDefNV(ProngInfoExt, 2); + ClassDefNV(ProngInfoExt, 3); }; struct V0Ext { diff --git a/Detectors/GlobalTrackingWorkflow/study/src/SVStudy.cxx b/Detectors/GlobalTrackingWorkflow/study/src/SVStudy.cxx index 12a883ec991f6..d4d8eaf92e0d6 100644 --- a/Detectors/GlobalTrackingWorkflow/study/src/SVStudy.cxx +++ b/Detectors/GlobalTrackingWorkflow/study/src/SVStudy.cxx @@ -226,6 +226,7 @@ o2::dataformats::V0Ext SVStudySpec::processV0(int iv, o2::globaltracking::RecoCo v0ext.v0 = v0sel; } v0ext.v0ID = v0id; + const auto clRefs = recoData.getTPCTracksClusterRefs(); o2::MCCompLabel lb[2]; const o2::MCTrack* mcTrks[2]; for (int ip = 0; ip < 2; ip++) { @@ -245,6 +246,18 @@ o2::dataformats::V0Ext SVStudySpec::processV0(int iv, o2::globaltracking::RecoCo if (lb[ip].isValid()) { prInfo.corrTPC = !lb[ip].isFake(); } + if (mParam && mUseTPCCl) { + uint8_t clSect = 0, clRow = 0; + uint32_t clIdx = 0; + tpcTr.getClusterReference(clRefs, tpcTr.getNClusterReferences() - 1, clSect, clRow, clIdx); + const auto& clus = recoData.getTPCClusters().clusters[clSect][clRow][clIdx]; + prInfo.lowestRow = clRow; + int npads = mParam->tpcGeometry.NPads(clRow); + prInfo.padFromEdge = uint8_t(clus.getPad()); + if (prInfo.padFromEdge > npads / 2) { + prInfo.padFromEdge = npads - 1 - prInfo.padFromEdge; + } + } } // get ITS tracks, if any if (gid.includesDet(DetID::ITS)) { diff --git a/Detectors/GlobalTrackingWorkflow/study/src/TrackingStudy.cxx b/Detectors/GlobalTrackingWorkflow/study/src/TrackingStudy.cxx index 8df1e980ecb8a..36530bfe9238b 100644 --- a/Detectors/GlobalTrackingWorkflow/study/src/TrackingStudy.cxx +++ b/Detectors/GlobalTrackingWorkflow/study/src/TrackingStudy.cxx @@ -300,6 +300,11 @@ void TrackingStudySpec::process(o2::globaltracking::RecoContainer& recoData) trc.getClusterReference(clRefs, trc.getNClusterReferences() - 1, clSect, clRow, clIdx); trExt.rowMinTPC = clRow; const auto& clus = tpcClusAcc.clusters[clSect][clRow][clIdx]; + trExt.padFromEdge = uint8_t(clus.getPad()); + int npads = mTPCRefitter->getParam()->tpcGeometry.NPads(clRow); + if (trExt.padFromEdge > npads / 2) { + trExt.padFromEdge = npads - 1 - trExt.padFromEdge; + } 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 if (timestampTB > -1e8) { 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