Unweighter¶
-
class Unweighter : public madspace::FunctionGenerator¶
Rejection-samples a weighted batch into an unweighted one.
Keeps each event with probability
weight / max_weightand returns the surviving rows (Sec. 3.4 of [1]). The first argument and return value are the weights; any further tensors listed intypesare carried along and gathered for the surviving events.batchis the leading batch dimension.Arguments
the tensors named in
types(the first is the event weight), plusmax_weight–float, scalar – the weight to unweight against.
Returns
the tensors named in
types, restricted to the accepted events.
References
[1] T. Heimel, O. Mattelaer, R. Winterhalder, “MadSpace”, https://arxiv.org/abs/2602.06895 (Sec. 3.4)
Public Functions
-
Unweighter(const NamedVector<Type> &types)¶
- Parameters:
types – The per-event tensors, the first being the weight.