From 662e3472f2fdccd37b81778cedb93e55c44904e3 Mon Sep 17 00:00:00 2001 From: Paolo Andreetto Date: Mon, 13 May 2024 13:48:39 +0200 Subject: [PATCH] Fixed omega parameter in track --- src/Helpers.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Helpers.cxx b/src/Helpers.cxx index d569e22..2eae839 100644 --- a/src/Helpers.cxx +++ b/src/Helpers.cxx @@ -266,9 +266,17 @@ EVENT::Track* ACTS2Marlin_track( curr_hit->getPosition()[1], curr_hit->getPosition()[2]); + Acts::Result fieldRes = + magneticField->getField(hitPos, magCache); + if (!fieldRes.ok()) { + throw std::runtime_error("Field lookup error: " + + fieldRes.error().value()); + } + Acts::Vector3 field = *fieldRes; + EVENT::TrackState* trackState = ACTSTracking::ACTS2Marlin_trackState( EVENT::TrackState::AtOther, trk_state.smoothed(), - trk_state.smoothedCovariance(), hitPos[2] / Acts::UnitConstants::T); + trk_state.smoothedCovariance(), field[2] / Acts::UnitConstants::T); statesOnTrack.push_back(trackState); }