Project3D() - letter "d" in name option

I just stumbled upon an unexpected behaviour when using the Project3D function to make a TH2 from a TH3.
I was up until now using it the following way:

TH2D* H2D_ZY = (TH2D*)H3D_XYZ->Project3D("UniqueName_zy");

with H3D_XYZ a preexisting TH3D.
However, I just found out that if the letter d appears in UniqueName, then it will replace the last histogram I plotted in a different function, despite it having a different name.
Is that expected behaviour? The option “d” is mentioned in the documentation for the ProjectionX/Y/Z() functions. However I cannot see anything about it in the documentation of the Project3D function.

Indeed that’s a real issue. I made this PR to fix it. May be @moneta can have a look.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.