Getting the ProjectionY

Dear Experts,
I have a question regarding taking the projection along Y axis of a 1D histogram. I have a 1D histogram where I give the yield of particle along the pT (X axis). I want to get a histogram when I project it to Y axis.
I tried doing TH1D* PhiY = pT_hist -> ProjectionY(); But I am getting the error like,
Can’t call TH1D::ProjectionY() in current scope

** pT_hist is also a 1D histogram with different pT binning along X axis.

Thank you!!


ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided


Hi,

You cannot project a 1D histogram, you can do it from a 2D histogram or a TProfile.
What exactly do you mean projecting on a Y axis of a 1D histogram ?

Lorenzo

hi Moneta,
Thank you!
I have a 1D histogram with pT on the X axis and the count of particles on the Y axis. I do not know whether the term projection fits or not. But I want to see the distribution by taking the yield of the particle as a X axis.

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