Skip to content

Commit cdb8943

Browse files
committed
Tmp.fix in TrackParCov c-tor from Cartesian cov.matrix
Avoid div. by 0 in case of neutral track. Math to check
1 parent 0fe332f commit cdb8943

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

DataFormats/Reconstruction/src/TrackParametrizationWithError.cxx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,9 +377,11 @@ GPUd() TrackParametrizationWithError<value_T>::TrackParametrizationWithError(con
377377
double m24 = pt * (cs - this->getSnp() * sn / r), m44 = -pt * pt * (r * sn + this->getSnp() * cs);
378378
double m35 = pt, m45 = -pt * pt * this->getTgl();
379379
//
380-
m43 *= charge;
381-
m44 *= charge;
382-
m45 *= charge;
380+
if (charge) { // RS: this is a hack, proper treatment to be implemented
381+
m43 *= charge;
382+
m44 *= charge;
383+
m45 *= charge;
384+
}
383385
//
384386
double a1 = cv[13] - cv[9] * (m23 * m44 + m43 * m24) / m23 / m43;
385387
double a2 = m23 * m24 - m23 * (m23 * m44 + m43 * m24) / m43;

0 commit comments

Comments
 (0)