EPD offline DB table -Update

This page is update to drupal.star.bnl.gov/STAR/blog/sprastar/epd-offline-db-table
A new table Calibrations / EPD:Thresholds added
Two new fields added to
Geometry / EPD: epdQTMap

Here is the full description:

Current plan is to Keep StTriggerData simple and just keep using  StTriggerData::fmsADC(crate=5,QT_board_address,QT_channel,prepost) 
and make DB tables for EPD map, make another maker (StEpdHitMaker) to access the DB and convert QT address and channels  to generalized coordinates [ew][pp][tile] and create epd hit class (StEpdHit) and its collection in StEvent, MuDst or picodst. (got help from Akio ).

Following explains the DB structure created to store EPD Geometry and Calibrations tables in STAR Offline database, as requested by database admin
(https://drupal.star.bnl.gov/STAR/comp/db/how-to-user/new-table/):

Nessary table for the moment is mapping EPD[ew][pp][tile] <=> QT[board][channel]
But, for the completeness and for offline DB requments, I have created other tables.

1.

Geometry / EPD: epdQTMap.idl
struct epdQTMap {
  unsigned short ew[744]; /* ew=0 East EPD, ew=1 West EPD */
  unsigned short pp[744]; /*pp=1-12, Super-Sector number */
  unsigned short tile[744]; /* tile=1-31, tile number in a super sector*/

  short qt_crate_adc[744]; /* ADC crate number, -1 for non existing crate*/
  short qt_board_adc[744]; /* ADC channel address, -1 for non existing channels*/
  short qt_channel_adc[744]; /* qt_channel_adc=1-32, -1 for non existing channels*/

  short qt_crate_tac[744]; /* TAC crate number, -1 for non existing crate*/
  short qt_board_tac[744]; /* TAC channel address, -1 for non existing channels*/
  short qt_channel_tac[744]; /* qt_channel_tac=1-32, -1 for non existing channels*/
};

Geometry / EPD: epdFEEMap.idl
struct epdFEEMap {
  unsigned short ew[744]; /* ew=0 East EPD, ew=1 West EPD */
  unsigned short pp[744]; /*pp=1-12, SuperSector number */
  unsigned short tile[744]; /* tile=1-31, tile number in a super sector*/
  short tuff_id[744]; /* TUFF ID, undefined -1 */
  short tuff_group[744]; /* TUFF Group no, undefined -1 */
  short tuff_channel[744]; /* TUFF channel, undefined -1 */
  char wire_1_id[744][20]; /* 1_wire_id, undefined -1 */
  short receiver_board[744]; /* Receiver board # 1...6... undefined -1 */
  short receiver_board_channel[744]; /* Re. brd ch 1...16, unsigned -1*/
};

Calibrations / EPD: epdStatus.idl
struct epdStatus {
  unsigned short ew[744];   /* ew=0 East EPD, ew=1 West EPD */
  unsigned short pp[744];   /*pp=1-12, SuperSector number */
  unsigned short tile[744]; /* tile=1-31, tile number in a super sector*/
  short status[744];        /*  -1 for non existing channels, 0-dead, 1-good*/
};

Calibrations / EPD: epdGain.idl
struct epdGain {
  unsigned short ew[744]; /* ew=0 East EPD, ew=1 West EPD */
  unsigned short pp[744]; /*pp=1-12, SuperSector number */
  unsigned short tile[744]; /* tile=1-31, tile number in a super sector*/
  float vped[744]; /* SiPM vPED, unspecified -999 */
  float mip[744]; /* ADC ch MIP, unspecified -999 */
  float qt_pedestals[744]; /* QT mean pedestal, unspecified -999 */
  float dark_current[744]; /* Dark Current of SiPMs, unspecified -999*/
};

These variables are used to map EPD coordinated [ew][pp][tile] to associated QT board and channels, to retrive ADC and TAC information.
Please see below for drawing of the mapping.
744 entries will be stored, and ingeneral not subjected to change, unless other wise due to mapping error or other hardware issues.
For this year only 93 entries (channels) are enough, but for the completness rest of the entreis( channels) are initiallies to -1.

2. IDL file for EPD are located here (ONL farm):
/ldaphome/sprastar/EPDdb/StDb/idl/

3. A non-indexed table

4. idl compiles and

  1.     sizeof(epdQTMap_st) per entry is 14  => For all 744 entrie 10,416
  2.     sizeof(epdFEEMap_st) per entry is 36  => For all 744 entrie 26,784
  1.     sizeof(epdStatus_st) per entry is 8  => For all 744 entrie 5,952
  2.     sizeof(epdGain_st) per entry is 22  => For all 744 entrie 16,368

5. EPD-subsystem software coordinator: Prashanth Shanmuganathan (sprastar)