Entries != integral when adding 2 rootfiles

Hi,

I have noticed that after adding rootfiles either with hadd or with TChain I get entries != integral when plotting the different trees. In the individual rootfiles (before adding them) entries == integral. This is puzzling for me. Can sb help on this? Is there sth I have not understood correctly?

thanks in advance
eleni

Hi,

This is strange. Do you have a concrete example?

Philippe.

Hi Philippe,

You can find an example in the tmp/emountri in lxplus302 (emountri.root).

cheers
eleni

Hi,

I unable to read your directory (permission are too strict):

Philippe.

Sorry, forgot to change the priviledges… should be ok now.

cheers
eleni

Hi Eleni,

In the directory I see a single large root file. However I can’t reproduce your problem.

How do you ‘add’ the file? Which files? How do you assert that ‘entries != integral’? Which exact branch/plot? Which command do you use to load the tree and plot the data? How does the result differ from your expectation?

Cheers,
Philippe.

Hi Philippe,

This is indeed the merged file and it has been created by TChain. If you look for example the variable dsVx1VxApproximD0Mass just using a TBrowser, you will see that in the entries: 6.37 10^7 while in the integral: 5.39 10^7. I would expect that these 2 values are the same (since there is no weighting). Is there sth I do not understand?

cheers
eleni

Hi,

It is a problem of numerical precision, float are too small for the amount of data you have, you need to use double. You need to use a TH1D histogram rather than the default (TH1F) to get the right answer:h2 = new TH1D("h2","h2",100,0,6); CollectionTree->Draw("dsVx1VxApproximD0Mass>>h2");

Cheers,
Philippe.

This indeed solves the problem!

thanks a lot for clearing this out! :slight_smile:
eleni