00001 /* Written 11/23/99 cle 00002 * changes: 00003 * 11/24/99 cle: renamed some variables 00004 * 12/06/99 ppy: add xLastHit, yLastHit to type1_track 00005 * 01/31/00 ppy: add innerMostRow and outerMostRow to type1_track 00006 * 03/29/00 cle: added global_track, L3_GTD, L3_SECCD. 00007 * added offlen sl3clusterp to L3_SECP. 00008 * added offlen tracks to L3_P. 00009 * 04/06/00 cle: implement pablos suggestion to divide L3_SECCD into 00010 * L3_SECCD and L3_CLUSTER, named it l3_cluster 00011 * added L3_LTD and local_track (pablos modified 00012 * type3_track). 00013 * format_number in L3_SECTP->bh defines the use of 00014 * L3_SECTP->banks. 0: banks[0-2] = type1-3 track 00015 * 1: banks[0] = local_track (L3_LTD) 00016 * 08/18/00 cle: put L3 summary data and L3 summary into L3_P 00017 * 03/07/01 cle: add svt/FTPC banks to L3_P 00018 * 06/21/01 cle: changed L3_P->seq to L3_P->gl3Id for recontruction of counters 00019 * 080801 cle: got rid of type1/2/3 tracks, change vertex to floats in gtd 00020 * 082701 cle: format number is now 5, due to addition of trigger data offlen 00021 * 00022 */ 00023 00024 /******************* NOTE ******************************************** 00025 * This file should never be included directly. It is included from * 00026 * /DAQ/include/daqFormats.h after the necessary structs are defined * 00027 *********************************************************************/ 00028 00029 #ifndef _L3_FORMATS_H 00030 #define _L3_FORMATS_H 00031 00032 00033 #define CHAR_L3_P "L3_P " 00034 #define CHAR_L3_SECP "L3_SECP " 00035 #define CHAR_L3_SECTP "L3_SECTP" 00036 #define CHAR_L3_LTD "L3_LTD " 00037 #define CHAR_L3_GTD "L3_GTD " 00038 #define CHAR_L3_SECCD "L3_SECCD" 00039 #define CHAR_L3_SUMD "L3_SUMD " 00040 00041 // structure for the 4 l3 summary words 00042 //struct L3_summary{ 00043 // char quality[8]; 00044 // int nrTracks; 00045 // unsigned int decision; 00046 //}; 00047 00048 00049 struct L3_summary{ 00050 unsigned int accept; 00051 unsigned int build; 00052 unsigned int on; 00053 unsigned int nTracks; 00054 }; 00055 00056 struct algorithm_data{ 00057 int algId; // unique algorithm identifier (for non-humans) 00058 char on; // 1 if this alg. was running on this event, 0 if not. 00059 char accept; 00060 char build; 00061 char blub; // padding 00062 unsigned int nProcessed; // events processed by that algorithm so far 00063 unsigned int nAccept; // events that fullfilled alg. so far 00064 unsigned int nBuild; // events that were flagged to be built 00065 float data[10]; 00066 }; 00067 00068 struct L3_SUMD { 00069 bankHeader bh; 00070 unsigned int nProcessed; // all events looked at 00071 unsigned int nReconstructed; // nProcessed that didn't crash 00072 int nAlg; // nr of registered algorithms 00073 struct algorithm_data alg[1]; // array of size nAlg 00074 }; 00075 00076 struct algorithm_counter{ 00077 int id; // algorithm Id 00078 unsigned int nProcessed; 00079 unsigned int nAccept; 00080 unsigned int nBuild; 00081 }; 00082 00083 struct L3_counter{ 00084 unsigned int nProcessed; 00085 unsigned int nRecontructed; 00086 struct algorithm_counter alg[32]; 00087 }; 00088 00089 00090 00091 struct local_track { 00092 short id; /* track id */ 00093 char nHits; /* Number of hits assigned to the track */ 00094 char ndedx; /* Number of points used for dedx */ 00095 short innerMostRow ; /* Inner most row track expands */ 00096 short outerMostRow ; /* Outer most row track expands */ 00097 short xy_chisq; /* xy & sz chi2 packed in 16 bits each */ 00098 short sz_chisq; /* same as with track type II, divide by 10 for 00099 real result*/ 00100 float dedx; /* dE/dx information */ 00101 float pt ; /* pt time charge */ 00102 float psi; /* azimuthal angle of the momentum at (r,.. */ 00103 float tanl; /* tg of the dip angle at (r,phi,z) */ 00104 float z0; /* z coordinate of the first point */ 00105 float r0; /* r coordinate of the first point */ 00106 float phi0; /* phi coordinate of the first point */ 00107 float trackLength; 00108 unsigned short dpt ; 00109 unsigned short dpsi ; 00110 unsigned short dtanl ; 00111 unsigned short dz0 ; 00112 }; // 13 dwords 00113 00114 00115 struct L3_LTD { 00116 struct bankHeader bh; 00117 struct local_track track[1]; 00118 }; // 10 (+13) dwords 00119 00120 // pointer bank for all track data pointing to L3_STK[1-3]D banks 00121 // if format number in bankHeader == 0 : banks point to type1-3 tracks 00122 // if format_number == 1 : banks[0] point to local_track (L3_LTD struct) 00123 00124 struct L3_SECTP { 00125 struct bankHeader bh; 00126 // words: 00127 unsigned int nHits; // Nr of space points 00128 unsigned int nTracks; // Nr of Tracks 00129 unsigned int cpuTime; // CPU time in microseconds 00130 unsigned int realTime; // real time in microseconds 00131 int xVert; // x vertex position in 10**-6 cm 00132 int yVert; // y vertex position 00133 int zVert; //z vertex postion 00134 int para; // parameter set used 00135 struct offlen banks[3]; // offset and length in 4 byte words for the 00136 // track type I, II and III in this order 00137 // if len = 0 for type x there will be no L3_STKxD 00138 // bank 00139 }; 00140 00141 00142 00143 // cluster data produced on sl3: 00144 00145 struct l3_cluster{ 00146 unsigned short pad; // in 1/64 pads 00147 unsigned short time; // in 1/64 time bins 00148 unsigned short charge; 00149 unsigned short flags; 00150 unsigned short trackId; 00151 char padrow ; 00152 unsigned char RB_MZ; // RB*16 | MZ, meaning upper 4 bits are RB, 00153 // lower 4 bits are MZ 00154 }; 00155 00156 00157 // cluster data produced on sl3: 00158 00159 struct L3_SECCD{ 00160 struct bankHeader bh; 00161 unsigned int nrClusters_in_sector; 00162 struct l3_cluster cluster[1]; 00163 } ; 00164 00165 00166 00167 00168 // Top level L3 pointer bank. Pointing to TPCSECLP (Cluster data) and 00169 // to L3_SECTP (track data). 00170 00171 struct L3_SECP { 00172 bankHeader bh; 00173 unsigned int len; // length of the entire sector contribution 00174 unsigned int time; // time when the event is put together in unix format 00175 unsigned int seq; // sequence nr. hopefully unique inside one run ;) 00176 unsigned int trg_word; // for the future 00177 unsigned int trg_in_word; // also future... don't even know what that 00178 // means.... 00179 struct offlen clusterp; // offset/length to/of TPCSECLP 00180 struct offlen trackp; // offset/length to/of L3_SECTP 00181 struct offlen sl3clusterp; // offlen for sl3 produced cluster data 00182 // if length = 0 Bank is not present. 00183 }; // L3_SECP is almost the same as DATAP, variables all have the same meaning 00184 00185 00186 00187 // Global tracks: 00188 00189 struct global_track { 00190 int id ; //primary key 00191 unsigned short flag ; // Primaries flag=1, Secondaries flag=0 00192 char innerMostRow ; 00193 char outerMostRow ; 00194 unsigned char nHits ; // Number of points assigned to that track 00195 char reserved ; 00196 unsigned char ndedx; // nr of clusters contributing to the dedx value 00197 char q ; // charge 00198 float chi2[2]; // chi squared of the momentum fit 00199 float dedx; // dE/dx information 00200 float pt ; // pt (transverse momentum) at (r,phi,z) 00201 float phi0; // azimuthal angle of the first point 00202 float psi ; // azimuthal angle of the momentum at (r,.. 00203 float r0 ; // r (in cyl. coord.) for the first point 00204 float tanl; // tg of the dip angle at (r,phi,z) 00205 float z0 ; // z coordinate of the first point 00206 float length ; 00207 float dpt ; 00208 float dpsi; 00209 float dz0 ; 00210 float dtanl ; 00211 }; //16 dwords 00212 00213 // Bank which actually has the global tracks in it: 00214 // compared to the sector level tracks this merges the pointer and data bank 00215 // into one Bank. 00216 00217 struct L3_GTD { 00218 struct bankHeader bh; 00219 unsigned int nHits; // Nr of space points 00220 unsigned int nTracks; // Nr of Tracks 00221 float xVert; // x vertex position in cm 00222 float yVert; // y vertex position 00223 float zVert; //z vertex postion 00224 struct global_track track[1]; 00225 }; 00226 00227 00228 00229 struct L3_P { 00230 bankHeader bh; 00231 unsigned int len; // lenght of the entire L3 contribution 00232 unsigned int time; // time when bank is produced 00233 unsigned int gl3Id; // node Id of the gl3 who produced that event 00234 unsigned int trg_word; 00235 unsigned int trg_in_word; 00236 struct offlen sector[24]; // sector contributions, offset and length 00237 struct offlen tracks; // pointer and length to/of L3_GTD 00238 struct offlen summary_data; 00239 unsigned int L3_summary[4]; 00240 struct offlen svt[5]; // 4 svt 'sectors' + 1 ssd 00241 struct offlen ftpc[2]; 00242 struct offlen emc; 00243 struct offlen trig; //trigger summary+data 00244 00245 } ; // almost the same as L3_SECP 00246 // 70 dwords 00247 00248 #endif
1.5.9