I am looking for some function for approximating or smoothing the original data. The approximated data then I want to use for drawing a TGraph. Do have such a method in ROOT?
I had a look in TGraphSmooth. But for using smoother function from TGraph we should give a input graph. I tried the following:
TGraph *gr1 = new TGraph(T1->GetSelectedRows(),T1->GetV2(), T1->GetV1());
TGraphSmooth *gs = new TGraphSmooth(“normal”);
gr1 = gs->SmoothSuper(gr1,"",1); //After drawing a graph its doing “smoothing”
What I am looking for, is first smooth the original data and then plot it. Do anybody have an idea?
I tried SmoothSuper() and Approx() methods already. Let me explain my problem in detail.
My original code is:
T1->Draw("(a0+a2):T", ,“same”);
TGraph *gr1 = new TGraph(T1->GetSelectedRows(),T1->GetV2(), T1->GetV1());
TGraphSmooth *gs = new TGraphSmooth(“normal”);
gr1 = gs->SmoothSuper(gr1,"",1); [color=#FF0040]//Here for Smoothing the graph it needs to pass “gr1” as a agument. [/color]
This means, first need to create a graph and then that TGraph is get smooth by TGraphSmooth. But what I am looking for is: First smooth the data e.g: first smooth a0 and a2 and then plot a graph of smoothed data. So I am looking for [color=#FF0040]some method which will smooth the TTree data[/color].
Do ROOT have some method in which we can smooth only some specific part of the TGraph? Means can user give a rang for TGraph to smooth the data belongs to that rang only?
Do ROOT have some method in which we can smooth only some specific part of the TGraph? Means can user give a rang for TGraph to smooth the data belongs to that rang only?
Thank you.[/quote]
Hello,
I have the same question here. Did you get the answer??