particles produced in resonance decays the corresponding entry is the position of mother resonance in the list.

At variance with the V2 implementation, in the present case we must be prepared to assume that not all Born flavour configurations have the same resonance history and the same number of resonances, so we must admit Born flavour lists of different length. We thus introduce an array , carrying the length of the flavour list for the Born $f_b$ labeled by the index. The entries of this array are set in the user process subroutine.

The `POWHEG BOX` integration program (the integrator [[@Nason:2007vt]]{}) was updated in order to deal with the resonance histories. Since several resonance histories may be present, the integrator was also updated to be able to deal with a discrete (summation) variable. It now computes a multidimensional integral in a unit hypercube and the summation over a discrete index. The discrete index is used to label each resonance history. The phase space generator examines the value of this discrete index, identifies the corresponding resonance history, and chooses automatically a phase space parametrization that performs importance sampling over the resonance regions, generating the resonance virtualities with an appropriate Breit-Wigner distribution.

