This example is similar to the first two, except that you will now create an ntuple, and use the PAW program to view it. The PAW tutorial may help here, too.
Ntuples are quite a powerful feature of CERNlib HBOOK/PAW data analysis software: they allow you to look at the variables associated with a bunch of events, and plot any variable versus any other; you can also make selections using other variables. For instance, it is very easy to ask PAW to do something like: "plot a vs b for all events for which c is greater than 2".
This example uses a "quick and dirty" way to generate ntuples. The really proper way to do it is to create the ntuple file and write to it directly from HBOOK calls inside the Fortran source code. This is most efficient for processing a lot of data. However the method I find more convenient when you're just playing around with data, and developing analysis methods, is the following: I create a text file containing a list of events and the variables you are interested in. Next, I use a PAW kumac to create the ntuple and fill it from the text file, from inside PAW. This works fine for small amounts of data, and it's easy to make modifications.
Copy the following files from
/var/phy/project/hep/neutrino/work/schol/superk/examplesinto your working directory:
Take a look at the differences between example1.F and example3.F.
Compile and run this program in the same way as for examples 1 and 2. You should get less output to the screen (because the output goes to the file instead of the screen), but you should get a file called example3.out created. This contains the list of events and their variables.
exec example3This calls example3_setup.kumac to create the ntuple in memory, and reads the text file to fill the ntuple. It then makes a plot of charge vs time.
After you've gotten this working try some of the following:
nt/plot 1.q%t t>500&&t<1000
plots charge vs time for all times within 500 and 1000 ns.