ATLAS Offline Software
|
#include <BFieldMesh.h>
Public Member Functions | |
BFieldMesh ()=default | |
BFieldMesh (const BFieldMesh &)=default | |
BFieldMesh (BFieldMesh &&)=default | |
BFieldMesh & | operator= (const BFieldMesh &)=default |
BFieldMesh & | operator= (BFieldMesh &&)=default |
~BFieldMesh ()=default | |
BFieldMesh (double zmin, double zmax, double rmin, double rmax, double phimin, double phimax, double bscale) | |
constructor with mesh dimensions and scale More... | |
void | setRange (double zmin, double zmax, double rmin, double rmax, double phimin, double phimax) |
set mesh range/dimensions More... | |
void | setBscale (double bscale) |
set B scale More... | |
void | scaleBscale (double factor) |
scale B scale by a factor More... | |
void | reserve (int nz, int nr, int nphi, int nfield) |
allocate space to vectors More... | |
void | reserve (int nz, int nr, int nphi) |
allocate space to vectors More... | |
void | appendMesh (int axis, double value) |
add a position for a cell corner for an axis More... | |
void | appendField (const BFieldVector< T > &field) |
append a filed vector More... | |
void | buildLUT () |
build Look Up Table More... | |
bool | inside (double z, double r, double phi) const |
void | getCache (double z, double r, double phi, BFieldCache &cache, double scaleFactor=1.0) const |
void | getB (const double *ATH_RESTRICT xyz, double *ATH_RESTRICT B, double *ATH_RESTRICT deriv=nullptr) const |
get the bfield given a point in xyz More... | |
double | min (size_t axis) const |
minimum for a particular axis = 0 (z), 1 (r), 2 (phi) More... | |
double | max (size_t axis) const |
maximum or a particular axis = 0 (z), 1 (r), 2 (phi) More... | |
double | zmin () const |
minimum in z More... | |
double | zmax () const |
maximum in z More... | |
double | rmin () const |
minimun in r More... | |
double | rmax () const |
maximum in r More... | |
double | phimin () const |
minimun in phi More... | |
double | phimax () const |
maximum in phi More... | |
unsigned | nmesh (size_t axis) const |
number of cells along each axis = 0 (z), 1 (r), 2 (phi) More... | |
double | mesh (size_t axis, size_t index) const |
coordinate along axis (0 (z), 1 (r), 2 (phi)) of the cell at index (0 to nmesh-1) More... | |
unsigned | nfield () const |
field entries in mesh More... | |
const BFieldVector< T > & | field (size_t index) const |
field vector at cell corner at index More... | |
double | bscale () const |
scale More... | |
int | memSize () const |
memory size More... | |
Protected Attributes | |
std::array< double, 3 > | m_min |
std::array< double, 3 > | m_max |
std::array< std::vector< double >, 3 > | m_mesh |
Private Attributes | |
std::vector< BFieldVector< T > > | m_field |
double | m_scale = 1.0 |
double | m_nomScale |
std::array< std::vector< int >, 3 > | m_LUT |
std::array< double, 3 > | m_invUnit = {0, 0, 0} |
int | m_roff = 0 |
int | m_zoff = 0 |
A 3-d mesh (axes z,r,phi) representing a simple field map.
The mesh is made up from 'cells' We hold numz, numr , numphi positions defining the corners of the cells.
Then we have numz X numr X numphi field values at these corners
The field type is templated simalar to BFieldVector
It is short for both solenoid and toroid for the nominal case. There is a special case for BFieldSolenoid (not used in the nominal case) which allows a tilt between the nominal and 'tilted' solenoid fields and uses double.
Definition at line 42 of file BFieldMesh.h.
|
default |
|
default |
|
default |
|
default |
BFieldMesh< T >::BFieldMesh | ( | double | zmin, |
double | zmax, | ||
double | rmin, | ||
double | rmax, | ||
double | phimin, | ||
double | phimax, | ||
double | bscale | ||
) |
constructor with mesh dimensions and scale
void BFieldMesh< T >::appendField | ( | const BFieldVector< T > & | field | ) |
append a filed vector
void BFieldMesh< T >::appendMesh | ( | int | axis, |
double | value | ||
) |
add a position for a cell corner for an axis
double BFieldMesh< T >::bscale | ( | ) | const |
scale
void BFieldMesh< T >::buildLUT | ( | ) |
build Look Up Table
const BFieldVector<T>& BFieldMesh< T >::field | ( | size_t | index | ) | const |
field vector at cell corner at index
void BFieldMesh< T >::getB | ( | const double *ATH_RESTRICT | xyz, |
double *ATH_RESTRICT | B, | ||
double *ATH_RESTRICT | deriv = nullptr |
||
) | const |
get the bfield given a point in xyz
void BFieldMesh< T >::getCache | ( | double | z, |
double | r, | ||
double | phi, | ||
BFieldCache & | cache, | ||
double | scaleFactor = 1.0 |
||
) | const |
bool BFieldMesh< T >::inside | ( | double | z, |
double | r, | ||
double | phi | ||
) | const |
double BFieldMesh< T >::max | ( | size_t | axis | ) | const |
maximum or a particular axis = 0 (z), 1 (r), 2 (phi)
int BFieldMesh< T >::memSize | ( | ) | const |
memory size
double BFieldMesh< T >::mesh | ( | size_t | axis, |
size_t | index | ||
) | const |
coordinate along axis (0 (z), 1 (r), 2 (phi)) of the cell at index (0 to nmesh-1)
double BFieldMesh< T >::min | ( | size_t | axis | ) | const |
minimum for a particular axis = 0 (z), 1 (r), 2 (phi)
unsigned BFieldMesh< T >::nfield | ( | ) | const |
field entries in mesh
unsigned BFieldMesh< T >::nmesh | ( | size_t | axis | ) | const |
number of cells along each axis = 0 (z), 1 (r), 2 (phi)
|
default |
|
default |
double BFieldMesh< T >::phimax | ( | ) | const |
maximum in phi
double BFieldMesh< T >::phimin | ( | ) | const |
minimun in phi
void BFieldMesh< T >::reserve | ( | int | nz, |
int | nr, | ||
int | nphi | ||
) |
allocate space to vectors
void BFieldMesh< T >::reserve | ( | int | nz, |
int | nr, | ||
int | nphi, | ||
int | nfield | ||
) |
allocate space to vectors
double BFieldMesh< T >::rmax | ( | ) | const |
maximum in r
double BFieldMesh< T >::rmin | ( | ) | const |
minimun in r
void BFieldMesh< T >::scaleBscale | ( | double | factor | ) |
scale B scale by a factor
void BFieldMesh< T >::setBscale | ( | double | bscale | ) |
set B scale
void BFieldMesh< T >::setRange | ( | double | zmin, |
double | zmax, | ||
double | rmin, | ||
double | rmax, | ||
double | phimin, | ||
double | phimax | ||
) |
set mesh range/dimensions
double BFieldMesh< T >::zmax | ( | ) | const |
maximum in z
double BFieldMesh< T >::zmin | ( | ) | const |
minimum in z
|
private |
Definition at line 133 of file BFieldMesh.h.
|
private |
Definition at line 139 of file BFieldMesh.h.
|
private |
Definition at line 138 of file BFieldMesh.h.
|
protected |
Definition at line 129 of file BFieldMesh.h.
|
protected |
Definition at line 130 of file BFieldMesh.h.
|
protected |
Definition at line 128 of file BFieldMesh.h.
|
private |
Definition at line 135 of file BFieldMesh.h.
|
private |
Definition at line 140 of file BFieldMesh.h.
|
private |
Definition at line 134 of file BFieldMesh.h.
|
private |
Definition at line 140 of file BFieldMesh.h.