TRAX listmode file format
| GSI Biophysics | TRAX long write-up |

Listmode file format

Listmode files contain binary data. The format can be described best by reporting the C-structures with which they are written.

Trackmode version before 20020830

struct STRXPARTICLEEVTOLD {
   unsigned long ulEvt;               /* primary event number */
   unsigned long ulID;                /* particle ID */
   unsigned long ulIASequence;        /* interaction sequence number */ 
   unsigned long ulPT;                /* particle type */
            long  lIA;                /* interaction */
   unsigned long ulVol;               /* Vol ID */
   double dvx0[4];                    /* 0..2: location, 3: time */
   float rvd [3];                     /* direction */
   float rE, rdE;                     /* energy, energy loss */
};

Trackmode version 20020830

struct STRXPARTICLEEVT {
   unsigned long ulVersion, ulLength; /* version, length of this structure (bytes) */
   unsigned short uiByteSex;          /* =1 for native endian, else byte swap necessary */
   unsigned short uiMode;             /* always=0 for particle evt */
   unsigned long ulEvt;               /* primary event number */
   unsigned long ulID;                /* particle ID */
   unsigned long ulIASequence;        /* interaction sequence number */ 
   unsigned long ulPT;                /* particle type: 0,1,2,3,4,5 for x,n,e-,e+,ions */
            long  lIA;                /* interaction type */
   unsigned long ulVol, ulVolSrc;     /* Vol ID actual, original */
   double dvx[4], dvx0[4];            /* 0..2: location [cm], 3: time [sec]; actual, original */
   float  rvd[3], rvd0[3];            /* direction actual, original */
   float rE, rE0;                     /* energy actual, original [keV] or [MeV/u] for ions */
   float rdE;                         /* energy loss [keV] */
};
Interaction types are 1,2,3,4,5 for boundary, cutoff, elastic, ionization, excitation, respectively.

Volume mode version 20020830

                                      /* vol event data */
struct STRXVOLEVTDATA {
   unsigned long ulVol;               /* Vol ID */
   float           rdE;               /* energy loss [keV] */
   float           rt;                /* time [sec] */
};
                                      /* vol event header */
struct STRXVOLEVTHEAD {
   unsigned long ulVersion, ulLength; /* version, length of header+data */
   unsigned short uiByteSex;          /* =1 for native endian, else byte swap */
   unsigned short uiMode;             /* always=1 for volmode evt */
   unsigned long ulEvt;               /* current/max primary event number */
            long  lOR;                /* BOR/EOR */
   int nD;                            /* current/max # of data */
};
                                      /* vol event output */
struct STRXVOLEVT {
   struct STRXVOLEVTHEAD   sH;      
   struct STRXVOLEVTDATA *psD;      
};



Data are always written in native endian, readers with different endian must byte-swap short, long, float and double data.
Note that the first 12 bytes are always the same, but the mode entry allows to distinguish (after byte swap) between volume and track mode, respectively.
| GSI Biophysics | TRAX long write-up |
Last updated: M.Kraemer@gsi.de, 25-Nov-2002