ATLAS Offline Software
Loading...
Searching...
No Matches
BFieldZone Class Reference

#include <BFieldZone.h>

Inheritance diagram for BFieldZone:
Collaboration diagram for BFieldZone:

Public Member Functions

 BFieldZone (int id, double zmin, double zmax, double rmin, double rmax, double phimin, double phimax, double scale)
void appendCond (const BFieldCond &cond)
 add elements to the current conductors vector
void addBiotSavart (const double *ATH_RESTRICT xyz, double *ATH_RESTRICT B, double *ATH_RESTRICT deriv=nullptr) const
 compute Biot-Savart magnetic field and add to B[3]
int id () const
unsigned ncond () const
const BFieldCondcond (int i) const
const std::vector< BFieldCond > * condVector () const
int memSize () const
void adjustMin (int i, double x)
void adjustMax (int i, double x)
void setRange (double zmin, double zmax, double rmin, double rmax, double phimin, double phimax)
 set mesh range/dimensions
void setBscale (double bscale)
 set B scale
void scaleBscale (double factor)
 scale B scale by a factor
void reserve (int nz, int nr, int nphi, int nfield)
 allocate space to vectors
void appendMesh (int axis, double value)
 add a position for a cell corner for an axis
void appendField (const BFieldVector< short > &field)
 append a filed vector
void buildLUT ()
 build Look Up Table
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
double min (size_t axis) const
 minimum for a particular axis = 0 (z), 1 (r), 2 (phi)
double max (size_t axis) const
 maximum or a particular axis = 0 (z), 1 (r), 2 (phi)
double zmin () const
 minimum in z
double zmax () const
 maximum in z
double rmin () const
 minimun in r
double rmax () const
 maximum in r
double phimin () const
 minimun in phi
double phimax () const
 maximum in phi
unsigned nmesh (size_t axis) const
 number of cells along each axis = 0 (z), 1 (r), 2 (phi)
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)
unsigned nfield () const
 field entries in mesh
const BFieldVector< short > & field (size_t index) const
 field vector at cell corner at index
double bscale () const
 scale

Protected Attributes

std::array< double, 3 > m_min
std::array< double, 3 > m_max
std::array< std::vector< double >, 3 > m_mesh

Private Attributes

int m_id
std::vector< BFieldCondm_cond
std::vector< BFieldVector< short > > m_field
double m_scale
double m_nomScale
std::array< std::vector< int >, 3 > m_LUT
std::array< double, 3 > m_invUnit
int m_roff
int m_zoff

Detailed Description

Definition at line 28 of file BFieldZone.h.

Constructor & Destructor Documentation

◆ BFieldZone()

BFieldZone::BFieldZone ( int id,
double zmin,
double zmax,
double rmin,
double rmax,
double phimin,
double phimax,
double scale )

Member Function Documentation

◆ addBiotSavart()

void BFieldZone::addBiotSavart ( const double *ATH_RESTRICT xyz,
double *ATH_RESTRICT B,
double *ATH_RESTRICT deriv = nullptr ) const

compute Biot-Savart magnetic field and add to B[3]

◆ adjustMax()

void BFieldZone::adjustMax ( int i,
double x )

◆ adjustMin()

void BFieldZone::adjustMin ( int i,
double x )

◆ appendCond()

void BFieldZone::appendCond ( const BFieldCond & cond)

add elements to the current conductors vector

◆ appendField()

void BFieldMesh< short >::appendField ( const BFieldVector< short > & field)
inherited

append a filed vector

◆ appendMesh()

void BFieldMesh< short >::appendMesh ( int axis,
double value )
inherited

add a position for a cell corner for an axis

◆ bscale()

double BFieldMesh< short >::bscale ( ) const
inherited

scale

◆ buildLUT()

void BFieldMesh< short >::buildLUT ( )
inherited

build Look Up Table

◆ cond()

const BFieldCond & BFieldZone::cond ( int i) const

◆ condVector()

const std::vector< BFieldCond > * BFieldZone::condVector ( ) const

◆ field()

const BFieldVector< short > & BFieldMesh< short >::field ( size_t index) const
inherited

field vector at cell corner at index

◆ getB()

void BFieldMesh< short >::getB ( const double *ATH_RESTRICT xyz,
double *ATH_RESTRICT B,
double *ATH_RESTRICT deriv = nullptr ) const
inherited

get the bfield given a point in xyz

◆ getCache()

void BFieldMesh< short >::getCache ( double z,
double r,
double phi,
BFieldCache & cache,
double scaleFactor = 1.0 ) const
inherited

◆ id()

int BFieldZone::id ( ) const

◆ inside()

bool BFieldMesh< short >::inside ( double z,
double r,
double phi ) const
inherited

◆ max()

double BFieldMesh< short >::max ( size_t axis) const
inherited

maximum or a particular axis = 0 (z), 1 (r), 2 (phi)

◆ memSize()

int BFieldZone::memSize ( ) const

◆ mesh()

double BFieldMesh< short >::mesh ( size_t axis,
size_t index ) const
inherited

coordinate along axis (0 (z), 1 (r), 2 (phi)) of the cell at index (0 to nmesh-1)

◆ min()

double BFieldMesh< short >::min ( size_t axis) const
inherited

minimum for a particular axis = 0 (z), 1 (r), 2 (phi)

◆ ncond()

unsigned BFieldZone::ncond ( ) const

◆ nfield()

unsigned BFieldMesh< short >::nfield ( ) const
inherited

field entries in mesh

◆ nmesh()

unsigned BFieldMesh< short >::nmesh ( size_t axis) const
inherited

number of cells along each axis = 0 (z), 1 (r), 2 (phi)

◆ phimax()

double BFieldMesh< short >::phimax ( ) const
inherited

maximum in phi

◆ phimin()

double BFieldMesh< short >::phimin ( ) const
inherited

minimun in phi

◆ reserve()

void BFieldMesh< short >::reserve ( int nz,
int nr,
int nphi,
int nfield )
inherited

allocate space to vectors

◆ rmax()

double BFieldMesh< short >::rmax ( ) const
inherited

maximum in r

◆ rmin()

double BFieldMesh< short >::rmin ( ) const
inherited

minimun in r

◆ scaleBscale()

void BFieldMesh< short >::scaleBscale ( double factor)
inherited

scale B scale by a factor

◆ setBscale()

void BFieldMesh< short >::setBscale ( double bscale)
inherited

set B scale

◆ setRange()

void BFieldMesh< short >::setRange ( double zmin,
double zmax,
double rmin,
double rmax,
double phimin,
double phimax )
inherited

set mesh range/dimensions

◆ zmax()

double BFieldMesh< short >::zmax ( ) const
inherited

maximum in z

◆ zmin()

double BFieldMesh< short >::zmin ( ) const
inherited

minimum in z

Member Data Documentation

◆ m_cond

std::vector<BFieldCond> BFieldZone::m_cond
private

Definition at line 58 of file BFieldZone.h.

◆ m_field

std::vector<BFieldVector<short> > BFieldMesh< short >::m_field
privateinherited

Definition at line 133 of file BFieldMesh.h.

◆ m_id

int BFieldZone::m_id
private

Definition at line 57 of file BFieldZone.h.

◆ m_invUnit

std::array<double, 3> BFieldMesh< short >::m_invUnit
privateinherited

Definition at line 139 of file BFieldMesh.h.

139{}; // inverse unit size in the LUT

◆ m_LUT

std::array<std::vector<int>, 3> BFieldMesh< short >::m_LUT
privateinherited

Definition at line 138 of file BFieldMesh.h.

138{};

◆ m_max

std::array<double, 3> BFieldMesh< short >::m_max
protectedinherited

Definition at line 129 of file BFieldMesh.h.

129{};

◆ m_mesh

std::array<std::vector<double>, 3> BFieldMesh< short >::m_mesh
protectedinherited

Definition at line 130 of file BFieldMesh.h.

130{};

◆ m_min

std::array<double, 3> BFieldMesh< short >::m_min
protectedinherited

Definition at line 128 of file BFieldMesh.h.

128{};

◆ m_nomScale

double BFieldMesh< short >::m_nomScale
privateinherited

Definition at line 135 of file BFieldMesh.h.

135{1.0}; // nominal m_scale from the map

◆ m_roff

int BFieldMesh< short >::m_roff
privateinherited

Definition at line 140 of file BFieldMesh.h.

140{0};

◆ m_scale

double BFieldMesh< short >::m_scale
privateinherited

Definition at line 134 of file BFieldMesh.h.

134{1.0};

◆ m_zoff

int BFieldMesh< short >::m_zoff
privateinherited

Definition at line 141 of file BFieldMesh.h.

141{0};

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