Photon Fields

group Photon Fields

Photon fields for particle interactions.

Functions

inline PhotonField()
virtual double getPhotonDensity(double ePhoton, double z = 0., const Vector3d &pos = Vector3d(0., 0., 0.)) const = 0

returns comoving photon density [1/m^3]. multiply with (1+z^3) for physical number density.

Parameters:
  • ePhoton – photon energy [J]

  • z – redshift (if redshift dependent, default = 0.)

  • pos – position (if position dependent, default = Vector3d(0,0,0))

virtual double getMinimumPhotonEnergy(double z, const Vector3d &pos = Vector3d(0., 0., 0.)) const = 0

Returns the minimum photon energy

Parameters:
virtual double getMaximumPhotonEnergy(double z, const Vector3d &pos = Vector3d(0., 0., 0.)) const = 0

Returns the maximum photon energy

Parameters:
inline virtual std::string getFieldName() const

Returns name of the current used photon field.

inline virtual double getRedshiftScaling(double z) const

returns overall comoving scaling factor (cf. CRPropa3-data/calc_scaling.py)

Parameters:

z – redshift

inline bool hasRedshiftDependence() const

Returns if the derived field has a redshift dependency or not.

inline bool hasPositionDependence() const

Returns if the derived field has a position dependency or not.

inline ref_ptr<Surface> getSurface() const

Returns the set surface.

inline void setFieldName(std::string fieldName)

Sets the name of the currently used photon field

Parameters:

fieldName – Name of the currently used photon field

TabularPhotonField(const std::string fieldName, const bool isRedshiftDependent = true)

Constructor

Parameters:
  • fieldName – String field identifier

  • isRedshiftDependent – Whether or not the given field is redshift dependent

virtual double getPhotonDensity(double ePhoton, double z = 0., const Vector3d &pos = Vector3d(0., 0., 0.)) const

Returns photon density dependend on energy, redshift and position Returns the photon density for a specific photon energy, redshift and position

Parameters:
  • ePhoton – Photon energy

  • zRedshift

  • pos – Position

virtual double getRedshiftScaling(double z) const

returns overall comoving scaling factor (cf. CRPropa3-data/calc_scaling.py)

Parameters:

z – redshift

virtual double getMinimumPhotonEnergy(double z, const Vector3d &pos = Vector3d(0., 0., 0.)) const

Returns the minimum possible photon energy Returns the minimum possible photon energy for a given redshift and position.

Parameters:
virtual double getMaximumPhotonEnergy(double z, const Vector3d &pos = Vector3d(0., 0., 0.)) const

Returns the maximum possible photon energy Returns the maximum possible photon energy for a given redshift and position.

Parameters:
void readPhotonEnergy(std::string filePath)

Reads the photon energies from the given folder

Parameters:

filePath – Path containing photon energy files

void readPhotonDensity(std::string filePath)

Reads the photon densities from the given folder

Parameters:

filePath – Path containing photon densitiy files

void readRedshift(std::string filePath)

Reads the photon redshift from the given folder

Parameters:

filePath – Path containing photon redshift files

void initRedshiftScaling()

Initializes the redshift scaling from the read photon redshift.

void checkInputData() const

Checks if read data is valid.

TabularSpatialPhotonField(const std::string fieldName, ref_ptr<Surface> surface = nullptr)
virtual double getPhotonDensity(double ePhoton = 0., double z = 0., const Vector3d &pos = Vector3d(0., 0., 0.)) const

Returns photon density dependend on energy, redshift and position Returns the photon density for a specific photon energy, redshift and position

Parameters:
  • ePhoton – Photon energy

  • zRedshift

  • pos – Position

virtual double getMinimumPhotonEnergy(double z, const Vector3d &pos = Vector3d(0., 0., 0.)) const

Returns the minimum possible photon energy Returns the minimum possible photon energy for a given redshift and position.

Parameters:
virtual double getMaximumPhotonEnergy(double z, const Vector3d &pos = Vector3d(0., 0., 0.)) const

Returns the maximum possible photon energy Returns the maximum possible photon energy for a given redshift and position.

Parameters:
std::vector<double> readPhotonEnergy(std::string filePath)

Reads the photon energies from the given folder

Parameters:

filePath – Path containing photon energy files

std::vector<double> readPhotonDensity(std::string filePath)

Reads the photon densities from the given folder

Parameters:

filePath – Path containing photon densitiy files

void checkInputData() const

Checks if read data is valid.

void setSurface(ref_ptr<Surface> surface)

Apply a surface that confine the position dependent photon field

Parameters:

surface – closed surface to confine the nodes of grid to be uploaded

inline IRB_Kneiske04()
inline IRB_Stecker05()
inline IRB_Franceschini08()
inline IRB_Finke10()
inline IRB_Dominguez11()
inline IRB_Gilmore12()
inline IRB_Stecker16_upper()
inline IRB_Stecker16_lower()
inline IRB_Saldana21()
inline IRB_Saldana21_upper()
inline IRB_Saldana21_lower()
inline IRB_Finke22()
inline URB_Protheroe96()
inline URB_Fixsen11()
inline URB_Nitu21()
inline ISRF_Freudenreich98(ref_ptr<Surface> surface)
inline ISRF_Robitaille12(ref_ptr<Surface> surface)
BlackbodyPhotonField(const std::string fieldName, const double blackbodyTemperature)

Constructor

Parameters:
  • fieldName – String identifier of the desired field

  • blackbodyTemperatur – Blackbody temperature

virtual double getPhotonDensity(double ePhoton, double z = 0., const Vector3d &pos = Vector3d(0., 0., 0.)) const

Returns photon density dependend on energy, redshift and position Returns the photon density for a specific photon energy, redshift and position

Parameters:
  • ePhoton – Photon energy

  • zRedshift

  • pos – Position

virtual double getMinimumPhotonEnergy(double z, const Vector3d &pos = Vector3d(0., 0., 0.)) const

Returns the minimum possible photon energy Returns the minimum possible photon energy for a given redshift and position.

Parameters:
virtual double getMaximumPhotonEnergy(double z, const Vector3d &pos = Vector3d(0., 0., 0.)) const

Returns the maximum possible photon energy Returns the maximum possible photon energy for a given redshift and position.

Parameters:
void setQuantile(double q)
inline CMB()

Variables

std::string fieldName

Name of the currently used field

bool isRedshiftDependent

If photon field is redshift dependent

bool isPositionDependent

If photon field is position dependent

ref_ptr<Surface> surface

Currently used Surface

std::vector<double> photonEnergies
std::vector<double> photonDensity
std::vector<double> redshifts
std::vector<double> redshiftScalings
std::vector<double> photonEnergies
std::vector<std::vector<double>> photonDensity
std::unordered_map<int, Vector3d> photonDict
double blackbodyTemperature
double quantile
class PhotonField : public Referenced
#include <PhotonBackground.h>

Abstract base class for photon fields.

Subclassed by BlackbodyPhotonField, TabularPhotonField, TabularSpatialPhotonField

class TabularPhotonField : public PhotonField
#include <PhotonBackground.h>

Photon field decorator for tabulated photon fields.

This class reads photon field data from files; The first file must be a list of photon energies [J], named fieldName_photonEnergy.txt The second file must be a list of comoving photon field densities [1/m^3], named fieldName_photonDensity.txt Optionally, a third file contains redshifts, named fieldName_redshift.txt.

Subclassed by IRB_Dominguez11, IRB_Finke10, IRB_Finke22, IRB_Franceschini08, IRB_Gilmore12, IRB_Kneiske04, IRB_Saldana21, IRB_Saldana21_lower, IRB_Saldana21_upper, IRB_Stecker05, IRB_Stecker16_lower, IRB_Stecker16_upper, URB_Fixsen11, URB_Nitu21, URB_Protheroe96

class TabularSpatialPhotonField : public PhotonField
#include <PhotonBackground.h>

Position dependent photon field decorator for tabulated photon fields.

This class reads photon field data from files in the appropriate directory; The first files must be lists of photon energies [J], named fieldName_photonEnergy.txt and contained in the subdirectory /photonEnegy/; The second files must be lists of comoving photon field densities [1/m^3], named fieldName_photonDensity.txt and contained in the subdirectory /photonDensity/; The generated files through the CRPropa procedure (https://crpropa.github.io/CRPropa3/pages/example_notebooks/custom_photonfield/custom-photon-field.html) have a different ordering: the energy bins from the larger to the lower. No redshift dependence is available. The surface is defined to include the nodes of the grid contained within.

Subclassed by ISRF_Freudenreich98, ISRF_Robitaille12

class IRB_Kneiske04 : public TabularPhotonField
#include <PhotonBackground.h>

Extragalactic background light model from Kneiske et al. 2004.

Source info: DOI:10.1051/0004-6361:20031542, https://www.aanda.org/articles/aa/pdf/2004/03/aa3848.pdf, figure 1 (“Best-fit” model)

class IRB_Stecker05 : public TabularPhotonField
#include <PhotonBackground.h>

Extragalactic background light model by Stecker at al. 2005.

Source info: DOI:10.1086/506188, astro-ph/0510449 https://iopscience.iop.org/article/10.1086/506188/pdf

class IRB_Franceschini08 : public TabularPhotonField
#include <PhotonBackground.h>

Extragalactic background light model from Franceschini et al. 2008.

Source info: DOI:10.1051/0004-6361:200809691 https://arxiv.org/pdf/0805.1841.pdf, tables 1 and 2

class IRB_Finke10 : public TabularPhotonField
#include <PhotonBackground.h>

Extragalactic background light model from Finke et al. 2010.

Source info: DOI:10.1088/0004-637X/712/1/238 https://iopscience.iop.org/article/10.1088/0004-637X/712/1/238/pdf

class IRB_Dominguez11 : public TabularPhotonField
#include <PhotonBackground.h>

Extragalactic background light model from Dominguez et al. 2011.

Source info: DOI:10.1111/j.1365-2966.2010.17631.x https://academic.oup.com/mnras/article/410/4/2556/1008012

class IRB_Gilmore12 : public TabularPhotonField
#include <PhotonBackground.h>

Extragalactic background light model from Gilmore et al. 2012.

Source info: DOI:10.1111/j.1365-2966.2012.20841.x https://academic.oup.com/mnras/article/422/4/3189/1050758

class IRB_Stecker16_upper : public TabularPhotonField
#include <PhotonBackground.h>

Extragalactic background light model from Stecker et al. 2016 (upper-bound model)

Source info: DOI:10.3847/0004-637X/827/1/6 https://iopscience.iop.org/article/10.3847/0004-637X/827/1/6

class IRB_Stecker16_lower : public TabularPhotonField
#include <PhotonBackground.h>

Extragalactic background light model from Stecker et al. 2016 (lower-bound model)

Source info: DOI:10.3847/0004-637X/827/1/6 https://iopscience.iop.org/article/10.3847/0004-637X/827/1/6

class IRB_Saldana21 : public TabularPhotonField
#include <PhotonBackground.h>

Extragalactic background light model from Saldana-Lopez et al. 2021.

Source info: DOI:10.1093/mnras/stab2393 https://ui.adsabs.harvard.edu/abs/2021MNRAS.507.5144S/abstract

class IRB_Saldana21_upper : public TabularPhotonField
#include <PhotonBackground.h>

Extragalactic background light model from Saldana-Lopez et al. 2021 (upper-bound model)

Source info: DOI:10.1093/mnras/stab2393 https://ui.adsabs.harvard.edu/abs/2021MNRAS.507.5144S/abstract

class IRB_Saldana21_lower : public TabularPhotonField
#include <PhotonBackground.h>

Extragalactic background light model from Saldana-Lopez et al. 2021 (lower-bound model)

Source info: DOI:10.1093/mnras/stab2393 https://ui.adsabs.harvard.edu/abs/2021MNRAS.507.5144S/abstract

class IRB_Finke22 : public TabularPhotonField
#include <PhotonBackground.h>

Extragalactic background light model from Finke et al. 2022.

Source info: DOI:10.3847/1538-4357/ac9843 https://iopscience.iop.org/article/10.3847/1538-4357/ac9843/pdf

class URB_Protheroe96 : public TabularPhotonField
class URB_Fixsen11 : public TabularPhotonField
class URB_Nitu21 : public TabularPhotonField
class ISRF_Freudenreich98 : public TabularSpatialPhotonField
class ISRF_Robitaille12 : public TabularSpatialPhotonField
class BlackbodyPhotonField : public PhotonField
#include <PhotonBackground.h>

Photon field decorator for black body photon fields.

Subclassed by CMB

class CMB : public BlackbodyPhotonField
#include <PhotonBackground.h>

Cosmic mircowave background photon field.

Source info: This field is an isotropic blackbody photon field with temperature T = 2.73 K

class URB
#include <PhotonBackground.h>

Extragalactic background light model from Protheroe & Biermann 1996.

Extragalactic background light model by Nitu et al.

Extragalactic background light model based on ARCADE2 observations, by Fixsen et al. Note that this model does not cover the same energy range as other URB models. Here, only ~10 MHz - 10 GHz is considered. Therefore, it only makes sense to use this model in very specific studies.

Source info: DOI:10.1016/S0927-6505(96)00041-2 https://www.sciencedirect.com/science/article/abs/pii/S0927650596000412

Source info: DOI:10.1088/0004-637X/734/1/5 https://iopscience.iop.org/article/10.1088/0004-637X/734/1/5

Source info: DOI:10.1016/j.astropartphys.2020.102532 https://www.sciencedirect.com/science/article/pii/S0927650520301043?

class ISRF
#include <PhotonBackground.h>

Interstellar radiation field model by Freudenreich et al. (1998) implemented in Porter et al. (2017)

Interstellar radiation field model by Robitaille et al. (2012) implemented in Porter et al. (2017)

Source info: DOI: https://iopscience.iop.org/article/10.3847/1538-4357/aa844d