Michael, I will investigate this problem once I will be back to CERN on Thursday. Meanwhile, could you send me a running script showing the problem? I have some suspicion about your h2D->FindBin(x,y). Rene Brun Michael Wiesmann wrote: > > Hallihallo Rooters! > > I have a TH2F h2D, I check a bin content a la > h2D->GetBinContent( h2D->FindBin(x,y)); //returns 17 > > I have a TF2 fitFcn,I check a value a la > fitFcn->Eval(x,y) // returns 12.5 > //same with TF1::EvalPar(x,parameter) > > Now I do > h2D->Add(fitFcn,-1.0); > h2D->GetBinContent( h2D->FindBin(x,y)); /returns 7.76 > > Naively I would expect 17-12.5 to be 4.5. Obviously I am too naive for > this problem. > > I tried to use TH1F::Eval(TF1,"A"), which gave me (17+12.5=) 26.2, > which is at least consistent. > > Sounds like TH2F::Add(TF1) uses another set of parameters. > > Any hint what I missunderstood? > > Michael > > PS: I am using root 3.03/09 on RH Linux 7.2
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:12 MET