EventHistograms¶
- class madspace.EventHistograms(self: madspace._madspace_py.EventHistograms, context: madspace._madspace_py.Context, specs: collections.abc.Sequence[madspace._madspace_py.EventHistogramSpec], observables: collections.abc.Sequence[madspace._madspace_py.SubprocessObservables | None], reference_weight: SupportsFloat = 0.0)¶
Bases:
pybind11_objectHistograms of the final (unweighted) event sample.
Filled at combine time with the nominal weight and every SystematicsCalculator variation weight, so that each observable carries its scale envelope and PDF uncertainty band alongside its central value.
- Parameters:
context – Context the per-subprocess observable runtimes are built on.
specs – The histograms to fill.
observables –
observables[subprocess]evaluates the histogrammed observables, in the order of the specs that are not EventHistogramSpec::from_weight, for that (unmerged) subprocess’s events; anulloptentry skips the subprocess.reference_weight – What a EventHistogramSpec::from_weight histogram divides the event weight by, so that its axis does not depend on the size of the cross section: pass the cross section (the mean event weight) and a fully unweighted sample is a spike at
Zero or non-finite means the raw weight.
- fill(self: madspace._madspace_py.EventHistograms, event_weight: collections.abc.Sequence[SupportsFloat], subprocess_index: collections.abc.Sequence[SupportsInt], momenta: collections.abc.Sequence[collections.abc.Sequence[collections.abc.Sequence[SupportsFloat]]], syst_weights: collections.abc.Sequence[collections.abc.Sequence[SupportsFloat]] = []) None¶
- property specs¶
The histogram definitions passed to the constructor.
- to_json(self: madspace._madspace_py.EventHistograms, systematics: madspace._madspace_py.SystematicsCalculator = None) str¶
Bin contents normalized to cross sections (summing over bins gives the cross section of the corresponding weight); with
systematics, the scale envelope and the PDF uncertainty bands are added per bin.
- property weight_count¶
Number of weight columns each histogram carries (nominal plus every systematic variation).