Smoothing of a TGraph

Dear experts,

I would like to ask you a question concerning the ROOT tools that can be used to regularize the shape of a TGraph.
In the analysis I’m working on, I need to smooth the shape of the background in order to eliminate the bin to bin fluctuations.
I can’t directly access the sample event-by-event and consequently I can’t use the TKDE class, so I tried to use the methods implemented in the TGraphSmooth Class (Approx, SmoothKern, SmoothLowess and SmoothSuper) but the results, after some tests in which I tried to change the parameters, were not satisfactory.
Do you have any suggestion?

Thank you in advance,

ROOT Version: 6.18/04

Welcome to the ROOT forum

I guess @moneta can help you but we would need some reproducer showing what you think is going wrong.

Dear Olivier,

thank you very much for your quick reply. In the attachment you can find a series of tests carried out with the methods of the TGraphSmoother Class, where data points are reported in blue, the original TGraph is the red one and the smoothed TGraph is the black one. In the title of each frame you can read the options that i passed to the method in order to perform the given test. The nout value is the dimension of the xout dataset, where x points have been chosen having values between each pair of data points.
It is possible that unsatisfactory results are caused by a general incorrect interpretation of the passed parameters or by some issue that is related to that specific case: based on your experience, do you have any comment or suggestions?

approx.pdf (24.7 KB)
smoother.pdf (51.3 KB)

Thanks for the two pdf files. They give a better idea of the problem. Let’s see what @moneta will tell about that. He is the expert in that area.

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