Hello everyone,
I have 2 TH2F histos, 1st one with data, 2nd one with background that I want to subtract from the data. After the second diagram has been fitted with function
Double_t fun2(Double_t *x, Double_t *par) {
Double_t z2 = x[0]*x[0]/par[0]/par[0] + x[1]*x[1]/par[1]/par[1];
z2 *= par[2]*par[2];
return -sqrt(z2) + par[3];
}
I want to subtract background, as I see here, I should fill TH2F using my function like this
for (int i=0;i<nb;i++)
{
float x=h3->GetBinCenter(i);
float y=fun->Eval(x);
h3->Fill(y);
}
Сan anyone tell me what this cycle looks like in my TH2F case?
thanks