Class SynchrotronRadiation

Inheritance Relationships

Base Type

Class Documentation

class SynchrotronRadiation : public Module

Synchrotron radiation of charged particles in magnetic fields.

This module simulates the continuous energy loss of charged particles in magnetic fields, c.f. Jackson. The magnetic field is specified either by a MagneticField or by a RMS field strength value. The module limits the next step size to ensure a fractional energy loss dE/E < limit (default = 0.1). Optionally, synchrotron photons above a threshold (default E > 10^6 eV) are created as secondary particles. Note that the large number of secondary photons per propagation can cause memory problems. To mitigate this, use thinning. However, this still does not solve the problem completely. For this reason, a break-condition stops tracking secondary photons and reweights the current ones.

Public Functions

SynchrotronRadiation(ref_ptr<MagneticField> field, bool havePhotons = false, double thinning = 0, int nSamples = 0, double limit = 0.1)

Constructor

Parameters
  • field – magnetic field object

  • havePhotons – if true, add secondary photons as candidates

  • thinning – weighted sampling of secondaries (0: all particles are tracked; 1: maximum thinning)

  • nSamples – number of synchrotron photons to be sampled and added as candidates

  • limit – step size limit as fraction of mean free path

SynchrotronRadiation(double Brms = 0, bool havePhotons = false, double thinning = 0, int nSamples = 0, double limit = 0.1)

Constructor

Parameters
  • Brms – RMS of the magnetic field (if magnetic-field object not provided)

  • havePhotons – if true, add secondary photons as candidates

  • thinning – weighted sampling of secondaries (0: all particles are tracked; 1: maximum thinning)

  • nSamples – number of synchrotron photons to be sampled and added as candidates

  • limit – step size limit as fraction of mean free path

void setField(ref_ptr<MagneticField> field)
void setBrms(double Brms)
void setHavePhotons(bool havePhotons)
void setThinning(double thinning)

Apply thinning with a given thinning factor

Parameters

thinning – factor of thinning (0: no thinning, 1: maximum thinning)

void setLimit(double limit)

Limit the propagation step to a fraction of the mean free path

Parameters

limit – fraction of the mean free path

void setMaximumSamples(int nmax)

Set the maximum number of synchrotron photons that will be allowed to be added as candidates. This choice depends on the problem at hand. It must be such that all relevant physics is captured with the sample. Weights are added accordingly and the column ‘weight’ must be added to output.

Parameters

nmax – maximum number of synchrotron photons to be sampled

void setSecondaryThreshold(double threshold)

Synchrotron photons above the secondary energy threshold are added as candidates. This may lead to a quick increase in memory.

Parameters

threshold – energy threshold above which photons will be added [in Joules]

void setInteractionTag(std::string tag)
ref_ptr<MagneticField> getField()
double getBrms()
bool getHavePhotons()
double getThinning()
double getLimit()
int getMaximumSamples()
double getSecondaryThreshold() const
std::string getInteractionTag() const
void initSpectrum()
virtual void process(Candidate *candidate) const
virtual std::string getDescription() const
void setDescription(const std::string &description)
inline void process(ref_ptr<Candidate> candidate) const
inline size_t addReference() const
inline size_t removeReference() const
inline int removeReferenceNoDelete() const
inline size_t getReferenceCount() const

Protected Attributes

mutable size_t _referenceCount