Roofit with constrain

Hi All, I want to use Roofit for likelihood fit with a constrain. My situation is similart to tutorial rf604 at … nts.C.html. But the difference is that I want to constrain in 2D, namely the constrain term is (a-amean,b-bmean)T^{-1}(a-amean,b-bmean), where a and b are two parameters, amean and bmean are two center value, and T is an error matrix. Could anyone tell me how to do this? Thanks!

Also I suspect that Line 83 in tutorial 604 should be " parameter f at 0.2 with resolution of 0.1" instead of " parameter f at 0.8 with resolution of 0.1". And Line 94 should be “constraint is f=0.8+/-0.1)” instead of “constraint is f=0.8+/-0.2)”


Hi, I think I found the tool I need. RooMultiVarGaussian just does the job for me.
RooMultiVarGaussian(const char* name, const char* title, const RooArgList& xvec, const RooArgList& mu, const TMatrixDSym& covMatrix);
Where xvec = (a,b), mu = (amean,bmean), and covMatrix = T^{-1}.