Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-25 09:02:55

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 #include "Acts/MagneticField/MagneticFieldQuery.hpp"
0010 
0011 Acts::MagneticFieldQuery::MagneticFieldQuery(
0012     const MagneticFieldProvider& provider, const MagneticFieldContext& mctx)
0013     : m_provider(provider),
0014       m_context(mctx),
0015       m_cache(provider.makeCache(mctx)) {}
0016 
0017 const Acts::MagneticFieldContext& Acts::MagneticFieldQuery::context() const {
0018   return m_context.get();
0019 }
0020 
0021 Acts::Result<Acts::Vector3> Acts::MagneticFieldQuery::getField(
0022     const Vector3& position) {
0023   return m_provider.get().getField(position, m_cache);
0024 }