Hi,
I have an ntuple and I use it to draw a 2D hist:
TFile file = new TFile(“block_0_deg_506E08_POT.root”,“READ”);
TNtuple ntuple = (TNtuple*)file->Get(“ntuple_0deg”);
TH2F hist = new TH2F(“hist”,“veritices distribution”,40,-31.,31.,40,-11.,11.);
hist->GetXaxis()->SetTitle(“z (mm)”);
hist->GetYaxis()->SetTitle(“x (mm)”);
ntuple->Draw(“x0:z0>>hist”,“1.>0.”,“CONTZ”);
which produces an empty/white canvas. The histogram has entries since cout << hist->Integral() << endl; produces the number 2376.
hist->Draw(“CONTZ”);
c=new TCanvas();
hist->Draw();
c=new TCanvas();
hist->Draw(“SCAT”);
do not work either.
I am using root 5.34/21 on Mac OSX Mavericks, standard installation.
I would be very grateful for any suggestions.
Thank you,
Cristian