IAP GITLAB

Skip to content
Snippets Groups Projects
Commit b4132766 authored by Marvin Gottowik's avatar Marvin Gottowik Committed by Alice Faure
Browse files

move momentum definition to Particle class such that mypy knows about its...

move momentum definition to Particle class such that mypy knows about its existence without setting it to None in FirstInteraction
parent 1b0038a0
No related branches found
No related tags found
1 merge request!654Resolve "first_interactions.py crash"
......@@ -36,9 +36,6 @@ class FirstInteraction(Particle):
"""
Particle.__init__(self, prop_dict)
# need to define for momentum prop
self.px = self.py = self.pz = None
def __repr__(self) -> str:
"""
Return a string representation of this class.
......
......@@ -34,6 +34,7 @@ class Particle(object):
# need to define for position/direction functions
self.x = self.y = self.z = None
self.nx = self.ny = self.nz = None
self.px = self.py = self.pz = None
# wrap the files of the dictionary so that there is a property
# assigned to each value, i.e. print(my_primary.pdg)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment