faca87
January 11, 2023, 5:43pm
1
Hello, I was plotting the difference between two histograms
TH1F *diff0 = (TH1F *)hBIB0->Clone("diff0");
if (!(diff0->GetSumw2N() > 0))diff0->Sumw2(kTRUE);
diff0->Add(hBkg0,-1);
diff0-> SetLineColor(kGreen);
diff0->SetOption("HIST");
diff0->Draw("EP");
and I notice that in the left part of the difference plot there are two lines
but they disappear if I don’t use EP mode to raw the difference plot
Moreover, I noticed the double line in the parent histogram if I don’t set:
hBIB0->SetOption("HIST"); hBkg0->SetOption("HIST");
then I directly checked the data without using a macro. If I plot them using EP mode in a ROOT command line, i.e. simply:
tree->Draw("e0 >> htempBkg0(8000, 0., 8000.)","","EP");
I get the double line in the histogram too
is it a problem of data or should I not use the EP mode to draw the difference, as it happens when I select EP mode?
bibbkgdifftree.c (4.3 KB)
couet
January 11, 2023, 5:53pm
2
EP means : Errors and Markers. It should not be a problem.
I will check your macro.
couet
January 11, 2023, 5:54pm
3
Well … the data files are missing.
One quick check: zoom in on the lowest bins of that histogram, e.g. from energy 0 to 500; maybe the points are actually “jumping” up and down and only seem like 2 histos because of the visual compression due to the wide range.
faca87
January 11, 2023, 7:04pm
5
Thank you the both @couet and @dastudillo
@couet : ok, I will upload the root files tomorrow…they are quite big
@dastudillo here the zoom of the parent histogram with EP option
and here without EP option
So it looks like the data is jumping, it’s not two lines.
couet
January 11, 2023, 7:21pm
7
Yes the 2 representations are correct . No need to upload le files.
couet
January 12, 2023, 7:44am
8
To see it better do bigger zoom for instance with the range 200-250
on a plot done with:
hist->Draw("HIST");
hist->Draw("EP SAME");
faca87
January 12, 2023, 2:39pm
9
Thank you the both @dastudillo and @couet
It looks like it was a problem in the ROOT file.
Making again it, we don’t have the jumping!
system
Closed
January 26, 2023, 2:39pm
10
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.