18#ifndef SAMPLERPLACEMENT_H
19#define SAMPLERPLACEMENT_H
25#if __cplusplus >= 201703L
62 std::string apertureModel;
71 double startAngleTheta;
72 double sweepAngleTheta;
87 void set_value(std::string property, T value,
bool bExit =
true);
89 void set_value(
const std::string& property,
Array* value,
bool bExit =
true);
91#if __cplusplus >= 201703L
92 std::list<std::variant<bool, int, double, std::string>>
get_value_array(
const std::string &);
103 std::cout <<
"samplerplacement> Setting value " << std::setw(25) << std::left
104 <<
property << value << std::endl;
109 set(
this, property, value);
111 catch (
const std::runtime_error &)
113 std::cerr <<
"Error: samplerplacement> unknown option \"" <<
property
114 <<
"\" with value \"" << value <<
"\"" << std::endl;
115 if (property ==
"partID")
117 std::cerr <<
"Note \"partID\" should be a list {int,int...}" << std::endl;
121 {std::rethrow_exception(std::current_exception());}
Representation of arrays used in tokens.
Class that provides introspection to its members.
void set(SamplerPlacement *instance, const std::string &name, double value)
Sampler placement class for parser.
std::list< std::variant< bool, int, double, std::string > > get_value_array(const std::string &)
Get method for lists.
int referenceElementNumber
Index of repetition of element if there are multiple uses.
double phi
Euler angle for rotation.
std::string name
Name of this samplerplacement.
std::string referenceElement
Name of reference element w.r.t. to place to.
void PublishMembers()
publish members
std::string samplerType
Plane, Cylinder, Sphere.
SamplerPlacement()
constructor
std::list< double > partID
List of PDG IDs of which particles to record for - default is empty, so all particles.
void print() const
print some properties
double theta
Euler angle for rotation.
double s
Curvilinear s position to place w.r.t..
double psi
Euler angle for rotation.
void set_value(std::string property, T value, bool bExit=true)
set methods by property name and value
bool axisAngle
Flag to use the axis angle construction of rotation.
int partIDSetID
The unique ID of the particle set given by the parser.
Parser namespace for GMAD language. Combination of Geant4 and MAD.