OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
Distribution Class Reference

#include <Distribution.h>

Inheritance diagram for Distribution:
Collaboration diagram for Distribution:

Classes

class  BinomialBehaviorSplitter
class  MDependentBehavior
class  GaussianLikeBehavior

Public Member Functions

 Distribution ()
virtual ~Distribution ()
virtual bool canReplaceBy (Object *object)
 Distribution can only be replaced by another distribution.
virtual Distributionclone (const std::string &name)
 Return a clone.
virtual void execute ()
 Execute the command.
virtual void update ()
 Update this object.
size_t getNumOfLocalParticlesToCreate (size_t n)
void createOpalCycl (PartBunchBase< double, 3 > *beam, size_t numberOfParticles, double current, const Beamline &bl)
void createOpalT (PartBunchBase< double, 3 > *beam, std::vector< Distribution * > addedDistributions, size_t &numberOfParticles)
void createOpalT (PartBunchBase< double, 3 > *beam, size_t &numberOfParticles)
void doRestartOpalT (PartBunchBase< double, 3 > *p, size_t Np, int restartStep, H5PartWrapper *h5wrapper)
void doRestartOpalCycl (PartBunchBase< double, 3 > *p, size_t Np, int restartStep, const int specifiedNumBunch, H5PartWrapper *h5wrapper)
size_t emitParticles (PartBunchBase< double, 3 > *beam, double eZ)
double getPercentageEmitted () const
bool getIfDistEmitting ()
int getLastEmittedEnergyBin ()
double getMaxTOrZ ()
double getMinTOrZ ()
size_t getNumberOfEmissionSteps ()
int getNumberOfEnergyBins ()
double getEmissionDeltaT ()
double getEnergyBinDeltaT ()
double getWeight ()
double getTEmission ()
Vector_t get_pmean () const
std::string getTypeofDistribution ()
DistributionType getType () const
InformprintInfo (Inform &os) const
bool Rebin ()
void setDistToEmitted (bool emitted)
void setDistType ()
void setSigmaR_m ()
void setSigmaP_m (double massIneV)
void shiftBeam (double &maxTOrZ, double &minTOrZ)
double getEmissionTimeShift () const
void setNumberOfDistributions (unsigned int n)
virtual const std::string getCategory () const
 Return the object category as a string.
virtual bool shouldTrace () const
 Trace flag.
virtual bool shouldUpdate () const
 Update flag.
void copyAttributes (const Object &)
 Copy attributes from another object.
virtual AttributefindAttribute (const std::string &name)
 Find an attribute by name.
virtual const AttributefindAttribute (const std::string &name) const
 Find an attribute by name.
virtual ObjectmakeTemplate (const std::string &, TokenStream &, Statement &)
 Macro handler function.
virtual ObjectmakeInstance (const std::string &name, Statement &, const Parser *)
 Macro handler function.
virtual void parse (Statement &)
 Parse the object.
virtual void parseShortcut (Statement &, bool eval=true)
 Parser for single-attribute commands.
virtual void print (std::ostream &) const
 Print the object.
virtual void printValue (std::ostream &) const
virtual void printHelp (std::ostream &) const
 Print help.
virtual void replace (Object *oldObject, Object *newObject)
 Replace references.
bool isBuiltin () const
 True, if [b]this[/b] is a built-in object.
virtual bool isShared () const
 Shared flag.
virtual void setShared (bool)
 Set/reset shared flag.
void setDirty (bool)
 Set/reset the [b]modified[/b] flag.
bool isDirty () const
 True, if the [b]modified[/b] flag is set.
void setFlag (bool)
 Flag/unflag this object, e. g. to control output of objects for.
bool isFlagged () const
 True, if [b]this[/b] is flagged by setFlag(true).
const ObjectgetBaseObject () const
 Return the object's base type object.
const std::string & getOpalName () const
 Return object name.
ObjectgetParent () const
 Return parent pointer.
bool isTreeMember (const Object *subTree) const
 Test for tree membership.
void setOpalName (const std::string &name)
 Set object name.
void setParent (Object *)
 Set parent object.
void clear ()
 Clear the occurrence counter.
int increment ()
 Increment and return the occurrence counter.
int occurrenceCount ()
 Return the occurrence counter.
void registerReference (Invalidator *a)
 Register a reference to this object.
void unregisterReference (Invalidator *a)
 Unegister a reference to this object.
void registerOwnership (const AttributeHandler::OwnerType &itsClass) const
int addReference () const
 Increment reference count.
int removeReference () const
 Decrement the reference count.

Static Public Member Functions

static Distributionfind (const std::string &name)

Public Attributes

std::vector< AttributeitsAttr
 The object attributes.

Protected Attributes

bool builtin
 Built-in flag.
bool modified
 Dirty flag.
bool flagged
 Object flag.

Private Types

enum class  EmissionModel : unsigned short { NONE , ASTRA , NONEQUIL }
enum class  InputMomentumUnits : unsigned short { NONE , EVOVERC }

Private Member Functions

 Distribution (const std::string &name, Distribution *parent)
 Distribution (const Distribution &)=delete
void operator= (const Distribution &)=delete
std::vector< double > & getXDist ()
std::vector< double > & getBGxDist ()
std::vector< double > & getYDist ()
std::vector< double > & getBGyDist ()
std::vector< double > & getTOrZDist ()
std::vector< double > & getBGzDist ()
void eraseXDist ()
void eraseBGxDist ()
void eraseYDist ()
void eraseBGyDist ()
void eraseTOrZDist ()
void eraseBGzDist ()
void addDistributions ()
void applyEmissionModel (double lowEnergyLimit, double &px, double &py, double &pz, std::vector< double > &additionalRNs)
void applyEmissModelAstra (double &px, double &py, double &pz, std::vector< double > &additionalRNs)
void applyEmissModelNone (double &pz)
void applyEmissModelNonEquil (double eZ, double &px, double &py, double &pz, std::vector< double > &additionalRNs)
void create (size_t &numberOfParticles, double massIneV, double charge)
void calcPartPerDist (size_t numberOfParticles)
void checkEmissionParameters ()
void checkIfEmitted ()
void checkParticleNumber (size_t &numberOfParticles)
void checkFileMomentum (double momentumTol)
void chooseInputMomentumUnits (InputMomentumUnits inputMoUnits)
size_t getNumberOfParticlesInFile (std::ifstream &inputFile)
void createDistributionBinomial (size_t numberOfParticles, double massIneV)
void createDistributionFlattop (size_t numberOfParticles, double massIneV)
void createDistributionMultiGauss (size_t numberOfParticles, double massIneV)
void createDistributionFromFile (size_t numberOfParticles, double massIneV)
void createDistributionGauss (size_t numberOfParticles, double massIneV)
void createMatchedGaussDistribution (size_t numberOfParticles, double massIneV, double charge)
void sampleUniformDisk (gsl_qrng *quasiRandGen2D, double &x1, double &x2)
void fillEBinHistogram ()
void fillParticleBins ()
size_t findEBin (double tOrZ)
void generateAstraFlattopT (size_t numberOfParticles)
void generateBinomial (size_t numberOfParticles)
void generateFlattopLaserProfile (size_t numberOfParticles)
void generateFlattopT (size_t numberOfParticles)
void generateFlattopZ (size_t numberOfParticles)
void generateGaussZ (size_t numberOfParticles)
void generateMatchedGauss (const SigmaGenerator::matrix_t &, size_t numberOfParticles, double massIneV)
void generateLongFlattopT (size_t numberOfParticles)
void generateTransverseGauss (size_t numberOfParticles)
void initializeBeam (PartBunchBase< double, 3 > *beam)
void injectBeam (PartBunchBase< double, 3 > *beam)
void printDist (Inform &os, size_t numberOfParticles) const
void printDistBinomial (Inform &os) const
void printDistFlattop (Inform &os) const
void printDistMultiGauss (Inform &os) const
void printDistFromFile (Inform &os) const
void printDistGauss (Inform &os) const
void printDistMatchedGauss (Inform &os) const
void printEmissionModel (Inform &os) const
void printEmissionModelAstra (Inform &os) const
void printEmissionModelNone (Inform &os) const
void printEmissionModelNonEquil (Inform &os) const
void printEnergyBins (Inform &os) const
void adjustPhaseSpace (double massIneV)
void reflectDistribution (size_t &numberOfParticles)
void scaleDistCoordinates ()
gsl_qrng * selectRandomGenerator (std::string, unsigned int dimension)
 Select and allocate gsl random number generator.
void setAttributes ()
void setDistParametersBinomial (double massIneV)
void setDistParametersFlattop (double massIneV)
void setDistParametersMultiGauss (double massIneV)
void setDistParametersGauss (double massIneV)
void setEmissionTime (double &maxT, double &minT)
void setupEmissionModel (PartBunchBase< double, 3 > *beam)
void setupEmissionModelAstra (PartBunchBase< double, 3 > *beam)
void setupEmissionModelNone (PartBunchBase< double, 3 > *beam)
void setupEmissionModelNonEquil ()
void setupEnergyBins (double maxTOrZ, double minTOrZ)
void setupParticleBins (double massIneV, PartBunchBase< double, 3 > *beam)
void shiftDistCoordinates (double massIneV)
void writeOutFileHeader ()
void writeOutFileEmission ()
void writeOutFileInjection ()

Private Attributes

std::string distT_m
DistributionType distrTypeT_m
 Distribution type strings.
unsigned int numberOfDistributions_m
 List of Distribution types.
bool emitting_m
PartData particleRefData_m
std::vector< Distribution * > addedDistributions_m
 Vector of distributions to be added to this distribution.
std::vector< size_t > particlesPerDist_m
EmissionModel emissionModel_m
 Emission Model.
double tEmission_m
 Emission parameters.
double tBin_m
double currentEmissionTime_m
int currentEnergyBin_m
int currentSampleBin_m
int numberOfEnergyBins_m
int numberOfSampleBins_m
PartBinsenergyBins_m
gsl_histogram * energyBinHist_m
 Distribution energy bins.
gsl_rng * randGen_m
double pTotThermal_m
 Random number generator.
Vector_t pmean_m
 Total thermal momentum.
double cathodeWorkFunc_m
double laserEnergy_m
 Cathode material work function (eV).
double cathodeFermiEnergy_m
 Laser photon energy (eV).
double cathodeTemp_m
 Cathode material Fermi energy (eV).
double emitEnergyUpperLimit_m
 Cathode temperature (K).
std::vector< std::vector< double > > additionalRNs_m
 Upper limit on emission energy distribution (eV).
size_t totalNumberParticles_m
size_t totalNumberEmittedParticles_m
std::vector< double > xDist_m
std::vector< double > pxDist_m
std::vector< double > yDist_m
std::vector< double > pyDist_m
std::vector< double > tOrZDist_m
std::vector< double > pzDist_m
std::vector< double > xWrite_m
std::vector< double > pxWrite_m
std::vector< double > yWrite_m
std::vector< double > pyWrite_m
std::vector< double > tOrZWrite_m
std::vector< double > pzWrite_m
std::vector< size_t > binWrite_m
double avrgpz_m
InputMomentumUnits inputMoUnits_m
double sigmaTRise_m
double sigmaTFall_m
double tPulseLengthFWHM_m
Vector_t sigmaR_m
Vector_t sigmaP_m
Vector_t cutoffR_m
Vector_t cutoffP_m
Vector_t mBinomial_m
matrix_t correlationMatrix_m
double sepPeaks_m
unsigned nPeaks_m
std::string laserProfileFileName_m
std::string laserImageName_m
double laserIntensityCut_m
LaserProfilelaserProfile_m
double I_m
double E_m
double tRise_m
 time binned distribution with thermal energy
double tFall_m
double sigmaRise_m
double sigmaFall_m
double cutoff_m
std::string outFilename_m
ObjectitsParent
std::string itsName
std::string itsHelp
int occurrence
double timeStamp
std::set< Invalidator * > references
bool sharedFlag
int refCount

Static Private Attributes

static const double percentTEmission_m = 0.0005

Detailed Description

Definition at line 188 of file Distribution.h.

Member Enumeration Documentation

◆ EmissionModel

enum class Distribution::EmissionModel : unsigned short
strongprivate
Enumerator
NONE 
ASTRA 
NONEQUIL 

Definition at line 245 of file Distribution.h.

◆ InputMomentumUnits

enum class Distribution::InputMomentumUnits : unsigned short
strongprivate
Enumerator
NONE 
EVOVERC 

Definition at line 251 of file Distribution.h.

Constructor & Destructor Documentation

◆ Distribution() [1/3]

◆ ~Distribution()

Distribution::~Distribution ( )
virtual

Definition at line 210 of file Distribution.cpp.

References energyBinHist_m, energyBins_m, laserProfile_m, and randGen_m.

◆ Distribution() [2/3]

◆ Distribution() [3/3]

Distribution::Distribution ( const Distribution & )
privatedelete

References Distribution().

Here is the call graph for this function:

Member Function Documentation

◆ addDistributions()

void Distribution::addDistributions ( )
private

◆ addReference()

int RCObject::addReference ( ) const
inlineinherited

Increment reference count.

Definition at line 83 of file RCObject.h.

References refCount.

Referenced by Pointer< Object >::operator=(), Pointer< Object >::operator=(), and Pointer< Object >::unique().

◆ adjustPhaseSpace()

void Distribution::adjustPhaseSpace ( double massIneV)
private

Definition at line 4420 of file Distribution.cpp.

References allreduce(), avrgpz_m, Util::convertMomentumEVoverCToBetaGamma(), distrTypeT_m, emitting_m, EVOVERC, FROMFILE, OpalData::getInstance(), Attributes::getReal(), inputMoUnits_m, Object::itsAttr, Attrib::Distribution::OFFSETPX, Attrib::Distribution::OFFSETPY, pxDist_m, pyDist_m, pzDist_m, tOrZDist_m, totalNumberParticles_m, xDist_m, and yDist_m.

Referenced by create().

Here is the call graph for this function:

◆ applyEmissionModel()

void Distribution::applyEmissionModel ( double lowEnergyLimit,
double & px,
double & py,
double & pz,
std::vector< double > & additionalRNs )
private

Definition at line 645 of file Distribution.cpp.

References applyEmissModelAstra(), applyEmissModelNone(), applyEmissModelNonEquil(), ASTRA, emissionModel_m, NONE, and NONEQUIL.

Referenced by emitParticles().

Here is the call graph for this function:

◆ applyEmissModelAstra()

void Distribution::applyEmissModelAstra ( double & px,
double & py,
double & pz,
std::vector< double > & additionalRNs )
private

Definition at line 663 of file Distribution.cpp.

References pTotThermal_m, and Physics::two_pi.

Referenced by applyEmissionModel().

◆ applyEmissModelNone()

void Distribution::applyEmissModelNone ( double & pz)
private

Definition at line 674 of file Distribution.cpp.

References pTotThermal_m.

Referenced by applyEmissionModel().

◆ applyEmissModelNonEquil()

void Distribution::applyEmissModelNonEquil ( double eZ,
double & px,
double & py,
double & pz,
std::vector< double > & additionalRNs )
private

Definition at line 678 of file Distribution.cpp.

References cathodeFermiEnergy_m, cathodeTemp_m, emitEnergyUpperLimit_m, exp(), Units::GeV2eV, laserEnergy_m, Physics::m_e, randGen_m, and Physics::two_pi.

Referenced by applyEmissionModel().

Here is the call graph for this function:

◆ calcPartPerDist()

void Distribution::calcPartPerDist ( size_t numberOfParticles)
private

Definition at line 735 of file Distribution.cpp.

References addedDistributions_m, Distribution(), distrTypeT_m, Attrib::Distribution::FNAME, FROMFILE, getNumberOfParticlesInFile(), Attributes::getString(), getWeight(), Object::itsAttr, IpplInfo::myNode(), numberOfDistributions_m, and particlesPerDist_m.

Referenced by createOpalCycl(), and createOpalT().

Here is the call graph for this function:

◆ canReplaceBy()

bool Distribution::canReplaceBy ( Object * object)
virtual

Distribution can only be replaced by another distribution.

Reimplemented from Object.

Definition at line 241 of file Distribution.cpp.

References Distribution(), and Object::Object().

Here is the call graph for this function:

◆ checkEmissionParameters()

void Distribution::checkEmissionParameters ( )
private

Definition at line 804 of file Distribution.cpp.

References currentEnergyBin_m, currentSampleBin_m, Attrib::Distribution::EMISSIONSTEPS, Attributes::getReal(), Object::itsAttr, Attrib::Distribution::NBIN, numberOfEnergyBins_m, and numberOfSampleBins_m.

Referenced by createOpalT(), and generateAstraFlattopT().

Here is the call graph for this function:

◆ checkFileMomentum()

void Distribution::checkFileMomentum ( double momentumTol)
private

Definition at line 875 of file Distribution.cpp.

References avrgpz_m, and pmean_m.

Referenced by createOpalT().

◆ checkIfEmitted()

void Distribution::checkIfEmitted ( )
private

Definition at line 829 of file Distribution.cpp.

References ASTRAFLATTOPTH, distrTypeT_m, Attrib::Distribution::EMITTED, emitting_m, Attributes::getBool(), GUNGAUSSFLATTOPTH, and Object::itsAttr.

Referenced by createOpalT().

Here is the call graph for this function:

◆ checkParticleNumber()

void Distribution::checkParticleNumber ( size_t & numberOfParticles)
private

Definition at line 844 of file Distribution.cpp.

References IpplInfo::getNodes(), reduce(), and tOrZDist_m.

Referenced by createOpalCycl(), and createOpalT().

Here is the call graph for this function:

◆ chooseInputMomentumUnits()

void Distribution::chooseInputMomentumUnits ( InputMomentumUnits inputMoUnits)
private

Definition at line 891 of file Distribution.cpp.

References EVOVERC, Attributes::getString(), Attrib::Distribution::INPUTMOUNITS, inputMoUnits_m, Object::itsAttr, and NONE.

Referenced by createOpalCycl(), and createOpalT().

Here is the call graph for this function:

◆ clear()

void Object::clear ( )
inherited

Clear the occurrence counter.

Definition at line 341 of file Object.cpp.

References occurrence.

◆ clone()

Distribution * Distribution::clone ( const std::string & name)
virtual

Return a clone.

Implements Object.

Definition at line 245 of file Distribution.cpp.

References Distribution(), and name.

Referenced by Distribution().

Here is the call graph for this function:

◆ copyAttributes()

void Object::copyAttributes ( const Object & source)
inherited

Copy attributes from another object.

Definition at line 54 of file Object.cpp.

References itsAttr, and Object().

Referenced by LineTemplate::makeInstance(), and SequenceTemplate::makeInstance().

Here is the call graph for this function:

◆ create()

void Distribution::create ( size_t & numberOfParticles,
double massIneV,
double charge )
private

Create the particle distribution.

Parameters
numberOfParticlesto create
massIneVparticle charge in eV
chargeof the particle type in elementary charge

Definition at line 255 of file Distribution.cpp.

References additionalRNs_m, adjustPhaseSpace(), ASTRA, ASTRAFLATTOPTH, BINOMIAL, createDistributionBinomial(), createDistributionFlattop(), createDistributionFromFile(), createDistributionGauss(), createDistributionMultiGauss(), createMatchedGaussDistribution(), Options::cZero, distrTypeT_m, emissionModel_m, emitting_m, endl(), FLATTOP, FROMFILE, GAUSS, Attributes::getBool(), IpplInfo::getNodes(), getNumOfLocalParticlesToCreate(), gmsg, GUNGAUSSFLATTOPTH, Object::itsAttr, level2(), MATCHEDGAUSS, MULTIGAUSS, IpplInfo::myNode(), NONEQUIL, particlesPerDist_m, randGen_m, reflectDistribution(), Attrib::Distribution::SCALABLE, scaleDistCoordinates(), Options::seed, and tOrZDist_m.

Referenced by createOpalCycl(), and createOpalT().

Here is the call graph for this function:

◆ createDistributionBinomial()

void Distribution::createDistributionBinomial ( size_t numberOfParticles,
double massIneV )
private

Definition at line 908 of file Distribution.cpp.

References generateBinomial(), and setDistParametersBinomial().

Referenced by create().

Here is the call graph for this function:

◆ createDistributionFlattop()

void Distribution::createDistributionFlattop ( size_t numberOfParticles,
double massIneV )
private

Definition at line 914 of file Distribution.cpp.

References emitting_m, generateFlattopLaserProfile(), generateFlattopT(), generateFlattopZ(), laserProfile_m, and setDistParametersFlattop().

Referenced by create().

Here is the call graph for this function:

◆ createDistributionFromFile()

void Distribution::createDistributionFromFile ( size_t numberOfParticles,
double massIneV )
private

Definition at line 1034 of file Distribution.cpp.

References Util::convertMomentumEVoverCToBetaGamma(), EVOVERC, Attrib::Distribution::FNAME, IpplInfo::getComm(), IpplInfo::getNodes(), getNumberOfParticlesInFile(), Attributes::getString(), inputMoUnits_m, Object::itsAttr, IpplInfo::myNode(), pmean_m, pxDist_m, pyDist_m, pzDist_m, reduce(), tOrZDist_m, xDist_m, and yDist_m.

Referenced by create().

Here is the call graph for this function:

◆ createDistributionGauss()

void Distribution::createDistributionGauss ( size_t numberOfParticles,
double massIneV )
private

Definition at line 1334 of file Distribution.cpp.

References emitting_m, generateGaussZ(), generateLongFlattopT(), generateTransverseGauss(), and setDistParametersGauss().

Referenced by create().

Here is the call graph for this function:

◆ createDistributionMultiGauss()

void Distribution::createDistributionMultiGauss ( size_t numberOfParticles,
double massIneV )
private

Definition at line 927 of file Distribution.cpp.

References avrgpz_m, cutoffP_m, cutoffR_m, emitting_m, exp(), Attributes::getBool(), IpplInfo::getNodes(), Object::itsAttr, IpplInfo::myNode(), nPeaks_m, pxDist_m, pyDist_m, pzDist_m, randGen_m, Options::rngtype, sampleUniformDisk(), Attrib::Distribution::SCALABLE, selectRandomGenerator(), sepPeaks_m, setDistParametersMultiGauss(), sigmaP_m, sigmaR_m, tOrZDist_m, xDist_m, and yDist_m.

Referenced by create().

Here is the call graph for this function:

◆ createMatchedGaussDistribution()

◆ createOpalCycl()

◆ createOpalT() [1/2]

◆ createOpalT() [2/2]

void Distribution::createOpalT ( PartBunchBase< double, 3 > * beam,
std::vector< Distribution * > addedDistributions,
size_t & numberOfParticles )

Definition at line 1408 of file Distribution.cpp.

References addedDistributions_m, and createOpalT().

Referenced by createOpalT().

Here is the call graph for this function:

◆ doRestartOpalCycl()

◆ doRestartOpalT()

◆ emitParticles()

size_t Distribution::emitParticles ( PartBunchBase< double, 3 > * beam,
double eZ )

Here we emit particles from the cathode.

A typical integration time step, \(\Delta t\), is broken down into 3 sub-steps:

1) Drift particles for \(\frac{\Delta t}{2}\).

2) Calculate fields and advance momentum.

3) Drift particles for \(\frac{\Delta t}{2}\) at the new momentum to complete the full time step.

The difficulty for emission is that at the cathode position there is a step function discontinuity in the fields. If we apply the typical integration time step across this boundary, we get an artificial numerical bunching of the beam, especially at very high accelerating fields. This function takes the cathode position boundary into account in order to achieve smoother particle emission.

During an emission step, an integral number of time bins from the distribution histogram are emitted. However, each particle contained in those time bins will actually be emitted from the cathode at a different time, so will only spend some fraction of the total time step, \(\Delta t_{full-timestep}\), in the simulation. The trick to emission is to give each particle a unique time step, \(Delta t_{temp}\), that is equal to the actual time during the emission step that the particle exists in the simulation. For the next integration time step, the particle's time step is set back to the global time step, \(\Delta t_{full-timestep}\).

Definition at line 1583 of file Distribution.cpp.

References additionalRNs_m, applyEmissionModel(), PartBunchBase< T, Dim >::Bf, PartBunchBase< T, Dim >::Bin, binWrite_m, Physics::c, cathodeFermiEnergy_m, cathodeWorkFunc_m, PartBunchBase< T, Dim >::create(), currentEmissionTime_m, currentEnergyBin_m, currentSampleBin_m, PartBunchBase< T, Dim >::dt, PartBunchBase< T, Dim >::Ef, emitting_m, endl(), Physics::epsilon_0, PartBunchBase< T, Dim >::getChargePerParticle(), PartBunchBase< T, Dim >::getdT(), PartBunchBase< T, Dim >::getLocalNum(), PartBunchBase< T, Dim >::getMassPerParticle(), PartBunchBase< T, Dim >::getPType(), PartBunchBase< T, Dim >::getQ(), INFOMSG, PartBunchBase< T, Dim >::iterateEmittedBin(), laserEnergy_m, level3(), PartBunchBase< T, Dim >::M, numberOfEnergyBins_m, numberOfSampleBins_m, PartBunchBase< T, Dim >::P, Physics::pi, PartBunchBase< T, Dim >::POrigin, PartBunchBase< T, Dim >::PType, pxDist_m, pxWrite_m, pyDist_m, pyWrite_m, pzDist_m, pzWrite_m, PartBunchBase< T, Dim >::Q, Physics::q_e, PartBunchBase< T, Dim >::R, reduce(), REGULAR, tOrZDist_m, tOrZWrite_m, totalNumberEmittedParticles_m, PartBunchBase< T, Dim >::TriID, writeOutFileEmission(), xDist_m, xWrite_m, yDist_m, and yWrite_m.

Here is the call graph for this function:

◆ eraseBGxDist()

void Distribution::eraseBGxDist ( )
private

Definition at line 1750 of file Distribution.cpp.

References pxDist_m.

◆ eraseBGyDist()

void Distribution::eraseBGyDist ( )
private

Definition at line 1758 of file Distribution.cpp.

References pyDist_m.

◆ eraseBGzDist()

void Distribution::eraseBGzDist ( )
private

Definition at line 1766 of file Distribution.cpp.

References pzDist_m.

◆ eraseTOrZDist()

void Distribution::eraseTOrZDist ( )
private

Definition at line 1762 of file Distribution.cpp.

References tOrZDist_m.

◆ eraseXDist()

void Distribution::eraseXDist ( )
private

Definition at line 1746 of file Distribution.cpp.

References xDist_m.

◆ eraseYDist()

void Distribution::eraseYDist ( )
private

Definition at line 1754 of file Distribution.cpp.

References yDist_m.

◆ execute()

void Distribution::execute ( )
virtual

Execute the command.

Reimplemented from Object.

Definition at line 249 of file Distribution.cpp.

◆ fillEBinHistogram()

void Distribution::fillEBinHistogram ( )
private

Definition at line 1788 of file Distribution.cpp.

References energyBinHist_m, reduce(), and tOrZDist_m.

Referenced by createOpalT().

Here is the call graph for this function:

◆ fillParticleBins()

void Distribution::fillParticleBins ( )
private

Definition at line 1807 of file Distribution.cpp.

References energyBins_m, pxDist_m, pyDist_m, pzDist_m, tOrZDist_m, xDist_m, and yDist_m.

Referenced by createOpalCycl().

◆ find()

Distribution * Distribution::find ( const std::string & name)
static

Definition at line 492 of file Distribution.cpp.

References Distribution(), OpalData::find(), OpalData::getInstance(), and name.

Referenced by TrackRun::setDistributionParallelT(), and TrackRun::setupCyclotronTracker().

Here is the call graph for this function:

◆ findAttribute() [1/2]

Attribute * Object::findAttribute ( const std::string & name)
virtualinherited

◆ findAttribute() [2/2]

const Attribute * Object::findAttribute ( const std::string & name) const
virtualinherited

Find an attribute by name.

Definition at line 74 of file Object.cpp.

References itsAttr, and name.

◆ findEBin()

size_t Distribution::findEBin ( double tOrZ)
private

Definition at line 1828 of file Distribution.cpp.

References energyBinHist_m, numberOfEnergyBins_m, and numberOfSampleBins_m.

Referenced by injectBeam(), and writeOutFileInjection().

◆ generateAstraFlattopT()

void Distribution::generateAstraFlattopT ( size_t numberOfParticles)
private

Definition at line 1841 of file Distribution.cpp.

References a, checkEmissionParameters(), Attributes::getBool(), IpplInfo::getNodes(), Attributes::getReal(), Object::itsAttr, IpplInfo::myNode(), Attrib::Distribution::NBIN, pzDist_m, randGen_m, Attrib::Legacy::Distribution::SBIN, Attrib::Distribution::SCALABLE, tBin_m, tEmission_m, tOrZDist_m, tPulseLengthFWHM_m, and tRise_m.

Referenced by generateFlattopLaserProfile(), and generateFlattopT().

Here is the call graph for this function:

◆ generateBinomial()

void Distribution::generateBinomial ( size_t numberOfParticles)
private

Following W. Johos for his report TM-11-14

For the \(x,p_x\) phase space we have:

\[ \epsilon_x = \sigma_x \sigma_{p_x} \cos{( \arcsin{(\sigma_{12}) }) } \]

\begin{eqnarray*}\beta_x &=& \frac{\sigma_x^2}{\epsilon_x} \\ \gamma_x &=& \frac{\sigma_{p_x}^2}{\epsilon_x} \\ \alpha_x &=& -\sigma_{12} \sqrt{(\beta_x \gamma_x)} \\ \end{eqnarray*}

This holds similar for the other dimensions.

Definition at line 1952 of file Distribution.cpp.

References avrgpz_m, correlationMatrix_m, Attributes::getBool(), IpplInfo::getNodes(), Object::itsAttr, mBinomial_m, IpplInfo::myNode(), PM, pxDist_m, pyDist_m, pzDist_m, randGen_m, Attrib::Distribution::SCALABLE, sigmaP_m, sigmaR_m, tOrZDist_m, Physics::two_pi, X, xDist_m, and yDist_m.

Referenced by createDistributionBinomial().

Here is the call graph for this function:

◆ generateFlattopLaserProfile()

void Distribution::generateFlattopLaserProfile ( size_t numberOfParticles)
private

Definition at line 2087 of file Distribution.cpp.

References ASTRAFLATTOPTH, distrTypeT_m, generateAstraFlattopT(), generateLongFlattopT(), Attributes::getBool(), IpplInfo::getNodes(), Object::itsAttr, laserProfile_m, IpplInfo::myNode(), pxDist_m, pyDist_m, Attrib::Distribution::SCALABLE, sigmaR_m, xDist_m, and yDist_m.

Referenced by createDistributionFlattop().

Here is the call graph for this function:

◆ generateFlattopT()

void Distribution::generateFlattopT ( size_t numberOfParticles)
private

Definition at line 2123 of file Distribution.cpp.

References ASTRAFLATTOPTH, distrTypeT_m, generateAstraFlattopT(), generateLongFlattopT(), Attributes::getBool(), IpplInfo::getNodes(), Object::itsAttr, IpplInfo::myNode(), pxDist_m, pyDist_m, Options::rngtype, sampleUniformDisk(), Attrib::Distribution::SCALABLE, selectRandomGenerator(), sigmaR_m, xDist_m, and yDist_m.

Referenced by createDistributionFlattop().

Here is the call graph for this function:

◆ generateFlattopZ()

void Distribution::generateFlattopZ ( size_t numberOfParticles)
private

Definition at line 2165 of file Distribution.cpp.

References avrgpz_m, Attributes::getBool(), IpplInfo::getNodes(), Object::itsAttr, IpplInfo::myNode(), pxDist_m, pyDist_m, pzDist_m, randGen_m, Options::rngtype, sampleUniformDisk(), Attrib::Distribution::SCALABLE, selectRandomGenerator(), sigmaR_m, tOrZDist_m, xDist_m, and yDist_m.

Referenced by createDistributionFlattop().

Here is the call graph for this function:

◆ generateGaussZ()

void Distribution::generateGaussZ ( size_t numberOfParticles)
private

Definition at line 2214 of file Distribution.cpp.

References avrgpz_m, correlationMatrix_m, cutoffP_m, cutoffR_m, endl(), Attributes::getBool(), IpplInfo::getNodes(), gmsg, Object::itsAttr, IpplInfo::myNode(), pxDist_m, pyDist_m, pzDist_m, randGen_m, Attrib::Distribution::SCALABLE, sigmaP_m, sigmaR_m, tOrZDist_m, xDist_m, and yDist_m.

Referenced by createDistributionGauss().

Here is the call graph for this function:

◆ generateLongFlattopT()

void Distribution::generateLongFlattopT ( size_t numberOfParticles)
private

◆ generateMatchedGauss()

void Distribution::generateMatchedGauss ( const SigmaGenerator::matrix_t & sigma,
size_t numberOfParticles,
double massIneV )
private

Definition at line 2370 of file Distribution.cpp.

References correlationMatrix_m, RealDiracMatrix::diagonalize(), E_m, Util::getBetaGamma(), Attributes::getBool(), IpplInfo::getNodes(), inputMoUnits_m, Object::itsAttr, IpplInfo::myNode(), NONE, pxDist_m, pyDist_m, pzDist_m, randGen_m, Attrib::Distribution::SCALABLE, sigmaP_m, sigmaR_m, tOrZDist_m, xDist_m, and yDist_m.

Referenced by createMatchedGaussDistribution().

Here is the call graph for this function:

◆ generateTransverseGauss()

void Distribution::generateTransverseGauss ( size_t numberOfParticles)
private

Definition at line 2642 of file Distribution.cpp.

References correlationMatrix_m, cutoffP_m, cutoffR_m, Attributes::getBool(), IpplInfo::getNodes(), Object::itsAttr, IpplInfo::myNode(), pxDist_m, pyDist_m, randGen_m, Attrib::Distribution::SCALABLE, sigmaP_m, sigmaR_m, xDist_m, and yDist_m.

Referenced by createDistributionGauss().

Here is the call graph for this function:

◆ get_pmean()

Vector_t Distribution::get_pmean ( ) const
inline

Definition at line 501 of file Distribution.h.

References pmean_m.

◆ getBaseObject()

const Object * Object::getBaseObject ( ) const
inherited

Return the object's base type object.

Definition at line 303 of file Object.cpp.

References itsParent, and Object().

Here is the call graph for this function:

◆ getBGxDist()

std::vector< double > & Distribution::getBGxDist ( )
private

Definition at line 2861 of file Distribution.cpp.

References pxDist_m.

◆ getBGyDist()

std::vector< double > & Distribution::getBGyDist ( )
private

Definition at line 2869 of file Distribution.cpp.

References pyDist_m.

◆ getBGzDist()

std::vector< double > & Distribution::getBGzDist ( )
private

Definition at line 2877 of file Distribution.cpp.

References pzDist_m.

◆ getCategory()

const std::string Definition::getCategory ( ) const
virtualinherited

Return the object category as a string.

Implements Object.

Definition at line 29 of file Definition.cpp.

◆ getEmissionDeltaT()

double Distribution::getEmissionDeltaT ( )

Definition at line 2845 of file Distribution.cpp.

References numberOfSampleBins_m, and tBin_m.

◆ getEmissionTimeShift()

double Distribution::getEmissionTimeShift ( ) const

Definition at line 4120 of file Distribution.cpp.

References emitting_m, Attributes::getReal(), Object::itsAttr, and Attrib::Distribution::OFFSETT.

Here is the call graph for this function:

◆ getEnergyBinDeltaT()

double Distribution::getEnergyBinDeltaT ( )

Definition at line 2849 of file Distribution.cpp.

References tBin_m.

◆ getIfDistEmitting()

bool Distribution::getIfDistEmitting ( )

Definition at line 2803 of file Distribution.cpp.

References emitting_m.

◆ getLastEmittedEnergyBin()

int Distribution::getLastEmittedEnergyBin ( )

Definition at line 2807 of file Distribution.cpp.

References currentEnergyBin_m.

◆ getMaxTOrZ()

double Distribution::getMaxTOrZ ( )

Definition at line 2811 of file Distribution.cpp.

References reduce(), and tOrZDist_m.

Referenced by createOpalT().

Here is the call graph for this function:

◆ getMinTOrZ()

double Distribution::getMinTOrZ ( )

Definition at line 2824 of file Distribution.cpp.

References reduce(), and tOrZDist_m.

Referenced by createOpalT().

Here is the call graph for this function:

◆ getNumberOfEmissionSteps()

size_t Distribution::getNumberOfEmissionSteps ( )

Definition at line 2837 of file Distribution.cpp.

References numberOfEnergyBins_m, and numberOfSampleBins_m.

◆ getNumberOfEnergyBins()

int Distribution::getNumberOfEnergyBins ( )

Definition at line 2841 of file Distribution.cpp.

References numberOfEnergyBins_m.

◆ getNumberOfParticlesInFile()

size_t Distribution::getNumberOfParticlesInFile ( std::ifstream & inputFile)
private

Definition at line 1004 of file Distribution.cpp.

References Attrib::Distribution::FNAME, Attributes::getString(), Object::itsAttr, IpplInfo::myNode(), and reduce().

Referenced by calcPartPerDist(), and createDistributionFromFile().

Here is the call graph for this function:

◆ getNumOfLocalParticlesToCreate()

size_t Distribution::getNumOfLocalParticlesToCreate ( size_t n)

Calculate the local number of particles evenly and adjust node 0 such that n is matched exactly.

Parameters
ntotal number of particles
Returns
n / #cores
Parameters

Definition at line 227 of file Distribution.cpp.

References IpplInfo::getNodes(), and IpplInfo::myNode().

Referenced by create().

Here is the call graph for this function:

◆ getOpalName()

const std::string & Object::getOpalName ( ) const
inherited

Return object name.

Definition at line 310 of file Object.cpp.

References itsName.

Referenced by Macro::clone(), OpalOffset::OpalLocalCartesianOffset::clone(), OpalVariableRFCavity::clone(), OpalVariableRFCavityFringeField::clone(), OpalData::create(), OpalData::define(), Sequence::findDriftLength(), ValueDefinition::getBool(), ValueDefinition::getBoolComponent(), ValueDefinition::getReal(), ValueDefinition::getRealComponent(), ValueDefinition::getString(), ValueDefinition::getStringComponent(), ParticleMatterInteraction::initParticleMatterInteractionHandler(), OpalWake::initWakefunction(), List::list(), LineTemplate::makeInstance(), makeInstance(), SequenceTemplate::makeInstance(), parse(), SequenceParser::parsePosition(), Beam::print(), BoolConstant::print(), Line::print(), print(), OpalElement::print(), OpalFilter::print(), OpalTrimCoil::print(), OpalWake::print(), ParticleMatterInteraction::print(), RealConstant::print(), RealVariable::print(), RealVector::print(), Sequence::print(), StringConstant::print(), BoundaryGeometry::printInfo(), FieldSolver::printInfo(), registerOwnership(), OpalElement::registerOwnership(), Line::replace(), Sequence::replace(), OpalScalingFFAMagnet::setupDefaultEndField(), Beam::update(), BoundaryGeometry::update(), OpalAsymmetricEnge::update(), OpalCavity::update(), OpalDrift::update(), OpalECollimator::update(), OpalEnge::update(), OpalFilter::update(), OpalFlexibleCollimator::update(), OpalOffset::OpalGlobalCartesianOffset::update(), OpalOffset::OpalGlobalCylindricalOffset::update(), OpalOffset::OpalLocalCartesianOffset::update(), OpalOffset::OpalLocalCylindricalOffset::update(), OpalPepperPot::update(), OpalPolynomialTimeDependence::update(), OpalProbe::update(), OpalRBend3D::update(), OpalRBend::update(), OpalRCollimator::update(), OpalSBend::update(), OpalSeptum::update(), OpalSinusoidalTimeDependence::update(), OpalSlit::update(), OpalSplineTimeDependence::update(), OpalTravelingWave::update(), OpalTrimCoil::update(), OpalWake::update(), ParticleMatterInteraction::update(), and Distribution::writeOutFileHeader().

◆ getParent()

Object * Object::getParent ( ) const
inherited

Return parent pointer.

Definition at line 315 of file Object.cpp.

References itsParent, and Object().

Referenced by OpalData::erase(), print(), OpalElement::print(), registerOwnership(), and OpalElement::registerOwnership().

Here is the call graph for this function:

◆ getPercentageEmitted()

double Distribution::getPercentageEmitted ( ) const
inline

Definition at line 511 of file Distribution.h.

References totalNumberEmittedParticles_m, and totalNumberParticles_m.

◆ getTEmission()

double Distribution::getTEmission ( )

Definition at line 502 of file Distribution.cpp.

References a, ASTRAFLATTOPTH, Attrib::Legacy::Distribution::CUTOFF, cutoff_m, distrTypeT_m, Attributes::getReal(), GUNGAUSSFLATTOPTH, Object::itsAttr, setDistType(), sigmaFall_m, sigmaRise_m, tEmission_m, Attrib::Distribution::TFALL, tFall_m, Attrib::Distribution::TPULSEFWHM, tPulseLengthFWHM_m, Attrib::Distribution::TRISE, and tRise_m.

Here is the call graph for this function:

◆ getTOrZDist()

std::vector< double > & Distribution::getTOrZDist ( )
private

Definition at line 2873 of file Distribution.cpp.

References tOrZDist_m.

◆ getType()

DistributionType Distribution::getType ( ) const
inline

Definition at line 506 of file Distribution.h.

References distrTypeT_m.

◆ getTypeofDistribution()

std::string Distribution::getTypeofDistribution ( )
inline

Definition at line 516 of file Distribution.h.

References distT_m.

◆ getWeight()

double Distribution::getWeight ( )

Definition at line 2853 of file Distribution.cpp.

References Attributes::getReal(), Object::itsAttr, and Attrib::Distribution::WEIGHT.

Referenced by calcPartPerDist().

Here is the call graph for this function:

◆ getXDist()

std::vector< double > & Distribution::getXDist ( )
private

Definition at line 2857 of file Distribution.cpp.

References xDist_m.

◆ getYDist()

std::vector< double > & Distribution::getYDist ( )
private

Definition at line 2865 of file Distribution.cpp.

References yDist_m.

◆ increment()

int Object::increment ( )
inherited

Increment and return the occurrence counter.

Definition at line 346 of file Object.cpp.

References occurrence.

Referenced by Line::parse(), and Sequence::storeLine().

◆ initializeBeam()

void Distribution::initializeBeam ( PartBunchBase< double, 3 > * beam)
private

Definition at line 2725 of file Distribution.cpp.

References numberOfEnergyBins_m, PartBunchBase< T, Dim >::setEnergyBins(), PartBunchBase< T, Dim >::setNumBunch(), PartBunchBase< T, Dim >::setTEmission(), and tEmission_m.

Referenced by createOpalCycl(), and createOpalT().

Here is the call graph for this function:

◆ injectBeam()

◆ isBuiltin()

bool Object::isBuiltin ( ) const
inherited

True, if [b]this[/b] is a built-in object.

Definition at line 268 of file Object.cpp.

References builtin.

Referenced by OpalData::define(), and OpalData::getVariableNames().

◆ isDirty()

bool Object::isDirty ( ) const
inherited

True, if the [b]modified[/b] flag is set.

Definition at line 289 of file Object.cpp.

References modified.

◆ isFlagged()

bool Object::isFlagged ( ) const
inherited

True, if [b]this[/b] is flagged by setFlag(true).

Definition at line 299 of file Object.cpp.

References flagged.

◆ isShared()

bool Object::isShared ( ) const
virtualinherited

Shared flag.

Definition at line 273 of file Object.cpp.

References sharedFlag.

Referenced by Sequence::print().

◆ isTreeMember()

bool Object::isTreeMember ( const Object * subTree) const
inherited

Test for tree membership.

Definition at line 320 of file Object.cpp.

References Object().

Referenced by Selector::handleElement(), and OpalParser::parseAssign().

Here is the call graph for this function:

◆ makeInstance()

Object * Object::makeInstance ( const std::string & name,
Statement & ,
const Parser *  )
virtualinherited

Macro handler function.

Reimplemented in LineTemplate, MacroCmd, and SequenceTemplate.

Definition at line 91 of file Object.cpp.

References getOpalName(), and Object().

Referenced by OpalParser::parseDefine(), Line::parseList(), OpalParser::parseMacro(), and SequenceParser::parseMember().

Here is the call graph for this function:

◆ makeTemplate()

Object * Object::makeTemplate ( const std::string & name,
TokenStream & ,
Statement &  )
virtualinherited

Macro handler function.

Reimplemented in Line, LineTemplate, MacroCmd, Sequence, and SequenceTemplate.

Definition at line 84 of file Object.cpp.

References name, and Object().

Referenced by OpalParser::parseMacro().

Here is the call graph for this function:

◆ occurrenceCount()

int Object::occurrenceCount ( )
inherited

Return the occurrence counter.

Definition at line 351 of file Object.cpp.

References occurrence.

◆ operator=()

void Distribution::operator= ( const Distribution & )
privatedelete

References Distribution().

Here is the call graph for this function:

◆ parse()

void Object::parse ( Statement & stat)
virtualinherited

Parse the object.

Reimplemented in Call, Echo, Help, Line, OpalElement, PSystem, Sequence, System, Title, and Value.

Definition at line 97 of file Object.cpp.

References Statement::delimiter(), findAttribute(), getOpalName(), name, Expressions::parseDelimiter(), Expressions::parseRealConst(), and Expressions::parseString().

Referenced by Sequence::parse(), OpalParser::parseAction(), OpalParser::parseDefine(), and SequenceTemplate::parseTemplate().

Here is the call graph for this function:

◆ parseShortcut()

void Object::parseShortcut ( Statement & stat,
bool eval = true )
virtualinherited

Parser for single-attribute commands.

Definition at line 129 of file Object.cpp.

References Statement::delimiter(), findAttribute(), Statement::mark(), name, and Statement::word().

Referenced by Call::parse(), Echo::parse(), Help::parse(), PSystem::parse(), System::parse(), Title::parse(), and Value::parse().

Here is the call graph for this function:

◆ print()

◆ printDist()

void Distribution::printDist ( Inform & os,
size_t numberOfParticles ) const
private

Definition at line 2881 of file Distribution.cpp.

References ASTRAFLATTOPTH, BINOMIAL, Options::cZero, distrTypeT_m, endl(), EVOVERC, FLATTOP, FROMFILE, GAUSS, GUNGAUSSFLATTOPTH, inputMoUnits_m, MATCHEDGAUSS, MULTIGAUSS, NONE, printDistBinomial(), printDistFlattop(), printDistFromFile(), printDistGauss(), printDistMatchedGauss(), printDistMultiGauss(), and reduce().

Referenced by printInfo().

Here is the call graph for this function:

◆ printDistBinomial()

void Distribution::printDistBinomial ( Inform & os) const
private

Definition at line 2934 of file Distribution.cpp.

References correlationMatrix_m, emitting_m, endl(), mBinomial_m, sigmaP_m, and sigmaR_m.

Referenced by printDist().

Here is the call graph for this function:

◆ printDistFlattop()

void Distribution::printDistFlattop ( Inform & os) const
private

Definition at line 2962 of file Distribution.cpp.

References ASTRAFLATTOPTH, cutoffR_m, distrTypeT_m, emitting_m, endl(), Attrib::Distribution::FTOSCAMPLITUDE, Attrib::Distribution::FTOSCPERIODS, Attributes::getReal(), GUNGAUSSFLATTOPTH, Object::itsAttr, laserImageName_m, laserIntensityCut_m, laserProfile_m, laserProfileFileName_m, sigmaR_m, sigmaTFall_m, sigmaTRise_m, tPulseLengthFWHM_m, and tRise_m.

Referenced by printDist().

Here is the call graph for this function:

◆ printDistFromFile()

void Distribution::printDistFromFile ( Inform & os) const
private

Definition at line 3057 of file Distribution.cpp.

References endl(), Attrib::Distribution::FNAME, Attributes::getString(), and Object::itsAttr.

Referenced by printDist().

Here is the call graph for this function:

◆ printDistGauss()

void Distribution::printDistGauss ( Inform & os) const
private

Definition at line 3090 of file Distribution.cpp.

References avrgpz_m, correlationMatrix_m, cutoffP_m, cutoffR_m, emitting_m, endl(), Attrib::Distribution::FTOSCAMPLITUDE, Attrib::Distribution::FTOSCPERIODS, Attributes::getReal(), Object::itsAttr, sigmaP_m, sigmaR_m, sigmaTFall_m, sigmaTRise_m, and tPulseLengthFWHM_m.

Referenced by printDist().

Here is the call graph for this function:

◆ printDistMatchedGauss()

void Distribution::printDistMatchedGauss ( Inform & os) const
private

Definition at line 3065 of file Distribution.cpp.

References correlationMatrix_m, endl(), sigmaP_m, and sigmaR_m.

Referenced by printDist().

Here is the call graph for this function:

◆ printDistMultiGauss()

void Distribution::printDistMultiGauss ( Inform & os) const
private

Definition at line 3027 of file Distribution.cpp.

References cutoffP_m, cutoffR_m, emitting_m, endl(), nPeaks_m, sepPeaks_m, sigmaP_m, and sigmaR_m.

Referenced by printDist().

Here is the call graph for this function:

◆ printEmissionModel()

void Distribution::printEmissionModel ( Inform & os) const
private

Definition at line 3149 of file Distribution.cpp.

References ASTRA, emissionModel_m, endl(), NONE, NONEQUIL, printEmissionModelAstra(), printEmissionModelNone(), and printEmissionModelNonEquil().

Referenced by printInfo().

Here is the call graph for this function:

◆ printEmissionModelAstra()

void Distribution::printEmissionModelAstra ( Inform & os) const
private

Definition at line 3172 of file Distribution.cpp.

References Attrib::Distribution::EKIN, endl(), Attributes::getReal(), and Object::itsAttr.

Referenced by printEmissionModel().

Here is the call graph for this function:

◆ printEmissionModelNone()

void Distribution::printEmissionModelNone ( Inform & os) const
private

Definition at line 3179 of file Distribution.cpp.

References Attrib::Distribution::EKIN, endl(), Attributes::getReal(), and Object::itsAttr.

Referenced by printEmissionModel().

Here is the call graph for this function:

◆ printEmissionModelNonEquil()

void Distribution::printEmissionModelNonEquil ( Inform & os) const
private

Definition at line 3186 of file Distribution.cpp.

References cathodeFermiEnergy_m, cathodeTemp_m, cathodeWorkFunc_m, endl(), Physics::kB, and laserEnergy_m.

Referenced by printEmissionModel().

Here is the call graph for this function:

◆ printEnergyBins()

void Distribution::printEnergyBins ( Inform & os) const
private

Definition at line 3194 of file Distribution.cpp.

References endl(), energyBinHist_m, numberOfEnergyBins_m, numberOfSampleBins_m, and sum().

Here is the call graph for this function:

◆ printHelp()

void Object::printHelp ( std::ostream & ) const
virtualinherited

Print help.

Definition at line 201 of file Object.cpp.

References endl(), gmsg, itsAttr, itsHelp, and name.

Referenced by Help::execute(), and opalMain().

Here is the call graph for this function:

◆ printInfo()

Inform & Distribution::printInfo ( Inform & os) const

Definition at line 546 of file Distribution.cpp.

References addedDistributions_m, emitting_m, endl(), Attributes::getBool(), OpalData::getInstance(), Object::itsAttr, numberOfEnergyBins_m, numberOfSampleBins_m, outFilename_m, particlesPerDist_m, printDist(), printEmissionModel(), tBin_m, tEmission_m, and Attrib::Distribution::WRITETOFILE.

Referenced by operator<<().

Here is the call graph for this function:

◆ printValue()

void Object::printValue ( std::ostream & os) const
inlinevirtualinherited

Reimplemented in BoolConstant, RealConstant, RealVariable, RealVector, and StringConstant.

Definition at line 280 of file Object.h.

References print().

Here is the call graph for this function:

◆ Rebin()

bool Distribution::Rebin ( )

Definition at line 3210 of file Distribution.cpp.

References emitting_m, and numberOfEnergyBins_m.

◆ reflectDistribution()

void Distribution::reflectDistribution ( size_t & numberOfParticles)
private

Definition at line 3223 of file Distribution.cpp.

References Options::cZero, distrTypeT_m, FROMFILE, IpplInfo::myNode(), pxDist_m, pyDist_m, pzDist_m, reduce(), tOrZDist_m, xDist_m, and yDist_m.

Referenced by create().

Here is the call graph for this function:

◆ registerOwnership()

◆ registerReference()

void Object::registerReference ( Invalidator * a)
inherited

Register a reference to this object.

Definition at line 182 of file Object.cpp.

References references.

◆ removeReference()

int RCObject::removeReference ( ) const
inlineinherited

Decrement the reference count.

Definition at line 88 of file RCObject.h.

References refCount.

◆ replace()

void Object::replace ( Object * oldObject,
Object * newObject )
virtualinherited

Replace references.

Reimplemented in Line, and Sequence.

Definition at line 258 of file Object.cpp.

References Object().

Here is the call graph for this function:

◆ sampleUniformDisk()

void Distribution::sampleUniformDisk ( gsl_qrng * quasiRandGen2D,
double & x1,
double & x2 )
private

Definition at line 1770 of file Distribution.cpp.

References randGen_m.

Referenced by createDistributionMultiGauss(), generateFlattopT(), and generateFlattopZ().

◆ scaleDistCoordinates()

void Distribution::scaleDistCoordinates ( )
private

Definition at line 3252 of file Distribution.cpp.

References emitting_m, Attributes::getReal(), Object::itsAttr, pxDist_m, Attrib::Distribution::PXMULT, pyDist_m, Attrib::Distribution::PYMULT, pzDist_m, Attrib::Distribution::PZMULT, Attrib::Distribution::TMULT, tOrZDist_m, xDist_m, Attrib::Distribution::XMULT, yDist_m, Attrib::Distribution::YMULT, and Attrib::Distribution::ZMULT.

Referenced by create().

Here is the call graph for this function:

◆ selectRandomGenerator()

gsl_qrng * Distribution::selectRandomGenerator ( std::string ,
unsigned int dimension )
private

Select and allocate gsl random number generator.

Definition at line 3274 of file Distribution.cpp.

References endl(), INFOMSG, and Options::rngtype.

Referenced by createDistributionMultiGauss(), generateFlattopT(), generateFlattopZ(), and generateLongFlattopT().

Here is the call graph for this function:

◆ setAttributes()

void Distribution::setAttributes ( )
private

Definition at line 3293 of file Distribution.cpp.

References Attrib::Distribution::CATHTEMP, Attrib::Distribution::CORRT, Attrib::Distribution::CORRX, Attrib::Distribution::CORRY, Attrib::Distribution::CORRZ, Attrib::Legacy::Distribution::CUTOFF, Attrib::Distribution::CUTOFFLONG, Attrib::Distribution::CUTOFFPX, Attrib::Distribution::CUTOFFPY, Attrib::Distribution::CUTOFFPZ, Attrib::Distribution::CUTOFFR, Attrib::Distribution::CUTOFFX, Attrib::Distribution::CUTOFFY, Attrib::Distribution::DENERGY, Attrib::Legacy::Distribution::DISTRIBUTION, Attrib::Distribution::EKIN, Attrib::Distribution::ELASER, Attrib::Distribution::EMISSIONMODEL, Attrib::Distribution::EMISSIONSTEPS, Attrib::Distribution::EMITTED, Attrib::Distribution::ET, Attrib::Distribution::EX, Attrib::Distribution::EY, Attrib::Distribution::FE, Attrib::Distribution::FLIPX, Attrib::Distribution::FLIPY, Attrib::Distribution::FNAME, Attrib::Distribution::FTOSCAMPLITUDE, Attrib::Distribution::FTOSCPERIODS, Attrib::Distribution::ID1, Attrib::Distribution::ID2, Attrib::Distribution::IMAGENAME, Attrib::Distribution::INPUTMOUNITS, Attrib::Distribution::INTENSITYCUT, Object::itsAttr, Attrib::Distribution::LASERPROFFN, Attrib::Distribution::LINE, Attributes::makeBool(), Attributes::makePredefinedString(), Attributes::makeReal(), Attributes::makeRealArray(), Attributes::makeString(), Attrib::Distribution::MAXSTEPSCO, Attrib::Distribution::MAXSTEPSSI, Attrib::Distribution::MT, Attrib::Distribution::MX, Attrib::Distribution::MY, Attrib::Distribution::MZ, Attrib::Distribution::NBIN, Attrib::Distribution::NPEAKS, Attrib::Distribution::NSECTORS, Attrib::Distribution::NSTEPS, Attrib::Distribution::OFFSETP, Attrib::Distribution::OFFSETPX, Attrib::Distribution::OFFSETPY, Attrib::Distribution::OFFSETPZ, Attrib::Distribution::OFFSETT, Attrib::Distribution::OFFSETX, Attrib::Distribution::OFFSETY, Attrib::Distribution::OFFSETZ, Attrib::Distribution::ORDERMAPS, Attrib::Legacy::Distribution::PT, Attrib::Distribution::PXMULT, Attrib::Distribution::PYMULT, Attrib::Distribution::PZMULT, Attrib::Distribution::R, Attrib::Distribution::R51, Attrib::Distribution::R52, Attrib::Distribution::R61, Attrib::Distribution::R62, Object::registerOwnership(), Attrib::Distribution::RESIDUUM, Attrib::Distribution::RGUESS, Attrib::Distribution::ROTATE180, Attrib::Distribution::ROTATE270, Attrib::Distribution::ROTATE90, Attrib::Legacy::Distribution::SBIN, Attrib::Distribution::SCALABLE, Attrib::Distribution::SECTOR, Attrib::Distribution::SEPPEAKS, Attrib::Legacy::Distribution::SIGMAPT, Attrib::Distribution::SIGMAPX, Attrib::Distribution::SIGMAPY, Attrib::Distribution::SIGMAPZ, Attrib::Distribution::SIGMAR, Attrib::Distribution::SIGMAT, Attrib::Distribution::SIGMAX, Attrib::Distribution::SIGMAY, Attrib::Distribution::SIGMAZ, AttributeHandler::STATEMENT, Attrib::Legacy::Distribution::T, Attrib::Distribution::TFALL, Attrib::Distribution::TMULT, Attrib::Distribution::TPULSEFWHM, Attrib::Distribution::TRISE, Attrib::Distribution::TYPE, Attrib::Distribution::W, Attrib::Distribution::WEIGHT, Attrib::Distribution::WRITETOFILE, Attrib::Distribution::XMULT, Attrib::Distribution::YMULT, and Attrib::Distribution::ZMULT.

Referenced by Distribution().

Here is the call graph for this function:

◆ setDirty()

void Object::setDirty ( bool dirty)
inherited

Set/reset the [b]modified[/b] flag.

Definition at line 283 of file Object.cpp.

References modified.

Referenced by OpalData::define(), OpalData::makeDirty(), and RealVariable::RealVariable().

◆ setDistParametersBinomial()

◆ setDistParametersFlattop()

◆ setDistParametersGauss()

◆ setDistParametersMultiGauss()

void Distribution::setDistParametersMultiGauss ( double massIneV)
private

Definition at line 3839 of file Distribution.cpp.

References Attrib::Distribution::CUTOFFLONG, cutoffP_m, Attrib::Distribution::CUTOFFPX, Attrib::Distribution::CUTOFFPY, Attrib::Distribution::CUTOFFPZ, cutoffR_m, emitting_m, Attributes::getReal(), Object::itsAttr, Attrib::Distribution::NPEAKS, nPeaks_m, Attrib::Distribution::SEPPEAKS, sepPeaks_m, setSigmaP_m(), and setSigmaR_m().

Referenced by createDistributionMultiGauss().

Here is the call graph for this function:

◆ setDistToEmitted()

void Distribution::setDistToEmitted ( bool emitted)

Definition at line 3599 of file Distribution.cpp.

References emitting_m.

◆ setDistType()

void Distribution::setDistType ( )

Definition at line 3603 of file Distribution.cpp.

References ASTRAFLATTOPTH, BINOMIAL, Attrib::Legacy::Distribution::DISTRIBUTION, distrTypeT_m, distT_m, FLATTOP, FROMFILE, GAUSS, Attributes::getString(), GUNGAUSSFLATTOPTH, Object::itsAttr, MATCHEDGAUSS, MULTIGAUSS, NODIST, and Attrib::Distribution::TYPE.

Referenced by createOpalCycl(), createOpalT(), and getTEmission().

Here is the call graph for this function:

◆ setEmissionTime()

void Distribution::setEmissionTime ( double & maxT,
double & minT )
private

◆ setFlag()

void Object::setFlag ( bool flag)
inherited

Flag/unflag this object, e. g. to control output of objects for.

Definition at line 294 of file Object.cpp.

References flagged.

◆ setNumberOfDistributions()

void Distribution::setNumberOfDistributions ( unsigned int n)
inline

Definition at line 241 of file Distribution.h.

References numberOfDistributions_m.

Referenced by TrackRun::setDistributionParallelT().

◆ setOpalName()

void Object::setOpalName ( const std::string & name)
inherited

◆ setParent()

void Object::setParent ( Object * parent)
inherited

Set parent object.

Definition at line 336 of file Object.cpp.

References itsParent, and Object().

Referenced by OpalData::erase().

Here is the call graph for this function:

◆ setShared()

void Object::setShared ( bool flag)
virtualinherited

Set/reset shared flag.

Reimplemented in Element.

Definition at line 278 of file Object.cpp.

References sharedFlag.

Referenced by OpalParser::parseDefine(), and Element::setShared().

◆ setSigmaP_m()

void Distribution::setSigmaP_m ( double massIneV)

◆ setSigmaR_m()

void Distribution::setSigmaR_m ( )

Definition at line 3630 of file Distribution.cpp.

References Attributes::getReal(), Object::itsAttr, Attrib::Distribution::SIGMAR, sigmaR_m, Attrib::Distribution::SIGMAT, Attrib::Distribution::SIGMAX, Attrib::Distribution::SIGMAY, and Attrib::Distribution::SIGMAZ.

Referenced by setDistParametersBinomial(), setDistParametersFlattop(), setDistParametersGauss(), and setDistParametersMultiGauss().

Here is the call graph for this function:

◆ setupEmissionModel()

void Distribution::setupEmissionModel ( PartBunchBase< double, 3 > * beam)
private

Definition at line 3958 of file Distribution.cpp.

References ASTRA, ASTRAFLATTOPTH, distrTypeT_m, Attrib::Distribution::EMISSIONMODEL, emissionModel_m, Attributes::getString(), GUNGAUSSFLATTOPTH, Object::itsAttr, NONE, NONEQUIL, setupEmissionModelAstra(), and setupEmissionModelNonEquil().

Referenced by createOpalT().

Here is the call graph for this function:

◆ setupEmissionModelAstra()

void Distribution::setupEmissionModelAstra ( PartBunchBase< double, 3 > * beam)
private

Definition at line 3997 of file Distribution.cpp.

References Attrib::Distribution::EKIN, Util::getBetaGamma(), PartBunchBase< T, Dim >::getM(), Attributes::getReal(), Object::itsAttr, pmean_m, and pTotThermal_m.

Referenced by setupEmissionModel().

Here is the call graph for this function:

◆ setupEmissionModelNone()

void Distribution::setupEmissionModelNone ( PartBunchBase< double, 3 > * beam)
private

Definition at line 4004 of file Distribution.cpp.

References Attrib::Distribution::EKIN, Util::getBetaGamma(), PartBunchBase< T, Dim >::getM(), Attributes::getReal(), Object::itsAttr, pmean_m, pTotThermal_m, pzDist_m, and reduce().

Referenced by createOpalT().

Here is the call graph for this function:

◆ setupEmissionModelNonEquil()

void Distribution::setupEmissionModelNonEquil ( )
private

Definition at line 4017 of file Distribution.cpp.

References cathodeFermiEnergy_m, cathodeTemp_m, cathodeWorkFunc_m, Attrib::Distribution::CATHTEMP, Attrib::Distribution::ELASER, emitEnergyUpperLimit_m, Attrib::Distribution::FE, Attributes::getReal(), Units::GeV2eV, Object::itsAttr, Physics::kB, laserEnergy_m, Physics::m_e, pmean_m, and Attrib::Distribution::W.

Referenced by setupEmissionModel().

Here is the call graph for this function:

◆ setupEnergyBins()

void Distribution::setupEnergyBins ( double maxTOrZ,
double minTOrZ )
private

◆ setupParticleBins()

void Distribution::setupParticleBins ( double massIneV,
PartBunchBase< double, 3 > * beam )
private

Definition at line 4046 of file Distribution.cpp.

References energyBins_m, PartBunchBase< T, Dim >::getM(), PartBunchBase< T, Dim >::getP(), Attributes::getReal(), Object::itsAttr, Attrib::Distribution::NBIN, numberOfEnergyBins_m, Attrib::Legacy::Distribution::PT, and Attrib::Legacy::Distribution::SBIN.

Referenced by createOpalCycl().

Here is the call graph for this function:

◆ shiftBeam()

void Distribution::shiftBeam ( double & maxTOrZ,
double & minTOrZ )

Definition at line 4071 of file Distribution.cpp.

References addedDistributions_m, ASTRAFLATTOPTH, distrTypeT_m, emitting_m, FLATTOP, FROMFILE, GAUSS, GUNGAUSSFLATTOPTH, reduce(), tEmission_m, and tOrZDist_m.

Referenced by createOpalT().

Here is the call graph for this function:

◆ shiftDistCoordinates()

◆ shouldTrace()

bool Definition::shouldTrace ( ) const
virtualinherited

Trace flag.

Implements Object.

Definition at line 34 of file Definition.cpp.

◆ shouldUpdate()

bool Definition::shouldUpdate ( ) const
virtualinherited

Update flag.

Implements Object.

Definition at line 39 of file Definition.cpp.

◆ unregisterReference()

void Object::unregisterReference ( Invalidator * a)
inherited

Unegister a reference to this object.

Definition at line 187 of file Object.cpp.

References references.

◆ update()

void Distribution::update ( )
virtual

Update this object.

Reimplemented from Object.

Definition at line 252 of file Distribution.cpp.

◆ writeOutFileEmission()

void Distribution::writeOutFileEmission ( )
private

Definition at line 4235 of file Distribution.cpp.

References binWrite_m, IpplInfo::Comm, Communicate::COMM_ANY_NODE, endl(), ERRORMSG, Attributes::getBool(), IpplInfo::getComm(), IpplInfo::getNodes(), IPPL_APP_CYCLE, IPPL_APP_TAG2, Object::itsAttr, level1(), IpplInfo::myNode(), outFilename_m, pxWrite_m, pyWrite_m, pzWrite_m, tOrZWrite_m, Attrib::Distribution::WRITETOFILE, xWrite_m, and yWrite_m.

Referenced by emitParticles().

Here is the call graph for this function:

◆ writeOutFileHeader()

void Distribution::writeOutFileHeader ( )
private

Definition at line 4180 of file Distribution.cpp.

References Util::combineFilePath(), emitting_m, endl(), OpalData::getAuxiliaryOutputDirectory(), Attributes::getBool(), OpalData::getInputBasename(), OpalData::getInstance(), Object::getOpalName(), gmsg, Object::itsAttr, IpplInfo::myNode(), numberOfEnergyBins_m, outFilename_m, reduce(), tOrZDist_m, and Attrib::Distribution::WRITETOFILE.

Referenced by createOpalCycl(), and createOpalT().

Here is the call graph for this function:

◆ writeOutFileInjection()

void Distribution::writeOutFileInjection ( )
private

Definition at line 4359 of file Distribution.cpp.

References endl(), findEBin(), Attributes::getBool(), IpplInfo::getNodes(), gmsg, Object::itsAttr, IpplInfo::myNode(), numberOfEnergyBins_m, outFilename_m, pxDist_m, pyDist_m, pzDist_m, reduce(), tOrZDist_m, Attrib::Distribution::WRITETOFILE, xDist_m, and yDist_m.

Referenced by injectBeam().

Here is the call graph for this function:

Member Data Documentation

◆ addedDistributions_m

std::vector<Distribution *> Distribution::addedDistributions_m
private

Vector of distributions to be added to this distribution.

Reference data for particle type (charge, mass etc.)

Definition at line 398 of file Distribution.h.

Referenced by addDistributions(), calcPartPerDist(), createOpalT(), createOpalT(), Distribution(), printInfo(), setEmissionTime(), shiftBeam(), and shiftDistCoordinates().

◆ additionalRNs_m

std::vector<std::vector<double> > Distribution::additionalRNs_m
private

Upper limit on emission energy distribution (eV).

Definition at line 435 of file Distribution.h.

Referenced by create(), createOpalT(), and emitParticles().

◆ avrgpz_m

◆ binWrite_m

std::vector<size_t> Distribution::binWrite_m
private

Definition at line 455 of file Distribution.h.

Referenced by emitParticles(), and writeOutFileEmission().

◆ builtin

◆ cathodeFermiEnergy_m

double Distribution::cathodeFermiEnergy_m
private

◆ cathodeTemp_m

double Distribution::cathodeTemp_m
private

Cathode material Fermi energy (eV).

Definition at line 432 of file Distribution.h.

Referenced by applyEmissModelNonEquil(), Distribution(), Distribution(), printEmissionModelNonEquil(), and setupEmissionModelNonEquil().

◆ cathodeWorkFunc_m

double Distribution::cathodeWorkFunc_m
private

◆ correlationMatrix_m

◆ currentEmissionTime_m

double Distribution::currentEmissionTime_m
private

Definition at line 411 of file Distribution.h.

Referenced by Distribution(), Distribution(), and emitParticles().

◆ currentEnergyBin_m

int Distribution::currentEnergyBin_m
private

◆ currentSampleBin_m

int Distribution::currentSampleBin_m
private

Definition at line 413 of file Distribution.h.

Referenced by checkEmissionParameters(), Distribution(), Distribution(), and emitParticles().

◆ cutoff_m

double Distribution::cutoff_m
private

Definition at line 491 of file Distribution.h.

Referenced by Distribution(), and getTEmission().

◆ cutoffP_m

◆ cutoffR_m

◆ distrTypeT_m

◆ distT_m

std::string Distribution::distT_m
private

Definition at line 386 of file Distribution.h.

Referenced by Distribution(), getTypeofDistribution(), and setDistType().

◆ E_m

double Distribution::E_m
private

◆ emissionModel_m

EmissionModel Distribution::emissionModel_m
private

◆ emitEnergyUpperLimit_m

double Distribution::emitEnergyUpperLimit_m
private

Cathode temperature (K).

Definition at line 433 of file Distribution.h.

Referenced by applyEmissModelNonEquil(), Distribution(), Distribution(), and setupEmissionModelNonEquil().

◆ emitting_m

◆ energyBinHist_m

gsl_histogram* Distribution::energyBinHist_m
private

◆ energyBins_m

PartBins* Distribution::energyBins_m
private

Number of samples to use per energy bin when emitting beam.

Definition at line 418 of file Distribution.h.

Referenced by createOpalCycl(), Distribution(), Distribution(), doRestartOpalCycl(), fillParticleBins(), setupParticleBins(), and ~Distribution().

◆ flagged

bool Object::flagged
protectedinherited

Object flag.

Definition at line 242 of file Object.h.

Referenced by isFlagged(), Object(), Object(), and setFlag().

◆ I_m

double Distribution::I_m
private

◆ inputMoUnits_m

◆ itsAttr

std::vector<Attribute> Object::itsAttr
inherited

The object attributes.

Definition at line 216 of file Object.h.

Referenced by Distribution::adjustPhaseSpace(), Beam::Beam(), BoolConstant::BoolConstant(), BoundaryGeometry::BoundaryGeometry(), BoundaryGeometry::BoundaryGeometry(), DumpEMFields::buildGrid(), DumpFields::buildGrid(), Distribution::calcPartPerDist(), Call::Call(), Distribution::checkEmissionParameters(), Distribution::checkIfEmitted(), Distribution::chooseInputMomentumUnits(), Constraint::Constraint(), copyAttributes(), Distribution::create(), Distribution::createDistributionFromFile(), Distribution::createDistributionMultiGauss(), Distribution::createMatchedGaussDistribution(), Distribution::createOpalT(), DumpEMFields::DumpEMFields(), DumpFields::DumpFields(), DVar::DVar(), Echo::Echo(), Beam::execute(), Call::execute(), Echo::execute(), Help::execute(), List::execute(), OptimizeCmd::execute(), Option::execute(), PSystem::execute(), SampleCmd::execute(), Select::execute(), System::execute(), Title::execute(), TrackCmd::execute(), TrackRun::execute(), Value::execute(), FieldSolver::FieldSolver(), findAttribute(), findAttribute(), Distribution::generateAstraFlattopT(), Distribution::generateBinomial(), Distribution::generateFlattopLaserProfile(), Distribution::generateFlattopT(), Distribution::generateFlattopZ(), Distribution::generateGaussZ(), Distribution::generateLongFlattopT(), Distribution::generateMatchedGauss(), Distribution::generateTransverseGauss(), BoundaryGeometry::getA(), OpalElement::getApert(), BoundaryGeometry::getB(), BoolConstant::getBool(), BoundaryGeometry::getC(), Beam::getCharge(), Beam::getCurrent(), TrackCmd::getDT(), TrackCmd::getDTAU(), TrackCmd::getDTSCINIT(), Distribution::getEmissionTimeShift(), Constraint::getExpression(), Objective::getExpression(), BoundaryGeometry::getFilename(), Beam::getFrequency(), ParticleMatterInteraction::getInteractionType(), BoundaryGeometry::getL1(), BoundaryGeometry::getL2(), BoundaryGeometry::getLength(), Line::getLength(), OpalElement::getLength(), Sequence::getLength(), DVar::getLowerBound(), Beam::getMass(), TrackCmd::getMaxSteps(), FieldSolver::getMT(), FieldSolver::getMX(), FieldSolver::getMY(), OpalWake::getNumberOfBins(), Beam::getNumberOfParticles(), Distribution::getNumberOfParticlesInFile(), Beam::getParticleName(), RealConstant::getReal(), RealVariable::getReal(), RealVector::getRealComponent(), Sequence::getReference(), BoundaryGeometry::getS(), TrackCmd::getStepsPerTurn(), StringConstant::getString(), TrackCmd::getT0(), FieldSolver::getTagging_m(), Distribution::getTEmission(), TrackCmd::getTimeIntegrator(), BoundaryGeometry::getTopology(), OpalTrimCoil::getTrimCoilType(), FieldSolver::getType(), DVar::getUpperBound(), DVar::getVariable(), OpalSample::getVariable(), Distribution::getWeight(), TrackCmd::getZStart(), TrackCmd::getZStop(), FieldSolver::hasPeriodicZ(), Help::Help(), FieldSolver::initAmrObject_m(), FieldSolver::initAmrSolver_m(), FieldSolver::initCartesianFields(), BoundaryGeometry::initialize(), OpalSample::initialize(), OpalFilter::initOpalFilter(), OpalTrimCoil::initOpalTrimCoil(), ParticleMatterInteraction::initParticleMatterInteractionHandler(), FieldSolver::initSolver(), OpalWake::initWakefunction(), Distribution::injectBeam(), Line::Line(), List::List(), List::list(), Object(), Object(), Objective::Objective(), OpalAsymmetricEnge::OpalAsymmetricEnge(), OpalBend::OpalBend(), OpalCavity::OpalCavity(), OpalCCollimator::OpalCCollimator(), OpalCyclotron::OpalCyclotron(), OpalDegrader::OpalDegrader(), OpalDrift::OpalDrift(), OpalECollimator::OpalECollimator(), OpalElement::OpalElement(), OpalEnge::OpalEnge(), OpalFilter::OpalFilter(), OpalFlexibleCollimator::OpalFlexibleCollimator(), OpalOffset::OpalGlobalCartesianOffset::OpalGlobalCartesianOffset(), OpalOffset::OpalGlobalCylindricalOffset::OpalGlobalCylindricalOffset(), OpalHKicker::OpalHKicker(), OpalKicker::OpalKicker(), OpalOffset::OpalLocalCartesianOffset::OpalLocalCartesianOffset(), OpalOffset::OpalLocalCylindricalOffset::OpalLocalCylindricalOffset(), OpalMultipole::OpalMultipole(), OpalMultipoleT::OpalMultipoleT(), OpalOctupole::OpalOctupole(), OpalOutputPlane::OpalOutputPlane(), OpalPepperPot::OpalPepperPot(), OpalPolynomialTimeDependence::OpalPolynomialTimeDependence(), OpalProbe::OpalProbe(), OpalQuadrupole::OpalQuadrupole(), OpalRBend3D::OpalRBend3D(), OpalRCollimator::OpalRCollimator(), OpalRingDefinition::OpalRingDefinition(), OpalSample::OpalSample(), OpalSBend3D::OpalSBend3D(), OpalScalingFFAMagnet::OpalScalingFFAMagnet(), OpalSeptum::OpalSeptum(), OpalSextupole::OpalSextupole(), OpalSinusoidalTimeDependence::OpalSinusoidalTimeDependence(), OpalSlit::OpalSlit(), OpalSolenoid::OpalSolenoid(), OpalSource::OpalSource(), OpalSplineTimeDependence::OpalSplineTimeDependence(), OpalStripper::OpalStripper(), OpalTravelingWave::OpalTravelingWave(), OpalTrimCoil::OpalTrimCoil(), OpalUndulator::OpalUndulator(), OpalVacuum::OpalVacuum(), OpalVariableRFCavity::OpalVariableRFCavity(), OpalVariableRFCavityFringeField::OpalVariableRFCavityFringeField(), OpalVerticalFFAMagnet::OpalVerticalFFAMagnet(), OpalVKicker::OpalVKicker(), OpalWake::OpalWake(), OptimizeCmd::OptimizeCmd(), Option::Option(), Option::Option(), Line::parse(), Sequence::parse(), DumpEMFields::parseCoordinateSystem(), ParticleMatterInteraction::ParticleMatterInteraction(), Beam::print(), BoolConstant::print(), DumpEMFields::print(), DumpFields::print(), print(), OpalFilter::print(), OpalTrimCoil::print(), OpalWake::print(), ParticleMatterInteraction::print(), RealConstant::print(), RealVariable::print(), RealVector::print(), Sequence::print(), StringConstant::print(), TrackRun::print(), Distribution::printDistFlattop(), Distribution::printDistFromFile(), Distribution::printDistGauss(), Distribution::printEmissionModelAstra(), Distribution::printEmissionModelNone(), printHelp(), BoundaryGeometry::printInfo(), Distribution::printInfo(), FieldSolver::printInfo(), BoolConstant::printValue(), RealConstant::printValue(), RealVariable::printValue(), RealVector::printValue(), StringConstant::printValue(), PSystem::PSystem(), RealConstant::RealConstant(), RealConstant::RealConstant(), RealVariable::RealVariable(), RealVariable::RealVariable(), RealVector::RealVector(), registerOwnership(), OpalElement::registerOwnership(), OptimizeCmd::run(), SampleCmd::SampleCmd(), Distribution::scaleDistCoordinates(), Select::Select(), Select::select(), Sequence::Sequence(), Distribution::setAttributes(), TrackRun::setBoundaryGeometry(), Distribution::setDistParametersBinomial(), Distribution::setDistParametersFlattop(), Distribution::setDistParametersGauss(), Distribution::setDistParametersMultiGauss(), TrackRun::setDistributionParallelT(), Distribution::setDistType(), FieldSolver::setMT(), FieldSolver::setMX(), FieldSolver::setMY(), TrackRun::setRunMethod(), Distribution::setSigmaP_m(), Distribution::setSigmaR_m(), TrackRun::setupCyclotronTracker(), OpalScalingFFAMagnet::setupDefaultEndField(), Distribution::setupEmissionModel(), Distribution::setupEmissionModelAstra(), Distribution::setupEmissionModelNone(), Distribution::setupEmissionModelNonEquil(), TrackRun::setupFieldsolver(), OpalScalingFFAMagnet::setupNamedEndField(), Distribution::setupParticleBins(), TrackRun::setupThickTracker(), TrackRun::setupTTracker(), Distribution::shiftDistCoordinates(), StringConstant::StringConstant(), StringConstant::StringConstant(), System::System(), Title::Title(), TrackCmd::TrackCmd(), TrackRun::TrackRun(), Beam::update(), OpalAsymmetricEnge::update(), OpalCavity::update(), OpalCCollimator::update(), OpalCyclotron::update(), OpalDegrader::update(), OpalDrift::update(), OpalECollimator::update(), OpalElement::update(), OpalEnge::update(), OpalFlexibleCollimator::update(), OpalHKicker::update(), OpalKicker::update(), OpalMonitor::update(), OpalMultipole::update(), OpalMultipoleT::update(), OpalOctupole::update(), OpalOffset::OpalGlobalCartesianOffset::update(), OpalOffset::OpalGlobalCylindricalOffset::update(), OpalOffset::OpalLocalCartesianOffset::update(), OpalOffset::OpalLocalCylindricalOffset::update(), OpalOutputPlane::update(), OpalPepperPot::update(), OpalPolynomialTimeDependence::update(), OpalProbe::update(), OpalQuadrupole::update(), OpalRBend3D::update(), OpalRBend::update(), OpalRCollimator::update(), OpalRingDefinition::update(), OpalSBend3D::update(), OpalSBend::update(), OpalScalingFFAMagnet::update(), OpalSeptum::update(), OpalSextupole::update(), OpalSinusoidalTimeDependence::update(), OpalSlit::update(), OpalSolenoid::update(), OpalSource::update(), OpalSplineTimeDependence::update(), OpalStripper::update(), OpalTravelingWave::update(), OpalUndulator::update(), OpalVacuum::update(), OpalVariableRFCavity::update(), OpalVariableRFCavityFringeField::update(), OpalVerticalFFAMagnet::update(), OpalVKicker::update(), Option::update(), OpalElement::updateUnknown(), Value::Value(), ValueDefinition::value(), ValueDefinition::value(), Distribution::writeOutFileEmission(), Distribution::writeOutFileHeader(), and Distribution::writeOutFileInjection().

◆ itsHelp

std::string Object::itsHelp
privateinherited

Definition at line 258 of file Object.h.

Referenced by Object(), Object(), and printHelp().

◆ itsName

std::string Object::itsName
privateinherited

Definition at line 255 of file Object.h.

Referenced by getOpalName(), Object(), Object(), and setOpalName().

◆ itsParent

Object* Object::itsParent
privateinherited

Definition at line 252 of file Object.h.

Referenced by getBaseObject(), getParent(), Object(), Object(), and setParent().

◆ laserEnergy_m

double Distribution::laserEnergy_m
private

Cathode material work function (eV).

Definition at line 430 of file Distribution.h.

Referenced by applyEmissModelNonEquil(), Distribution(), Distribution(), emitParticles(), printEmissionModelNonEquil(), and setupEmissionModelNonEquil().

◆ laserImageName_m

std::string Distribution::laserImageName_m
private

◆ laserIntensityCut_m

double Distribution::laserIntensityCut_m
private

◆ laserProfile_m

◆ laserProfileFileName_m

std::string Distribution::laserProfileFileName_m
private

◆ mBinomial_m

Vector_t Distribution::mBinomial_m
private

Definition at line 469 of file Distribution.h.

Referenced by generateBinomial(), printDistBinomial(), and setDistParametersBinomial().

◆ modified

bool Object::modified
protectedinherited

Dirty flag.

Definition at line 238 of file Object.h.

Referenced by isDirty(), Object(), Object(), and setDirty().

◆ nPeaks_m

unsigned Distribution::nPeaks_m
private

◆ numberOfDistributions_m

unsigned int Distribution::numberOfDistributions_m
private

◆ numberOfEnergyBins_m

◆ numberOfSampleBins_m

int Distribution::numberOfSampleBins_m
private

Number of energy bins the distribution is broken into. Used for an emitted beam.

Definition at line 416 of file Distribution.h.

Referenced by checkEmissionParameters(), Distribution(), Distribution(), emitParticles(), findEBin(), getEmissionDeltaT(), getNumberOfEmissionSteps(), printEnergyBins(), printInfo(), and setupEnergyBins().

◆ occurrence

int Object::occurrence
privateinherited

Definition at line 261 of file Object.h.

Referenced by clear(), increment(), Object(), Object(), and occurrenceCount().

◆ outFilename_m

std::string Distribution::outFilename_m
private

◆ particleRefData_m

PartData Distribution::particleRefData_m
private

Distribution is an emitted, and is currently emitting, rather than an injected, beam.

Definition at line 394 of file Distribution.h.

Referenced by Distribution().

◆ particlesPerDist_m

std::vector<size_t> Distribution::particlesPerDist_m
private

◆ percentTEmission_m

const double Distribution::percentTEmission_m = 0.0005
staticprivate

Definition at line 406 of file Distribution.h.

Referenced by setEmissionTime().

◆ pmean_m

◆ pTotThermal_m

double Distribution::pTotThermal_m
private

◆ pxDist_m

◆ pxWrite_m

std::vector<double> Distribution::pxWrite_m
private

Definition at line 450 of file Distribution.h.

Referenced by Distribution(), emitParticles(), and writeOutFileEmission().

◆ pyDist_m

◆ pyWrite_m

std::vector<double> Distribution::pyWrite_m
private

Definition at line 452 of file Distribution.h.

Referenced by Distribution(), emitParticles(), and writeOutFileEmission().

◆ pzDist_m

◆ pzWrite_m

std::vector<double> Distribution::pzWrite_m
private

Definition at line 454 of file Distribution.h.

Referenced by Distribution(), emitParticles(), and writeOutFileEmission().

◆ randGen_m

◆ refCount

int RCObject::refCount
mutableprivateinherited

Definition at line 76 of file RCObject.h.

Referenced by addReference(), isShared(), RCObject(), RCObject(), and removeReference().

◆ references

std::set<Invalidator *> Object::references
privateinherited

Definition at line 268 of file Object.h.

Referenced by registerReference(), unregisterReference(), and ~Object().

◆ sepPeaks_m

double Distribution::sepPeaks_m
private

◆ sharedFlag

bool Object::sharedFlag
privateinherited

Definition at line 271 of file Object.h.

Referenced by isShared(), Object(), Object(), and setShared().

◆ sigmaFall_m

double Distribution::sigmaFall_m
private

Definition at line 490 of file Distribution.h.

Referenced by Distribution(), and getTEmission().

◆ sigmaP_m

◆ sigmaR_m

◆ sigmaRise_m

double Distribution::sigmaRise_m
private

Definition at line 489 of file Distribution.h.

Referenced by Distribution(), and getTEmission().

◆ sigmaTFall_m

◆ sigmaTRise_m

◆ tBin_m

double Distribution::tBin_m
private

Increase tEmission_m by twice this percentage to ensure that no particles fall on the leading edge of the first emission time step or the trailing edge of the last emission time step.

Definition at line 410 of file Distribution.h.

Referenced by Distribution(), Distribution(), generateAstraFlattopT(), getEmissionDeltaT(), getEnergyBinDeltaT(), printInfo(), and setEmissionTime().

◆ tEmission_m

double Distribution::tEmission_m
private

◆ tFall_m

double Distribution::tFall_m
private

Definition at line 488 of file Distribution.h.

Referenced by Distribution(), and getTEmission().

◆ timeStamp

double Object::timeStamp
privateinherited

Definition at line 264 of file Object.h.

◆ tOrZDist_m

◆ tOrZWrite_m

std::vector<double> Distribution::tOrZWrite_m
private

Definition at line 453 of file Distribution.h.

Referenced by Distribution(), emitParticles(), and writeOutFileEmission().

◆ totalNumberEmittedParticles_m

size_t Distribution::totalNumberEmittedParticles_m
private

Definition at line 438 of file Distribution.h.

Referenced by Distribution(), Distribution(), emitParticles(), and getPercentageEmitted().

◆ totalNumberParticles_m

size_t Distribution::totalNumberParticles_m
private

◆ tPulseLengthFWHM_m

◆ tRise_m

double Distribution::tRise_m
private

time binned distribution with thermal energy

Definition at line 487 of file Distribution.h.

Referenced by Distribution(), generateAstraFlattopT(), getTEmission(), printDistFlattop(), and setDistParametersFlattop().

◆ xDist_m

◆ xWrite_m

std::vector<double> Distribution::xWrite_m
private

Definition at line 449 of file Distribution.h.

Referenced by Distribution(), emitParticles(), and writeOutFileEmission().

◆ yDist_m

◆ yWrite_m

std::vector<double> Distribution::yWrite_m
private

Definition at line 451 of file Distribution.h.

Referenced by Distribution(), emitParticles(), and writeOutFileEmission().


The documentation for this class was generated from the following files: