Gaussian Broadening (smearing) using Mean and Sigma

Hello,

My Geant4 simulation produces a ROOT file with and a histogram of total energy deposited in each event. Simply put, I am wondering how to apply Gaussian broadening to the histogram/peak? I have a mean and a sigma, and I need to generate a random gaussian value corresponding to this for each event, which I should be able to fill in to a new histogram.

Any ideas, suggestions, or workable examples to start with please?

Hi,
What to can do is generate data from the histogram, using TH1::GetRandom and add the smearing to the obtained data and then fill a new histogram.

Lorenzo

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