From 275654d2d9d4d1ef8e078f6068e39f842fcebf8e Mon Sep 17 00:00:00 2001
From: Andre Sailer <andre.philippe.sailer@cern.ch>
Date: Thu, 6 Jun 2019 16:46:46 +0200
Subject: [PATCH] DDG4: ddsim: disable physics.decays by default, add
 documentation with warning

---
 DDG4/python/DDSim/Helper/Physics.py | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/DDG4/python/DDSim/Helper/Physics.py b/DDG4/python/DDSim/Helper/Physics.py
index 8f7863a0d..1024fcfeb 100644
--- a/DDG4/python/DDSim/Helper/Physics.py
+++ b/DDG4/python/DDSim/Helper/Physics.py
@@ -11,7 +11,7 @@ class Physics( ConfigHelper ):
     super(Physics, self).__init__()
     self._rangecut = 0.7*mm
     self.list ="FTFP_BERT"
-    self.decays = True
+    self._decays = False
     self._pdgfile = None
     self._rejectPDGs = {1,2,3,4,5,6,21,23,24,25}
     self._zeroTimePDGs = {11, 13, 15, 17}
@@ -77,6 +77,16 @@ class Physics( ConfigHelper ):
       raise RuntimeError( "PDGFile: %s not found" % os.path.abspath( val ) )
     self._pdgfile = os.path.abspath( val )
 
+  @property
+  def decays(self):
+    """If true, add decay processes for all particles.
+
+    Only enable when creating a physics list not based on an existing Geant4 list!
+    """
+    return self._decays
+  @decays.setter
+  def decays(self, val):
+    self._decays = val
 
   def setupPhysics( self, kernel, name=None):
     seq = kernel.physicsList()
-- 
GitLab