EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BFieldOptions.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file BFieldOptions.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2017 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #pragma once
10 
15 
16 #include <memory>
17 #include <tuple>
18 #include <variant>
19 
20 // Forward declarations
21 namespace Acts {
22 template <typename G>
23 struct InterpolatedBFieldMapper;
24 
25 template <typename M>
26 class InterpolatedBFieldMap;
27 
28 class ConstantBField;
29 } // namespace Acts
30 
31 namespace ActsExamples {
32 namespace BField {
33 class ScalableBField;
34 }
35 } // namespace ActsExamples
36 
40 
44 
49 
50 namespace ActsExamples {
51 
52 namespace Options {
53 
54 using BFieldVariant =
55  std::variant<std::shared_ptr<InterpolatedBFieldMap2D>,
56  std::shared_ptr<InterpolatedBFieldMap3D>,
57  std::shared_ptr<Acts::ConstantBField>,
58  std::shared_ptr<ActsExamples::BField::ScalableBField>>;
59 
60 // common bfield options, with a bf prefix
61 void addBFieldOptions(boost::program_options::options_description& opt);
62 
63 // create the bfield maps
64 BFieldVariant readBField(const boost::program_options::variables_map& vm);
65 
66 } // namespace Options
67 } // namespace ActsExamples