Observable¶
- class madspace.Observable(self: madspace._madspace_py.Observable, pids: collections.abc.Sequence[SupportsInt], observable: madspace._madspace_py.Observable.ObservableOption, select_pids: collections.abc.Sequence[collections.abc.Sequence[SupportsInt]], sum_momenta: bool = False, sum_observable: bool = False, order_observable: madspace._madspace_py.Observable.ObservableOption | None = None, order_indices: collections.abc.Sequence[SupportsInt] = [], ignore_incoming: bool = True, name: str = '')¶
Bases:
FunctionGeneratorKinematic observable evaluated for a selection of outgoing particles.
Selects particles by PDG id (
pids), optionally groups them into tuples (select_pids) and sums the momenta of each tuple, then evaluates one ObservableOption for every selection [1]. Several PDG types may be combined, for example all jet flavours. The available observables are single-momentum functions (e,px,py,pz,mass,pt,p_mag,phi,theta,y,y_abs,eta,eta_abs), pair functions (delta_eta,delta_phi,delta_r,pair_mass,sfos_pair_mass), and the event-levelsqrt_s.sfos_pair_massispair_massrestricted to same-flavour opposite-sign pairs, i.e. pairs whose PDG ids areidand-id(the l+ l- pairs of MadEvent’smmll); it needs the signed PDG ids of the actual flavours inpidsand cannot be combined with ordering. The same mechanism defines the observables used by Cuts and ObservableHistograms.batchis the leading batch dimension.nis the number of selected particles andkthe number of selections.Arguments
momenta–float, shape(batch, n, 4)– the selected four-momenta.
Returns
observable–float, shape(batch,)or(batch, k)– the observable value, one per selection unlesssum_observablecollapses them.
References
[1] T. Heimel, O. Mattelaer, R. Winterhalder, “MadSpace”, https://arxiv.org/abs/2602.06895 (Sec. 3.2.4)
- Parameters:
pids – PDG ids selecting the outgoing particles.
observable – Which ObservableOption to compute.
select_pids – Groups of PDG ids forming the tuples the pair / summed observables act on; empty selects every matching particle individually.
sum_momenta – Sum the four-momenta within each tuple before evaluating the observable.
sum_observable – Sum the computed observable over all selections.
order_observable – Optional observable used to sort the selections before
order_indicesis applied.order_indices – After sorting by
order_observable, keep only these positions.ignore_incoming – Exclude the two incoming partons from the selection.
name – Label for the returned value.
- class ObservableOption(*args, **kwargs)¶
Bases:
pybind11_objectMembers:
obs_e
obs_px
obs_py
obs_pz
obs_mass
obs_pt
obs_p_mag
obs_phi
obs_theta
obs_y
obs_y_abs
obs_eta
obs_eta_abs
obs_delta_eta
obs_delta_phi
obs_delta_r
obs_pair_mass
obs_sqrt_s
obs_sfos_pair_mass
Overloaded function.
__init__(self: madspace._madspace_py.Observable.ObservableOption, value: typing.SupportsInt) -> None
__init__(self: madspace._madspace_py.Observable.ObservableOption, name: str) -> None
- Observable.ObservableOption.name -> str
- obs_delta_eta = <ObservableOption.obs_delta_eta: 13>¶
- obs_delta_phi = <ObservableOption.obs_delta_phi: 14>¶
- obs_delta_r = <ObservableOption.obs_delta_r: 15>¶
- obs_e = <ObservableOption.obs_e: 0>¶
- obs_eta = <ObservableOption.obs_eta: 11>¶
- obs_eta_abs = <ObservableOption.obs_eta_abs: 12>¶
- obs_mass = <ObservableOption.obs_mass: 4>¶
- obs_p_mag = <ObservableOption.obs_p_mag: 6>¶
- obs_pair_mass = <ObservableOption.obs_pair_mass: 16>¶
- obs_phi = <ObservableOption.obs_phi: 7>¶
- obs_pt = <ObservableOption.obs_pt: 5>¶
- obs_px = <ObservableOption.obs_px: 1>¶
- obs_py = <ObservableOption.obs_py: 2>¶
- obs_pz = <ObservableOption.obs_pz: 3>¶
- obs_sfos_pair_mass = <ObservableOption.obs_sfos_pair_mass: 18>¶
- obs_sqrt_s = <ObservableOption.obs_sqrt_s: 17>¶
- obs_theta = <ObservableOption.obs_theta: 8>¶
- obs_y = <ObservableOption.obs_y: 9>¶
- obs_y_abs = <ObservableOption.obs_y_abs: 10>¶
- property value¶
- bottom_pids = [-5, 5]¶
- jet_pids = [1, 2, 3, 4, -1, -2, -3, -4, 21]¶
- lepton_pids = [11, 13, 15, -11, -13, -15]¶
- missing_pids = [12, 14, 16, -12, -14, -16]¶
- obs_delta_eta = <ObservableOption.obs_delta_eta: 13>¶
- obs_delta_phi = <ObservableOption.obs_delta_phi: 14>¶
- obs_delta_r = <ObservableOption.obs_delta_r: 15>¶
- obs_e = <ObservableOption.obs_e: 0>¶
- obs_eta = <ObservableOption.obs_eta: 11>¶
- obs_eta_abs = <ObservableOption.obs_eta_abs: 12>¶
- obs_mass = <ObservableOption.obs_mass: 4>¶
- obs_p_mag = <ObservableOption.obs_p_mag: 6>¶
- obs_pair_mass = <ObservableOption.obs_pair_mass: 16>¶
- obs_phi = <ObservableOption.obs_phi: 7>¶
- obs_pt = <ObservableOption.obs_pt: 5>¶
- obs_px = <ObservableOption.obs_px: 1>¶
- obs_py = <ObservableOption.obs_py: 2>¶
- obs_pz = <ObservableOption.obs_pz: 3>¶
- obs_sfos_pair_mass = <ObservableOption.obs_sfos_pair_mass: 18>¶
- obs_sqrt_s = <ObservableOption.obs_sqrt_s: 17>¶
- obs_theta = <ObservableOption.obs_theta: 8>¶
- obs_y = <ObservableOption.obs_y: 9>¶
- obs_y_abs = <ObservableOption.obs_y_abs: 10>¶
- photon_pids = [22]¶