15#ifndef ALICEO2_FIELD_MAGFIELDFAST_H_
16#define ALICEO2_FIELD_MAGFIELDFAST_H_
21#ifndef GPUCA_GPUCODE_DEVICE
48 MagFieldFast(
float factor,
int nomField = 5,
const std::string inpFmt =
"$(O2_ROOT)/share/Common/maps/sol%dk.txt");
52 bool LoadData(
const std::string inpFName);
54 bool Field(
const double xyz[3],
double bxyz[3])
const;
55 bool Field(
const float xyz[3],
float bxyz[3])
const;
58 bool GetBcomp(
EDim comp,
const double xyz[3],
double&
b)
const;
63 bool GetBx(
const double xyz[3],
double& bx)
const {
return GetBcomp(
kX, xyz, bx); }
65 bool GetBy(
const double xyz[3],
double& by)
const {
return GetBcomp(
kY, xyz, by); }
67 bool GetBz(
const double xyz[3],
double& bz)
const {
return GetBcomp(
kZ, xyz, bz); }
73 bool GetSegment(
float x,
float y,
float z,
int& zSeg,
int& rSeg,
int& quadrant)
const;
80 return y > 0 ? (
x > 0 ? 0 : 1) : (
x > 0 ? 3 : 2);
83 float CalcPol(
const float* cf,
float x,
float y,
float z)
const;
100 float val = cf[0] +
x * (cf[1] +
x * (cf[4] +
x * cf[10] +
y * cf[11] +
z * cf[12]) +
y * (cf[5] +
z * cf[14])) +
101 y * (cf[2] +
y * (cf[7] +
x * cf[13] +
y * cf[16] +
z * cf[17]) +
z * (cf[8])) +
102 z * (cf[3] +
z * (cf[9] +
x * cf[15] +
y * cf[18] +
z * cf[19]) +
x * (cf[6]));
bool GetBx(const float xyz[3], float &bx) const
bool GetBy(const float xyz[3], float &by) const
bool GetBy(const double xyz[3], double &by) const
bool GetBx(const double xyz[3], double &bx) const
float getFactorSol() const
static const float kSolZMax
void setFactorSol(float v=1.f)
bool GetBz(const double xyz[3], double &bz) const
bool Field(const double xyz[3], double bxyz[3]) const
bool GetBz(const float xyz[3], float &bz) const
bool GetBcomp(EDim comp, const double xyz[3], double &b) const
MagFieldFast(const MagFieldFast &src)=default
int GetQuadrant(float x, float y) const
bool GetSegment(float x, float y, float z, int &zSeg, int &rSeg, int &quadrant) const
float CalcPol(const float *cf, float x, float y, float z) const
bool LoadData(const std::string inpFName)
static const float kSolR2Max[kNSolRRanges]
GLboolean GLboolean GLboolean b
GLdouble GLdouble GLdouble z
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
float parBxyz[kNDim][kNPolCoefs]