ROOT Version: 6.18/02
Hi, I’m new in this forum.
I would like to graph on a TH1 the bin content of all the bins from a different TH2
TH2F *My_Th2 = new TH2F("My_Th2", "My_Th2", nbins, -10, 260, 1000, 0, 100);
TH1F *My_Th1 = new TH1F("My_Th1", "My_Th1", 110, -10, 100);
for (Int_t n = 1; n < nbins; n++){
for (Int_t i = 1; i < 1001; i++){
Double_t bincont = My_Th2 -> GetBinContent(n,i);
if (bincont > 0){
My_Th1 -> Fill(bincont);
}
}
My_Th1 -> Draw();
Thank you in advance.
D.M.