Closed JRMurias closed 1 month ago
As you can see from the error message, the constructor of TBGSubtraction
takes a TH2*
as the first argument, and not a string ("ggE"
). So simply omit the quotation marks and it should work (assuming ggE
is a 2D histogram).
It did not work wihtout the quotations but playing around i fixed the issue by adding into the line, new TBGSusbtraction(ggE).
Another thing called my attention, nothing wrong happens when gatting with only one bakground, but the viewer crashes when i use 2. I realize this as when i click to select the 2nd background, the histogram is represented by dots and after a few i need to restart again
I just tried, and I cannot reproduce that on our servers (using Ubuntu 22.04, ROOT 6.30.06, most recent GRSISort - commit 4b970a909).
Typically ROOT changes histograms from normal "hist" plotting style to the "error" plotting style on its own when the weights get set. This can e.g. happen when scaling a histogram. You can see this when you plot a normal 1D histogram without any argument. It will show the "normal" plotting style with one continuous line made up from straight horizontal and vertical segments. If you take that histogram and scale it, even if you scale it by 1.
, once you refresh the canvas it will switch to the error bar plot.
I always find very hard to separate peaks in error plot, so I suggest changing it to "hist":
d01edaf73bd199d642a42b3593bcd89876909de1
I tested it locally and it even seems to be a bit more stable (TBGSubtractor still crashes a lot, like every time I close it).
I merged that PR. TBSubtractor crashing when you close it is an old issue, it seems to have something to do with the memory management. My guess would be that ROOT is trying to delete things that have already been deleted. But apart from that I never had an issue with it crashing?
Did that PR solve your problem, @JRMurias?
Pretty much, still have the feeling that somehting is not right when re-trying fits and such but will investigate and make a new post if i cannot figure it out. Thank you guys
One note about this, by now using "hist" as a drawing option, none of the associated functions of the histogram are drawn at the same time. We could overcome this (if it ever becomes a problem) by looping over the list of functions and drawing those with option "same".
I'm trying to analyze data using the TBGsubstracitoon on both my laptop and a new desktop computer, but this error pops up on both. In my work-pc works fine and i do not understand why this is happening. Root version is 6.23 for the new desktop and 6.28 for the laptop. Grsisort versions are 4.0.0.5 and 4.0.0.4 respectively