Processing the MINOS event GAF files with TIP

Using TIP

Here's a KUMAC file for opening the GAF file and reading in the first event:
macro read_gaf 1=minos_events 2=fz_gaf

filename = [1].[2]

gaf/close mygaf

isopen = 0
if ([2].eq.'fz_gaf') then
  gaf/open mygaf NAME=[filename],DRIVER=FZ,filfor=EXCH,recfor=EXCH
  isopen = 1
endif
if ([2].eq.'ie_gaf') then
  gaf/open mygaf NAME=[filename],DRIVER=IE
  isopen = 2
endif
if ([isopen].eq.0) then
  message read_gaf.kumac: Unknown file extension [2]
  message read_gaf.kumac: Attempt to open with FZ driver
  gaf/open mygaf NAME=[filename],DRIVER=FZ,filfor=EXCH,recfor=EXCH
  isopen = 1
endif

*- read geometry tables (first entry in gaf)
gaf/next mygaf
gaf/accept mygaf

*- read an event dataflow
gaf/next mygaf
gaf/accept mygaf

table/list

The macro assume the file name is split from the extension (to save typing and to allow the standard extension), so execute a command similar to:
EXEC READ_GAF GMINOS_12110
You can dump individual tables using commands like:
TABLE/PRINT ALL FLSDigit
where, here, FLSDigit is an example ESet. The pair of commands
gaf/next mygaf
gaf/accept mygaf
will read in the next event.

Example session

TIP is started from the normal user shell; commands are entered at the TIP> prompt.
$ tip
 !--------------------------------------------------------
 !ADAMO/TIP : Table Interaction and Plotting = ADAMO + PAW
 !--------------------------------------------------------
 ******************************************************
 *                                                    *
 *            W E L C O M E    to   P A W             *
 *                                                    *
 *       Version 2.04/15      14 March 1994           *
 *                                                    *
 ******************************************************
 *************************************************
 *                                               *
 *              W  A  R  N  I  N  G              *
 *                                               *
 *       Validity period for this package        *
 *                  has expired                  *
 *    Please get new version from CERN Library   *
 *                                               *
 *************************************************
 Workstation type (?=HELP) <CR>=1 :
 Version 1.20/11 of HIGZ started
 *** Using default PAWLOGON file "/user4/hatcher/.pawlogon.kumac"

  PAW Logon

 ADAMO/TAP version 3.3      with GAF version 3.2      starting

 ORACLE Driver added

 ... try to execute your TIP kumac file ...
 *** Unknown file tip.kumac

 Enter HELP TIP for help

TIP> exec read_gaf minos_events_r11101
 File not yet opened by you
 Record found: MinosGeom
 Type            : GEOM
 Version         : 1
 RunNo           : 11101
 EventNo         : 0
 Record found: GeantEvent
 Type            : GEVT
 Version         : 1
 RunNo           : 11101
 EventNo         : 1
 |-----------------------------------------------------------|
 | Page (  1,  1)                                            |
 |-----------------------------------------------------------|
 |Name            |ID  |Count|LaSeN|IniCr|MaxCr|Open|Division|
 |----------------|----|-----|-----|-----|-----|----|--------|
 |BeamSystem      |  43|    1|    1|=====|=====|   T| 4000002|
 |CellPos         |  36|  776|  776|=====|=====|   T| 4000002|
 |DigitPln        |  44|    0|    0|=====|=====|   T| 4000002|
 |FLSDigit        |  45|    0|    0|=====|=====|   T| 4000002|
 |FLSHit          |  46|    0|    0|=====|=====|   T| 4000002|
 |GeomMisc        |  37|    1|    1|=====|=====|   T| 4000002|
 |HitPln          |  47|   29|   29|=====|=====|   T| 4000002|
 |LSTHit          |  48|  245|  245|=====|=====|   T| 4000002|
 |LSTProto        |  49|    0|    0|=====|=====|   T| 4000002|
 |LSTStrip        |  50|    0|    0|=====|=====|   T| 4000002|
 |LSTWire         |  51|    0|    0|=====|=====|   T| 4000002|
 |Material        |  31|   32|  101|=====|=====|   T| 4000002|
 |MdlOrg          |  38|   24|   24|=====|=====|   T| 4000002|
 |Mixture         |  32|   63|   63|=====|=====|   T| 4000002|
 |NeuKin          |  52|    1|    1|=====|=====|   T| 4000002|
 |NeuVtx          |  53|    1|    1|=====|=====|   T| 4000002|
 |PlanePos        |  39|  600|  600|=====|=====|   T| 4000002|
 |PlaneSpec       |  40|    2|    2|=====|=====|   T| 4000002|
 |Rotm            |  33|    6|  301|=====|=====|   T| 4000002|
 |StdHep          |  54|   31|   31|=====|=====|   T| 4000002|
 |StdHepHead      |  55|    1|    1|=====|=====|   T| 4000002|
 |SubVolSpec      |  41|    0|    0|=====|=====|   T| 4000002|
 |SuperModule     |  42|    3|    3|=====|=====|   T| 4000002|
 |TMedium         |  34|   33|  101|=====|=====|   T| 4000002|
 |TPar            |  35|    1|    1|=====|=====|   T| 4000002|
 |-----------------------------------------------------------|
TIP> gaf/next mygaf
 Record found: GeantEvent
 Type            : GEVT
 Version         : 1
 RunNo           : 11101
 EventNo         : 2
TIP> gaf/accept mygaf
TIP> table/print all StdHep
 |----------------------------------------------------------------------------|
 | Table: StdHep                                                    ADAMO/TAP |
 | Count:  6                                                                  |
 | Page (  1,  1)                                                             |
 | Printed along:  ID [MINC,MAXC]                                             |
 |----------------------------------------------------------------------------|
 |ID  |Ist|IdHEP |Jmo|(2)|Jda|(2)|PHEP(1) |(2)     |(3)     |(4)     |(5)     |
 |----|---|------|---|---|---|---|--------|--------|--------|--------|--------|
 |   1|  3|    14|  0|  0|  0|  0|    .000|    .326|   5.616|   5.625|    .000|
 |   2|  3|******|  0|  0|  0|  0|    .000|    .000|    .000|  52.103|  52.103|
 |   3|  3|  2112|  0|  0|  0|  0|    .074|    .202|   -.058|    .931|    .904|
 |   4|  0|******|  0|  0|  0|  0|   -.074|   -.202|    .058|  51.172|  51.172|
 |   5|  0|    13|  0|  0|  0|  0|    .060|   1.120|   5.299|   5.417|    .106|
 |   6|  0|  2212|  0|  0|  0|  0|    .014|   -.592|    .259|   1.139|    .938|
 |----------------------------------------------------------------------------|
 |-------------------------------------------|
 | Table: StdHep                             |
 | Page (  2,  1)                            |
 |-------------------------------------------|
 |ID  |VHEP(1) |(2)     |(3)     |(4)     |  |
 |----|--------|--------|--------|--------|  |
 |   1|   -76.6|  2600.7| 38691.7|      .0|  |
 |   2|   -76.6|  2600.7| 38691.7|      .0|  |
 |   3|   -76.6|  2600.7| 38691.7|      .0|  |
 |   4|   -76.6|  2600.7| 38691.7|      .0|  |
 |   5|   -76.6|  2600.7| 38691.7|      .0|  |
 |   6|   -76.6|  2600.7| 38691.7|      .0|  |
 |-------------------------------------------|
TIP> quit
 TIP closing down ...
 ... done.
 Exiting from PAW.

Robert Hatcher <hatcher@astro.indiana.edu>
Last modified: Fri May 16 09:45:37 1997