CbmRoot
Loading...
Searching...
No Matches
CbmFieldMapSym3 Class Reference

#include <CbmFieldMapSym3.h>

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

Public Member Functions

 CbmFieldMapSym3 ()
 
 CbmFieldMapSym3 (const char *mapName, const char *fileType="R")
 
 CbmFieldMapSym3 (CbmFieldPar *fieldPar)
 
virtual ~CbmFieldMapSym3 ()
 
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
 
Double_t fHemiZ
 
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.
 
Double_t fHc [2]
 Interpolated field (2-dim)
 
Double_t fBxOrigin
 Interpolated field (1-dim)
 
Double_t fByOrigin
 x-component of the field at the origin
 
Double_t fBzOrigin
 y-component of the field at the origin
 

Detailed Description

Definition at line 39 of file CbmFieldMapSym3.h.

Constructor & Destructor Documentation

◆ CbmFieldMapSym3() [1/3]

CbmFieldMapSym3::CbmFieldMapSym3 ( )

Default constructor

Definition at line 15 of file CbmFieldMapSym3.cxx.

◆ CbmFieldMapSym3() [2/3]

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

Standard constructor

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

Definition at line 20 of file CbmFieldMapSym3.cxx.

◆ CbmFieldMapSym3() [3/3]

CbmFieldMapSym3::CbmFieldMapSym3 ( CbmFieldPar * fieldPar)

Constructor from CbmFieldPar

Definition at line 32 of file CbmFieldMapSym3.cxx.

◆ ~CbmFieldMapSym3()

CbmFieldMapSym3::~CbmFieldMapSym3 ( )
virtual

Destructor

Definition at line 40 of file CbmFieldMapSym3.cxx.

Member Function Documentation

◆ GetBx() [1/2]

TArrayF * CbmFieldMap::GetBx ( ) const
inlineinherited

Accessors to the field value arrays

Definition at line 145 of file CbmFieldMap.h.

References CbmFieldMap::fBx.

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

◆ GetBx() [2/2]

Double_t CbmFieldMapSym3::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 45 of file CbmFieldMapSym3.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 146 of file CbmFieldMap.h.

References CbmFieldMap::fBy.

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

◆ GetBy() [2/2]

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

◆ GetBz() [1/2]

TArrayF * CbmFieldMap::GetBz ( ) const
inlineinherited

Definition at line 147 of file CbmFieldMap.h.

References CbmFieldMap::fBz.

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

◆ GetBz() [2/2]

Double_t CbmFieldMapSym3::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 151 of file CbmFieldMap.h.

References CbmFieldMap::fFileName.

◆ GetNx()

Int_t CbmFieldMap::GetNx ( ) const
inlineinherited

Definition at line 129 of file CbmFieldMap.h.

References CbmFieldMap::fNx.

Referenced by CbmFieldMapDistorted::SetFromParent().

◆ GetNy()

Int_t CbmFieldMap::GetNy ( ) const
inlineinherited

Definition at line 130 of file CbmFieldMap.h.

References CbmFieldMap::fNy.

Referenced by CbmFieldMapDistorted::SetFromParent().

◆ GetNz()

Int_t CbmFieldMap::GetNz ( ) const
inlineinherited

Definition at line 131 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 135 of file CbmFieldMap.h.

References CbmFieldMap::fPosX.

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

◆ GetPositionY()

Double_t CbmFieldMap::GetPositionY ( ) const
inlineinherited

Definition at line 136 of file CbmFieldMap.h.

References CbmFieldMap::fPosY.

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

◆ GetPositionZ()

Double_t CbmFieldMap::GetPositionZ ( ) const
inlineinherited

Definition at line 137 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 141 of file CbmFieldMap.h.

References CbmFieldMap::fScale.

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

◆ GetXmax()

Double_t CbmFieldMap::GetXmax ( ) const
inlineinherited

Definition at line 123 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 120 of file CbmFieldMap.h.

References CbmFieldMap::fXmin.

Referenced by CbmFieldMapDistorted::SetFromParent().

◆ GetXstep()

Double_t CbmFieldMap::GetXstep ( ) const
inlineinherited

Definition at line 126 of file CbmFieldMap.h.

References CbmFieldMap::fXstep.

Referenced by CbmFieldMapDistorted::SetFromParent().

◆ GetYmax()

Double_t CbmFieldMap::GetYmax ( ) const
inlineinherited

Definition at line 124 of file CbmFieldMap.h.

References CbmFieldMap::fYmax.

Referenced by CbmFieldMapDistorted::SetFromParent().

◆ GetYmin()

Double_t CbmFieldMap::GetYmin ( ) const
inlineinherited

Definition at line 121 of file CbmFieldMap.h.

References CbmFieldMap::fYmin.

Referenced by CbmFieldMapDistorted::SetFromParent().

◆ GetYstep()

Double_t CbmFieldMap::GetYstep ( ) const
inlineinherited

Definition at line 127 of file CbmFieldMap.h.

References CbmFieldMap::fYstep.

Referenced by CbmFieldMapDistorted::SetFromParent().

◆ GetZmax()

Double_t CbmFieldMap::GetZmax ( ) const
inlineinherited

Definition at line 125 of file CbmFieldMap.h.

References CbmFieldMap::fZmax.

Referenced by CbmFieldMapDistorted::SetFromParent().

◆ GetZmin()

Double_t CbmFieldMap::GetZmin ( ) const
inlineinherited

Definition at line 122 of file CbmFieldMap.h.

References CbmFieldMap::fZmin.

Referenced by CbmFieldMapDistorted::SetFromParent().

◆ GetZstep()

Double_t CbmFieldMap::GetZstep ( ) const
inlineinherited

Definition at line 128 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 298 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 789 of file CbmFieldMap.cxx.

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

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

◆ IsInside()

Bool_t CbmFieldMapSym3::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 141 of file CbmFieldMapSym3.cxx.

References fHemiX, fHemiY, fHemiZ, 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

Save old global file and folder pointer to avoid messing with FairRoot

Restore old global file and folder pointer to avoid messing with FairRoot

Definition at line 697 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 547 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 116 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

Save old global file and folder pointer to avoid messing with FairRoot

Restore old global file and folder pointer to avoid messing with FairRoot

Definition at line 526 of file CbmFieldMap.cxx.

Referenced by CbmFieldMapCreator::CreateMap().

Member Data Documentation

◆ fBx

◆ fBxOrigin

Double_t CbmFieldMap::fBxOrigin
protectedinherited

◆ fBy

◆ fByOrigin

Double_t CbmFieldMap::fByOrigin
protectedinherited

x-component of the field at the origin

Definition at line 218 of file CbmFieldMap.h.

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

◆ fBz

◆ fBzOrigin

Double_t CbmFieldMap::fBzOrigin
protectedinherited

y-component of the field at the origin

Definition at line 219 of file CbmFieldMap.h.

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

◆ fFileName

TString CbmFieldMap::fFileName
protectedinherited

◆ fHa

◆ fHb

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

◆ fHc

Double_t CbmFieldMap::fHc[2]
protectedinherited

◆ fHemiX

Double_t CbmFieldMapSym3::fHemiX
protected

Hemispheres of a point (for temporary use)

Definition at line 83 of file CbmFieldMapSym3.h.

Referenced by GetBx(), and IsInside().

◆ fHemiY

Double_t CbmFieldMapSym3::fHemiY
protected

Definition at line 83 of file CbmFieldMapSym3.h.

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

◆ fHemiZ

Double_t CbmFieldMapSym3::fHemiZ
protected

Definition at line 83 of file CbmFieldMapSym3.h.

Referenced by 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: