Trigger Database

This database stores all BEMC trigger information such as trigger status, masks and pedestals used to obtain the high tower and patch sum information.  The database is updated online while taking data.  We have the following table formats:

  • St_emcTriggerStatus - this table contains status/mask information for the trigger
  • St_emcTriggerPed - this table contains the pedestal and bit conversion scheme used in the trigger
  • St_emcTriggerLUT - this table contains the lookup table information.  Because the LUT is very large it is encoded in simple formulae.  The FormulaTag entry specifies the formula used for each patch.
The tables are stored in the STAR database under the directory /Calibrations/emc/trigger and are called bemcTriggerStatus and bemcTriggerPed.  To access those tables from an analysis maker do:

TDataSet *DB = GetInputDB("Calibrations/emc/trigger");

St_emcTriggerStatus *table = (St_emcTriggerStatus*) DB->Find("bemcTriggerStatus");
emcTriggerStatus_st *struct = table->GetTable();

Important Information About Pedestal Tables

In order to save space and make the download fast, PEDESTALS and RMS are saved as SHORT.  So, the real pedestal value is PED/100.  Similarly, in order to save tables in the database you have to multiply the real pedestal by 100. The same goes for the RMS.

The pedestal table also includes the 6-bit conversion scheme used to generate the high tower and patch sum information.

Status Information

The St_emcTriggerStatus table contains the status information for each single tower, high tower and patch sum (patch sum is the sum in the 4x4 patches.  It is *not* the jet patch).  The status is a simple 0/1 that reflects the masks that are being applied to the electronicss where

  • 0 - masked out
  • 1 - included in trigger

Tables Structure

/*
*
* Table: emcCalib
*
* description: //: Table which contains the trigger masks
*/
struct emcTriggerStatus
{
octet PatchStatus[300]; // Patch sum masks. the index is the patch number
octet HighTowerStatus[300]; // High tower masks. the index is the patch number
octet TowerStatus[30][160]; // Single masks. the indexex are the crate number and position in crate
};
/*
*
* Table: emcTriggerPed
*
* description: * //: Table which contains pedestal information and 6 bits conversion used in trigger
*/
struct emcTriggerPed
{
unsigned long PedShift; // pedestal shift
unsigned long BitConversionMode[30][10]; // 6 bits conversion mode. the indexex are the crate number and position in crate
unsigned long Ped[30][160]; // pedestal value. the indexex are the crate number and position in crate
};
/*
*
* Table: emcTriggerLUT
*
* description: * //: Table which contains each patch LUT information
*/
struct emcTriggerLUT
{
unsigned long FormulaTag[30][10]; // formula tag for each [crate][patch]
unsigned long FormulaParameter0[30][10]; // Parameter 0 for the LUT formula in [crate][patch]
unsigned long FormulaParameter1[30][10]; // Parameter 1 for the LUT formula in [crate][patch]
unsigned long FormulaParameter2[30][10]; // Parameter 2 for the LUT formula in [crate][patch]
unsigned long FormulaParameter3[30][10]; // Parameter 3 for the LUT formula in [crate][patch]
unsigned long FormulaParameter4[30][10]; // Parameter 4 for the LUT formula in [crate][patch]
unsigned long FormulaParameter5[30][10]; // Parameter 5 for the LUT formula in [crate][patch]
};

BEMC Online Trigger Monitoring

During data taking the BEMC trigger information is monitored, and changes in the configuration (new pedestals, masks, etc.) are recorded.  The code relevant to this online trigger monitoring was developed by Oleksandr, and is checked into CVS here (usage instructions in the README file).  The scripts execute via a cronjob on the online machines on the starp network.  In particular, there exists directories with results from previous years at /ldaphome/onlmon/bemctrgdb20XX/ on onl08.starp.bnl.gov.

The final location for this information is in the offline DB, and the definitions for the tables are given here.  These DB tables are used by the StBemcTriggerSimu in the StTriggerUtilities package to replicate the BEMC trigger conditions for a particular timestamp. 

The DB tables can be uploaded while taking data or stored in ROOT files to be uploaded after data taking is complete.  To upload all the tables stored in ROOT files during data taking only a simple script is needed employing StBemcTablesWriter to read in a list of files and upload their information to the DB.  This script (uploadToDB.C) is checked into the macros directory of in CVS here.