53 static bool EGS_RADIATIVE_SPLITTING_LOCAL inputSet =
false;
55 EGS_RadiativeSplitting::EGS_RadiativeSplitting(
const string &Name,
58 otype =
"EGS_RadiativeSplitting";
61 EGS_RadiativeSplitting::~EGS_RadiativeSplitting() {
74 app->setRussianRoulette(nsplit);
78 else if (nsplit > 0) {
79 app->setRadiativeSplitting(nsplit);
83 description =
"\n===========================================\n";
87 description +=
"===========================================\n";
89 description +=
"\n - Splitting radiative events in ";
90 sprintf(buf,
"%d",nsplit);
92 description +=
"\n - Play RR with higher order e-/e+ with probability 1/";
93 sprintf(buf,
"%d\n\n",nsplit);
96 else if (nsplit > 1) {
97 description +=
"\n - Splitting radiative events in ";
98 sprintf(buf,
"%d\n\n",nsplit);
101 else if (nsplit == 1) {
105 description +=
"\n - BEWARE: Turning OFF radiative events !!!";
107 description +=
"\n===========================================\n\n";
116 static void setInputs() {
119 setBaseAusgabObjectInputs();
121 ausBlockInput->getSingleInput(
"library")->setValues({
"egs_radiative_splitting"});
124 ausBlockInput->addSingleInput(
"splitting",
false,
"The number of times to split every radiative event");
127 EGS_RADIATIVE_SPLITTING_EXPORT
string getExample() {
131 # Example of egs_radiative_splitting
132 :start ausgab object:
133 library = egs_radiative_splitting
141 EGS_RADIATIVE_SPLITTING_EXPORT shared_ptr<EGS_BlockInput> getInputs() {
145 return ausBlockInput;
150 const static char *func =
"createAusgabObject(radiative_splitting)";
156 EGS_Float nsplit = 1.0;
158 int err = input->
getInput(
"splitting",nsplit);
Base class for advanced EGSnrc C++ applications.
virtual void setApplication(EGS_Application *App)
Set the application this object belongs to.
string description
A short ausgab object description.
EGS_Application * app
The application this object belongs to.
void setName(EGS_Input *inp)
Set the name of the object from the information provided by inp.
string name
The object name.
A radiative splitting object: header.
void setSplitting(const int &n_s)
Global egspp functions header file.
EGS_RADIATIVE_SPLITTING_EXPORT EGS_AusgabObject * createAusgabObject(EGS_Input *input, EGS_ObjectFactory *f)
A radiative splitting ausgab object: header.
EGS_InfoFunction EGS_EXPORT egsWarning
Always use this function for reporting warnings.