Filling a TH2D

Dear Root users,

I’ve been filling TH1D histograms with my defined variable D by
h1->Fill(D);

I’d like now to fill a TH2D histogram and plot D against a second variable C, so it would be D on the x-axis and C on the y-axis. I’ve spend ten minutes looking in the guide and now I have given up, can someone tell me the command line to fill, I guessed

h2->Fill(D,C); but I’m guessing this is a weight, not what I wanted?

Thanks

L

Yes you are right. That’s the way to fill a TH2D. Look at the doc here:
root.cern.ch/root/html/TH2D.html
you will see all the Fill methods.

If you use a class XXXX look at the doc of XXXX.
In your case you use a TH2D, so look at the doc of the corresponding class and member function at root.cern.ch/root/html/TH2.html#TH2:Fill

Rene