Difference between ProjectionX and ProfileX

From documents of TH2, I cannot tell the difference between ProfileX and ProjectionX. Any expert can tell the difference? If they are same, why do we have two same functions?


Hi Zhiyi,

Though I’m not an expert I’ll try to explain. Profile and projection are not the same thing. I attach a pdf with explanation: 2d-histo, its projection and its profile.

2Dhisto_and_proj_and_prof.pdf (98.1 KB)

As you can see ProjectionX makes our histo to “lose” its y-values, so we know only how many X values were in this bin when we were dealing with 2d-histo, and all the information about what were y-values is lost.
And what about profiles: for every X-bin averaged y-value is calculated.

Hope it helps!