Problem with TH1->Divide in root 3.10/02?

Hello,

I do some simple code to calculate an asymmetry:

TH1D* Pos=(TH1D*)BachMomPlus->Clone(“Pos”);
TH1D* Neg=(TH1D*)BachMomMinus->Clone(“Neg”);
Pos->Sumw2();
Neg->Sumw2();
TH1D* Plus =(TH1D*)Pos->Clone(“Plus”);
TH1D* Minus=(TH1D*)Pos->Clone(“Minus”);
Plus->Add(Neg,1);
Minus->Add(Neg,-1);
TH1D* Asym=(TH1D*)Minus->Clone(“Asym”); Asym->Reset();
Asym->Divide(Minus,Plus,1,1,“B”);

I notice in the case the asymmetry is zero then the Divide function fails to fill that bin (but it is filled with the zero in the Plus histogram). Is this supposed to happen?

I am using root 3.10/02 with gcc 3.3.2 on Fedora Core 1

Thanks,

Mark

My usual request;
Pleases end the shortest possible script (and data file) reproducing the problem.

Rene

Hi,

See attachments : demo.C and mark.root

You can see the bin between 0.35 and 0.4 is empty in the asymetry plot, but is not in the plus and minus histograms.

Thanks,

Mark
mark.root (5.94 KB)
demo.C (786 Bytes)