Super-K Code: Example 1

A First Super-K Code Example

Here is a first Super-K program example. It's in Fortran (not exactly the language of the future) but should serve well to illustrate some of the ideas and tools.

All this program does is to take a raw Super-K data file, and dump to the screen a list of events; for each event, it then loops through the ID PMT hits and writes to the screen: hit number, cable number, charge, time.

Setup

You'll need to have run the same two setup lines as for the superscan tutorial (preferably, have put them in your .tcshrc), which should have set up a bunch of SK-related environment variables:
setenv PROJECT /var/phy/project/hep/neutrino
source $PROJECT/soft/sk-k2k-FC8-07d.login

Files for this example

Create some working directory for yourself, either in your home directory or in the /var/phy/project/hep/neutrino/work/youruserid area. Copy the following files from

/var/phy/project/hep/neutrino/work/schol/superk/examples
into that directory:

First, before doing anything else, take a look at example1.F, and see if you can follow generally what it's doing. I've put numerous comments in it (labeled by "*" in the first column) which I hope will help somewhat.

Now look at example1.sh. This is a shell script that you run in order to run the program. It uses a package called "rflists" to specify filenames. It may look a bit cryptic to you if you're not a Unix shell script expert, but the key thing to note right now is that the second to last line is the executable to run, and the stuff inside the "{{ }}" specifies information about the input file. In this example, there is only one input file (entered as a command line argument for this particular script), but in general one can specify output files too.

Finally, look at the Imakefile. This is a file used to create a Makefile, which contains information for compiling and linking the program. The last line of this Imakefile specifies that the program we are compiling is example1.

Running this example

Next example will be to make some histograms.