Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DMagneticFieldMapPS2DMap Class Reference

#include <DMagneticFieldMapPS2DMap.h>

+ Inheritance diagram for DMagneticFieldMapPS2DMap:

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
 
DGeometrygeom
 
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
 

Detailed Description

Definition at line 24 of file DMagneticFieldMapPS2DMap.h.

Constructor & Destructor Documentation

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_.

DMagneticFieldMapPS2DMap::~DMagneticFieldMapPS2DMap ( )
virtual

Definition at line 58 of file DMagneticFieldMapPS2DMap.cc.

Member Function Documentation

void DMagneticFieldMapPS2DMap::GetField ( const DVector3 pos,
DVector3 Bout 
) const
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 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.

void DMagneticFieldMapPS2DMap::GetField ( double  x,
double  y,
double  z,
double &  Bx,
double &  By,
double &  Bz,
int  method = 0 
) const
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.

void DMagneticFieldMapPS2DMap::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
virtual
void DMagneticFieldMapPS2DMap::InterpolateField ( double  r,
double  z,
double &  Br,
double &  Bz,
double &  dBrdr,
double &  dBrdz,
double &  dBzdr,
double &  dBzdz 
) const
private
int DMagneticFieldMapPS2DMap::ReadMap ( string  namepath,
int32_t  runnumber = 1,
string  context = "" 
)

Member Data Documentation

vector< vector< vector<DBfieldPoint_t> > > DMagneticFieldMapPS2DMap::Btable
protected

Definition at line 70 of file DMagneticFieldMapPS2DMap.h.

double DMagneticFieldMapPS2DMap::dx
protected

Definition at line 74 of file DMagneticFieldMapPS2DMap.h.

double DMagneticFieldMapPS2DMap::dy
protected

Definition at line 74 of file DMagneticFieldMapPS2DMap.h.

double DMagneticFieldMapPS2DMap::dz
protected

Definition at line 74 of file DMagneticFieldMapPS2DMap.h.

DGeometry* DMagneticFieldMapPS2DMap::geom
protected

Definition at line 68 of file DMagneticFieldMapPS2DMap.h.

JCalibration* DMagneticFieldMapPS2DMap::jcalib
protected

Definition at line 66 of file DMagneticFieldMapPS2DMap.h.

JResourceManager* DMagneticFieldMapPS2DMap::jresman
protected

Definition at line 67 of file DMagneticFieldMapPS2DMap.h.

int DMagneticFieldMapPS2DMap::Nx
protected

Definition at line 73 of file DMagneticFieldMapPS2DMap.h.

int DMagneticFieldMapPS2DMap::Ny
protected

Definition at line 73 of file DMagneticFieldMapPS2DMap.h.

int DMagneticFieldMapPS2DMap::Nz
protected

Definition at line 73 of file DMagneticFieldMapPS2DMap.h.

double DMagneticFieldMapPS2DMap::one_over_dx
protected

Definition at line 75 of file DMagneticFieldMapPS2DMap.h.

double DMagneticFieldMapPS2DMap::one_over_dz
protected

Definition at line 75 of file DMagneticFieldMapPS2DMap.h.

float DMagneticFieldMapPS2DMap::xmax
protected

Definition at line 72 of file DMagneticFieldMapPS2DMap.h.

float DMagneticFieldMapPS2DMap::xmin
protected

Definition at line 72 of file DMagneticFieldMapPS2DMap.h.

float DMagneticFieldMapPS2DMap::ymax
protected

Definition at line 72 of file DMagneticFieldMapPS2DMap.h.

float DMagneticFieldMapPS2DMap::ymin
protected

Definition at line 72 of file DMagneticFieldMapPS2DMap.h.

double DMagneticFieldMapPS2DMap::z_shift
protected

Definition at line 77 of file DMagneticFieldMapPS2DMap.h.

float DMagneticFieldMapPS2DMap::zmax
protected

Definition at line 72 of file DMagneticFieldMapPS2DMap.h.

float DMagneticFieldMapPS2DMap::zmin
protected

Definition at line 72 of file DMagneticFieldMapPS2DMap.h.


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