BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Field class for parser. More...
#include <field.h>
Public Member Functions | |
Field () | |
Constructor. | |
void | clear () |
Reset. | |
void | print () const |
Print some properties. | |
template<typename T > | |
void | set_value (std::string property, T value) |
Set methods by property name and value. | |
![]() | |
bool | NameExists (const std::string &name) const |
Published< Field >::template AttributeMap< T > & | attribute_map () const |
Data Fields | |
std::string | name |
Name. | |
std::string | type |
Type. | |
double | eScaling |
E Field Scaling factor. | |
double | bScaling |
B Field Scaling factor. | |
std::string | integrator |
Which integrator to use. | |
bool | globalTransform |
Provide global to curvilinear coordinate transform. | |
std::string | magneticFile |
File for magnetic field map. | |
std::string | magneticInterpolator |
Interpolator for the magnetic field. | |
std::string | electricFile |
File for the electric field map. | |
std::string | electricInterpolator |
Interpolator for the electric field. | |
std::string | fieldModulator |
Name of field modulator object. | |
double | x |
Offset in x. | |
double | y |
Offset in y. | |
double | z |
Offset in z. | |
double | t |
bool | axisAngle |
Flag to use the axis angle construction of rotation. | |
bool | autoScale |
Scale the field to the magnet it's attached to. | |
double | maximumStepLength |
Maximum permitted step length in the volumes the field is attached to. | |
std::string | magneticSubField |
std::string | electricSubField |
std::string | magneticReflection |
std::string | electricReflection |
std::string | fieldParameters |
double | phi |
Euler angle for rotation. | |
double | theta |
Euler angle for rotation. | |
double | psi |
Euler angle for rotation. | |
double | axisX |
double | axisY |
double | axisZ |
double | angle |
Private Member Functions | |
void | PublishMembers () |
publish members | |
Additional Inherited Members | |
![]() | |
using | AttributeMap = typename std::unordered_map< std::string, T C::* > |
Define AttributeMap of string and class member pointer. | |
![]() | |
void | publish (const std::string &name, T C::*mp) |
Make pointer to member from class C and type T with accessible with a name. | |
void | set (Field *instance, const Field *instance2, const std::string &name) |
Set member with name of class instance to value of second instance. | |
AttributeMap< T > & | attribute_map () const |
Access method to static map for type T and class C. | |
T | get (const Field *instance, const std::string &name) const |
Get method for class C. | |
void | set (Field *instance, const std::string &name, double value) |
void | set (Field *instance, const std::string &name, GMAD::Array *const &value) |
void | set (Field *instance, const std::string &name, const T &value) |
Field::Field | ( | ) |
Constructor.
Definition at line 23 of file field.cc.
References clear(), and PublishMembers().
void Field::clear | ( | ) |
Reset.
Definition at line 29 of file field.cc.
References angle, autoScale, axisAngle, axisX, axisY, axisZ, bScaling, electricFile, electricInterpolator, eScaling, fieldModulator, globalTransform, integrator, magneticFile, magneticInterpolator, maximumStepLength, name, phi, psi, t, theta, type, x, y, and z.
Referenced by Field().
void Field::print | ( | ) | const |
Print some properties.
Definition at line 97 of file field.cc.
References angle, autoScale, axisAngle, axisX, axisY, axisZ, bScaling, electricFile, electricInterpolator, eScaling, fieldModulator, integrator, magneticFile, magneticInterpolator, maximumStepLength, name, phi, psi, t, theta, type, x, y, and z.
|
private |
publish members
Definition at line 63 of file field.cc.
References angle, autoScale, axisAngle, axisX, axisY, axisZ, bScaling, electricFile, electricInterpolator, eScaling, fieldModulator, globalTransform, integrator, magneticFile, magneticInterpolator, maximumStepLength, name, phi, psi, GMAD::Published< Field >::publish(), t, theta, type, x, y, and z.
Referenced by Field().
void GMAD::Field::set_value | ( | std::string | property, |
T | value | ||
) |
Set methods by property name and value.
Definition at line 98 of file field.h.
References GMAD::Published< Field >::set().
double GMAD::Field::angle |
Axis angle rotation.
Definition at line 64 of file field.h.
Referenced by clear(), print(), and PublishMembers().
bool GMAD::Field::autoScale |
Scale the field to the magnet it's attached to.
Definition at line 68 of file field.h.
Referenced by clear(), print(), and PublishMembers().
bool GMAD::Field::axisAngle |
Flag to use the axis angle construction of rotation.
Definition at line 66 of file field.h.
Referenced by clear(), print(), and PublishMembers().
double GMAD::Field::axisX |
Axis angle rotation.
Definition at line 61 of file field.h.
Referenced by clear(), print(), and PublishMembers().
double GMAD::Field::axisY |
Axis angle rotation.
Definition at line 62 of file field.h.
Referenced by clear(), print(), and PublishMembers().
double GMAD::Field::axisZ |
Axis angle rotation.
Definition at line 63 of file field.h.
Referenced by clear(), print(), and PublishMembers().
double GMAD::Field::bScaling |
std::string GMAD::Field::electricFile |
File for the electric field map.
Definition at line 47 of file field.h.
Referenced by clear(), print(), and PublishMembers().
std::string GMAD::Field::electricInterpolator |
Interpolator for the electric field.
Definition at line 48 of file field.h.
Referenced by clear(), print(), and PublishMembers().
double GMAD::Field::eScaling |
std::string GMAD::Field::fieldModulator |
Name of field modulator object.
Definition at line 49 of file field.h.
Referenced by clear(), print(), and PublishMembers().
bool GMAD::Field::globalTransform |
Provide global to curvilinear coordinate transform.
Definition at line 44 of file field.h.
Referenced by clear(), and PublishMembers().
std::string GMAD::Field::integrator |
Which integrator to use.
Definition at line 43 of file field.h.
Referenced by clear(), print(), and PublishMembers().
std::string GMAD::Field::magneticFile |
File for magnetic field map.
Definition at line 45 of file field.h.
Referenced by clear(), print(), and PublishMembers().
std::string GMAD::Field::magneticInterpolator |
Interpolator for the magnetic field.
Definition at line 46 of file field.h.
Referenced by clear(), print(), and PublishMembers().
double GMAD::Field::maximumStepLength |
Maximum permitted step length in the volumes the field is attached to.
Definition at line 71 of file field.h.
Referenced by clear(), print(), and PublishMembers().
std::string GMAD::Field::name |
double GMAD::Field::phi |
Euler angle for rotation.
Definition at line 56 of file field.h.
Referenced by clear(), print(), and PublishMembers().
double GMAD::Field::psi |
Euler angle for rotation.
Definition at line 58 of file field.h.
Referenced by clear(), print(), and PublishMembers().
double GMAD::Field::t |
Offset in t.
Definition at line 54 of file field.h.
Referenced by clear(), print(), and PublishMembers().
double GMAD::Field::theta |
Euler angle for rotation.
Definition at line 57 of file field.h.
Referenced by clear(), print(), and PublishMembers().
std::string GMAD::Field::type |
double GMAD::Field::x |
Offset in x.
Definition at line 51 of file field.h.
Referenced by clear(), print(), and PublishMembers().
double GMAD::Field::y |
Offset in y.
Definition at line 52 of file field.h.
Referenced by clear(), print(), and PublishMembers().
double GMAD::Field::z |
Offset in z.
Definition at line 53 of file field.h.
Referenced by clear(), print(), and PublishMembers().