I am filling a TH3 Histogram and want to have a 2D Projection of the y and z axis for every x axis bin. Somehow just to do:
TH2D *hProjection = h3->Project3D(“yz”)->Draw(“Col”);
is not the solution which I want.
Somehow the problem can not be solved like in the case when of a TH2 when projecting the y-axis for every x-axis bin:
TFile *file = new TFile(“File.root”,“READ”);
TH2D *h = (TH2D *)file->Get(“h”);
TCanvas *c1 = new TCanvas(“c1”,"",50,50,800,800);
Int_t nbinsX = h->GetNbinsX();
for(Int_t i = 0; i < nbinsX; i++)
hProjection = h->ProjectionX(HistName,i,i+1);
Is there a similar way to solve it as described above as for the TH2 example above?
Thanks a lot in advance for the help.