Hall-D Software
alpha
|
#include <DMagneticFieldMapPS2DMap.h>
Classes | |
struct | DBfieldPoint_t |
Public Member Functions | |
DMagneticFieldMapPS2DMap (JApplication *japp, int32_t runnumber=1, string namepath="Magnets/PairSpectrometer/PS_1.8T_20150513_test") | |
DMagneticFieldMapPS2DMap (JCalibration *jcalib, string namepath="Magnets/PairSpectrometer/PS_1.8T_20150513_test") | |
virtual | ~DMagneticFieldMapPS2DMap () |
int | ReadMap (string namepath, int32_t runnumber=1, string context="") |
void | GetField (const DVector3 &pos, DVector3 &Bout) const |
void | GetField (double x, double y, double z, double &Bx, double &By, double &Bz, int method=0) const |
void | GetFieldGradient (double x, double y, double z, double &dBxdx, double &dBxdy, double &dBxdz, double &dBydx, double &dBydy, double &dBydz, double &dBzdx, double &dBzdy, double &dBzdz) const |
void | GetFieldBicubic (double x, double y, double z, double &Bx, double &By, double &Bz) const |
void | GetFieldAndGradient (double x, double y, double z, double &Bx, double &By, double &Bz, double &dBxdx, double &dBxdy, double &dBxdz, double &dBydx, double &dBydy, double &dBydz, double &dBzdx, double &dBzdy, double &dBzdz) const |
Protected Attributes | |
JCalibration * | jcalib |
JResourceManager * | jresman |
DGeometry * | geom |
vector< vector< vector < DBfieldPoint_t > > > | Btable |
float | xmin |
float | xmax |
float | ymin |
float | ymax |
float | zmin |
float | zmax |
int | Nx |
int | Ny |
int | Nz |
double | dx |
double | dy |
double | dz |
double | one_over_dx |
double | one_over_dz |
double | z_shift |
Private Member Functions | |
void | InterpolateField (double r, double z, double &Br, double &Bz, double &dBrdr, double &dBrdz, double &dBzdr, double &dBzdz) const |
Definition at line 24 of file DMagneticFieldMapPS2DMap.h.
DMagneticFieldMapPS2DMap::DMagneticFieldMapPS2DMap | ( | JApplication * | japp, |
int32_t | runnumber = 1 , |
||
string | namepath = "Magnets/PairSpectrometer/PS_1.8T_20150513_test" |
||
) |
Definition at line 23 of file DMagneticFieldMapPS2DMap.cc.
References _DBG_, dapp, DApplication::GetDGeometry(), and japp.
DMagneticFieldMapPS2DMap::DMagneticFieldMapPS2DMap | ( | JCalibration * | jcalib, |
string | namepath = "Magnets/PairSpectrometer/PS_1.8T_20150513_test" |
||
) |
Definition at line 44 of file DMagneticFieldMapPS2DMap.cc.
References _DBG_.
|
virtual |
Definition at line 58 of file DMagneticFieldMapPS2DMap.cc.
This calculates the magnetic field at an arbitrary point in space using the field map read from the calibaration database. It interpolates between grid points using the gradient values calculated in ReadMap (called from the constructor).
Implements DMagneticFieldMapPS.
Definition at line 569 of file DMagneticFieldMapPS2DMap.cc.
References _DBG_, DMagneticFieldMapPS2DMap::DBfieldPoint_t::Bx, DMagneticFieldMapPS2DMap::DBfieldPoint_t::By, DMagneticFieldMapPS2DMap::DBfieldPoint_t::Bz, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBxdx, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBxdz, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBzdx, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBzdz, Nz, x, DMagneticFieldMapPS2DMap::DBfieldPoint_t::x, DMagneticFieldMapPS2DMap::DBfieldPoint_t::z, zmax, and zmin.
|
virtual |
This calculates the magnetic field at an arbitrary point in space using the field map read from the calibaration database. It interpolates between grid points using the gradient values calculated in ReadMap (called from the constructor).
Implements DMagneticFieldMapPS.
Definition at line 512 of file DMagneticFieldMapPS2DMap.cc.
References _DBG_, DMagneticFieldMapPS2DMap::DBfieldPoint_t::Bx, DMagneticFieldMapPS2DMap::DBfieldPoint_t::By, DMagneticFieldMapPS2DMap::DBfieldPoint_t::Bz, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBxdx, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBxdz, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBzdx, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBzdz, Nz, DMagneticFieldMapPS2DMap::DBfieldPoint_t::x, DMagneticFieldMapPS2DMap::DBfieldPoint_t::z, zmax, and zmin.
|
virtual |
Implements DMagneticFieldMapPS.
Definition at line 405 of file DMagneticFieldMapPS2DMap.cc.
References DMagneticFieldMapPS2DMap::DBfieldPoint_t::Bx, DMagneticFieldMapPS2DMap::DBfieldPoint_t::By, DMagneticFieldMapPS2DMap::DBfieldPoint_t::Bz, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBxdx, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBxdy, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBxdz, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBydx, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBydy, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBydz, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBzdx, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBzdy, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBzdz, Nz, sqrt(), DMagneticFieldMapPS2DMap::DBfieldPoint_t::x, DMagneticFieldMapPS2DMap::DBfieldPoint_t::z, zmax, and zmin.
|
virtual |
Implements DMagneticFieldMapPS.
Definition at line 248 of file DMagneticFieldMapPS2DMap.cc.
References DMagneticFieldMapPS2DMap::DBfieldPoint_t::Bx, DMagneticFieldMapPS2DMap::DBfieldPoint_t::By, DMagneticFieldMapPS2DMap::DBfieldPoint_t::Bz, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBxdx, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBxdxdz, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBxdz, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBydx, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBydxdy, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBydy, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBzdx, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBzdxdz, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBzdz, Nz, temp, u, and zmin.
|
virtual |
Implements DMagneticFieldMapPS.
Definition at line 473 of file DMagneticFieldMapPS2DMap.cc.
References DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBxdx, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBxdz, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBydx, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBydz, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBzdx, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBzdz, Nz, and zmin.
|
private |
int DMagneticFieldMapPS2DMap::ReadMap | ( | string | namepath, |
int32_t | runnumber = 1 , |
||
string | context = "" |
||
) |
Read the magnetic field map in from the calibration database. This will read in the map and figure out the number of grid points in each direction (x,y, and z) and the range in each. The gradiant of the field is calculated for all but the most exterior points and saved to use in later calls to GetField(...).
Definition at line 66 of file DMagneticFieldMapPS2DMap.cc.
References _DBG_, DMagneticFieldMapPS2DMap::DBfieldPoint_t::Bx, DMagneticFieldMapPS2DMap::DBfieldPoint_t::By, DMagneticFieldMapPS2DMap::DBfieldPoint_t::Bz, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBxdx, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBxdxdz, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBxdz, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBydx, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBydz, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBzdx, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBzdxdz, DMagneticFieldMapPS2DMap::DBfieldPoint_t::dBzdz, Nz, x, DMagneticFieldMapPS2DMap::DBfieldPoint_t::x, DMagneticFieldMapPS2DMap::DBfieldPoint_t::y, y, ymax, ymin, DMagneticFieldMapPS2DMap::DBfieldPoint_t::z, zmax, and zmin.
|
protected |
Definition at line 70 of file DMagneticFieldMapPS2DMap.h.
|
protected |
Definition at line 74 of file DMagneticFieldMapPS2DMap.h.
|
protected |
Definition at line 74 of file DMagneticFieldMapPS2DMap.h.
|
protected |
Definition at line 74 of file DMagneticFieldMapPS2DMap.h.
|
protected |
Definition at line 68 of file DMagneticFieldMapPS2DMap.h.
|
protected |
Definition at line 66 of file DMagneticFieldMapPS2DMap.h.
|
protected |
Definition at line 67 of file DMagneticFieldMapPS2DMap.h.
|
protected |
Definition at line 73 of file DMagneticFieldMapPS2DMap.h.
|
protected |
Definition at line 73 of file DMagneticFieldMapPS2DMap.h.
|
protected |
Definition at line 73 of file DMagneticFieldMapPS2DMap.h.
|
protected |
Definition at line 75 of file DMagneticFieldMapPS2DMap.h.
|
protected |
Definition at line 75 of file DMagneticFieldMapPS2DMap.h.
|
protected |
Definition at line 72 of file DMagneticFieldMapPS2DMap.h.
|
protected |
Definition at line 72 of file DMagneticFieldMapPS2DMap.h.
|
protected |
Definition at line 72 of file DMagneticFieldMapPS2DMap.h.
|
protected |
Definition at line 72 of file DMagneticFieldMapPS2DMap.h.
|
protected |
Definition at line 77 of file DMagneticFieldMapPS2DMap.h.
|
protected |
Definition at line 72 of file DMagneticFieldMapPS2DMap.h.
|
protected |
Definition at line 72 of file DMagneticFieldMapPS2DMap.h.