TProfile2D --> TProfile

Hey all,

I would like to take a TProfile2D and convert a certain area into a TProfile.
Asuuming i have measurements x, y and z if i fill a TProfile2d prof2d by prof2d.Fill(x,y,z) the z axis is the mean of z.

What i want to get is a TProfile/Histogram of the mean of z for a given range of Y:

So in principle the same as i would fill a TProfile prof by
if(ymin<y&&y<ymax) prof.Fill(x,z)

Didn’t found any way to convert the prof2d in to such a profile. I can profileX and profileY but not z…
Any suggestions?


Hi Felix,

It is true this method, “ProfileZ” is missing ! It exists from a TH3 but not from a TProfile2D. If you are willing to implement, please do it and then send it to me. I will then add it to the ROOT code.
Otherwise I will add a new todo item for this

Best Regards