Skip to content
Snippets Groups Projects
Commit a2fa5ce8 authored by Adam Edward Barton's avatar Adam Edward Barton
Browse files

Merge branch 'main-fix-cnv-missing-cov' into 'main'

ActsEventCnv: Only try to convert covariance if it exists

See merge request !65622
parents dbe7bf86 3a14fdef
No related branches found
No related tags found
4 merge requests!66406ZDC & ZDC LED monitoring updates,!66102ZDC & RPD monitoring update,!65937Draft: Updated post-processing and plotting scripts for 2023 data in ZLumi_Scripts directory,!65622ActsEventCnv: Only try to convert covariance if it exists
......@@ -257,15 +257,18 @@ ActsTrk::ActsToTrkConverterTool::trkTrackParametersToActsParameters(
}
Acts::BoundSquareMatrix cov = Acts::BoundSquareMatrix::Identity();
cov.topLeftCorner(5, 5) = *atlasParameter.covariance();
// Convert the covariance matrix from MeV
// FIXME: This needs to handle the annulus case as well - currently the cov is wrong for annulus surfaces
for (int i = 0; i < cov.rows(); i++) {
cov(i, 4) = cov(i, 4) / 1_MeV;
}
for (int i = 0; i < cov.cols(); i++) {
cov(4, i) = cov(4, i) / 1_MeV;
if (atlasParameter.covariance()) {
cov.topLeftCorner(5, 5) = *atlasParameter.covariance();
// Convert the covariance matrix from MeV
// FIXME: This needs to handle the annulus case as well - currently the cov
// is wrong for annulus surfaces
for (int i = 0; i < cov.rows(); i++) {
cov(i, 4) = cov(i, 4) / 1_MeV;
}
for (int i = 0; i < cov.cols(); i++) {
cov(4, i) = cov(4, i) / 1_MeV;
}
}
return Acts::BoundTrackParameters(actsSurface, params,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment