OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
Distribution Class Reference

#include <Distribution.h>

Inheritance diagram for Distribution:
Inheritance graph
[legend]
Collaboration diagram for Distribution:
Collaboration graph
[legend]

Classes

class  BinomialBehaviorSplitter
 
class  GaussianLikeBehavior
 
class  MDependentBehavior
 

Public Member Functions

 Distribution ()
 
virtual ~Distribution ()
 
virtual bool canReplaceBy (Object *object)
 Distribution can only be replaced by another distribution. More...
 
virtual Distributionclone (const std::string &name)
 Return a clone. More...
 
virtual void execute ()
 Execute the command. More...
 
virtual void update ()
 Update this object. More...
 
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 ()
 
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)
 
DistrTypeT::DistrTypeT getType () const
 
- Public Member Functions inherited from Definition
virtual ~Definition ()
 
virtual const std::string getCategory () const
 Return the object category as a string. More...
 
virtual bool shouldTrace () const
 Trace flag. More...
 
virtual bool shouldUpdate () const
 Update flag. More...
 
- Public Member Functions inherited from Object
virtual ~Object ()
 
void copyAttributes (const Object &)
 Copy attributes from another object. More...
 
virtual AttributefindAttribute (const std::string &name)
 Find an attribute by name. More...
 
virtual const AttributefindAttribute (const std::string &name) const
 Find an attribute by name. More...
 
virtual ObjectmakeTemplate (const std::string &, TokenStream &, Statement &)
 Macro handler function. More...
 
virtual ObjectmakeInstance (const std::string &name, Statement &, const Parser *)
 Macro handler function. More...
 
virtual void parse (Statement &)
 Parse the object. More...
 
virtual void parseShortcut (Statement &, bool eval=true)
 Parser for single-attribute commands. More...
 
virtual void print (std::ostream &) const
 Print the object. More...
 
virtual void printValue (std::ostream &) const
 
virtual void printHelp (std::ostream &) const
 Print help. More...
 
virtual void replace (Object *oldObject, Object *newObject)
 Replace references. More...
 
bool isBuiltin () const
 True, if [b]this[/b] is a built-in object. More...
 
virtual bool isShared () const
 Shared flag. More...
 
virtual void setShared (bool)
 Set/reset shared flag. More...
 
void setDirty (bool)
 Set/reset the [b]modified[/b] flag. More...
 
bool isDirty () const
 True, if the [b]modified[/b] flag is set. More...
 
void setFlag (bool)
 Flag/unflag this object, e. g. to control output of objects for. More...
 
bool isFlagged () const
 True, if [b]this[/b] is flagged by setFlag(true). More...
 
const ObjectgetBaseObject () const
 Return the object's base type object. More...
 
const std::string & getOpalName () const
 Return object name. More...
 
ObjectgetParent () const
 Return parent pointer. More...
 
bool isTreeMember (const Object *subTree) const
 Test for tree membership. More...
 
void setOpalName (const std::string &name)
 Set object name. More...
 
void setParent (Object *)
 Set parent object. More...
 
void clear ()
 Clear the occurrence counter. More...
 
int increment ()
 Increment and return the occurrence counter. More...
 
int occurrenceCount ()
 Return the occurrence counter. More...
 
void registerReference (Invalidator *a)
 Register a reference to this object. More...
 
void unregisterReference (Invalidator *a)
 Unegister a reference to this object. More...
 
void registerOwnership (const AttributeHandler::OwnerType &itsClass) const
 
- Public Member Functions inherited from RCObject
int addReference () const
 Increment reference count. More...
 
int removeReference () const
 Decrement the reference count. More...
 
bool isShared () const
 Test for sharing. More...
 

Static Public Member Functions

static Distributionfind (const std::string &name)
 

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 chooseInputMomentumUnits (InputMomentumUnitsT::InputMomentumUnitsT 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. More...
 
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
 
DistrTypeT::DistrTypeT distrTypeT_m
 Distribution type. Declared as string. More...
 
unsigned int numberOfDistributions_m
 and list type for switch statements. More...
 
bool emitting_m
 
PartData particleRefData_m
 
std::vector< Distribution * > addedDistributions_m
 Vector of distributions to be added to this distribution. More...
 
std::vector< size_t > particlesPerDist_m
 
EmissionModelT::EmissionModelT emissionModel_m
 Emission Model. More...
 
double tEmission_m
 Emission parameters. More...
 
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. More...
 
gsl_rng * randGen_m
 
double pTotThermal_m
 Random number generator. More...
 
Vector_t pmean_m
 Total thermal momentum. More...
 
double cathodeWorkFunc_m
 
double laserEnergy_m
 Cathode material work function (eV). More...
 
double cathodeFermiEnergy_m
 Laser photon energy (eV). More...
 
double cathodeTemp_m
 Cathode material Fermi energy (eV). More...
 
double emitEnergyUpperLimit_m
 Cathode temperature (K). More...
 
std::vector< std::vector< double > > additionalRNs_m
 Upper limit on emission energy distribution (eV). More...
 
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
 
InputMomentumUnitsT::InputMomentumUnitsT 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
 
SymTenzor< double, 6 > 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 More...
 
double tFall_m
 
double sigmaRise_m
 
double sigmaFall_m
 
double cutoff_m
 

Static Private Attributes

static const double percentTEmission_m = 0.0005
 

Additional Inherited Members

- Public Attributes inherited from Object
std::vector< AttributeitsAttr
 The object attributes. More...
 
- Protected Member Functions inherited from Definition
 Definition (int size, const char *name, const char *help)
 Constructor for exemplars. More...
 
 Definition (const std::string &name, Definition *parent)
 Constructor for clones. More...
 
- Protected Member Functions inherited from Object
 Object (int size, const char *name, const char *help)
 Constructor for exemplars. More...
 
 Object (const std::string &name, Object *parent)
 Constructor for clones. More...
 
- Protected Member Functions inherited from RCObject
 RCObject ()
 Default constructor. More...
 
 RCObject (const RCObject &)
 Copy constructor. More...
 
virtual ~RCObject ()=0
 
RCObjectoperator= (const RCObject &right)
 
- Protected Attributes inherited from Object
bool builtin
 Built-in flag. More...
 
bool modified
 Dirty flag. More...
 
bool flagged
 Object flag. More...
 

Detailed Description

Definition at line 206 of file Distribution.h.

Constructor & Destructor Documentation

◆ Distribution() [1/3]

Distribution::Distribution ( )

Definition at line 82 of file Distribution.cpp.

References Object::builtin, clone(), OpalData::define(), OpalData::getInstance(), randGen_m, and setAttributes().

Referenced by clone().

Here is the call graph for this function:

◆ ~Distribution()

Distribution::~Distribution ( )
virtual

Definition at line 212 of file Distribution.cpp.

References energyBinHist_m, energyBins_m, laserProfile_m, and randGen_m.

◆ Distribution() [2/3]

Distribution::Distribution ( const std::string &  name,
Distribution parent 
)
private
Parameters
name
parent

Definition at line 143 of file Distribution.cpp.

References randGen_m.

◆ Distribution() [3/3]

Distribution::Distribution ( const Distribution )
privatedelete

Member Function Documentation

◆ addDistributions()

void Distribution::addDistributions ( )
private

◆ adjustPhaseSpace()

void Distribution::adjustPhaseSpace ( double  massIneV)
private

◆ applyEmissionModel()

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

◆ applyEmissModelAstra()

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

Definition at line 661 of file Distribution.cpp.

References abs(), acos(), cos(), pTotThermal_m, sin(), sqrt(), and Physics::two_pi.

Referenced by applyEmissionModel().

Here is the call graph for this function:

◆ applyEmissModelNone()

void Distribution::applyEmissModelNone ( double &  pz)
private

Definition at line 672 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 676 of file Distribution.cpp.

References acos(), cathodeFermiEnergy_m, cathodeTemp_m, cos(), emitEnergyUpperLimit_m, exp(), laserEnergy_m, Physics::m_e, pow(), randGen_m, sin(), sqrt(), and Physics::two_pi.

Referenced by applyEmissionModel().

Here is the call graph for this function:

◆ calcPartPerDist()

void Distribution::calcPartPerDist ( size_t  numberOfParticles)
private

◆ canReplaceBy()

bool Distribution::canReplaceBy ( Object object)
virtual

Distribution can only be replaced by another distribution.

Reimplemented from Object.

Definition at line 243 of file Distribution.cpp.

◆ checkEmissionParameters()

void Distribution::checkEmissionParameters ( )
private

◆ checkIfEmitted()

void Distribution::checkIfEmitted ( )
private

Definition at line 827 of file Distribution.cpp.

References DistrTypeT::ASTRAFLATTOPTH, distrTypeT_m, Attrib::Distribution::EMITTED, emitting_m, Attributes::getBool(), DistrTypeT::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 842 of file Distribution.cpp.

References reduce(), and tOrZDist_m.

Referenced by createOpalCycl(), and createOpalT().

Here is the call graph for this function:

◆ chooseInputMomentumUnits()

void Distribution::chooseInputMomentumUnits ( InputMomentumUnitsT::InputMomentumUnitsT  inputMoUnits)
private

◆ clone()

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

Return a clone.

Implements Object.

Definition at line 247 of file Distribution.cpp.

References Distribution(), and name.

Referenced by Distribution().

Here is the call graph for this function:

◆ create()

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

◆ createDistributionBinomial()

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

Definition at line 884 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 890 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

◆ createDistributionGauss()

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

Definition at line 1313 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

◆ createMatchedGaussDistribution()

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

◆ createOpalCycl()

void Distribution::createOpalCycl ( PartBunchBase< double, 3 > *  beam,
size_t  numberOfParticles,
double  current,
const Beamline bl 
)

◆ createOpalT() [1/2]

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

◆ createOpalT() [2/2]

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

Definition at line 1393 of file Distribution.cpp.

References addedDistributions_m.

◆ doRestartOpalCycl()

void Distribution::doRestartOpalCycl ( PartBunchBase< double, 3 > *  p,
size_t  Np,
int  restartStep,
const int  specifiedNumBunch,
H5PartWrapper h5wrapper 
)

◆ doRestartOpalT()

void Distribution::doRestartOpalT ( PartBunchBase< double, 3 > *  p,
size_t  Np,
int  restartStep,
H5PartWrapper h5wrapper 
)

◆ 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 1565 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, max(), numberOfEnergyBins_m, numberOfSampleBins_m, PartBunchBase< T, Dim >::P, Physics::pi, PartBunchBase< T, Dim >::POrigin, pow(), 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, sqrt(), 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 1732 of file Distribution.cpp.

References pxDist_m.

◆ eraseBGyDist()

void Distribution::eraseBGyDist ( )
private

Definition at line 1740 of file Distribution.cpp.

References pyDist_m.

◆ eraseBGzDist()

void Distribution::eraseBGzDist ( )
private

Definition at line 1748 of file Distribution.cpp.

References pzDist_m.

◆ eraseTOrZDist()

void Distribution::eraseTOrZDist ( )
private

Definition at line 1744 of file Distribution.cpp.

References tOrZDist_m.

◆ eraseXDist()

void Distribution::eraseXDist ( )
private

Definition at line 1728 of file Distribution.cpp.

References xDist_m.

◆ eraseYDist()

void Distribution::eraseYDist ( )
private

Definition at line 1736 of file Distribution.cpp.

References yDist_m.

◆ execute()

void Distribution::execute ( )
virtual

Execute the command.

Reimplemented from Object.

Definition at line 251 of file Distribution.cpp.

◆ fillEBinHistogram()

void Distribution::fillEBinHistogram ( )
private

Definition at line 1770 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 1789 of file Distribution.cpp.

References energyBins_m, PartBins::fill(), pxDist_m, pyDist_m, pzDist_m, PartBins::sortArray(), tOrZDist_m, xDist_m, and yDist_m.

Referenced by createOpalCycl().

Here is the call graph for this function:

◆ find()

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

Definition at line 494 of file Distribution.cpp.

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

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

Here is the call graph for this function:

◆ findEBin()

size_t Distribution::findEBin ( double  tOrZ)
private

Definition at line 1810 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

◆ 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 1934 of file Distribution.cpp.

References abs(), Physics::alpha, asin(), atan2(), avrgpz_m, copysign(), correlationMatrix_m, cos(), Attributes::getBool(), IpplInfo::getNodes(), Object::itsAttr, max(), mBinomial_m, IpplInfo::myNode(), PM, pow(), pxDist_m, pyDist_m, pzDist_m, randGen_m, Attrib::Distribution::SCALABLE, sigmaP_m, sigmaR_m, sin(), sqrt(), 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

◆ generateFlattopT()

void Distribution::generateFlattopT ( size_t  numberOfParticles)
private

◆ generateFlattopZ()

void Distribution::generateFlattopZ ( size_t  numberOfParticles)
private

◆ generateGaussZ()

void Distribution::generateGaussZ ( size_t  numberOfParticles)
private

◆ generateLongFlattopT()

void Distribution::generateLongFlattopT ( size_t  numberOfParticles)
private

◆ generateMatchedGauss()

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

◆ generateTransverseGauss()

void Distribution::generateTransverseGauss ( size_t  numberOfParticles)
private

◆ get_pmean()

Vector_t Distribution::get_pmean ( ) const
inline

Definition at line 504 of file Distribution.h.

References pmean_m.

◆ getBGxDist()

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

Definition at line 2843 of file Distribution.cpp.

References pxDist_m.

◆ getBGyDist()

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

Definition at line 2851 of file Distribution.cpp.

References pyDist_m.

◆ getBGzDist()

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

Definition at line 2859 of file Distribution.cpp.

References pzDist_m.

◆ getEmissionDeltaT()

double Distribution::getEmissionDeltaT ( )

Definition at line 2827 of file Distribution.cpp.

References numberOfSampleBins_m, and tBin_m.

◆ getEmissionTimeShift()

double Distribution::getEmissionTimeShift ( ) const

Definition at line 4081 of file Distribution.cpp.

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

Referenced by TrackRun::setDistributionParallelT().

Here is the call graph for this function:

◆ getEnergyBinDeltaT()

double Distribution::getEnergyBinDeltaT ( )

Definition at line 2831 of file Distribution.cpp.

References tBin_m.

◆ getIfDistEmitting()

bool Distribution::getIfDistEmitting ( )

Definition at line 2785 of file Distribution.cpp.

References emitting_m.

◆ getLastEmittedEnergyBin()

int Distribution::getLastEmittedEnergyBin ( )

Definition at line 2789 of file Distribution.cpp.

References currentEnergyBin_m.

◆ getMaxTOrZ()

double Distribution::getMaxTOrZ ( )

Definition at line 2793 of file Distribution.cpp.

References min(), reduce(), and tOrZDist_m.

Referenced by createOpalT().

Here is the call graph for this function:

◆ getMinTOrZ()

double Distribution::getMinTOrZ ( )

Definition at line 2806 of file Distribution.cpp.

References max(), reduce(), and tOrZDist_m.

Referenced by createOpalT().

Here is the call graph for this function:

◆ getNumberOfEmissionSteps()

size_t Distribution::getNumberOfEmissionSteps ( )

Definition at line 2819 of file Distribution.cpp.

References numberOfEnergyBins_m, and numberOfSampleBins_m.

◆ getNumberOfEnergyBins()

int Distribution::getNumberOfEnergyBins ( )

Definition at line 2823 of file Distribution.cpp.

References numberOfEnergyBins_m.

◆ getNumberOfParticlesInFile()

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

Definition at line 980 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 229 of file Distribution.cpp.

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

Referenced by create().

Here is the call graph for this function:

◆ getPercentageEmitted()

double Distribution::getPercentageEmitted ( ) const
inline

Definition at line 514 of file Distribution.h.

References totalNumberEmittedParticles_m, and totalNumberParticles_m.

◆ getTEmission()

double Distribution::getTEmission ( )

◆ getTOrZDist()

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

Definition at line 2855 of file Distribution.cpp.

References tOrZDist_m.

◆ getType()

DistrTypeT::DistrTypeT Distribution::getType ( ) const
inline

Definition at line 509 of file Distribution.h.

References distrTypeT_m.

◆ getTypeofDistribution()

std::string Distribution::getTypeofDistribution ( )
inline

Definition at line 519 of file Distribution.h.

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

Here is the call graph for this function:

◆ getWeight()

double Distribution::getWeight ( )

Definition at line 2835 of file Distribution.cpp.

References abs(), 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 2839 of file Distribution.cpp.

References xDist_m.

◆ getYDist()

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

Definition at line 2847 of file Distribution.cpp.

References yDist_m.

◆ initializeBeam()

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

◆ injectBeam()

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

◆ operator=()

void Distribution::operator= ( const Distribution )
privatedelete

◆ printDist()

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

◆ printDistBinomial()

void Distribution::printDistBinomial ( Inform os) const
private

Definition at line 2903 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

◆ printDistFromFile()

void Distribution::printDistFromFile ( Inform os) const
private

Definition at line 3026 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

◆ printDistMatchedGauss()

void Distribution::printDistMatchedGauss ( Inform os) const
private

Definition at line 3034 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 2996 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

◆ printEmissionModelAstra()

void Distribution::printEmissionModelAstra ( Inform os) const
private

Definition at line 3141 of file Distribution.cpp.

References abs(), 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 3148 of file Distribution.cpp.

References abs(), 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 3155 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 3163 of file Distribution.cpp.

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

Here is the call graph for this function:

◆ printInfo()

Inform & Distribution::printInfo ( Inform os) const

◆ Rebin()

bool Distribution::Rebin ( )

Definition at line 3179 of file Distribution.cpp.

References emitting_m, and numberOfEnergyBins_m.

◆ reflectDistribution()

void Distribution::reflectDistribution ( size_t &  numberOfParticles)
private

Definition at line 3192 of file Distribution.cpp.

References Options::cZero, distrTypeT_m, DistrTypeT::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:

◆ sampleUniformDisk()

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

Definition at line 1752 of file Distribution.cpp.

References pow(), and randGen_m.

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

Here is the call graph for this function:

◆ scaleDistCoordinates()

void Distribution::scaleDistCoordinates ( )
private

◆ selectRandomGenerator()

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

Select and allocate gsl random number generator.

Definition at line 3243 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 3262 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, Physics::e, 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:

◆ setDistParametersBinomial()

void Distribution::setDistParametersBinomial ( double  massIneV)
private

◆ setDistParametersFlattop()

void Distribution::setDistParametersFlattop ( double  massIneV)
private

◆ setDistParametersGauss()

void Distribution::setDistParametersGauss ( double  massIneV)
private

◆ setDistParametersMultiGauss()

void Distribution::setDistParametersMultiGauss ( double  massIneV)
private

◆ setDistToEmitted()

void Distribution::setDistToEmitted ( bool  emitted)

Definition at line 3569 of file Distribution.cpp.

References emitting_m.

◆ setDistType()

void Distribution::setDistType ( )

◆ setEmissionTime()

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

◆ setNumberOfDistributions()

void Distribution::setNumberOfDistributions ( unsigned int  n)
inline

Definition at line 258 of file Distribution.h.

References Hypervolume::n, and numberOfDistributions_m.

Referenced by TrackRun::setDistributionParallelT().

◆ setSigmaP_m()

void Distribution::setSigmaP_m ( double  massIneV)

◆ setSigmaR_m()

void Distribution::setSigmaR_m ( )

◆ setupEmissionModel()

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

◆ setupEmissionModelAstra()

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

Definition at line 3958 of file Distribution.cpp.

References abs(), 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

◆ setupEmissionModelNonEquil()

void Distribution::setupEmissionModelNonEquil ( )
private

◆ setupEnergyBins()

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

◆ setupParticleBins()

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

◆ shiftBeam()

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

◆ shiftDistCoordinates()

void Distribution::shiftDistCoordinates ( double  massIneV)
private

◆ update()

void Distribution::update ( )
virtual

Update this object.

Reimplemented from Object.

Definition at line 254 of file Distribution.cpp.

◆ writeOutFileEmission()

void Distribution::writeOutFileEmission ( )
private

◆ writeOutFileHeader()

void Distribution::writeOutFileHeader ( )
private

◆ writeOutFileInjection()

void Distribution::writeOutFileInjection ( )
private

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 403 of file Distribution.h.

Referenced by addDistributions(), calcPartPerDist(), createOpalT(), 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 440 of file Distribution.h.

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

◆ avrgpz_m

double Distribution::avrgpz_m
private

◆ binWrite_m

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

Definition at line 460 of file Distribution.h.

Referenced by emitParticles(), and writeOutFileEmission().

◆ cathodeFermiEnergy_m

double Distribution::cathodeFermiEnergy_m
private

Laser photon energy (eV).

Definition at line 436 of file Distribution.h.

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

◆ cathodeTemp_m

double Distribution::cathodeTemp_m
private

Cathode material Fermi energy (eV).

Definition at line 437 of file Distribution.h.

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

◆ cathodeWorkFunc_m

double Distribution::cathodeWorkFunc_m
private

◆ correlationMatrix_m

SymTenzor<double, 6> Distribution::correlationMatrix_m
private

◆ currentEmissionTime_m

double Distribution::currentEmissionTime_m
private

Definition at line 416 of file Distribution.h.

Referenced by emitParticles().

◆ currentEnergyBin_m

int Distribution::currentEnergyBin_m
private

Definition at line 417 of file Distribution.h.

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

◆ currentSampleBin_m

int Distribution::currentSampleBin_m
private

Definition at line 418 of file Distribution.h.

Referenced by checkEmissionParameters(), and emitParticles().

◆ cutoff_m

double Distribution::cutoff_m
private

Definition at line 496 of file Distribution.h.

Referenced by getTEmission().

◆ cutoffP_m

Vector_t Distribution::cutoffP_m
private

◆ cutoffR_m

Vector_t Distribution::cutoffR_m
private

◆ distrTypeT_m

DistrTypeT::DistrTypeT Distribution::distrTypeT_m
private

◆ distT_m

std::string Distribution::distT_m
private

Definition at line 391 of file Distribution.h.

Referenced by setDistType().

◆ E_m

double Distribution::E_m
private

◆ emissionModel_m

EmissionModelT::EmissionModelT Distribution::emissionModel_m
private

Emission Model.

Definition at line 407 of file Distribution.h.

Referenced by applyEmissionModel(), create(), createOpalT(), printEmissionModel(), and setupEmissionModel().

◆ emitEnergyUpperLimit_m

double Distribution::emitEnergyUpperLimit_m
private

Cathode temperature (K).

Definition at line 438 of file Distribution.h.

Referenced by applyEmissModelNonEquil(), and setupEmissionModelNonEquil().

◆ emitting_m

bool Distribution::emitting_m
private

◆ energyBinHist_m

gsl_histogram* Distribution::energyBinHist_m
private

Distribution energy bins.

Definition at line 424 of file Distribution.h.

Referenced by fillEBinHistogram(), findEBin(), printEnergyBins(), setupEnergyBins(), and ~Distribution().

◆ energyBins_m

PartBins* Distribution::energyBins_m
private

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

Definition at line 423 of file Distribution.h.

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

◆ I_m

double Distribution::I_m
private

Definition at line 488 of file Distribution.h.

Referenced by createMatchedGaussDistribution(), and createOpalCycl().

◆ inputMoUnits_m

InputMomentumUnitsT::InputMomentumUnitsT Distribution::inputMoUnits_m
private

◆ laserEnergy_m

double Distribution::laserEnergy_m
private

Cathode material work function (eV).

Definition at line 435 of file Distribution.h.

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

◆ laserImageName_m

std::string Distribution::laserImageName_m
private

Definition at line 483 of file Distribution.h.

Referenced by printDistFlattop(), and setDistParametersFlattop().

◆ laserIntensityCut_m

double Distribution::laserIntensityCut_m
private

Definition at line 484 of file Distribution.h.

Referenced by printDistFlattop(), and setDistParametersFlattop().

◆ laserProfile_m

LaserProfile* Distribution::laserProfile_m
private

◆ laserProfileFileName_m

std::string Distribution::laserProfileFileName_m
private

Definition at line 482 of file Distribution.h.

Referenced by printDistFlattop(), and setDistParametersFlattop().

◆ mBinomial_m

Vector_t Distribution::mBinomial_m
private

Definition at line 474 of file Distribution.h.

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

◆ nPeaks_m

unsigned Distribution::nPeaks_m
private

◆ numberOfDistributions_m

unsigned int Distribution::numberOfDistributions_m
private

and list type for switch statements.

Definition at line 394 of file Distribution.h.

Referenced by calcPartPerDist(), and setNumberOfDistributions().

◆ numberOfEnergyBins_m

int Distribution::numberOfEnergyBins_m
private

◆ numberOfSampleBins_m

int Distribution::numberOfSampleBins_m
private

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

Definition at line 421 of file Distribution.h.

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

◆ particleRefData_m

PartData Distribution::particleRefData_m
private

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

Definition at line 399 of file Distribution.h.

◆ particlesPerDist_m

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

◆ percentTEmission_m

const double Distribution::percentTEmission_m = 0.0005
staticprivate

Definition at line 411 of file Distribution.h.

Referenced by setEmissionTime().

◆ pmean_m

Vector_t Distribution::pmean_m
private

◆ pTotThermal_m

double Distribution::pTotThermal_m
private

◆ pxDist_m

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

◆ pxWrite_m

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

Definition at line 455 of file Distribution.h.

Referenced by emitParticles(), and writeOutFileEmission().

◆ pyDist_m

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

◆ pyWrite_m

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

Definition at line 457 of file Distribution.h.

Referenced by emitParticles(), and writeOutFileEmission().

◆ pzDist_m

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

◆ pzWrite_m

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

Definition at line 459 of file Distribution.h.

Referenced by emitParticles(), and writeOutFileEmission().

◆ randGen_m

gsl_rng* Distribution::randGen_m
private

◆ sepPeaks_m

double Distribution::sepPeaks_m
private

◆ sigmaFall_m

double Distribution::sigmaFall_m
private

Definition at line 495 of file Distribution.h.

Referenced by getTEmission().

◆ sigmaP_m

Vector_t Distribution::sigmaP_m
private

◆ sigmaR_m

Vector_t Distribution::sigmaR_m
private

◆ sigmaRise_m

double Distribution::sigmaRise_m
private

Definition at line 494 of file Distribution.h.

Referenced by getTEmission().

◆ sigmaTFall_m

double Distribution::sigmaTFall_m
private

◆ sigmaTRise_m

double Distribution::sigmaTRise_m
private

◆ 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 415 of file Distribution.h.

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

◆ tEmission_m

double Distribution::tEmission_m
private

Emission parameters.

Definition at line 410 of file Distribution.h.

Referenced by generateAstraFlattopT(), getTEmission(), initializeBeam(), printInfo(), setEmissionTime(), setupEnergyBins(), and shiftBeam().

◆ tFall_m

double Distribution::tFall_m
private

Definition at line 493 of file Distribution.h.

Referenced by getTEmission().

◆ tOrZDist_m

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

◆ tOrZWrite_m

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

Definition at line 458 of file Distribution.h.

Referenced by emitParticles(), and writeOutFileEmission().

◆ totalNumberEmittedParticles_m

size_t Distribution::totalNumberEmittedParticles_m
private

Definition at line 443 of file Distribution.h.

Referenced by emitParticles(), and getPercentageEmitted().

◆ totalNumberParticles_m

size_t Distribution::totalNumberParticles_m
private

◆ tPulseLengthFWHM_m

double Distribution::tPulseLengthFWHM_m
private

◆ tRise_m

double Distribution::tRise_m
private

time binned distribution with thermal energy

Definition at line 492 of file Distribution.h.

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

◆ xDist_m

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

◆ xWrite_m

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

Definition at line 454 of file Distribution.h.

Referenced by emitParticles(), and writeOutFileEmission().

◆ yDist_m

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

◆ yWrite_m

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

Definition at line 456 of file Distribution.h.

Referenced by emitParticles(), and writeOutFileEmission().


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