FairRoot/PandaRoot
|
#include <PndFieldMap.h>
Public Member Functions | |
PndFieldMap () | |
PndFieldMap (const char *mapName, const char *fileType="R") | |
PndFieldMap (PndFieldPar *fieldPar) | |
virtual | ~PndFieldMap () |
virtual void | Init () |
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) |
void | SetPosition (Double_t x, Double_t y, Double_t z) |
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 | GetUnit () 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 () |
Protected Member Functions | |
void | Reset () |
void | ReadAsciiFile (const char *fileName) |
void | ReadRootFile (const char *fileName, const char *mapName) |
void | SetField (const PndFieldMapData *data) |
Double_t | Interpolate (Double_t dx, Double_t dy, Double_t dz) |
Protected Attributes | |
TString | fFileName |
Double_t | fScale |
Double_t | funit |
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... | |
Private Member Functions | |
PndFieldMap (const PndFieldMap &L) | |
PndFieldMap & | operator= (const PndFieldMap &) |
Definition at line 23 of file PndFieldMap.h.
PndFieldMap::PndFieldMap | ( | ) |
Default constructor
Definition at line 23 of file PndFieldMap.cxx.
References SetName.
PndFieldMap::PndFieldMap | ( | const char * | mapName, |
const char * | fileType = "R" |
||
) |
Standard constructor
name | Name of field map |
fileType | R = ROOT file, A = ASCII |
Definition at line 43 of file PndFieldMap.cxx.
References fFileName, SetName, and TString.
PndFieldMap::PndFieldMap | ( | PndFieldPar * | fieldPar | ) |
Constructor from PndFieldPar
Definition at line 67 of file PndFieldMap.cxx.
References fFileName, fPosX, fPosY, fPosZ, fScale, PndFieldPar::GetPositionX(), PndFieldPar::GetPositionY(), PndFieldPar::GetPositionZ(), PndFieldPar::GetScale(), PndFieldPar::GetType(), PndFieldPar::MapName(), SetName, and TString.
|
virtual |
|
private |
Get the field components at a certain point
x,y,z | Point coordinates (global) [cm] Bx,By,Bz Field components [kG] |
Definition at line 157 of file PndFieldMap.cxx.
References Double_t, dx, dy, dz, fBx, fHa, fNy, fNz, Interpolate(), and IsInside().
Referenced by interpolate_fieldmap().
|
inline |
Accessors to the field value arrays
Definition at line 114 of file PndFieldMap.h.
References fBx.
Referenced by Print().
Definition at line 190 of file PndFieldMap.cxx.
References Double_t, dx, dy, dz, fBy, fHa, fNy, fNz, Interpolate(), and IsInside().
Referenced by interpolate_fieldmap().
|
inline |
Definition at line 223 of file PndFieldMap.cxx.
References Double_t, dx, dy, dz, fBz, fHa, fNy, fNz, Interpolate(), and IsInside().
Referenced by interpolate_fieldmap().
|
inline |
|
inline |
|
inline |
Definition at line 97 of file PndFieldMap.h.
References fNx.
Referenced by interpolate_fieldmap(), and transform_jost_fieldmap().
|
inline |
Definition at line 98 of file PndFieldMap.h.
References fNy.
Referenced by interpolate_fieldmap(), and transform_jost_fieldmap().
|
inline |
Definition at line 99 of file PndFieldMap.h.
References fNz.
Referenced by interpolate_fieldmap(), and transform_jost_fieldmap().
|
inline |
Accessor to field centre position in global system
Definition at line 104 of file PndFieldMap.h.
References fPosX.
Referenced by PndFieldPar::SetParameters(), and PndMapPar::SetParameters().
|
inline |
Definition at line 105 of file PndFieldMap.h.
References fPosY.
Referenced by PndFieldPar::SetParameters(), and PndMapPar::SetParameters().
|
inline |
Definition at line 106 of file PndFieldMap.h.
References fPosZ.
Referenced by PndFieldPar::SetParameters(), and PndMapPar::SetParameters().
|
inline |
Accessor to global scaling factor
Definition at line 110 of file PndFieldMap.h.
References fScale.
Referenced by interpolate_fieldmap(), PndFieldMapData::PndFieldMapData(), PndFieldPar::SetParameters(), and PndMapPar::SetParameters().
|
inline |
Definition at line 101 of file PndFieldMap.h.
References funit.
Referenced by interpolate_fieldmap().
|
inline |
Definition at line 91 of file PndFieldMap.h.
References fXmax.
Referenced by interpolate_fieldmap().
|
inline |
Accessors to field parameters in local coordinate system
Definition at line 88 of file PndFieldMap.h.
References fXmin.
Referenced by interpolate_fieldmap().
|
inline |
|
inline |
Definition at line 92 of file PndFieldMap.h.
References fYmax.
Referenced by interpolate_fieldmap().
|
inline |
Definition at line 89 of file PndFieldMap.h.
References fYmin.
Referenced by interpolate_fieldmap().
|
inline |
|
inline |
Definition at line 93 of file PndFieldMap.h.
References fZmax.
Referenced by PndMultiField::Init(), and interpolate_fieldmap().
|
inline |
Definition at line 90 of file PndFieldMap.h.
References fZmin.
Referenced by PndMultiField::Init(), and interpolate_fieldmap().
|
inline |
|
virtual |
Initialisation (read map from file)
Definition at line 144 of file PndFieldMap.cxx.
References fFileName, ReadAsciiFile(), and ReadRootFile().
Referenced by PndMultiField::Init(), interpolate_fieldmap(), and transform_jost_fieldmap().
Get field values by interpolation of the grid.
dx,dy,dz | Relative distance from grid point [cell units] |
Definition at line 621 of file PndFieldMap.cxx.
Referenced by GetBx(), PndTransMap::GetBxyz(), PndDipoleMap::GetBxyz(), PndSolenoidMap::GetBxyz(), GetBy(), 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 kTRUE if inside map, else kFALSE |
Reimplemented in PndDipoleMap, PndSolenoidMap, and PndTransMap.
Definition at line 256 of file PndFieldMap.cxx.
References Double_t, fPosX, fPosY, fPosZ, fXmin, fXstep, fYmax, fYmin, fYstep, fZmax, fZmin, and fZstep.
Referenced by GetBx(), GetBy(), and GetBz().
|
inlineprivate |
Definition at line 128 of file PndFieldMap.h.
|
virtual |
|
protected |
Read the field map from an ASCII file
Definition at line 431 of file PndFieldMap.cxx.
References Double_t, fBx, fBy, fBz, fNx, fNy, fNz, fScale, funit, fXmax, fXmin, fXstep, fYmax, fYmin, fYstep, fZmax, fZmin, fZstep, CAMath::Nint(), and TString.
Referenced by Init().
|
protected |
Read field map from a ROOT file
Definition at line 536 of file PndFieldMap.cxx.
References exit(), file, and SetField().
Referenced by Init().
|
protected |
|
protected |
Set field parameters and data
Definition at line 573 of file PndFieldMap.cxx.
References Double_t, fBx, fBy, fBz, fNx, fNy, fNz, fScale, funit, fXmax, fXmin, fXstep, fYmax, fYmin, fYstep, fZmax, fZmin, fZstep, PndFieldMapData::GetBx(), PndFieldMapData::GetBy(), PndFieldMapData::GetBz(), PndFieldMapData::GetNx(), PndFieldMapData::GetNy(), PndFieldMapData::GetNz(), PndFieldMapData::GetType(), PndFieldMapData::GetXmax(), PndFieldMapData::GetXmin(), PndFieldMapData::GetYmax(), PndFieldMapData::GetYmin(), PndFieldMapData::GetZmax(), and PndFieldMapData::GetZmin().
Referenced by ReadRootFile().
|
inline |
void PndFieldMap::WriteAsciiFile | ( | const char * | fileName | ) |
void PndFieldMap::WriteRootFile | ( | const char * | fileName, |
const char * | mapName | ||
) |
Write field map data to a ROOT file
Definition at line 352 of file PndFieldMap.cxx.
References file.
Referenced by interpolate_fieldmap(), and transform_jost_fieldmap().
|
protected |
Arrays with the field values
Definition at line 182 of file PndFieldMap.h.
Referenced by GetBx(), PndTransMap::GetBxyz(), PndDipoleMap::GetBxyz(), PndSolenoidMap::GetBxyz(), PndDipoleMap::PndDipoleMap(), PndTransMap::PndTransMap(), ReadAsciiFile(), Reset(), SetField(), WriteAsciiFile(), and ~PndFieldMap().
|
protected |
Definition at line 183 of file PndFieldMap.h.
Referenced by PndTransMap::GetBxyz(), PndDipoleMap::GetBxyz(), PndSolenoidMap::GetBxyz(), GetBy(), PndDipoleMap::PndDipoleMap(), PndTransMap::PndTransMap(), ReadAsciiFile(), Reset(), SetField(), WriteAsciiFile(), and ~PndFieldMap().
|
protected |
Definition at line 184 of file PndFieldMap.h.
Referenced by PndTransMap::GetBxyz(), PndDipoleMap::GetBxyz(), PndSolenoidMap::GetBxyz(), GetBz(), PndDipoleMap::PndDipoleMap(), PndTransMap::PndTransMap(), ReadAsciiFile(), Reset(), SetField(), WriteAsciiFile(), and ~PndFieldMap().
|
protected |
Map file name
Definition at line 157 of file PndFieldMap.h.
Referenced by GetFileName(), Init(), PndDipoleMap::PndDipoleMap(), PndFieldMap(), PndSolenoidMap::PndSolenoidMap(), and PndTransMap::PndTransMap().
|
protected |
Variables for temporary storage Used in the very frequently called method GetFieldValue
Definition at line 189 of file PndFieldMap.h.
Referenced by GetBx(), PndTransMap::GetBxyz(), PndDipoleMap::GetBxyz(), PndSolenoidMap::GetBxyz(), GetBy(), GetBz(), Interpolate(), and PndFieldMap().
|
protected |
Field at corners of a grid cell.
Definition at line 190 of file PndFieldMap.h.
Referenced by Interpolate(), and PndFieldMap().
|
protected |
Interpolated field (2-dim)
Definition at line 191 of file PndFieldMap.h.
Referenced by Interpolate(), and PndFieldMap().
|
protected |
Number of grid points
Definition at line 178 of file PndFieldMap.h.
Referenced by GetNx(), PndDipoleMap::PndDipoleMap(), PndTransMap::PndTransMap(), Print(), ReadAsciiFile(), Reset(), SetField(), and WriteAsciiFile().
|
protected |
Definition at line 178 of file PndFieldMap.h.
Referenced by GetBx(), PndTransMap::GetBxyz(), PndDipoleMap::GetBxyz(), PndSolenoidMap::GetBxyz(), GetBy(), GetBz(), GetNy(), PndDipoleMap::PndDipoleMap(), PndTransMap::PndTransMap(), Print(), ReadAsciiFile(), Reset(), SetField(), and WriteAsciiFile().
|
protected |
Definition at line 178 of file PndFieldMap.h.
Referenced by GetBx(), PndTransMap::GetBxyz(), PndDipoleMap::GetBxyz(), PndSolenoidMap::GetBxyz(), GetBy(), GetBz(), GetNz(), PndDipoleMap::PndDipoleMap(), PndTransMap::PndTransMap(), Print(), ReadAsciiFile(), Reset(), SetField(), and WriteAsciiFile().
|
protected |
Field centre position in global coordinates
Definition at line 168 of file PndFieldMap.h.
Referenced by GetPositionX(), PndDipoleMap::IsInside(), PndTransMap::IsInside(), PndSolenoidMap::IsInside(), IsInside(), PndDipoleMap::PndDipoleMap(), PndFieldMap(), PndSolenoidMap::PndSolenoidMap(), PndTransMap::PndTransMap(), Print(), Reset(), and SetPosition().
|
protected |
Definition at line 168 of file PndFieldMap.h.
Referenced by GetPositionY(), PndDipoleMap::IsInside(), PndTransMap::IsInside(), PndSolenoidMap::IsInside(), IsInside(), PndDipoleMap::PndDipoleMap(), PndFieldMap(), PndSolenoidMap::PndSolenoidMap(), PndTransMap::PndTransMap(), Print(), Reset(), and SetPosition().
|
protected |
Definition at line 168 of file PndFieldMap.h.
Referenced by GetPositionZ(), PndDipoleMap::IsInside(), PndTransMap::IsInside(), PndSolenoidMap::IsInside(), IsInside(), PndDipoleMap::PndDipoleMap(), PndFieldMap(), PndSolenoidMap::PndSolenoidMap(), PndTransMap::PndTransMap(), Print(), Reset(), and SetPosition().
|
protected |
Global scaling factor (w.r.t. map on file)
Definition at line 161 of file PndFieldMap.h.
Referenced by GetScale(), PndDipoleMap::PndDipoleMap(), PndFieldMap(), PndSolenoidMap::PndSolenoidMap(), PndTransMap::PndTransMap(), Print(), ReadAsciiFile(), Reset(), SetField(), SetScale(), and WriteAsciiFile().
|
protected |
Units used in map file
Definition at line 164 of file PndFieldMap.h.
Referenced by GetUnit(), PndDipoleMap::PndDipoleMap(), PndTransMap::PndTransMap(), ReadAsciiFile(), Reset(), SetField(), and WriteAsciiFile().
|
protected |
Definition at line 172 of file PndFieldMap.h.
Referenced by GetXmax(), PndDipoleMap::PndDipoleMap(), PndTransMap::PndTransMap(), Print(), ReadAsciiFile(), Reset(), SetField(), and WriteAsciiFile().
|
protected |
Field limits in local coordinate system
Definition at line 172 of file PndFieldMap.h.
Referenced by GetXmin(), PndDipoleMap::IsInside(), PndTransMap::IsInside(), PndSolenoidMap::IsInside(), IsInside(), PndDipoleMap::PndDipoleMap(), PndTransMap::PndTransMap(), Print(), ReadAsciiFile(), Reset(), SetField(), and WriteAsciiFile().
|
protected |
Definition at line 172 of file PndFieldMap.h.
Referenced by GetXstep(), PndDipoleMap::IsInside(), PndTransMap::IsInside(), PndSolenoidMap::IsInside(), IsInside(), PndDipoleMap::PndDipoleMap(), PndTransMap::PndTransMap(), Print(), ReadAsciiFile(), Reset(), and SetField().
|
protected |
Definition at line 173 of file PndFieldMap.h.
Referenced by GetYmax(), PndDipoleMap::IsInside(), PndTransMap::IsInside(), PndSolenoidMap::IsInside(), IsInside(), PndDipoleMap::PndDipoleMap(), PndTransMap::PndTransMap(), Print(), ReadAsciiFile(), Reset(), SetField(), and WriteAsciiFile().
|
protected |
Definition at line 173 of file PndFieldMap.h.
Referenced by GetYmin(), PndDipoleMap::IsInside(), PndTransMap::IsInside(), PndSolenoidMap::IsInside(), IsInside(), PndDipoleMap::PndDipoleMap(), PndTransMap::PndTransMap(), Print(), ReadAsciiFile(), Reset(), SetField(), and WriteAsciiFile().
|
protected |
Definition at line 173 of file PndFieldMap.h.
Referenced by GetYstep(), PndDipoleMap::IsInside(), PndTransMap::IsInside(), PndSolenoidMap::IsInside(), IsInside(), PndDipoleMap::PndDipoleMap(), PndTransMap::PndTransMap(), Print(), ReadAsciiFile(), Reset(), and SetField().
|
protected |
Definition at line 174 of file PndFieldMap.h.
Referenced by GetZmax(), PndDipoleMap::IsInside(), PndTransMap::IsInside(), PndSolenoidMap::IsInside(), IsInside(), PndDipoleMap::PndDipoleMap(), PndTransMap::PndTransMap(), Print(), ReadAsciiFile(), Reset(), SetField(), and WriteAsciiFile().
|
protected |
Definition at line 174 of file PndFieldMap.h.
Referenced by GetZmin(), PndDipoleMap::IsInside(), PndTransMap::IsInside(), PndSolenoidMap::IsInside(), IsInside(), PndDipoleMap::PndDipoleMap(), PndTransMap::PndTransMap(), Print(), ReadAsciiFile(), Reset(), SetField(), and WriteAsciiFile().
|
protected |
Definition at line 174 of file PndFieldMap.h.
Referenced by GetZstep(), PndDipoleMap::IsInside(), PndTransMap::IsInside(), PndSolenoidMap::IsInside(), IsInside(), PndDipoleMap::PndDipoleMap(), PndTransMap::PndTransMap(), Print(), ReadAsciiFile(), Reset(), and SetField().