BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Public Member Functions | Data Fields | Private Member Functions
GMAD::Field Class Reference

Field class for parser. More...

#include <field.h>

Inheritance diagram for GMAD::Field:
Inheritance graph
Collaboration diagram for GMAD::Field:
Collaboration graph

Public Member Functions

 Field ()
 Constructor. More...
 
void clear ()
 Reset. More...
 
void print () const
 Print some properties. More...
 
template<typename T >
void set_value (std::string property, T value)
 Set methods by property name and value. More...
 
- Public Member Functions inherited from GMAD::Published< Field >
bool NameExists (const std::string &name) const
 
Published< Field >::template AttributeMap< T > & attribute_map () const
 

Data Fields

std::string name
 Name. More...
 
std::string type
 Type. More...
 
double eScaling
 E Field Scaling factor. More...
 
double bScaling
 B Field Scaling factor. More...
 
std::string integrator
 Which integrator to use. More...
 
bool globalTransform
 Provide global to curvilinear coordinate transform. More...
 
std::string magneticFile
 File for magnetic field map. More...
 
std::string magneticInterpolator
 Interpolator for the magnetic field. More...
 
std::string electricFile
 File for the electric field map. More...
 
std::string electricInterpolator
 Interpolator for the electric field. More...
 
double x
 Offset in x. More...
 
double y
 Offset in y. More...
 
double z
 Offset in z. More...
 
double t
 
bool axisAngle
 Flag to use the axis angle construction of rotation. More...
 
bool autoScale
 Scale the field to the magnet it's attached to. More...
 
double maximumStepLength
 Maximum permitted step length in the volumes the field is attached to. More...
 
std::string magneticSubField
 
std::string electricSubField
 
std::string magneticReflection
 
std::string electricReflection
 
std::string fieldParameters
 
double phi
 Euler angle for rotation. More...
 
double theta
 Euler angle for rotation. More...
 
double psi
 Euler angle for rotation. More...
 
double axisX
 
double axisY
 
double axisZ
 
double angle
 

Private Member Functions

void PublishMembers ()
 publish members More...
 

Additional Inherited Members

- Protected Types inherited from GMAD::Published< Field >
using AttributeMap = typename std::unordered_map< std::string, T C::* >
 Define AttributeMap of string and class member pointer. More...
 
- Protected Member Functions inherited from GMAD::Published< Field >
void publish (const std::string &name, T C::*mp)
 Make pointer to member from class C and type T with accessible with a name. More...
 
void set (Field *instance, const Field *instance2, const std::string &name)
 Set member with name of class instance to value of second instance. More...
 
AttributeMap< T > & attribute_map () const
 Access method to static map for type T and class C.
 
get (const Field *instance, const std::string &name) const
 Get method for class C. More...
 
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)
 

Detailed Description

Field class for parser.

Author
Laurie Nevay

Definition at line 36 of file field.h.

Constructor & Destructor Documentation

◆ Field()

Field::Field ( )

Constructor.

Definition at line 23 of file field.cc.

References clear(), and PublishMembers().

Here is the call graph for this function:

Member Function Documentation

◆ clear()

void Field::clear ( )

Reset.

Definition at line 29 of file field.cc.

References angle, autoScale, axisAngle, axisX, axisY, axisZ, bScaling, electricFile, electricInterpolator, eScaling, globalTransform, integrator, magneticFile, magneticInterpolator, maximumStepLength, name, phi, psi, t, theta, type, x, y, and z.

Referenced by Field().

Here is the caller graph for this function:

◆ print()

void Field::print ( ) const

◆ PublishMembers()

void Field::PublishMembers ( )
private

publish members

Definition at line 62 of file field.cc.

References angle, autoScale, axisAngle, axisX, axisY, axisZ, bScaling, electricFile, electricInterpolator, eScaling, globalTransform, integrator, magneticFile, magneticInterpolator, maximumStepLength, name, phi, psi, GMAD::Published< Field >::publish(), t, theta, type, x, y, and z.

Referenced by Field().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_value()

template<typename T >
void GMAD::Field::set_value ( std::string  property,
value 
)

Set methods by property name and value.

Definition at line 97 of file field.h.

References GMAD::Published< Field >::set().

Here is the call graph for this function:

Field Documentation

◆ angle

double GMAD::Field::angle

Axis angle rotation.

Definition at line 63 of file field.h.

Referenced by clear(), print(), and PublishMembers().

◆ autoScale

bool GMAD::Field::autoScale

Scale the field to the magnet it's attached to.

Definition at line 67 of file field.h.

Referenced by clear(), print(), and PublishMembers().

◆ axisAngle

bool GMAD::Field::axisAngle

Flag to use the axis angle construction of rotation.

Definition at line 65 of file field.h.

Referenced by clear(), print(), and PublishMembers().

◆ axisX

double GMAD::Field::axisX

Axis angle rotation.

Definition at line 60 of file field.h.

Referenced by clear(), print(), and PublishMembers().

◆ axisY

double GMAD::Field::axisY

Axis angle rotation.

Definition at line 61 of file field.h.

Referenced by clear(), print(), and PublishMembers().

◆ axisZ

double GMAD::Field::axisZ

Axis angle rotation.

Definition at line 62 of file field.h.

Referenced by clear(), print(), and PublishMembers().

◆ bScaling

double GMAD::Field::bScaling

B Field Scaling factor.

Definition at line 42 of file field.h.

Referenced by clear(), print(), and PublishMembers().

◆ electricFile

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().

◆ electricInterpolator

std::string GMAD::Field::electricInterpolator

Interpolator for the electric field.

Definition at line 48 of file field.h.

Referenced by clear(), print(), and PublishMembers().

◆ electricReflection

std::string GMAD::Field::electricReflection

Definition at line 76 of file field.h.

◆ electricSubField

std::string GMAD::Field::electricSubField

Definition at line 73 of file field.h.

◆ eScaling

double GMAD::Field::eScaling

E Field Scaling factor.

Definition at line 41 of file field.h.

Referenced by clear(), print(), and PublishMembers().

◆ fieldParameters

std::string GMAD::Field::fieldParameters

Definition at line 78 of file field.h.

◆ globalTransform

bool GMAD::Field::globalTransform

Provide global to curvilinear coordinate transform.

Definition at line 44 of file field.h.

Referenced by clear(), and PublishMembers().

◆ integrator

std::string GMAD::Field::integrator

Which integrator to use.

Definition at line 43 of file field.h.

Referenced by clear(), print(), and PublishMembers().

◆ magneticFile

std::string GMAD::Field::magneticFile

File for magnetic field map.

Definition at line 45 of file field.h.

Referenced by clear(), print(), and PublishMembers().

◆ magneticInterpolator

std::string GMAD::Field::magneticInterpolator

Interpolator for the magnetic field.

Definition at line 46 of file field.h.

Referenced by clear(), print(), and PublishMembers().

◆ magneticReflection

std::string GMAD::Field::magneticReflection

Definition at line 75 of file field.h.

◆ magneticSubField

std::string GMAD::Field::magneticSubField

Definition at line 72 of file field.h.

◆ maximumStepLength

double GMAD::Field::maximumStepLength

Maximum permitted step length in the volumes the field is attached to.

Definition at line 70 of file field.h.

Referenced by clear(), print(), and PublishMembers().

◆ name

std::string GMAD::Field::name

Name.

Definition at line 39 of file field.h.

Referenced by clear(), print(), and PublishMembers().

◆ phi

double GMAD::Field::phi

Euler angle for rotation.

Definition at line 55 of file field.h.

Referenced by clear(), print(), and PublishMembers().

◆ psi

double GMAD::Field::psi

Euler angle for rotation.

Definition at line 57 of file field.h.

Referenced by clear(), print(), and PublishMembers().

◆ t

double GMAD::Field::t

Offset in t.

Definition at line 53 of file field.h.

Referenced by clear(), print(), and PublishMembers().

◆ theta

double GMAD::Field::theta

Euler angle for rotation.

Definition at line 56 of file field.h.

Referenced by clear(), print(), and PublishMembers().

◆ type

std::string GMAD::Field::type

Type.

Definition at line 40 of file field.h.

Referenced by clear(), print(), and PublishMembers().

◆ x

double GMAD::Field::x

Offset in x.

Definition at line 50 of file field.h.

Referenced by clear(), print(), and PublishMembers().

◆ y

double GMAD::Field::y

Offset in y.

Definition at line 51 of file field.h.

Referenced by clear(), print(), and PublishMembers().

◆ z

double GMAD::Field::z

Offset in z.

Definition at line 52 of file field.h.

Referenced by clear(), print(), and PublishMembers().


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