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

Parameters - Element class with booleans. More...

#include <parameters.h>

Inheritance diagram for GMAD::Parameters:
Inheritance graph
Collaboration diagram for GMAD::Parameters:
Collaboration graph

Public Member Functions

void flush ()
 Reset the parameters to defaults and setMap. More...
 
void inherit_properties (const Element &e)
 
template<typename T >
void set_value (std::string property, T value)
 Set method by property name and value. More...
 
 Parameters ()
 Constructor. More...
 
- Public Member Functions inherited from GMAD::Element
void print (int ident=0) const
 print method More...
 
void flush ()
 flush method More...
 
bool isSpecial () const
 check if element is of a special type More...
 
double property_lookup (std::string property_name) const
 
void setSamplerInfo (std::string samplerType, std::string samplerName, double samplerRadius, int samplerParticleSetIDIn=-1)
 set sampler info More...
 
template<typename T >
void set_value (std::string property, T value)
 
 Element ()
 constructor More...
 
void set (const Parameters &params)
 set method from Parameters structure More...
 
void set (const Parameters &params, std::string nameIn, ElementType typeIn)
 set method from Parameters structure More...
 
- Public Member Functions inherited from GMAD::Published< Element >
bool NameExists (const std::string &name) const
 
Published< Element >::template AttributeMap< T > & attribute_map () const
 

Data Fields

std::map< std::string, bool > setMap
 Map that holds booleans for every member of element. More...
 
- Data Fields inherited from GMAD::Element
ElementType type
 element enum More...
 
std::string name
 
std::string userTypeName
 User component element type name. More...
 
std::string userParameters
 String for passing user parameters through. More...
 
double l
 length in metres More...
 
double scaling
 Overall scaling of field strength. More...
 
double scalingFieldOuter
 Extra arbitrary scaling for outer field - compounded with 'scaling'. More...
 
double ks
 solenoid More...
 
double k1
 quadrupole More...
 
double k2
 sextupole More...
 
double k3
 octupole More...
 
double k4
 decapole More...
 
double angle
 bending angle More...
 
double B
 magnetic field More...
 
double e1
 input pole face rotation for bends More...
 
double e2
 output pole face rotation for bends More...
 
double fint
 fringe field integral at the dipole entrance More...
 
double fintx
 fringe field integral at the dipole exit More...
 
double fintK2
 second fringe field integral at the dipole entrance - for TRANSPORT matching More...
 
double fintxK2
 second fringe field integral at the dipole exit - for TRANSPORT matching More...
 
double hgap
 half distance of pole separation for purposes of fringe fields - 'half gap' More...
 
double h1
 input pole face curvature for bends More...
 
double h2
 output pole face curvature for bends More...
 
double kick
 fractional delta p for either h or v kicker More...
 
double hkick
 fractional delta px for hkicker More...
 
double vkick
 fractional delta py for vkicker More...
 
std::list< double > knl
 multipole expansion coefficients More...
 
std::list< double > ksl
 skew multipole expansion More...
 
double gradient
 for rf cavities in V / m More...
 
double E
 electric field amplitude for rf cavities in V More...
 
double frequency
 frequency for rf cavity in Hz More...
 
double phase
 phase of rf cavity (rad) More...
 
double tOffset
 time offset used for phase calculation (ns) More...
 
std::string magnetGeometryType
 
double horizontalWidth
 
bool yokeOnInside
 
int hStyle
 -1 = unset; 0 = false (ie c style); 1 = true, use hstyle More...
 
double vhRatio
 ratio of vertial to horizontal for some magnets More...
 
double coilWidthFraction
 Fraction of available h space the coil will take up. More...
 
double coilHeightFraction
 Fraction of availalbe v space the coil will take up. More...
 
double tilt
 tilt More...
 
double xsize
 
double ysize
 collimator aperture or laser spotsize for laser More...
 
double xsizeOut
 
double ysizeOut
 collimator aperture or laser spotsize for laser More...
 
double xsizeLeft
 
double xsizeRight
 individual collimator jaw half widths More...
 
double offsetX
 offset X More...
 
double offsetY
 offset Y More...
 
double tscint
 thickness of scintillating part of screen More...
 
double twindow
 thickness of window More...
 
double tmount
 thickness of the screen mount More...
 
double windowScreenGap
 air gap between window and screen More...
 
double screenXSize
 
double screenYSize
 
double waveLength
 for laser wire and 3d transforms More...
 
double phi
 
double theta
 
double psi
 for 3d transforms More...
 
double axisX
 
double axisY
 
double axisZ
 
bool axisAngle
 
std::list< std::string > biasMaterialList
 
std::list< std::string > biasVacuumList
 physics biasing list for the vacuum More...
 
double minimumKineticEnergy
 minimum kinetic energy for user limits - respected on element by element basis More...
 
std::string samplerName
 name of sampler (default empty) More...
 
std::string samplerType
 element has a sampler of this type (default "none") More...
 
double samplerRadius
 
int samplerParticleSetID
 
std::string region
 region with range cuts More...
 
std::string fieldOuter
 Outer field. More...
 
std::string fieldVacuum
 Vacuum field. More...
 
std::string fieldAll
 Field for everything. More...
 
std::string geometryFile
 For Element. File for external geometry. More...
 
bool stripOuterVolume
 For Element. Make it an assembly. More...
 
bool autoColour
 Automagically colour the external geometry. More...
 
std::string material
 
std::string namedVacuumVolumes
 For imported geometry - identify vacuum volumes. More...
 
bool markAsCollimator
 
std::string spec
 arbitrary specification to pass to beamline builder More...
 
std::string cavityModel
 model for rf cavities More...
 
std::string dicomDataPath
 for CT, file for DICOM construction data More...
 
std::string dicomDataFile
 for CT, file for DICOM construction data More...
 
std::string colour
 Override colour for certain items. More...
 
std::string crystalLeft
 
std::string crystalRight
 
std::string crystalBoth
 
double crystalAngleYAxisLeft
 
double crystalAngleYAxisRight
 
bool angleSet
 
bool scalingFieldOuterSet
 
std::list< Element > * lst
 in case the element is a list itself (line) More...
 
double kick1
 rmatrix elements, only 4x4 More...
 
double kick2
 rmatrix elements, only 4x4 More...
 
double kick3
 rmatrix elements, only 4x4 More...
 
double kick4
 rmatrix elements, only 4x4 More...
 
double rmat11
 rmatrix elements, only 4x4 More...
 
double rmat12
 rmatrix elements, only 4x4 More...
 
double rmat13
 rmatrix elements, only 4x4 More...
 
double rmat14
 rmatrix elements, only 4x4 More...
 
double rmat21
 rmatrix elements, only 4x4 More...
 
double rmat22
 rmatrix elements, only 4x4 More...
 
double rmat23
 rmatrix elements, only 4x4 More...
 
double rmat24
 rmatrix elements, only 4x4 More...
 
double rmat31
 rmatrix elements, only 4x4 More...
 
double rmat32
 rmatrix elements, only 4x4 More...
 
double rmat33
 rmatrix elements, only 4x4 More...
 
double rmat34
 rmatrix elements, only 4x4 More...
 
double rmat41
 rmatrix elements, only 4x4 More...
 
double rmat42
 rmatrix elements, only 4x4 More...
 
double rmat43
 rmatrix elements, only 4x4 More...
 
double rmat44
 rmatrix elements, only 4x4 More...
 
double beampipeThickness
 beampipe information, new aperture model More...
 
double aper1
 beampipe information, new aperture model More...
 
double aper2
 beampipe information, new aperture model More...
 
double aper3
 beampipe information, new aperture model More...
 
double aper4
 beampipe information, new aperture model More...
 
std::string apertureType
 beampipe information, new aperture model More...
 
std::string beampipeMaterial
 beampipe information, new aperture model More...
 
std::string vacuumMaterial
 beampipe information, new aperture model More...
 
std::list< double > layerThicknesses
 for screen More...
 
std::list< std::string > layerMaterials
 for screen More...
 
std::list< int > layerIsSampler
 for screen More...
 
double screenPSize
 for AWAKE spectrometer More...
 
double screenEndZ
 for AWAKE spectrometer More...
 
double poleStartZ
 for AWAKE spectrometer More...
 
double screenWidth
 for AWAKE spectrometer More...
 
double awakeMagnetOffsetX
 for AWAKE spectrometer More...
 
std::string windowmaterial
 for AWAKE spectrometer More...
 
std::string scintmaterial
 for AWAKE spectrometer More...
 
std::string mountmaterial
 for AWAKE spectrometer More...
 
double xdir
 for 3d transform and laser More...
 
double ydir
 for 3d transform and laser More...
 
double zdir
 for 3d transform and laser More...
 
int numberWedges
 for degrader More...
 
double wedgeLength
 for degrader More...
 
double degraderHeight
 for degrader More...
 
double materialThickness
 for degrader More...
 
double degraderOffset
 for degrader More...
 
double wireDiameter
 for wirescanner More...
 
double wireLength
 for wirescanner More...
 
double wireOffsetX
 for wirescanner More...
 
double wireOffsetY
 for wirescanner More...
 
double wireOffsetZ
 for wirescanner More...
 
double wireAngle
 for wirescanner More...
 
double undulatorPeriod
 for undulator More...
 
double undulatorGap
 for undulator More...
 
double undulatorMagnetHeight
 for undulator More...
 
std::string bias
 temporary string for bias setting More...
 
std::string biasMaterial
 temporary string for bias setting More...
 
std::string biasVacuum
 temporary string for bias setting More...
 

Additional Inherited Members

- Protected Types inherited from GMAD::Published< Element >
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::Element
std::string getPublishedName (const std::string &name) const
 returns 'official' member name for property More...
 
- Protected Member Functions inherited from GMAD::Published< Element >
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 (Element *instance, const Element *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 Element *instance, const std::string &name) const
 Get method for class C. More...
 
void set (Element *instance, const std::string &name, double value)
 
void set (Element *instance, const std::string &name, GMAD::Array *const &value)
 
void set (Element *instance, const std::string &name, const T &value)
 

Detailed Description

Parameters - Element class with booleans.

This is a temporary storage class of the parameters before the actual Element is created. The booleans are needed for inheritance and extension of already created Elements. The class is a singleton.

Author
Jochem Snuverink (based on I. Agapov)

Definition at line 44 of file parameters.h.

Constructor & Destructor Documentation

◆ Parameters()

Parameters::Parameters ( )

Constructor.

Definition at line 31 of file parameters.cc.

References setMap.

Member Function Documentation

◆ flush()

void Parameters::flush ( )

Reset the parameters to defaults and setMap.

Definition at line 199 of file parameters.cc.

References GMAD::Element::flush(), and setMap.

Referenced by GMAD::Parser::ClearParams(), and GMAD::Parser::Initialise().

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

◆ inherit_properties()

void Parameters::inherit_properties ( const Element e)

Copy parameters into temporary buffer params from element e Parameters already set in params have priority and are not overridden

Definition at line 207 of file parameters.cc.

References GMAD::Published< C >::set(), and setMap.

Referenced by GMAD::Parser::copy_element_to_params().

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

◆ set_value()

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

Set method by property name and value.

Definition at line 65 of file parameters.h.

References GMAD::Element::getPublishedName(), GMAD::Published< C >::set(), and setMap.

Here is the call graph for this function:

Field Documentation

◆ setMap

std::map<std::string,bool> GMAD::Parameters::setMap

Map that holds booleans for every member of element.

Definition at line 47 of file parameters.h.

Referenced by flush(), inherit_properties(), Parameters(), GMAD::Element::set(), and set_value().


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