General Description
The Detector Algorithm (DA) of the SSD is implemented in single program ITSSSDPEDda.exe installed on all SSD LDCs in /opt/daq-SSD-DA/. The program is called automatically after the end of PEDESTAL run to calculate pedestal and noise for SSD channels and it produces the formatted calibration data for FEROM and off-line analysis. In order to start correctly the DA requires:
- The file with raw data recorded on LDC,
- The static list of bad channels as a root file with AliITSBadChannelsSSDv2 object,
- DDL Map as an ASCII file,
- Configuration file with fixed name ssddaconfig.txt.
The raw data file is the only required argument for the program. The file with static list of bad channels and the file with DDL Map must be specified in configuration file. The last three files must be disposed in DAQ detector database (daqDetDb).
After the successful end of execution the DA produces:
- The file with calibration data for off-line analysis which is sent to FXS and then transferred to OCDB by Shuttle and preprocessor. Its typical local copy name is ITSSSDda_LDC_ID.root. It is root file which contains AliITSBadChannelsSSDv2,AliITSPedestalSSDv2 and AliITSNoiseSSDv2 objects.
- Root file ssddaldc_LDC_ID.root which contains an extensive result of calculation in one single AliITSHandleDaSSD object.
- A set of ASCII files with data formatted for SSD FEROM setting of zero suppression thresholds and offset correction values. The data format is specified in the SSD FEROM manual. The files are sent to daqDetDB and have the names <equipmentid_slot>, for example 512_1.</equipmentid_slot>
DA code is represented in AliRoot by three classes AliITSChannelDaSSD, AliITSModuleDaSSD and AliITSHandleDaSSD, the main function is defined in ITSSSDPEDda.cxx Daq library DaqDAlib v1.3 is required to build the SSD DA, it can be found in http://ph-dep-aid.web.cern.ch/ph-dep-aid/. The SSD DA executable and rpm package can be built using the following commands from $ALICE_ROOT: make daqDA-SSD and make daqDA-SSD-rpm respectively.
SSD DA Configuration File
SSD DA configuration file is a fixed name file ssddaconfig.txt and is expected to be found in daqDetDb. Apart of required parameters which include the names of files with static list of bad channels and DDL map it contains other optional parameters which can be used to optimize performance and memory consumption, provide special output for the test purpose and tune some parameter of the calculation algorithm. The basic syntax of the file is a line with pair <key_word><value></value></key_word>separated by one or more spaces. Symbol # is used to introduce the comments within the line. The key words which can be recognized are presented in the table. The parameters read form the configuration file are printed to stdout while the paring errors to stderr. Thus the parameter which were used and error messages if any can be found in the electronic log book.
KeyWord | Value (Example) | Comments |
---|
DDLMapFile | ssdddlmap.txt | Arbitrary file name with SSD DDL map, file must be in DaqDetDB. |
BadChannelsFile | bc.root | Arbitrary file name with the static list of bad channels, file must be in DaqDetDB |
OffsetDefault | 1 | Default value for offset correction, integer in the range -512..511. |
ZsDefault | 0 | Default value for ZS threshold, non negative integer < 64. |
ZSMinValue | 2 | Minimum value for ZS threshold, has less priority then ZsDefault, non negative integer < 64. |
OffLadder | c604 c508 | List of ladders which are supposed to be off and will be totally suppressed. Case insensitive, space separated. |
CheckChipsOff | 1 | If set, then the DA checks if there are chips and modules which are off, but not in the OffLadder list. |
MergeBCFlag | 0 | If set, then static bad channels map is merged with the dynamic one for OCDB. |
NModulesToProcess | 324 | Number of modules whose raw data are allocated in RAM for calculation, Usually it is n*108, 7>n>0. |
ZsFactor | 3.0 | ZS factor 3, ZS threshold equals ZsFactor * Noise rounded to integer. |
PedestalThresholdFactor | 3.0 | Threshold factor for pedestal calculation (see section Calculation Algorithm). |
CmThresholdFactor | 3.0 | Threshold factor for CM calculation (see section Calculation Algorithm). |
Calculation Algorithm
Let denote the signal registered in the channel i for the event number k. Then the pedestal of the channel i is computed in the following way.
,
where N equals to the number of sampled events. is considered as the first approximation of the value of the pedestal. Then is estimated as
,
And finally, the pedestal is calculated as mean value of the events whose signal is “not far” from the first approximation of the pedestal, i. e.
,
where
.
Factor can be used to tune the threshold. Its value can be set in the DA configuration file after the reserved word PedestalThresholdFactor. The default value is defined in AliITSHandleDaSSD class and equals to 3.0. Similar procedure is used for CM calculation. The threshold for CM calculation can be changed using CmThresholdFactor reserved word in DA configuration file. Its default value is also defined in AliITSHandleDaSSD class and equals to 3.0.
- ssddaconfig.txt: Example of the SSD DA configuration file
- ssdddlmap.txt: ASCII file with DDL map for SSD DA
- patchSSDBadChannelsMap.C: Macro adds ether ladder, module or range of channels to the SSD bad channels map.
- readbctxt.sh: Script patches the SSD bad channels map using the list of channels from the text file and patchSSDBadChannelsMap.C macro.
- patchlist051209.txt: An example of the file with the list of modules, channels to add to SSD bad channels map using readbctxt.sh script.
- viewSSDCalibrationLadData.C: Shows pedestal, noise with and without CM correction calculated by the SSD DA for a given DDL AD.