GEB Headers

Detailed information regarding the possible data types, as described by the GRETINA global event builder (GEB) global headers, is available for download (GEBHeaders.pdf).

struct GEBHeader {
	int32_t type;
	int32_t length; /* length of payload following the header, in bytes */
	int64_t timestamp;
}
Type = 1: Decomposed GRETINA Data

This data type is the decomposed GRETINA data (mode 2) format. Mode 2 data is output from the signal decomposition process, and gives interaction points and energies from a single crystal. The format is defined as a fixed-length C struct (definition found in GRETINA DAQ software in /global/devel/XX-X/decompLib/decompLibApp/gdecomp.h). Two versions of this data format have existed since GEB headers were introduced, with two different struct types. Below is the mode2 data struct used from June 2012-present. For older structs, see the documentation (
GEBHeaders.pdf). Definition of Mode2 data formats is controlled by Mario Cromaz (LBNL).

Decomposed GRETINA Data format, June 2012 - now:


#define MAX_INTPTS 16 

struct crys_intpts {
	int type; /* as of June 2012: abcd5678 */
	int crystal_id;
	int num; /* # of interaction points from decomp, or # of nets on decomp error */
	float tot_e; /* CC energy for the central contact selected for use in decomp (calibrated, and for 10 MeV CC channels, includes DNL correction. */
	int core_e[4]; /* 4 raw core energies from FPGA filter (uncalibrated) */
	long long int timestamp;
	long long trig_time;
	float t0;
	float cfd;
	float chisq;
	float norm_chisq;
	float baseline;
	float prestep; /* avg trace value before step (baseline) */
	float poststep; /* avg trace value after step (flat-top) */
	int pad; /* non-0 with a decomp error, value gives error type */ 
                 /*    pad = 1   a null pointer was passed to dl_decomp()
                           = 2   total energy below threshold
                           = 3   no net charge segments in evt
                           = 4   too many net charge segments
                           = 5   chi^2 is bad following decomp (in this case
                             crys_intpts is non-zero but post-processing step is not applied)
                           = 6   bad build, i.e. <40 segment+CC channels found

                       pad|= 128  PileUp, i.e. pileup flag or deltaT1<6usec

                  e.g. pad = 128  pileup+Good
                           = 133  pileup+BadChisq                */
	struct {
		float x,y,z,e; /* here e refers to the fraction */
		int seg; /* segment number hit */
		float seg_ener; /* energy of the hit segment */
	} intpts[MAX_INTPTS];
};



Type = 2: Raw GRETINA Data

This data type contains raw (Mode3) data output directly by the GRETINA digitizers. Each event corresponds to a single digitizer channel, and includes a header with timestamp and energy information, as well as a section of trace. The detailed format is presented as a block diagram below:


The energy is a 24-bit 2's complement signed integer, and must be converted to a 32-bit signed integer before use. The detector ID is a compound word consisting of 4 bit-fields as follows:


<5-bit detector #><2-bit crystal #><2-bit VME slot #><4-bit channel #>

A sample code to unpack this data is included in the GEBHeaders.pdf file.


Type = 3: Tracked GRETINA Data

This data type contains tracked GRETINA (Mode1) data. Mode1 data is a superset of Mode2 (type 1) data, in that all interaction point information is maintained, and the results of tracking, namely a grouping of interaction points into a gamma-ray event, and a preferred ordering (first-hit identification) of interaction points is included. The structure of this data is similar to mode2, using a fixed length C struct, as defined below (can also be found in GRETINA DAQ software in /global/devel/XX-X/trackLib/trackLibApp/ctk.h). Definition of Mode1 data formats is controlled by T. Lauritsen (ANL).


#define MAX_NDET 30 
  
struct CLUSTER_INTPTS {
	int valid;
	int ndet;
	int tracked;
	float fom;
	float esum;
	int trackno;
	int bestPermutation;
	int processed;
	struct {
		float xx, yy, zz;
		float edet;
		int order;
		long long int timestamp;
		int shellHitPos;
		int detno;
	}intpts[MAX_NDET];
};


Type = 4: BGS Raw Data

This data type contains the raw BGS data, which is a simple array of short integers, which is mapped simply to values read from the data acquisition. A parameter list, which simply provides a label to each short integer in the data array provides the framework to unpack the BGS data. The parameter list for the BGS data in the commissioning runs is in the .pdf document. Additional information regarding the BGS data structure can be obtained from H. Crawford (LBNL).


Type = 5: S800 Raw Data

This data type contains the raw S800 data buffers. Description of the complete S800 raw data structure is available on the S800 wiki at https://groups.nscl.msu.edu/opdevtech/wiki/index.php/S800_data_format


Type = 6: NSCL Non-Event Data

This data type contains NSCL non-event data structures, including beginning of run, end of run and scaler NSCL buffers, which are generated by the NSCL readout software. In general, the first 32-bit integers of the payload for a type 6 event will describe the buffer length in bytes, and the buffer packet type, in a RingItemHeader, defined as:

typedef struct _RingItemHeader {
	uint32_t s_size;
	uint32_t s_type;
}

Details regarding the definition of non-event data structures can be found in the NSCL documentation available at:http://docs.nscl.msu.edu/daq/ringbuffer/r17361.html, while the definition of the possible non-event data types is available at: http://docs.nscl.msu.edu/daq/ringtutorial/a1889.html.


Type = 7: GRETINA Scaler Data

This data type contains GRETINA digitizer-level scaler information. These scalers are currently in the testing phase, and will be implemented once testing is complete. 

Type = 8: Bank 29 Raw GRETINA Data

This data type is structurally identical to type 2 (raw GRETINA, or mode3 data), but has been designated to exclusively identify data originating from Bank29 in the GRETINA DAQ. This is a single digitizer which is used to digitize signals from auxiliary systems which may be useful to improve the resolution of particle-gamma timing, for instance. A new type number was assigned to mark these data as being inappropriate for decomposition, and to funnel these data into the appropriate GRETINA output file.


Type = 9: S800 Processed (Physics) Data

This data type contains post-processed S800 data, which contains the S800 parameters relevant to and required for particle identification (energy loss and time of flight information), and Doppler correction of GRETINA spectra (S800 angles and positions). This is the structure that can be used if GRETINA analysis and S800 analysis are treated somewhat independently, to be able to make the appropriate Doppler corrections and obtain the best possible GRETINA spectra. Data type was defined by D. Weisshaar (NSCL).

struct s800_physicsdata {
	int32_t type; /* defined as abcd1234 for indicating this (first) version */
	float crdc1_x; /* crdc x/y positions, in mm */
	float crdc1_y;
	float crdc2_x;
	float crdc2_y;
	float ic_sum; /* ion chamber energy loss */
	float tof_xfp; /* tof scintillator after the A1900 */
	float tof_obj; /* tof scintillator in the object box */
	float rf; /* cyclotron rf for tof */
	int trigger; /* trigger register bit pattern */
	/*------------------------------------------------------------------------*/
	/* from here corrected values, extracted from data above */
	/*------------------------------------------------------------------------*/
	float ic_de; 
	/* tof values with corrections applied (from afp/crdc x) */
	float tof_xfpe1;
	float tof_obje1;
	float tof_rfe1;
	/* Trajectory information at target position calculated from a map and
	afp/bfp/xfp/ycp.  New map and you need to recalculate. */
	float ata; /* dispersive angle */
	float bta; /* non-dispersive angle */
	float dta; /* dT/T, T = kinetic energy */
	float yta; /* non-dispersive direction */
};


Type = 10: Timestamped NSCL Non-Event Data

This data type is identical in format to Type 6 (NSCL Non-Event Data), but was created to reflect a change in the way that NSCL non-event data is sent to the global event builder. Type 6 non-event data was assigned a recent timestamp once it arrived to the global event builder, which could result in trouble with respect to the ordering of scaler packets, etc. In response to this, within the NSCL data acquisition system a change was made to provide non-event data with a valid timestamp before being sent to the global event builder. This data type reflects this change, and should signify that the timestamp of these packets are generated by the NSCL DAQ, and not assigned in the GEB. Questions regarding this data type should be directed to D. Weisshaar (NSCL).


Type = 11: GRETINA GEANT4 Simulation Data

This data type is reserved for simulation data for GRETINA as generated from the GEANT4 simulation of the array. Details on the data format and specifications are pending. This data type is controlled by Lew Riley (Ursinus College).

#define MAX_SIM_GAMMAS 10 
  
struct g4Sim_abcd1234 {
    int type;
    int num;
    int full;
    struct {
	float e;
	float x, y, z;
	float phi, theta;
	float beta
    }g4Sim_emittedGamma[MAX_SIM_GAMMAS];
};



Type = 12: CHICO Raw Data

This data type is reserved for raw data from the CHICO detector. Details on the data format are pending. This data type is controlled by T. Lauritsen (ANL).

Type = 13: Superstitious Mystery Data

As we don't want to press our luck, no real data will be assigned type 13.




Type = 14: Digital Gammasphere Data (DGS)

This data type is reserved for data related to digital Gammasphere (DGS) and the GTReceiver3 at ANL. Details for this data type are pending. This data type is controlled by T. Lauritsen (ANL).

Type = 15: Digital Gammasphere Trigger Data (DGSTRIG)

This data type is reserved for data related to digital Gammasphere (DGS) trigger informaiton and the GTReceiver4 at ANL. Details for this data type are pending. This data type is controlled by T. Lauritsen (ANL).

Type = 16: Digital FMA Data (DFMA)

This data type is reserved for data related to digital FMA and the GTReceiver4 at ANL. Details for this data type are pending. This data type is controlled by T. Lauritsen (ANL).

Type = 17: Phoswich Wall

This data type is reserved for data related to the Washington University Phoswich Wall particle detector array.  Details for this data type are pending; the data type is controlled by the WashU group of D. Sarantites et al.


Type = 18: Phoswich Wall Auxiliary Data

This data type is reserved for auxiliary data related to the Washington University Phoswich Wall particle detector array.  Details for this data type are pending; the data type is controlled by the WashU group of D. Sarantites et al.


Type = 19: GODDESS

This data type is reserved for data related to the GODDESS particle array.  Details for this data type are pending; the data type is controlled by the Rutgers/ORNL GODDESS team.

Type = 20: ANL LaBr array

This data type is reserved for a LaBr array at ANL.  Details are coming.  The data type is controlled by T. Lauritsen (ANL).

Type = 21: LENDA Neutron Array (NSCL)

This data type is reserved for the LENDA detectors at NSCL.  Details are coming.  The data type is controlled by H. Crawford (NSCL).

If additional GEB header types are required, for new auxiliary detectors, etc., please contact Heather Crawford or Mario Cromaz to obtain a type number.