Skip to content

Commit

Permalink
Add TPC-only DCA to trackStudy output
Browse files Browse the repository at this point in the history
  • Loading branch information
shahor02 committed Nov 7, 2024
1 parent 71711a5 commit 2a8c9c0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ namespace dataformats
struct TrackInfoExt {
o2::track::TrackParCov track;
DCA dca{};
DCA dcaTPC{};
VtxTrackIndex gid;
MatchInfoTOF infoTOF;
float ttime = 0;
Expand Down
20 changes: 20 additions & 0 deletions Detectors/GlobalTrackingWorkflow/study/src/TrackingStudy.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -364,10 +364,30 @@ void TrackingStudySpec::process(o2::globaltracking::RecoContainer& recoData)
continue;
}
{
o2::dataformats::DCA dcaTPC;
dcaTPC.set(-999.f, -999.f);
if (tpcTr) {
if (is == GTrackID::TPC) {
dcaTPC = dca;
} else {
o2::track::TrackParCov tmpTPC(*tpcTr);
if (iv < nv - 1 && is == GTrackID::TPC && tpcTr && !tpcTr->hasBothSidesClusters()) { // for unconstrained TPC tracks correct track Z
float corz = vdrit * (tpcTr->getTime0() * mTPCTBinMUS - pvvec[iv].getTimeStamp().getTimeStamp());
if (tpcTr->hasASideClustersOnly()) {
corz = -corz; // A-side
}
tmpTPC.setZ(tmpTPC.getZ() + corz);
}
if (!prop->propagateToDCA(iv == nv - 1 ? vtxDummy : pvvec[iv], tmpTPC, prop->getNominalBz(), 2., o2::base::PropagatorF::MatCorrType::USEMatCorrLUT, &dcaTPC)) {
dcaTPC.set(-999.f, -999.f);
}
}
}
auto& trcExt = trcExtVec.emplace_back();
recoData.getTrackTime(vid, trcExt.ttime, trcExt.ttimeE);
trcExt.track = trc;
trcExt.dca = dca;
trcExt.dcaTPC = dcaTPC;
trcExt.gid = vid;
trcExt.xmin = xmin;
auto gidRefs = recoData.getSingleDetectorRefs(vid);
Expand Down

0 comments on commit 2a8c9c0

Please sign in to comment.