15h_ExpGauss = ROOT.TH1F(
"h_ExpGauss",
"Exponential convoluted by Gaussian", 100, 0.0, 5.0)
16for i
in range(1000000):
18 x = ROOT.gRandom.Exp(1.0 / 0.3)
19 x += ROOT.gRandom.Gaus(0.0, 3.0)
24f_conv = ROOT.TF1Convolution(
"expo",
"gaus", -1, 6,
True)
25f_conv.SetRange(-1.0, 6.0)
26f_conv.SetNofPointsFFT(1000)
27f = ROOT.TF1(
"f", f_conv, 0.0, 5.0, f_conv.GetNpar())
28f.SetParameters(1.0, -0.3, 0.0, 1.0)
30c1 = ROOT.TCanvas(
"c1",
"c1", 800, 1000)
35c1.SaveAs(
"fitConvolution.png")