EGS Brachy
An egs++ user code for rapid brachytherapy calculations
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
/Users/marc/Developer/EGSnrc/HEN_HOUSE/user_codes/egs_brachy/egs_brachy/recycle.cpp
Go to the documentation of this file.
1/*
2################################################################################
3#
4# egs_brachy recycle.cpp
5# Copyright (C) 2016 Rowan Thomson, Dave Rogers, Randle Taylor, and Marc
6# Chamberland
7#
8# This file is part of egs_brachy
9#
10# egs_brachy is free software: you can redistribute it and/or modify it
11# under the terms of the GNU Affero General Public License as published
12# by the Free Software Foundation, either version 3 of the License, or
13# (at your option) any later version.
14#
15# egs_brachy is distributed in the hope that it will be useful, but
16# WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18# Affero General Public License for more details:
19# <http://www.gnu.org/licenses/>.
20#
21################################################################################
22#
23# When egs_brachy is used for publications, please cite our paper:
24# M. J. P. Chamberland, R. E. P. Taylor, D. W. O. Rogers, and R. M. Thomson,
25# egs brachy: a versatile and fast Monte Carlo code for brachytherapy,
26# Phys. Med. Biol. 61, 8214-8231 (2016).
27#
28################################################################################
29#
30# Author: Randle Taylor, 2016
31#
32# Contributors: Marc Chamberland
33# Dave Rogers
34# Rowan Thomson
35#
36################################################################################
37*/
38
43#include "recycle.h"
44
45RecycleOpts::RecycleOpts(EGS_Input *inp) {
46
47 if (!inp) {
48 return;
49 }
50
51 int err = inp->getInput("times to reuse recycled particles", nrecycle);
52 if (err || nrecycle < 1) {
53 nrecycle = 1;
54 }
55
56 if (nrecycle == 1) {
57 vector<string> yn;
58 yn.push_back("no");
59 yn.push_back("yes");
60 rotate = (bool)inp->getInput("rotate recycled particles", yn, 0);
61 } else {
62 rotate = true;
63 }
64
65
66}
67
69
70 egsInformation(" Number of times to recycle particles = %d\n", nrecycle);
71 egsInformation(" Rotate recycled particles = %s\n", rotate ? "yes" : "no");
72
73}
74
int nrecycle
Definition recycle.h:71
bool rotate
Definition recycle.h:72
void printInfo()
Definition recycle.cpp:68
RecycleOpts(EGS_Input *inp)
Definition recycle.cpp:45
class definitions for recycling