19#include "physicsbiasing.h"
43 std::cout <<
"physicsbiasing: " << std::endl
44 <<
"name " <<
name <<
" " << std::endl
45 <<
"particle " <<
particle <<
" " << std::endl
46 <<
"process " <<
process <<
" " << std::endl
48 for (
const auto& i :
factor) std::cout << i <<
" ";
49 std::cout << std::endl <<
"flag ";
50 for (
const auto& i :
flag) std::cout << static_cast<int>(i) <<
" ";
51 std::cout << std::endl;
57 std::cout <<
"parser> Setting value " << std::setw(25) << std::left <<
property << value << std::endl;
60 if (property==
"flag") {
flag.push_back(
static_cast<PhysicsBiasingType
>((
int)value));
return;}
61 if (property==
"xsecfact") {
factor.push_back(value);
return;}
63 std::cerr <<
"Error: parser> unknown physicsbiasing option \"" <<
property <<
"\" with value " << value << std::endl;
71 for (
const auto& i : value->GetData())
72 {
flag.push_back(
static_cast<PhysicsBiasingType
>((
int)i));}
74 else if (property==
"xsecfact")
78 std::cerr <<
"Error: parser> unknown physicsbiasing option \"" <<
property <<
"\" with value ";
79 for (
const auto& i : value->GetData())
80 {std::cout << i <<
" ";}
81 std::cout << std::endl;
89 std::cout <<
"parser> Setting value " << std::setw(25) << std::left <<
property << value << std::endl;
94 else if (property==
"particle")
96 else if ((property==
"proc") || (property==
"process"))
102 {processList.push_back(tok);}
107 std::cerr <<
"Error: parser> unknown physicsbiasing option \"" <<
property
108 <<
"\" with value " << value << 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.
std::vector< double > factor
factors corresponding to process
void set_value(const std::string &property, double value)
set methods by property name, numeric values
PhysicsBiasing()
constructor
void print() const
print some properties
std::vector< PhysicsBiasingType > flag
flag which particles are biased
std::string particle
particle name
std::string process
geant4 process: single string, but can have multiple processes separated with a space
Parser namespace for GMAD language. Combination of Geant4 and MAD.