I encountered a following issue: I would like to make a TProfile2D projection out of TProfile3D with only a subset range of third axis (along which I would like to project - let’s called it x). However, this method has no explicit option to set the subset range of x axis, like the one available for (e.g.) TProfile2D::ProfileX(). Therefore the resulting 2D projection is made along whole x axis range.
The documentation offers a tip, how to resolve it:
To select a bin range along an axis, use TAxis::SetRange, eg h3.GetYaxis()->SetRange(23,56);
The problem with this is, that after setting range of x axis, and drawing the resulting projection of yz, the range is ignored, i.e. the resulting TProfile2D is always made from projection over the whole x axis range (I compared the resulting 2D profile with and without setting the x axis range).
Here is the code snippet:
TProfile3D* prof3; // some TProfile3D (in real macro properly loaded)
TProfile2D* prof3projYZ = prof3->Project3DProfile(“yz”); // projection over x axis
Do you have an idea or hint what could go wrong and the possible way how to solve it?