BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnFieldMapSym3 Class Reference

BmnFieldMapSym3.h. More...

#include <BmnFieldMapSym3.h>

Inheritance diagram for BmnFieldMapSym3:
Collaboration diagram for BmnFieldMapSym3:

Public Member Functions

 BmnFieldMapSym3 ()
 Default constructor.
 BmnFieldMapSym3 (const char *mapName)
 Standard constructor.
 BmnFieldMapSym3 (BmnFieldPar *fieldPar)
 Constructor from BmnFieldPar.
virtual ~BmnFieldMapSym3 ()
 Destructor.
virtual Double_t GetBx (Double_t x, Double_t y, Double_t z)
 Get the field components at a certain point.
virtual Double_t GetBy (Double_t x, Double_t y, Double_t z)
virtual Double_t GetBz (Double_t x, Double_t y, Double_t z)
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)
 Determine whether a point is inside the field map.
void FillParContainer ()
 BmnFieldMapSym3 ()
 Default constructor.
 BmnFieldMapSym3 (const char *mapName)
 Standard constructor.
 BmnFieldMapSym3 (BmnFieldPar *fieldPar)
 Constructor from BmnFieldPar.
virtual ~BmnFieldMapSym3 ()
 Destructor.
virtual Double_t GetBx (Double_t x, Double_t y, Double_t z)
 Get the field components at a certain point.
virtual Double_t GetBy (Double_t x, Double_t y, Double_t z)
virtual Double_t GetBz (Double_t x, Double_t y, Double_t z)
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)
 Determine whether a point is inside the field map.
void FillParContainer ()
Public Member Functions inherited from BmnFieldMap
 BmnFieldMap ()
 BmnFieldMap (const char *mapFileName)
 BmnFieldMap (BmnFieldPar *fieldPar)
virtual ~BmnFieldMap ()
virtual void Init ()
void WriteAsciiFile (const char *asciiFileName)
 Write the field map to an ASCII file.
void WriteRootFile (const char *rootFileName, const char *mapFileName)
 Write field map data to a ROOT file.
void SetPosition (Double_t x, Double_t y, Double_t z)
 Set the position of the field centre.
void SetScale (Double_t factor)
 Set a global field scaling factor.
void SetFieldOff (Bool_t is_off=kTRUE)
 Turn magnetic field off.
void SetFileName (const char *map_file_name)
 Set field map file path.
Double_t GetXmin () const
 Accessors to field parameters in local coordinate system.
Double_t GetYmin () const
Double_t GetZmin () const
Double_t GetXmax () const
Double_t GetYmax () const
Double_t GetZmax () const
Double_t GetXstep () const
Double_t GetYstep () const
Double_t GetZstep () const
Int_t GetNx () const
Int_t GetNy () const
Int_t GetNz () const
Double_t GetPositionX () const
 Accessor to field centre position in global system.
Double_t GetPositionY () const
Double_t GetPositionZ () const
Double_t GetScale () const
 Accessor to global scaling factor.
Bool_t IsFieldOff () const
 Whether magnetic field is off.
TArrayF * GetBx () const
 Accessors to the field value arrays.
TArrayF * GetBy () const
TArrayF * GetBz () const
const char * GetFileName ()
 Accessor to field map file.
virtual void Print (Option_t *) const
 Screen output.
void Reset ()
 Reset the field parameters and data.
 BmnFieldMap ()
 BmnFieldMap (const char *mapFileName)
 BmnFieldMap (BmnFieldPar *fieldPar)
virtual ~BmnFieldMap ()
virtual void Init ()
void WriteAsciiFile (const char *asciiFileName)
 Write the field map to an ASCII file.
void WriteRootFile (const char *rootFileName, const char *mapFileName)
 Write field map data to a ROOT file.
void SetPosition (Double_t x, Double_t y, Double_t z)
 Set the position of the field centre.
void SetScale (Double_t factor)
 Set a global field scaling factor.
void SetFieldOff (Bool_t is_off=kTRUE)
 Turn magnetic field off.
void SetFileName (const char *map_file_name)
 Set field map file path.
Double_t GetXmin () const
 Accessors to field parameters in local coordinate system.
Double_t GetYmin () const
Double_t GetZmin () const
Double_t GetXmax () const
Double_t GetYmax () const
Double_t GetZmax () const
Double_t GetXstep () const
Double_t GetYstep () const
Double_t GetZstep () const
Int_t GetNx () const
Int_t GetNy () const
Int_t GetNz () const
Double_t GetPositionX () const
 Accessor to field centre position in global system.
Double_t GetPositionY () const
Double_t GetPositionZ () const
Double_t GetScale () const
 Accessor to global scaling factor.
Bool_t IsFieldOff () const
 Whether magnetic field is off.
TArrayF * GetBx () const
 Accessors to the field value arrays.
TArrayF * GetBy () const
TArrayF * GetBz () const
const char * GetFileName ()
 Accessor to field map file.
virtual void Print (Option_t *) const
 Screen output.
void Reset ()
 Reset the field parameters and data.

Protected Attributes

Double_t fHemiX
 Hemispheres of a point (for temporary use).
Double_t fHemiY
Double_t fHemiZ
Protected Attributes inherited from BmnFieldMap
Double_t fScale
 Global scaling factor (w.r.t.
Double_t fPosX
 Field centre position in global coordinates.
Double_t fPosY
Double_t fPosZ
Double_t fPosBx
Double_t fPosBy
Double_t fPosBz
Double_t fXmin
 Field limits in local coordinate system.
Double_t fXmax
Double_t fXstep
Double_t fYmin
Double_t fYmax
Double_t fYstep
Double_t fZmin
Double_t fZmax
Double_t fZstep
Int_t fNx
 Number of grid points.
Int_t fNy
Int_t fNz
TArrayF * fBx
 Arrays with the field values.
TArrayF * fBy
TArrayF * fBz
Double_t fHa [2][2][2]
 Variables for temporary storage Used in the very frequently called method GetFieldValue.
Double_t fHb [2][2]
 Field at corners of a grid cell.
Double_t fHc [2]
 Interpolated field (2-dim).
Bool_t fDebugInfo
 Interpolated field (1-dim).
Bool_t fIsOff
 Whether magnetic field is off.

Additional Inherited Members

Static Public Member Functions inherited from BmnFieldMap
static TString GetMapFilePath (TString mapName)
 Get the expanded path to the field map file in the current installation.
static TString GetMapFilePath (TString mapName)
 Get the expanded path to the field map file in the current installation.
Protected Member Functions inherited from BmnFieldMap
void ReadAsciiFile (const char *asciiFileName)
 Reset the field parameters and data.
void ReadRootFile (const char *rootFileName)
 Read field map from a ROOT file.
void ReadRootFileNewFormat (const char *rootFileName)
void ReadRootFileNewFormatExtrap (const char *rootFileName)
void SetField (const BmnFieldMapData *data)
 Set field parameters and data.
Double_t Interpolate (Double_t dx, Double_t dy, Double_t dz)
 Get field values by interpolation of the grid.
void ReadAsciiFile (const char *asciiFileName)
 Reset the field parameters and data.
void ReadRootFile (const char *rootFileName)
 Read field map from a ROOT file.
void ReadRootFileNewFormat (const char *rootFileName)
void ReadRootFileNewFormatExtrap (const char *rootFileName)
void SetField (const BmnFieldMapData *data)
 Set field parameters and data.
Double_t Interpolate (Double_t dx, Double_t dy, Double_t dz)
 Get field values by interpolation of the grid.

Detailed Description

Author
M.Al/Turany m.al-.nosp@m.tura.nosp@m.ny@gs.nosp@m.i.de
V.Friese v.fri.nosp@m.ese@.nosp@m.gsi.d.nosp@m.e
Since
12.01.2004 @version1.0

Magnetic field map on a 3-D grid with symmetries w.r.t. the three coordinate axes. The map is only stored in the octant x>0, y>0, z>0. The symmetries are:

  • Bx is antisymmetric in x and symmetric in y and z
  • By is symmetric in x, y and z
  • Bz is antisymmetric in x and z and symmetric in y

Field values are hold and returned in kG.

Definition at line 29 of file BmnFieldMapSym3.h.

Constructor & Destructor Documentation

◆ BmnFieldMapSym3() [1/6]

BmnFieldMapSym3::BmnFieldMapSym3 ( )

Definition at line 17 of file BmnFieldMapSym3.cxx.

References BmnFieldMap::BmnFieldMap(), fHemiX, fHemiY, and fHemiZ.

Referenced by FillParContainer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BmnFieldMapSym3() [2/6]

BmnFieldMapSym3::BmnFieldMapSym3 ( const char * mapName)
Parameters
mapNameName of field map

Definition at line 27 of file BmnFieldMapSym3.cxx.

References BmnFieldMap::BmnFieldMap(), fHemiX, fHemiY, and fHemiZ.

Here is the call graph for this function:

◆ BmnFieldMapSym3() [3/6]

BmnFieldMapSym3::BmnFieldMapSym3 ( BmnFieldPar * fieldPar)

Definition at line 37 of file BmnFieldMapSym3.cxx.

References BmnFieldMap::BmnFieldMap(), fHemiX, fHemiY, and fHemiZ.

Here is the call graph for this function:

◆ ~BmnFieldMapSym3() [1/2]

BmnFieldMapSym3::~BmnFieldMapSym3 ( )
virtual

Definition at line 47 of file BmnFieldMapSym3.cxx.

◆ BmnFieldMapSym3() [4/6]

BmnFieldMapSym3::BmnFieldMapSym3 ( )

◆ BmnFieldMapSym3() [5/6]

BmnFieldMapSym3::BmnFieldMapSym3 ( const char * mapName)
Parameters
mapNameName of field map

◆ BmnFieldMapSym3() [6/6]

BmnFieldMapSym3::BmnFieldMapSym3 ( BmnFieldPar * fieldPar)

◆ ~BmnFieldMapSym3() [2/2]

virtual BmnFieldMapSym3::~BmnFieldMapSym3 ( )
virtual

Member Function Documentation

◆ FillParContainer() [1/2]

void BmnFieldMapSym3::FillParContainer ( )
virtual

Implements BmnFieldMap.

Definition at line 185 of file BmnFieldMapSym3.cxx.

References BmnFieldPar::SetParameters().

Here is the call graph for this function:

◆ FillParContainer() [2/2]

void BmnFieldMapSym3::FillParContainer ( )
virtual

Implements BmnFieldMap.

References BmnFieldMapSym3(), fHemiX, fHemiY, and fHemiZ.

Here is the call graph for this function:

◆ GetBx() [1/2]

Double_t BmnFieldMapSym3::GetBx ( Double_t x,
Double_t y,
Double_t z )
virtual
Parameters
x,y,zPoint coordinates (global) [cm]
Returns
Bx,By,Bz Field components [kG]

Implements BmnFieldMap.

Definition at line 50 of file BmnFieldMapSym3.cxx.

References BmnFieldMap::fBx, BmnFieldMap::fHa, fHemiX, fHemiY, BmnFieldMap::fNy, BmnFieldMap::fNz, BmnFieldMap::Interpolate(), IsInside(), x, y, and z.

Here is the call graph for this function:

◆ GetBx() [2/2]

virtual Double_t BmnFieldMapSym3::GetBx ( Double_t x,
Double_t y,
Double_t z )
virtual
Parameters
x,y,zPoint coordinates (global) [cm]
Returns
Bx,By,Bz Field components [kG]

Implements BmnFieldMap.

References x, y, and z.

◆ GetBy() [1/2]

Double_t BmnFieldMapSym3::GetBy ( Double_t x,
Double_t y,
Double_t z )
virtual

Implements BmnFieldMap.

Definition at line 78 of file BmnFieldMapSym3.cxx.

References BmnFieldMap::fBy, BmnFieldMap::fHa, BmnFieldMap::fNy, BmnFieldMap::fNz, BmnFieldMap::Interpolate(), IsInside(), x, y, and z.

Here is the call graph for this function:

◆ GetBy() [2/2]

virtual Double_t BmnFieldMapSym3::GetBy ( Double_t x,
Double_t y,
Double_t z )
virtual

Implements BmnFieldMap.

References x, y, and z.

◆ GetBz() [1/2]

Double_t BmnFieldMapSym3::GetBz ( Double_t x,
Double_t y,
Double_t z )
virtual

Implements BmnFieldMap.

Definition at line 106 of file BmnFieldMapSym3.cxx.

References BmnFieldMap::fBz, BmnFieldMap::fHa, fHemiY, fHemiZ, BmnFieldMap::fNy, BmnFieldMap::fNz, BmnFieldMap::Interpolate(), IsInside(), x, y, and z.

Here is the call graph for this function:

◆ GetBz() [2/2]

virtual Double_t BmnFieldMapSym3::GetBz ( Double_t x,
Double_t y,
Double_t z )
virtual

Implements BmnFieldMap.

References x, y, and z.

◆ IsInside() [1/2]

Bool_t BmnFieldMapSym3::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 )
virtual
Parameters
x,y,zPoint coordinates (global) [cm]
ix,iy,iz(return) Grid cell
dx,dy,dz(return) Distance from grid point [cm] if inside
Returns
kTRUE if inside map, else kFALSE

Implements BmnFieldMap.

Definition at line 135 of file BmnFieldMapSym3.cxx.

References fHemiX, fHemiY, fHemiZ, BmnFieldMap::fPosX, BmnFieldMap::fPosY, BmnFieldMap::fPosZ, BmnFieldMap::fXmin, BmnFieldMap::fXstep, BmnFieldMap::fYmin, BmnFieldMap::fYstep, BmnFieldMap::fZmax, BmnFieldMap::fZmin, BmnFieldMap::fZstep, x, y, and z.

Referenced by GetBx(), GetBy(), and GetBz().

Here is the caller graph for this function:

◆ IsInside() [2/2]

virtual Bool_t BmnFieldMapSym3::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 )
virtual
Parameters
x,y,zPoint coordinates (global) [cm]
ix,iy,iz(return) Grid cell
dx,dy,dz(return) Distance from grid point [cm] if inside
Returns
kTRUE if inside map, else kFALSE

Implements BmnFieldMap.

References x, y, and z.

Member Data Documentation

◆ fHemiX

Double_t BmnFieldMapSym3::fHemiX
mutableprotected

◆ fHemiY

Double_t BmnFieldMapSym3::fHemiY
protected

◆ fHemiZ

Double_t BmnFieldMapSym3::fHemiZ
protected

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