Skip to content

Commit 1b05576

Browse files
author
David Dobrigkeit Chinellato
committed
Add missing setter lines for propagateToDCAs
1 parent 6c0cece commit 1b05576

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

DataFormats/Reconstruction/src/TrackParametrization.cxx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,10 @@ GPUd() bool TrackParametrization<value_T>::propagateParamToDCA(const math_utils:
378378
// Estimate the impact parameter neglecting the track curvature
379379
value_t d = gpu::CAMath::Abs(x * snp - y * csp);
380380
if (d > maxD) {
381+
if (dca) { // provide default DCA for failed propag
382+
(*dca)[0] = o2::track::DefaultDCA;
383+
(*dca)[1] = o2::track::DefaultDCA;
384+
}
381385
return false;
382386
}
383387
value_t crv = getCurvature(b);
@@ -399,6 +403,10 @@ GPUd() bool TrackParametrization<value_T>::propagateParamToDCA(const math_utils:
399403
#else
400404
LOG(debug) << "failed to propagate to alpha=" << alp << " X=" << xv << " for vertex " << vtx.X() << ' ' << vtx.Y() << ' ' << vtx.Z();
401405
#endif
406+
if (dca) { // provide default DCA for failed propag
407+
(*dca)[0] = o2::track::DefaultDCA;
408+
(*dca)[1] = o2::track::DefaultDCA;
409+
}
402410
return false;
403411
}
404412
*this = tmpT;

DataFormats/Reconstruction/src/TrackParametrizationWithError.cxx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,10 @@ GPUd() bool TrackParametrizationWithError<value_T>::propagateToDCA(const o2::dat
227227
// Estimate the impact parameter neglecting the track curvature
228228
value_t d = gpu::CAMath::Abs(x * snp - y * csp);
229229
if (d > maxD) {
230+
if (dca) { // provide default DCA for failed propag
231+
dca->set(o2::track::DefaultDCA, o2::track::DefaultDCA,
232+
o2::track::DefaultDCACov, o2::track::DefaultDCACov, o2::track::DefaultDCACov);
233+
}
230234
return false;
231235
}
232236
value_t crv = this->getCurvature(b);
@@ -245,6 +249,10 @@ GPUd() bool TrackParametrizationWithError<value_T>::propagateToDCA(const o2::dat
245249
#if !defined(GPUCA_ALIGPUCODE)
246250
LOG(debug) << "failed to propagate to alpha=" << alp << " X=" << xv << vtx << " | Track is: " << tmpT.asString();
247251
#endif
252+
if (dca) { // provide default DCA for failed propag
253+
dca->set(o2::track::DefaultDCA, o2::track::DefaultDCA,
254+
o2::track::DefaultDCACov, o2::track::DefaultDCACov, o2::track::DefaultDCACov);
255+
}
248256
return false;
249257
}
250258
*this = tmpT;

0 commit comments

Comments
 (0)