Class PhotoPionProduction

Inheritance Relationships

Base Type

Class Documentation

class PhotoPionProduction : public Module

Photo-pion interactions of nuclei with background photons.

Public Functions

PhotoPionProduction(ref_ptr<PhotonField> photonField, bool photons = false, bool neutrinos = false, bool electrons = false, bool antiNucleons = false, double limit = 0.1, bool haveRedshiftDependence = false)
void setPhotonField(ref_ptr<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.

  • 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.

  • 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

ref_ptr<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