MTFB MWPC analysis Software V2.1 - Peter Cooper Wed May 23 10:34:19 CDT
2007

\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\--

Contents

\*\*\* 1. INTRODUCTION

\*\*\* 2. CHAMBERS, PHYSICAL LAYOUT, AND COORDINATE SYSTEM

\*\*\* 3. DAQ AND DATA FORMAT

\*\*\* 4. NTU2-MAKE

\*\*\* 4.1 Usage

\*\*\* 4.2 Mappings

\*\*\* 5. MTBF-ANAL

\*\*\* 5.1 Usage

\*\*\* 5.2 Examples

\*\*\* 5.3 Algorithms

\*\*\* 5.3.1 unpack

\*\*\* 5.3.2 cluster

\*\*\* 5.3.3 space points

\*\*\* 5.3.4 tracks

\*\*\* 5.4 programs

\*\*\* 6. CONSTANT DATABASE

\*\*\* 6.1 Alignment

\*\*\* 6.1.1 Space-point Alignment

\*\*\* 6.1.2 Station Alignment

\*\*\* 7. NTU4-MAKE

\*\*\* 8. PAW

\*\*\* 8.1 Kumacs

\*\*\* 8.2 Variables

\*\*\* 8.2.2 ntu2 Format

\*\*\* 8.2.3 ntu3 Format

\*\*\* 8.2.4 ntu4 Format

\*\*\* 1. INTRODUCTION

This analysis package reconstructs tracks in 4 stations of 1mm
\"Fenker\"

MWPC\'s in the Fermilab Meson Test Beam Facility (MTBF). The intention
is to

provide efficient, redundant, high precision single particle tracking
using

well established and proven techniques. This package is intended to be

stand-alone and maximally portable.

Given the layout of the MTBF MPWC system (see \[2\] below) the data are

analyzed in three steps. First the raw hits in each plane are
clusterized.

All combinations of the clusters in the planes of a station are fit to a

space-point in that station. The best fit is kept. Finally those

space-points are fit to 3 track hypotheses; the first two stations, the
last

two stations and all 4 stations.

Data are processed in two stages. First an awk script \[ntu2-make\]

pre-processes the text files recorded by the DAQ system into an ntuple
with

up to 4 hits from each of the 20 MWPC planes per event. The second stage

is a Fortran program \[mtbf_anal\] which filters that input ntuple to an
output

ntuple form \[ntu3-xxx\] with all reconstructed quantities
\[wire-clusters in

each plane, space-points in each station, and tracks in space\]. There
are

kumacs to make both the input and out ntuples available in side PAW. The

inputs and output files are simple row-wise ntuples stored in flat text
files.

Porting these to another analysis environment should be
straight-forward.

Ntu2-make is a standard awk script. Mtbf-anal, is a completely
stand-alone

standard Fortran code with no external libraries or references required.

Porting this package requires only a conventional Linux/Unix system with
awk

and g77.

The analysis code is liberated from parts of the Selex\[E781\]
reconstruction

package which I wrote some years ago. Selex had the challenge of doing

multi particle precision tracking in silicon strip detectors, MWPCs, and
drift

chambers. It has successfully met those challenges for the past 10 years
so

it seemed a sensible place from which to start. I\'ve recoded most of it
to

remove the \"hair\" which all mature software package grow over time.
The

algorithms and techniques are direct copies of those we used in Selex.

This code resides in the area on the mtbf.fnal.gov computer:

/usr/home/mtbf_user/resources/tracking/analysis/fortran

A copy of the entire software suite is kept on my desktop machine

ckm06.fnal.gov:/home/pcooper/coupp/testbeam/mtbf-anal

\*\*\* 2. CHAMBERS, PHYSICAL LAYOUT, AND COORDINATE SYSTEM

The MWPCs used are \"Fenker\" chambers \[Fermilab TM-1179\] with 1mm
wire pitch

and 128 wires per plane. Individual planes are grouped into stations of

4 or 6 views

Station 1 Station2 Station3 Station4

UVXY UVXYX\'Y\' + UVXYX\'Y\' UVXY

\<\-\-\-\-\-\-\-\-\-\-\-\-\--6.4m\-\-\-\-\-\-\-\-\-\-\-\--\>
\<\-\-\--6.0m\-\-\-\--\>

-7366mm -925mm 0 925mm 6891mm

The coordinate system used in a right handed system with Y up and Z in
the

beam direction (X is to the West). The view directions in azimuth around
the

beam line are: X=0, y=90, u=-45, V=+45 degrees. Units throughout are
\[mm\]

(e.g. the wire pitch).

At this time only the central 64 of the 128 wires are readout. For the

upstream two stations which see only the size of the beam this is likely

adequate. The instrumented region of the downstream two stations will
likely

need to be increased for some purposes (e.g. the one I have in mind).

\*\*\* 3. DAQ AND DATA FORMAT

The chambers are readout each spill with CAMAC crates of LeCroy 3377
TDCs with

FERAbus. All data end up in text files with tdc values (in 0.5 nsec
units)

for each hit wire. The beginning event from one of these files is:

\> head -12 ../../data/mwpc_run04322_0223151607.dat

runnum=4322 spilltime=Fri Feb 23 15:16:39 2007

evtnum=0 mwpcwdcnt=79

tdc chan data

1 28 420

4 18 399

6 16 426

9 8 939

12 31 928

15 25 931

21 7 367

21 9 412

The begininng of the output line resulting from running ntu2-make of
this

input is:

\> ./ntu2-make ../../data/mwpc_run04322_0223151607.dat \| head -1

4322 1 0 1.0000 28.0420 0.0000 0.0000 0.0000

1.0000 50.0399 0.0000 0.0000 0.0000

1.0000 48.0426 0.0000 0.0000 0.0000

I\'ve edited line breaks into this. Its all one line on the ntu2 file

\*\*\* 4. NTU2-MAKE

ntu2-make sorts individual 32 channel tdc data into a packed form:

channel+offset+tdc/10000. 64 wire planes are readout into successive
pairs

of 32 channel tdcs. Thus in the above example:

tdc chan data

1 28 420 ==\> 28.0420

4 18 399 ==\> 50.0399 ! 2nd Tdc in plane, offset=32

The first 3 fields of each ntu2 line are run, spill, event. The 1.000

(field 4) is the total number of hits found in plane 1. It can be as
large

as the number of wires in the plane though only the first 4 are stored
in the

ntu2.

\*\*\* 4.1 Usage

Ntu2-make reads a mtbf formated data file from stdin and writes out the
ntu2

formated data to stdout. To process a data single file:

ntu2-make /data0/data/mwpc_run04270_0220085451.dat \> ntu2-4270

To process all the files from a given run to s single output ntu2 file:

cat /data0/data/mwpc_run04270\* \| ntu2-make \> ntu2-4270

This is a vanilla unix filter script. There is nothing magic about the
output

file names \> fred works too. The file naming conventions I use is:

ntu2-\<run\> \| ntu2 flat test file for run=\<run\>

ntu2-\<run\>.ntu2 \| corresponding PAW ntuple file (made with exec
make-ntu2)

ntu3-\<run\> \| ntu3 flat test file for run=\<run\>

ntu2-\<run\>.ntu2 \| corresponding PAW ntuple file (made with exec
make-ntu3)

\*\*\* 4.2 Mappings

The mapping between tdcs and planes is controlled by a set of
associative

arrays inside ntu2-make. Shortened to just the first 4 plane station
these

would look like:

#Station 1 only map

split(\"11 11 12 12 13 13 14 14\",p)

split(\" 0 32 0 32 0 32 0 32\",w)

split(\" 1 1 2 2 3 3 4 4\",pl)

The p array is strictly mnemonic to recall to relationship between

station.plane and tdc. The pl and w arrays the plane wire offset applied
to

that tdc. Tdc are numbered by the DAQ in the order they are read.

If this station were modified to readout 128 wires in each of the 4
planes

ntu2-make would have to be modified to:

#Station 1 only map - 128 wire/plane

split(\"11 11 11 11 12 12 12 12 13 13 13 13 14 14 14 14\",p)

split(\" 0 32 48 64 0 32 48 64 0 32 48 64 0 32 48 64\",w)

split(\" 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4\",pl)

\*\*\* 5. MTBF-ANAL

\*\*\* 5.1 Usage

As with all my programs execution with no arguments gives a brief usage
help.

pcooper@ckm06\> ./mtbf-anal

Reconstruct station space points and tracks from MTBF pwc data

Peter S. Cooper FNAL March 1, 2007

Usage: mtbf_anal \<-i input file \[required\] \>

\<-c constant file \[const.ocs\]\>

\<-o output file \[none\] \>

\<-n events to process \[all\] \>

\<-p program flags \[all\] \>

\<-s events to skip \[none\] \>

\<-d dump flag \[none\] \>

flags 1 \*\* raw

2 \*\* unpacked

4 \*\* clusterized

8 \*\* space point fits

16 details

32 \*\* track fits

An input file (-i \<file\>) is required. The program will fail if an
output

file already exists - delete it and rerun. The flags are binary bit
patterns

to control program execution (-p) and debugging dumps (-d).

See the examples for other switch usage.

\*\*\* 5.2 Examples

\*\* analyze whole run

rm ntu3-4322 \| delete a previous output

time ./anal -i ntu2-4322 -o ntu3-4322 \| analyze whole run (time
execution)

mtbf_anal Wed Mar 14 15:35:26 2007

data ../ntu2-4322

events 999999

skip 0

program -1

dump 0

constants const.ocs

output x

#pwc_pos 4270 9999 fill anal v01.00 26-Feb-2007 15:10 psc ! PWC
positions

#pwc_pos 4270 9999 fill anal v01.01 3-Mar-2007 15:10 psc ! PWC positions

#sta_pos 4000 5999 fill anal v02.00 26-Feb-2007 15:10 psc ! Station
positi

mtbf_anal - done Wed Mar 14 15:35:35 2007

real 0m8.518s

user 0m8.120s

sys 0m0.250s

\*\* Analyze the 92nd event \[skip 91 (- 91) and analyze 92 (-n 92)\]
dumping just

the space point fits \[-d 8\]

./mtbf-anal -i ntu2-6064 -d 8 -s 91 -n 92

\....

\*\*\*\* event 6064 1 91

\*\* space point fits 6

sta id stat fit npl ncl x\[mm\] y\[mm\] sx\[mm\] sy\[mm\] rho chi2

0 0 0 0 0 0 0.00 0.00 0.00 0.00 0.00 0.00

2 0 123F 3F0 6 111111 -1.00 4.88 0.17 0.16 0.00 1.88

3 0 3435 D000 3 11100 -0.19 6.01 0.20 0.29 0.00 0.87

0 0 0 0 0 0 0.00 0.00 0.00 0.00 0.00 0.00

2 0 123F 3F0 6 111111 -1.00 4.88 0.17 0.16 0.00 1.88

3 0 1435 D400 4 11101 0.05 5.53 0.19 0.24 0.26 5.18

\*\* Again with details of fits

./mtbf-anal -i ntu2-6064 -d 24 -s 91 -n 92

\...

\*\*\*\* event 6064 1 91

\*\* space point fits 6

sta id stat fit npl ncl x\[mm\] y\[mm\] sx\[mm\] sy\[mm\] rho chi2

0 0 0 0 0 0 0.00 0.00 0.00 0.00 0.00 0.00

2 0 123F 3F0 6 111111 -1.00 4.88 0.17 0.16 0.00 1.88

5 1 0.00 -3.99 0.29 0.58

6 1 0.00 3.24 0.29 1.74

7 1 0.00 -1.00 0.29 0.02

8 1 0.00 5.00 0.29 0.41

9 1 0.00 -1.48 0.29 -1.65

10 1 0.00 4.59 0.26 -1.12

3 0 3435 D000 3 11100 -0.19 6.01 0.20 0.29 0.00 0.87

13 1 0.00 0.00 0.29 0.66

0 0 0 0 0 0 0.00 0.00 0.00 0.00 0.00 0.00

\...

\*\*\* 5.3 Algorithms

\*\*\* 5.3.1 unpack

The unpack step unpack the pack individual wire-tdc hits into internal
arrays

indexed my plane and hit.

\*\*\* 5.3.2 cluster

Presently 1 and 2 adjacent wire clusters are allowed.

\*\*\* 5.3.3 space points

Space point are found as constrained fit of three or more planes to a
single

set of local station coordinates (Xs, Ys) in the limit that all planes
in a

station are assumed to be at the same Z. The algorithm is smart in that
it

will try all 6 planes combinations in a 6 plane station then fall thru
to

5 planes, etc. It will find more than one space point if there are
multiple

tracks. It does not reuse wire clusters so it will not find the same
space

point twice.

Space point are stored internally in a common block starting at entry
number 5.

The first 4 entries are reserved for the space point selected in each of
the

4 stations for track fitting

See mtbf_anal/spt_bk.inc for the details of variable definitions, bit
masks,

etc.

\*\*\* 5.3.4 tracks

Three track fits are done the first is a full fit to all 4 stations, the

second a 0C fit (chi2=0) to stations 1 and 2, the third a 0C fit
(chi2=0) to

stations 3 and 4.

A dump of a sample event is:

\*\*\*\* event 7029 1 3

\*\* track fits 3

id stat fit npl nst x\[mm\] tx\[mrad\] y\[mm\] ty\[mrad\] chi2

0 100F FDF9F 17 4 -14.116 0.363 15.178 0.807 6.22

0.100 0.026 0.101 0.026

0 1003 39F 8 2 -14.324 0.321 15.384 0.852 0.00

0.311 0.053 0.231 0.053

0 100C FDC00 9 2 -14.393 0.560 15.424 0.620 0.00

0.267 0.141 0.317 0.141

See mtbf_anal/trk_bk.inc for the details of variable definitions, bit
masks,

etc.

\*\*\* 5.4 programs

This package is kept in a single directory mtbf-anal/. Re-compiling is

maximally simple:

\> g77 -o mtbf-anal \*F \| compile all Fortran sources, executable in
mtbf-anal

Files in the package by type are:

README This help file

mtbf-anal analysis executable

ntu2-make awk script to produce input files from DAQ file

anal.F main program

cluster.F make wire clusters

const.F readin constants - fill constant tables

dump.F make text dumps

fitspt.F fit a space point

matinv.F standard Gauss Jordan matrix inverted (originally from E1A!)

spacpt.F build and fit space point combinations

track.F fit tracks

ucopy.F copy from CERNLIB

unpack.F unpack an event

vzero.F copy from CERNLIB

bitsbk.inc bits

clust_bk.inc wire clusters

hit_bk.inc raw data and unpacked wire hits

pwc_pos_cbk.inc pwc plane constants

spt_bk.inc space points

sta_pos_cbk.inc station constants

make-ntu2.kumac flat file to HIGZ ntu2

make-ntu3.kumac flat file to HIGZ ntu3

make-ntu4.kumac flat file to HIGZ ntu4

ntu2.kumac sample use of ntu2

ntu3.kumac sample use of ntu3

ntu4.kumac sample use of ntu4

ntu2.inc ntu2 include file (for comis)

ntu3.inc ntu3 include file (for comis)

ntu4.inc ntu3 include file (for comis)

mtbf-geom.xls constant spreadsheet

spacpt.xls space point fit debugging spreadsheet

\*\*\* 6. CONSTANT DATABASE

The geometry constants are kept in a single text file \[const.ocs by
default\]

in a set of tables keyed by ranges of run numbers. There are only two
tables

at present sta_pos with the station by station parameters and pwc_pos
with the

plane by plane parameters. These tables are readin in an initialization

subroutine (const) and corresponding common blocks
\[\<table\>\_cbk.inc\] are

loaded with those constants. These commons also have computed
quantities,

like global plane positions and cross-links like a list of all the plane
in a

station kept in the station table. Think of these as linked tables in a

relational database and you have the correct model.

Each table consists of a header line \[beginning with a #\] identifying
the name

of the table and the first and last run numbers for which this table is
valid.

The rest of the field of the header line are history from Selex treated
here

as comments. Next is a line of column header (field names in DB
language)

followed by a variable number of data lines (records) to fill the table.

There is a one to one association of the field names with the internal

variable names on the corresponding constant common block \[\_cbk\]. The
number

of records is variable. In the example below we could add the constants
for a

fifth station by just adding another line. If could be in any order
since

tables are linked by name \[s1 in stations matches all planes whose name
begins

s1 in the the planes table\]. Finally a table ends with a \*end line.

After all tables are read in the derived constants are computed and
stored.

It don\'t matter which order the table appear in the file.

The example below given the station positions (sta_pos) for runs 7000

through 9999. The first field is the station name (a c\*8 variable

name_sta_pos(1,n) n=1,4 in common block sta_pos_cbk). All variables

are full documented in the associated include file \[sta_pos_cbk.inc\]

#sta_pos 7000 9999 fill anal v02.00 23-Mar-2007 13:29 psc !Station
positions

name x y z tlow thigh

s1 -0.53 -2.93 -7365.8 390 460

s2 0.69 1.19 -924.6 380 450

s3 0.71 -0.27 924.6 375 445

s4 -14.85 12.12 2752.0 330 400

\*end

Subroutine const read this file once after the first event is readin (to

know the run number) and fill each common block with the data from any
table

with a matching run number. Accepted table headers are written to stdout
to

log which constants were used.

#pwc_pos 4270 9999 fill anal v01.00 26-Feb-2007 15:10 psc ! PWC
positions

#pwc_pos 4270 9999 fill anal v01.01 3-Mar-2007 15:10 psc ! PWC positions

#sta_pos 4000 5999 fill anal v02.00 26-Feb-2007 15:10 psc ! Station
position

The above example is that printout from a run of run 4322. Notice that
there

are 2 pwc_pos table which match. Both are read the second overwriting
the

first and becoming the one used.

In the original Selex Open Constant System (ocs) these tables were free
format

and variable. Here I have simplified the system. The tables are fixed
format

and only the fields shown are read.

Short editing summary - copy a new table to the bottom of the file and
change

the values you need to. Don\'t change spacing. Change the name date and

perhaps version in the new header so the log file (stdout) can tell you
it

used your changes. The -c \<file.ocs\> command line switch allows you to
use

your own local constant file as opposed to the default version.

\*\*\* 6.1 Alignment

There are two levels of alignment in this system. The first is for space

points in each station\'s local coordinate system; the second to align
the

stations in space.

\*\*\* 6.1.1 Space-point Alignment

There is a independent coordinate system for space points in each
station.

The central X and Y wires (wire 32 when there are 64/plane) define an
origin

for each station. In the space point limit all planes in a station are

assumed to have the same Z, locally Zl=0. Given the Z spacing of our
planes

and their transverse resolution this is an excellent approximation. U,
V, Xp

and Yp planes each require a shift to align them in the local station

coordinate system. That shift is kept in the \"shift\" column of the
#pwc_pos

table:

#pwc_pos 5000 9999 fill anal v01.02 16-Mar-2007 14:25 psc ! PWC
positions

name size dw dz phi nw res res2 shift

! station plane alignments done psc 3/16/07

s1_pwc_u 128x128 -1.0 -40. -45.0 64 1.00 0.90 -0.080

s1_pwc_v 128x128 +1.0 -13. 45.0 64 1.00 0.90 0.006

s1_pwc_x 128x128 +1.0 13. 0.0 64 1.00 0.90 0.000

s1_pwc_y 128x128 -1.0 40. 90.0 64 1.00 0.90 0.000

\...

\*end

These constants are determine using the ntu2.kumac paw script. Assuming
you

have already run ntu2-make and ./mtbf-anal and are wondering why there
are

no tracks and / or no space point in some station:

\> ./ntu2-make mwpc_run01234\* \>run1234 \| make flat file for run

\> paw

PAW \> make-ntu2 run1234 \| create run1234.ntu2 from run1234

PAW \> exit \| quit paw to cleanup properly

\> paw

PAW \> ntu2 run1234 1.0 \| process run1234.ntu2

PAW \> hi/pl 18 \| look at Delta_U in station 1

Feedback the negative of the mean of this peak into the constant DB
\[replace

-0.080\] in the example above. The relevant histograms are:

Station 1 2 3 4

Xp - 26 36 -

Yp - 27 37 -

U 18 28 38 48

V 19 29 39 49

if a histogram is empty (all overflow or underflow) remake it with wider
limits

(look in ntu2.kumac for examples).

\*\*\* 6.1.2 Station Alignment

The procedure for aligning the stations in space is analogous to 6.1.1
above.

There is a paw script, ntu3.kumac, which will have to be adapted to a
given

geometry (stations are known to be moved in Z). The relevant example

histograms (scatter plot actually) are 32 (X) and 36 (Y) which compare
the

station 3 position extrapolating from space points in stations one and
two.

The alignment constants go into the x and y column in the #sta_pos
table.

These values are added to the local station coordinates to get global

coordinates.

#sta_pos 7000 9999 fill anal v02.00 23-Mar-2007 13:29 psc !Station
positions

name x y z tlow thigh

s1 -0.53 -2.93 -7365.8 390 460

s2 0.69 1.19 -924.6 380 450

s3 0.71 -0.27 924.6 375 445

s4 -14.85 12.12 2752.0 330 400

\*end

\*\*\* 7. NTU4-MAKE

The ntu4 format is a paste together of the ntu2 input and ntu3 out forms
at

the flat file level. The basic merge is with the Linux paste command.
Usage

is as:

paste -d \" \" ntu2-1234 ntu3-1234 \> ntu4-1234

To make this into a paw ntuple is exactly analogous with ntu2: viz.

\> paw

PAW \> exec make-ntu4 ntu4-4322 \| flat ntu4-4322 ==\> HIGZ
ntu4-4322.ntu3

PAW \> exit

\*\*\* 8. PAW

This system is designed to work easily with PAW. (I wrote it - my
rules!)

There are two PA kumacs to convert the input (ntu2) and output (ntu3)
flat

text files to standard PAW HIGZ files. Usage is:

\> paw

\....

PAW \> exec make-ntu3 ntu3-4322 \| flat ntu3-4322 ==\> HIGZ
ntu3-4322.ntu3

PAW \> exit

Thereafter until you change ntu3-4322:

\> paw

\....

PAW \> hi/file 3 ntu3-4322.ntu3 \| attach to HIGZ ntuple file

PAW \> nt/plot 3.schi2_1 \| plot the station 1 space point rchi2 dist

\...

Every thing works the same for the input ntuples with the string
substitution

ntu3 ==\> ntu2 in the above example. Out of habit I open ntu3 with unit
3, etc.

nt/pri 3 will print the list of ntuple variable. There is an include
file

ntu3.inc to make the same variables available to comis functions. There

are sample kumacs ntu\[2,3\].kumac which use these ntuples

\*\*\* 8.1 Kumacs

make-ntu2.kumac \| flat ntu3-\<run\> ==\> HIGZ ntu2-\<run\>.ntu2

make-ntu3.kumac \| flat ntu3-\<run\> ==\> HIGZ ntu3-\<run\>.ntu3

make-ntu4.kumac \| flat ntu4-\<run\> ==\> HIGZ ntu4-\<run\>.ntu4

ntu2.kumac \| example using ntu2-\<run\>.ntu2

ntu3.kumac \| example using ntu3-\<run\>.ntu3

ntu2.inc \| ntu2 include file for comis (from uwfunc)

ntu3.inc \| ntu3 include file for comis (from uwfunc)

ntu4.inc \| ntu4 include file for comis (from uwfunc)

\*\*\* 8.2 Variables

Note these match one for one with the variables in the ntu\[2-4\]flat
text files

\*\*\* 8.2.2 ntu2 Format

run spill evt \| run number, spill number, event number

n1u u11 u12 u13 u14 \| n1u - number of 1u wires hits

\| u11 - wire+tdc/10000 for 1st 1u wire hit

\| u12 - wire+tdc/10000 for 2nd 1u wire hit

\| u13 - wire+tdc/10000 for 3rd 1u wire hit

\| u14 - wire+tdc/10000 for 4th 1u wire hit

n1v v11 v12 v13 v14 \| repeated for all planes

n1x x11 x12 x13 x14

n1y y11 y12 y13 y14

n2u u21 u22 u23 u24

n2v v21 v22 v23 v24

n2x x21 x22 x23 x24

n2y y21 y22 y23 y24

n2xp xp21 xp22 xp23 xp24

n2yp yp21 yp22 yp23 yp24

n3u u31 u32 u33 u34

n3v v31 v32 v33 v34

n3x x31 x32 x33 x34

n3y y31 y32 y33 y34

n3xp xp31 xp32 xp33 xp34

n3yp yp31 yp32 yp33 yp34

n4u u41 u42 u43 u44

n4v v41 v42 v43 v44

n4x x41 x42 x43 x44

n4y y41 y42 y43 y44

\*\*\* 8.2.3 ntu3 Format

run spill evt nspt \| run number, spill number, event number

c1u n1u t1u c1v n1v t1v \| wire cluster for each plane

\| c1u cluster center \[mm\]

\| n1u cluster width \[wires\] (i4)

\| t1u cluster average time \[0.5 nsec\]

c1x n1x t1x c1y n1y t1y \| repeat for all planes

c2u n2u t2u c2v n2v t2v

c2x n2x t2x c2y n2y t2y

c2xp n2xp t2xp c2yp n2yp t2yp

c3u n3u t3u c3v n3v t3v

c3x n3x t3x c3y n3y t3y

c3xp n3xp t3xp c3yp n3yp t3yp

c4u n4u t4u c4v n4v t4v

c4x n4x t4x c4y n4y t4y

snp1 sfit1 xs1 ys1 sxs1 sys1 rhos1 schi2_1 \| station space point fit
results

\| snp1 number of planes in spt

\| sfit1 1 bit per plane hit

\| xs1 local x coordinate \[mm\]

\| ys1 local y coordinate \[mm\]

\| sxs1 x error \[mm\]

\| sys1 y error \[mm\]

\| rhos1 x y correlation coeff

\| schi2_1 spt reduced chi-squared

snp2 sfit2 xs2 ys2 sxs2 sys2 rhos2 schi2_2 \| repeat for all stations

snp3 sfit3 xs3 ys3 sxs3 sys3 rhos3 schi2_3

snp4 sfit4 xs4 ys4 sxs4 sys4 rhos4 schi2_4

stat1 fit1 np1 x1 tx1 y1 ty1 sx1 stx1 sy1 sty1 chi2_1 \| sta 1234 track
fits

\| stat1 status bits (see code)

\| fit1 1 bit per plane hit

\| np1 number of planes in trk

\| x1 global x coordinate \[mm\]

\| tx1 x slope

\| y1 global y coordinate \[mm\]

\| ty1 y slope

\| sx1 x error \[mm\]

\| stx1 tx error

\| sy1 y error \[mm\]

\| sty1 ty error

\| chi2_1 fit reduced chi-squared

stat2 fit2 np2 x2 tx2 y2 ty2 sx2 stx2 sy2 sty2 chi2_2 \| sta 12 track
fits

\| same as above chi2_2=0

stat3 fit3 np3 x3 tx3 y3 ty3 sx3 stx3 sy3 sty3 chi2_3 \| sta 34 track
fits

\| same as above chi2_3=0

\*\*\* 8.2.4 ntu4 Format

Exactly and ntu2 event followed by the corresponding ntu3 event. Some

variable names in PAW are modifed to avoid clashes:

run spill evt

h1u u11 u12 u13 u14

h1v v11 v12 v13 v14

h1x x11 x12 x13 x14

h1y y11 y12 y13 y14

h2u u21 u22 u23 u24

h2v v21 v22 v23 v24

h2x x21 x22 x23 x24

h2y y21 y22 y23 y24

h2xp xp21 xp22 xp23 xp24

h2yp yp21 yp22 yp23 yp24

h3u u31 u32 u33 u34

h3v v31 v32 v33 v34

h3x x31 x32 x33 x34

h3y y31 y32 y33 y34

h3xp xp31 xp32 xp33 xp34

h3yp yp31 yp32 yp33 yp34

h4u u41 u42 u43 u44

h4v v41 v42 v43 v44

h4x x41 x42 x43 x44

h4y y41 y42 y43 y44

run1 spill1 evt1 nspt

c1u n1u t1u c1v n1v t1v

c1x n1x t1x c1y n1y t1y

c2u n2u t2u c2v n2v t2v

c2x n2x t2x c2y n2y t2y

c2xp n2xp t2xp c2yp n2yp t2y

c3u n3u t3u c3v n3v t3v

c3x n3x t3x c3y n3y t3y

c3xp n3xp t3xp c3yp n3yp t3yp

c4u n4u t4u c4v n4v t4v

c4x n4x t4x c4y n4y t4y

snp1 sfit1 xs1 ys1 sxs1 sys1 rhos1 schi2_1

snp2 sfit2 xs2 ys2 sxs2 sys2 rhos2 schi2_2

snp3 sfit3 xs3 ys3 sxs3 sys3 rhos3 schi2_3

snp4 sfit4 xs4 ys4 sxs4 sys4 rhos4 schi2_4

stat1 fit1 np1 x1 tx1 y1 ty1 sx1 stx1 sy1 sty1 chi2_1

stat2 fit2 np2 x2 tx2 y2 ty2 sx2 stx2 sy2 sty2 chi2_2

stat3 fit3 np3 x3 tx3 y3 ty3 sx3 stx3 sy3 sty3 chi2_3