Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ class DCA

GPUd() void setY(float y) { mY = y; }
GPUd() void setZ(float z) { mZ = z; }
GPUd() void setSigmaY2(float v) { mCov[0] = v; }
GPUd() void setSigmaYZ(float v) { mCov[1] = v; }
GPUd() void setSigmaZ2(float v) { mCov[2] = v; }
GPUd() void addCov(const std::array<float, 3>& vadd)
{
mCov[0] += vadd[0];
mCov[1] += vadd[1];
mCov[2] += vadd[2];
}
GPUd() auto getY() const { return mY; }
GPUd() auto getZ() const { return mZ; }
GPUd() auto getR2() const { return mY * mY + mZ * mZ; }
Expand Down
3 changes: 2 additions & 1 deletion Detectors/GlobalTracking/src/MatchCosmics.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,11 @@ void MatchCosmics::process(const o2::globaltracking::RecoContainer& data)
break;
}
if (trc.origID.getSource() == GTrackID::TPC) { // correct the track Z position for the vertex time
const auto& trcTPC = data.getTPCTrack(trc.origID.getSource());
const auto& trcTPC = data.getTPCTrack(trc.origID);
float deltaZ = trcTPC.hasBothSidesClusters() ? 0.f : (pv.getTimeStamp().getTimeStamp() - trcTPC.getTime0() * 8 * o2::constants::lhc::LHCBunchSpacingMUS) * mTPCVDrift;
dca.setZ(dca.getZ() + (trcTPC.hasASideClustersOnly() ? deltaZ : -deltaZ));
}
dca.addCov({mMatchParams->systSigma2[0], 0.f, mMatchParams->systSigma2[1]});
if (dca.calcChi2() < mMatchParams->dcaCutChi2[trc.origID.getSource()]) {
trc.matchID = Reject;
break;
Expand Down