The ancestor of VSDIAG is called VSDST, but the code is more or less totally rewritten to fit within the framework of THOR and the new detector situation. A quick overview of the different input and output files will be given here, for a more detailed description of the program please refer to the user manual [3]. VSDIAG is the last program in the data processing chain and provide the necessary information for data quality checking and final analysis. It is also self generating its own calibration information, using the output from one running as an input for the next. There are in total five different output channels forms targeted by the program:
There are three types of calibrations applied to the data in VSDIAG. First a number of cuts are calibrated for each DELANA file, this information is taken from and stored in an output ntuple from the program. These cuts are typically sensitive to beam conditions, which varies rapidly during a LEP fill. Each time the program is run on a certain fill the cuts converges to their correct position and width. The energy signal is calibrated for each module once per fill and the calibration factor is stored in the file called 'ECAL.TXT'. This is also automatically updated and causes no extra work for the shifter. It is wise to check the stability of the numbers in this files, as they are sensitive to detector changes.
Finally the data is divided into groups for different properties of the LEP beam conditions and the VSAT detector setup. Normally one could expect 5-7 groups during a year, and the group number is taken from the 'Vsat.txt' file. In each group the general width of the cuts and the false bhabha calibration factors are specified in the 'GINFO.TXT' file. The leakage calibration function for energy losses out of the detector walls is also specific for each group in the file 'LEAK.TXT'.
There are two main data output streams from VSDIAG - ntuples and histograms. The histogram files(DXXXX.HIS) are mainly used to check the data quality and for special detector functionality analysis. The Ntuple files(DXXXX.NTP) consists of about 100 variables, with one entry for each DELANA file. These are used for beam parameter, luminosity and two photon physics analysis as well as for data quality checking. The two-photon physics also requires a event by event output file for interesting events(GXXXX.TXT).
THOR executes VSDIAG two times after that the FX-file from COMPACT have been created. This makes a preliminary calibration of the data and converge various cuts to their right position. Each 10 fills VSDIAG is runs on the data an other time in order to generate a good quality checking output. At the end of data taking, the data should be split up into groups of similar properties and VSDIAG should treat the data at least two more times before it is sent away for the final analysis.