Project

General

Profile

Table Definitions

Data Tables

These tables are for the most part a direct translation of the raw data from CODA to MySQL.

Run

This contains a 'long format' key-value pairs. For example, there are entries for the average FMAG/KMAG currents, whether or not certain triggers were used, full run descriptor text, etc. This is kept in key-value pairs to allow the lists of values to be extensible for future additions.

Name Variable type Description
runID SMALLINT Run identifier number
name CHAR Key name
value TEXT Key value

Spill

This table contains information pertinent to the 5 seconds of beam received. This includes information from the Beginning of the Spill (BOS) and the End of the Spill (EOS), what the target position is, and the vmeTime (for ROC 2). A dataQuality bit pattern field marks that have certain characteristics. SpillID comes from slow control events and spill counter events. SpillID can sometimes be zero, which means that no slow control or spill counter event was seen before a BOS/EOS event was encountered.

Name Variable type Description
spillID INT Spill identifier number
runID SMALLINT Run identifier number
liveProton BIGINT The calculated number of live protons for the spill1
targetPos TINYINT The position (0-7) of the target table
dataQuality BIGINT Bit pattern containing information regarding the quality of the data for this spill2
BOScodaEventID INT Number of the event in the CODA file that contains the BOS data
BOSvmeTime INT ROC2 vmeTime at BOS
EOScodaEventID INT Number of the event in the CODA file that contains the EOS data
EOSvmeTime INT ROC2 vmeTime at EOS
time DATETIME Time recorded in the nearest slow control event.

Event

The Event table has one entry for each 'Physics' CODA event (an event that contains 'Hit' information -- not SlowControl, Pre-Start, Go, End, Spill events). It also contains the associated CODA event number for debugging purposes, has a trigger fields to indicate what triggered the event to be recorded, and a dataQuality bits field so that we can mark certain undesirable events. The vmeTime corresponds to the ROC 2 vmeTime.

Name Variable type Description
eventID INT Event identifier number
codaEventID INT Corresponding event number in CODA file
runID SMALLINT Run identifier number
spillID INT Spill identifier number
NIM1 TINYINT Boolean of whether or not the NIM1 triggered the event
NIM2 TINYINT Boolean of whether or not the NIM2 triggered the event
NIM3 TINYINT Boolean of whether or not the NIM3 triggered the event
NIM4 TINYINT Boolean of whether or not the NIM4 triggered the event
NIM5 TINYINT Boolean of whether or not the NIM5 triggered the event
MATRIX1 TINYINT Boolean of whether or not the MATRIX1 triggered the event
MATRIX2 TINYINT Boolean of whether or not the MATRIX2 triggered the event
MATRIX3 TINYINT Boolean of whether or not the MATRIX3 triggered the event
MATRIX4 TINYINT Boolean of whether or not the MATRIX4 triggered the event
MATRIX5 TINYINT Boolean of whether or not the MATRIX5 triggered the event
RawMATRIX1 INT Count of raw MATRIX1 triggers
AfterInhMATRIX1 INT Count of after-inhibit MATRIX1 triggers
RawMATRIX2 INT Count of raw MATRIX2 triggers
AfterInhMATRIX2 INT Count of after-inhibit MATRIX2 triggers
RawMATRIX3 INT Count of raw MATRIX3 triggers
AfterInhMATRIX3 INT Count of after-inhibit MATRIX3 triggers
RawMATRIX4 INT Count of raw MATRIX4 triggers
AfterInhMATRIX4 INT Count of after-inhibit MATRIX4 triggers
RawMATRIX5 INT Count of raw MATRIX5 triggers
AfterInhMATRIX5 INT Count of after-inhibit MATRIX5 triggers
dataQuality MEDIUMINT Bit pattern containing information regarding the quality of the data for this event2
vmeTime INT vmeTime (for ROC 2) at the time of this event

QIE

A table to keep track of the beam intensity for the 33 RF buckets about the central RF bucket for a given Event.

Name Variable type Description
runID SMALLINT Run number
spillID INT Spill identifier number
eventID INT Event identifier number
triggerCount INT QIE debugging value
turnOnset INT QIE debugging value
rfOnset INT QIE debugging value
RF-16 MEDIUMINT QIE readout for the Nth bucket before middle RF bucket for the event
RF-15 MEDIUMINT QIE readout for the Nth bucket before middle RF bucket for the event
... ... ...
RF+00 MEDIUMINT QIE readout for the middle RF bucket for the event
... ... ...
RF+15 MEDIUMINT QIE readout for the Nth bucket after middle RF bucket for the event
RF+16 MEDIUMINT QIE readout for the Nth bucket after middle RF bucket for the event

Occupancy

A table that keeps count of the number of in-time hits (not trigger hits) for the major detector groups.

runID SMALLINT Run identifier number
spillID INT Spill identifier number
eventID INT Event identifier number
D1 MEDIUMINT The count of in-time hits for this detector group
D2 MEDIUMINT The count of in-time hits for this detector group
D3 MEDIUMINT The count of in-time hits for this detector group
H1 MEDIUMINT The count of in-time hits for this detector group
H2 MEDIUMINT The count of in-time hits for this detector group
H3 MEDIUMINT The count of in-time hits for this detector group
H4 MEDIUMINT The count of in-time hits for this detector group
P1 MEDIUMINT The count of in-time hits for this detector group
P2 MEDIUMINT The count of in-time hits for this detector group

Hit

This table contains each signal recorded in each detector. 'hitID' is an artificial, auto-incremented field, and is not derived from the raw CODA data. tdcTime is decoded directly from the raw CODA data, but the inTime, masked, driftTime, driftDistance, and resolution are derived from the tdcTime and the hodoInfo, chamberInfo, and RT tables. For hodoscope hits, the masked, driftTime, driftDistance, and resolution fields are NULL.

Name Variable type Description
hitID BIGINT Artificial hit number
spillID INT Spill identifier number
eventID INT Event identifier number
detectorName CHAR Detector that is mapped to that ROC, board, and channel
elementID SMALLINT Element of that detector that is mapped to that ROC, board, and channel
tdcTime DECIMAL The calculated TDC time of the hit
inTime TINYINT Boolean value for if this hit is considered "In time"
masked TINYINT Boolean value for if this chamber hit is hodoscope masked
driftTime DECIMAL (t0 - tdcTime), where t0 comes from the chamberInfo/hodoInfo table
driftDistance DECIMAL Distance that corresponds to the driftTime, derived from 'RT' table
resolution DECIMAL Uncertainty in driftDistance, from 'RT' table
dataQuality MEDIUMINT A bit-pattern that indicates the quality designation of the hit

TriggerHit

To avoid having duplicate hits in the Hit table from the TDC's and the v1495 boards, the v1495 hits from hodoscope paddles are stored here. Since these are hodoscope hits only, there are no masked, driftTime, driftDistance, and resolution fields. Everything else is the same.

Name Variable type Description
hitID BIGINT Artificial hit number
spillID INT Spill number
eventID INT Event number
detectorName CHAR Detector that is mapped to that ROC, board, and channel
elementID SMALLINT Element of that detector that is mapped to that ROC, board, and channel
triggerLevel TINYINT The v1495 trigger level source of the trigger hit
tdcTime DECIMAL The calculated TDC time of the hit
inTime TINYINT Boolean value for if this hit is considered "In time"
errorBits TINYINT If there is an issue with the v1495 readout, a non-zero errorcode is placed here for debugging purposes
dataQuality MEDIUMINT A bit-pattern that indicates the quality designation of the hit

Beam, Target, Environment, HV

These are SlowControl variables that are relevant to the beam, target, environment, and HV readouts. These are stored in key-value pairs for extensibility.

Name Variable type Description
runID SMALLINT Run identifier number
spillID INT Spill identifier number
name VARCHAR Name of variable measured
value TEXT Value of that variable

Scaler

Scalers are read out at Beginning and End of Spill events.

Name Variable type Description
scalerID BIGINT Artificial scaler entry identifier
spillID INT Spill number
spillType ENUM If the scaler information came from BOS or EOS events
scalerName CHAR Detector that is mapped to that ROC, board, and channel
value INT Value of scaler readout
dataQuality MEDIUMINT Bit-pattern field defining the data quality of a scaler entry (currently no criteria defined)

BeamDAQ

Direct upload of the data from our BeamDAQ. See BeamDAQ documentation for exact definitions of these fields.

Name Variable type Description
spillID INT Spill number
timestamp DATETIME time of the BeamDAQ entry data
NM3ION FLOAT
QIEsum FLOAT
dutyFactor53MHz DECIMAL
inhibit_count INT
inhibit_block_sum FLOAT Busy
trigger_count INT
trigger_sum_no_inhibit FLOAT Inhibit
Inh_output_delay INT
QIE_inh_delay INT
Min_Inh_Width INT
Inh_thres INT
QIE_busy_delay INT
Marker_delay INT
QIE_phase_adjust INT

TriggerRoadsTHitEvent

Based on the in-time hodoscope hits from the TriggerHit table, all possible trigger roads are reconstructed. For a given event, all possible roadID's are aggregated here.

Name Variable type Description
eventID INT Event identifier number
roadID MEDIUMINT Road identifier that corresponds to a road in the TriggerRoads table

Calibration Tables

These tables are version-controlled and are expected to change from time to time as runs progress. These are kept in the /seaquest/production/run directory.

chamberInfo

This table contains the information required to map, time, and derive driftTime from the tdcTime from the chamber hits.

Name Variable type Description
detectorName CHAR Name of detector that maps to that {ROC, board, channel}
elementID SMALLINT Element of that detector that maps to that {ROC, board, channel}
rocID TINYINT ROC identifier
boardID SMALLINT Board identifier unique to that ROC
channelID TINYINT Channel identifier unique to that {ROC,board}
t0 DECIMAL
offset DECIMAL
width DECIMAL
lsbID INT
asdqID TINYINT
asdqCableID VARCHAR
asdqChannelID INT
wirePosition DECIMAL

hodoInfo

This table contains the information required to map and time the (Taiwan TDC) hodoscope hits.

Name Variable type Description
detectorName CHAR Name of detector that maps to that {ROC, board, channel}
elementID SMALLINT Element of that detector that maps to that {ROC, board, channel}
rocID TINYINT ROC identifier
boardID SMALLINT Board identifier unique to that ROC
channelID TINYINT Channel identifier unique to that {ROC,board}
tPeak DECIMAL
width DECIMAL
cableDelay DECIMAL

triggerInfo

This table contains the information required to map and time the (v1495) hodoscope hits.

Name Variable type Description
detectorName CHAR Name of detector that maps to that {ROC, board, channel}
elementID SMALLINT Element of that detector that maps to that {ROC, board, channel}
triggerLevel TINYINT Level of the v1495 board that the trigger hit came from
rocID TINYINT ROC identifier
boardID SMALLINT Board identifier unique to that ROC
channelID TINYINT Channel identifier unique to that {ROC,board}
tPeak DECIMAL
width DECIMAL
internalDelay DECIMAL

scalerInfo

This table contains the information required to map scaler {ROC, board, channel} to a scalerName.

Name Variable type Description
scalerName CHAR Name of detector that maps to that {ROC, board, channel}
rocID TINYINT ROC identifier
boardID SMALLINT Board identifier unique to that ROC
channelID TINYINT Channel identifier unique to that {ROC,board}

RT

This contains information regarding how to relate driftTime to driftDistance (and its corresponding resolution). Once the t0 information is applied to a hit, the resulting driftTime is mapped to the driftDistance and resolution.

Name Variable type Description
detectorName CHAR
voltage INT Voltage at which the chamber holds its wires
gasMixture CHAR Which gas mixture is being used
driftTime DECIMAL The timing value that is derived from tdcTime and t0
driftDistance DECIMAL The corresponding distance for this chamber, voltage, gas configuration
resolution DECIMAL Uncertainty in this distance approximation

TriggerRoads

This contains a list of all of the trigger roads that were used in the run.

Name Variable type Description
roadsetID SMALLINT
roadID MEDIUMINT
detectorHalf ENUM
H1 SMALLINT
H2 SMALLINT
H3 SMALLINT
H4 SMALLINT
charge TINYINT Charge of muon that would traverse this road
pXbin SMALLINT
pXmin DECIMAL
pXmax DECIMAL
pXmean DECIMAL
pXsd DECIMAL
Nraw INT
N DOUBLE
target/all DOUBLE
highmass/all DOUBLE
gunRate INT
dataRate INT

HodoMask

This is a look up table containing relations between wires in wire chambers and the hodoscope paddles in the adjacent hodoscope planes. This table is used to mask out hits by ruling out hits in wires that do not have a corresponding hit in a nearby hodoscope paddle.

Name Variable type Description
stationID TINYINT
hodoDetectorID TINYINT Hodoscope detector ID (used with geometry)
hodoDetectorName CHAR Hodoscope detector name
hodoElementID SMALLINT Hodoscope paddle
wireDetectorID TINYINT Corresponding chamber detector ID
wireDetectorName CHAR Corresponding chamber name
wireElementID SMALLINT Corresponding chamber wire numbers

1 This is calculated directly after decoding via the following query, where the INTENSITY_FIELD_NAME is the 'S:G2SEM' if entries exist. If it doesn't, then it will use 'F:NM3SEM' if entries exist. If both those don't exist, then it will try to use 'F:NM3ION'. If a BeamDAQ entry doesn't exist, or the QIESum criteria in the query is not met, the liveProton sum value will default to NULL.

SELECT b.spillID, ROUND(m.value*(b.QIESum - b.trigger_sum_no_inhibit - b.inhibit_block_sum)/b.QIESum) AS `liveProton`                                             
  FROM BeamDAQ b                                                
  INNER JOIN Beam m USING(spillID)                              
  WHERE name = 'INTENSITY_FIELD_NAME'      
  AND b.QIESum > 0                                              
  AND b.QIESum > (b.trigger_sum_no_inhibit + b.inhibit_block_sum);

2 See Data Quality in our Productions