Skip to content

Commit

Permalink
DDG4/ddsim: change so that user plugin config documentation comes to …
Browse files Browse the repository at this point in the history
…the steering file
  • Loading branch information
andresailer committed May 16, 2024
1 parent adc1399 commit 04847f0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions DDG4/python/DDSim/Helper/Physics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__()
Expand All @@ -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):
Expand Down Expand Up @@ -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.
Expand All @@ -185,5 +186,7 @@ def setupCerenkov(kernel):
return None
SIM.physics.setupUserPhysics(setupCerenkov)
# End of example
"""
self._userFunctions.append(userFunction)

0 comments on commit 04847f0

Please sign in to comment.