E852 Documentation: The MPS Alignment Program
E852 Documentation: The MPS Alignment Program
Introduction
The MPS Alignment program, 'mpsAlign' produces MPS wire chamber
alignment and calibration parameters and various chamber diagnostic
information.
Wire chamber parameters
In addition to parameters store in the 'space.db' file
in the 'db-files.Map' map manager file, derived from
the 'je852.par' master parameter file, each chamber has additional
parameters stored in the 'space.Map' map manager file.
- offset - additional offset (it is added to the offset in the 'space.db' file)
- exclude001, exclude002, ... - array of 'bad' wires. Positive numbers in this array
correspond to wire numbers that have to be ignored. The 'event' program will display such
wires as small crosses. Number zero is ignored. Number (-1) is the end of the exclude list.
- d0 - see discussion below.
- t0 - see discussion below.
- driftv - see discussion below.
- tdc_min - see discussion below.
- tdc_max - see discussion below.
- efficiency - chamber efficiency
MPS PWC (beam and TPX) parameters
The TPX chambers have only the 'offset' and 'exclude' entries.
MPS Drift Chamber parameters
These chambers have the 'offset', 'exclude', 'd0', 't0', 'driftv' and 'tdc_min'
parameters.
TDX4 parameters
TDX4 uses the 'offset', 'exclude', 'd0', 't0', 'driftv', 'tdc_min' and 'tdc_max'
parameters.
- tdc_min and tdc_max define the TDC time window used to suppress
'out-of-time' hits, which are seen because of the large dynamic range
of the LeCroy 1876 TDCs used for the chamber readout.
- t0, d0 and driftv have same meaning as for the MPS Drift Chambers.
Also, depending on how the alignment was done, these parameters might
be defined as: 'd0' defined to be zero, 't0' is the minimum drift time (the front edge
of the TDC distribution).
Also note that the drift velocity for TDX4 is negative because the LeCroy 1876 TDCs
run in the 'common stop' mode.
Alignment Modes
The MPS Alignment program can operate in different modes:
- -F1 (external alignment) - the chambers are aligned using the beam
extrapolation from the A5 and A6 beam chambers. This alignment requires working beam chambers
and one should be able to see the beam profile in the chambers to be aligned.
Before running the alignment program, the chambers must either have to be aligned to about 1 cm
by hand by looking at the events in the 'event' program or the -w10 switch should be used.
In this mode, the offsets of the chambers can be determined with 0.0100 cm accuracy,
the 't0', 'd0' and 'driftv' parameters are also calculated.
The (-F1) mode is usually used to check the alignment of TDX4 with respect to the beam line
before running the (-F2) mode.
- -F2 (external alignment with TDX4) - the chambers are aligned using the beam
track reconstructed from the A5 and A6 beam chambers and TDX4.
Before proceeding
with this alignment, the correct MPS angle (angle between the beam line and
the MPS magnet center line) has to be entered in the 'je852.par' and 'space.db' files. If an incorrect
angle is used, the MPS chambers will be 'scewed' (shifted) and will be inconsistent
with the MPS magnetic field map.
Otherwise, The (-F2) mode is identical to the (-F1) mode.
- -F3, -F4 (internal alignment) - uses the reconstructed tracks to calculate
offsets, t0, d0 and drift velocities. The (-F3) and (-F4) modes provide the final
alignment and calibration.
Usually, after the (-F1) and (-F2) alignment is done,
the track reconstruction software becomes operational and starts reconstructing tracks.
At this point, the alignment process becomes iterative:
- the analyzer is used to reconstruct tracks, using the current drift parameters
- the alignment program uses these tracks to calculate improved drift parameters
- the analyzer reconstructs tracks, using the improved parameters
- the procedure repeats starting from step 2 unless the person doing alignments
is satisfied with the obtained results.
- -F5,...,-F8 modes: check the alignment program 'usage' and source code to learn about
parameters calculated in these modes.
Usage of the alignment program
See the 'mpsAlign' usage by running 'mpsAlign -h'.
In case of inconsistencies between this document and 'mpsAlign -h', the output
of 'mpsAlign -h' should be assumed to be more correct.
Switches are:
- -h - print usage
- -H - produce a bunch of histograms in the E852_HIST directory. These
histograms can be looked at with the 'Hist' program.
- -Fm - set the alignment mode (see discussion above)
- -rNNNN - load parameters for run NNNN. This switch *must* be set. The alignment
program does *not* look at data to determine run numbers.
- -Mxxx - process only NNNN events from the input file.
- -wNNN - consider only hits within NNN wires from the track.
- -Wxxx - ignore all wires except wire xxx.
- -pN1,N2,... or -pN1-N2 - align planes number N1,N2,... or planes N1 through N2.
- -pX,Y,U,V - align all planes X, Y, U and V. Any combination of planes is allowed.
The plane numbers are same as in the 'space' printout.
- -f0, -fh - turn magnet off or half field. Default is 'magnet on'.
- -fsXXX - set the field scaling factor.
- -xNNN - consider only tracks with chi-square less than NNN. By default, no cut is made.
- -3 - use beam chambers A3 and A4 instdead of A5 and A6 for beam reconstruction.
- -4 - use beam chambers A3, A4, A5 and A6 for beam reconstruction. Will produce incorrect
results for data where the Quadrupole magnets were on.
A typical command would be:
> mpsAlign -r7027 -f0 -p25,40 -F1 run7072.dat -H
Output of the Alignment Program
The alignment program produces the following output:
- alignment results in human readable form - on standard output, see also the discussion below.
- new offsets, t0, d0 and drift velocities - in the './auto_align.db' file. To use the new
parameters, one has to load them into the map manager using the storeMM program. See below
on how to do it.
- histograms in E852_HIST - these are shared memory histograms produced
by the E852 'hist' package (see the 'hist.h' include file for more details).
These histograms can be viewed and printed using the 'Hist' program.
Stdout output
This section is supposed to explain the output printed by 'mpsAlign'
storeMM
The alignment program writes the alignment results in the auto.align.db.
Tho store these results into the Map Manager, run the following command:
> storeMM auto.align.db
The typical output of this program looks like this:
loki % storeMM auto.align.db
param.loadDatabase: Loading database 'align-setup' for run 7060...from the Map Manager
Alignment file auto.align.db, run 7060 would be stored as run 7060
Processing chambers: TDX4A.t.d.v.o.TDX4B.t.d.v.o. done.
loki %
Usually, the 'storeMM' program uses the run number written into the 'auto.align.db' file
by the 'mpsAlign' program which takes the run number from it's -rRRRR argument.
However, one can save the alignment results into an arbitrary run number by putting the
run number as second argument on the 'storeMM' command line, for example:
> storeMM auto.align.db 7060
histograms
This section is supposed to explain the meaning of various histograms
produced by the 'mpsAlign' program.
//CO 09 May 1994
//CO 18 Dec 1994