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