TRatioPlot interference

Is it possible to “delete” the TGraphAsymmErrors, but to keep the frame (lower pad, axis etc…)?
Regards

I am wondering why you are using TRatioPLot as you are trying to remove or bypass all the features it provides !! :frowning: … You better make two pads on top of each other and draw whatever you want inside.

For now everything is ok, except the “nan” large error bars when the denominator hist is empty I guess. Above you said (1), but I used " TH1::SetDefaultSumw2()" before creating the hist, so the errors should be set properly right? if yes why should I intervene in TRatio error computation?
Regards

(1)
“You should set the error properly and may be set the error ro 0 hone your computation leads to a wrong result.
It is up to you to decide what is the best solution in that case.”

I if you comment:

ratio_noniso -> GetLowerRefGraph() -> SetMinimum(0.);

The large errors on empty bins go away (at least for me)

It does not work for me.
Regards

To make it easier to debug I have created a smaller version of your macro properly formatted and intended having only (I guess) the necessary code showing the problem. It is attached here. Can you tell me if that macro shows the problem you are talking about ? if yes I propose we stick to this one for further debugging.

calbet4.C (10.6 KB)

  • Ok, thank you.
  • I just run your code and I have this (1), so for the last ratio bin, you have the large error bar too.
    Regards

(1)
image

Ok. But may be that’s normal given the low statistic you have … what would you expect ?

Dear Couet,
this is not a low stat bin, the bin is really empty (for at least one of the hist), so for me there should be nothing.
Regards

I have made a new version of the macro which shows the 2 histograms and the graph separately.
As you can see the graph has 3 points corresponding to the 3 none empty bins of the 2nd histogram.
Seems correct …

calbet4.C (7.7 KB)

Dear Couet,
ok, thank you very much for your investigation!
Regards

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.