FairShip
Loading...
Searching...
No Matches
ActsShipField.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// SPDX-FileCopyrightText: Copyright CERN for the benefit of the SHiP
3// Collaboration
4
5#ifndef ACTSTRACKING_ACTSSHIPFIELD_HPP_
6#define ACTSTRACKING_ACTSSHIPFIELD_HPP_
7
8#include "Acts/MagneticField/MagneticFieldContext.hpp"
9#include "Acts/MagneticField/MagneticFieldProvider.hpp"
10#include "Acts/Utilities/Result.hpp"
11
12class TVirtualMagField;
13
14namespace SHiP {
15
22class ActsShipField final : public Acts::MagneticFieldProvider {
23 public:
25 explicit ActsShipField(TVirtualMagField* field);
26
27 Cache makeCache(const Acts::MagneticFieldContext& mctx) const override;
28 Acts::Result<Acts::Vector3> getField(const Acts::Vector3& position,
29 Cache& cache) const override;
30
31 private:
32 TVirtualMagField* m_field;
33};
34
35} // namespace SHiP
36
37#endif // ACTSTRACKING_ACTSSHIPFIELD_HPP_
TVirtualMagField * m_field
ActsShipField(TVirtualMagField *field)
The field is not owned and must outlive this object.
Cache makeCache(const Acts::MagneticFieldContext &mctx) const override
Acts::Result< Acts::Vector3 > getField(const Acts::Vector3 &position, Cache &cache) const override