pylhe.LHEHeader

class pylhe.LHEHeader(initrwgt: LHEInitRWGT, extra_elements: list[Element] = <factory>, extra_attributes: dict[str, str]=<factory>)[source]

Bases: object

Represents the header block of an LHE file as a dataclass.

__init__(initrwgt: LHEInitRWGT, extra_elements: list[Element] = <factory>, extra_attributes: dict[str, str]=<factory>) None

Methods

__init__(initrwgt, extra_elements, ...)

tolhe(lheformat)

Return the header block as a string in LHE XML format.

Attributes

attributes

Return all the attributes of the header element

initrwgt

<initrwgt> block information

extra_elements

Other XML elements stored directly inside the header block

extra_attributes

Attributes of the header element not represented by dedicated fields

property attributes: dict[str, str]

Return all the attributes of the header element

extra_attributes: dict[str, str]

Attributes of the header element not represented by dedicated fields

extra_elements: list[Element]

Other XML elements stored directly inside the header block

initrwgt: LHEInitRWGT

<initrwgt> block information

tolhe(lheformat: LHEXMLFormat = LHEXMLFormat(indent='  ', compress=False, weights=<LHEWeightFormat.RWGT: 'rwgt'>, eventinfo='{nparticles:3d} {pid:6d} {weight: 15.10e} {scale: 15.10e} {aqed: 15.10e} {aqcd: 15.10e}', particle='{id:5d} {status:3d} {mother1:3d} {mother2:3d} {color1:3d} {color2:3d} {px: 15.8e} {py: 15.8e} {pz: 15.8e} {e: 15.8e} {m: 15.8e} {lifetime: 10.4e} {spin: 10.4e}', initinfo=' {beamA: 6d} {beamB: 6d} {energyA: 14.7e} {energyB: 14.7e} {PDFgroupA: 5d} {PDFgroupB: 5d} {PDFsetA: 5d} {PDFsetB: 5d} {weightingStrategy: 5d} {numProcesses: 5d}', procinfo='{xSection: 14.7e} {error: 14.7e} {unitWeight: 14.7e} {procId: 5d}')) str[source]

Return the header block as a string in LHE XML format.