#include #include #include #include #include #include #include //root[0] .L plotHFMassFitterOutput.C+ //root[1] plotHFMassFitterOutput(2) //input: pt bin you want to plot; path of the HFMassFitterOutput.root file //three lines of fit: //grey= background with parameters from the fit on the side-bands //red= background with parameters from the total fit //blue= total fit void plotHFMassFitterOutput(Int_t ptbin, TString path="./"){ TString stdfilename="HFMassFitterOutput.root"; stdfilename.Prepend(path); cout<<"Opening "<IsOpen()){ cout<<"File "<Get(histoname); if(!h) { cout<Get(histoname); if(!h){ cout<_): "; cin>> histoname; h=(TH1F*)fin->Get(histoname); if(!h){ cout<SetName(histoname); } } if(h){ cout<GetFunction("funcbkgFullRange"))->SetLineColor(14); (h->GetFunction("funcbkgFullRange"))->SetLineStyle(4); Double_t xmin,xmax; (h->GetFunction("funcbkgFullRange"))->GetRange(xmin,xmax); Int_t nfreepar=h->GetFunction("funcbkgFullRange")->GetNumberFreeParameters(); cout<<"nfreepar = "<GetBinWidth(3)<GetParameter(0)<GetParameter(1)<GetParameter(2)<GetExpFormula()<GetFunction("funcmass"); cout<<"Parametri massa input:\n"; cout<<"par0= "<GetFunction("funcmass")->GetParameter(0)-h->GetFunction("funcmass")->GetParameter(nfreepar)<GetParameter(1)<GetParameter(2)<SetSideBands(kFALSE); //funcbkgfullrange_deep TF1 *fbkgfullrange_deep=new TF1("fbkgfullrange_deep",fitter,&AliHFMassFitter::FitFunction4Bkg,xmin,xmax,nfreepar,"AliHFMassFitter","FitFunction4Bkg"); fbkgfullrange_deep->SetParameter(0,(fmass->GetParameter(0)-fmass->GetParameter(nfreepar))); //lin exp pol2 no-bkg if(nfreepar>=2) fbkgfullrange_deep->SetParameter(1,fmass->GetParameter(1)); //lin exp pol2 if(nfreepar==3) fbkgfullrange_deep->SetParameter(2,fmass->GetParameter(2)); //pol2 fbkgfullrange_deep->SetMinimum(0); cout<<"Final parameters:\n"; cout<<"par0= "<GetParameter(0)<<"\tcompare with "<Integral(xmin,xmax)<Draw("sames"); } else { cout<