wataru
November 20, 2008, 10:14am
1
Hello,
I’m trying to get the error of the final value of the fitting parameter from a saved RooFitResult.
I can get the final value as follows (I’m not sure if it’s the best way, though).
fitresult->floatParsFinal()->find(“par1”)->getVariables()->getRealValue(“par1”);
Is there any way to retrieve the value of the error of the final value (HiError and LoError)?
Thank you in advance for your help.
Wataru
hejb
November 20, 2008, 10:31am
2
Hello,
I think you could obtain them more easily.
RooRealVar *par1 = new RooRealVar(…);
//…
// after the fitting
par1->getVal();
par1->getAsymErrorHi();
par1->getAsymErrorLo();
you can find more on
http://root.cern.ch/root/html/RooRealVar.html
Jibo
wataru
November 20, 2008, 11:11am
3
Hi Jibo,
Thank you for your comment.
I may have something misunderstood, but my question is something different.
I have a file only with a saved RooFitResult.
I wanted to know how to get the value from the RooFitResult in the file instead of from the RooRealVar.
Thanks.
Wataru
hejb
November 21, 2008, 10:14am
4
Hi, Wataru,
Sorry, I really misunderstood your former question. In this case I also want to know the answer.
Thanks, Jibo
Hi,
The RooRealVars stored in RooFitResult::floatParsFinal()
do contain all errors, so you can do
RooRealVar* par1_fitresult = (RooRealVar*) fitresult->floatParsFinal()->find(“par1”)
par1_fitresult->GetAsymErrorHi() ; // etc…
Wouter
1 Like