BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Sampler placement class for parser. More...
#include <samplerplacement.h>
Public Member Functions | |
SamplerPlacement () | |
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< SamplerPlacement >::template AttributeMap< T > & | attribute_map () const |
Data Fields | |
std::string | name |
Name of this samplerplacement. | |
std::string | samplerType |
Plane, Cylinder, Sphere. | |
std::string | referenceElement |
Name of reference element w.r.t. to place to. | |
int | referenceElementNumber |
Index of repetition of element if there are multiple uses. | |
double | s |
Curvilinear s position to place w.r.t.. | |
double | x |
Offset in x. | |
double | y |
Offset in y. | |
double | z |
bool | axisAngle |
Flag to use the axis angle construction of rotation. | |
std::string | apertureModel |
std::string | shape |
double | aper1 |
double | aper2 |
double | aper3 |
double | aper4 |
double | startAnglePhi |
double | sweepAnglePhi |
double | startAngleTheta |
double | sweepAngleTheta |
std::list< double > | partID |
List of PDG IDs of which particles to record for - default is empty, so all particles. | |
int | partIDSetID |
The unique ID of the particle set given by the parser. | |
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 (SamplerPlacement *instance, const SamplerPlacement *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 SamplerPlacement *instance, const std::string &name) const |
Get method for class C. | |
void | set (SamplerPlacement *instance, const std::string &name, double value) |
void | set (SamplerPlacement *instance, const std::string &name, GMAD::Array *const &value) |
void | set (SamplerPlacement *instance, const std::string &name, const T &value) |
Sampler placement class for parser.
Definition at line 36 of file samplerplacement.h.
SamplerPlacement::SamplerPlacement | ( | ) |
constructor
Definition at line 23 of file samplerplacement.cc.
References clear(), and PublishMembers().
void SamplerPlacement::clear | ( | ) |
reset
Definition at line 29 of file samplerplacement.cc.
References angle, axisAngle, axisX, axisY, axisZ, name, partID, partIDSetID, phi, psi, referenceElement, referenceElementNumber, s, samplerType, theta, x, y, and z.
Referenced by SamplerPlacement().
void SamplerPlacement::print | ( | ) | const |
print some properties
Definition at line 94 of file samplerplacement.cc.
References angle, axisAngle, axisX, axisY, axisZ, name, partID, partIDSetID, phi, psi, referenceElement, referenceElementNumber, s, samplerType, theta, x, y, and z.
|
private |
publish members
Definition at line 61 of file samplerplacement.cc.
References angle, axisAngle, axisX, axisY, axisZ, name, partID, phi, psi, GMAD::Published< SamplerPlacement >::publish(), referenceElement, referenceElementNumber, s, samplerType, theta, x, y, and z.
Referenced by SamplerPlacement().
void GMAD::SamplerPlacement::set_value | ( | std::string | property, |
T | value | ||
) |
set methods by property name and value
Definition at line 93 of file samplerplacement.h.
References GMAD::Published< SamplerPlacement >::set().
double GMAD::SamplerPlacement::angle |
Axis angle rotation.
Definition at line 56 of file samplerplacement.h.
Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().
double GMAD::SamplerPlacement::aper1 |
Definition at line 62 of file samplerplacement.h.
double GMAD::SamplerPlacement::aper2 |
Definition at line 63 of file samplerplacement.h.
double GMAD::SamplerPlacement::aper3 |
Definition at line 64 of file samplerplacement.h.
double GMAD::SamplerPlacement::aper4 |
Definition at line 65 of file samplerplacement.h.
std::string GMAD::SamplerPlacement::apertureModel |
Definition at line 60 of file samplerplacement.h.
bool GMAD::SamplerPlacement::axisAngle |
Flag to use the axis angle construction of rotation.
Definition at line 58 of file samplerplacement.h.
Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().
double GMAD::SamplerPlacement::axisX |
Axis angle rotation.
Definition at line 53 of file samplerplacement.h.
Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().
double GMAD::SamplerPlacement::axisY |
Axis angle rotation.
Definition at line 54 of file samplerplacement.h.
Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().
double GMAD::SamplerPlacement::axisZ |
Axis angle rotation.
Definition at line 55 of file samplerplacement.h.
Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().
std::string GMAD::SamplerPlacement::name |
Name of this samplerplacement.
Definition at line 39 of file samplerplacement.h.
Referenced by BDSParallelWorldSampler::BuildSampler(), BDSDetectorConstruction::CalculateExtentOfSamplerPlacement(), clear(), GMAD::Placement::Placement(), print(), and PublishMembers().
std::list<double> GMAD::SamplerPlacement::partID |
List of PDG IDs of which particles to record for - default is empty, so all particles.
Definition at line 74 of file samplerplacement.h.
Referenced by clear(), print(), and PublishMembers().
int GMAD::SamplerPlacement::partIDSetID |
The unique ID of the particle set given by the parser.
Definition at line 75 of file samplerplacement.h.
Referenced by BDSParallelWorldSampler::BuildSampler(), clear(), and print().
double GMAD::SamplerPlacement::phi |
Euler angle for rotation.
Definition at line 48 of file samplerplacement.h.
Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().
double GMAD::SamplerPlacement::psi |
Euler angle for rotation.
Definition at line 50 of file samplerplacement.h.
Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().
std::string GMAD::SamplerPlacement::referenceElement |
Name of reference element w.r.t. to place to.
Definition at line 41 of file samplerplacement.h.
Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().
int GMAD::SamplerPlacement::referenceElementNumber |
Index of repetition of element if there are multiple uses.
Definition at line 42 of file samplerplacement.h.
Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().
double GMAD::SamplerPlacement::s |
Curvilinear s position to place w.r.t..
Definition at line 43 of file samplerplacement.h.
Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().
std::string GMAD::SamplerPlacement::samplerType |
Plane, Cylinder, Sphere.
Definition at line 40 of file samplerplacement.h.
Referenced by BDSDetectorConstruction::CalculateExtentOfSamplerPlacement(), clear(), print(), and PublishMembers().
std::string GMAD::SamplerPlacement::shape |
Definition at line 61 of file samplerplacement.h.
double GMAD::SamplerPlacement::startAnglePhi |
Definition at line 67 of file samplerplacement.h.
double GMAD::SamplerPlacement::startAngleTheta |
Definition at line 69 of file samplerplacement.h.
double GMAD::SamplerPlacement::sweepAnglePhi |
Definition at line 68 of file samplerplacement.h.
double GMAD::SamplerPlacement::sweepAngleTheta |
Definition at line 70 of file samplerplacement.h.
double GMAD::SamplerPlacement::theta |
Euler angle for rotation.
Definition at line 49 of file samplerplacement.h.
Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().
double GMAD::SamplerPlacement::x |
Offset in x.
Definition at line 44 of file samplerplacement.h.
Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().
double GMAD::SamplerPlacement::y |
Offset in y.
Definition at line 45 of file samplerplacement.h.
Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().
double GMAD::SamplerPlacement::z |
Offset in z.
Definition at line 46 of file samplerplacement.h.
Referenced by clear(), GMAD::Placement::Placement(), print(), and PublishMembers().