Ntuples look wrong?

Hi everyone,
I generated my ntuples from a big one, however it looks very strange when I started my analysis, and I really don’t know what happens since the code is running well and looks good so if there is something wrong, it is beyond of my knowledge. So I need some help to know what happens please.
Here is my code which generates the ntuple, the ntuple is very big to be attached so here is a link of my dropbox to access the file root :

https://www.dropbox.com/s/vn0mpid9wk1fqlw/treeMerged.root?dl=0

And the problem is if I tried to plot the dielectron mass in the barel for instance, by:

redTree->Draw("dielectron_mass >> hmass(200,75,105)","scale1fb && abs(electron0_p4.eta()) < 1.5 && abs(electron1_p4.eta()) < 1.5"); it gives a very strange shape.
In the endcap by :

redTree->Draw("dielectron_mass >> hmass(200,75,105)","scale1fb && abs(electron0_p4.eta()) > 1.5 && abs(electron1_p4.eta()) > 1.5");

or the dielectron mass only by :

redTree->Draw("dielectron_mass >> hmass(200,75,105)","scale1fb"); 

give something strange too.
Only the barel with golden eletrcons by:

redTree->Draw("dielectron_mass >> hmass(200,75,105)","scale1fb && abs(electron0_p4.eta()) < 1.5 && abs(electron1_p4.eta()) < 1.5 && electron0_class == 0 && electron1_class==0"); seems to have a good shape
I think there is something that is wrong but unfortunately I don’t know what, So I would really appreciate if someone could help.
Cheers
ElectronLooper.cc (15.1 KB)

Hi,

what does strange mean in this context? Do you have evidence or hints that there might be a ROOT related matter involved?

Hi dpiparo,
I think if the way I code it is misunderstood by root, I will not have the result expected. What I obtain may be caused by the way I code it that’s why I am asking.

Sorry, I do not understand. Could you try do better define the issue?

Hi danilo,
Don’t worry, in fact I did an ntuple, but the result doesn’t give me what I expected. So I say maybe the way I did the code especially my selection is wrong, even if it seems to me logic and runs without errors, since I am not so good in c++ and root it may have something wrong I didn’t take into account which cause the shape of my ntuples. (In my selection I am asking for tight electrons).
I gonna attach some more files included in the code
Cheers
electronSelections.h (50.4 KB)
electronSelections.cc (80.8 KB)

Looking briefly at your “ElectronLooper.cc” file, I would say that maybe your “selection criteria” are too “loose” (i.e. maybe you “accept” too many entries from the original tree).
For example, if I try: redTree->Draw("dielectron_mass:(electron0_class + 5 * electron1_class) >> h(25, 0, 25, 40, 70, 110)", "", "colz") I can clearly see that there are some five “electron[01]_class combinations” which contribute to these sharp peaks in “dielectron_mass” (electron1_class=0 && electron0_class=0,1 and electron1_class=3 && electron0_class=0,2,3 ).
I think that you will need to talk to someone who is really familiar with your “Events” tree (in order to “toughen” your “selection criteria”).

Hi Pepe,
Thanks for replying, yeah I think selection caused these strange shape. Unfortunately the guy who is familiar with these trees Events returned to US, but I will try to contact him.
Cheers

If you then also try:
gPad->SetLogz(1);
you will also notice that there are always significantly fewer entries for electron0_class=2 (for any electron1_class).