12vector<GparticlePtr>
getGParticles(
const std::shared_ptr<GOptions>& gopts, std::shared_ptr<GLogger>& logger) {
14 auto gparticle_node = gopts->getOptionNode(
"gparticle");
16 vector<GparticlePtr> gparticles;
18 gparticles.reserve(gparticle_node.size());
21 for (
auto gparticle_item : gparticle_node) {
26 gparticles.emplace_back(std::make_shared<Gparticle>(
27 gopts->get_variable_in_option<
string>(gparticle_item,
"name",
goptions::NODFLT),
28 gopts->get_variable_in_option<
int>(gparticle_item,
"multiplicity", 1),
30 gopts->get_variable_in_option<
double>(gparticle_item,
"delta_p", 0),
31 gopts->get_variable_in_option<
string>(gparticle_item,
"punit",
"MeV"),
32 gopts->get_variable_in_option<
string>(gparticle_item,
"randomMomentumModel",
"uniform"),
34 gopts->get_variable_in_option<
double>(gparticle_item,
"theta", 0),
35 gopts->get_variable_in_option<
double>(gparticle_item,
"delta_theta", 0),
36 gopts->get_variable_in_option<
string>(gparticle_item,
"randomThetaModel",
"uniform"),
37 gopts->get_variable_in_option<
double>(gparticle_item,
"phi", 0),
38 gopts->get_variable_in_option<
double>(gparticle_item,
"delta_phi", 0),
39 gopts->get_variable_in_option<
string>(gparticle_item,
"aunit",
"deg"),
41 gopts->get_variable_in_option<
double>(gparticle_item,
"vx", 0),
42 gopts->get_variable_in_option<
double>(gparticle_item,
"vy", 0),
43 gopts->get_variable_in_option<
double>(gparticle_item,
"vz", 0),
45 gopts->get_variable_in_option<
double>(gparticle_item,
"delta_vx", 0),
46 gopts->get_variable_in_option<
double>(gparticle_item,
"delta_vy", 0),
47 gopts->get_variable_in_option<
double>(gparticle_item,
"delta_vz", 0),
48 gopts->get_variable_in_option<
string>(gparticle_item,
"vunit",
"cm"),
50 gopts->get_variable_in_option<
string>(gparticle_item,
"randomVertexModel",
"uniform"),