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