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 * 00020 */ 00021 00022 /******************* NOTE ******************************************** 00023 * This file should never be included directly. It is included from * 00024 * /DAQ/include/daqFormats.h after the necessary structs are defined * 00025 *********************************************************************/ 00026 00027 #ifndef _L3_FORMATS_H 00028 #define _L3_FORMATS_H 00029 00030 00031 #define CHAR_L3_P "L3_P " 00032 #define CHAR_L3_SECP "L3_SECP " 00033 #define CHAR_L3_SECTP "L3_SECTP" 00034 #define CHAR_L3_STK1D "L3_STK1D" 00035 #define CHAR_L3_STK2D "L3_STK2D" 00036 #define CHAR_L3_STK3D "L3_STK3D" 00037 #define CHAR_L3_LTD "L3_LTD " 00038 #define CHAR_L3_GTD "L3_GTD " 00039 #define CHAR_L3_SECCD "L3_SECCD" 00040 #define CHAR_L3_SUMD "L3_SUMD " 00041 00042 // structure for the 4 l3 summary words 00043 //struct L3_summary{ 00044 // char quality[8]; 00045 // int nrTracks; 00046 // unsigned int decision; 00047 //}; 00048 00049 00050 struct L3_summary{ 00051 unsigned int accept; 00052 unsigned int build; 00053 unsigned int on; 00054 unsigned int nTracks; 00055 }; 00056 00057 struct algorithm_data{ 00058 int algId; // unique algorithm identifier (for non-humans) 00059 char on; // 1 if this alg. was running on this event, 0 if not. 00060 char accept; 00061 char build; 00062 char blub; // padding 00063 unsigned int nProcessed; // events processed by that algorithm so far 00064 unsigned int nAccept; // events that fullfilled alg. so far 00065 unsigned int nBuild; // events that were flagged to be built 00066 float data[10]; 00067 }; 00068 00069 struct L3_SUMD { 00070 bankHeader bh; 00071 unsigned int nProcessed; // all events looked at 00072 unsigned int nReconstructed; // nProcessed that didn't crash 00073 int nAlg; // nr of registered algorithms 00074 struct algorithm_data alg[1]; // array of size nAlg 00075 }; 00076 00077 struct algorithm_counter{ 00078 int id; // algorithm Id 00079 unsigned int nProcessed; 00080 unsigned int nAccept; 00081 unsigned int nBuild; 00082 }; 00083 00084 struct L3_counter{ 00085 unsigned int nProcessed; 00086 unsigned int nRecontructed; 00087 struct algorithm_counter alg[32]; 00088 }; 00089 00090 00091 00092 // Track Type I: Mergable Primary Track 00093 struct type1_track { 00094 short id ;// id 00095 short nHits ;// # Hits 00096 short innerMostRow ; /* Inner most row track expands */ 00097 short outerMostRow ; /* Outer most row track expands */ 00098 float dedx ; 00099 float s11Xy ;// Fit parameters 00100 float s12Xy ;// conformal line in xy plane 00101 float s22Xy ; 00102 float g1Xy ; 00103 float g2Xy ; 00104 float s11Sz ;// Fit parameters in sz plane 00105 float s12Sz ; 00106 float s22Sz ; 00107 float g1Sz ; 00108 float g2Sz ; 00109 float xLastHit ; 00110 float yLastHit ; 00111 float trackLength ; 00112 }; // 16 words 00113 00114 00115 00116 // Track Type II: Unmergable Primary Track 00117 struct type2_track { 00118 short id; /* track id */ 00119 short nrec; /* Number of points assigned to that track */ 00120 short xy_chisq; /* xy & sz chi2 packed in 16 bits each */ 00121 short sz_chisq; /* both nr.'s are multiplied by 10 and the fraction 00122 cut off */ 00123 float dedx; /* dE/dx information */ 00124 float pt ; /* pt time charge */ 00125 float psi; /* azimuthal angle of the momentum at (r,.. */ 00126 float tanl; /* tg of the dip angle at (r,phi,z) */ 00127 float z0; /* z coordinate of the first point */ 00128 float trackLength; 00129 unsigned int Errors ; /* dpt, dpsi, dtanl errors (10bits*3)*/ 00130 }; //9 words 00131 00132 00133 // Track Type III: Unmergable Secondary Track 00134 struct type3_track { 00135 short id; /* track id */ 00136 short nrec; /* Number of points assigned to that track */ 00137 short xy_chisq; /* xy & sz chi2 packed in 16 bits each */ 00138 short sz_chisq; /* same as with track type II, divide by 10 for 00139 real result*/ 00140 float dedx; /* dE/dx information */ 00141 float pt ; /* pt time charge */ 00142 float psi; /* azimuthal angle of the momentum at (r,.. */ 00143 float tanl; /* tg of the dip angle at (r,phi,z) */ 00144 float z0; /* z coordinate of the first point */ 00145 float r0; /* r coordinate of the first point */ 00146 float phi0; /* phi coordinate of the first point */ 00147 float trackLength; 00148 unsigned int Errors ; /* dpt, dpsi, dtanl errors (10bits*3) */ 00149 }; // 11 words 00150 00151 00152 00153 00154 // only tracktype produced on sl3 beginning 04/06/00 00155 struct local_track { 00156 short id; /* track id */ 00157 char nHits; /* Number of hits assigned to the track */ 00158 char ndedx; /* Number of points used for dedx */ 00159 short innerMostRow ; /* Inner most row track expands */ 00160 short outerMostRow ; /* Outer most row track expands */ 00161 short xy_chisq; /* xy & sz chi2 packed in 16 bits each */ 00162 short sz_chisq; /* same as with track type II, divide by 10 for 00163 real result*/ 00164 float dedx; /* dE/dx information */ 00165 float pt ; /* pt time charge */ 00166 float psi; /* azimuthal angle of the momentum at (r,.. */ 00167 float tanl; /* tg of the dip angle at (r,phi,z) */ 00168 float z0; /* z coordinate of the first point */ 00169 float r0; /* r coordinate of the first point */ 00170 float phi0; /* phi coordinate of the first point */ 00171 float trackLength; 00172 unsigned short dpt ; 00173 unsigned short dpsi ; 00174 unsigned short dtanl ; 00175 unsigned short dz0 ; 00176 }; // 13 dwords 00177 00178 00179 00180 00181 00182 00183 struct L3_STK1D { 00184 struct bankHeader bh; 00185 struct type1_track track[500]; //dimension not to be taken literally 00186 }; 00187 00188 struct L3_STK2D { 00189 struct bankHeader bh; 00190 struct type2_track track[500]; //dimension not to be taken literally 00191 }; 00192 00193 struct L3_STK3D { 00194 struct bankHeader bh; 00195 struct type3_track track[500]; //dimension not to be taken literally 00196 }; 00197 00198 struct L3_LTD { 00199 struct bankHeader bh; 00200 struct local_track track[1]; 00201 }; // 10 (+13) dwords 00202 00203 // pointer bank for all track data pointing to L3_STK[1-3]D banks 00204 // if format number in bankHeader == 0 : banks point to type1-3 tracks 00205 // if format_number == 1 : banks[0] point to local_track (L3_LTD struct) 00206 00207 struct L3_SECTP { 00208 struct bankHeader bh; 00209 // words: 00210 unsigned int nHits; // Nr of space points 00211 unsigned int nTracks; // Nr of Tracks 00212 unsigned int cpuTime; // CPU time in microseconds 00213 unsigned int realTime; // real time in microseconds 00214 int xVert; // x vertex position in 10**-6 cm 00215 int yVert; // y vertex position 00216 int zVert; //z vertex postion 00217 int para; // parameter set used 00218 struct offlen banks[3]; // offset and length in 4 byte words for the 00219 // track type I, II and III in this order 00220 // if len = 0 for type x there will be no L3_STKxD 00221 // bank 00222 }; 00223 00224 00225 00226 // cluster data produced on sl3: 00227 00228 struct l3_cluster{ 00229 unsigned short pad; // in 1/64 pads 00230 unsigned short time; // in 1/64 time bins 00231 unsigned short charge; 00232 unsigned short flags; 00233 unsigned short trackId; 00234 char padrow ; 00235 unsigned char RB_MZ; // RB*16 | MZ, meaning upper 4 bits are RB, 00236 // lower 4 bits are MZ 00237 }; 00238 00239 00240 // cluster data produced on sl3: 00241 00242 struct L3_SECCD{ 00243 struct bankHeader bh; 00244 unsigned int nrClusters_in_sector; 00245 struct l3_cluster cluster[1]; 00246 } ; 00247 00248 00249 00250 00251 // Top level L3 pointer bank. Pointing to TPCSECLP (Cluster data) and 00252 // to L3_SECTP (track data). 00253 00254 struct L3_SECP { 00255 bankHeader bh; 00256 unsigned int len; // length of the entire sector contribution 00257 unsigned int time; // time when the event is put together in unix format 00258 unsigned int seq; // sequence nr. hopefully unique inside one run ;) 00259 unsigned int trg_word; // for the future 00260 unsigned int trg_in_word; // also future... don't even know what that 00261 // means.... 00262 struct offlen clusterp; // offset/length to/of TPCSECLP 00263 struct offlen trackp; // offset/length to/of L3_SECTP 00264 struct offlen sl3clusterp; // offlen for sl3 produced cluster data 00265 // if length = 0 Bank is not present. 00266 }; // L3_SECP is almost the same as DATAP, variables all have the same meaning 00267 00268 00269 00270 // Global tracks: 00271 00272 struct global_track { 00273 int id ; //primary key 00274 unsigned short flag ; // Primaries flag=1, Secondaries flag=0 00275 char innerMostRow ; 00276 char outerMostRow ; 00277 unsigned char nHits ; // Number of points assigned to that track 00278 char reserved ; 00279 unsigned char ndedx; // nr of clusters contributing to the dedx value 00280 char q ; // charge 00281 float chi2[2]; // chi squared of the momentum fit 00282 float dedx; // dE/dx information 00283 float pt ; // pt (transverse momentum) at (r,phi,z) 00284 float phi0; // azimuthal angle of the first point 00285 float psi ; // azimuthal angle of the momentum at (r,.. 00286 float r0 ; // r (in cyl. coord.) for the first point 00287 float tanl; // tg of the dip angle at (r,phi,z) 00288 float z0 ; // z coordinate of the first point 00289 float length ; 00290 float dpt ; 00291 float dpsi; 00292 float dz0 ; 00293 float dtanl ; 00294 }; //16 dwords 00295 00296 // Bank which actually has the global tracks in it: 00297 // compared to the sector level tracks this merges the pointer and data bank 00298 // into one Bank. 00299 00300 struct L3_GTD { 00301 struct bankHeader bh; 00302 unsigned int nHits; // Nr of space points 00303 unsigned int nTracks; // Nr of Tracks 00304 int xVert; // x vertex position in 10**-6 cm 00305 int yVert; // y vertex position 00306 int zVert; //z vertex postion 00307 struct global_track track[1]; 00308 }; 00309 00310 00311 00312 struct L3_P { 00313 bankHeader bh; 00314 unsigned int len; // lenght of the entire L3 contribution 00315 unsigned int time; // time when bank is produced 00316 unsigned int gl3Id; // node Id of the gl3 who produced that event 00317 unsigned int trg_word; 00318 unsigned int trg_in_word; 00319 struct offlen sector[24]; // sector contributions, offset and length 00320 struct offlen tracks; // pointer and length to/of L3_GTD 00321 struct offlen summary_data; 00322 unsigned int L3_summary[4]; 00323 struct offlen svt[5]; // 4 svt 'sectors' + 1 ssd 00324 struct offlen ftpc[2]; 00325 struct offlen emc; 00326 00327 } ; // almost the same as L3_SECP 00328 // 70 dwords 00329 00330 #endif
1.5.9