From 04847f082b385ec4dff4a576ef81357b3890a40f Mon Sep 17 00:00:00 2001 From: Andre Sailer Date: Thu, 16 May 2024 14:10:26 +0200 Subject: [PATCH] DDG4/ddsim: change so that user plugin config documentation comes to the steering file --- DDG4/python/DDSim/Helper/Physics.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/DDG4/python/DDSim/Helper/Physics.py b/DDG4/python/DDSim/Helper/Physics.py index 6a3d93754..8b41c9ca2 100644 --- a/DDG4/python/DDSim/Helper/Physics.py +++ b/DDG4/python/DDSim/Helper/Physics.py @@ -10,7 +10,7 @@ class Physics(ConfigHelper): - """Configuration for the PhysicsList""" + """Configuration for the PhysicsList and Monte Carlo particle selection.""" def __init__(self): super(Physics, self).__init__() @@ -29,6 +29,7 @@ def __init__(self): self._alternativeDecayStatuses = set() self._userFunctions = [] self._closeProperties() + Physics.__doc__ += "\n\n" + self.setupUserPhysics.__doc__ @property def rejectPDGs(self): @@ -161,7 +162,7 @@ def setupPhysics(self, kernel, name=None): return seq def setupUserPhysics(self, userFunction): - """Add a function to setup physics plugins. + """To load arbitrary plugins, add a function to be executed. The function must take the DDG4.Kernel() object as the only argument. @@ -185,5 +186,7 @@ def setupCerenkov(kernel): return None SIM.physics.setupUserPhysics(setupCerenkov) + + # End of example """ self._userFunctions.append(userFunction)