Class PhotoPionProduction
Defined in File PhotoPionProduction.h
Inheritance Relationships
Base Type
public Module
(Class Module)
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)
pion production on a given target photon field
- Parameters:
photonField – target photon field
photons – if true, secondary photons are added to the simulation
neutrinos – if true, secondary neutrinos are added to the simulation
electrons – if true, secondary electrons are added to the simulation
antiNucleons – if true, secondary anti nucleons are added to the simulation
limit – fraction of the mean free path, to which the propagation step will be limited
haveRedshiftDependence – use redshift dependent tabulated loss rates; if false, the redshift scaling of the photon field will be used
-
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)
Limit the propagation step to a fraction of the mean free path
- Parameters:
limit – fraction of the mean free path
-
void setInteractionTag(std::string tag)
set a custom interaction tag to trace back this interaction
- Parameters:
tag – string that will be added to the candidate and output
-
void initRate(std::string filename)
-
double nucleonMFP(double gamma, double z, bool onProton) const
get the mean free path (MFP) for a single nucleon. To get the MFP for the full nucleus the nucleonMFP has to be divided by by the nucleiModification factor
- Parameters:
gamma – Lorentz factor of the nucleon
z – redshift
onProton – true for protons, false for neutrons
-
double nucleiModification(int A, int X) const
scaling factor for mean free path of the nucleus (converting the MFP of a single nucleon)
- Parameters:
A – mass number of the nucleus
X – charge number of the nucleus
-
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
-
double sampleEps(bool onProton, double E, double z) const
SOPHIA’s photon sampling method. Returns energy [J] of a photon of the photon field.
- Parameters:
onProton – particle type: proton or neutron
E – energy of incoming nucleon [J]
z – redshift of incoming nucleon
-
double probEpsMax(bool onProton, double Ein, double z, double epsMin, double epsMax) const
called by: sampleEps
- Parameters:
onProton – particle type: proton or neutron
Ein – energy of incoming nucleon
z – redshift of incoming nucleon
epsMin – minimum photon energy of field
epsMax – maximum photon energy of field
output: maximum probability of all photons in field
-
void setSampleLog(bool log)
-
void setCorrectionFactor(double factor)
-
ref_ptr<PhotonField> getPhotonField() const
get functions for the parameters of the class PhotoPionProduction, similar to the set functions
-
bool getHavePhotons() const
-
bool getHaveNeutrinos() const
-
bool getHaveElectrons() const
-
bool getHaveAntiNucleons() const
-
bool getHaveRedshiftDependence() const
-
double getLimit() const
-
bool getSampleLog() const
-
double getCorrectionFactor() const
-
std::string getInteractionTag() const
-
virtual std::string getDescription() const
-
void setDescription(const std::string &description)
-
inline size_t addReference() const
-
inline size_t removeReference() const
-
inline int removeReferenceNoDelete() const
-
inline size_t getReferenceCount() const
Protected Functions
-
double functs(double s, bool onProton) const
-
double probEps(double eps, bool onProton, double Ein, double z) const
-
double epsMinInteraction(bool onProton, double Ein) const
called by: sampleEps
- Parameters:
onProton – particle type: proton or neutron
Ein – energy of incoming nucleon
output: labframe energy [eV] of least energetic photon where PPP can occur
-
double momentum(bool onProton, double Ein) const
called by: probEps, epsMinInteraction
- Parameters:
onProton – particle type: proton or neutron
Ein – energy of incoming nucleon
output: hadron momentum [GeV/c]
-
double crossection(double eps, bool onProton) const
-
double Pl(double eps, double xth, double xMax, double alpha) const
-
double Ef(double eps, double epsTh, double w) const
-
double breitwigner(double sigma0, double gamma, double DMM, double epsPrime, bool onProton) const
-
double mass(bool onProton) const
-
double sMin() const
Protected Attributes
-
ref_ptr<PhotonField> photonField
-
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
-
std::string interactionTag = "PPP"
-
bool sampleLog = true
-
double correctionFactor = 1.6
-
mutable size_t _referenceCount
-
PhotoPionProduction(ref_ptr<PhotonField> photonField, bool photons = false, bool neutrinos = false, bool electrons = false, bool antiNucleons = false, double limit = 0.1, bool haveRedshiftDependence = false)