pylhe.LHEEvent

class pylhe.LHEEvent(eventinfo, particles, weights=None, attributes=None, optional=None)[source]

Bases: object

Store a single event in the LHE format.

__init__(eventinfo, particles, weights=None, attributes=None, optional=None)[source]

Methods

__init__(eventinfo, particles[, weights, ...])

tolhe([rwgt, weights])

Return the event as a string in LHE format.

Attributes

graph

Get the graphviz.Digraph object.

property graph

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)

tolhe(rwgt=True, weights=False)[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.