Project
Loading...
Searching...
No Matches
o2::field::MagFieldFast Class Reference

#include <MagFieldFast.h>

Classes

struct  SolParam
 

Public Types

enum  { kNSolRRanges = 5 , kNSolZRanges = 22 , kNQuadrants = 4 , kNPolCoefs = 20 }
 
enum  EDim { kX , kY , kZ , kNDim }
 

Public Member Functions

 MagFieldFast (const std::string inpFName="")
 
 MagFieldFast (float factor, int nomField=5, const std::string inpFmt="$(O2_ROOT)/share/Common/maps/sol%dk.txt")
 
 MagFieldFast (const MagFieldFast &src)=default
 
 ~MagFieldFast ()=default
 
bool LoadData (const std::string inpFName)
 
bool Field (const double xyz[3], double bxyz[3]) const
 
bool Field (const float xyz[3], float bxyz[3]) const
 
bool Field (const math_utils::Point3D< float > xyz, float bxyz[3]) const
 
bool Field (const math_utils::Point3D< double > xyz, double bxyz[3]) const
 
bool GetBcomp (EDim comp, const double xyz[3], double &b) const
 
bool GetBcomp (EDim comp, const float xyz[3], float &b) const
 
bool GetBcomp (EDim comp, const math_utils::Point3D< float > xyz, double &b) const
 
bool GetBcomp (EDim comp, const math_utils::Point3D< float > xyz, float &b) const
 
bool GetBx (const double xyz[3], double &bx) const
 
bool GetBx (const float xyz[3], float &bx) const
 
bool GetBy (const double xyz[3], double &by) const
 
bool GetBy (const float xyz[3], float &by) const
 
bool GetBz (const double xyz[3], double &bz) const
 
bool GetBz (const float xyz[3], float &bz) const
 
void setFactorSol (float v=1.f)
 
float getFactorSol () const
 

Protected Member Functions

bool GetSegment (float x, float y, float z, int &zSeg, int &rSeg, int &quadrant) const
 
int GetQuadrant (float x, float y) const
 
float CalcPol (const float *cf, float x, float y, float z) const
 

Static Protected Attributes

static const float kSolR2Max [kNSolRRanges]
 
static const float kSolZMax = 550.0f
 

Detailed Description

Definition at line 32 of file MagFieldFast.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kNSolRRanges 
kNSolZRanges 
kNQuadrants 
kNPolCoefs 

Definition at line 35 of file MagFieldFast.h.

◆ EDim

Enumerator
kX 
kY 
kZ 
kNDim 

Definition at line 39 of file MagFieldFast.h.

Constructor & Destructor Documentation

◆ MagFieldFast() [1/3]

MagFieldFast::MagFieldFast ( const std::string  inpFName = "")

Definition at line 40 of file MagFieldFast.cxx.

◆ MagFieldFast() [2/3]

MagFieldFast::MagFieldFast ( float  factor,
int  nomField = 5,
const std::string  inpFmt = "$(O2_ROOT)/share/Common/maps/sol%dk.txt" 
)

Definition at line 49 of file MagFieldFast.cxx.

◆ MagFieldFast() [3/3]

o2::field::MagFieldFast::MagFieldFast ( const MagFieldFast src)
default

◆ ~MagFieldFast()

o2::field::MagFieldFast::~MagFieldFast ( )
default

Member Function Documentation

◆ CalcPol()

float o2::field::MagFieldFast::CalcPol ( const float *  cf,
float  x,
float  y,
float  z 
) const
inlineprotected

calculate polynomial cf[0] + cf[1]*x + cf[2]*y + cf[3]*z + cf[4]*xx + cf[5]*xy + cf[6]*xz + cf[7]*yy + cf[8]*yz + cf[9]*zz + cf[10]*xxx + cf[11]*xxy + cf[12]*xxz + cf[13]*xyy + cf[14]*xyz + cf[15]*xzz + cf[16]*yyy + cf[17]*yyz + cf[18]*yzz + cf[19]*zzz

Definition at line 92 of file MagFieldFast.h.

◆ Field() [1/4]

bool MagFieldFast::Field ( const double  xyz[3],
double  bxyz[3] 
) const

Definition at line 118 of file MagFieldFast.cxx.

◆ Field() [2/4]

bool MagFieldFast::Field ( const float  xyz[3],
float  bxyz[3] 
) const

Definition at line 190 of file MagFieldFast.cxx.

◆ Field() [3/4]

bool MagFieldFast::Field ( const math_utils::Point3D< double >  xyz,
double  bxyz[3] 
) const

Definition at line 222 of file MagFieldFast.cxx.

◆ Field() [4/4]

bool MagFieldFast::Field ( const math_utils::Point3D< float >  xyz,
float  bxyz[3] 
) const

Definition at line 206 of file MagFieldFast.cxx.

◆ GetBcomp() [1/4]

bool MagFieldFast::GetBcomp ( EDim  comp,
const double  xyz[3],
double &  b 
) const

Definition at line 134 of file MagFieldFast.cxx.

◆ GetBcomp() [2/4]

bool MagFieldFast::GetBcomp ( EDim  comp,
const float  xyz[3],
float &  b 
) const

Definition at line 176 of file MagFieldFast.cxx.

◆ GetBcomp() [3/4]

bool MagFieldFast::GetBcomp ( EDim  comp,
const math_utils::Point3D< float >  xyz,
double &  b 
) const

Definition at line 148 of file MagFieldFast.cxx.

◆ GetBcomp() [4/4]

bool MagFieldFast::GetBcomp ( EDim  comp,
const math_utils::Point3D< float >  xyz,
float &  b 
) const

Definition at line 162 of file MagFieldFast.cxx.

◆ GetBx() [1/2]

bool o2::field::MagFieldFast::GetBx ( const double  xyz[3],
double &  bx 
) const
inline

Definition at line 63 of file MagFieldFast.h.

◆ GetBx() [2/2]

bool o2::field::MagFieldFast::GetBx ( const float  xyz[3],
float &  bx 
) const
inline

Definition at line 64 of file MagFieldFast.h.

◆ GetBy() [1/2]

bool o2::field::MagFieldFast::GetBy ( const double  xyz[3],
double &  by 
) const
inline

Definition at line 65 of file MagFieldFast.h.

◆ GetBy() [2/2]

bool o2::field::MagFieldFast::GetBy ( const float  xyz[3],
float &  by 
) const
inline

Definition at line 66 of file MagFieldFast.h.

◆ GetBz() [1/2]

bool o2::field::MagFieldFast::GetBz ( const double  xyz[3],
double &  bz 
) const
inline

Definition at line 67 of file MagFieldFast.h.

◆ GetBz() [2/2]

bool o2::field::MagFieldFast::GetBz ( const float  xyz[3],
float &  bz 
) const
inline

Definition at line 68 of file MagFieldFast.h.

◆ getFactorSol()

float o2::field::MagFieldFast::getFactorSol ( ) const
inline

Definition at line 70 of file MagFieldFast.h.

◆ GetQuadrant()

int o2::field::MagFieldFast::GetQuadrant ( float  x,
float  y 
) const
inlineprotected

get point quadrant

Definition at line 77 of file MagFieldFast.h.

◆ GetSegment()

bool MagFieldFast::GetSegment ( float  x,
float  y,
float  z,
int zSeg,
int rSeg,
int quadrant 
) const
protected

Definition at line 238 of file MagFieldFast.cxx.

◆ LoadData()

bool MagFieldFast::LoadData ( const std::string  inpFName)

Definition at line 63 of file MagFieldFast.cxx.

◆ setFactorSol()

void o2::field::MagFieldFast::setFactorSol ( float  v = 1.f)
inline

Definition at line 69 of file MagFieldFast.h.

Member Data Documentation

◆ kSolR2Max

const float MagFieldFast::kSolR2Max
staticprotected
Initial value:
= {80.f * 80.f, 250.f * 250.f, 400.f * 400.f,
423.f * 423.f, 500.f * 500.f}

Definition at line 74 of file MagFieldFast.h.

◆ kSolZMax

const float MagFieldFast::kSolZMax = 550.0f
staticprotected

Definition at line 75 of file MagFieldFast.h.


The documentation for this class was generated from the following files: