Super-K Code: Example 2

Super-K Code Example 2: Making Histograms

This example is similar to the first, except that you will now create, fill, and output histograms, and use the PAW program to view them. You may want to have a look at the PAW tutorial first. This example will focus on histograms, but take a look at the ntuple section, too: "ntuples" are a very powerful feature of PAW.

Files for this example

Copy the following files from

into your working directory:

Take a look at the differences between example1.F and example2.F. You will see that several lines having to do with histograms have been added, which call HBOOK routines. HBOOK is a CERN library histogramming package, and the histograms it creates can be read by PAW.

Compile and run this program in the same way as for example 1. You should get less output to the screen (because the print statements have been commented out), but you should get a file called example2.hbk created. This contains the histogram created and filled by the program.

Viewing the histogram

Stuff to try

After you've gotten this working and viewed the charge histogram, try some of the following. In the source code, change the histogram creation calls to:

For the above, you may need to consult the HBOOK docs.

Also, inside PAW, try:

For the above, you may need to consult the PAW docs.

Next: ntuples