This project includes all tools necessary to perform neutrino search in IceCube data
as described in http://icecube.wisc.edu/~dima/work/WISC/sbm/.

Instructions given here were used on cobalt64a computer and npx2 and npx2-uwa computer clusters.


INSTALLATION

This assumes that the IceCube software tools were installed in /net/local/icecube/i3tools/RHEL4-x86_64.

offline-software release V01-11-04 was installed in /net/user/dima/S/offline-software-V01-11-04.
Additionally within that directory the following was installed:
simclasses release V00-01-02
neutrinoflux revision 30380, modified with i3set/neutrinoflux.diff
i3helper (from within the fat-reader directory, copy after reader.h was modified with "cp -Lr")

if the fat-reader is not already in this project's directory or in BKP, get version 0.99.73 from
http://dima.lbl.gov/~dima/work/LBNL/reader/ and make the following modifications:

modifications to fat-reader:

uncomment lines in reader.h:
// #define GEOMETRY
// #define RECONSTRUCT    // GEOMETRY must also be defined when using this option
// #define FILESAVE
// #define DETAILED_INFO
// #define I3HELPER       // DETAILED_INFO should be usually also enabled
// #define MMCRECO        // decode MMCTrack blocks
// #define NEUTRINOFLUX   // calculate neutrino fluxes


Compile and run everything in bash
Before compiling source i3set/set-x64:
. i3set/set-x64
cd /net/user/dima/S/offline-software-V01-11-04
make env.sh
. env.sh
make

then cd to fat-reader and do:

make i3
make simple

afterwards make sure the path in bin/fat-reader is correct.

You can now use this executable to run fat-reader on this computer without additional steps.


CONFIGURATION INITIALIZATION

# change to directory where data will be processed
cd IC-22/data
# make sure domcal points to the valid domcal directory
# also make the default domcal file:
../../fat-reader/scripts/domcal_default.sh
# obtain configuration files
../../fat-reader/scripts/config.sh 109412
#
touch detector.dat
# and initialize it:
../../bin/fat-reader -K run-109412/*/sps-'*'
# also initialize the pandel parameterization tables:
../../bin/fat-reader -i --mode=5 --inic=6 --rmsk=3 --intr=2

# also, for each of the sim-* directories do:
cd sim-...
touch geo-f2k detector.dat
eval `grep set= run.sh | sed 's-^# *--'`
eval `grep files= run.sh`
../bin/fat-reader -i `echo "$files" | sed 's-\*.*--'`/00000-00999/GeoCalibDetectorStatus*.i3.gz


PROCESSING DATASETS

in each of the data and sim-* directories make sure that run, out, and log directories are
empty. Then on npx2 run

./npxsub.sh

on npx2-uwa run

./condor.sh

This submits the jobs necessary to process data and simulation. If the jobs do not finish processing
all files (before they are stopped by wall restrictions) resubmit them. The jobs will skip over the
files that have already been processed.


CALCULATING ANALYSIS PARAMETERS

After all sets have been successfully processed,

cd lists
./lists.sh
cd ../cuts
./opt-run.sh
# you can make some plots with matrix.kumac at this point
cd ../lists
./files.sh


SBM STEP

in directory cutz run

make
./zsort-prepare.sh

Thereafter make plots with a.kumac and create the final event selection with events.sh.

MAKING ANIMATES EVENTS

cd movie
copy event.dat file from svm_run directory into file "event". Make sure the geo-f2k points to the
right geometry. Run

./movie.sh
export PATH=.:$PATH

Run macros from movie.kumac in paw. In the macro movie set proj to 0, 1, 2, or 3 to display different
projections. Run macro "movie" with argument "1" to create animated gifs instead of ps files. You may
need to install perl-gimp in your system (so the gifs would be scaled down). Place run_* and evdt_*
gifs into appropriate directories in web directory and run "./web-make".

