ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
SolenoidBField.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file SolenoidBField.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2017-2018 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
11
#include "
Acts/MagneticField/MagneticFieldContext.hpp
"
12
#include "
Acts/Utilities/Definitions.hpp
"
13
14
namespace
Acts {
15
17
//
65
class
SolenoidBField
{
66
public
:
67
struct
Cache
{
71
Cache
(std::reference_wrapper<const MagneticFieldContext>
/*mcfg*/
) {}
72
};
73
75
struct
Config
{
77
double
radius
;
80
double
length
;
82
size_t
nCoils
;
85
double
bMagCenter
;
86
};
87
91
SolenoidBField
(
Config
config
);
92
98
Vector3D
getField
(
const
Vector3D
&
position
)
const
;
99
104
Vector3D
getField
(
const
Vector3D
&
position
,
Cache
&
/*cache*/
)
const
;
105
109
Vector2D
getField
(
const
Vector2D
&
position
)
const
;
110
119
Vector3D
getFieldGradient
(
const
Vector3D
&
position
,
120
ActsMatrixD<3, 3>
&
/*derivative*/
)
const
;
121
131
Vector3D
getFieldGradient
(
const
Vector3D
&
position
,
132
ActsMatrixD<3, 3>
&
/*derivative*/
,
133
Cache
&
/*cache*/
)
const
;
134
135
private
:
136
Config
m_cfg
;
137
double
m_scale
;
138
double
m_dz
;
139
double
m_R2
;
140
141
Vector2D
multiCoilField
(
const
Vector2D
&
pos
,
double
scale
)
const
;
142
143
Vector2D
singleCoilField
(
const
Vector2D
&
pos
,
double
scale
)
const
;
144
145
double
B_r
(
const
Vector2D
&
pos
,
double
scale
)
const
;
146
147
double
B_z
(
const
Vector2D
&
pos
,
double
scale
)
const
;
148
149
double
k2
(
double
r
,
double
z
)
const
;
150
};
151
152
}
// namespace Acts
acts
blob
master
Core
include
Acts
MagneticField
SolenoidBField.hpp
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:20
using
1.8.2 with
ECCE GitHub integration