18#include "samplerplacement.h"
78 publish(
"apertureModel", &SamplerPlacement::apertureModel);
79 publish(
"shape", &SamplerPlacement::shape);
80 publish(
"apertureType", &SamplerPlacement::shape);
81 publish(
"aper1", &SamplerPlacement::aper1);
82 publish(
"aper2", &SamplerPlacement::aper2);
83 publish(
"aper3", &SamplerPlacement::aper3);
84 publish(
"aper4", &SamplerPlacement::aper4);
85 publish(
"startAnglePhi", &SamplerPlacement::startAnglePhi);
86 publish(
"sweepAnglePhi", &SamplerPlacement::sweepAnglePhi);
87 publish(
"startAngleTheta", &SamplerPlacement::startAngleTheta);
88 publish(
"sweepAngleTheta", &SamplerPlacement::sweepAngleTheta);
95 std::cout <<
"SamplerPlacement: "
96 <<
"name " <<
name << std::endl
100 <<
"s" <<
s << std::endl
101 <<
"x " <<
x << std::endl
102 <<
"y " <<
y << std::endl
103 <<
"z " <<
z << std::endl
104 <<
"phi " <<
phi << std::endl
105 <<
"theta " <<
theta << std::endl
106 <<
"psi " <<
psi << std::endl
107 <<
"axisX " <<
axisX << std::endl
108 <<
"axisY " <<
axisY << std::endl
109 <<
"axisZ " <<
axisZ << std::endl
110 <<
"angle " <<
angle << std::endl
111 <<
"axisAngle " <<
axisAngle << std::endl
112 <<
"apertureMode " << apertureModel << std::endl
113 <<
"shape " << shape << std::endl
114 <<
"aper1 " << aper1 << std::endl
115 <<
"aper2 " << aper2 << std::endl
116 <<
"aper3 " << aper3 << std::endl
117 <<
"aper4 " << aper4 << std::endl
118 <<
"startAnglePhi " << startAnglePhi << std::endl
119 <<
"sweepAnglePhi " << sweepAnglePhi << std::endl
120 <<
"startAngleTheta " << startAngleTheta << std::endl
121 <<
"sweepAngleTheta " << sweepAngleTheta << std::endl
124 {std::cout << v <<
", ";}
125 std::cout <<
"}" << std::endl
132 std::cout <<
"parser> Setting value " << std::setw(25) << std::left <<
property << std::endl;
134 if(property==
"partID")
140 std::cerr <<
"Error: parser> unknown material option \"" <<
property <<
"\", or doesn't expect vector type" << std::endl;
144 {std::rethrow_exception(std::current_exception());}
148#if __cplusplus >= 201703L
150 std::list<std::variant<bool, int, double, std::string>> retval;
152 if(property==
"partID")
154 retval.resize(
partID.size());
160 std::cerr <<
"Error: parser> unknown material option \"" <<
property <<
"\", or doesn't expect vector type" << std::endl;
Representation of arrays used in tokens.
void set_vector(Container< std::string, std::allocator< std::string > > &dst) const
Copy symbols into STL string containers.
void publish(const std::string &name, T C::*mp)
Make pointer to member from class C and type T with accessible with a name.
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.