Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
PHField3DCartesian.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PHField3DCartesian.h
1
#ifndef PHFIELD_PHFIELD3DCARTESIAN_H
2
#define PHFIELD_PHFIELD3DCARTESIAN_H
3
4
#include "
PHField.h
"
5
6
#include <cmath>
7
#include <map>
8
#include <set>
9
#include <string>
10
#include <tuple>
11
12
class
PHField3DCartesian
:
public
PHField
13
{
14
public
:
15
explicit
PHField3DCartesian
(
const
std::string
&
fname
,
const
float
magfield_rescale
= 1.0,
const
float
innerradius = 0,
const
float
outerradius = 1.e10,
const
float
size_z
= 1.e10);
16
~PHField3DCartesian
()
override
;
17
22
void
GetFieldValue
(
const
double
Point[4],
double
*Bfield)
const override
;
23
24
private
:
25
std::string
filename
;
26
double
xmin
= 1000000;
27
double
xmax
= -1000000;
28
double
ymin
= 1000000;
29
double
ymax
= -1000000;
30
double
zmin
= 1000000;
31
double
zmax
= -1000000;
32
double
xstepsize
= NAN;
33
double
ystepsize
= NAN;
34
double
zstepsize
= NAN;
35
// these are updated in a const method
36
// to cache previous values
37
mutable
double
xyz
[2][2][2][3]{};
38
mutable
double
bf
[2][2][2][3]{};
39
mutable
double
xkey_save
= NAN;
40
mutable
double
ykey_save
= NAN;
41
mutable
double
zkey_save
= NAN;
42
mutable
int
cache_hits
= 0;
43
mutable
int
cache_misses
= 0;
44
45
typedef
std::tuple<float, float, float>
trio
;
46
std::map<std::tuple<float, float, float>, std::tuple<float, float, float> >
fieldmap
;
47
std::set<float>
xvals
;
48
std::set<float>
yvals
;
49
std::set<float>
zvals
;
50
};
51
52
#endif
coresoftware
blob
master
offline
packages
PHField
PHField3DCartesian.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:07
using
1.8.2 with
sPHENIX GitHub integration