Inf/NaN propagated to the pad

Using TH1D is not to remove the e-315, but to avoid the “Inf/NaN propagated to the pad” issue when you plot the histogram. Did it still happen with TH1D? If so, can you post a complete macro (using for example the small data file you posted, weight_total.txt) that you use that leads to this problem?

dastudilloYes I should’ve mentioned it I had Inf/Nan problem even after TH1D.(sorry for the wrong reply)

Finally I was able to get rid of Inf/nan pad using following.

if(weight_total < std::numeric_limits<float>::min() || weight_total > std::numeric_limits<float>::max()) continue;