CbmRoot
CbmFieldMapSym2 Class Reference

#include <CbmFieldMapSym2.h>

Inheritance diagram for CbmFieldMapSym2:
[legend]
Collaboration diagram for CbmFieldMapSym2:
[legend]

Public Member Functions

 CbmFieldMapSym2 ()
 
 CbmFieldMapSym2 (const char *mapName, const char *fileType="R")
 
 CbmFieldMapSym2 (CbmFieldPar *fieldPar)
 
virtual ~CbmFieldMapSym2 ()
 
virtual Double_t GetBx (Double_t x, Double_t y, Double_t z)
 
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)
 
virtual void Init ()
 
virtual void Init (Int_t nX, Double_t xMin, Double_t xMax, Int_t nY, Double_t yMin, Double_t yMax, Int_t nZ, Double_t zMin, Double_t zMax, TArrayF *bx, TArrayF *by, TArrayF *bz)
 
TArrayF * GetBx () const
 
TArrayF * GetBy () const
 
TArrayF * GetBz () const
 
void WriteAsciiFile (const char *fileName)
 
void WriteRootFile (const char *fileName, const char *mapName)
 
virtual void SetPosition (Double_t x, Double_t y, Double_t z)
 
virtual void SetScale (Double_t factor)
 
Double_t GetXmin () const
 
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
 
Double_t GetPositionY () const
 
Double_t GetPositionZ () const
 
Double_t GetScale () const
 
const char * GetFileName ()
 
virtual void Print (Option_t *="") const
 

Protected Member Functions

void Reset ()
 
void ReadAsciiFile (const char *fileName)
 
void ReadAsciiFile2018 (const char *fileName)
 
void ReadRootFile (const char *fileName, const char *mapName)
 
void SetField (const CbmFieldMapData *data)
 
Double_t Interpolate (Double_t dx, Double_t dy, Double_t dz)
 

Protected Attributes

Double_t fHemiX
 
Double_t fHemiY
 
TString fFileName
 
Double_t fScale
 
Double_t fPosX
 
Double_t fPosY
 
Double_t fPosZ
 
Double_t fXmin
 
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
 
Int_t fNy
 
Int_t fNz
 
TArrayF * fBx
 
TArrayF * fBy
 
TArrayF * fBz
 
Double_t fHa [2][2][2]
 
Double_t fHb [2][2]
 Field at corners of a grid cell. More...
 
Double_t fHc [2]
 Interpolated field (2-dim) More...
 
Double_t fBxOrigin
 Interpolated field (1-dim) More...
 
Double_t fByOrigin
 x-component of the field at the origin More...
 
Double_t fBzOrigin
 y-component of the field at the origin More...
 

Detailed Description

Definition at line 35 of file CbmFieldMapSym2.h.

Constructor & Destructor Documentation

◆ CbmFieldMapSym2() [1/3]

CbmFieldMapSym2::CbmFieldMapSym2 ( )

Default constructor

Definition at line 11 of file CbmFieldMapSym2.cxx.

◆ CbmFieldMapSym2() [2/3]

CbmFieldMapSym2::CbmFieldMapSym2 ( const char *  mapName,
const char *  fileType = "R" 
)

Standard constructor

Parameters
nameName of field map
fileTypeR = ROOT file, A = ASCII

Definition at line 18 of file CbmFieldMapSym2.cxx.

◆ CbmFieldMapSym2() [3/3]

CbmFieldMapSym2::CbmFieldMapSym2 ( CbmFieldPar fieldPar)

Constructor from CbmFieldPar

Definition at line 26 of file CbmFieldMapSym2.cxx.

◆ ~CbmFieldMapSym2()

CbmFieldMapSym2::~CbmFieldMapSym2 ( )
virtual

Destructor

Definition at line 34 of file CbmFieldMapSym2.cxx.

Member Function Documentation

◆ GetBx() [1/2]

TArrayF* CbmFieldMap::GetBx ( ) const
inlineinherited

Accessors to the field value arrays

Definition at line 158 of file CbmFieldMap.h.

References CbmFieldMap::fBx.

Referenced by CbmFieldMap::Init().

◆ GetBx() [2/2]

Double_t CbmFieldMapSym2::GetBx ( Double_t  x,
Double_t  y,
Double_t  z 
)
virtual

Get the field components at a certain point

Parameters
x,y,zPoint coordinates (global) [cm] @value Bx,By,Bz Field components [kG]

Reimplemented from CbmFieldMap.

Definition at line 39 of file CbmFieldMapSym2.cxx.

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

◆ GetBy() [1/2]

TArrayF* CbmFieldMap::GetBy ( ) const
inlineinherited

Definition at line 159 of file CbmFieldMap.h.

References CbmFieldMap::fBy.

Referenced by CbmFieldMap::Init(), and CbmFieldMapDistorted::PlotBy().

◆ GetBy() [2/2]

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

◆ GetBz() [1/2]

TArrayF* CbmFieldMap::GetBz ( ) const
inlineinherited

Definition at line 160 of file CbmFieldMap.h.

References CbmFieldMap::fBz.

Referenced by CbmFieldMap::Init().

◆ GetBz() [2/2]

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

◆ GetFileName()

const char* CbmFieldMap::GetFileName ( )
inlineinherited

Accessor to field map file

Definition at line 164 of file CbmFieldMap.h.

References CbmFieldMap::fFileName.

◆ GetNx()

Int_t CbmFieldMap::GetNx ( ) const
inlineinherited

Definition at line 142 of file CbmFieldMap.h.

References CbmFieldMap::fNx.

Referenced by CbmFieldMapDistorted::SetFromParent().

◆ GetNy()

Int_t CbmFieldMap::GetNy ( ) const
inlineinherited

Definition at line 143 of file CbmFieldMap.h.

References CbmFieldMap::fNy.

Referenced by CbmFieldMapDistorted::SetFromParent().

◆ GetNz()

Int_t CbmFieldMap::GetNz ( ) const
inlineinherited

Definition at line 144 of file CbmFieldMap.h.

References CbmFieldMap::fNz.

Referenced by CbmFieldMapDistorted::SetFromParent().

◆ GetPositionX()

Double_t CbmFieldMap::GetPositionX ( ) const
inlineinherited

Accessor to field centre position in global system

Definition at line 148 of file CbmFieldMap.h.

References CbmFieldMap::fPosX.

Referenced by CbmFieldMapDistorted::SetFromParent(), and CbmFieldPar::SetParameters().

◆ GetPositionY()

Double_t CbmFieldMap::GetPositionY ( ) const
inlineinherited

Definition at line 149 of file CbmFieldMap.h.

References CbmFieldMap::fPosY.

Referenced by CbmFieldMapDistorted::SetFromParent(), and CbmFieldPar::SetParameters().

◆ GetPositionZ()

Double_t CbmFieldMap::GetPositionZ ( ) const
inlineinherited

Definition at line 150 of file CbmFieldMap.h.

References CbmFieldMap::fPosZ.

Referenced by CbmFieldMapDistorted::SetFromParent(), and CbmFieldPar::SetParameters().

◆ GetScale()

Double_t CbmFieldMap::GetScale ( ) const
inlineinherited

Accessor to global scaling factor

Definition at line 154 of file CbmFieldMap.h.

References CbmFieldMap::fScale.

Referenced by CbmFieldMapData::CbmFieldMapData(), CbmFieldMapDistorted::SetFromParent(), and CbmFieldPar::SetParameters().

◆ GetXmax()

Double_t CbmFieldMap::GetXmax ( ) const
inlineinherited

Definition at line 136 of file CbmFieldMap.h.

References CbmFieldMap::fXmax.

Referenced by CbmFieldMapDistorted::SetFromParent().

◆ GetXmin()

Double_t CbmFieldMap::GetXmin ( ) const
inlineinherited

Accessors to field parameters in local coordinate system

Definition at line 133 of file CbmFieldMap.h.

References CbmFieldMap::fXmin.

Referenced by CbmFieldMapDistorted::SetFromParent().

◆ GetXstep()

Double_t CbmFieldMap::GetXstep ( ) const
inlineinherited

Definition at line 139 of file CbmFieldMap.h.

References CbmFieldMap::fXstep.

Referenced by CbmFieldMapDistorted::SetFromParent().

◆ GetYmax()

Double_t CbmFieldMap::GetYmax ( ) const
inlineinherited

Definition at line 137 of file CbmFieldMap.h.

References CbmFieldMap::fYmax.

Referenced by CbmFieldMapDistorted::SetFromParent().

◆ GetYmin()

Double_t CbmFieldMap::GetYmin ( ) const
inlineinherited

Definition at line 134 of file CbmFieldMap.h.

References CbmFieldMap::fYmin.

Referenced by CbmFieldMapDistorted::SetFromParent().

◆ GetYstep()

Double_t CbmFieldMap::GetYstep ( ) const
inlineinherited

Definition at line 140 of file CbmFieldMap.h.

References CbmFieldMap::fYstep.

Referenced by CbmFieldMapDistorted::SetFromParent().

◆ GetZmax()

Double_t CbmFieldMap::GetZmax ( ) const
inlineinherited

Definition at line 138 of file CbmFieldMap.h.

References CbmFieldMap::fZmax.

Referenced by CbmFieldMapDistorted::SetFromParent().

◆ GetZmin()

Double_t CbmFieldMap::GetZmin ( ) const
inlineinherited

Definition at line 135 of file CbmFieldMap.h.

References CbmFieldMap::fZmin.

Referenced by CbmFieldMapDistorted::SetFromParent().

◆ GetZstep()

Double_t CbmFieldMap::GetZstep ( ) const
inlineinherited

Definition at line 141 of file CbmFieldMap.h.

References CbmFieldMap::fZstep.

Referenced by CbmFieldMapDistorted::SetFromParent().

◆ Init() [1/2]

◆ Init() [2/2]

void CbmFieldMap::Init ( Int_t  nX,
Double_t  xMin,
Double_t  xMax,
Int_t  nY,
Double_t  yMin,
Double_t  yMax,
Int_t  nZ,
Double_t  zMin,
Double_t  zMax,
TArrayF *  bx,
TArrayF *  by,
TArrayF *  bz 
)
virtualinherited

Initialisation with arrays. To be used e.g.for reading from ASCII.

Parameters
xMinMinimum x coordinate
xMaxMaximum x coordinate
yMinMinimum y coordinate
yMaxMaximum y coordinate
zMinMinimum z coordinate
zMaxMaximum z coordinate
bxPointer to array with Bx values [T]
byPointer to array with By values [T]
bzPointer to array with Bz values [T]

Definition at line 293 of file CbmFieldMap.cxx.

References CbmFieldMap::fBx, CbmFieldMap::fBxOrigin, CbmFieldMap::fBy, CbmFieldMap::fByOrigin, CbmFieldMap::fBz, CbmFieldMap::fBzOrigin, CbmFieldMap::fNx, CbmFieldMap::fNy, CbmFieldMap::fNz, CbmFieldMap::fXmax, CbmFieldMap::fXmin, CbmFieldMap::fXstep, CbmFieldMap::fYmax, CbmFieldMap::fYmin, CbmFieldMap::fYstep, CbmFieldMap::fZmax, CbmFieldMap::fZmin, CbmFieldMap::fZstep, CbmFieldMap::GetBx(), CbmFieldMap::GetBy(), CbmFieldMap::GetBz(), CbmFieldMap::Print(), and CbmFieldMap::Reset().

◆ Interpolate()

Double_t CbmFieldMap::Interpolate ( Double_t  dx,
Double_t  dy,
Double_t  dz 
)
protectedinherited

Get field values by interpolation of the grid.

Parameters
dx,dy,dzRelative distance from grid point [cell units]

Definition at line 786 of file CbmFieldMap.cxx.

References CbmFieldMap::fHa, CbmFieldMap::fHb, and CbmFieldMap::fHc.

Referenced by CbmFieldMapSym1::GetBx(), CbmFieldMapSym3::GetBx(), GetBx(), CbmFieldMap::GetBx(), CbmFieldMapSym1::GetBy(), GetBy(), CbmFieldMapSym3::GetBy(), CbmFieldMap::GetBy(), CbmFieldMapSym1::GetBz(), GetBz(), CbmFieldMapSym3::GetBz(), and CbmFieldMap::GetBz().

◆ IsInside()

Bool_t CbmFieldMapSym2::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

Determine whether a point is inside the field map

Parameters
x,y,zPoint coordinates (global) [cm]
ix,iy,iz(return) Grid cell
dx,dy,dz(return) Distance from grid point [cm] if inside @value kTRUE if inside map, else kFALSE

Reimplemented from CbmFieldMap.

Definition at line 132 of file CbmFieldMapSym2.cxx.

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

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

◆ Print()

◆ ReadAsciiFile()

◆ ReadAsciiFile2018()

void CbmFieldMap::ReadAsciiFile2018 ( const char *  fileName)
protectedinherited

Read the field map from an ASCII file. Updated version.

◆ ReadRootFile()

void CbmFieldMap::ReadRootFile ( const char *  fileName,
const char *  mapName 
)
protectedinherited

Read field map from a ROOT file

Definition at line 698 of file CbmFieldMap.cxx.

References CbmFieldMap::SetField().

Referenced by CbmFieldMap::Init().

◆ Reset()

◆ SetField()

◆ SetPosition()

void CbmFieldMap::SetPosition ( Double_t  x,
Double_t  y,
Double_t  z 
)
virtualinherited

Set the position of the field centre

Reimplemented in CbmFieldMapDistorted.

Definition at line 549 of file CbmFieldMap.cxx.

References CbmFieldMap::fPosX, CbmFieldMap::fPosY, CbmFieldMap::fPosZ, x, and y.

Referenced by CbmSetup::CreateFieldMap().

◆ SetScale()

virtual void CbmFieldMap::SetScale ( Double_t  factor)
inlinevirtualinherited

Set a global field scaling factor

Reimplemented in CbmFieldMapDistorted.

Definition at line 129 of file CbmFieldMap.h.

References CbmFieldMap::fScale.

Referenced by CbmSetup::CreateFieldMap().

◆ WriteAsciiFile()

void CbmFieldMap::WriteAsciiFile ( const char *  fileName)
inherited

◆ WriteRootFile()

void CbmFieldMap::WriteRootFile ( const char *  fileName,
const char *  mapName 
)
inherited

Write field map data to a ROOT file

Definition at line 536 of file CbmFieldMap.cxx.

Referenced by CbmFieldMapCreator::CreateMap().

Member Data Documentation

◆ fBx

◆ fBxOrigin

Double_t CbmFieldMap::fBxOrigin
protectedinherited

Interpolated field (1-dim)

Definition at line 230 of file CbmFieldMap.h.

Referenced by CbmFieldMap::Init(), CbmFieldMapDistorted::Init(), CbmFieldMapDistorted::Print(), and CbmFieldMap::Print().

◆ fBy

◆ fByOrigin

Double_t CbmFieldMap::fByOrigin
protectedinherited

x-component of the field at the origin

Definition at line 231 of file CbmFieldMap.h.

Referenced by CbmFieldMap::Init(), CbmFieldMapDistorted::Init(), CbmFieldMapDistorted::Print(), and CbmFieldMap::Print().

◆ fBz

◆ fBzOrigin

Double_t CbmFieldMap::fBzOrigin
protectedinherited

y-component of the field at the origin

Definition at line 232 of file CbmFieldMap.h.

Referenced by CbmFieldMap::Init(), CbmFieldMapDistorted::Init(), CbmFieldMapDistorted::Print(), and CbmFieldMap::Print().

◆ fFileName

TString CbmFieldMap::fFileName
protectedinherited

Map file name

Definition at line 197 of file CbmFieldMap.h.

Referenced by CbmFieldMap::CbmFieldMap(), CbmFieldMap::GetFileName(), and CbmFieldMap::Init().

◆ fHa

Double_t CbmFieldMap::fHa[2][2][2]
protectedinherited

◆ fHb

Double_t CbmFieldMap::fHb[2][2]
protectedinherited

Field at corners of a grid cell.

Definition at line 227 of file CbmFieldMap.h.

Referenced by CbmFieldMap::CbmFieldMap(), and CbmFieldMap::Interpolate().

◆ fHc

Double_t CbmFieldMap::fHc[2]
protectedinherited

Interpolated field (2-dim)

Definition at line 228 of file CbmFieldMap.h.

Referenced by CbmFieldMap::CbmFieldMap(), and CbmFieldMap::Interpolate().

◆ fHemiX

Double_t CbmFieldMapSym2::fHemiX
protected

Definition at line 86 of file CbmFieldMapSym2.h.

Referenced by GetBx(), and IsInside().

◆ fHemiY

Double_t CbmFieldMapSym2::fHemiY
protected

Definition at line 86 of file CbmFieldMapSym2.h.

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

◆ fNx

◆ fNy

◆ fNz

◆ fPosX

◆ fPosY

◆ fPosZ

◆ fScale

◆ fXmax

◆ fXmin

◆ fXstep

◆ fYmax

◆ fYmin

◆ fYstep

◆ fZmax

◆ fZmin

◆ fZstep


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