Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of a new EBL model from Finke et al. 2022. #465

Merged
merged 4 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,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();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whitespace

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not creating a new commit just to fix the whitepace, but we should probably do this at some point in a consistent way for all files.

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();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it called EBL here and IRB else?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that depends on who implemented the test in the first place. Could be cleaned up in the future.

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