TWiki> LHCb Web>LHCbST>LHCbSTEmulator (revision 9)EditAttachPDF

The ST TELL1 Emulator

This page contains information about the ST TELL1 Emulator and how to use it within the new Vetra release v6r1. The current version of the emulator used is ST/STTELL1Algorithms v3r2. Information on how to run the old Emulator (v2r1, using jobOptions or local Database and without 2nd order header correction) can be found here.

The packages used by the Emulator are:

  • ST/STTELL1Algorithms (v3r2)
  • Tell1/TELL1Engine (v1r4)
  • DAQ/Tell1Kernel (v1r4)

The Emulator is included in the new Vetra release v6r1, thus there is no need anymore to install these packages locally. We can run the Emulator within the Vetra environment.

STTELL1Algorithms contains the following 3 algorithms:

  • Pedestal Subtraction (Including Pedestal Update and Header Correction)
  • Common Mode Suppression
  • Zero Suppression

These algorithms function as a wrapping around the C-code written processes (supplied by Guido), which can be found in the TELL1Engine package. STTELL1Algorithms is the only package which is specific to the ST. Both TELL1Engine and Tell1Kernel are also used by the Velo.

Before running the Emulator the raw data must be decoded. This is done using the STFullDecoding algorithm (ST/STOnline). To run the Emulator add the following lines to the options file:

ApplicationMgr.TopAlg = {"STFullDecoding","ProcessPhase/Emulator" };

Emulator.DetectorList += { "ST" };
EmulatorSTSeq.Members += {

Another important algorithm is "RawBanktoSTClusterAlg" (ST/STDAQ). With this algorithm clusters are decoded. To compare TELL1 clusters with Emulator clusters, this algorithm needs to be run twice. Once to decode the clusters in the ZS bank and once to decode the clusters created by the ClusterMaker of the Emulator. For the second, the rawEventLocation needs to be set to "Emu/RawEvent" and as output location you can set the clusterLocation to "Emu/IT/Clusters".

Job Options

The jobOptions which can be set in the Emulator are:

STTELL1PedestalSubtractor STTELL1LCMS STTELL1ClusterMaker

OutputDataLoc (STTELL1DataLocation::TTPedSubADCs)
SubPedsLoc (STTELL1DataLocation::TTSubPeds)
ReadoutTool ("TTReadoutTool")
DetType ("TT")
CondPath ("CondDB")
InputDataLoc (STTELL1DataLocation::TTPedSubADCs)
OutputDataLoc (STTELL1DataLocation::TTLCMSADCs)

ReadoutTool ("TTReadoutTool")
DetType ("TT")
CondPath ("CondDB")
ConvergenceLimit (0)
InputDataLoc (STTELL1DataLocation::TTLCMSADCs)

ReadoutTool ("TTReadoutTool")
DetType ("TT")
CondPath ("CondDB")
ConvergenceLimit (0)

The ConvergenceLimit is the number of events used to calculate a good pedestal. For these events only the Pedestal Subtraction algorithm will run. Only when the ConvergenceLimit is reached will the CMS and the ClusterMaker run. (Example: If a strip is off, i.e. it always has ADC 0 and we start with subtracting the default value of 128 (see next section), then it takes the Pedestal Update about 12000 events to get the pedestal to the right value of 0.)

Difference with the previous (v2r1) version of the Emulator is that the conditions database is always used from now on, we don't need to use configuration parameters in the jobOptions anymore. We can still change the configuration settings using the jobOptions (ConditionsOverride) however. This is now the preferred method as this new version does not require the installation of a local database. Therefore we always need to set the path of the conditions database.

Configuration Parameters in the Conditions Database

This section explains which parameters are in the conditions database. For information on how to set these parameters, please read the section "Setting/Changing the conditions database parameters".

Each condition (or TELL1Board) contains the following parameters (specified per algorithm). These are their names as they are in the conditions database.

Header_correction_analog_link_0, size:4
Header_correction_analog_link_1, size:4
Header_correction_analog_link_95, size:4
Header_threshold, size:2
Pedestal_mask, size:3072
Pedestal_value, size:3072

The Pedestal_mask is a vector of size 3072, which entries can be set to either 0 or 1. 1 meaning that a certain strip is masked for pedestal subtraction and header correction. The Pedestal_value contains the initial pedestals to be subtracted per link. To enable the pedestal subtraction, both Pedestal_enable and ZS_enable must be set to 1. Pedestal Following is enabled by setting Update_enable to 1. There are two types of header , a "negative" header (below pedestal line) and a "positive" header (above pedestal line). Cross talk between the last header and first strip (strip 0) occurs and also second order crosstalk between the second to last header and the first strip (strip 0) occurs. We can therefore set 4 corrections (for "negative/negative", "negative/positive", "positive/negative" and "positive/positive" headers) per link (32 channels). In total there are 96 links per TELL1. To enable the header correction set Header_enable to 1. Note: In previous versions the second order header correction was not included and only 2 corrections were used.

CMS_threshold, size:3072

To enable the CMS process set CMS_enable to 1. If the CMS is disabled, all data is directly copied and supplied to the ClusterMaker algorithm. The CMS Thresholds per strip are set in the CMS_threshold vector.

Hit_threshold, size:3072
Confirmation_threshold, size:48
SpillOver_threshold, size: 48

To enable the ZS process set ZS_enable to 1. There are three thresholds used in the ZS process: The Hit_threshold is per individual strip and thus the charge of each strip in a cluster needs to exceed this threshold. The total charge of the cluster needs to exceed the Confirmation_threshold. When the total charge of the clusters is higher than the SpillOver_threshold the SpillOver bit is set. Both Confirmation_threshold as SpillOver_threshold can be set per processing channel (64 strips), but clusters are searched for per beetle (128 strips).

Setting up the Conditions Database

In order to use the database, Vetra v6r1 needs to be installed: getpack Tell1/Vetra v6r1. There are 2 steps we need to take. First, we need to create our own file with configuration parameters. This is done by going to the python folder and running:

python (or tt)

After this the conditions database can be set up; go to the scripts folder and run:

source (or tt)

this creates a conditions database COND.db in the location: VetraCondDB/IT (or TT). This file works as a layer on top of the general database (which you don't have to install!) The program will now first look for conditions in this file before it searches in the general database. A more detailed description is given by Tomasz on the VetraHowTo pages. The new conditions path is default set to "CondDB" in the ST/STTELL1Algorithms and won't need changing (for both IT and TT).

To use this conditions database COND.db, we have to add the following lines to the jobOptions:

CondDBLayeringSvc.Layers={'CondDBAccessSvc/COND', 'CondDBDispatcherSvc'};

For using the TT database, "IT" needs to be substituted to "TT" in the last line.

Setting/Changing the conditions database parameters

We can set all parameters without changing the conditions database. To set a parameter, add a line like the following to your jobOptions

ConditionsOverride += {"CondDB/TELL1Board10 := int Pedestal_enable = 1;"};

In order to change many parameters, for instance of all TELL1Boards or just the 3072 values of the Hit_threshold, we can use a python script. In the folder Tell1/Vetra/v6r1/options there are two files runSTEmulator.opts and to demonstrate how to use python to add lines to the normal options file.

It is also possible to change line in the actual TELL1Cond.xml which is created by running or (as explained above). But then you would need to recreate a new conditions database everytime, which means running the source file or

Edit | Attach | Watch | Print version | History: r12 < r11 < r10 < r9 < r8 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r9 - 2008-08-15 - AnneKeune
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    LHCb All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback