Skip to content

Commit 44d461e

Browse files
authored
Merge pull request #255 from lukasmerten/BugFix_PhotoPion
Add a check for CMB field before deactivating the 2dim tabulated redshift evolution.
2 parents 4679998 + d4a2210 commit 44d461e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/module/PhotoPionProduction.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,13 @@ PhotoPionProduction::PhotoPionProduction(PhotonField field, bool photons, bool n
2828
void PhotoPionProduction::setPhotonField(PhotonField field) {
2929
photonField = field;
3030
if (haveRedshiftDependence) {
31-
std::cout << "PhotoPionProduction: tabulated redshift dependence not needed for CMB, switching off" << std::endl;
32-
haveRedshiftDependence = false;
31+
if (field==CMB){
32+
std::cout << "PhotoPionProduction: tabulated redshift dependence not needed for CMB, switching off" << std::endl;
33+
haveRedshiftDependence = false;
34+
}
35+
else {
36+
KISS_LOG_WARNING << "PhotoPionProduction: You are using the 2-dimensional tabulated redshift evolution, which is not available for other interactions. To be consistent across all interactions you may deactivate this <setHaveRedshiftDependence(False)>.";
37+
}
3338
}
3439
std::string fname = photonFieldName(field);
3540
setDescription("PhotoPionProduction: " + fname);

0 commit comments

Comments
 (0)