BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
beam.cc
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3University of London 2001 - 2023.
4
5This file is part of BDSIM.
6
7BDSIM is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published
9by the Free Software Foundation version 3 of the License.
10
11BDSIM is distributed in the hope that it will be useful, but
12WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
18*/
19#include "beam.h"
20
21#include <algorithm>
22#include <iostream>
23#include <sstream>
24
25using namespace GMAD;
26
27Beam::Beam():
28 BeamBase()
29{
30 PublishMembers();
31}
32
33Beam::Beam(const GMAD::BeamBase& options):
34 BeamBase(options)
35{
36 PublishMembers();
37}
38
39double Beam::get_value(std::string property_name) const
40{
41 double value;
42 try
43 {value = get<double>(this,property_name);}
44 catch (const std::runtime_error&)
45 {
46 try
47 {value = (double)get<int>(this,property_name);} // try int and convert
48 catch (const std::runtime_error&)
49 {
50 try
51 {value = (double)get<long>(this,property_name);} // try long and convert
52 catch (const std::runtime_error&)
53 {
54 std::cerr << "beam.cc> Error: unknown property \"" << property_name
55 << "\" (only works on numerical properties)" << std::endl;
56 exit(1);
57 }
58 }
59 }
60 return value;
61}
62
63std::string Beam::get_value_string(std::string property_name) const
64{
65 try {
66 double value = get<double>(this, property_name);
67 std::ostringstream strs;
68 strs << value;
69 return strs.str();
70 }
71 catch (...) {
72 try {
73 int value = get<int>(this, property_name);
74 std::ostringstream strs;
75 strs << value;
76 return strs.str();
77 }
78 catch (...) {
79 try {
80 std::string value = get<std::string>(this, property_name);
81 return value;
82 }
83 catch (...) {
84 try {
85 bool value = get<bool>(this, property_name);
86 std::ostringstream strs;
87 strs << std::boolalpha << value;
88 return strs.str();
89 }
90 catch (...)
91 {std::cerr << "Error " << property_name << std::endl; exit(1);}
92 }
93 }
94 }
95}
96
97void Beam::Amalgamate(const Beam& beamIn, bool override, int startFromEvent)
98{
99 if (override)
100 {
101 for (auto const& key : beamIn.setKeys)
102 {
103 try
104 {
105 set(this, &beamIn, key);
106 setKeys.push_back(key);
107 }
108 catch (const std::runtime_error&)
109 {
110 std::cerr << "Error: Amalgamate unknown beam parameter \"" << key << "\"" << std::endl;
111 exit(1);
112 }
113 }
114 // if we're recreating from a file, still load external file but
115 // advance to the event number
116 nlinesIgnore += startFromEvent;
117 }
118 else
119 {// don't override - ie give preference to ones set in this instance
120 for (auto const& key : beamIn.setKeys)
121 {
122 auto const& ok = setKeys; // shortcut
123 auto result = std::find(ok.begin(), ok.end(), key);
124 if (result == ok.end())
125 {//it wasn't found so ok to copy
126 try
127 {
128 set(this, &beamIn, key);
129 setKeys.push_back(key);
130 }
131 catch (const std::runtime_error&)
132 {
133 std::cerr << "Error: Amalgamate unknown beam parameter \"" << key << "\""
134 << std::endl;
135 exit(1);
136 }
137 }
138 }
139 }
140}
141
142bool Beam::HasBeenSet(const std::string& name) const
143{
144 auto result = std::find(setKeys.begin(), setKeys.end(), name);
145 if (result == setKeys.end())
146 {return false;}
147 else
148 {return true;}
149}
150
152{
153 publish("particle", &Beam::particle);
154 publish("particleName", &Beam::particle);
155 publish("beamParticle", &Beam::beamParticleName);
156 publish("beamParticleName", &Beam::beamParticleName);
157 publish("energy", &Beam::beamEnergy);
158 publish("kineticEnergy", &Beam::beamKineticEnergy);
159 publish("momentum", &Beam::beamMomentum);
160 publish("distrType", &Beam::distrType);
161 publish("xDistrType", &Beam::xDistrType);
162 publish("yDistrType", &Beam::yDistrType);
163 publish("zDistrType", &Beam::zDistrType);
164 publish("spaceDistrType", &Beam::spaceDistrType);
165 publish("directionDistrType", &Beam::directionDistrType);
166 publish("energyDistrType", &Beam::energyDistrType);
167 publish("distrFile", &Beam::distrFile);
168 publish("distrFileFormat", &Beam::distrFileFormat);
169 publish("distrFileFromExecOptions", &Beam::distrFileFromExecOptions);
170 publish("matchDistrFileLength", &Beam::distrFileMatchLength); // for backwards compatibility
171 publish("distrFileMatchLength", &Beam::distrFileMatchLength);
172 publish("distrFileLoop", &Beam::distrFileLoop);
173 publish("distrFileLoopNTimes", &Beam::distrFileLoopNTimes);
174 publish("removeUnstableWithoutDecay", &Beam::removeUnstableWithoutDecay);
175 publish("nlinesIgnore", &Beam::nlinesIgnore);
176 publish("nLinesIgnore", &Beam::nlinesIgnore); // for consistency
177 publish("nlinesSkip", &Beam::nlinesSkip);
178 publish("nLinesSkip", &Beam::nlinesSkip); // for consistency
179
180 publish("bunchFrequency", &Beam::bunchFrequency);
181 publish("bunchPeriod", &Beam::bunchPeriod);
182 publish("eventsPerBunch", &Beam::eventsPerBunch);
183
184 // aliases
185 publish("distribution", &Beam::distrType);
186 publish("xDistribution", &Beam::xDistrType);
187 publish("yDistribution", &Beam::yDistrType);
188 publish("zDistribution", &Beam::zDistrType);
189 publish("spaceDistribution", &Beam::spaceDistrType);
190 publish("directionDistribution",&Beam::directionDistrType);
191 publish("energyDistribution", &Beam::energyDistrType);
192
193 // central values
194 publish("X0", &Beam::X0);
195 publish("Y0", &Beam::Y0);
196 publish("Z0", &Beam::Z0);
197 publish("S0", &Beam::S0);
198 publish("Xp0", &Beam::Xp0);
199 publish("Yp0", &Beam::Yp0);
200 publish("Zp0", &Beam::Zp0);
201 publish("tilt", &Beam::tilt);
202 publish("T0", &Beam::T0);
203 publish("E0", &Beam::E0);
204 publish("Ek0", &Beam::Ek0);
205 publish("P0", &Beam::P0);
206
207 publish("sigmaT", &Beam::sigmaT);
208 publish("sigmaE", &Beam::sigmaE);
209 publish("sigmaEk", &Beam::sigmaEk);
210 publish("sigmaP", &Beam::sigmaP);
211
212 // for gausstwiss
213 publish("betx", &Beam::betx);
214 publish("bety", &Beam::bety);
215 publish("alfx", &Beam::alfx);
216 publish("alfy", &Beam::alfy);
217 publish("emitx", &Beam::emitx);
218 publish("emity", &Beam::emity);
219 publish("emitnx",&Beam::emitNX);
220 publish("emitny",&Beam::emitNY);
221 publish("dispx", &Beam::dispx);
222 publish("dispy", &Beam::dispy);
223 publish("dispxp",&Beam::dispxp);
224 publish("dispyp",&Beam::dispyp);
225
226 // aliases
227 publish("betaX", &Beam::betx);
228 publish("betaY", &Beam::bety);
229 publish("alphaX", &Beam::alfx);
230 publish("alphaY", &Beam::alfy);
231 publish("emitX", &Beam::emitx);
232 publish("emitY", &Beam::emity);
233 publish("dispX", &Beam::dispx);
234 publish("dispXp", &Beam::dispxp);
235 publish("dispY", &Beam::dispy);
236 publish("dispYp", &Beam::dispyp);
237
238 // options for beam distrType="gauss"
239 publish("sigmaX", &Beam::sigmaX);
240 publish("sigmaXp",&Beam::sigmaXp);
241 publish("sigmaY", &Beam::sigmaY);
242 publish("sigmaYp",&Beam::sigmaYp);
243
244 // options for beam distrType="square" or distrType="circle"
245 publish("envelopeX", &Beam::envelopeX);
246 publish("envelopeXp",&Beam::envelopeXp);
247 publish("envelopeY", &Beam::envelopeY);
248 publish("envelopeYp",&Beam::envelopeYp);
249 publish("envelopeZ", &Beam::envelopeZ);
250 publish("envelopeZp",&Beam::envelopeZp);
251 publish("envelopeT", &Beam::envelopeT);
252 publish("envelopeE", &Beam::envelopeE);
253 publish("envelopeR", &Beam::envelopeR);
254 publish("envelopeRp",&Beam::envelopeRp);
255 publish("zFromT", &Beam::zFromT);
256
257 // options for beam distrType="gaussmatrix"
258 publish("sigma11",&Beam::sigma11);
259 publish("sigma12",&Beam::sigma12);
260 publish("sigma13",&Beam::sigma13);
261 publish("sigma14",&Beam::sigma14);
262 publish("sigma15",&Beam::sigma15);
263 publish("sigma16",&Beam::sigma16);
264 publish("sigma22",&Beam::sigma22);
265 publish("sigma23",&Beam::sigma23);
266 publish("sigma24",&Beam::sigma24);
267 publish("sigma25",&Beam::sigma25);
268 publish("sigma26",&Beam::sigma26);
269 publish("sigma33",&Beam::sigma33);
270 publish("sigma34",&Beam::sigma34);
271 publish("sigma35",&Beam::sigma35);
272 publish("sigma36",&Beam::sigma36);
273 publish("sigma44",&Beam::sigma44);
274 publish("sigma45",&Beam::sigma45);
275 publish("sigma46",&Beam::sigma46);
276 publish("sigma55",&Beam::sigma55);
277 publish("sigma56",&Beam::sigma56);
278 publish("sigma66",&Beam::sigma66);
279
280 // options for beam distrType="eshell"
281 publish("shellX", &Beam::shellX);
282 publish("shellXp", &Beam::shellXp);
283 publish("shellY", &Beam::shellY);
284 publish("shellYp", &Beam::shellYp);
285 publish("shellXWidth", &Beam::shellXWidth);
286 publish("shellXpWidth",&Beam::shellXpWidth);
287 publish("shellYWidth", &Beam::shellYWidth);
288 publish("shellYpWidth",&Beam::shellYpWidth);
289
290 // options for beam distrType="ring"
291 publish("Rmin",&Beam::Rmin);
292 publish("Rmax",&Beam::Rmax);
293
294 // options for beam distrType="halo"
295 publish("haloNSigmaXInner", &Beam::haloNSigmaXInner);
296 publish("haloNSigmaXOuter", &Beam::haloNSigmaXOuter);
297 publish("haloNSigmaYInner", &Beam::haloNSigmaYInner);
298 publish("haloNSigmaYOuter", &Beam::haloNSigmaYOuter);
299 publish("haloXCutInner", &Beam::haloXCutInner);
300 publish("haloYCutInner", &Beam::haloYCutInner);
301 publish("haloXCutOuter", &Beam::haloXCutOuter);
302 publish("haloYCutOuter", &Beam::haloYCutOuter);
303 publish("haloXpCutInner", &Beam::haloXpCutInner);
304 publish("haloYpCutInner", &Beam::haloYpCutInner);
305 publish("haloXpCutOuter", &Beam::haloXpCutOuter);
306 publish("haloYpCutOuter", &Beam::haloYpCutOuter);
307 publish("haloPSWeightParameter", &Beam::haloPSWeightParameter);
308 publish("haloPSWeightFunction", &Beam::haloPSWeightFunction);
309
310 publish("offsetSampleMean", &Beam::offsetSampleMean);
311
312 publish("eventGeneratorNEventsSkip", &Beam::eventGeneratorNEventsSkip);
313 publish("eventGeneratorMinX", &Beam::eventGeneratorMinX);
314 publish("eventGeneratorMaxX", &Beam::eventGeneratorMaxX);
315 publish("eventGeneratorMinY", &Beam::eventGeneratorMinY);
316 publish("eventGeneratorMaxY", &Beam::eventGeneratorMaxY);
317 publish("eventGeneratorMinZ", &Beam::eventGeneratorMinZ);
318 publish("eventGeneratorMaxZ", &Beam::eventGeneratorMaxZ);
319 publish("eventGeneratorMinXp", &Beam::eventGeneratorMinXp);
320 publish("eventGeneratorMaxXp", &Beam::eventGeneratorMaxXp);
321 publish("eventGeneratorMinYp", &Beam::eventGeneratorMinYp);
322 publish("eventGeneratorMaxYp", &Beam::eventGeneratorMaxYp);
323 publish("eventGeneratorMinZp", &Beam::eventGeneratorMinZp);
324 publish("eventGeneratorMaxZp", &Beam::eventGeneratorMaxZp);
325 publish("eventGeneratorMinRp", &Beam::eventGeneratorMinRp);
326 publish("eventGeneratorMaxRp", &Beam::eventGeneratorMaxRp);
327 publish("eventGeneratorMinT", &Beam::eventGeneratorMinT);
328 publish("eventGeneratorMaxT", &Beam::eventGeneratorMinT);
329 publish("eventGeneratorMinEk", &Beam::eventGeneratorMinEK);
330 publish("eventGeneratorMinEK", &Beam::eventGeneratorMinEK); // alias
331 publish("eventGeneratorMaxEk", &Beam::eventGeneratorMaxEK);
332 publish("eventGeneratorMaxEK", &Beam::eventGeneratorMaxEK); // alias
333 publish("eventGeneratorParticles", &Beam::eventGeneratorParticles);
334 publish("eventGeneratorWarnSkippedParticles", &Beam::eventGeneratorWarnSkippedParticles);
335}
Options for a beam distribution.
Definition: beamBase.h:35
double dispy
initial twiss parameters
Definition: beamBase.h:90
double alfy
initial twiss parameters
Definition: beamBase.h:90
std::string particle
beam parameters
Definition: beamBase.h:40
double eventGeneratorMaxYp
Event generator file filter.
Definition: beamBase.h:153
double sigma45
for the gaussian sigma matrix distribution
Definition: beamBase.h:109
double eventGeneratorMaxXp
Event generator file filter.
Definition: beamBase.h:151
double sigmaE
for the gaussian, elliptic shell, ring distributions
Definition: beamBase.h:85
double emity
initial twiss parameters
Definition: beamBase.h:90
double haloXCutOuter
for the halo distribution
Definition: beamBase.h:130
double bunchFrequency
Bunch offsets in time.
Definition: beamBase.h:64
double sigma16
for the gaussian sigma matrix distribution
Definition: beamBase.h:106
double haloNSigmaYInner
for the halo distribution
Definition: beamBase.h:126
double beamKineticEnergy
beam parameters
Definition: beamBase.h:43
double envelopeRp
for the circle/square/box beam distribution
Definition: beamBase.h:101
double eventGeneratorMaxEK
Event generator file filter.
Definition: beamBase.h:161
double haloXpCutOuter
for the halo distribution
Definition: beamBase.h:134
double sigmaX
for the gaussian beam distribution
Definition: beamBase.h:95
std::string distrFileFormat
beam parameters
Definition: beamBase.h:53
double beamEnergy
beam parameters
Definition: beamBase.h:42
double envelopeZp
for the circle/square/box beam distribution
Definition: beamBase.h:99
bool eventGeneratorWarnSkippedParticles
Event generator file filter.
Definition: beamBase.h:163
double shellXp
for the elliptic shell distribution
Definition: beamBase.h:115
double sigma66
for the gaussian sigma matrix distribution
Definition: beamBase.h:111
double haloXCutInner
for the halo distribution
Definition: beamBase.h:128
double envelopeZ
for the circle/square/box beam distribution
Definition: beamBase.h:99
double sigma35
for the gaussian sigma matrix distribution
Definition: beamBase.h:108
double sigma44
for the gaussian sigma matrix distribution
Definition: beamBase.h:109
double haloYpCutInner
for the halo distribution
Definition: beamBase.h:133
double emitNY
initial twiss parameters
Definition: beamBase.h:91
double envelopeE
for the circle/square/box beam distribution
Definition: beamBase.h:100
double eventGeneratorMaxZp
Event generator file filter.
Definition: beamBase.h:155
double sigmaXp
for the gaussian beam distribution
Definition: beamBase.h:95
double eventGeneratorMinYp
Event generator file filter.
Definition: beamBase.h:152
double sigma13
for the gaussian sigma matrix distribution
Definition: beamBase.h:106
int eventsPerBunch
Bunch offsets in time.
Definition: beamBase.h:66
double sigma34
for the gaussian sigma matrix distribution
Definition: beamBase.h:108
double betx
initial twiss parameters
Definition: beamBase.h:90
std::string distrFile
beam parameters
Definition: beamBase.h:52
double eventGeneratorMinEK
Event generator file filter.
Definition: beamBase.h:160
std::string directionDistrType
beam parameters
Definition: beamBase.h:50
double haloYCutOuter
for the halo distribution
Definition: beamBase.h:131
double sigmaYp
for the gaussian beam distribution
Definition: beamBase.h:95
double haloNSigmaXInner
for the halo distribution
Definition: beamBase.h:124
bool distrFileFromExecOptions
Required to know how to build the absolute path properly.
Definition: beamBase.h:54
double dispxp
initial twiss parameters
Definition: beamBase.h:90
double envelopeYp
for the circle/square/box beam distribution
Definition: beamBase.h:99
double eventGeneratorMaxZ
Event generator file filter.
Definition: beamBase.h:149
double eventGeneratorMinY
Event generator file filter.
Definition: beamBase.h:146
double sigma12
for the gaussian sigma matrix distribution
Definition: beamBase.h:106
double Ek0
initial beam centroid
Definition: beamBase.h:74
std::string spaceDistrType
beam parameters
Definition: beamBase.h:49
double haloNSigmaYOuter
for the halo distribution
Definition: beamBase.h:127
std::string beamParticleName
beam parameters
Definition: beamBase.h:41
bool distrFileLoop
beam parameters
Definition: beamBase.h:56
bool removeUnstableWithoutDecay
beam parameters
Definition: beamBase.h:58
double sigma26
for the gaussian sigma matrix distribution
Definition: beamBase.h:107
double haloYCutInner
for the halo distribution
Definition: beamBase.h:129
double tilt
tilt of beam applied as rotation about unit local z
Definition: beamBase.h:79
double sigma25
for the gaussian sigma matrix distribution
Definition: beamBase.h:107
double shellXpWidth
for the elliptic shell distribution
Definition: beamBase.h:116
std::string distrType
beam parameters
Definition: beamBase.h:45
double sigma36
for the gaussian sigma matrix distribution
Definition: beamBase.h:108
int eventGeneratorNEventsSkip
Event generator file filter.
Definition: beamBase.h:143
double sigma46
for the gaussian sigma matrix distribution
Definition: beamBase.h:109
double eventGeneratorMaxRp
Event generator file filter.
Definition: beamBase.h:157
int nlinesIgnore
Ignore first lines in the input bunch file.
Definition: beamBase.h:60
double emitNX
initial twiss parameters
Definition: beamBase.h:91
double eventGeneratorMinZ
Event generator file filter.
Definition: beamBase.h:148
double envelopeR
for the circle/square/box beam distribution
Definition: beamBase.h:101
double S0
initial beam centroid
Definition: beamBase.h:70
double eventGeneratorMinXp
Event generator file filter.
Definition: beamBase.h:150
double shellYp
for the elliptic shell distribution
Definition: beamBase.h:115
double dispyp
initial twiss parameters
Definition: beamBase.h:90
double sigma14
for the gaussian sigma matrix distribution
Definition: beamBase.h:106
bool zFromT
for the circle/square/box beam distribution
Definition: beamBase.h:102
double bunchPeriod
Bunch offsets in time.
Definition: beamBase.h:65
double sigma23
for the gaussian sigma matrix distribution
Definition: beamBase.h:107
double sigma11
for the gaussian sigma matrix distribution
Definition: beamBase.h:106
double eventGeneratorMinZp
Event generator file filter.
Definition: beamBase.h:154
double envelopeX
for the circle/square/box beam distribution
Definition: beamBase.h:99
double shellX
for the elliptic shell distribution
Definition: beamBase.h:115
double P0
initial beam centroid
Definition: beamBase.h:75
std::string zDistrType
beam parameters
Definition: beamBase.h:48
double haloNSigmaXOuter
for the halo distribution
Definition: beamBase.h:125
std::vector< std::string > setKeys
A list of all the keys that have been set in this instance.
Definition: beamBase.h:167
double dispx
initial twiss parameters
Definition: beamBase.h:90
double alfx
initial twiss parameters
Definition: beamBase.h:90
double emitx
initial twiss parameters
Definition: beamBase.h:90
std::string eventGeneratorParticles
Event generator file filter.
Definition: beamBase.h:162
double sigmaT
bunch length
Definition: beamBase.h:82
double sigma22
for the gaussian sigma matrix distribution
Definition: beamBase.h:107
double bety
initial twiss parameters
Definition: beamBase.h:90
std::string yDistrType
beam parameters
Definition: beamBase.h:47
double Zp0
initial beam centroid
Definition: beamBase.h:71
double Rmax
for the ring beam distribution
Definition: beamBase.h:120
double envelopeXp
for the circle/square/box beam distribution
Definition: beamBase.h:99
int distrFileLoopNTimes
beam parameters
Definition: beamBase.h:57
double Z0
initial beam centroid
Definition: beamBase.h:70
double sigma33
for the gaussian sigma matrix distribution
Definition: beamBase.h:108
std::string energyDistrType
beam parameters
Definition: beamBase.h:51
double eventGeneratorMaxY
Event generator file filter.
Definition: beamBase.h:147
double eventGeneratorMinT
Event generator file filter.
Definition: beamBase.h:158
double sigma15
for the gaussian sigma matrix distribution
Definition: beamBase.h:106
double envelopeY
for the circle/square/box beam distribution
Definition: beamBase.h:99
double haloPSWeightParameter
for the halo distribution
Definition: beamBase.h:136
double sigma55
for the gaussian sigma matrix distribution
Definition: beamBase.h:110
double sigma56
for the gaussian sigma matrix distribution
Definition: beamBase.h:110
double X0
initial beam centroid
Definition: beamBase.h:70
double eventGeneratorMaxX
Event generator file filter.
Definition: beamBase.h:145
double envelopeT
for the circle/square/box beam distribution
Definition: beamBase.h:100
int nlinesSkip
Number of event lines to skip after the ignore lines.
Definition: beamBase.h:61
double eventGeneratorMinRp
Event generator file filter.
Definition: beamBase.h:156
bool distrFileMatchLength
beam parameters
Definition: beamBase.h:55
double beamMomentum
beam parameters
Definition: beamBase.h:44
double Xp0
initial beam centroid
Definition: beamBase.h:71
double sigma24
for the gaussian sigma matrix distribution
Definition: beamBase.h:107
double eventGeneratorMinX
Event generator file filter.
Definition: beamBase.h:144
std::string xDistrType
beam parameters
Definition: beamBase.h:46
double shellY
for the elliptic shell distribution
Definition: beamBase.h:115
double Yp0
initial beam centroid
Definition: beamBase.h:71
std::string haloPSWeightFunction
for the halo distribution
Definition: beamBase.h:137
double shellYpWidth
for the elliptic shell distribution
Definition: beamBase.h:116
double haloXpCutInner
for the halo distribution
Definition: beamBase.h:132
double Y0
initial beam centroid
Definition: beamBase.h:70
double haloYpCutOuter
for the halo distribution
Definition: beamBase.h:135
double Rmin
for the ring beam distribution
Definition: beamBase.h:120
double T0
initial beam centroid
Definition: beamBase.h:72
double sigmaY
for the gaussian beam distribution
Definition: beamBase.h:95
double shellXWidth
for the elliptic shell distribution
Definition: beamBase.h:116
double shellYWidth
for the elliptic shell distribution
Definition: beamBase.h:116
double E0
initial beam centroid
Definition: beamBase.h:73
Beam class.
Definition: beam.h:44
void PublishMembers()
publish members so these can be looked up from parser
Definition: beam.cc:151
void Amalgamate(const Beam &optionsIn, bool override, int startFromEvent=0)
Definition: beam.cc:97
bool HasBeenSet(const std::string &name) const
Whether a parameter has been set using the set_value method or not.
Definition: beam.cc:142
void publish(const std::string &name, T C::*mp)
Make pointer to member from class C and type T with accessible with a name.
Definition: published.h:92
void set(BeamBase *instance, const std::string &name, double value)
Definition: published.h:99
Parser namespace for GMAD language. Combination of Geant4 and MAD.