From 5a59777bd503f5c66d88f4c0ee63515b4344fc65 Mon Sep 17 00:00:00 2001 From: martinunland Date: Thu, 5 Sep 2024 17:02:59 +0200 Subject: [PATCH 1/2] solving rad decay bug --- simulations/CMakeLists.txt | 4 ++-- simulations/radioactive_decays/src/OMSimDecaysAnalysis.cc | 1 + simulations/radioactive_decays/src/OMSimG4RadioactiveDecay.cc | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/simulations/CMakeLists.txt b/simulations/CMakeLists.txt index b9ddcbe49..b953339c6 100755 --- a/simulations/CMakeLists.txt +++ b/simulations/CMakeLists.txt @@ -1,4 +1,4 @@ -add_subdirectory(effective_area) -#add_subdirectory(radioactive_decays) +#add_subdirectory(effective_area) +add_subdirectory(radioactive_decays) #add_subdirectory(supernova) #add_subdirectory(efficiency_calibration) diff --git a/simulations/radioactive_decays/src/OMSimDecaysAnalysis.cc b/simulations/radioactive_decays/src/OMSimDecaysAnalysis.cc index 24aad75f4..46a08fc8a 100644 --- a/simulations/radioactive_decays/src/OMSimDecaysAnalysis.cc +++ b/simulations/radioactive_decays/src/OMSimDecaysAnalysis.cc @@ -74,6 +74,7 @@ void OMSimDecaysAnalysis::writeMultiplicity(G4double p_timeWindow) */ void OMSimDecaysAnalysis::writeThreadDecayInformation() { + if (!m_threadDecayStats) return; log_trace("Writing decay information of {} decays", m_threadDecayStats->eventId.size()); G4String outputSufix = OMSimCommandArgsTable::getInstance().get("output_file"); diff --git a/simulations/radioactive_decays/src/OMSimG4RadioactiveDecay.cc b/simulations/radioactive_decays/src/OMSimG4RadioactiveDecay.cc index 0370d6f9b..47d4f8cd4 100644 --- a/simulations/radioactive_decays/src/OMSimG4RadioactiveDecay.cc +++ b/simulations/radioactive_decays/src/OMSimG4RadioactiveDecay.cc @@ -1076,7 +1076,7 @@ void G4RadioactiveDecay::DecayAnalog(const G4Track& theTrack, } } - + log_info("DecayAnalog"); OMSimDecaysAnalysis::getInstance().appendDecay( theParticleDef->GetParticleName(), finalGlobalTime / s, theTrack.GetPosition()); From 49c90b159896350e938eba3eddbb37770cc5ce7a Mon Sep 17 00:00:00 2001 From: martinunland Date: Thu, 5 Sep 2024 17:03:15 +0200 Subject: [PATCH 2/2] forgot pring --- simulations/radioactive_decays/src/OMSimG4RadioactiveDecay.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simulations/radioactive_decays/src/OMSimG4RadioactiveDecay.cc b/simulations/radioactive_decays/src/OMSimG4RadioactiveDecay.cc index 47d4f8cd4..a8ebb3177 100644 --- a/simulations/radioactive_decays/src/OMSimG4RadioactiveDecay.cc +++ b/simulations/radioactive_decays/src/OMSimG4RadioactiveDecay.cc @@ -1076,7 +1076,7 @@ void G4RadioactiveDecay::DecayAnalog(const G4Track& theTrack, } } - log_info("DecayAnalog"); + OMSimDecaysAnalysis::getInstance().appendDecay( theParticleDef->GetParticleName(), finalGlobalTime / s, theTrack.GetPosition());