OPALX (Object Oriented Parallel Accelerator Library for Exascal) MINIorX
OPALX
Distribution.cpp
Go to the documentation of this file.
1//
2// Class Distribution
3// This class defines the initial beam that is injected or emitted into the simulation.
4//
5// Copyright (c) 2008 - 2022, Paul Scherrer Institut, Villigen PSI, Switzerland
6// All rights reserved
7//
8// This file is part of OPAL.
9//
10// OPAL is free software: you can redistribute it and/or modify
11// it under the terms of the GNU General Public License as published by
12// the Free Software Foundation, either version 3 of the License, or
13// (at your option) any later version.
14//
15// You should have received a copy of the GNU General Public License
16// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
17//
22#include "Algorithms/PartBins.h"
23#include "BasicActions/Option.h"
26#include "OPALTypes.h"
27#include "Physics/Physics.h"
28#include "Physics/Units.h"
32#include "Utilities/Options.h"
33#include "Utilities/Util.h"
34#include "Utility/IpplTimings.h"
35
36#include <gsl/gsl_linalg.h>
37#include <gsl/gsl_randist.h>
38#include <gsl/gsl_rng.h>
39#include <gsl/gsl_sf_erf.h>
40
41#include <boost/filesystem.hpp>
42#include <boost/numeric/odeint/stepper/runge_kutta4.hpp>
43#include <boost/regex.hpp>
44
45#include <sys/time.h>
46
47#include <cfloat>
48#include <cmath>
49#include <iomanip>
50#include <iostream>
51#include <map>
52#include <numeric>
53
54extern Inform* gmsg;
55
56using GeneratorPool = typename Kokkos::Random_XorShift64_Pool<>;
57
58using Base = ippl::ParticleBase<ippl::ParticleSpatialLayout<T, Dim>>;
59
60using view_type = typename ippl::detail::ViewType<ippl::Vector<double, Dim>, 1>::view_type;
61
67
68/*
69namespace {
70 matrix_t getUnit6x6() {
71 matrix_t unit6x6(6, 6, 0.0); // Initialize a 6x6 matrix with all elements as 0.0
72 for (unsigned int i = 0; i < 6u; ++i) {
73 unit6x6(i, i) = 1.0; // Set diagonal elements to 1.0
74 }
75 return unit6x6;
76 }
77}
78*/
79
81 : Definition(
82 DISTRIBUTION::SIZE, "DISTRIBUTION",
83 "The DISTRIBUTION statement defines data for the 6D particle distribution."),
86 Attributes::makePredefinedString("TYPE", "Distribution type.", {"GAUSS", "MULTIVARIATEGAUSS", "FLATTOP", "FROMFILE"});
87
89 Attributes::makeString("FNAME", "File for reading in 6D particle coordinates.", "");
90
91 // Parameters for defining an initial distribution.
92 itsAttr[DISTRIBUTION::SIGMAX] = Attributes::makeReal("SIGMAX", "SIGMAx (m)", 0.0);
93 itsAttr[DISTRIBUTION::SIGMAY] = Attributes::makeReal("SIGMAY", "SIGMAy (m)", 0.0);
94 itsAttr[DISTRIBUTION::SIGMAZ] = Attributes::makeReal("SIGMAZ", "SIGMAz (m)", 0.0);
95 itsAttr[DISTRIBUTION::SIGMAPX] = Attributes::makeReal("SIGMAPX", "SIGMApx", 0.0);
96 itsAttr[DISTRIBUTION::SIGMAPY] = Attributes::makeReal("SIGMAPY", "SIGMApy", 0.0);
97 itsAttr[DISTRIBUTION::SIGMAPZ] = Attributes::makeReal("SIGMAPZ", "SIGMApz", 0.0);
98
99 itsAttr[DISTRIBUTION::CORR] = Attributes::makeRealArray("CORR", "r correlation");
100
101 itsAttr[DISTRIBUTION::CUTOFFPX] = Attributes::makeReal("CUTOFFPX", "Distribution cutoff px dimension in units of sigma.", 3.0);
102 itsAttr[DISTRIBUTION::CUTOFFPY] = Attributes::makeReal("CUTOFFPY", "Distribution cutoff py dimension in units of sigma.", 3.0);
103 itsAttr[DISTRIBUTION::CUTOFFPZ] = Attributes::makeReal("CUTOFFPZ", "Distribution cutoff pz dimension in units of sigma.", 3.0);
104
105 itsAttr[DISTRIBUTION::CUTOFFX] = Attributes::makeReal("CUTOFFX", "Distribution cutoff x direction in units of sigma.", 3.0);
106 itsAttr[DISTRIBUTION::CUTOFFY] = Attributes::makeReal("CUTOFFY", "Distribution cutoff r direction in units of sigma.", 3.0);
107 itsAttr[DISTRIBUTION::CUTOFFLONG] = Attributes::makeReal("CUTOFFLONG", "Distribution cutoff z or t direction in units of sigma.", 3.0);
108
109 itsAttr[DISTRIBUTION::CORRX] = Attributes::makeReal("CORRX", "x/px correlation, (R12 in transport notation).", 0.0);
110 itsAttr[DISTRIBUTION::CORRY] = Attributes::makeReal("CORRY", "y/py correlation, (R34 in transport notation).", 0.0);
111 itsAttr[DISTRIBUTION::CORRZ] = Attributes::makeReal("CORRZ", "z/pz correlation, (R56 in transport notation).", 0.0);
112 itsAttr[DISTRIBUTION::CORRT] = Attributes::makeReal("CORRT", "t/pt correlation, (R56 in transport notation).", 0.0);
113
114 itsAttr[DISTRIBUTION::SIGMAT] = Attributes::makeReal("SIGMAT", "SIGMAt (m)", 0.0);
115 itsAttr[DISTRIBUTION::TPULSEFWHM] = Attributes::makeReal("TPULSEFWHM", "Pulse FWHM for emitted distribution.", 0.0);
116 itsAttr[DISTRIBUTION::TRISE] = Attributes::makeReal("TRISE", "Rise time for emitted distribution.", 0.0);
117 itsAttr[DISTRIBUTION::TFALL] = Attributes::makeReal("TFALL", "Fall time for emitted distribution.", 0.0);
118
120 = Attributes::makeReal("FTOSCAMPLITUDE", "Amplitude of oscillations superimposed "
121 "on flat top portion of emitted GAUSS "
122 "distribtuion (in percent of flat top "
123 "amplitude)",0.0);
124
126 = Attributes::makeReal("FTOSCPERIODS", "Number of oscillations superimposed on "
127 "flat top portion of emitted GAUSS "
128 "distribution", 0.0);
129
131 = Attributes::makeBool("EMITTED", "Emitted beam, from cathode, as opposed to "
132 "an injected beam.", false);
133
135}
136
137Distribution::Distribution(const std::string& name, Distribution* parent)
138 : Definition(name, parent) {
139}
140
143
151
153 size_t locNumber = n / ippl::Comm->size();
154
155 // make sure the total number is exact
156 size_t remainder = n % ippl::Comm->size();
157 size_t myNode = ippl::Comm->rank();
158 if (myNode < remainder)
159 ++locNumber;
160
161 return locNumber;
162}
163
166 return dynamic_cast<Distribution*>(object) != 0;
167}
168
169Distribution* Distribution::clone(const std::string& name) {
170 return new Distribution(name, this);
171}
172
175 update();
176}
177
180
181void Distribution::create(size_t& numberOfParticles, double massIneV, double charge, ippl::ParticleAttrib<ippl::Vector<double, 3>>& R, ippl::ParticleAttrib<ippl::Vector<double, 3>>& P, std::shared_ptr<ParticleContainer_t> &pc, std::shared_ptr<FieldContainer_t> &fc, Vector_t<double, 3> nr) {
182// moved to SamplingBase
183}
184
185Distribution* Distribution::find(const std::string& name) {
186 Distribution* dist = dynamic_cast<Distribution*>(OpalData::getInstance()->find(name));
187
188 if (dist == 0) {
189 throw OpalException("Distribution::find()", "Distribution \"" + name + "\" not found.");
190 }
191
192 return dist;
193}
194
195Inform& Distribution::printInfo(Inform& os) const {
196 os << "\n"
197 << "* ************* D I S T R I B U T I O N ********************************************"
198 << endl;
199 os << "* " << endl;
200 if (OpalData::getInstance()->inRestartRun()) {
201 os << "* In restart. Distribution read in from .h5 file." << endl;
202 } else {
203 switch (distrTypeT_m) {
205 printDistGauss(os);
206 break;
209 break;
212 break;
213 default:
214 throw OpalException("Distribution Param", "Unknown \"TYPE\" of \"DISTRIBUTION\"");
215 }
216 os << "* " << endl;
217 os << "* Distribution is injected." << endl;
218 }
219 os << "* " << endl;
220 os << "* **********************************************************************************"
221 << endl;
222
223 return os;
224}
225
226void Distribution::setAvrgPz(double avrgpz){
227 avrgpz_m = avrgpz;
228}
229
230void Distribution::setTEmission(double tEmission) {
231 tEmission_m = tEmission;
232}
233
235 return tEmission_m;
236}
237
239 /*
240 * Set distribution parameters. Do all the necessary checks depending
241 * on the input attributes.
242 * In case of DistributionType::MATCHEDGAUSS we only need to set the cutoff parameters
243 */
244
245 cutoffR_m = 3.;
246 cutoffP_m = 3.;
247 /*
248 cutoffP_m = ippl::Vector<double, 3>(Attributes::getReal(itsAttr[DISTRIBUTION::CUTOFFPX]),
249 Attributes::getReal(itsAttr[DISTRIBUTION::CUTOFFPY]),
250 Attributes::getReal(itsAttr[DISTRIBUTION::CUTOFFPZ]));
251
252
253 cutoffR_m = ippl::Vector<double, 3>(Attributes::getReal(itsAttr[DISTRIBUTION::CUTOFFX]),
254 Attributes::getReal(itsAttr[DISTRIBUTION::CUTOFFY]),
255 Attributes::getReal(itsAttr[DISTRIBUTION::CUTOFFLONG]));
256 */
257
258 //if (std::abs(Attributes::getReal(itsAttr[Attrib::Distribution::SIGMAR])) > 0.0) {
259 // cutoffR_m[0] = Attributes::getReal(itsAttr[Attrib::Distribution::CUTOFFR]);
260 // cutoffR_m[1] = Attributes::getReal(itsAttr[Attrib::Distribution::CUTOFFR]);
261 //}
262
263 setSigmaR_m();
264 setSigmaP_m();
265
266 avrgpz_m = 0.0;
267}
268
270
271 cutoffR_m = 3.;
272 cutoffP_m = 3.;
273
274 // initialize the covariance matrix to identity
275 for (unsigned int i = 0; i < 6; ++ i) {
276 for (unsigned int j = 0; j < 6; ++ j) {
277 if (i==j)
278 correlationMatrix_m[i][j] = 1.0;
279 else
280 correlationMatrix_m[i][j] = 0.0;
281 }
282 }
283
284 // set diagonal elements first
285 setSigmaR_m();
286 setSigmaP_m();
287
288 for (unsigned int i = 0; i < 3; ++ i){
289 correlationMatrix_m[2*i ][2*i ] = sigmaR_m[i]*sigmaR_m[i];
290 correlationMatrix_m[2*i+1][2*i+1] = sigmaP_m[i]*sigmaP_m[i];
291 }
292
293 std::vector<double> cr = Attributes::getRealArray(itsAttr[DISTRIBUTION::CORR]);
294
295 if (!cr.empty()) {
296 // read off-diagonal correlation matrix from input file
297 if (cr.size() == 15) {
298 *gmsg << "* Use r to specify correlations" << endl;
299 unsigned int k = 0;
300 for (unsigned int i = 0; i < 5; ++ i) {
301 for (unsigned int j = i + 1; j < 6; ++ j, ++ k) {
302 correlationMatrix_m[j][i] = cr.at(k)*cr.at(k);
303 correlationMatrix_m[i][j] = correlationMatrix_m[j][i]; // impose symmetry
304 }
305 }
306 }
307 else {
308 throw OpalException("Distribution::SetDistParametersGauss",
309 "Inconsistent set of correlations specified, check manual");
310 }
311 }
312
313 avrgpz_m = 0.0;
314}
315
317
318 cutoffR_m = 3.;
319 cutoffP_m = 3.;
320
321 // set diagonal elements first
322 setSigmaR_m();
323 setSigmaP_m();
324
325 // initialize the covariance matrix to identity
326 for (unsigned int i = 0; i < 6; ++ i) {
327 for (unsigned int j = 0; j < 6; ++ j) {
328 if (i==j)
329 correlationMatrix_m[i][j] = 1.0;
330 else
331 correlationMatrix_m[i][j] = 0.0;
332 }
333 }
334
335 cutoffR_m = ippl::Vector<double, 3>(
339
343
346
348
349 if (emitting_m) {
350 sigmaR_m[2] = 0.0;
351
355
358
359 // If TRISE and TFALL are defined > 0.0 then these attributes
360 // override SIGMAT.
361 //
363 || std::abs(Attributes::getReal(itsAttr[DISTRIBUTION::TFALL])) > 0.0) {
364
365 double timeRatio = std::sqrt(2.0 * std::log(10.0)) - std::sqrt(2.0 * std::log(10.0 / 9.0));
366
367 if (std::abs(Attributes::getReal(itsAttr[DISTRIBUTION::TRISE])) > 0.0)
369 / timeRatio;
370
371 if (std::abs(Attributes::getReal(itsAttr[DISTRIBUTION::TFALL])) > 0.0)
373 / timeRatio;
374 }
375
376 // For an emitted beam, the longitudinal cutoff >= 0.
377 cutoffR_m[2] = std::abs(cutoffR_m[2]);
378
379 }
380 /*
381 cutoffR_m = Vector_t(Attributes::getReal(itsAttr[Attrib::Distribution::CUTOFFX]),
382 Attributes::getReal(itsAttr[Attrib::Distribution::CUTOFFY]),
383 Attributes::getReal(itsAttr[Attrib::Distribution::CUTOFFLONG]));
384
385 correlationMatrix_m(1, 0) = Attributes::getReal(itsAttr[Attrib::Distribution::CORRX]);
386 correlationMatrix_m(3, 2) = Attributes::getReal(itsAttr[Attrib::Distribution::CORRY]);
387 correlationMatrix_m(5, 4) = Attributes::getReal(itsAttr[Attrib::Distribution::CORRT]);
388
389 // CORRZ overrides CORRT.
390 if (Attributes::getReal(itsAttr[Attrib::Distribution::CORRZ]) != 0.0)
391 correlationMatrix_m(5, 4) = Attributes::getReal(itsAttr[Attrib::Distribution::CORRZ]);
392
393 setSigmaR_m();
394 if (emitting_m) {
395 sigmaR_m[2] = 0.0;
396
397 sigmaTRise_m = std::abs(Attributes::getReal(itsAttr[Attrib::Distribution::SIGMAT]));
398 sigmaTFall_m = std::abs(Attributes::getReal(itsAttr[Attrib::Distribution::SIGMAT]));
399
400 tPulseLengthFWHM_m = std::abs(Attributes::getReal(itsAttr[Attrib::Distribution::TPULSEFWHM]));
401
402 //
403 // If TRISE and TFALL are defined > 0.0 then these attributes
404 // override SIGMAT.
405 //
406 if (std::abs(Attributes::getReal(itsAttr[Attrib::Distribution::TRISE])) > 0.0
407 || std::abs(Attributes::getReal(itsAttr[Attrib::Distribution::TFALL])) > 0.0) {
408
409 double timeRatio = std::sqrt(2.0 * std::log(10.0)) - std::sqrt(2.0 * std::log(10.0 / 9.0));
410
411 if (std::abs(Attributes::getReal(itsAttr[Attrib::Distribution::TRISE])) > 0.0)
412 sigmaTRise_m = std::abs(Attributes::getReal(itsAttr[Attrib::Distribution::TRISE]))
413 / timeRatio;
414
415 if (std::abs(Attributes::getReal(itsAttr[Attrib::Distribution::TFALL])) > 0.0)
416 sigmaTFall_m = std::abs(Attributes::getReal(itsAttr[Attrib::Distribution::TFALL]))
417 / timeRatio;
418
419 }
420
421 // For an emitted beam, the longitudinal cutoff >= 0.
422 cutoffR_m[2] = std::abs(cutoffR_m[2]);
423 }
424
425 // Set laser profile/
426 laserProfileFileName_m = Attributes::getString(itsAttr[Attrib::Distribution::LASERPROFFN]);
427 if (!(laserProfileFileName_m == std::string(""))) {
428 laserImageName_m = Attributes::getString(itsAttr[Attrib::Distribution::IMAGENAME]);
429 laserIntensityCut_m = std::abs(Attributes::getReal(itsAttr[Attrib::Distribution::INTENSITYCUT]));
430 short flags = 0;
431 if (Attributes::getBool(itsAttr[Attrib::Distribution::FLIPX])) flags |= LaserProfile::FLIPX;
432 if (Attributes::getBool(itsAttr[Attrib::Distribution::FLIPY])) flags |= LaserProfile::FLIPY;
433 if (Attributes::getBool(itsAttr[Attrib::Distribution::ROTATE90])) flags |= LaserProfile::ROTATE90;
434 if (Attributes::getBool(itsAttr[Attrib::Distribution::ROTATE180])) flags |= LaserProfile::ROTATE180;
435 if (Attributes::getBool(itsAttr[Attrib::Distribution::ROTATE270])) flags |= LaserProfile::ROTATE270;
436
437 laserProfile_m = new LaserProfile(laserProfileFileName_m,
438 laserImageName_m,
439 laserIntensityCut_m,
440 flags);
441 }
442
443 // Legacy for ASTRAFLATTOPTH.
444 if (distrTypeT_m == DistributionType::ASTRAFLATTOPTH)
445 tRise_m = std::abs(Attributes::getReal(itsAttr[Attrib::Distribution::TRISE]));
446*/
447
448}
449
450void Distribution::createDistributionGauss(size_t numberOfParticles, double massIneV, ippl::ParticleAttrib<ippl::Vector<double, 3>>& R, ippl::ParticleAttrib<ippl::Vector<double, 3>>& P, std::shared_ptr<ParticleContainer_t> &pc, std::shared_ptr<FieldContainer_t> &fc, Vector_t<double, 3> nr) {
451 // moved to Gaussian.hpp
452}
453
454void Distribution::printDist(Inform& os, size_t numberOfParticles) const {
455}
456
457void Distribution::printDistGauss(Inform& os) const {
458 os << "* Distribution type: GAUSS" << endl;
459 os << "* " << endl;
460 os << "* SIGMAX = " << sigmaR_m[0] << " [m]" << endl;
461 os << "* SIGMAY = " << sigmaR_m[1] << " [m]" << endl;
462 os << "* SIGMAZ = " << sigmaR_m[2] << " [m]" << endl;
463 os << "* SIGMAPX = " << sigmaP_m[0] << " [Beta Gamma]" << endl;
464 os << "* SIGMAPY = " << sigmaP_m[1] << " [Beta Gamma]" << endl;
465 os << "* SIGMAPZ = " << sigmaP_m[2] << " [Beta Gamma]" << endl;
466}
467
469 os << "* Distribution type: MULTIVARIATEGAUSS" << endl;
470 os << "* " << endl;
471 os << "* SIGMAX = " << sigmaR_m[0] << " [m]" << endl;
472 os << "* SIGMAY = " << sigmaR_m[1] << " [m]" << endl;
473 os << "* SIGMAZ = " << sigmaR_m[2] << " [m]" << endl;
474 os << "* SIGMAPX = " << sigmaP_m[0] << " [Beta Gamma]" << endl;
475 os << "* SIGMAPY = " << sigmaP_m[1] << " [Beta Gamma]" << endl;
476 os << "* SIGMAPZ = " << sigmaP_m[2] << " [Beta Gamma]" << endl;
477
478 os << "* input cov matrix = ";
479 for (unsigned int i = 0; i < 6; ++ i) {
480 for (unsigned int j = 0; j < 6; ++ j) {
481 os << correlationMatrix_m[i][j] << " ";
482 }
483 os << endl << " ";
484 }
485}
486
487void Distribution::printDistFlatTop(Inform& os) const {
488 os << "* Distribution type: FLATTOP" << endl;
489 os << "* " << endl;
490 os << "* SIGMAX = " << sigmaR_m[0] << " [m]" << endl;
491 os << "* SIGMAY = " << sigmaR_m[1] << " [m]" << endl;
492
493 if (emitting_m) {
494 os << "* Sigma Time Rise = " << sigmaTRise_m
495 << " [sec]" << endl;
496 os << "* TPULSEFWHM = " << tPulseLengthFWHM_m
497 << " [sec]" << endl;
498 os << "* Sigma Time Fall = " << sigmaTFall_m
499 << " [sec]" << endl;
500 os << "* Longitudinal cutoff = " << cutoffR_m[2]
501 << " [units of Sigma Time]" << endl;
502 //os << "* Flat top modulation amplitude = "
503 // << Attributes::getReal(itsAttr[DISTRIBUTION::FTOSCAMPLITUDE])
504 // << " [Percent of distribution amplitude]" << endl;
505 //os << "* Flat top modulation periods = "
506 // << std::abs(Attributes::getReal(itsAttr[DISTRIBUTION::FTOSCPERIODS]))
507 // << endl;
508 }
509 else{
510 os << "* SIGMAZ = " << sigmaR_m[2] << " [m]" << endl;
511 }
512}
513
517
519 // set distribution type
520 setDistType();
521 // set distribution parameters
522 switch (distrTypeT_m) {
525 break;
528 break;
531 break;
532 default:
533 throw OpalException("Distribution Param", "Unknown \"TYPE\" of \"DISTRIBUTION\"");
534 }
535}
536
538 static const std::map<std::string, DistributionType> typeStringToDistType_s = {
539 {"NODIST", DistributionType::NODIST},
540 {"GAUSS", DistributionType::GAUSS},
541 {"MULTIVARIATEGAUSS", DistributionType::MULTIVARIATEGAUSS},
542 {"FLATTOP", DistributionType::FLATTOP}
543 };
544
546
547 if (distT_m.empty()) {
548 throw OpalException(
549 "Distribution::setDistType",
550 "The attribute \"TYPE\" isn't set for the \"DISTRIBUTION\"!");
551 } else {
552 distrTypeT_m = typeStringToDistType_s.at(distT_m);
553 }
554}
555
562
569
Inform * gmsg
Definition changes.cpp:7
@ SIZE
Definition IndexMap.cpp:173
ippl::Vector< T, Dim > Vector_t
typename Kokkos::Random_XorShift64_Pool<> GeneratorPool
ippl::ParticleBase< ippl::ParticleSpatialLayout< T, Dim > > Base
typename ippl::detail::ViewType< ippl::Vector< double, Dim >, 1 >::view_type view_type
DistributionType
const int nr
Attribute makeBool(const std::string &name, const std::string &help)
Make logical attribute.
double getReal(const Attribute &attr)
Return real value.
Attribute makePredefinedString(const std::string &name, const std::string &help, const std::initializer_list< std::string > &predefinedStrings)
Make predefined string attribute.
Attribute makeReal(const std::string &name, const std::string &help)
Make real attribute.
bool getBool(const Attribute &attr)
Return logical value.
Attribute makeRealArray(const std::string &name, const std::string &help)
Create real array attribute.
std::vector< double > getRealArray(const Attribute &attr)
Get array value.
std::string getString(const Attribute &attr)
Get string value.
Attribute makeString(const std::string &name, const std::string &help)
Make string attribute.
Definition(int size, const char *name, const char *help)
Constructor for exemplars.
void registerOwnership(const AttributeHandler::OwnerType &itsClass) const
Definition Object.cpp:189
Object(int size, const char *name, const char *help)
Constructor for exemplars.
Definition Object.cpp:354
std::vector< Attribute > itsAttr
The object attributes.
Definition Object.h:216
Object * find(const std::string &name)
Find entry.
Definition OpalData.cpp:563
static OpalData * getInstance()
Definition OpalData.cpp:195
static Distribution * find(const std::string &name)
ippl::Vector< double, 3 > sigmaR_m
void printDistFlatTop(Inform &os) const
ippl::Vector< double, 3 > sigmaP_m
double FTOSCAmplitude_m
double sigmaTFall_m
double tPulseLengthFWHM_m
virtual void execute()
Execute the command.
double getTEmission() const
virtual bool canReplaceBy(Object *object)
Distribution can only be replaced by another distribution.
double FTOSCPeriods_m
ippl::Vector< double, 3 > cutoffR_m
virtual ~Distribution()
DistributionType distrTypeT_m
void setDistParametersMultiVariateGauss()
virtual Distribution * clone(const std::string &name)
Return a clone.
virtual void update()
Update this object.
void printDistMultiVariateGauss(Inform &os) const
ippl::Vector< double, 3 > cutoffP_m
double sigmaTRise_m
size_t getNumOfLocalParticlesToCreate(size_t n)
void setTEmission(double tEmission)
void setDistParametersFlatTop()
void createDistributionGauss(size_t numberOfParticles, double massIneV, ippl::ParticleAttrib< ippl::Vector< double, 3 > > &R, ippl::ParticleAttrib< ippl::Vector< double, 3 > > &P, std::shared_ptr< ParticleContainer< double, 3 > > &pc, std::shared_ptr< FieldContainer_t > &fc, Vector_t< double, 3 > nr)
double tEmission_m
void printDist(Inform &os, size_t numberOfParticles) const
void setAvrgPz(double avrgpz)
std::string distT_m
void printDistGauss(Inform &os) const
Inform & printInfo(Inform &os) const
void create(size_t &numberOfParticles, double massIneV, double charge, ippl::ParticleAttrib< ippl::Vector< double, 3 > > &R, ippl::ParticleAttrib< ippl::Vector< double, 3 > > &P, std::shared_ptr< ParticleContainer< double, 3 > > &pc, std::shared_ptr< FieldContainer_t > &fc, Vector_t< double, 3 > nr)
Matrix_t correlationMatrix_m
void setDistParametersGauss()
The base class for all OPAL exceptions.