Asymmetric errors in TH1

Is it possible to clip an error bar in a histogram?

For instance: on a probability histogram (TH1F), is there a way to keep the error bar maxima and minima always below 100% and above 0%?

The only way I know is TGraphAsymmErrors, but that would require a complete change on my software.

Danilo Enoque

Hi Danilo,

“Clipping” error bars is just “fixing” (not even) the extreme cases. If you need to clip them it means that your error calculation is inappropriate for your histogram calculation. As you already said, the proper way to deal with this is to use TGraphAsymmErrors, and algorithms like e.g. TGraphAsymmErrors::BayesDevide().

Cheers, Axel.