{ TFile *file = TFile::Open("fitter.root"); cPtot = new TCanvas("cPtot","momentum residual",900,700); nFitter->Draw("1.0/pinv - 1.0/pinvTrue >> hPtot(200, -0.5, 0.5)"); hPtot->Fit("gaus"); Double_t ptotSigma = 2.74990e-02; cPtot = new TCanvas("cTheta","theta residual",900,700); nFitter->Draw("theta - thetaTrue >> hTheta(200, -0.02, 0.02)"); hTheta->Fit("gaus"); Double_t thetaSigma = 2.10375e-03; cPtot = new TCanvas("cPhi","phi residual",900,700); nFitter->Draw("phi - phiTrue >> hPhi(200, -0.02, 0.02)"); hPhi->Fit("gaus"); Double_t phiSigma = 1.38125e-03; cProb = new TCanvas("prob","probability",900,700); nFitter->Draw("1.0/pinv"); Double_t* pinvArray = nFitter->GetV1(); nFitter->Draw("1.0/pinvTrue"); Double_t* pinvTrueArray = nFitter->GetV1(); cout << "first p = " << pinvArray[0] << endl; cout << "first pTrue = " << pinvTrueArray[0] << endl; }