Skip to content

Avoid error due to deprecated ICM option #93

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

Merged
merged 4 commits into from
Jan 17, 2023
Merged
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
12 changes: 12 additions & 0 deletions src/PhysicsList.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <G4NeutronTrackingCut.hh>
#include <G4ParticleTable.hh>
#include <G4ParticleTypes.hh>
#include <G4PhotonEvaporation.hh>
#include <G4ProcessManager.hh>
#include <G4ProductionCuts.hh>
#include <G4RadioactiveDecay.hh>
Expand Down Expand Up @@ -241,12 +242,23 @@ void PhysicsList::ConstructProcess() {
radioactiveDecay->SetHLThreshold(decayTimeThreshold);
#else
radioactiveDecay->SetThresholdForVeryLongDecayTime(decayTimeThreshold);
// ICM option not tested, if it does not work as expected please post an issue on
// https://github.com/rest-for-physics/restG4/issues
auto photonEvaporation = new G4PhotonEvaporation();
#endif
// Setting Internal Conversion (ICM) option.
if (fRestPhysicsLists->GetPhysicsListOptionValue("G4RadioactiveDecay", "ICM") == "true") {
#ifdef GEANT4_VERSION_LESS_11_0_0
radioactiveDecay->SetICM(true);
#else
photonEvaporation->SetICM(true);
#endif
} else if (fRestPhysicsLists->GetPhysicsListOptionValue("G4RadioactiveDecay", "ICM") == "false") {
#ifdef GEANT4_VERSION_LESS_11_0_0
radioactiveDecay->SetICM(false);
#else
photonEvaporation->SetICM(false);
#endif
} else if (fRestPhysicsLists->GetVerboseLevel() >=
TRestStringOutput::REST_Verbose_Level::REST_Essential) {
RESTWarning << "PhysicsList 'G4RadioactiveDecay' option 'ICM' not defined" << RESTendl;
Expand Down