Unweighter

class Unweighter : public madspace::FunctionGenerator

Rejection-samples a weighted batch into an unweighted one.

Keeps each event with probability weight / max_weight and returns the surviving rows (Sec. 3.4 of [1]). The first argument and return value are the weights; any further tensors listed in types are carried along and gathered for the surviving events.

batch is the leading batch dimension.

Arguments

  • the tensors named in types (the first is the event weight), plus

  • max_weight – float, scalar – the weight to unweight against.

Returns

  • the tensors named in types, restricted to the accepted events.

References

Public Functions

Unweighter(const NamedVector<Type> &types)
Parameters:

types – The per-event tensors, the first being the weight.