Cuts¶
- class madspace.Cuts(*args, **kwargs)¶
Bases:
FunctionGeneratorFiducial phase-space cuts, as a compute-graph acceptance mask.
Builds a per-event
mask(1 for events passing every cut, 0 otherwise) from a list of cut items [1]. Each item evaluates one Observable for its particle selection and requires the result to lie in[min, max]. When the selection yields several values, CutMode decides whether all or any of them must pass. See Sec. 3.2.4 of [1]. An optional CustomFunction of type CustomFunction::cut multiplies its value into the mask.The accessors re-expose the active lower bounds in the layout the phase-space mappings consume.
pt_min()andeta_max()are indexed by outgoing particle, with index 0 the first outgoing particle and the two beams excluded.m_inv_min()anddr_min()are symmetricn_out * n_outmatrices indexed by outgoing-particle pair. A bound of0, or infinity foreta_max(), means the cut is inactive. Only bounds that every selected object must satisfy are reported: an ordered selection (a rank, not a particle) or a CutMode::any cut over several objects stays a filter.batchis the leading batch dimension.n_particlescounts the incoming and outgoing particles.Arguments
momenta–float, shape(batch, n_particles, 4)– the event momenta.
Returns
mask–float, shape(batch,)– 1 if every cut is satisfied, else 0.
References
[1] T. Heimel, O. Mattelaer, R. Winterhalder, “MadSpace”, https://arxiv.org/abs/2602.06895 (Sec. 3.2.4)
Overloaded function.
__init__(self: madspace._madspace_py.Cuts, cut_data: collections.abc.Sequence[madspace._madspace_py.CutItem], custom_cut: madspace._madspace_py.CustomFunction | None = None) -> None
- Parameters:
cut_data – The cut items to apply.
custom_cut – Optional user-supplied cut function.
__init__(self: madspace._madspace_py.Cuts, particle_count: typing.SupportsInt, custom_cut: madspace._madspace_py.CustomFunction | None = None) -> None
Build a mask with no cut items.
- Parameters:
particle_count – Number of external particles.
custom_cut – Optional user-supplied cut function.
- class CutMode(*args, **kwargs)¶
Bases:
pybind11_objectMembers:
any
all
Overloaded function.
__init__(self: madspace._madspace_py.Cuts.CutMode, value: typing.SupportsInt) -> None
__init__(self: madspace._madspace_py.Cuts.CutMode, name: str) -> None
- all = <CutMode.all: 1>¶
- any = <CutMode.any: 0>¶
- Cuts.CutMode.name -> str
- property value¶
- class PairMassAny¶
Bases:
pybind11_objectA pair mass cut with CutMode::any over several pairs: at least one of
pairs(outgoing indices, beams excluded) has invariant mass >=min.- property min¶
Lower bound on the invariant mass of the passing pair.
- property pairs¶
The pairs, as outgoing indices; one of them has to pass.
- all = <CutMode.all: 1>¶
- any = <CutMode.any: 0>¶
- dr_min(self: madspace._madspace_py.Cuts) list[list[float]]¶
Symmetric matrix of minimum pair
delta_rseparations (0 where inactive).
- eta_max(self: madspace._madspace_py.Cuts) list[float]¶
Per-outgoing-particle maximum pseudorapidity (infinity where inactive).
- m_inv_min(self: madspace._madspace_py.Cuts) list[list[float]]¶
Symmetric matrix of minimum pair invariant masses (0 where inactive).
- pair_mass_any_min(self: madspace._madspace_py.Cuts) list[madspace._madspace_py.Cuts.PairMassAny]¶
The CutMode::any pair mass cuts over several pairs, which bound no pair in particular and are therefore absent from m_inv_min().
- pt_min(self: madspace._madspace_py.Cuts) list[float]¶
Per-outgoing-particle minimum transverse momentum (0 where inactive).
- sqrt_s_min(self: madspace._madspace_py.Cuts) float¶
Largest required partonic center-of-mass energy, or 0 if unconstrained.