Function OrbitUtils::bunch_twiss_filtering#

Function Documentation#

int OrbitUtils::bunch_twiss_filtering(Bunch *bunch_in, Bunch *bunch_bad, double coeff_x, double coeff_y, double coeff_z)#

Bunch filtering according to the Twiss parameters. bunch_in is the input bunch, and bunch_bad collects the macro-particles that are exluded from the initial bunch. The coefficients are from 0 to infinity and define the limit for the ratio (gamma*x^2+2*alpha*x*xp+beta*xp^2)/(2*emittance) The function returns the total number of removed particles.