OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | 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 createBoundaryGeometry (PartBunchBase< double, 3 > *p, BoundaryGeometry &bg)
 
void createOpalCycl (PartBunchBase< double, 3 > *beam, size_t numberOfParticles, double current, const Beamline &bl)
 
void createOpalE (Beam *beam, std::vector< Distribution * > addedDistributions, EnvelopeBunch *envelopeBunch, double distCenter, double Bz0)
 
void createOpalT (PartBunchBase< double, 3 > *beam, std::vector< Distribution * > addedDistributions, size_t &numberOfParticles)
 
void createOpalT (PartBunchBase< double, 3 > *beam, size_t &numberOfParticles)
 
void createPriPart (PartBunchBase< double, 3 > *beam, BoundaryGeometry &bg)
 
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)
 
void doRestartOpalE (EnvelopeBunch *p, size_t Np, int restartStep, H5PartWrapper *h5wrapper)
 
size_t emitParticles (PartBunchBase< double, 3 > *beam, double eZ)
 
double getPercentageEmitted () const
 
void eraseXDist ()
 
void eraseBGxDist ()
 
void eraseYDist ()
 
void eraseBGyDist ()
 
void eraseTOrZDist ()
 
void eraseBGzDist ()
 
bool getIfDistEmitting ()
 
int getLastEmittedEnergyBin ()
 
double getMaxTOrZ ()
 
double getMinTOrZ ()
 
size_t getNumberOfEmissionSteps ()
 
int getNumberOfEnergyBins ()
 
double getEmissionDeltaT ()
 
double getEnergyBinDeltaT ()
 
double getWeight ()
 
std::vector< double > & getXDist ()
 
std::vector< double > & getBGxDist ()
 
std::vector< double > & getYDist ()
 
std::vector< double > & getBGyDist ()
 
std::vector< double > & getTOrZDist ()
 
std::vector< double > & getBGzDist ()
 
const PartDatagetReference () const
 Return the embedded CLASSIC PartData. More...
 
double getTEmission ()
 
Vector_t get_pmean () const
 
double getEkin () const
 
double getLaserEnergy () const
 
double getWorkFunctionRf () const
 
size_t getNumberOfDarkCurrentParticles ()
 
double getDarkCurrentParticlesInwardMargin ()
 
double getEInitThreshold ()
 
double getWorkFunction ()
 
double getFieldEnhancement ()
 
size_t getMaxFNemissionPartPerTri ()
 
double getFieldFNThreshold ()
 
double getFNParameterA ()
 
double getFNParameterB ()
 
double getFNParameterY ()
 
double getFNParameterVYZero ()
 
double getFNParameterVYSecond ()
 
int getSecondaryEmissionFlag ()
 
bool getEmissionMode ()
 
std::string getTypeofDistribution ()
 
double getvSeyZero ()
 
double getvEZero ()
 
double getvSeyMax ()
 
double getvEmax ()
 
double getvKenergy ()
 
double getvKtheta ()
 
double getvVThermal ()
 
double getVw ()
 
int getSurfMaterial ()
 
InformprintInfo (Inform &os) const
 
bool Rebin ()
 
void setDistToEmitted (bool emitted)
 
void setDistType ()
 
void shiftBeam (double &maxTOrZ, double &minTOrZ)
 
double getEmissionTimeShift () const
 
bool GetPreviousH5Local ()
 
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 &)
 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
 
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)
 
void calcPartPerDist (size_t numberOfParticles)
 
void checkEmissionParameters ()
 
void checkIfEmitted ()
 
void checkParticleNumber (size_t &numberOfParticles)
 
void chooseInputMomentumUnits (InputMomentumUnitsT::InputMomentumUnitsT inputMoUnits)
 
double converteVToBetaGamma (double valueIneV, double massIneV)
 
size_t getNumberOfParticlesInFile (std::ifstream &inputFile)
 
void createDistributionBinomial (size_t numberOfParticles, double massIneV)
 
void createDistributionFlattop (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)
 
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 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 printDistFromFile (Inform &os) const
 
void printDistGauss (Inform &os) const
 
void printDistMatchedGauss (Inform &os) const
 
void printDistSurfEmission (Inform &os) const
 
void printDistSurfAndCreate (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 setDistParametersGauss (double massIneV)
 
void setEmissionTime (double &maxT, double &minT)
 
void setFieldEmissionParameters ()
 
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
 
std::string laserProfileFileName_m
 
std::string laserImageName_m
 
double laserIntensityCut_m
 
LaserProfilelaserProfile_m
 
size_t darkCurrentParts_m
 
double darkInwardMargin_m
 Number of dark current particles. More...
 
double eInitThreshold_m
 
double workFunction_m
 
double fieldEnhancement_m
 Work function of surface material (eV). More...
 
double fieldThrFN_m
 
size_t maxFN_m
 
double paraFNA_m
 
double paraFNB_m
 
double paraFNY_m
 
double paraFNVYSe_m
 
double paraFNVYZe_m
 
int secondaryFlag_m
 
double ppVw_m
 
double vVThermal_m
 Velocity scalar for parallel plate benchmark. More...
 
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
 
bool previousH5Local_m
 

Additional Inherited Members

- Public Attributes inherited from Object
std::vector< AttributeitsAttr
 The object attributes (see Attribute.hh). 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 240 of file Distribution.h.

Constructor & Destructor Documentation

Distribution::Distribution ( )

Definition at line 74 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 ( )
virtual

Definition at line 232 of file Distribution.cpp.

References energyBinHist_m, energyBins_m, laserProfile_m, and randGen_m.

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

Definition at line 150 of file Distribution.cpp.

References randGen_m.

Distribution::Distribution ( const Distribution )
privatedelete

Member Function Documentation

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

Definition at line 823 of file Distribution.cpp.

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

Referenced by applyEmissionModel().

Here is the call graph for this function:

void Distribution::applyEmissModelNone ( double &  pz)
private

Definition at line 834 of file Distribution.cpp.

References pTotThermal_m.

Referenced by applyEmissionModel().

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

Definition at line 838 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:

void Distribution::calcPartPerDist ( size_t  numberOfParticles)
private
bool Distribution::canReplaceBy ( Object object)
virtual

Distribution can only be replaced by another distribution.

Reimplemented from Object.

Definition at line 273 of file Distribution.cpp.

void Distribution::checkEmissionParameters ( )
private
void Distribution::checkIfEmitted ( )
private
void Distribution::checkParticleNumber ( size_t &  numberOfParticles)
private

Definition at line 1004 of file Distribution.cpp.

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

Referenced by createOpalCycl(), and createOpalT().

Here is the call graph for this function:

void Distribution::chooseInputMomentumUnits ( InputMomentumUnitsT::InputMomentumUnitsT  inputMoUnits)
private
Distribution * Distribution::clone ( const std::string &  name)
virtual

Return a clone.

Implements Object.

Definition at line 277 of file Distribution.cpp.

References Distribution().

Referenced by Distribution().

Here is the call graph for this function:

double Distribution::converteVToBetaGamma ( double  valueIneV,
double  massIneV 
)
private
void Distribution::create ( size_t &  numberOfParticles,
double  massIneV 
)
private
void Distribution::createBoundaryGeometry ( PartBunchBase< double, 3 > *  p,
BoundaryGeometry bg 
)
void Distribution::createDistributionBinomial ( size_t  numberOfParticles,
double  massIneV 
)
private

Definition at line 1050 of file Distribution.cpp.

References generateBinomial(), and setDistParametersBinomial().

Referenced by create().

Here is the call graph for this function:

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

Definition at line 1056 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:

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

Definition at line 1465 of file Distribution.cpp.

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

Referenced by create(), and createMatchedGaussDistribution().

Here is the call graph for this function:

void Distribution::createMatchedGaussDistribution ( size_t  numberOfParticles,
double  massIneV 
)
private
void Distribution::createOpalCycl ( PartBunchBase< double, 3 > *  beam,
size_t  numberOfParticles,
double  current,
const Beamline bl 
)
void Distribution::createOpalE ( Beam beam,
std::vector< Distribution * >  addedDistributions,
EnvelopeBunch envelopeBunch,
double  distCenter,
double  Bz0 
)
void Distribution::createOpalT ( PartBunchBase< double, 3 > *  beam,
std::vector< Distribution * >  addedDistributions,
size_t &  numberOfParticles 
)

Definition at line 1651 of file Distribution.cpp.

References addedDistributions_m.

Referenced by PartBunchBase< T, Dim >::setDistribution().

void Distribution::createOpalT ( PartBunchBase< double, 3 > *  beam,
size_t &  numberOfParticles 
)
void Distribution::createPriPart ( PartBunchBase< double, 3 > *  beam,
BoundaryGeometry bg 
)
void Distribution::doRestartOpalCycl ( PartBunchBase< double, 3 > *  p,
size_t  Np,
int  restartStep,
const int  specifiedNumBunch,
H5PartWrapper h5wrapper 
)
void Distribution::doRestartOpalE ( EnvelopeBunch p,
size_t  Np,
int  restartStep,
H5PartWrapper h5wrapper 
)
void Distribution::doRestartOpalT ( PartBunchBase< double, 3 > *  p,
size_t  Np,
int  restartStep,
H5PartWrapper h5wrapper 
)
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 1823 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 >::getQ(), INFOMSG, PartBunchBase< T, Dim >::iterateEmittedBin(), laserEnergy_m, level3(), max(), numberOfEnergyBins_m, numberOfSampleBins_m, PartBunchBase< T, Dim >::P, Physics::pi, 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(), ParticleType::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:

void Distribution::eraseBGxDist ( )

Definition at line 1988 of file Distribution.cpp.

References pxDist_m.

void Distribution::eraseBGyDist ( )

Definition at line 1996 of file Distribution.cpp.

References pyDist_m.

void Distribution::eraseBGzDist ( )

Definition at line 2004 of file Distribution.cpp.

References pzDist_m.

void Distribution::eraseTOrZDist ( )

Definition at line 2000 of file Distribution.cpp.

References tOrZDist_m.

void Distribution::eraseXDist ( )

Definition at line 1984 of file Distribution.cpp.

References xDist_m.

void Distribution::eraseYDist ( )

Definition at line 1992 of file Distribution.cpp.

References yDist_m.

void Distribution::execute ( )
virtual

Execute the command.

Reimplemented from Object.

Definition at line 281 of file Distribution.cpp.

void Distribution::fillEBinHistogram ( )
private

Definition at line 2008 of file Distribution.cpp.

References energyBinHist_m, reduce(), and tOrZDist_m.

Referenced by createOpalT().

Here is the call graph for this function:

void Distribution::fillParticleBins ( )
private

Definition at line 2027 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:

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

Definition at line 650 of file Distribution.cpp.

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

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

Here is the call graph for this function:

size_t Distribution::findEBin ( double  tOrZ)
private

Definition at line 2048 of file Distribution.cpp.

References energyBinHist_m, numberOfEnergyBins_m, and numberOfSampleBins_m.

Referenced by injectBeam(), and writeOutFileInjection().

void Distribution::generateAstraFlattopT ( size_t  numberOfParticles)
private
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 2172 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(), PX, 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:

void Distribution::generateFlattopLaserProfile ( size_t  numberOfParticles)
private
void Distribution::generateFlattopT ( size_t  numberOfParticles)
private
void Distribution::generateFlattopZ ( size_t  numberOfParticles)
private
void Distribution::generateGaussZ ( size_t  numberOfParticles)
private
void Distribution::generateLongFlattopT ( size_t  numberOfParticles)
private
void Distribution::generateTransverseGauss ( size_t  numberOfParticles)
private
Vector_t Distribution::get_pmean ( ) const
inline

Definition at line 599 of file Distribution.h.

References pmean_m.

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

Definition at line 3014 of file Distribution.cpp.

References pxDist_m.

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

Definition at line 3022 of file Distribution.cpp.

References pyDist_m.

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

Definition at line 3030 of file Distribution.cpp.

References pzDist_m.

double Distribution::getDarkCurrentParticlesInwardMargin ( )
inline

Definition at line 634 of file Distribution.h.

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

Here is the call graph for this function:

double Distribution::getEInitThreshold ( )
inline

Definition at line 639 of file Distribution.h.

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

Here is the call graph for this function:

double Distribution::getEkin ( ) const
inline

Definition at line 614 of file Distribution.h.

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

Here is the call graph for this function:

double Distribution::getEmissionDeltaT ( )

Definition at line 2998 of file Distribution.cpp.

References numberOfSampleBins_m, and tBin_m.

bool Distribution::getEmissionMode ( )
inline

Definition at line 694 of file Distribution.h.

References Attributes::getBool(), Object::itsAttr, and Attrib::Distribution::NEMISSIONMODE.

Here is the call graph for this function:

double Distribution::getEmissionTimeShift ( ) const

Definition at line 4421 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:

double Distribution::getEnergyBinDeltaT ( )

Definition at line 3002 of file Distribution.cpp.

References tBin_m.

double Distribution::getFieldEnhancement ( )
inline

Definition at line 649 of file Distribution.h.

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

Here is the call graph for this function:

double Distribution::getFieldFNThreshold ( )
inline

Definition at line 659 of file Distribution.h.

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

Here is the call graph for this function:

double Distribution::getFNParameterA ( )
inline

Definition at line 664 of file Distribution.h.

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

Here is the call graph for this function:

double Distribution::getFNParameterB ( )
inline

Definition at line 669 of file Distribution.h.

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

Here is the call graph for this function:

double Distribution::getFNParameterVYSecond ( )
inline

Definition at line 684 of file Distribution.h.

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

Here is the call graph for this function:

double Distribution::getFNParameterVYZero ( )
inline

Definition at line 679 of file Distribution.h.

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

Here is the call graph for this function:

double Distribution::getFNParameterY ( )
inline

Definition at line 674 of file Distribution.h.

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

Here is the call graph for this function:

bool Distribution::getIfDistEmitting ( )

Definition at line 2954 of file Distribution.cpp.

References emitting_m.

double Distribution::getLaserEnergy ( ) const
inline

Definition at line 619 of file Distribution.h.

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

Here is the call graph for this function:

int Distribution::getLastEmittedEnergyBin ( )

Definition at line 2958 of file Distribution.cpp.

References currentEnergyBin_m.

size_t Distribution::getMaxFNemissionPartPerTri ( )
inline

Definition at line 654 of file Distribution.h.

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

Here is the call graph for this function:

double Distribution::getMaxTOrZ ( )

Definition at line 2962 of file Distribution.cpp.

References reduce(), and tOrZDist_m.

Referenced by createOpalT().

Here is the call graph for this function:

double Distribution::getMinTOrZ ( )

Definition at line 2976 of file Distribution.cpp.

References reduce(), and tOrZDist_m.

Referenced by createOpalT().

Here is the call graph for this function:

size_t Distribution::getNumberOfDarkCurrentParticles ( )
inline

Definition at line 629 of file Distribution.h.

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

Here is the call graph for this function:

size_t Distribution::getNumberOfEmissionSteps ( )

Definition at line 2990 of file Distribution.cpp.

References numberOfEnergyBins_m, and numberOfSampleBins_m.

int Distribution::getNumberOfEnergyBins ( )

Definition at line 2994 of file Distribution.cpp.

References numberOfEnergyBins_m.

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

Definition at line 1069 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:

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

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

Referenced by create().

Here is the call graph for this function:

double Distribution::getPercentageEmitted ( ) const
inline

Definition at line 609 of file Distribution.h.

References totalNumberEmittedParticles_m, and totalNumberParticles_m.

bool Distribution::GetPreviousH5Local ( )
inline

Definition at line 340 of file Distribution.h.

References previousH5Local_m.

const PartData & Distribution::getReference ( ) const

Return the embedded CLASSIC PartData.

Definition at line 755 of file Distribution.cpp.

References particleRefData_m, and update().

Here is the call graph for this function:

int Distribution::getSecondaryEmissionFlag ( )
inline

Definition at line 689 of file Distribution.h.

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

Here is the call graph for this function:

int Distribution::getSurfMaterial ( )
inline

Definition at line 754 of file Distribution.h.

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

Here is the call graph for this function:

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

Definition at line 3026 of file Distribution.cpp.

References tOrZDist_m.

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

Definition at line 604 of file Distribution.h.

References distrTypeT_m.

std::string Distribution::getTypeofDistribution ( )
inline

Definition at line 699 of file Distribution.h.

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

Here is the call graph for this function:

double Distribution::getvEmax ( )
inline

Definition at line 722 of file Distribution.h.

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

Here is the call graph for this function:

double Distribution::getvEZero ( )
inline

Definition at line 710 of file Distribution.h.

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

Here is the call graph for this function:

double Distribution::getvKenergy ( )
inline

Definition at line 728 of file Distribution.h.

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

Here is the call graph for this function:

double Distribution::getvKtheta ( )
inline

Definition at line 735 of file Distribution.h.

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

Here is the call graph for this function:

double Distribution::getvSeyMax ( )
inline

Definition at line 716 of file Distribution.h.

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

Here is the call graph for this function:

double Distribution::getvSeyZero ( )
inline

Definition at line 704 of file Distribution.h.

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

Here is the call graph for this function:

double Distribution::getvVThermal ( )
inline

Definition at line 742 of file Distribution.h.

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

Referenced by createPriPart().

Here is the call graph for this function:

double Distribution::getVw ( )
inline

Definition at line 748 of file Distribution.h.

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

Referenced by createPriPart().

Here is the call graph for this function:

double Distribution::getWeight ( )

Definition at line 3006 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:

double Distribution::getWorkFunction ( )
inline

Definition at line 644 of file Distribution.h.

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

Here is the call graph for this function:

double Distribution::getWorkFunctionRf ( ) const
inline

Definition at line 624 of file Distribution.h.

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

Here is the call graph for this function:

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

Definition at line 3010 of file Distribution.cpp.

References xDist_m.

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

Definition at line 3018 of file Distribution.cpp.

References yDist_m.

void Distribution::initializeBeam ( PartBunchBase< double, 3 > *  beam)
private
void Distribution::injectBeam ( PartBunchBase< double, 3 > *  beam)
private
void Distribution::operator= ( const Distribution )
privatedelete
void Distribution::printDist ( Inform os,
size_t  numberOfParticles 
) const
private
void Distribution::printDistBinomial ( Inform os) const
private

Definition at line 3077 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:

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

Definition at line 3170 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:

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

Definition at line 3178 of file Distribution.cpp.

References avrgpz_m, correlationMatrix_m, cutoffP_m, cutoffR_m, endl(), sigmaP_m, and sigmaR_m.

Referenced by printDist().

Here is the call graph for this function:

void Distribution::printDistSurfAndCreate ( Inform os) const
private

Definition at line 3323 of file Distribution.cpp.

References Attrib::Distribution::EINITHR, endl(), Attributes::getReal(), Attrib::Distribution::INWARDMARGIN, Object::itsAttr, and Attrib::Distribution::NPDARKCUR.

Referenced by printDist().

Here is the call graph for this function:

void Distribution::printDistSurfEmission ( Inform os) const
private
void Distribution::printEmissionModel ( Inform os) const
private
void Distribution::printEmissionModelAstra ( Inform os) const
private

Definition at line 3359 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:

void Distribution::printEmissionModelNone ( Inform os) const
private

Definition at line 3366 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:

void Distribution::printEmissionModelNonEquil ( Inform os) const
private

Definition at line 3373 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:

void Distribution::printEnergyBins ( Inform os) const
private

Definition at line 3381 of file Distribution.cpp.

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

Here is the call graph for this function:

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

Definition at line 3397 of file Distribution.cpp.

References emitting_m, and numberOfEnergyBins_m.

void Distribution::reflectDistribution ( size_t &  numberOfParticles)
private

Definition at line 3410 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:

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

Select and allocate gsl random number generator.

Definition at line 3461 of file Distribution.cpp.

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

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

Here is the call graph for this function:

void Distribution::setAttributes ( )
private

Definition at line 3480 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::EINITHR, 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::FNA, Attrib::Distribution::FNAME, Attrib::Distribution::FNB, Attrib::Distribution::FNBETA, Attrib::Distribution::FNFIELDTHR, Attrib::Distribution::FNMAXEMI, Attrib::Distribution::FNPHIW, Attrib::Distribution::FNVYSECOND, Attrib::Distribution::FNVYZERO, Attrib::Distribution::FNY, Attrib::Distribution::FTOSCAMPLITUDE, Attrib::Distribution::FTOSCPERIODS, Attrib::Distribution::ID1, Attrib::Distribution::ID2, Attrib::Distribution::IMAGENAME, Attrib::Distribution::INPUTMOUNITS, Attrib::Distribution::INTENSITYCUT, Attrib::Distribution::INWARDMARGIN, Object::itsAttr, Attrib::Distribution::LASERPROFFN, Attrib::Distribution::LINE, Attributes::makeBool(), 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::NEMISSIONMODE, Attrib::Distribution::NPDARKCUR, 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::SECONDARYFLAG, Attrib::Distribution::SECTOR, 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::Distribution::SURFMATERIAL, Attrib::Legacy::Distribution::T, Attrib::Distribution::TFALL, Attrib::Distribution::TMULT, Attrib::Distribution::TPULSEFWHM, Attrib::Distribution::TRISE, Attrib::Distribution::TYPE, Attrib::Distribution::VEMAX, Attrib::Distribution::VEZERO, Attrib::Distribution::VKENERGY, Attrib::Distribution::VKTHETA, Attrib::Distribution::VSEYMAX, Attrib::Distribution::VSEYZERO, Attrib::Distribution::VVTHERMAL, Attrib::Distribution::VW, 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:

void Distribution::setDistParametersBinomial ( double  massIneV)
private
void Distribution::setDistParametersFlattop ( double  massIneV)
private

Definition at line 4046 of file Distribution.cpp.

References abs(), DistrTypeT::ASTRAFLATTOPTH, converteVToBetaGamma(), correlationMatrix_m, Attrib::Distribution::CORRT, Attrib::Distribution::CORRX, Attrib::Distribution::CORRY, Attrib::Distribution::CORRZ, Attrib::Distribution::CUTOFFLONG, cutoffR_m, Attrib::Distribution::CUTOFFX, Attrib::Distribution::CUTOFFY, distrTypeT_m, emitting_m, InputMomentumUnitsT::EV, LaserProfile::FLIPX, Attrib::Distribution::FLIPX, LaserProfile::FLIPY, Attrib::Distribution::FLIPY, Attributes::getBool(), Attributes::getReal(), Attributes::getString(), Attrib::Distribution::IMAGENAME, inputMoUnits_m, Attrib::Distribution::INTENSITYCUT, Object::itsAttr, laserImageName_m, laserIntensityCut_m, Attrib::Distribution::LASERPROFFN, laserProfile_m, laserProfileFileName_m, log(), LaserProfile::ROTATE180, Attrib::Distribution::ROTATE180, LaserProfile::ROTATE270, Attrib::Distribution::ROTATE270, LaserProfile::ROTATE90, Attrib::Distribution::ROTATE90, sigmaP_m, Attrib::Distribution::SIGMAPX, Attrib::Distribution::SIGMAPY, Attrib::Distribution::SIGMAPZ, Attrib::Distribution::SIGMAR, sigmaR_m, Attrib::Distribution::SIGMAT, sigmaTFall_m, sigmaTRise_m, Attrib::Distribution::SIGMAX, Attrib::Distribution::SIGMAY, Attrib::Distribution::SIGMAZ, sqrt(), Attrib::Distribution::TFALL, Attrib::Distribution::TPULSEFWHM, tPulseLengthFWHM_m, Attrib::Distribution::TRISE, and tRise_m.

Referenced by createDistributionFlattop(), and createOpalE().

Here is the call graph for this function:

void Distribution::setDistParametersGauss ( double  massIneV)
private
void Distribution::setDistToEmitted ( bool  emitted)

Definition at line 3877 of file Distribution.cpp.

References emitting_m.

void Distribution::setDistType ( )
void Distribution::setEmissionTime ( double &  maxT,
double &  minT 
)
private
void Distribution::setFieldEmissionParameters ( )
private
void Distribution::setNumberOfDistributions ( unsigned int  n)
inline

Definition at line 342 of file Distribution.h.

References Hypervolume::n, and numberOfDistributions_m.

Referenced by TrackRun::setDistributionParallelT().

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

Definition at line 4298 of file Distribution.cpp.

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

Referenced by setupEmissionModel().

Here is the call graph for this function:

void Distribution::setupEmissionModelNone ( PartBunchBase< double, 3 > *  beam)
private
void Distribution::setupEmissionModelNonEquil ( )
private
void Distribution::setupEnergyBins ( double  maxTOrZ,
double  minTOrZ 
)
private
void Distribution::setupParticleBins ( double  massIneV,
PartBunchBase< double, 3 > *  beam 
)
private
void Distribution::shiftBeam ( double &  maxTOrZ,
double &  minTOrZ 
)
void Distribution::shiftDistCoordinates ( double  massIneV)
private
void Distribution::update ( )
virtual

Update this object.

Reimplemented from Object.

Definition at line 284 of file Distribution.cpp.

Referenced by getReference().

void Distribution::writeOutFileEmission ( )
private
void Distribution::writeOutFileHeader ( )
private
void Distribution::writeOutFileInjection ( )
private

Member Data Documentation

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

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

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

Upper limit on emission energy distribution (eV).

Definition at line 499 of file Distribution.h.

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

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

Definition at line 519 of file Distribution.h.

Referenced by emitParticles(), and writeOutFileEmission().

double Distribution::cathodeFermiEnergy_m
private

Laser photon energy (eV).

Definition at line 495 of file Distribution.h.

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

double Distribution::cathodeTemp_m
private

Cathode material Fermi energy (eV).

Definition at line 496 of file Distribution.h.

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

double Distribution::cathodeWorkFunc_m
private
SymTenzor<double, 6> Distribution::correlationMatrix_m
private
double Distribution::currentEmissionTime_m
private

Definition at line 475 of file Distribution.h.

Referenced by emitParticles().

int Distribution::currentEnergyBin_m
private

Definition at line 476 of file Distribution.h.

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

int Distribution::currentSampleBin_m
private

Definition at line 477 of file Distribution.h.

Referenced by checkEmissionParameters(), and emitParticles().

double Distribution::cutoff_m
private

Definition at line 588 of file Distribution.h.

Referenced by getTEmission().

Vector_t Distribution::cutoffP_m
private
Vector_t Distribution::cutoffR_m
private
size_t Distribution::darkCurrentParts_m
private

Definition at line 547 of file Distribution.h.

Referenced by setFieldEmissionParameters().

double Distribution::darkInwardMargin_m
private

Number of dark current particles.

Definition at line 548 of file Distribution.h.

Referenced by setFieldEmissionParameters().

DistrTypeT::DistrTypeT Distribution::distrTypeT_m
private
std::string Distribution::distT_m
private

Definition at line 454 of file Distribution.h.

Referenced by setDistType().

double Distribution::E_m
private

Definition at line 581 of file Distribution.h.

Referenced by createMatchedGaussDistribution(), and createOpalCycl().

double Distribution::eInitThreshold_m
private

Dark current particle initialization position. Inward along the triangle normal, positive. Inside the geometry.

Definition at line 551 of file Distribution.h.

Referenced by setFieldEmissionParameters().

EmissionModelT::EmissionModelT Distribution::emissionModel_m
private

Emission Model.

Definition at line 470 of file Distribution.h.

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

double Distribution::emitEnergyUpperLimit_m
private

Cathode temperature (K).

Definition at line 497 of file Distribution.h.

Referenced by applyEmissModelNonEquil(), and setupEmissionModelNonEquil().

bool Distribution::emitting_m
private
gsl_histogram* Distribution::energyBinHist_m
private

Distribution energy bins.

Definition at line 483 of file Distribution.h.

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

PartBins* Distribution::energyBins_m
private

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

Definition at line 482 of file Distribution.h.

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

double Distribution::fieldEnhancement_m
private

Work function of surface material (eV).

Definition at line 554 of file Distribution.h.

Referenced by setFieldEmissionParameters().

double Distribution::fieldThrFN_m
private

Field enhancement factor beta for Fowler- Nordheim emission.

Definition at line 556 of file Distribution.h.

Referenced by setFieldEmissionParameters().

double Distribution::I_m
private

Thermal velocity of Maxwellian distribution of secondaries in Vaughan's model.

Definition at line 580 of file Distribution.h.

Referenced by createMatchedGaussDistribution(), and createOpalCycl().

InputMomentumUnitsT::InputMomentumUnitsT Distribution::inputMoUnits_m
private
double Distribution::laserEnergy_m
private

Cathode material work function (eV).

Definition at line 494 of file Distribution.h.

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

std::string Distribution::laserImageName_m
private

Definition at line 540 of file Distribution.h.

Referenced by printDistFlattop(), and setDistParametersFlattop().

double Distribution::laserIntensityCut_m
private

Definition at line 541 of file Distribution.h.

Referenced by printDistFlattop(), and setDistParametersFlattop().

LaserProfile* Distribution::laserProfile_m
private
std::string Distribution::laserProfileFileName_m
private

Definition at line 539 of file Distribution.h.

Referenced by printDistFlattop(), and setDistParametersFlattop().

size_t Distribution::maxFN_m
private

Field threshold for Fowler-Nordheim emission (MV/m).

Definition at line 558 of file Distribution.h.

Referenced by setFieldEmissionParameters().

Vector_t Distribution::mBinomial_m
private

Definition at line 535 of file Distribution.h.

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

unsigned int Distribution::numberOfDistributions_m
private

and list type for switch statements.

Definition at line 457 of file Distribution.h.

Referenced by calcPartPerDist(), and setNumberOfDistributions().

int Distribution::numberOfEnergyBins_m
private
int Distribution::numberOfSampleBins_m
private

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

Definition at line 480 of file Distribution.h.

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

double Distribution::paraFNA_m
private

Max. number of electrons emitted from a single triangle for Fowler-Nordheim emission.

Definition at line 560 of file Distribution.h.

Referenced by setFieldEmissionParameters().

double Distribution::paraFNB_m
private

Empirical constant A in Fowler-Nordheim emission model.

Definition at line 562 of file Distribution.h.

Referenced by setFieldEmissionParameters().

double Distribution::paraFNVYSe_m
private

Constant for image charge effect parameter y(E) in Fowler-Nordheim emission model.

Definition at line 566 of file Distribution.h.

Referenced by setFieldEmissionParameters().

double Distribution::paraFNVYZe_m
private

Second order constant for v(y) function in Fowler-Nordheim emission model.

Definition at line 568 of file Distribution.h.

Referenced by setFieldEmissionParameters().

double Distribution::paraFNY_m
private

Empirical constant B in Fowler-Nordheim emission model.

Definition at line 564 of file Distribution.h.

Referenced by setFieldEmissionParameters().

PartData Distribution::particleRefData_m
private

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

Definition at line 462 of file Distribution.h.

Referenced by getReference().

std::vector<size_t> Distribution::particlesPerDist_m
private
Vector_t Distribution::pmean_m
private
double Distribution::ppVw_m
private

Select the secondary model type: 0 ==> no secondary emission. 1 ==> Furman-Pivi 2 or larger ==> Vaughan's model

Definition at line 574 of file Distribution.h.

Referenced by setFieldEmissionParameters().

bool Distribution::previousH5Local_m
private

Definition at line 591 of file Distribution.h.

Referenced by GetPreviousH5Local().

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

Definition at line 514 of file Distribution.h.

Referenced by emitParticles(), and writeOutFileEmission().

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

Definition at line 516 of file Distribution.h.

Referenced by emitParticles(), and writeOutFileEmission().

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

Definition at line 518 of file Distribution.h.

Referenced by emitParticles(), and writeOutFileEmission().

gsl_rng* Distribution::randGen_m
private
int Distribution::secondaryFlag_m
private

Zero order constant for v(y) function in Fowler-Nordheim emission model.

Definition at line 570 of file Distribution.h.

Referenced by setFieldEmissionParameters().

double Distribution::sigmaFall_m
private

Definition at line 587 of file Distribution.h.

Referenced by getTEmission().

Vector_t Distribution::sigmaP_m
private
Vector_t Distribution::sigmaR_m
private
double Distribution::sigmaRise_m
private

Definition at line 586 of file Distribution.h.

Referenced by getTEmission().

double Distribution::sigmaTFall_m
private
double Distribution::sigmaTRise_m
private
double Distribution::tBin_m
private
double Distribution::tEmission_m
private
double Distribution::tFall_m
private

Definition at line 585 of file Distribution.h.

Referenced by getTEmission().

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

Definition at line 517 of file Distribution.h.

Referenced by emitParticles(), and writeOutFileEmission().

size_t Distribution::totalNumberEmittedParticles_m
private

Definition at line 502 of file Distribution.h.

Referenced by emitParticles(), and getPercentageEmitted().

size_t Distribution::totalNumberParticles_m
private
double Distribution::tPulseLengthFWHM_m
private
double Distribution::tRise_m
private

time binned distribution with thermal energy

Definition at line 584 of file Distribution.h.

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

double Distribution::vVThermal_m
private

Velocity scalar for parallel plate benchmark.

Definition at line 575 of file Distribution.h.

Referenced by setFieldEmissionParameters().

double Distribution::workFunction_m
private

Field threshold (MV/m) beyond which particles will be initialized.

Definition at line 553 of file Distribution.h.

Referenced by setFieldEmissionParameters().

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

Definition at line 513 of file Distribution.h.

Referenced by emitParticles(), and writeOutFileEmission().

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

Definition at line 515 of file Distribution.h.

Referenced by emitParticles(), and writeOutFileEmission().


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