madminer.lhe module¶
-
class
madminer.lhe.
LHEProcessor
(debug=False)¶ Bases:
object
Parton-level observable calculation
Methods
add_observable_from_function
(name, fn[, …])Adds an observable defined through a function. add_lhe_sample add_observable analyse_lhe_samples read_benchmark_names save set_default_observables -
add_lhe_sample
(filename, sampling_benchmark, is_background=False, rescale_factor=1.0)¶
-
add_observable
(name, definition, required=False)¶
-
add_observable_from_function
(name, fn, required=False)¶ Adds an observable defined through a function.
Parameters: - name : str
Name of the observable. Since this name will be used in eval() calls for cuts, this should not contain spaces or special characters.
- fn : function
A function with signature observable(p) where the input arguments are lists of ndarrays and a float is returned. The function should raise a RuntimeError to signal that it is not defined.
- required : bool, optional
Whether the observable is required. If True, an event will only be retained if this observable is successfully parsed. For instance, any observable involving “p[1]” will only be parsed if there are at least two particles passing the acceptance cuts. Default value: False.
Returns: - None
-
analyse_lhe_samples
()¶
-
read_benchmark_names
(filename)¶
-
save
(filename_out, filename_in=None)¶
-
set_default_observables
()¶
-