New to ROOT, need help with histograms

Hello,

I am completely new to ROOT and have very little experience but need to make some histograms with it. I have a huge file of data from an experiment I did. When I let ROOT draw a histogram it is made up of rather big boxes and does not show enough detail. Is there a way to set the bin size so that my histogram will have more detail?

Thanks,
Twig

Hi,

the bin size is given when creating the histogram (number of bins, axis from, axis to). As you don’t provide the code you use we can’t tell how you do that.

Cheers, Axel.

Hi Axel!

The only code provided by my instructor is the following:

TFile *_file0 = TFile::Open(“C:/…/co60.root”)
TTree *tree = (TTree *) gROOT->FindObject(“eventTree”)
tree->Draw(“Adc1”,"","")

The histogram I get with this does not show enough detail. Can you please help me with this problem?

Bye,
Twig

VIVE L’AMOUR!
see the section “Saving the result of Draw to an histogram” which begins with “If varexp0 contains >>hnew” in the http://root.cern.ch/root/html/TTree.html class description.
The easiest thing to try would be (creates a “MyFirstHisto” histogram with 10000 bins instead of the default 100):
tree->Draw(“Adc1>>MyFirstHisto(10000)”,"","")
Get familiar with:
http://root.cern.ch/drupal/content/tutorials-and-courses
http://root.cern.ch/drupal/content/users-guide
http://root.cern.ch/root/html/tutorials/
http://root.cern.ch/drupal/content/howtos
http://root.cern.ch/drupal/content/reference-guide
I am stupid. No?
Pepe Le Pew.

Thank you very much, that helped.