I was using ProjectionY() but got a little confused. Supposed a Th2D* hsit,
TH2D *hist = new TH2D(“hist”,“hist”,1023,0,1023,100,0,100);
one then does the ProjectionY():
TH1D *PY = hist->ProjectionY(“PY”,firstx,lastx);
in my understanding, it integrates all the bincontent with x ranging from firstx to lastx, and projectes to yaxis.
My question is the following:
taking firstx=lastx=20 as an example, one should have hist->GetBinContent(20,iy)=PX->GetBinContent(iy),
however, it is different for sure in my case. Actually, hist->GetBinContent(20,iy-5)=PX->GetBinContent(iy), namely it is shifted in x by 5 .
If I add the option “o”, namely,
TH1D *PY = hist->ProjectionY(“PY”,firstx,lastx,“o”);
then hist->GetBinContent(20,iy)=PX->GetBinContent(iy) except the first 5 bins in PX (which is always 0.0).
I do not understand this. Please some expert help me to clarify…