From 51f35002b9d4169368c7bd77f850ad806b4b5ca8 Mon Sep 17 00:00:00 2001
From: adrien-matta <a.matta@surrey.ac.uk>
Date: Mon, 2 Nov 2015 10:14:05 +0000
Subject: [PATCH] * Fixing bug in Selective Physics list         - Decay must
 activated if any of the other process is

---
 NPSimulation/Core/PhysicsList.cc | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/NPSimulation/Core/PhysicsList.cc b/NPSimulation/Core/PhysicsList.cc
index 0b5775116..43f598525 100644
--- a/NPSimulation/Core/PhysicsList.cc
+++ b/NPSimulation/Core/PhysicsList.cc
@@ -159,6 +159,14 @@ void PhysicsList::ReadConfiguration(std::string filename){
     else 
       std::cout <<"WARNING: Physics List Token '" << name << "' unknown. Token is ignored." << std::endl;
   }
+  
+  // Most special process need decay to be activated
+     if( (m_IonBinaryCascadePhysics || m_EmExtraPhysics || m_HadronElasticPhysics
+        || m_StoppingPhysics || m_OpticalPhysics || m_HadronPhysicsQGSP_BIC_HP) && !m_Decay){
+        m_Decay = true;
+        std::cout << "Information: Selected process require Decay to be activated." << std::endl;
+     }
+      
 }
 /////////////////////////////////////////////////////////////////////////////
 PhysicsList::~PhysicsList(){
-- 
GitLab