Definition at line 115 of file lhefile.py.
◆ extracteventparticles()
def lhefile.LHEEvent_Offshell4l.extracteventparticles |
( |
|
cls, |
|
|
|
lines, |
|
|
|
isgen |
|
) |
| |
Reimplemented from lhefile.LHEEvent.
Definition at line 117 of file lhefile.py.
117 def extracteventparticles(cls, lines, isgen):
118 daughters, mothers, associated = [], [], []
120 id, status, mother1, mother2 = (
int(_)
for _
in line.split()[0:4])
121 if (1 <= abs(id) <= 6
or abs(id) == 21)
and not isgen:
122 line = line.replace(str(id),
"0", 1)
125 if abs(id)
in (11, 12, 13, 14, 15, 16)
and status == 1:
126 daughters.append(line)
127 if abs(id)
in (0, 1, 2, 3, 4, 5, 21)
and status == 1:
128 associated.append(line)
130 if len(daughters) != 4:
131 raise ValueError(
"Wrong number of daughters (expected {}, found {})\n\n".format(4, len(daughters))+
"\n".join(lines))
132 if cls.nassociatedparticles
is not None and len(associated) != cls.nassociatedparticles:
133 raise ValueError(
"Wrong number of associated particles (expected {}, found {})\n\n".format(cls.nassociatedparticles, len(associated))+
"\n".join(lines))
134 if len(mothers) != 2:
135 raise ValueError(
"{} mothers in the event??\n\n".format(len(mothers))+
"\n".join(lines))
137 if not isgen: mothers =
None
138 return daughters, associated, mothers
◆ nassociatedparticles
lhefile.LHEEvent_Offshell4l.nassociatedparticles = None |
|
static |
The documentation for this class was generated from the following file: