Gaussian distribution

Hi all,
I want to use a gaussian distribution to smear the energy distribution with 1.0 keV standard deviation. My codes are:

#include "Randomize.hh"
#include "G4SystemOfUnits.hh"
energy_diff_total= G4RandGauss::shoot(energy_diff_total,1.0*keV);

Is this right? Can I put the 1.0*keV in the argument of shoot()

I made a test. It works.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.