pylhe.LHEEvent
- class pylhe.LHEEvent(eventinfo: ~pylhe.LHEEventInfo, particles: list[~pylhe.LHEParticle], weights: dict[str, float] = <factory>, scales: dict[str, float] = <factory>, attributes: dict[str, str] = <factory>, optional: list[str] = <factory>, _graph: ~graphviz.graphs.Digraph | None = None)[source]
Bases:
objectStore a single event in the LHE format.
- __init__(eventinfo: ~pylhe.LHEEventInfo, particles: list[~pylhe.LHEParticle], weights: dict[str, float] = <factory>, scales: dict[str, float] = <factory>, attributes: dict[str, str] = <factory>, optional: list[str] = <factory>, _graph: ~graphviz.graphs.Digraph | None = None) None
Methods
__init__(eventinfo, particles, weights, ...)mothers(particle)Return a list of the particle's mothers.
tolhe([rwgt, weights])Return the event as a string in LHE format.
Attributes
Get the graphviz.Digraph object.
Event information
List of particles in the event
Event weights
Event scales
Event attributes not represented by dedicated fields
Optional '#' comments stored in the event
- attributes: dict[str, str]
Event attributes not represented by dedicated fields
- eventinfo: LHEEventInfo
Event information
- property graph: Digraph
Get the graphviz.Digraph object. The user now has full control …
E.g., see the source with my_LHEEvent_instance.graph.source.
When not in notebooks the graph can easily be visualized with the graphviz.Digraph.render or graphviz.Digraph.view functions, e.g.: my_LHEEvent_instance.graph.render(filename=”test”, format=”pdf”, view=True, cleanup=True)
- mothers(particle: LHEParticle) list[LHEParticle][source]
Return a list of the particle’s mothers.
- optional: list[str]
Optional ‘#’ comments stored in the event
- particles: list[LHEParticle]
List of particles in the event
- scales: dict[str, float]
Event scales
- tolhe(rwgt: bool = True, weights: bool = False) str[source]
Return the event as a string in LHE format.
- Args:
rwgt (bool): Include the weights in the ‘rwgt’ format. weights (bool): Include the weights in the ‘weights’ format.
- Returns:
str: The event as a string in LHE format.
- weights: dict[str, float]
Event weights