How to do offline analysis

Log into one of the fast replay workstations (adaql5 or adaql6) as user "e01015". (Ask the analysis coordinator Ole Hansen for the password if needed.) Then,
  1. Go to the directory ~e01015/offlana/KINEMAT/KIN#, where #=1-9, depending on the kinematics for which you would like to do replay.

  2. Make sure that the path $DB_DIR to database directory is set correctly. It should point to ~adaq/e01015/onlana/DB. For every given kinematics setting the database file may differ.

  3. Start the analyzer
          % analyzer
    Then run the offline physics analysis script:
          .x offlana-phys.C
    This script creates a filtered CODA file named
    which contains all raw information for events which pass the cuts described in the file "cuts_e01015_filter.def".

    In addition a ROOT file is created in directory "rootfiles" which we need for physics analysis. The contents of this ROOT file are described in file "output_physics.def". Edit this file to add new variables to the Tree in the ROOT file. Also, a short summary is written in the directory "summary" about every analyzed run.

  4. After analyzing the run add the run number to file PHYS/run_kin#.dat".

  5. Compare the summary of current run analysis with a standard one (summary_good.txt). If the results have big difference immediately report to analysis coordinator.

  6. Go to the physics directory:
          cd ../../PHYS/

  7. Run the analyzer as follows:
          analyzer cut_kin#.C makeplots.C
    The macro "cut_kin#.C" calls the macro "chain.C" and defines cuts for kinematics #. The macro "makeplots.C" produces a set of plots for physics analysis.

    When run as above, makeplots.C will show the results of only the runs that have been added to the results for the corresponding kinematics since the last time makeplots.C was run.

    The physics results are written to file "plots.root". "chain.C" file use's "run_kin#n.dat" file which contains run numbers and some information about particular run quality.

  8. To sum up the results of ALL good runs for some kinematics, use
          analyzer makeplots.C
    When invoked like this, makeplots.C will ask you for the name of the kinematics you want to analyze.

Ole Hansen <>
Last modified: Sat May 22 12:36:13 EDT 2004