Skip to content

Commit

Permalink
Merge pull request CRPropa#465 from Yannick-Schmidt/photonfield
Browse files Browse the repository at this point in the history
Implementation of a new EBL model from Finke et al. 2022.
  • Loading branch information
lukasmerten authored Mar 18, 2024
2 parents d6a4670 + b242d75 commit b588923
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
### Interface changes:

### Features that are deprecated and will be removed after this release
* EBL model from Finke et al. 2022

### Removed features
* AMRMagneticField - underlying library (saga) is no longer supported.
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ endif(APPLE)
# Download data files (interaction data, masses, decay data ...)
# ----------------------------------------------------------------------------
OPTION(DOWNLOAD_DATA "Download CRPropa data files" ON)
set(CRPROPA_DATAFILE_VER "2023-10-20")
set(CRPROPA_DATAFILE_VER "2024-03-11")
if(DOWNLOAD_DATA)
message("-- Downloading data files from sciebo ~ 73 MB")
file(DOWNLOAD
Expand Down
13 changes: 13 additions & 0 deletions include/crpropa/PhotonBackground.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,19 @@ class IRB_Saldana21_lower: public TabularPhotonField {
IRB_Saldana21_lower() : TabularPhotonField("IRB_Saldana21_lower", true) {}
};

/**
@class IRB_Finke22
@brief 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 IRB_Finke22: public TabularPhotonField {
public:
IRB_Finke22() : TabularPhotonField("IRB_Finke22", true) {}
};

/**
@class URB
@brief Extragalactic background light model from Protheroe & Biermann 1996
Expand Down
14 changes: 14 additions & 0 deletions test/testInteraction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ TEST(ElectronPairProduction, allBackgrounds) {
epp.setPhotonField(irb);
irb = new IRB_Stecker16_lower();
epp.setPhotonField(irb);
irb = new IRB_Finke22();
epp.setPhotonField(irb);
}

TEST(ElectronPairProduction, energyDecreasing) {
Expand Down Expand Up @@ -342,6 +344,8 @@ TEST(PhotoDisintegration, allBackgrounds) {
pd.setPhotonField(irb);
irb = new IRB_Stecker16_lower();
pd.setPhotonField(irb);
irb = new IRB_Finke22();
pd.setPhotonField(irb);
urb = new URB_Nitu21();
pd.setPhotonField(urb);
}
Expand Down Expand Up @@ -558,6 +562,8 @@ TEST(PhotoPionProduction, allBackgrounds) {
ppp.setPhotonField(irb);
irb = new IRB_Stecker16_lower();
ppp.setPhotonField(irb);
irb = new IRB_Finke22();
ppp.setPhotonField(irb);
ref_ptr<PhotonField> urb = new URB_Protheroe96();
ppp.setPhotonField(urb);
urb = new URB_Nitu21();
Expand Down Expand Up @@ -718,6 +724,8 @@ TEST(EMPairProduction, allBackgrounds) {
em.setPhotonField(ebl);
ebl = new IRB_Stecker16_lower();
em.setPhotonField(ebl);
ebl = new IRB_Finke22();
em.setPhotonField(ebl);
urb = new URB_Fixsen11();
em.setPhotonField(urb);
urb = new URB_Nitu21();
Expand Down Expand Up @@ -821,6 +829,8 @@ TEST(EMDoublePairProduction, allBackgrounds) {
em.setPhotonField(ebl);
ebl = new IRB_Stecker16_lower();
em.setPhotonField(ebl);
ebl = new IRB_Finke22();
em.setPhotonField(ebl);
urb = new URB_Fixsen11();
em.setPhotonField(urb);
urb = new URB_Nitu21();
Expand Down Expand Up @@ -925,6 +935,8 @@ TEST(EMTripletPairProduction, allBackgrounds) {
em.setPhotonField(ebl);
ebl = new IRB_Stecker16_lower();
em.setPhotonField(ebl);
ebl = new IRB_Finke22();
em.setPhotonField(ebl);
urb = new URB_Fixsen11();
em.setPhotonField(urb);
urb = new URB_Nitu21();
Expand Down Expand Up @@ -1030,6 +1042,8 @@ TEST(EMInverseComptonScattering, allBackgrounds) {
em.setPhotonField(ebl);
ebl = new IRB_Stecker16_lower();
em.setPhotonField(ebl);
ebl = new IRB_Finke22();
em.setPhotonField(ebl);
urb = new URB_Fixsen11();
em.setPhotonField(urb);
urb = new URB_Nitu21();
Expand Down

0 comments on commit b588923

Please sign in to comment.