Skip to content

Commit

Permalink
Merge pull request #255 from lukasmerten/BugFix_PhotoPion
Browse files Browse the repository at this point in the history
Add a check for CMB field before deactivating the 2dim tabulated redshift evolution.
  • Loading branch information
lukasmerten authored Dec 6, 2019
2 parents 4679998 + d4a2210 commit 44d461e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/module/PhotoPionProduction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,13 @@ PhotoPionProduction::PhotoPionProduction(PhotonField field, bool photons, bool n
void PhotoPionProduction::setPhotonField(PhotonField field) {
photonField = field;
if (haveRedshiftDependence) {
std::cout << "PhotoPionProduction: tabulated redshift dependence not needed for CMB, switching off" << std::endl;
haveRedshiftDependence = false;
if (field==CMB){
std::cout << "PhotoPionProduction: tabulated redshift dependence not needed for CMB, switching off" << std::endl;
haveRedshiftDependence = false;
}
else {
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)>.";
}
}
std::string fname = photonFieldName(field);
setDescription("PhotoPionProduction: " + fname);
Expand Down

0 comments on commit 44d461e

Please sign in to comment.