Distribution shape change for every try


Please read tips for efficient and successful posting and posting code

ROOT Version: ROOT 6.22/08
Platform: (Lxplus)
Compiler: I usually run this way: root macroname.C


Hi, I am drawing one variable of sample, strangely their distribution is not same every 4 tries. I thought it is caused by “eventweight” option that I applied to histogram but other variable shape does change with same condition. I guess it is bug. Somebody can give me advice to fix this strange behavior?

Hi @miran,

Some information is missing in your last post. What are you trying to achieve? Could you please attach the source code of your macro so that we can (hopefully) reproduce -or, at worst, tell if there is something suspicious there-?

Cheers,
J.

Sorry for the late.
I have attache all necessary material, 2 macros and 8 samples.
I really hope that you can help me to find the errors.
Plot with event weight:Ratio_Tau0Tau2_ew.C
Plot without event weight: Ratio_TauoTau2_NOew.C

Ntuple2DratioNOew_ggH.root (92.1 KB) Ntuple2DratioNOew_ttH.root (96.2 KB) Ntuple2DratioNOew_VBFH.root (93.4 KB) Ntuple2DratioNOew_ZZTo4l.root (94.5 KB) Ntuple2Dratio_ggH.root (121.1 KB) Ntuple2Dratio_ttH.root (141.2 KB) Ntuple2Dratio_VBFH.root (122.3 KB) Ntuple2Dratio_ZZTo4l.root (121.9 KB) Ratio_Tau0Tau2_ew.C (4.8 KB) Ratio_Tau0Tau2_NOew.C (4.7 KB)

The macros you attached draw existing histograms.
Your problems seem to originate in the routines that fill these histograms (you probably need to add some cuts there, e.g., something like “tau_0 > 0” and “tau_2 > 0”).

Actually, first and second try roots I don’t have because I though that the reaming previous root file cause this strange behavior. Therefore I regenerated root files every time by eliminating previous root file. but root file are made with exactly same macro.

I calculated ratio tau0/tau2 and tau2/tau0.
To avoid dividing with “0”, I add the condition that denominator should not be zero
if(Tau[2]!=0.){
Ratio_Tau0Tau2->Fill(Tau[0]/Tau[2],eventWeight);
}
If this condition makes the problem, what can i change it?
Thank you in advance.

Try with: if(Tau[0] > 0 && Tau[2] > 0) {

If you still see problems, attach the whole macro for inspection.