BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Placement class for parser. More...
#include <placement.h>
Public Member Functions | |
Placement () | |
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 | |
Placement (const SamplerPlacement &samplerPlacement) | |
Conversion constructor. | |
Placement (const ScorerMesh &scorerMesh) | |
Conversion constructor. | |
Placement (const BLMPlacement &blmPlacement) | |
Conversion constructor. | |
Placement (const Query &qu) | |
Conversion constructor. | |
![]() | |
bool | NameExists (const std::string &name) const |
Published< Placement >::template AttributeMap< T > & | attribute_map () const |
Data Fields | |
std::string | name |
Name of this placement. | |
std::string | geometryFile |
Geometry to load in format:path. | |
std::string | bdsimElement |
Name of bdsim-built component to place instead of piece of geometry. | |
std::string | sequence |
Name of sequence to place. | |
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 | sensitive |
Whether to record hits or not. | |
bool | axisAngle |
Flag to use the axis angle construction of rotation. | |
std::string | side |
which side to attach to: top, bottom, left, right. | |
double | sideOffset |
Gap between side and component. | |
bool | autoColour |
Whether to auto colour the geometry. | |
bool | stripOuterVolume |
Whether to place the world LV as a G4AssemblyVolume. | |
bool | dontReloadGeometry |
Purposively don't reload for unique placements (must know what we're doing) | |
std::string | fieldAll |
Name of field object to apply to all of placement. | |
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 (Placement *instance, const Placement *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 Placement *instance, const std::string &name) const |
Get method for class C. | |
void | set (Placement *instance, const std::string &name, double value) |
void | set (Placement *instance, const std::string &name, GMAD::Array *const &value) |
void | set (Placement *instance, const std::string &name, const T &value) |
Placement class for parser.
Definition at line 40 of file placement.h.
Placement::Placement | ( | ) |
constructor
Definition at line 27 of file placement.cc.
References clear(), and PublishMembers().
Placement::Placement | ( | const SamplerPlacement & | samplerPlacement | ) |
Conversion constructor.
Definition at line 122 of file placement.cc.
References angle, GMAD::SamplerPlacement::angle, autoColour, axisAngle, GMAD::SamplerPlacement::axisAngle, axisX, GMAD::SamplerPlacement::axisX, axisY, GMAD::SamplerPlacement::axisY, axisZ, GMAD::SamplerPlacement::axisZ, dontReloadGeometry, name, GMAD::SamplerPlacement::name, phi, GMAD::SamplerPlacement::phi, psi, GMAD::SamplerPlacement::psi, referenceElement, GMAD::SamplerPlacement::referenceElement, referenceElementNumber, GMAD::SamplerPlacement::referenceElementNumber, s, GMAD::SamplerPlacement::s, stripOuterVolume, theta, GMAD::SamplerPlacement::theta, x, GMAD::SamplerPlacement::x, y, GMAD::SamplerPlacement::y, z, and GMAD::SamplerPlacement::z.
Placement::Placement | ( | const ScorerMesh & | scorerMesh | ) |
Conversion constructor.
Definition at line 146 of file placement.cc.
References angle, GMAD::ScorerMesh::angle, autoColour, axisAngle, GMAD::ScorerMesh::axisAngle, axisX, GMAD::ScorerMesh::axisX, axisY, GMAD::ScorerMesh::axisY, axisZ, GMAD::ScorerMesh::axisZ, dontReloadGeometry, name, GMAD::ScorerMesh::name, phi, GMAD::ScorerMesh::phi, psi, GMAD::ScorerMesh::psi, referenceElement, GMAD::ScorerMesh::referenceElement, referenceElementNumber, GMAD::ScorerMesh::referenceElementNumber, s, GMAD::ScorerMesh::s, sequence, GMAD::ScorerMesh::sequence, stripOuterVolume, theta, GMAD::ScorerMesh::theta, x, GMAD::ScorerMesh::x, y, GMAD::ScorerMesh::y, z, and GMAD::ScorerMesh::z.
Placement::Placement | ( | const BLMPlacement & | blmPlacement | ) |
Conversion constructor.
Definition at line 171 of file placement.cc.
References GMAD::BLMPlacement::angle, angle, autoColour, GMAD::BLMPlacement::axisAngle, axisAngle, GMAD::BLMPlacement::axisX, axisX, GMAD::BLMPlacement::axisY, axisY, GMAD::BLMPlacement::axisZ, axisZ, dontReloadGeometry, GMAD::BLMPlacement::name, name, GMAD::BLMPlacement::phi, phi, GMAD::BLMPlacement::psi, psi, GMAD::BLMPlacement::referenceElement, referenceElement, GMAD::BLMPlacement::referenceElementNumber, referenceElementNumber, GMAD::BLMPlacement::s, s, GMAD::BLMPlacement::side, side, GMAD::BLMPlacement::sideOffset, sideOffset, stripOuterVolume, GMAD::BLMPlacement::theta, theta, GMAD::BLMPlacement::x, x, GMAD::BLMPlacement::y, y, GMAD::BLMPlacement::z, and z.
Placement::Placement | ( | const Query & | qu | ) |
Conversion constructor.
Definition at line 196 of file placement.cc.
References angle, GMAD::Query::angle, axisAngle, GMAD::Query::axisAngle, axisX, GMAD::Query::axisX, axisY, GMAD::Query::axisY, axisZ, GMAD::Query::axisZ, dontReloadGeometry, name, GMAD::Query::name, phi, GMAD::Query::phi, psi, GMAD::Query::psi, referenceElement, GMAD::Query::referenceElement, referenceElementNumber, GMAD::Query::referenceElementNumber, s, GMAD::Query::s, theta, GMAD::Query::theta, x, GMAD::Query::x, y, GMAD::Query::y, z, and GMAD::Query::z.
void Placement::clear | ( | ) |
reset
Definition at line 33 of file placement.cc.
References angle, autoColour, axisAngle, axisX, axisY, axisZ, bdsimElement, dontReloadGeometry, fieldAll, geometryFile, name, phi, psi, referenceElement, referenceElementNumber, s, sensitive, sequence, side, sideOffset, stripOuterVolume, theta, x, y, and z.
Referenced by GMAD::Parser::Add(), and Placement().
void Placement::print | ( | ) | const |
print some properties
Definition at line 91 of file placement.cc.
References angle, autoColour, axisAngle, axisX, axisY, axisZ, bdsimElement, dontReloadGeometry, fieldAll, geometryFile, name, phi, psi, referenceElement, referenceElementNumber, s, sensitive, sequence, side, sideOffset, stripOuterVolume, theta, x, y, and z.
Referenced by GMAD::Parser::Add().
|
private |
publish members
Definition at line 62 of file placement.cc.
References angle, autoColour, axisAngle, axisX, axisY, axisZ, bdsimElement, dontReloadGeometry, fieldAll, geometryFile, name, phi, psi, GMAD::Published< Placement >::publish(), referenceElement, referenceElementNumber, s, sensitive, sequence, side, sideOffset, stripOuterVolume, theta, x, y, and z.
Referenced by Placement().
void GMAD::Placement::set_value | ( | std::string | property, |
T | value | ||
) |
set methods by property name and value
Definition at line 97 of file placement.h.
References GMAD::Published< Placement >::set().
double GMAD::Placement::angle |
Axis angle rotation.
Definition at line 62 of file placement.h.
Referenced by clear(), BDSDetectorConstruction::CreatePlacementTransform(), Placement(), print(), and PublishMembers().
bool GMAD::Placement::autoColour |
Whether to auto colour the geometry.
Definition at line 68 of file placement.h.
Referenced by clear(), Placement(), print(), and PublishMembers().
bool GMAD::Placement::axisAngle |
Flag to use the axis angle construction of rotation.
Definition at line 65 of file placement.h.
Referenced by clear(), BDSDetectorConstruction::CreatePlacementTransform(), Placement(), print(), and PublishMembers().
double GMAD::Placement::axisX |
Axis angle rotation.
Definition at line 59 of file placement.h.
Referenced by clear(), BDSDetectorConstruction::CreatePlacementTransform(), Placement(), print(), and PublishMembers().
double GMAD::Placement::axisY |
Axis angle rotation.
Definition at line 60 of file placement.h.
Referenced by clear(), BDSDetectorConstruction::CreatePlacementTransform(), Placement(), print(), and PublishMembers().
double GMAD::Placement::axisZ |
Axis angle rotation.
Definition at line 61 of file placement.h.
Referenced by clear(), BDSDetectorConstruction::CreatePlacementTransform(), Placement(), print(), and PublishMembers().
std::string GMAD::Placement::bdsimElement |
Name of bdsim-built component to place instead of piece of geometry.
Definition at line 45 of file placement.h.
Referenced by GMAD::Parser::Add(), clear(), print(), and PublishMembers().
bool GMAD::Placement::dontReloadGeometry |
Purposively don't reload for unique placements (must know what we're doing)
Definition at line 70 of file placement.h.
Referenced by clear(), Placement(), print(), and PublishMembers().
std::string GMAD::Placement::fieldAll |
Name of field object to apply to all of placement.
Definition at line 72 of file placement.h.
Referenced by clear(), print(), and PublishMembers().
std::string GMAD::Placement::geometryFile |
Geometry to load in format:path.
Definition at line 44 of file placement.h.
Referenced by clear(), print(), and PublishMembers().
std::string GMAD::Placement::name |
Name of this placement.
Definition at line 43 of file placement.h.
Referenced by GMAD::Parser::Add(), clear(), BDSDetectorConstruction::CreatePlacementTransform(), Placement(), print(), and PublishMembers().
double GMAD::Placement::phi |
Euler angle for rotation.
Definition at line 54 of file placement.h.
Referenced by clear(), BDSDetectorConstruction::CreatePlacementTransform(), Placement(), print(), and PublishMembers().
double GMAD::Placement::psi |
Euler angle for rotation.
Definition at line 56 of file placement.h.
Referenced by clear(), BDSDetectorConstruction::CreatePlacementTransform(), Placement(), print(), and PublishMembers().
std::string GMAD::Placement::referenceElement |
Name of reference element w.r.t. to place to.
Definition at line 47 of file placement.h.
Referenced by clear(), BDSDetectorConstruction::CreatePlacementTransform(), Placement(), print(), and PublishMembers().
int GMAD::Placement::referenceElementNumber |
Index of repetition of element if there are multiple uses.
Definition at line 48 of file placement.h.
Referenced by clear(), BDSDetectorConstruction::CreatePlacementTransform(), Placement(), print(), and PublishMembers().
double GMAD::Placement::s |
Curvilinear s position to place w.r.t..
Definition at line 49 of file placement.h.
Referenced by clear(), BDSDetectorConstruction::CreatePlacementTransform(), Placement(), print(), PublishMembers(), and BDSDetectorConstruction::SideToLocalOffset().
bool GMAD::Placement::sensitive |
Whether to record hits or not.
Definition at line 64 of file placement.h.
Referenced by clear(), print(), and PublishMembers().
std::string GMAD::Placement::sequence |
Name of sequence to place.
Definition at line 46 of file placement.h.
Referenced by clear(), Placement(), print(), and PublishMembers().
std::string GMAD::Placement::side |
which side to attach to: top, bottom, left, right.
Definition at line 66 of file placement.h.
Referenced by clear(), Placement(), print(), PublishMembers(), and BDSDetectorConstruction::SideToLocalOffset().
double GMAD::Placement::sideOffset |
Gap between side and component.
Definition at line 67 of file placement.h.
Referenced by clear(), Placement(), print(), PublishMembers(), and BDSDetectorConstruction::SideToLocalOffset().
bool GMAD::Placement::stripOuterVolume |
Whether to place the world LV as a G4AssemblyVolume.
Definition at line 69 of file placement.h.
Referenced by clear(), Placement(), print(), and PublishMembers().
double GMAD::Placement::theta |
Euler angle for rotation.
Definition at line 55 of file placement.h.
Referenced by clear(), BDSDetectorConstruction::CreatePlacementTransform(), Placement(), print(), and PublishMembers().
double GMAD::Placement::x |
Offset in x.
Definition at line 50 of file placement.h.
Referenced by clear(), BDSDetectorConstruction::CreatePlacementTransform(), Placement(), print(), and PublishMembers().
double GMAD::Placement::y |
Offset in y.
Definition at line 51 of file placement.h.
Referenced by clear(), BDSDetectorConstruction::CreatePlacementTransform(), Placement(), print(), and PublishMembers().
double GMAD::Placement::z |
Offset in z.
Definition at line 52 of file placement.h.
Referenced by clear(), BDSDetectorConstruction::CreatePlacementTransform(), Placement(), print(), and PublishMembers().