Hi rooters, I'm trying to do the following: I have a histogram in a range (-0.1, 0.15) I want to fit a polinomia in the subrange (-0.1,0.05) Finally I want to get an histogram from this function with the same range of the first one (I want the values from 0.06 to 0.15 set to zero) I tried to use GetHistogram() but it return me a histogram with the range of the fit. TH1F *emmsqW2cter= new TH1F("emmsqW2cter","mm^{2} e-p C_{12}W=1.232#pm0.50 scaled to NH_{3} using clebsh gordon",100,-0.1,0.15); .... TF1 *f1 = new TF1("f1","pol9",-0.1,0.05); emmsqW1cter->Fit("f1","R0"); emmsqW1cter->Draw(); TH1F *hfitW1 = new TH1F("hfitW1","hfit1",100,-0.1,0.15); hfitW1=f1->GetHistogram(); Is there a way to get such a histogram? I also tought to define a new function defined as a sum of the polinomia in the first range and zero in the second one,and the get the histogram from that function,but it seems that it is not possible to do something like TF1 *f1 = new TF1("f1","pol9",-0.1,0.05); emmsqW1cter->Fit("f1","R0"); TF1 *f2 = new TF1("f2","pol0",0.05,0.15); f2->SetParameter(0,0) TF1 *tot=new TF1("tot","f1+f2",-0.1,0.15) How can be done something similar to this thanks Angela
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:20 MET