primaryIonization working version