Definition at line 80 of file lhefile.py.
◆ extracteventparticles()
def lhefile.LHEEvent_StableHiggs.extracteventparticles |
( |
|
cls, |
|
|
|
lines, |
|
|
|
isgen |
|
) |
| |
Reimplemented from lhefile.LHEEvent.
Definition at line 82 of file lhefile.py.
82 def extracteventparticles(cls, lines, isgen):
83 daughters, mothers, associated = [], [], []
85 id, status, mother1, mother2 = (
int(_)
for _
in line.split()[0:4])
86 if (1 <= abs(id) <= 6
or abs(id) == 21)
and not isgen:
87 line = line.replace(str(id),
"0", 1)
92 raise ValueError(
"Higgs has status {}, expected it to be 1\n\n".format(status) +
"\n".join(lines))
93 daughters.append(line)
94 if abs(id)
in (0, 1, 2, 3, 4, 5, 11, 12, 13, 14, 15, 16, 21)
and status == 1:
95 associated.append(line)
97 if len(daughters) != 1:
98 raise ValueError(
"More than one H in the event??\n\n"+
"\n".join(lines))
99 if cls.nassociatedparticles
is not None and len(associated) != cls.nassociatedparticles:
100 raise ValueError(
"Wrong number of associated particles (expected {}, found {})\n\n".format(cls.nassociatedparticles, len(associated))+
"\n".join(lines))
101 if len(mothers) != 2:
102 raise ValueError(
"{} mothers in the event??\n\n".format(len(mothers))+
"\n".join(lines))
104 if not isgen: mothers =
None
105 return daughters, associated, mothers
◆ nassociatedparticles
lhefile.LHEEvent_StableHiggs.nassociatedparticles = None |
|
static |
The documentation for this class was generated from the following file: