Bfield manager to obtain the magnetic field at any point.
More...
#include <BFieldManager.h>
|
static void | getField (const double *pos, double *field) |
| return the magnetic field at a given position.
|
|
static ROOT::Math::XYZVector | getField (double x, double y, double z) |
| return the magnetic field at a given position.
|
|
static ROOT::Math::XYZVector | getField (const ROOT::Math::XYZVector &pos) |
| return the magnetic field at a given position.
|
|
static ROOT::Math::XYZVector | getFieldInTesla (const ROOT::Math::XYZVector &pos) |
| return the magnetic field at a given position in Tesla.
|
|
static BFieldManager & | getInstance () |
| Return the instance of the magnetic field manager.
|
|
|
| BFieldManager ()=default |
| Singleton: private constructor.
|
|
| BFieldManager (BFieldManager &)=delete |
| Singleton: no copy constructor.
|
|
BFieldManager & | operator= (const BFieldManager &)=delete |
| Singleton: no assignment operator.
|
|
| ~BFieldManager ()=default |
| Empty destructor: this is just a wrapper to access the database object.
|
|
ROOT::Math::XYZVector | calculate (const ROOT::Math::XYZVector &pos) const |
| Calculate the field value at a given position and return it.
|
|
Bfield manager to obtain the magnetic field at any point.
This class is implemented as singleton, there can only be one magnetic field. It has static members to get the field at a given point.
- Note
- For internal use in the simulation, there is also a BFieldMap class in the geometry package with similar behaviour. To ensure consistent output, the BFieldFrameworkInterface component provides a wrapper around BFieldMap and is used by default.
Definition at line 32 of file BFieldManager.h.
◆ getField() [1/2]
static ROOT::Math::XYZVector getField |
( |
const ROOT::Math::XYZVector & |
pos | ) |
|
|
inlinestatic |
return the magnetic field at a given position.
- Parameters
-
pos | position where to evaluate the magnetic field |
- Returns
- magnetic field value at position pos in framework units
Definition at line 53 of file BFieldManager.h.
54 {
56 }
static BFieldManager & getInstance()
Return the instance of the magnetic field manager.
ROOT::Math::XYZVector calculate(const ROOT::Math::XYZVector &pos) const
Calculate the field value at a given position and return it.
◆ getField() [2/2]
static ROOT::Math::XYZVector getField |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z |
|
) |
| |
|
inlinestatic |
return the magnetic field at a given position.
- Parameters
-
x | x coordinate of the position where to evaluate the magnetic field |
y | y coordinate of the position where to evaluate the magnetic field |
z | z coordinate of the position where to evaluate the magnetic field |
- Returns
- magnetic field value at position pos in framework units
Definition at line 45 of file BFieldManager.h.
46 {
47 return getField(ROOT::Math::XYZVector(x, y, z));
48 }
static void getField(const double *pos, double *field)
return the magnetic field at a given position.
◆ getFieldInTesla()
static ROOT::Math::XYZVector getFieldInTesla |
( |
const ROOT::Math::XYZVector & |
pos | ) |
|
|
inlinestatic |
return the magnetic field at a given position in Tesla.
- Parameters
-
pos | position where to evaluate the magnetic field |
- Returns
- magnetic field value at position pos in Tesla
Definition at line 61 of file BFieldManager.h.
62 {
64 }
static const double T
[tesla]
◆ getInstance()
Return the instance of the magnetic field manager.
Definition at line 13 of file BFieldManager.cc.
14{
16 return instance;
17}
Bfield manager to obtain the magnetic field at any point.
◆ m_magfield
Pointer to the actual magnetic field in the database.
Definition at line 82 of file BFieldManager.h.
The documentation for this class was generated from the following files: