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?
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?
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?
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");