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

Placement class for parser. More...

#include <placement.h>

Inheritance diagram for GMAD::Placement:
Inheritance graph
Collaboration diagram for GMAD::Placement:
Collaboration graph

Public Member Functions

 Placement ()
 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...
 
 Placement (const SamplerPlacement &samplerPlacement)
 Conversion constructor. More...
 
 Placement (const ScorerMesh &scorerMesh)
 Conversion constructor. More...
 
 Placement (const BLMPlacement &blmPlacement)
 Conversion constructor. More...
 
 Placement (const Query &qu)
 Conversion constructor. More...
 
- Public Member Functions inherited from GMAD::Published< Placement >
bool NameExists (const std::string &name) const
 
Published< Placement >::template AttributeMap< T > & attribute_map () const
 

Data Fields

std::string name
 Name of this placement. More...
 
std::string geometryFile
 Geometry to load in format:path. More...
 
std::string bdsimElement
 Name of bdsim-built component to place instead of piece of geometry. More...
 
std::string sequence
 Name of sequence to place. More...
 
std::string referenceElement
 Name of reference element w.r.t. to place to. More...
 
int referenceElementNumber
 Index of repetition of element if there are multiple uses. More...
 
double s
 Curvilinear s position to place w.r.t.. More...
 
double x
 Offset in x. More...
 
double y
 Offset in y. More...
 
double z
 
bool sensitive
 Whether to record hits or not. More...
 
bool axisAngle
 Flag to use the axis angle construction of rotation. More...
 
std::string side
 which side to attach to: top, bottom, left, right. More...
 
double sideOffset
 Gap between side and component. More...
 
bool autoColour
 Whether to auto colour the geometry. More...
 
bool stripOuterVolume
 Whether to place the world LV as a G4AssemblyVolume. More...
 
bool dontReloadGeometry
 Purposively don't reload for unique placements (must know what we're doing) More...
 
std::string fieldAll
 Name of field object to apply to all of placement. More...
 
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< Placement >
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< Placement >
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 (Placement *instance, const Placement *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 Placement *instance, const std::string &name) const
 Get method for class C. More...
 
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)
 

Detailed Description

Placement class for parser.

Author
Laurie Nevay

Definition at line 40 of file placement.h.

Constructor & Destructor Documentation

◆ Placement() [1/5]

Placement::Placement ( )

constructor

Definition at line 27 of file placement.cc.

References clear(), and PublishMembers().

Here is the call graph for this function:

◆ Placement() [2/5]

Placement::Placement ( const SamplerPlacement samplerPlacement)

◆ Placement() [3/5]

Placement::Placement ( const ScorerMesh scorerMesh)

◆ Placement() [4/5]

Placement::Placement ( const BLMPlacement blmPlacement)

◆ Placement() [5/5]

Placement::Placement ( const Query qu)

Member Function Documentation

◆ clear()

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

Here is the caller graph for this function:

◆ print()

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

Here is the caller graph for this function:

◆ PublishMembers()

void Placement::PublishMembers ( )
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().

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

◆ set_value()

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

set methods by property name and value

Definition at line 97 of file placement.h.

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

Here is the call graph for this function:

Field Documentation

◆ angle

double GMAD::Placement::angle

Axis angle rotation.

Definition at line 62 of file placement.h.

Referenced by clear(), BDSDetectorConstruction::CreatePlacementTransform(), Placement(), print(), and PublishMembers().

◆ autoColour

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

◆ axisAngle

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

◆ axisX

double GMAD::Placement::axisX

Axis angle rotation.

Definition at line 59 of file placement.h.

Referenced by clear(), BDSDetectorConstruction::CreatePlacementTransform(), Placement(), print(), and PublishMembers().

◆ axisY

double GMAD::Placement::axisY

Axis angle rotation.

Definition at line 60 of file placement.h.

Referenced by clear(), BDSDetectorConstruction::CreatePlacementTransform(), Placement(), print(), and PublishMembers().

◆ axisZ

double GMAD::Placement::axisZ

Axis angle rotation.

Definition at line 61 of file placement.h.

Referenced by clear(), BDSDetectorConstruction::CreatePlacementTransform(), Placement(), print(), and PublishMembers().

◆ bdsimElement

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

◆ dontReloadGeometry

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

◆ fieldAll

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

◆ geometryFile

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

◆ name

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

◆ phi

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

◆ psi

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

◆ referenceElement

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

◆ referenceElementNumber

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

◆ s

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

◆ sensitive

bool GMAD::Placement::sensitive

Whether to record hits or not.

Definition at line 64 of file placement.h.

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

◆ sequence

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

◆ side

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

◆ sideOffset

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

◆ stripOuterVolume

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

◆ theta

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

◆ x

double GMAD::Placement::x

Offset in x.

Definition at line 50 of file placement.h.

Referenced by clear(), BDSDetectorConstruction::CreatePlacementTransform(), Placement(), print(), and PublishMembers().

◆ y

double GMAD::Placement::y

Offset in y.

Definition at line 51 of file placement.h.

Referenced by clear(), BDSDetectorConstruction::CreatePlacementTransform(), Placement(), print(), and PublishMembers().

◆ z

double GMAD::Placement::z

Offset in z.

Definition at line 52 of file placement.h.

Referenced by clear(), BDSDetectorConstruction::CreatePlacementTransform(), Placement(), print(), and PublishMembers().


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