CbmRoot
|
#include <CbmFieldMap.h>
Public Member Functions | |
CbmFieldMap () | |
CbmFieldMap (const char *mapName, const char *fileType="R") | |
CbmFieldMap (CbmFieldPar *fieldPar) | |
CbmFieldMap (CbmFieldMapCreator *creator) | |
virtual | ~CbmFieldMap () |
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) |
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) |
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 |
TArrayF * | GetBx () const |
TArrayF * | GetBy () const |
TArrayF * | GetBz () 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 | |
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... | |
Private Member Functions | |
CbmFieldMap (const CbmFieldMap &) | |
z-component of the field at the origin More... | |
CbmFieldMap & | operator= (const CbmFieldMap &) |
Definition at line 34 of file CbmFieldMap.h.
CbmFieldMap::CbmFieldMap | ( | ) |
Default constructor
Definition at line 34 of file CbmFieldMap.cxx.
References fHa, fHb, fHc, and i.
Referenced by CbmFieldMapDistorted::CbmFieldMapDistorted().
CbmFieldMap::CbmFieldMap | ( | const char * | mapName, |
const char * | fileType = "R" |
||
) |
CbmFieldMap::CbmFieldMap | ( | CbmFieldPar * | fieldPar | ) |
Constructor from CbmFieldPar
Definition at line 135 of file CbmFieldMap.cxx.
References fFileName, fHa, fHb, fHc, fPosX, fPosY, fPosZ, fScale, CbmFieldPar::GetPositionX(), CbmFieldPar::GetPositionY(), CbmFieldPar::GetPositionZ(), CbmFieldPar::GetScale(), CbmFieldPar::GetType(), i, and CbmFieldPar::MapName().
CbmFieldMap::CbmFieldMap | ( | CbmFieldMapCreator * | creator | ) |
Constructor from CbmFieldMapCreator
Definition at line 194 of file CbmFieldMap.cxx.
References fBx, fBy, fBz, fHa, fHb, fHc, fNx, fNy, fNz, fXmax, fXmin, fXstep, fYmax, fYmin, fYstep, fZmax, fZmin, fZstep, CbmFieldMapCreator::GetBx(), CbmFieldMapCreator::GetBy(), CbmFieldMapCreator::GetBz(), CbmFieldMapCreator::GetMapName(), CbmFieldMapCreator::GetNx(), CbmFieldMapCreator::GetNy(), CbmFieldMapCreator::GetNz(), CbmFieldMapCreator::GetXmax(), CbmFieldMapCreator::GetXmin(), CbmFieldMapCreator::GetYmax(), CbmFieldMapCreator::GetYmin(), CbmFieldMapCreator::GetZmax(), CbmFieldMapCreator::GetZmin(), and i.
|
virtual |
|
private |
z-component of the field at the origin
|
inline |
Accessors to the field value arrays
Definition at line 158 of file CbmFieldMap.h.
References fBx.
Referenced by Init().
|
virtual |
Get the field components at a certain point
x,y,z | Point coordinates (global) [cm] @value Bx,By,Bz Field components [kG] |
Reimplemented in CbmFieldMapDistorted, CbmBsField, CbmFieldMapSym2, CbmFieldMapSym3, and CbmFieldMapSym1.
Definition at line 353 of file CbmFieldMap.cxx.
References fBx, fHa, fNy, fNz, Interpolate(), IsInside(), x, and y.
|
inline |
Definition at line 159 of file CbmFieldMap.h.
References fBy.
Referenced by Init(), and CbmFieldMapDistorted::PlotBy().
|
virtual |
Reimplemented in CbmFieldMapDistorted, CbmBsField, CbmFieldMapSym2, CbmFieldMapSym3, and CbmFieldMapSym1.
Definition at line 384 of file CbmFieldMap.cxx.
References fBy, fHa, fNy, fNz, Interpolate(), IsInside(), x, and y.
|
inline |
|
virtual |
Reimplemented in CbmFieldMapDistorted, CbmBsField, CbmFieldMapSym2, CbmFieldMapSym3, and CbmFieldMapSym1.
Definition at line 415 of file CbmFieldMap.cxx.
References fBz, fHa, fNy, fNz, Interpolate(), IsInside(), x, and y.
|
inline |
|
inline |
Definition at line 142 of file CbmFieldMap.h.
References fNx.
Referenced by CbmFieldMapDistorted::SetFromParent().
|
inline |
Definition at line 143 of file CbmFieldMap.h.
References fNy.
Referenced by CbmFieldMapDistorted::SetFromParent().
|
inline |
Definition at line 144 of file CbmFieldMap.h.
References fNz.
Referenced by CbmFieldMapDistorted::SetFromParent().
|
inline |
Accessor to field centre position in global system
Definition at line 148 of file CbmFieldMap.h.
References fPosX.
Referenced by CbmFieldMapDistorted::SetFromParent(), and CbmFieldPar::SetParameters().
|
inline |
Definition at line 149 of file CbmFieldMap.h.
References fPosY.
Referenced by CbmFieldMapDistorted::SetFromParent(), and CbmFieldPar::SetParameters().
|
inline |
Definition at line 150 of file CbmFieldMap.h.
References fPosZ.
Referenced by CbmFieldMapDistorted::SetFromParent(), and CbmFieldPar::SetParameters().
|
inline |
Accessor to global scaling factor
Definition at line 154 of file CbmFieldMap.h.
References fScale.
Referenced by CbmFieldMapData::CbmFieldMapData(), CbmFieldMapDistorted::SetFromParent(), and CbmFieldPar::SetParameters().
|
inline |
Definition at line 136 of file CbmFieldMap.h.
References fXmax.
Referenced by CbmFieldMapDistorted::SetFromParent().
|
inline |
Accessors to field parameters in local coordinate system
Definition at line 133 of file CbmFieldMap.h.
References fXmin.
Referenced by CbmFieldMapDistorted::SetFromParent().
|
inline |
Definition at line 139 of file CbmFieldMap.h.
References fXstep.
Referenced by CbmFieldMapDistorted::SetFromParent().
|
inline |
Definition at line 137 of file CbmFieldMap.h.
References fYmax.
Referenced by CbmFieldMapDistorted::SetFromParent().
|
inline |
Definition at line 134 of file CbmFieldMap.h.
References fYmin.
Referenced by CbmFieldMapDistorted::SetFromParent().
|
inline |
Definition at line 140 of file CbmFieldMap.h.
References fYstep.
Referenced by CbmFieldMapDistorted::SetFromParent().
|
inline |
Definition at line 138 of file CbmFieldMap.h.
References fZmax.
Referenced by CbmFieldMapDistorted::SetFromParent().
|
inline |
Definition at line 135 of file CbmFieldMap.h.
References fZmin.
Referenced by CbmFieldMapDistorted::SetFromParent().
|
inline |
Definition at line 141 of file CbmFieldMap.h.
References fZstep.
Referenced by CbmFieldMapDistorted::SetFromParent().
|
virtual |
Initialisation (read map from file)
Reimplemented in CbmFieldMapDistorted, and CbmBsField.
Definition at line 271 of file CbmFieldMap.cxx.
References fBxOrigin, fByOrigin, fBzOrigin, fFileName, GetBx(), GetBy(), GetBz(), Print(), ReadAsciiFile(), and ReadRootFile().
|
virtual |
Initialisation with arrays. To be used e.g.for reading from ASCII.
xMin | Minimum x coordinate |
xMax | Maximum x coordinate |
yMin | Minimum y coordinate |
yMax | Maximum y coordinate |
zMin | Minimum z coordinate |
zMax | Maximum z coordinate |
bx | Pointer to array with Bx values [T] |
by | Pointer to array with By values [T] |
bz | Pointer to array with Bz values [T] |
Definition at line 293 of file CbmFieldMap.cxx.
References fBx, fBxOrigin, fBy, fByOrigin, fBz, fBzOrigin, fNx, fNy, fNz, fXmax, fXmin, fXstep, fYmax, fYmin, fYstep, fZmax, fZmin, fZstep, GetBx(), GetBy(), GetBz(), Print(), and Reset().
|
protected |
Get field values by interpolation of the grid.
dx,dy,dz | Relative distance from grid point [cell units] |
Definition at line 786 of file CbmFieldMap.cxx.
Referenced by CbmFieldMapSym1::GetBx(), CbmFieldMapSym3::GetBx(), CbmFieldMapSym2::GetBx(), GetBx(), CbmFieldMapSym1::GetBy(), CbmFieldMapSym2::GetBy(), CbmFieldMapSym3::GetBy(), GetBy(), CbmFieldMapSym1::GetBz(), CbmFieldMapSym2::GetBz(), CbmFieldMapSym3::GetBz(), and GetBz().
|
virtual |
Determine whether a point is inside the field map
x,y,z | Point 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 in CbmFieldMapSym2, CbmFieldMapSym3, and CbmFieldMapSym1.
Definition at line 446 of file CbmFieldMap.cxx.
References fPosX, fPosY, fPosZ, fXmin, fXstep, fYmin, fYstep, fZmax, fZmin, fZstep, x, and y.
|
private |
|
virtual |
Screen output
Reimplemented in CbmFieldMapDistorted.
Definition at line 558 of file CbmFieldMap.cxx.
References fBxOrigin, fByOrigin, fBzOrigin, fNx, fNy, fNz, fPosX, fPosY, fPosZ, fScale, fXmax, fXmin, fXstep, fYmax, fYmin, fYstep, fZmax, fZmin, and fZstep.
Referenced by CbmBsField::CalculateMapFromBs(), and Init().
|
protected |
|
protected |
Read the field map from an ASCII file. Updated version.
|
protected |
Read field map from a ROOT file
Definition at line 698 of file CbmFieldMap.cxx.
References SetField().
Referenced by Init().
|
protected |
|
protected |
Set field parameters and data
Definition at line 732 of file CbmFieldMap.cxx.
References fBx, fBy, fBz, fNx, fNy, fNz, fScale, fXmax, fXmin, fXstep, fYmax, fYmin, fYstep, fZmax, fZmin, fZstep, CbmFieldMapData::GetBx(), CbmFieldMapData::GetBy(), CbmFieldMapData::GetBz(), CbmFieldMapData::GetNx(), CbmFieldMapData::GetNy(), CbmFieldMapData::GetNz(), CbmFieldMapData::GetType(), CbmFieldMapData::GetXmax(), CbmFieldMapData::GetXmin(), CbmFieldMapData::GetYmax(), CbmFieldMapData::GetYmin(), CbmFieldMapData::GetZmax(), and CbmFieldMapData::GetZmin().
Referenced by ReadRootFile().
|
virtual |
Set the position of the field centre
Reimplemented in CbmFieldMapDistorted.
Definition at line 549 of file CbmFieldMap.cxx.
References fPosX, fPosY, fPosZ, x, and y.
Referenced by CbmSetup::CreateFieldMap().
|
inlinevirtual |
Set a global field scaling factor
Reimplemented in CbmFieldMapDistorted.
Definition at line 129 of file CbmFieldMap.h.
References fScale.
Referenced by CbmSetup::CreateFieldMap().
void CbmFieldMap::WriteAsciiFile | ( | const char * | fileName | ) |
void CbmFieldMap::WriteRootFile | ( | const char * | fileName, |
const char * | mapName | ||
) |
Write field map data to a ROOT file
Definition at line 536 of file CbmFieldMap.cxx.
Referenced by CbmFieldMapCreator::CreateMap().
|
protected |
Arrays with the field values
Definition at line 219 of file CbmFieldMap.h.
Referenced by CbmBsField::CalculateMapFromBs(), CbmFieldMap(), CbmFieldMapSym1::GetBx(), CbmFieldMapSym2::GetBx(), CbmFieldMapSym3::GetBx(), GetBx(), Init(), ReadAsciiFile(), Reset(), SetField(), WriteAsciiFile(), and ~CbmFieldMap().
|
protected |
Interpolated field (1-dim)
Definition at line 230 of file CbmFieldMap.h.
Referenced by Init(), CbmFieldMapDistorted::Init(), CbmFieldMapDistorted::Print(), and Print().
|
protected |
Definition at line 220 of file CbmFieldMap.h.
Referenced by CbmBsField::CalculateMapFromBs(), CbmFieldMap(), CbmFieldMapSym1::GetBy(), CbmFieldMapSym2::GetBy(), CbmFieldMapSym3::GetBy(), GetBy(), Init(), ReadAsciiFile(), Reset(), SetField(), WriteAsciiFile(), and ~CbmFieldMap().
|
protected |
x-component of the field at the origin
Definition at line 231 of file CbmFieldMap.h.
Referenced by Init(), CbmFieldMapDistorted::Init(), CbmFieldMapDistorted::Print(), and Print().
|
protected |
Definition at line 221 of file CbmFieldMap.h.
Referenced by CbmBsField::CalculateMapFromBs(), CbmFieldMap(), CbmFieldMapSym1::GetBz(), CbmFieldMapSym2::GetBz(), CbmFieldMapSym3::GetBz(), GetBz(), Init(), ReadAsciiFile(), Reset(), SetField(), WriteAsciiFile(), and ~CbmFieldMap().
|
protected |
y-component of the field at the origin
Definition at line 232 of file CbmFieldMap.h.
Referenced by Init(), CbmFieldMapDistorted::Init(), CbmFieldMapDistorted::Print(), and Print().
|
protected |
Map file name
Definition at line 197 of file CbmFieldMap.h.
Referenced by CbmFieldMap(), GetFileName(), and Init().
|
protected |
Variables for temporary storage Used in the very frequently called method GetFieldValue
Definition at line 226 of file CbmFieldMap.h.
Referenced by CbmFieldMap(), CbmFieldMapSym1::GetBx(), CbmFieldMapSym3::GetBx(), CbmFieldMapSym2::GetBx(), GetBx(), CbmFieldMapSym1::GetBy(), CbmFieldMapSym3::GetBy(), CbmFieldMapSym2::GetBy(), GetBy(), CbmFieldMapSym1::GetBz(), CbmFieldMapSym2::GetBz(), CbmFieldMapSym3::GetBz(), GetBz(), and Interpolate().
|
protected |
Field at corners of a grid cell.
Definition at line 227 of file CbmFieldMap.h.
Referenced by CbmFieldMap(), and Interpolate().
|
protected |
Interpolated field (2-dim)
Definition at line 228 of file CbmFieldMap.h.
Referenced by CbmFieldMap(), and Interpolate().
|
protected |
Number of grid points
Definition at line 215 of file CbmFieldMap.h.
Referenced by CbmBsField::CalculateMapFromBs(), CbmFieldMap(), GetNx(), Init(), Print(), ReadAsciiFile(), Reset(), SetField(), CbmFieldMapDistorted::SetFromParent(), and WriteAsciiFile().
|
protected |
Definition at line 215 of file CbmFieldMap.h.
Referenced by CbmBsField::CalculateMapFromBs(), CbmFieldMap(), CbmFieldMapSym1::GetBx(), CbmFieldMapSym2::GetBx(), CbmFieldMapSym3::GetBx(), GetBx(), CbmFieldMapSym1::GetBy(), CbmFieldMapSym2::GetBy(), CbmFieldMapSym3::GetBy(), GetBy(), CbmFieldMapSym1::GetBz(), CbmFieldMapSym2::GetBz(), CbmFieldMapSym3::GetBz(), GetBz(), GetNy(), Init(), Print(), ReadAsciiFile(), Reset(), SetField(), CbmFieldMapDistorted::SetFromParent(), and WriteAsciiFile().
|
protected |
Definition at line 215 of file CbmFieldMap.h.
Referenced by CbmBsField::CalculateMapFromBs(), CbmFieldMap(), CbmFieldMapSym1::GetBx(), CbmFieldMapSym2::GetBx(), CbmFieldMapSym3::GetBx(), GetBx(), CbmFieldMapSym1::GetBy(), CbmFieldMapSym2::GetBy(), CbmFieldMapSym3::GetBy(), GetBy(), CbmFieldMapSym1::GetBz(), CbmFieldMapSym2::GetBz(), CbmFieldMapSym3::GetBz(), GetBz(), GetNz(), Init(), Print(), ReadAsciiFile(), Reset(), SetField(), CbmFieldMapDistorted::SetFromParent(), and WriteAsciiFile().
|
protected |
Field centre position in global coordinates
Definition at line 205 of file CbmFieldMap.h.
Referenced by CbmBsField::CalculateMapFromBs(), CbmFieldMap(), CbmBsField::GetFieldValue(), GetPositionX(), CbmFieldMapSym1::IsInside(), CbmFieldMapSym3::IsInside(), CbmFieldMapSym2::IsInside(), IsInside(), Print(), Reset(), CbmFieldMapDistorted::SetFromParent(), CbmFieldMapDistorted::SetPosition(), and SetPosition().
|
protected |
Definition at line 205 of file CbmFieldMap.h.
Referenced by CbmBsField::CalculateMapFromBs(), CbmFieldMap(), CbmBsField::GetFieldValue(), GetPositionY(), CbmFieldMapSym1::IsInside(), CbmFieldMapSym3::IsInside(), CbmFieldMapSym2::IsInside(), IsInside(), Print(), Reset(), CbmFieldMapDistorted::SetFromParent(), CbmFieldMapDistorted::SetPosition(), and SetPosition().
|
protected |
Definition at line 205 of file CbmFieldMap.h.
Referenced by CbmBsField::CalculateMapFromBs(), CbmFieldMap(), CbmBsField::GetFieldValue(), GetPositionZ(), CbmFieldMapSym1::IsInside(), CbmFieldMapSym3::IsInside(), CbmFieldMapSym2::IsInside(), IsInside(), Print(), Reset(), CbmFieldMapDistorted::SetFromParent(), CbmFieldMapDistorted::SetPosition(), and SetPosition().
|
protected |
Global scaling factor (w.r.t. map on file)
Definition at line 201 of file CbmFieldMap.h.
Referenced by CbmFieldMap(), CbmBsField::GetFieldValue(), GetScale(), Print(), ReadAsciiFile(), Reset(), SetField(), CbmFieldMapDistorted::SetFromParent(), CbmFieldMapDistorted::SetScale(), SetScale(), and WriteAsciiFile().
|
protected |
Definition at line 209 of file CbmFieldMap.h.
Referenced by CbmBsField::CalculateMapFromBs(), CbmFieldMap(), GetXmax(), Init(), Print(), ReadAsciiFile(), Reset(), SetField(), CbmFieldMapDistorted::SetFromParent(), and WriteAsciiFile().
|
protected |
Field limits in local coordinate system
Definition at line 209 of file CbmFieldMap.h.
Referenced by CbmBsField::CalculateMapFromBs(), CbmFieldMap(), GetXmin(), Init(), CbmFieldMapSym1::IsInside(), CbmFieldMapSym2::IsInside(), CbmFieldMapSym3::IsInside(), IsInside(), Print(), ReadAsciiFile(), Reset(), SetField(), CbmFieldMapDistorted::SetFromParent(), and WriteAsciiFile().
|
protected |
Definition at line 209 of file CbmFieldMap.h.
Referenced by CbmBsField::CalculateMapFromBs(), CbmFieldMap(), GetXstep(), Init(), CbmFieldMapSym1::IsInside(), CbmFieldMapSym3::IsInside(), CbmFieldMapSym2::IsInside(), IsInside(), Print(), ReadAsciiFile(), Reset(), SetField(), and CbmFieldMapDistorted::SetFromParent().
|
protected |
Definition at line 210 of file CbmFieldMap.h.
Referenced by CbmBsField::CalculateMapFromBs(), CbmFieldMap(), GetYmax(), Init(), Print(), ReadAsciiFile(), Reset(), SetField(), and WriteAsciiFile().
|
protected |
Definition at line 210 of file CbmFieldMap.h.
Referenced by CbmBsField::CalculateMapFromBs(), CbmFieldMap(), GetYmin(), Init(), CbmFieldMapSym1::IsInside(), CbmFieldMapSym2::IsInside(), CbmFieldMapSym3::IsInside(), IsInside(), Print(), ReadAsciiFile(), Reset(), SetField(), CbmFieldMapDistorted::SetFromParent(), and WriteAsciiFile().
|
protected |
Definition at line 210 of file CbmFieldMap.h.
Referenced by CbmBsField::CalculateMapFromBs(), CbmFieldMap(), GetYstep(), Init(), CbmFieldMapSym1::IsInside(), CbmFieldMapSym3::IsInside(), CbmFieldMapSym2::IsInside(), IsInside(), Print(), ReadAsciiFile(), Reset(), SetField(), and CbmFieldMapDistorted::SetFromParent().
|
protected |
Definition at line 211 of file CbmFieldMap.h.
Referenced by CbmBsField::CalculateMapFromBs(), CbmFieldMap(), GetZmax(), Init(), CbmFieldMapSym1::IsInside(), CbmFieldMapSym2::IsInside(), CbmFieldMapSym3::IsInside(), IsInside(), Print(), ReadAsciiFile(), Reset(), SetField(), CbmFieldMapDistorted::SetFromParent(), and WriteAsciiFile().
|
protected |
Definition at line 211 of file CbmFieldMap.h.
Referenced by CbmBsField::CalculateMapFromBs(), CbmFieldMap(), GetZmin(), Init(), CbmFieldMapSym1::IsInside(), CbmFieldMapSym2::IsInside(), CbmFieldMapSym3::IsInside(), IsInside(), Print(), ReadAsciiFile(), Reset(), SetField(), CbmFieldMapDistorted::SetFromParent(), and WriteAsciiFile().
|
protected |
Definition at line 211 of file CbmFieldMap.h.
Referenced by CbmBsField::CalculateMapFromBs(), CbmFieldMap(), GetZstep(), Init(), CbmFieldMapSym1::IsInside(), CbmFieldMapSym3::IsInside(), CbmFieldMapSym2::IsInside(), IsInside(), Print(), ReadAsciiFile(), Reset(), SetField(), and CbmFieldMapDistorted::SetFromParent().