Cuts¶
-
class Cuts : public madspace::FunctionGenerator¶
Fiducial 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)
Public Types
Public Functions
-
Cuts(const std::vector<CutItem> &cut_data, const std::optional<CustomFunction> &custom_cut = std::nullopt)¶
- Parameters:
cut_data – The cut items to apply.
custom_cut – Optional user-supplied cut function.
-
Cuts(std::size_t particle_count, const std::optional<CustomFunction> &custom_cut = std::nullopt)¶
Build a mask with no cut items.
- Parameters:
particle_count – Number of external particles.
custom_cut – Optional user-supplied cut function.
-
double sqrt_s_min() const¶
Largest required partonic center-of-mass energy, or 0 if unconstrained.
-
std::vector<double> eta_max() const¶
Per-outgoing-particle maximum pseudorapidity (infinity where inactive).
-
std::vector<double> pt_min() const¶
Per-outgoing-particle minimum transverse momentum (0 where inactive).
-
std::vector<std::vector<double>> m_inv_min() const¶
Symmetric matrix of minimum pair invariant masses (0 where inactive).
-
std::vector<std::vector<double>> dr_min() const¶
Symmetric matrix of minimum pair
delta_rseparations (0 where inactive).
-
std::vector<PairMassAny> pair_mass_any_min() const¶
The CutMode::any pair mass cuts over several pairs, which bound no pair in particular and are therefore absent from m_inv_min().
-
struct CutItem¶
One entry in a Cuts list: an Observable and its allowed range.
-
struct PairMassAny¶
A pair mass cut with CutMode::any over several pairs: at least one of
pairs(outgoing indices, beams excluded) has invariant mass >=min.