Pattern recognition in main tracker is divided into four passes.
The first pass finds straight track candidates
in the x projection processing only the hit information from the 0-degree
layers of the pattern tracker down-stream of the magnet.
This step consists of a track seed finding and of a track following.

The second pass finds the corresponding vertical
track candidates in the y projection using simultaneously the hit information
from stereo layers. Hits of vertical and horizontal candidates are combined and
3D track candidate is created

In the third pass this 3D candidate is
propagated through the tracker inside the magnetic field.

In the fourth pass this 3D candidate is
propagated through the tracker behind the RICH (TC area).

After one or several seeds have been selected, a recursive growth procedure
is applied. This procedure consist of passing step by step through planes of
tracker (Inner and Outer simultaneously) and trying to include new hits in the
candidates. If chi-square contribution of new hit do not exceeds
maximal chi-square this hit is added to the
new branch of the candidate. If the number of faults (planes without new
hits) in sequence exceeds a
maximal number of subsequent fault ,
the branch is discarded.

During track following
number of weighted hits for the each candidate is calculated.
For a seed the number of weighted hits
is equal to number of hits. Each successful step of track following increments
the number of weighted hits
by 1. ( OTR ) or 2. ( ITR),

For each new development branch, a quality
measure is calculated. The quality of a
candidate is a difference between the number of hits and total chi-square
multiplied by scale factor ( =0.05 by default).
Selected track candidates (segments) should satisfy criteria on the
number of hits or the
number of weighted hits and
track candidate quality .

Ranger package includes a set of routines implementing a rigorous track fitting procedure for HERA-B spectrometer. It is based on use of Kalman filter and is capable of dealing with a variety of detector types. Corrections for multiple scattering, ionization energy loss and radiation of bremsstrahlung for electrons are incorporated. The interaction time can be determined for tracks passing drift chambers by introducing an additional parameter into the fit.

** Commands ( pattern recognition )
**

ranger/fpar [ parameter ]

parameter : rlevel I D=4

(rlevel=-1) Normal Ranger reconstruction is turned off

(rlevel=0) Ranger ideal

(rlevel=1) Reconstruction of segments in x projection in PC area

(rlevel=2) Reconstruction of segments in PC area

(rlevel=3) Reconstruction of segments in PC+MC areas

(rlevel=4) Reconstruction of segments in PC+MC and TC areas

(rlevel=5) Reconstruction of segments in PC and TC areas

parameter : segstor C D=" Yes "

(segstor=" Yes ") Reconstructed segments are stored in RSEG

(segstor=" No ") Reconstructed segments are stored in RTRA

parameter : whmin_x R D=8.

Minimal number of weighted hits in segment on x-projection (PC area)

parameter : whmin_y R D=16.

Minimal number of weighted hits in segment on y-projection (PC area)

parameter : whmin_mag R D=3.

Minimal number of weighted hits in segment ( magnet area )

parameter : whmin_tc R D=4.

Minimal number of weighted hits in segment ( TC area )

parameter : maxflt_x I D=3

Maximal number of faults in sequence (x tracking)

parameter : maxflt_y I D=3

Maximal number of faults in sequence (y tracking)

parameter : maxflt_mag I D=2

Maximal number of faults in sequence (magnet tracking)

parameter : maxflt_tc I D=1

Maximal number of faults in sequence (TC tracking)

parameter : qmin_x R D=7.

Minimal quality for x tracking in PC area

parameter : qmin_y R D=7.

Minimal quality for y tracking in PC area

parameter : qmin_tc R D=3.4

Minimal quality for 3D tracking in TC area

parameter : chmax_x R D=8.

Maximal value of chi-square for x tracking in PC area

parameter : chmax_y R D=16.

Maximal value of chi-square for y tracking in PC area

parameter : chmax_mag R D=16.

Maximal value of chi-square for 3D tracking in magnet

parameter : chmax_tc R D=16.

Maximal value of chi-square for 3D tracking in TC area

parameter : qpmxtrip R D=1.

Maximal absolute value of q/p for track seed (triplet).

parameter : downstr C D=" No "

(downstr=" Yes ") Downstream track propagation starting from VDS
segment

parameter : qmin_d R D=15.

Minimal quality for segments after downstream propagation

parameter : sltmode I D=0

(sltmode=0) SLT seeded Ranger is turned off (default)

(sltmode=1) SLT tracks of electrons are used as seeds

(sltmode=2) SLT tracks of muons are used as seeds

(sltmode=3) SLT tracks of electrons+muons are used as seeds

Segments are marked by setting slt bit in rseg->cmp.

parameter : sltmagn C D=" No "

(sltmagn=" Yes ") SLT seeded segments are propagated in
magnet

parameter : sltclone C D=" No "

(sltclone=" No ") SLT seeded and normalty reconstructed segments
are compared and only best of them are stored (default)

(sltclone=" Yes ") SLT seeded segments are stored simultaneously
with normally reconstructed segments (clones are allowed)

parameter : tcmode C D=" Yes "

(tcmode=" Yes ") SLT seeded and downstream segments are
propagated in TC (default)

parameter : cats C D=" No "

(cats=" Yes ") Call of OtrCatsEvent() for reconstruction in PC

** Commands ( track fitting )
**

ranger/fpar [ parameter ]

parameter : fit I D=0

( fit=0) No refit of segments

( fit=1) With refit of segments

parameter : sline C D=" No "

(sline=" Yes ") Track fitting by straight line in field free
area

Using of Kalman filter by default

parameter : fitmagn D=" Yes "

(fitmagn=" No ") Track fitting with discarding of hits in magnet