Vertex Detector Offline Documentation

Setting Up Geant

A number of VTX routines interface with GEANT routines to initialize VTX geometry for the Monte Carlo. The VTX driver routine is VGGEOI.PREPMORT which is called from the SLD routine SGGINI.PREPMORT. SGGINI is usually called after the first "GO" statement in IDA. The default VTX geometry is stored in the template VXBASE. There are many different versions of VXBASE which can be loaded in order to simulate various incarnations of VXD2 and VXD3. These versions are controlled by poking VXBASE.VXDVERS. The correct version must be poked before the first event has been run. In other circumstances, (e.g. running DISPLAY), VXINIT.PREPMORT should be declared EXTERNAL and called after poking VXBASE.VXDVERS in order to assure that the correct geometry is loaded. The correct version of VXBASE is loaded by using a unique CONSTANT file depending on which VXD version is needed. See the source code for VXINITX.PREPMORT (which is called from VXINIT.PREPMORT) to see how these various constant files are loaded.

The templates necessary for setting up geant are:

The GEANT simulation uses the design VXD geometry. This is necessary since everything in GEANT is always done in a symmetric way. GEANT simulation, does not include random smearing of CCD's or actual charge deposition on various pixels. That is the job of the Simulation of Charge Deposition and Digitization

Simulation of Charge Deposition and Digitization

Because the GEANT simulation uses the ideal position of the Vertex Detector CCD's and doesn't actuall simulate charge deposition or triggering, it is necessary to process the Monte Carlo hits through a simulation and digitization stage. The simulation is controlled by the templates VXPARMS.TEMPLATE and VXRUPAR.TEMPLATE.

There are two steps in the simulation of VXD hits. The first is the Digitization stage. This is done in VTXDIG.PREPMORT which is called from GUDIGI.PREPMORT. The primary purpose of VTXDIG.PREPMORT is to take Monte Carlo Hits from the MCHITS.TEMPLATE bank and to extrapolate them to the plane of the actual CCD. The location of the hit on or near the CCD is determined and the amount of charge depoisted is determined by calling VXELOS.PREPMORT. All information from VTXDIG is stored in the temporary VXD bank VXHTBF.TEMPLATE.

The second step in the simulation of hits is the AEB (Aleph Event Buffer) stage. The main driver routine for this is VTXAEB.PREPMORT which is called from GUSAEB.PREPMORT. VTXAEB.PREPMORT is used to smear the charge from a Monte Carlo hit into adjacent pixels, to add beam related background and electronic noise to the CCD's, and to simulate the Cluster Arithmetic Processor which is responsible for sparsifying the data using an Extended Row Filter and kernel thresholds. VTXAEB.PREPMORT is also used for overlaying random trigger data events with Monte Carlo simulated events. The output of VTXAEB.PREPMORT is the raw data in a Monte Carlo packed format stored in VXRAW.TEMPLATE. A flow chart of VTXAEB is available.

Reconstruction

The reconstruction is done almost exactly the same for data and Monte Carlo. However, the input raw data bank is in a different format for Monte Carlo (VXRAW.TEMPLATE) and for data (VXDRAW.TEMPLATE). The reconstruction is controlled by the template VXRECP.TEMPLATE. A flow chart of the Reconstruction Process is available as well as a chart showing the Reconstruction Data Structure.

The Reconstruction process consists of five major steps controlled by different processors. Flow charts are available for these processors.

Control Templates

Here is a list of templates which provide control parameters, switches, and constants for much of the offline code. The default parameters for most of these files are stored in *.CONSTANT files with the same name as the TEMPLATE file. However, VXBDCCD and VXREAL are part of the run dependent constant system and are controlled by VTXKON.CONSTANT. VXBASE.TEMPLATE also has many versions and the appropriate CONSTANT file is loaded by poking VXPARMS.VXDVERS.

Useful Utility Routines