Skip to content

Commit 60642b1

Browse files
committed
store distance of the innermost pad from the sector edge
1 parent e9a4718 commit 60642b1

File tree

4 files changed

+23
-2
lines changed

4 files changed

+23
-2
lines changed

Detectors/GlobalTrackingWorkflow/study/include/GlobalTrackingStudy/TrackInfoExt.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ struct TrackInfoExt {
4545
uint8_t pattITS = 0;
4646
uint8_t nClITS = 0;
4747
uint8_t rowMinTPC = 0;
48+
uint8_t padFromEdge = -1;
4849
uint8_t rowMaxTPC = 0;
4950
uint8_t rowCountTPC = 0;
5051

@@ -55,7 +56,7 @@ struct TrackInfoExt {
5556
float getTPCInY0() const { return innerTPCPos0[1]; }
5657
float getTPCInZ0() const { return innerTPCPos0[2]; }
5758

58-
ClassDefNV(TrackInfoExt, 4);
59+
ClassDefNV(TrackInfoExt, 5);
5960
};
6061

6162
} // namespace dataformats

Detectors/GlobalTrackingWorkflow/study/include/GlobalTrackingStudy/V0Ext.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,13 @@ struct ProngInfoExt {
2626
int nClITS = 0;
2727
int pattITS = 0;
2828
float chi2ITSTPC = 0.f;
29+
uint8_t lowestRow = -1;
30+
uint8_t padFromEdge = -1;
2931
int8_t corrGlo = -1;
3032
int8_t corrITSTPC = -1;
3133
int8_t corrITS = -1;
3234
int8_t corrTPC = -1;
33-
ClassDefNV(ProngInfoExt, 2);
35+
ClassDefNV(ProngInfoExt, 3);
3436
};
3537

3638
struct V0Ext {

Detectors/GlobalTrackingWorkflow/study/src/SVStudy.cxx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ o2::dataformats::V0Ext SVStudySpec::processV0(int iv, o2::globaltracking::RecoCo
226226
v0ext.v0 = v0sel;
227227
}
228228
v0ext.v0ID = v0id;
229+
const auto clRefs = recoData.getTPCTracksClusterRefs();
229230
o2::MCCompLabel lb[2];
230231
const o2::MCTrack* mcTrks[2];
231232
for (int ip = 0; ip < 2; ip++) {
@@ -245,6 +246,18 @@ o2::dataformats::V0Ext SVStudySpec::processV0(int iv, o2::globaltracking::RecoCo
245246
if (lb[ip].isValid()) {
246247
prInfo.corrTPC = !lb[ip].isFake();
247248
}
249+
if (mParam && mUseTPCCl) {
250+
uint8_t clSect = 0, clRow = 0;
251+
uint32_t clIdx = 0;
252+
tpcTr.getClusterReference(clRefs, tpcTr.getNClusterReferences() - 1, clSect, clRow, clIdx);
253+
const auto& clus = recoData.getTPCClusters().clusters[clSect][clRow][clIdx];
254+
prInfo.lowestRow = clRow;
255+
int npads = mParam->tpcGeometry.NPads(clRow);
256+
prInfo.padFromEdge = uint8_t(clus.getPad());
257+
if (prInfo.padFromEdge > npads / 2) {
258+
prInfo.padFromEdge = npads - 1 - prInfo.padFromEdge;
259+
}
260+
}
248261
}
249262
// get ITS tracks, if any
250263
if (gid.includesDet(DetID::ITS)) {

Detectors/GlobalTrackingWorkflow/study/src/TrackingStudy.cxx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,11 @@ void TrackingStudySpec::process(o2::globaltracking::RecoContainer& recoData)
300300
trc.getClusterReference(clRefs, trc.getNClusterReferences() - 1, clSect, clRow, clIdx);
301301
trExt.rowMinTPC = clRow;
302302
const auto& clus = tpcClusAcc.clusters[clSect][clRow][clIdx];
303+
trExt.padFromEdge = uint8_t(clus.getPad());
304+
int npads = mTPCRefitter->getParam()->tpcGeometry.NPads(clRow);
305+
if (trExt.padFromEdge > npads / 2) {
306+
trExt.padFromEdge = npads - 1 - trExt.padFromEdge;
307+
}
303308
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
304309
if (timestampTB > -1e8) {
305310
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

0 commit comments

Comments
 (0)