The raw data tapes written by the Data Acquisition system go through a number of standard processing steps before being used for individual analyses, such as the one described in chapter 4. Their task is to infer details of the products of the interaction from the electronic measurements made by the detector. Thus, for example, the raw data, consisting of digitized drift times and charge measurements on specified channels in the tracking detectors, are converted into trajectories through DELPHI from which the creation point, direction, and momentum of the charged particles can be inferred.
The majority of this generic analysis is performed by the DELANA program , which is based on the TANAGRA2.8  data model and access routines. TANAGRA provides a common format for storing the results of each stage of the processing,2.9as described below.
Constants and parameters used by DELANA are read  from the CARGO  database based upon the time the event being analysed was captured by the DAS. Section 3.7 describes CARGO and the information written to it by the online system. CARGO is also used by DELANA for many of its other parameters, such as the detector geometry. The statuses of the various detector partitions are combined with the DELANA processing status to provide a set of flags, which are written out as run selection files for use in physics analyses.
Following the DELANA reconstruction, two types of tagging algorithms are applied. Both have very loose cuts in order not to reject events that might be accepted after post-DELANA corrections are applied. The `DELANA tags'  produce a broad categorization of each event as, for example, hadronic , leptonic , Bhabha seen in SAT/STIC, etc. The `Physics Teams tags'  select events of interest to specific classes of analysis. Events selected by either of these groups of tags are written to the main (`DST OR') output stream.
A full DELANA processing of a year's data can take many weeks. In order to allow corrections and refined calibrations (e.g. Vertex Detector alignment) to be updated at frequent intervals, a second stage of processing, DSTFIX , is performed (and can be reperformed) on the DST output of DELANA. DSTFIX can make changes at the TE level and refit tracks. It is also used to adjust the efficiency, cleanliness, and precision of simulated data to better match the quality of the real data. A number of particle identification algorithms, considerably more sophisticated than those used in DELANA, are run on the output of DSTFIX: charged hadrons (p, K, and ) are identified with the RICH  and TPC , electrons  with the electromagnetic calorimeters, and muons [75,76] with the muon chambers. A primary vertex fit and b-tagging algorithm  is also run to identify events by the increased impact parameters of tracks from B hadron decays.
The analysis chain causes the data to be interpreted and transformed between a number of forms, all of which are based on the ZEBRA  memory management system (part of the CERN library), which provides dynamic data structuring within Fortran 77 (which lacks the pointer or reference data types required for this data model). ZEBRA also provides methods for file input/ output for these data structures in a format that allows the data to be transported between computers with different numeric representations.
All the offline code is written in Fortran 77 . Due to the large number of collaborating institutes within DELPHI as well as its long timescale, the simulation and analysis tools have been required to work on a diverse collection of computing architectures and operating systems: HP-UX and DEC Alpha Unix, VAX and Alpha VMS, and IBM VM/CMS systems being only the most common. In order to allow for system-specific code, as well as providing a rudimentary form of revision control, the PATCHY system  was used.
Two stages of track fitting are performed in DELANA (once on the possibly ambiguous track strings, and then again following ambiguity resolution) as well as an additional track fit using the corrections and improved VD alignment available in DSTFIX. Essentially the same algorithm is used in each case, with TEs as input. In the case of the ID, TPC, and OD these are themselves the result of local track fits.
The effects of the particle's passage through the material between the points where measurements are made must be taken into account. Small-angle multiple scattering, which introduces additional uncertainties in the angle of extrapolated track elements, is described by a Gaussian distribution with RMS plane-projected scattering angle of
The track fit is based on a Kalman filter , which allows `outliers' (TEs whose presence in the track fit significantly degrades the fit ) to be iteratively removed as part of the fit process.
The spatial precision of the overall tracking is largely determined by the vertex detector, so the results were summarized in section 2.3.1 (see in particular figure 2.8). The momentum precision at 45.6 can be measured using events (radiative decays are removed by requiring an acollinearity of less than 0.15 ). These are shown in figure 2.14.
The primary vertex ( decay position) is within the region encompassed by the crossing of the electron and positron beams. Its RMS size is typically 200 in , negligible in ( in 1994), and cm in . The position and size change slowly throughout the LEP fill as well as between fills.
The beamspot position and size  (at least in the plane) can be used directly as a measure of the primary vertex position and error, as a constraint on an event-by-event primary vertex fit, or to identify tracks coming from a secondary vertex.
A primary vertex fit is performed for each hadronic event passing cuts designed to reduce the contribution from poorly measured tracks and secondary vertices. These are divided into samples corresponding to each tape written by the DAS ( hadronic events in 1994). For each sample a fit is performed, assuming independent Gaussian beam profiles in all three coordinates, and the primary vertex position and size in and is determined. The beam size in is too small to measure for this sample size. Since the beamspot position determination is critically dependent on (and relative to) the detector alignment (particularly that of the VD), it is performed separately for each DST and shortDST production. The mean beamspot position is typically measured to an accuracy of for each sample.
Similar algorithms are used for muon identification  in DELANA (the EMMASS package ) and afterwards (the MUCFIX  and MUFLAG  packages). The difference is that EMMASS employs extremely loose selection criteria (useful for producing dimuon ( ) samples for checking and alignment), whereas MUCFIX allows for variable cuts, specifically those defined in MUFLAG, which are optimized for identifying muons in hadronic jets. MUCFIX can also take advantage of the improved tracking available after DSTFIX and, as is the case with all post-DELANA reconstruction, allows corrections to be implemented more rapidly.
Hadron contamination in the set of tracks selected as muons in jets is due to
Since the particles seen in the MUC from punch-through and decays in flight are not the same as the originating hadron, they will tend to have a slightly different trajectory. Their contribution can thus be reduced by requiring that the extrapolated trajectory of the supposed muon match the MUC hits within the accuracy expected from multiple scattering and measurement errors.
Contamination can be further reduced by requiring hits in muon chambers outside the iron, where they will have had to pass through an additional interaction length of iron.
EMMASS/MUCFIX perform a fit for the particle's trajectory at the MUC, using the MUC hit coordinates (and errors) and the extrapolated track position and direction (and full error matrix, including multiple scattering). s from this fit are used to select the best association, drop bad hits, and reduce the contamination from punch-throughs and /K decays.
MUFLAG provides four predefined selections, the results of which are written to the ShortDST. The Very Loose tag (intended for studies) has no cut on the , so the best association made (after the very loose preselection and bad hit rejection made by EMMASS) is used. The other three tags (intended for studies of muons in hadronic jets) use a tighter bad-hit cut and progressively tighter cuts. The Loose tag aims to maximize efficiency. As well as tighter cuts, the Standard and Tight tags require at least one hit in the chambers outside the iron.
The muon identification efficiency for the standard tag is shown in figure 2.16. The overall efficiencies and misidentification probabilities for all four tags are summarized in table 2.4.
Tim Adye 2002-11-06