Created attachment 10 [details] corrected source GSPM generates an erroneous CDG spectrum. 1. The break point of CDG spectrum is on 18 MeV instead of 18 keV. 2. The normalised cumulative histogram is calculated wrongly. Misoperation of the module happens because when determing the breakpoint in G4SPSEneDistribution::GenerateCdgEnergies and at the calculating cumulative histogram in G4SPSEneDistribution::CalculateCdgSpectrum it is not specified, that energy should be in keV. After correction the module operates fine. G4SPSEneDistribution::CalculateCdgSpectrum() new: < CDGhist[i+1] = CDGhist[i] + (pfact[i]/omalpha)* < (std::pow(ene_line[i+1]/keV,omalpha)-std::pow(ene_line[i]/keV,omalpha)); --- old: > CDGhist[i+1] = CDGhist[i] + (pfact[i]/omalpha)* > (std::pow(ene_line[i+1],omalpha)-std::pow(ene_line[i],omalpha)); G4SPSEneDistribution::GenerateCdgEnergies() 896c896 new: < ene_line[1] = 18.*keV; --- old: > ene_line[1] = 18.; I have attached the corrected source to this report. Best regards, Alexey Tkachenko
Thank you for reporting. The problem is forwarded to the author of the code.
The bug has been fixed in G4 9.1 release.