24#define CBMFIELDMAP_H 1
30#include <RtypesCore.h>
50 CbmFieldMap(
const char* mapName,
const char* fileType =
"R");
80 virtual void Init(Int_t nX, Double_t xMin, Double_t xMax, Int_t nY, Double_t yMin, Double_t yMax, Int_t nZ,
81 Double_t zMin, Double_t zMax, TArrayF* bx, TArrayF* by, TArrayF* bz);
88 virtual Double_t
GetBx(Double_t
x, Double_t
y, Double_t z);
89 virtual Double_t
GetBy(Double_t
x, Double_t
y, Double_t z);
90 virtual Double_t
GetBz(Double_t
x, Double_t
y, Double_t z);
99 virtual Bool_t
IsInside(Double_t
x, Double_t
y, Double_t z, Int_t& ix, Int_t& iy, Int_t& iz, Double_t& dx,
100 Double_t& dy, Double_t& dz);
108 void WriteRootFile(
const char* fileName,
const char* mapName);
112 virtual void SetPosition(Double_t
x, Double_t
y, Double_t z);
155 virtual void Print(Option_t* =
"")
const;
170 void ReadRootFile(
const char* fileName,
const char* mapName);
180 Double_t
Interpolate(Double_t dx, Double_t dy, Double_t dz);
Double_t fBxOrigin
Interpolated field (1-dim)
virtual void SetPosition(Double_t x, Double_t y, Double_t z)
Double_t GetXstep() const
virtual void SetScale(Double_t factor)
void WriteRootFile(const char *fileName, const char *mapName)
void ReadAsciiFile(const char *fileName)
virtual void Print(Option_t *="") const
Double_t fHb[2][2]
Field at corners of a grid cell.
virtual Bool_t IsInside(Double_t x, Double_t y, Double_t z, Int_t &ix, Int_t &iy, Int_t &iz, Double_t &dx, Double_t &dy, Double_t &dz)
Double_t GetPositionY() const
void SetField(const CbmFieldMapData *data)
void ReadAsciiFile2018(const char *fileName)
Double_t GetYstep() const
Double_t GetPositionZ() const
CbmFieldMap(const CbmFieldMap &)
z-component of the field at the origin
Double_t Interpolate(Double_t dx, Double_t dy, Double_t dz)
Double_t GetPositionX() const
Double_t fHc[2]
Interpolated field (2-dim)
void ReadRootFile(const char *fileName, const char *mapName)
const char * GetFileName()
void WriteAsciiFile(const char *fileName)
CbmFieldMap & operator=(const CbmFieldMap &)
Double_t fBzOrigin
y-component of the field at the origin
Double_t GetZstep() const
Double_t fByOrigin
x-component of the field at the origin
Double_t GetScale() const