Skip to content

FIrst version of N-particle combinatorics

Pieter David requested to merge combinatorics into master

Only for N=2, for now (and mixed with some documentation commits), it works like this:

from bamboo import treefunctions as op
osdimu = op.combine(t.Muon, N=2, pred=lambda m1, m2 : m1.charge != m2.charge)
oselmu = op.combine((t.Electron, t.Muon), pred=lambda el, mu : el.charge != mu.charge)

(and an optional argument is added to force all combinations - e.g. both (0,1) and (1,0) - which is relevant in case the selection is not symmetric)

Merge request reports