PaField Class Reference

Magnetic fields. More...

#include <PaField.h>

List of all members.

Public Member Functions

Int_t getNumOfMags ()
 Returns the number of magnets.
PaMagInfo * getMagInfo ()
 Returns array of size 3 with magnets' information.
bool getField (Float_t pos_x, Float_t pos_y, Float_t pos_z, Float_t &field_x, Float_t &field_y, Float_t &field_z, TMatrix &grad) const
 Returns the magnetic field and gradient of that field in a particular point in space.
bool getField (Float_t pos_x, Float_t pos_y, Float_t pos_z, Float_t &field_x, Float_t &field_y, Float_t &field_z) const
 Returns the magnetic field in a particular point in space.

Detailed Description

Magnetic fields.

Provides access to magnetic field maps of all COMPASS magnets.

Author:
Alexandre.KORZENEV@cern.ch

Member Function Documentation

bool PaField::getField ( Float_t  pos_x,
Float_t  pos_y,
Float_t  pos_z,
Float_t &  field_x,
Float_t &  field_y,
Float_t &  field_z 
) const

Returns the magnetic field in a particular point in space.

To find the value of field between nodes of grid linear interpolation is used.

Parameters:
pos_x X position in space.
pos_y Y position in space.
pos_z Z position in space.
field_x Return value: X component of magnetic field vector in pos.
field_y Return value: Y component of magnetic field vector in pos.
field_z Return value: Z component of magnetic field vector in pos.

References Phast::Ref(), and Phast::UserFieldScale.

bool PaField::getField ( Float_t  pos_x,
Float_t  pos_y,
Float_t  pos_z,
Float_t &  field_x,
Float_t &  field_y,
Float_t &  field_z,
TMatrix &  grad 
) const

Returns the magnetic field and gradient of that field in a particular point in space.

To find the value of field between nodes of grid linear interpolation is used.

For calculation of derivative the following formula is used:

\[ \frac{\partial B(x,y,z)}{\partial x}=\frac{B(x+h,y,z)-B(x,y,z)}{h} \]

Parameters:
pos_x X position in space.
pos_y Y position in space.
pos_z Z position in space.
field_x Return value: X component of magnetic field vector in pos.
field_y Return value: Y component of magnetic field vector in pos.
field_z Return value: Z component of magnetic field vector in pos.
grad Return value: the gradient of magnetic field in pos.

\[ grad = \left( \begin{array}{ccc} \partial B_x / \partial x & \partial B_x / \partial y & \partial B_x / \partial z \\ \partial B_y / \partial x & \partial B_y / \partial y & \partial B_y / \partial z \\ \partial B_x / \partial x & \partial B_x / \partial y & \partial B_z / \partial z \\ \end{array} \right) \]

Referenced by PaSetup::MagField().


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

Generated by  doxygen 1.6.2