next up previous contents
Next: FFREAD cards Up: Appendix: The Tracking Package Previous: Appendix: The Tracking Package   Contents

Overview of the track reconstruction modules and data formats

Each package introduced in this section is merged into Brahms as individual program source file. The package names being referred to in the following correspond to the respective file name (except version number and file name extension) in the Brahms code subdirectory src/tracker/.

The steering package TKSTEER provides interfaces to all individual tracking packages and handles data storage, format conversion, user interface and global performance analysis. It runs a three-stage track reconstruction process: first, local track search in the individual subdetectors are performed. Three local track searches are implemented: SIPATREC investigates the silicon based inner tracking system of vertex detector (VTX), silicon intermediate tracker SIT and forward tracking disks FTD. TPCPATREC performs a track search in the TPC. FCHPATREC finally looks for tracks in the additional forward chambers behind the TPC end caps. TKSTEER provides hits in the tracking system in a common format, shown in Table [*] for easy access by local track searches. TKSTEER requires all local track search packages to present their output in the TE (track element) data format given in Table [*]. The TE format is general enough to accommodate both local tracks and single hits. This is used for the silicon pattern recognition, where all hits are passed on to later reconstruction steps along with the tracks found locally. This is done to allow a refinement of the local silicon track search, which suffers most of all local track searches from background hits, at a later stage of the global track reconstruction process.


Table: Data format for hit storage in the tracking banks. The mixture of real and integer variables in one array is achieved by declaration of a real and an integer array and equivalencing them. It is the responsibility of the user to know which index to access as which datatype. Indices 7 and 8 are used for mutually exclusive hit candidates (e.g. mirror hits in strip detectors). They point to entries in a separate exclusion list (array IEXCL in the TKBANK sequence).
index type meaning unit
1 real $x$ position cm
2 real $y$ position cm
3 real $z$ position cm
4 real deposited energy GeV
5 integer subdetector ID (Brahms convention, i.e. $>100$) --
6 integer Monte Carlo track ID, 0 for real data (sic!) --
7 integer pointer to first exclusion (0 if none) --
8 integer number of exclusion list entries for this hit --
9 integer resolution code: bit 0 set if error on $r\phi$ given, --
    bit 1 set for error on $z$, bit 2 for error on $r$.  
    exactly two bits should be set.  
10 real first resolution word, cm
    corresponding to lower active bit at index 9  
11 real second resolution word, cm
    corresponding to upper active bit at index 9  



Table: TE (track element) data format (from the DELPHI TANAGRA database system) for storage of subdetector contributions, both single hits and locally fitted tracks, to the global track search. The covariance matrix describes all parameters that are measured according to the TE measurement code. In the measurement code bits 5-10 describe the variables contributing to the TE covariance matrix. The order of the variables in the covariance matrix is the same as herein.
index type meaning unit
1 integer subdetector ID --
2 integer submodule: bit code for VTX/FTD layers --
    used in TE, ignored otherwise  
3 integer not used (yet) - MUST be set to zero --
4 integer measurement code (see below) --
bit 0 0 for $x$, $y$, $z$ coordinates; 1 for $R$, $R\Phi$, $z$ coordinates  
  1 always 0  
  2 1 if coordinate 1 is known (index 10 in TE), 0 otherwise  
  3 1 if coordinate 2 is known (index 11 in TE), 0 otherwise  
  4 1 if coordinate 3 is known (index 12 in TE), 0 otherwise  
    ('known' means either defined by detector geometry or meas.)  
  5 1 if $R\Phi$ ($x$) is measured for bit 0 = 1 (0)  
  6 1 if $z$ ($y$) is measured for bit 0 = 1 (0)  
  7 1 if $\Theta$ is measured  
  8 1 if $\phi$ is measured  
  9 1 if $1/p$ is measured  
  10 1 if $1/p_t$ is measured  
    ('measured' really means measured, contrib. to the cov. matrix)  
  11 always 0  
  12 always 0  
  13 1 if $\mathrm{d}E/\mathrm{d}x$ is measured  
  14-... always 0  
5 integer pointer to end of TE (m+17, m=length of cov. matrix) --
6 integer charge (0=neutral, 1=positive, 2=negative, 3=unknown) --
7 integer number of degrees of freedom --
8 real $\chi^2$ of the fit (if any -- set to 1 otherwise) --
9 real length of the track element cm
10 real coordinate 1 of reference point: $x$ or $r$ cm
11 real coordinate 2 of reference point: $y$ or $r\phi$ cm
12 real coordinate 3 of reference point: $z$ cm
13 real polar angle $\Theta$ at reference point 0..$\pi$
14 real azimuthal angle $\phi$ at reference point 0..2$\pi$
15 real $1/p$ or $1/p_t$ at the reference point (see meas. code) (GeV/c)$^{-1}$
16 real $\mathrm{d}E/\mathrm{d}x$ (ignored if not measured) ???
17 real covariance matrix for measured quantities:  
    $R\Phi$, $z$ (reference point at fixed radius $R$),  
    $\Theta$, $\phi$, $1/p$ has the following entries:  
    ($R\Phi$,$R\Phi$),  
...   ($R\Phi$,$z$), ($z$,$z$),  
    ($R\Phi$,$\Theta$), ($z$,$\Theta$), ($\Theta$,$\Theta$),  
    ($R\Phi$,$\phi$), ($z$,$\phi$), ($\Theta$,$\phi$), ($\phi$,$\phi$),  
    ($R\Phi$,$1/p$), ($z$,$1/p$), ($\Theta$,$1/p$), ($\phi$,$1/p$), ($1/p$,$1/p$)  
m+16 real error on $\mathrm{d}E/\mathrm{d}x$ if $\mathrm{d}E/\mathrm{d}x$ is measured ???
m+17 real must be 0.0 --


The TE format is a mixed type (integer and real) array, which does seem a bit inconvenient and inflexible from today's standard, but it has to be used to avoid major rewriting of the second stage of the track reconstruction, coded in the DELSEARCH package. DELSEARCH attempts to find matching TEs from individual subdetectors. This is done by creating seed tracks out of TEs, extrapolating their parameters to all subdetectors in question, and picking up matching TEs from these subdetectors. In order to be able to pick up individual silicon hits, all silicon layers are treated as separate subdetectors in this code. DELSEARCH assigns TEs to any global track candidate where they fit into according to the track parameters and errors. It does not care about possibly ambiguous assignments of single TEs to more than one such global track candidates. The result of DELSEARCH is therefore not considered final, but is given in terms of TSs (track segments, see Table [*]) which have to processed further.


Table: Data format for ambiguous global track candidates (track segments, TS). These represent the merging result as created by the TKSTEER package and DELSEARCH. Ambiguous use of TEs is possible here, e.g. use of the same TE in more than one TS; the unambiguous optimal track reconstruction is stored in TK banks (see Table [*]).
index type meaning unit
1 integer module code (internal use only)  
2 integer bit code for used detectors  
3 integer measurement code (see Table [*])  
4 integer track type: always 9 in Brahms  
5 integer number of TEs used in this TS  
6 integer charge (0=neutral, 1=positive,  
    2=negative, 3=unknown)  
7 integer always 0  
8 integer number of degrees of freedom of the track fit  
9 real $\chi^2$ of the track fit  
10 real track segment length cm
11 real $x$ of TS start point cm
12 real $y$ of TS start point cm
13 real $z$ of TS start point cm
14 real $x$ of TS end point cm
15 real $y$ of TS end point cm
16 real $z$ of TS end point cm
17 real coordinate 1 of reference point: $x$ or $R$ cm
18 real coordinate 2 of reference point: $y$ or $R\Phi$ cm
19 real coordinate 3 of reference point: $z$ cm
20 real $\Theta$ angle at reference point 0..$\pi$
21 real $\phi$ angle at reference point 0..2$\pi$
22 real $1/p$ at reference point (GeV/c)$^{-1}$
    (signed with geometric curvature of track  
    measured from inside to outside of detector)  
23 real covariance matrix for measured quantities  
...   (as above)  
37 real    



Table: Description of the measurement bit code used in the TS data format.
bit meaning
0 0 no estimate at all for the TS parameters
  1 TS parameters are given
1 0 for $x$, $y$, $z$ coordinates
  1 for $R$, $R\Phi$, $z$ coordinates
2 0 crude estimate of error (diagonal matrix)
  1 full error matrix available
3 0 all parameters are given if bit 0 is on
  1 no error matrix, start point, end point


The third step of track reconstruction tries to reduce the set of partially redundant and ambiguous TSs to a consistent set of tracks (TKs, see Table [*]). This set is optimized by a maximizing a score function taking into account the total number of tracks, the number of TEs used in these tracks (with different weights for different subdetectors) and the track fit $\chi^2$. The optimization is done in a recursive algorithm, for which the C programming language was preferred over Fortran. This code package consists therefore of two files: DELSOLVE contains the main C coded algorithm, and DELAMBI provides a Fortran-to-C interface for it.


Table: Data format for final track candidates (TK). This information is stored in the arrays RTK/ITK of the TKBANK sequence in TKSTEER. The number of TK is stored in NTK. Whenever possible, this information should not be accessed using these variables directly, but through the TKSTEER interface routines TKREAD and TKNUMB.
index type meaning unit
1 integer module identifier (internal use only)  
2 integer bit code for used detectors  
3 integer 0 for $x$, $y$, $z$ coordinates, 1 for $R$,$R\Phi$, $z$  
4 integer track type: always 9 in Brahms  
5 integer number of TEs used in this TK  
6 integer charge (0=neutral, 1=positive,  
    2=negative, 3=unknown)  
7 integer always 0  
8 integer number of degrees of freedom of the track fit  
9 real $\chi^2$ of the track fit  
10 real track length cm
11 real $x$ of TK start point cm
12 real $y$ of TK start point cm
13 real $z$ of TK start point cm
14 real $x$ of TK end point cm
15 real $y$ of TK end point cm
16 real $z$ of TK end point cm
17 real coordinate 1 of reference point: $x$ or $R$ cm
18 real coordinate 2 of reference point: $y$ or $R\Phi$ cm
19 real coordinate 3 of reference point: $z$ cm
20 real $\Theta$ angle at reference point 0..$\pi$
21 real $\phi$ angle at reference point 0..2$\pi$
22 real $1/p$ at the reference point (GeV/c)$^{-1}$
    (signed with geometric curvature of track  
    measured from inside to outside of detector)  
23 real covariance matrix for measured quantities  
...   (as above)  
37 real    


All track reconstruction packages use the package DELFIT to perform track fits. DELFIT is a fast track fit package using a set of infinitely thin material planes as detector representation. These material planes are being set up in Brahms together with the detector geometry definitions. Deviations from detector setup and fit material database can lead to significant degradation of the tracking performance.

All packages described so far provide realistic track reconstruction algorithms, i.e. do not use any specific Monte Carlo information. However, for debugging and/or benchmark purposes, the full chain can be switched to ideal track reconstruction using FFREAD cards. Ideal (or ``dummy'') track search in the individual subdetectors is done in an extra package (DUMPATREC) to keep the complicated realistic track search packages free from extra code for this option. DELSEARCH does not require too much extra code for ideal subdetector merging; therefore this option is included in the main code itself. Since ideal merging does not lead to ambiguities, the DELSOLVE stage is per definition inactive in ideal reconstruction mode, and no extra measures had to be taken to accommodate for both reconstruction variants. Ideal reconstruction, as well as performance analysis of the realistic reconstruction, requires access to the Monte Carlo information. For this purpose, TKSTEER keeps a record of all Monte Carlo tracks (data format as in Table [*]).


Table: Data format for storage of true (Monte Carlo) track information. This information is stored in ZEBRA banks and can be accessed via the statement functions TKMCTR/ITKMCT. The number of tracks is stored in TKNTRK. However, this information should usually be accessed by the TKSTEER utility routines TKREAD and TKNUMB, to allow for possible future changes of the internal implementation.
index type meaning unit
1 real $p_x$ at origin GeV/c
2 real $p_y$ at origin GeV/c
3 real $p_z$ at origin GeV/c
4 real $E$ at origin GeV
5 real $x$ of track origin cm
6 real $y$ of track origin cm
7 real $z$ of track origin cm
8 integer GEANT particle code --
9 integer GEANT track number --
10 integer number of hits left in detector --
11 integer HEPEVT track number (if any, zero otherwise) --



next up previous contents
Next: FFREAD cards Up: Appendix: The Tracking Package Previous: Appendix: The Tracking Package   Contents
Harald Vogt 2004-02-04