Error using TTree::Draw() and weights

Hello,

I am trying to plot a branch of my tree called “xideg” with a certain cut “cut”, and using the value stored in the eight element of another branch “epr[8]”, as follows:

t2->Draw("xideg",*cut *"epr[8]")

The plot doesn’t work and I get the following error message:

Warning in <TCanvas::ResizePad>: Inf/NaN propagated to the pad. Check drawn objects. Warning in <TCanvas::ResizePad>: c1 height changed from 0 to 10

I have plotted the variable “epr[8]” using the same cut (see attachment), and I don’t see any anomalies in it that justify the error. On the other hand, the plot of variable “xideg” works well when doing it without the weight (see attachment 2).

Anybody has some idea of what could cause that problem, and how can I solve it?

Thanks in advance,
Estela.



Hi,

Can you provide a complete running example showing the problem so that I can investigate it further?

Cheers,
Philippe.