Class PhotoPionProduction

Inheritance Relationships

Base Type

Class Documentation

class PhotoPionProduction : public Module

Photo-pion interactions of nuclei with background photons.

Public Functions

PhotoPionProduction(PhotonField photonField = CMB, bool photons = false, bool neutrinos = false, bool electrons = false, bool antiNucleons = false, double limit = 0.1, bool haveRedshiftDependence = false)
void setPhotonField(PhotonField photonField)
void setHavePhotons(bool b)
void setHaveNeutrinos(bool b)
void setHaveElectrons(bool b)
void setHaveAntiNucleons(bool b)
void setHaveRedshiftDependence(bool b)
void setLimit(double limit)
void initRate(std::string filename)
double nucleonMFP(double gamma, double z, bool onProton) const
double nucleiModification(int A, int X) const
void process(Candidate *candidate) const
void performInteraction(Candidate *candidate, bool onProton) const
double lossLength(int id, double gamma, double z = 0)

Calculates the loss length E dx/dE in [m]. This is not used in the simulation.

Parameters
  • id: PDG particle id
  • gamma: Lorentz factor of particle
  • z: redshift

SophiaEventOutput sophiaEvent(bool onProton, double Ein, double eps) const

Direct SOPHIA interface. Output is an object SophiaEventOutput with two vectors “energy” and “id” each of length N (number of out-going particles). The i-th component of each vector corresponds to the same particle. This is not used in the simulation.

Parameters
  • onProton: proton or neutron
  • Ein: energy of nucleon
  • eps: energy of target photon

std::string getDescription() const
void setDescription(const std::string &description)
void process(ref_ptr<Candidate> candidate) const
size_t addReference() const
size_t removeReference() const
int removeReferenceNoDelete() const
size_t getReferenceCount() const

Protected Attributes

PhotonField photonField
PhotonFieldSampling photonFieldSampling
std::vector<double> tabLorentz

Lorentz factor of nucleus.

std::vector<double> tabRedshifts

redshifts (optional for haveRedshiftDependence)

std::vector<double> tabProtonRate

interaction rate in [1/m] for protons

std::vector<double> tabNeutronRate

interaction rate in [1/m] for neutrons

double limit

fraction of mean free path to limit the next step

bool havePhotons
bool haveNeutrinos
bool haveElectrons
bool haveAntiNucleons
bool haveRedshiftDependence
size_t _referenceCount