Proto-II Data Structure
Note:This page is not up to date (sorry). See Cosmic Run Phase 3, Phase 4 and Phase 5 for latest changes.
See also Where to Find the Proto-II Test Data, Proto-II Cosmic Run Procedure and Proto-II TDC Threshold.
The structure of the data taken from Proto-II is defined in proto2.h under /nfs/babar/download/dch/OdfProto/src. What is actually stored in the structure is explained below.
Data File
Each data file consists of a run header followed by a sequence of event records.
Run Header
The run header is defined in proto2.h as:
typedef struct _RunHeader {
uint16_t version_number;
uint16_t run_number;
time_t start_time;
uint8_t comment[512];
} RunHeader;
It consists of 4 fields, of which only 2 are currently used:
run_number = run number;
start_time = time when the run started.
Event Record
Each event record consists of a event header followed by the body of the data.
The event header is defined in proto2.h as:
#define MAX_OFFSETS 16
typedef struct _EventHeader {
uint32_t event_size;
uint32_t event_flags;
time_t event_time;
uint16_t event_number;
uint16_t numHits;
uint32_t offset[MAX_OFFSETS][2];
} EventHeader;
It consists of 6 fields:
Hit Records
Each event contains numHits records of type Hit, defined as:
typedef struct _Hit {
uint16_t layer;
uint16_t wire;
uint16_t tdc;
uint16_t disc_thresh;
uint16_t gain_flags;
uint16_t hit_flags;
} Hit;
The first 4 fields contain:
layer = layer number.
wire = wire number.
tdc = TDC count. One count is approximately 0.5 ns. Due to a quirk in the readout hardware, TDC count overflows at some value around 1900. It is probably safe to consider anything greater than 1850 as `no hit'.
disc_thresh = discriminator threshold in mV.
You can safely ignore the last two fields for the moment.
CalParams Records
Each event contains numHits records of type CalParams. Each CalParams[i] correspond to Hit[i].
typedef struct _CalParams {
uint16_t delay;
uint16_t amplitude;
uint16_t charge;
uint16_t gain_params;
} CalParams;
The first 2 fields contain:
delay = calibration strobe delay in ns. This is set to 0 for channels that are not selected for calibration in this event.
amplitude = calibration DAC value in mV.
gain_params = calibration gain setting, either 1 or 33.
You can safely ignore charge for the moment.
SlowData Record
Events logging changes in slow data (temperature, pressure, gas flow, and humidity) contain one record of type SlowData, defined as:
typedef struct _SlowData {
float temp_front_gas;
float temp_rear_gas;
float temp_front_cover;
float temp_rear_cover;
float temp_room;
float rh_front_cover;
float rh_rear_cover;
float press_chamber;
float press_atmosphere;
float flow_nitrogen;
float flow_helium;
float flow_c4h10;
float flow_cf4;
float volts_anode;
float volts_cathode1;
float volts_cathode2;
float volts_cathode3;
} SlowData;
The first five fields contain temperatures:
temp_front_gas = temperature inside front of chamber.
temp_rear_gas = temperature inside rear of chamber.
temp_front_cover = temperature inside front cover.
temp_rear_cover = temperature inside rear cover.
temp_room = not used. (Room Temperature)
The next two fields contain the relative humidity in the front and rear cover of the chamber. When these fields have a value of zero, the humidity can be assumed to be less than 5% relative to dew point.
The following two fields contain pressure data: absolute chamber pressure and atmospheric pressure, respectively. Pressure is measured in millibar.
The next three fields contain gas flow measurements:
flow_nitrogen = nitrogen flow in standard litres per min.
flow_helium = helium flow in standard litres per min.
flow_c4h10 = isobutane flow in standard litres per min.
flow_cf4 = not used. (Freon Flow)
Finally, the last four fields contain the logged high voltage readings. All measurements are in volts; one volt of reading corresponds to one kilovolt output.
volts_anode = anode voltage (nominally 2020V)
volts_cathode1 = first shaping voltage (nominally 350V)
volts_cathode2 = second shaping voltage (nominally 910V)
volts_cathode3 = third shaping voltage (nominally 910V)
Masahiro Morii 05-Nov-1997
Trevor Lanting 02-Apr-1997
|