Class PhotonFieldSampling

Class Documentation

class PhotonFieldSampling

Reimplementation of SOPHIA photon sampling. Naming and unit conventions are taken from SOPHIA to ease comparisions.

Public Functions

PhotonFieldSampling()
PhotonFieldSampling(int bgFlag)

Constructor to mimic SOPHIA structure.

Parameters
  • bgFlag: 1: CMB | 2: IRB_Kneiske04

double sample_eps(bool onProton, double E_in, double z_in) const

SOPHIA’s photon sampling method. Returns energy [J] of a photon of the photon field.

Parameters
  • onProton: particle type: proton or neutron
  • E_in: energy of incoming nucleon
  • z_in: redshift of incoming nucleon

Protected Functions

double getPhotonDensity(double eps, double z_in) const
double functs(double s, bool onProton) const
double prob_eps(double eps, bool onProton, double E_in, double z_in) const
double crossection(double eps, bool onProton) const
double Pl(double x, double xth, double xmax, double alpha) const
double Ef(double x, double th, double w) const
double breitwigner(double sigma_0, double Gamma, double DMM, double epsPrime, bool onProton) const

Protected Attributes

int bgFlag