Skip to content

Commit 2a8c9c0

Browse files
committed
Add TPC-only DCA to trackStudy output
1 parent 71711a5 commit 2a8c9c0

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ namespace dataformats
2727
struct TrackInfoExt {
2828
o2::track::TrackParCov track;
2929
DCA dca{};
30+
DCA dcaTPC{};
3031
VtxTrackIndex gid;
3132
MatchInfoTOF infoTOF;
3233
float ttime = 0;

Detectors/GlobalTrackingWorkflow/study/src/TrackingStudy.cxx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,10 +364,30 @@ void TrackingStudySpec::process(o2::globaltracking::RecoContainer& recoData)
364364
continue;
365365
}
366366
{
367+
o2::dataformats::DCA dcaTPC;
368+
dcaTPC.set(-999.f, -999.f);
369+
if (tpcTr) {
370+
if (is == GTrackID::TPC) {
371+
dcaTPC = dca;
372+
} else {
373+
o2::track::TrackParCov tmpTPC(*tpcTr);
374+
if (iv < nv - 1 && is == GTrackID::TPC && tpcTr && !tpcTr->hasBothSidesClusters()) { // for unconstrained TPC tracks correct track Z
375+
float corz = vdrit * (tpcTr->getTime0() * mTPCTBinMUS - pvvec[iv].getTimeStamp().getTimeStamp());
376+
if (tpcTr->hasASideClustersOnly()) {
377+
corz = -corz; // A-side
378+
}
379+
tmpTPC.setZ(tmpTPC.getZ() + corz);
380+
}
381+
if (!prop->propagateToDCA(iv == nv - 1 ? vtxDummy : pvvec[iv], tmpTPC, prop->getNominalBz(), 2., o2::base::PropagatorF::MatCorrType::USEMatCorrLUT, &dcaTPC)) {
382+
dcaTPC.set(-999.f, -999.f);
383+
}
384+
}
385+
}
367386
auto& trcExt = trcExtVec.emplace_back();
368387
recoData.getTrackTime(vid, trcExt.ttime, trcExt.ttimeE);
369388
trcExt.track = trc;
370389
trcExt.dca = dca;
390+
trcExt.dcaTPC = dcaTPC;
371391
trcExt.gid = vid;
372392
trcExt.xmin = xmin;
373393
auto gidRefs = recoData.getSingleDetectorRefs(vid);

0 commit comments

Comments
 (0)