Kariba
Loading...
Searching...
No Matches
kariba Namespace Reference

Namespaces

namespace  constants
 

Classes

class  BBody
 Class black body photons, inherited from Radiation.hh. More...
 
struct  BknParams
 Structure used for GSL integration. More...
 
class  Bknpower
 
struct  ComfncParams
 Structure used for GSL integration. More...
 
struct  ComintParams
 Structure used for GSL integration. More...
 
class  Compton
 Class inverse Compton, inherited from Radiation.hpp. More...
 
class  Cyclosyn
 Class synchrotron photons, inherited from Radiation.hpp. More...
 
struct  CyclosynAbsParams
 Structure used for GSL integration. More...
 
struct  CyclosynEmisParams
 Structure used for GSL integration. More...
 
struct  DiskIcParams
 Structure used for GSL integration. More...
 
struct  DiskObsParams
 Structure used for GSL integration. More...
 
class  Grays
 
struct  HetagParams
 
struct  HetaParams
 
struct  InjectionBknParams
 Structure used for GSL integration. More...
 
struct  InjectionKappaParams
 Structure used for GSL integration. More...
 
struct  InjectionMixedParams
 Structure used for GSL integration. More...
 
struct  InjectionPlParams
 Structure used for GSL integration. More...
 
class  Kappa
 
struct  KParams
 Structure used for GSL integration. More...
 
class  Mixed
 
class  Neutrinos_pg
 
class  Neutrinos_pp
 
class  Particles
 
struct  PlParams
 Structure used for GSL integration. More...
 
class  Powerlaw
 
class  Radiation
 Base class for photon/neutrino distributions. More...
 
class  ShSDisk
 Class Shakura-Sunyeav disk, inherited from Radiation.hpp. More...
 
class  Thermal
 Class for thermal particles. ndens is number density per unit momentum. More...
 
struct  ThParams
 Structure used for GSL integration. More...
 

Functions

void ebl_atten_gil (const std::vector< double > &en, std::vector< double > &lum, double redshift)
 
double multiplicity (double pspec)
 functions for electrons from pp
 
double prob ()
 
double elec_dist_pp (double zen, double w)
 
double elec_spec_pp (double Ep, double y)
 
double target_protons (double ntot_prot, double nwind, double plfrac)
 
double proton_dist (double gpmin, double Ep, double Epcode_max, gsl_spline *spline_Jp, gsl_interp_accel *acc_Jp)
 
double production_rate (double ge, double x)
 function for electrons from γγ annihilation
 
void sum_photons (size_t nphot, std::vector< double > &en_perseg, std::vector< double > &lum_perseg, size_t ntarg, const std::vector< double > &targ_en, const std::vector< double > &targ_lum)
 Adds up in the lum_perseg the target photon luminosity (in erg/sec/Hz)
 
void sum_photons (size_t nphot, const std::vector< double > &en_perseg, std::vector< double > &lum_perseg, size_t ntarg, const std::vector< double > &targ_en, const std::vector< double > &targ_lum)
 
double Hetag (double x, void *p)
 funtions for γ rays from pγ
 
double set_ntilde (double p)
 The following are common for γ rays/electrons/neutrinos from pp:
 
double sigma_pp (double Ep)
 
double gspec_pp (double Ep, double y)
 
double colliding_protons (gsl_spline *spline_Jp, gsl_interp_accel *acc_Jp, double gp_min, double gp_max, double Ep)
 The following are common for γ rays/electrons/neutrinos from pγ:
 
double photons_jet (double eta, double Ep, gsl_spline *spline_ng, gsl_interp_accel *acc_ng, double nu_min, double nu_max)
 
void tables_photomeson_gamma (double &s, double &delta, double &Beta, double xeta)
 The tables from KA08 for photomeson that give s,δ and B.
 
double PhiFunc_gamma (double eta, double eta0, double x)
 
double Heta (double x, void *p)
 
void tables_photomeson (double &s, double &delta, double &Beta, std::string_view product, double xeta)
 
double PhiFunc (double eta, double eta0, double x, std::string_view product)
 
double distr_pp (double lEv, double lEpi, std::string_view flavor)
 
double secondary_spectrum (double Ep, double y, std::string_view flavor)
 
double prob_fve ()
 
double norm_bkn_int (double x, void *pars)
 Methods to calculate the normalization of the function.
 
double injection_bkn_int (double x, void *pars)
 Injection function to be integrated in cooling.
 
double comfnc (double ein, void *pars)
 
double comint (double gam, void *pars)
 
double disk_integral (double alfa, void *pars)
 
double cyclosyn_emis (double gamma, void *pars)
 Single particle emissivity/absorption coefficient calculations.
 
double cyclosyn_abs (double gamma, void *pars)
 
double norm_kappa_int (double x, void *pars)
 Methods to calculate the normalization of the function.
 
double injection_kappa_int (double x, void *pars)
 
double injection_mixed_int (double x, void *pars)
 Injection function to be integrated in cooling.
 
double th_num_dens_int (double x, void *pars)
 Methods to calculate number density and average energy in thermal part.
 
double av_th_p_int (double x, void *pars)
 
double pl_num_dens_int (double x, void *pars)
 Methods to calculate number density and average energy in non-thermal part.
 
double av_pl_p_int (double x, void *pars)
 
double injection_pl_int (double x, void *pars)
 Injection function to be integrated in cooling.
 
double disk_int (double lr, void *pars)
 

Variables

struct { 
 
   const std::array< double, N_REDSHIFT >   kariba::redshift 
 
   const std::array< double, N_ENERGY >   kariba::energy 
 
   const std::array< double, N_ATT >   kariba::ebl 
 
LUT 
 

Function Documentation

◆ av_pl_p_int()

double kariba::av_pl_p_int ( double  x,
void *  pars 
)

◆ av_th_p_int()

double kariba::av_th_p_int ( double  x,
void *  pars 
)

◆ colliding_protons()

double kariba::colliding_protons ( gsl_spline *  spline_Jp,
gsl_interp_accel *  acc_Jp,
double  gp_min,
double  gp_max,
double  Ep 
)

The following are common for γ rays/electrons/neutrinos from pγ:

◆ comfnc()

double kariba::comfnc ( double  ein,
void *  pars 
)

This function is the kernel of eq 2.48 in Blumenthal & Gould(1970), represents the scattered photon spectrum for a given electron and includes the Klein-Nishina cross section.

◆ comint()

double kariba::comint ( double  gam,
void *  pars 
)

This function is the integral of comfnc above over the total seed photon distribution

◆ cyclosyn_abs()

double kariba::cyclosyn_abs ( double  gamma,
void *  pars 
)

◆ cyclosyn_emis()

double kariba::cyclosyn_emis ( double  gamma,
void *  pars 
)

Single particle emissivity/absorption coefficient calculations.

◆ disk_int()

double kariba::disk_int ( double  lr,
void *  pars 
)

return SD spectrum over a given radius, frequency to be integrated over radius

◆ disk_integral()

double kariba::disk_integral ( double  alfa,
void *  pars 
)

Calculates incident photon field for a Shakura-Sunyaev disk with aspect ratio H, inner temperature Tin, inner radius Rin, at a distance z from the disk, taking beaming into account

◆ distr_pp()

double kariba::distr_pp ( double  lEv,
double  lEpi,
std::string_view  flavor 
)

◆ ebl_atten_gil()

void kariba::ebl_atten_gil ( const std::vector< double > &  en,
std::vector< double > &  lum,
double  redshift 
)

Define the function that does the EBL attenuation correction for the model by Gilmore et al. (2012)

◆ elec_dist_pp()

double kariba::elec_dist_pp ( double  zen,
double  w 
)

◆ elec_spec_pp()

double kariba::elec_spec_pp ( double  Ep,
double  y 
)

◆ gspec_pp()

double kariba::gspec_pp ( double  Ep,
double  y 
)

◆ Heta()

double kariba::Heta ( double  x,
void *  p 
)

◆ Hetag()

double kariba::Hetag ( double  x,
void *  p 
)

funtions for γ rays from pγ

◆ injection_bkn_int()

double kariba::injection_bkn_int ( double  x,
void *  pars 
)

Injection function to be integrated in cooling.

◆ injection_kappa_int()

double kariba::injection_kappa_int ( double  x,
void *  pars 
)

Method to solve steady state continuity equation. NOTE: KN cross section not included in IC cooling

◆ injection_mixed_int()

double kariba::injection_mixed_int ( double  x,
void *  pars 
)

Injection function to be integrated in cooling.

◆ injection_pl_int()

double kariba::injection_pl_int ( double  x,
void *  pars 
)

Injection function to be integrated in cooling.

◆ multiplicity()

double kariba::multiplicity ( double  pspec)

functions for electrons from pp

◆ norm_bkn_int()

double kariba::norm_bkn_int ( double  x,
void *  pars 
)

Methods to calculate the normalization of the function.

◆ norm_kappa_int()

double kariba::norm_kappa_int ( double  x,
void *  pars 
)

Methods to calculate the normalization of the function.

◆ PhiFunc()

double kariba::PhiFunc ( double  eta,
double  eta0,
double  x,
std::string_view  product 
)

◆ PhiFunc_gamma()

double kariba::PhiFunc_gamma ( double  eta,
double  eta0,
double  x 
)

◆ photons_jet()

double kariba::photons_jet ( double  eta,
double  Ep,
gsl_spline *  spline_ng,
gsl_interp_accel *  acc_ng,
double  nu_min,
double  nu_max 
)

◆ pl_num_dens_int()

double kariba::pl_num_dens_int ( double  x,
void *  pars 
)

Methods to calculate number density and average energy in non-thermal part.

◆ prob()

double kariba::prob ( )

◆ prob_fve()

double kariba::prob_fve ( )

◆ production_rate()

double kariba::production_rate ( double  ge,
double  x 
)

function for electrons from γγ annihilation

◆ proton_dist()

double kariba::proton_dist ( double  gpmin,
double  Ep,
double  Epcode_max,
gsl_spline *  spline_Jp,
gsl_interp_accel *  acc_Jp 
)

◆ secondary_spectrum()

double kariba::secondary_spectrum ( double  Ep,
double  y,
std::string_view  flavor 
)

◆ set_ntilde()

double kariba::set_ntilde ( double  p)

The following are common for γ rays/electrons/neutrinos from pp:

◆ sigma_pp()

double kariba::sigma_pp ( double  Ep)

◆ sum_photons() [1/2]

void kariba::sum_photons ( size_t  nphot,
const std::vector< double > &  en_perseg,
std::vector< double > &  lum_perseg,
size_t  ntarg,
const std::vector< double > &  targ_en,
const std::vector< double > &  targ_lum 
)

◆ sum_photons() [2/2]

void kariba::sum_photons ( size_t  nphot,
std::vector< double > &  en_perseg,
std::vector< double > &  lum_perseg,
size_t  ntarg,
const std::vector< double > &  targ_en,
const std::vector< double > &  targ_lum 
)

Adds up in the lum_perseg the target photon luminosity (in erg/sec/Hz)

◆ tables_photomeson()

void kariba::tables_photomeson ( double &  s,
double &  delta,
double &  Beta,
std::string_view  product,
double  xeta 
)

◆ tables_photomeson_gamma()

void kariba::tables_photomeson_gamma ( double &  s,
double &  delta,
double &  Beta,
double  xeta 
)

The tables from KA08 for photomeson that give s,δ and B.

◆ target_protons()

double kariba::target_protons ( double  ntot_prot,
double  nwind,
double  plfrac 
)

◆ th_num_dens_int()

double kariba::th_num_dens_int ( double  x,
void *  pars 
)

Methods to calculate number density and average energy in thermal part.

Variable Documentation

◆ ebl

const std::array<double, N_ATT> kariba::ebl

◆ energy

const std::array<double, N_ENERGY> kariba::energy

◆ [struct]

struct { ... } kariba::LUT

This files includes the implementation of the EBL attenuation factor for the luminosity of photon energies above the photon TeV scale. This is similar to the radiative transfer treatment in the Compton.cpp file which wuses interpolation of 2D tables. We use the EBL model by Gilmore et al. (2012) We first start with defining the energy, redshift and tau arrays of all models in a look-up table (LUT). The limits are set an epsilon(0.0001) off the physical limits tested in each model to avoid occasional weird GSL interoplation bugs.

◆ redshift

const std::array<double, N_REDSHIFT> kariba::redshift
Initial value:
= {
0.0099, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.10, 0.11, 0.15, 0.2, 0.25, 0.3,
0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1.0, 1.2,
1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 3.8, 4.0, 4.2,
4.4, 4.6, 4.8, 5.0, 5.5, 6.0, 6.5, 7.0, 7.5, 8.0, 8.5, 9.0001}