CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTTFFEDReader.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: DTTFFEDReader
4 //
5 // L1 DT Track Finder Raw-to-Digi
6 //
7 //
8 //
9 // Author :
10 // J. Troconiz UAM Madrid
11 //
12 //--------------------------------------------------
13 
15 
19 
20 #include <iostream>
21 
22 using namespace std;
23 
24 
26 
27  produces<L1MuDTChambPhContainer>();
28  produces<L1MuDTChambThContainer>();
29  produces<L1MuDTTrackContainer>("DATA");
30 
31  DTTFInputTag = pset.getParameter<edm::InputTag>("DTTF_FED_Source");
32 
33  verbose_ = pset.getUntrackedParameter<bool>("verbose",false);
34 
35  Raw_token = consumes<FEDRawDataCollection>(DTTFInputTag);
36 
37 }
38 
40 
42 
43  auto_ptr<L1MuDTChambPhContainer> phi_product(new L1MuDTChambPhContainer);
44  auto_ptr<L1MuDTChambThContainer> the_product(new L1MuDTChambThContainer);
45  auto_ptr<L1MuDTTrackContainer> tra_product(new L1MuDTTrackContainer);
46 
50 
51  if (!fillRawData(e, phi_data, the_data, tra_data)) return;
52 
53  phi_product->setContainer(phi_data);
54  the_product->setContainer(the_data);
55  tra_product->setContainer(tra_data);
56 
57  e.put(phi_product);
58  e.put(the_product);
59  e.put(tra_product,"DATA");
60 
61 }
62 
67 
68  analyse(e);
69 
70  phi_data = p_data();
71  the_data = t_data();
72  tra_data = k_data();
73 
74  return true;
75 }
76 
77 //--------------
78 // Operations --
79 //--------------
81  clear();
82  process(e);
83  match();
84  return;
85 }
86 
87 // process data
89 
90  // Container
91  vector<int> DTTFWordContainer;
92  vector<int>::iterator DTTFiterator;
93 
94  // Header constituents
95  int BOEevTy, DTTFId;
96 
97  // DTTF Payload constituents
98  int DTTFWord;
99  int DTTFChan, bitsID;
100  int addr1[2] = { 3, 3};
101  int addr2[2] = {15, 15};
102  int addr3[2] = {15, 15};
103  int addr4[2] = {15, 15};
104 
105  // Trailer constituents
106  int evtLgth , CRC;
107 
108  //--> Header
109 
111  e.getByToken(Raw_token,data);
112  FEDRawData dttfdata = data->FEDData(0x030C);
113  if ( dttfdata.size() == 0 ) return;
114 
115  int* dataWord1 = new int;
116  int* dataWord2 = new int;
117  unsigned char* LineFED=dttfdata.data();
118  *dataWord2=*((int*)LineFED);
119  LineFED+=4;
120  *dataWord1=*((int*)LineFED);
121  int lines = 1; // already counting header
122 
123  BOEevTy = ((*dataWord1)&0xFF000000)>>24; // positions 57 ->64
124  DTTFId = ((*dataWord2)&0x000FFF00)>>8; // positions 9 ->20
125 
126  if( (BOEevTy != 0x50) || ( DTTFId != 0x030C) ){
127  if ( verbose_ ) edm::LogWarning("dttf_unpacker")
128  << "Not a DTTF header " << hex << *dataWord1;
129  delete dataWord1;
130  delete dataWord2;
131  return;
132  }
133 
134  int newCRC = 0xFFFF;
135  calcCRC(*dataWord1, *dataWord2, newCRC);
136 
137 
138  //--> DTTF data
139 
140  LineFED+=4;
141  *dataWord2=*((int*)LineFED);
142  LineFED+=4;
143  *dataWord1=*((int*)LineFED);
144  int chkEOE = ((*dataWord1)&0xFFF00000)>>20;
145  lines++;
146 
147  while(chkEOE != 0xA00){
148 
149  calcCRC(*dataWord1, *dataWord2, newCRC);
150 
151  DTTFWord = *dataWord1;
152  DTTFWordContainer.push_back(DTTFWord);
153  DTTFWord = *dataWord2;
154  DTTFWordContainer.push_back(DTTFWord);
155 
156  LineFED+=4;
157  *dataWord2=*((int*)LineFED);
158  LineFED+=4;
159  *dataWord1=*((int*)LineFED);
160  chkEOE = ((*dataWord1)&0xFFF00000)>>20;
161  lines++;
162 
163  if(lines > 3026){
164  if ( verbose_ ) edm::LogWarning("dttf_unpacker")
165  << "Warning : number of DTTF lines > 3026 "; // 3026 = 1(header) + 3024(max # PHTF-ETTF 64 bits words) + 1(trailer)
166  delete dataWord1;
167  delete dataWord2;
168  return;
169  }
170 
171  } // end while-Data loop
172 
173 
174  //--> Trailer
175 
176  evtLgth = ((*dataWord1)&0x00FFFFFF); // positions 33 ->56
177  CRC = ((*dataWord2)&0xFFFF0000)>>16; // positions 17 ->32
178 
179  calcCRC(*dataWord1, (*dataWord2)&0xFFFF, newCRC);
180  if( newCRC != CRC){
181  if ( verbose_ ) edm::LogWarning("dttf_unpacker")
182  << "Calculated CRC " << hex << newCRC << " differs from CRC in trailer " << hex << CRC;
183  delete dataWord1;
184  delete dataWord2;
185  return;
186  }
187 
188  if( lines != evtLgth){
189  if ( verbose_ ) edm::LogWarning("dttf_unpacker")
190  << "Number of words read != event length " << dec << lines << " " << evtLgth;
191  delete dataWord1;
192  delete dataWord2;
193  return;
194  }
195 
196 
197  // --> analyse event
198 
199  for( DTTFiterator = DTTFWordContainer.begin();
200  DTTFiterator != DTTFWordContainer.end();
201  DTTFiterator++ ){
202 
203  DTTFChan = ((*DTTFiterator)&0xFF000000)>>24;
204  DTTFiterator++;
205  bitsID = ((*DTTFiterator)&0xF0000000)>>28;
206 
207  int bxID = bxNr(DTTFChan);
208  if(bxID == -999) continue;
209  int wheelID = wheel(DTTFChan);
210  if(wheelID == -999) continue;
211  int sectorID = sector(DTTFChan);
212  if(sectorID == -999) continue;
213 
214  //Input
215  if(wheelID!=0 && bitsID<=0x9){
216 
217  int wheelPh = (abs(wheelID)-1)*wheelID/abs(wheelID);
218  int stationID = 0;
219  int ra = 0;
220  int ba = 0;
221  int tsqual = 0;
222  int ts2tag = 0;
223 
224  if ( ( bitsID >> 1 ) == 0 ){ stationID = 1;}
225  if ( ( bitsID >> 1 ) == 1 ){ stationID = 2;}
226  if ( ( bitsID >> 1 ) == 4 ){ stationID = 3;}
227  if ( ( bitsID >> 1 ) == 2 ){ stationID = 4;}
228 
229  if(stationID != 3){
230 
231  ts2tag = (bitsID)&0x1;
232  tsqual = (~(*DTTFiterator)&0x07)-1;
233  ba = (~(*DTTFiterator)&0x1FF8)>>3;
234  if( ba>0x1FF) ba-=0x400;
235  ra = (~(*DTTFiterator)&0x1FFE000)>>13;
236  if( ra>0x7FF) ra-=0x1000;
237  }
238  else{
239 
240  ts2tag = (bitsID)&0x1;
241  tsqual = (~(*DTTFiterator)&0x07)-1;
242  ra = (~(*DTTFiterator)&0x7FF8)>>3;
243  if( ra>0x7FF) ra-=0x1000;
244  }
245 
246  if(tsqual!=7 && wheelID!=-1){
247  phiSegments.push_back(
248  L1MuDTChambPhDigi( bxID+ts2tag, wheelPh, sectorID, stationID,
249  ra, ba, tsqual, ts2tag, 0) );
250  }
251  }
252  //Input
253 
254  //Input
255  if(wheelID==0 && bitsID<=0x4){
256 
257  int wheelTh = bitsID-2;
258 
259  int posALL, posBTI[7];
260 
261  if ( wheelTh == -2 || wheelTh == -1 ||
262  ( wheelTh == 0 && (sectorID == 0 || sectorID == 3 || sectorID == 4 || sectorID == 7 || sectorID == 8 || sectorID == 11) ) ) {
263 
264  posALL = ~(*DTTFiterator)&0x7F;
265  posBTI[0] = ~(*DTTFiterator)&0x01;
266  posBTI[1] = (~(*DTTFiterator)&0x02)>>1;
267  posBTI[2] = (~(*DTTFiterator)&0x04)>>2;
268  posBTI[3] = (~(*DTTFiterator)&0x08)>>3;
269  posBTI[4] = (~(*DTTFiterator)&0x10)>>4;
270  posBTI[5] = (~(*DTTFiterator)&0x20)>>5;
271  posBTI[6] = (~(*DTTFiterator)&0x40)>>6;
272 
273  if(posALL){
274  theSegments.push_back(
275  L1MuDTChambThDigi( bxID, wheelTh, sectorID, 1, posBTI) );
276  }
277 
278  posALL = ~(*DTTFiterator)&0x3F80;
279  posBTI[0] = (~(*DTTFiterator)&0x0080)>>7;
280  posBTI[1] = (~(*DTTFiterator)&0x0100)>>8;
281  posBTI[2] = (~(*DTTFiterator)&0x0200)>>9;
282  posBTI[3] = (~(*DTTFiterator)&0x0400)>>10;
283  posBTI[4] = (~(*DTTFiterator)&0x0800)>>11;
284  posBTI[5] = (~(*DTTFiterator)&0x1000)>>12;
285  posBTI[6] = (~(*DTTFiterator)&0x2000)>>13;
286 
287  if(posALL){
288  theSegments.push_back(
289  L1MuDTChambThDigi( bxID, wheelTh, sectorID, 2, posBTI) );
290  }
291 
292  posALL = ~(*DTTFiterator)&0x1FC000;
293  posBTI[0] = (~(*DTTFiterator)&0x004000)>>14;
294  posBTI[1] = (~(*DTTFiterator)&0x008000)>>15;
295  posBTI[2] = (~(*DTTFiterator)&0x010000)>>16;
296  posBTI[3] = (~(*DTTFiterator)&0x020000)>>17;
297  posBTI[4] = (~(*DTTFiterator)&0x040000)>>18;
298  posBTI[5] = (~(*DTTFiterator)&0x080000)>>19;
299  posBTI[6] = (~(*DTTFiterator)&0x100000)>>20;
300 
301  if(posALL){
302  theSegments.push_back(
303  L1MuDTChambThDigi( bxID, wheelTh, sectorID, 3, posBTI) );
304  }
305  }
306 
307  else {
308 
309  posALL = ~(*DTTFiterator)&0x7F;
310  posBTI[6] = ~(*DTTFiterator)&0x01;
311  posBTI[5] = (~(*DTTFiterator)&0x02)>>1;
312  posBTI[4] = (~(*DTTFiterator)&0x04)>>2;
313  posBTI[3] = (~(*DTTFiterator)&0x08)>>3;
314  posBTI[2] = (~(*DTTFiterator)&0x10)>>4;
315  posBTI[1] = (~(*DTTFiterator)&0x20)>>5;
316  posBTI[0] = (~(*DTTFiterator)&0x40)>>6;
317 
318  if(posALL){
319  theSegments.push_back(
320  L1MuDTChambThDigi( bxID, wheelTh, sectorID, 1, posBTI) );
321  }
322 
323  posALL = ~(*DTTFiterator)&0x3F80;
324  posBTI[6] = (~(*DTTFiterator)&0x0080)>>7;
325  posBTI[5] = (~(*DTTFiterator)&0x0100)>>8;
326  posBTI[4] = (~(*DTTFiterator)&0x0200)>>9;
327  posBTI[3] = (~(*DTTFiterator)&0x0400)>>10;
328  posBTI[2] = (~(*DTTFiterator)&0x0800)>>11;
329  posBTI[1] = (~(*DTTFiterator)&0x1000)>>12;
330  posBTI[0] = (~(*DTTFiterator)&0x2000)>>13;
331 
332  if(posALL){
333  theSegments.push_back(
334  L1MuDTChambThDigi( bxID, wheelTh, sectorID, 2, posBTI) );
335  }
336 
337  posALL = ~(*DTTFiterator)&0x1FC000;
338  posBTI[6] = (~(*DTTFiterator)&0x004000)>>14;
339  posBTI[5] = (~(*DTTFiterator)&0x008000)>>15;
340  posBTI[4] = (~(*DTTFiterator)&0x010000)>>16;
341  posBTI[3] = (~(*DTTFiterator)&0x020000)>>17;
342  posBTI[2] = (~(*DTTFiterator)&0x040000)>>18;
343  posBTI[1] = (~(*DTTFiterator)&0x080000)>>19;
344  posBTI[0] = (~(*DTTFiterator)&0x100000)>>20;
345 
346  if(posALL){
347  theSegments.push_back(
348  L1MuDTChambThDigi( bxID, wheelTh, sectorID, 3, posBTI) );
349  }
350  }
351  }
352  //Input
353 
354  //Addresses
355  if(wheelID!=0 && bitsID>=0xA && bitsID<=0xB){
356 
357  int candID = bitsID - 0xA;
358 
359  addr4[candID] = ((*DTTFiterator)&0x0F);
360  addr3[candID] = ((*DTTFiterator)&0xF0)>>4;
361  addr2[candID] = ((*DTTFiterator)&0xF00)>>8;
362  addr1[candID] = ((*DTTFiterator)&0x3000)>>12;
363  }
364  //Addresses
365 
366  //Output
367  if(wheelID!=0 && bitsID>=0xC){
368 
369  int muonID = 0;
370  int pt = 0;
371  int ch = 0;
372  int phi = 0;
373  int qual = 0;
374 
375  muonID = (bitsID&0x1);
376  qual = (~(*DTTFiterator)&0x07);
377  phi = ((*DTTFiterator)&0x7F8)>>3;
378  ch = (~(*DTTFiterator)&0x800)>>11;
379  pt = (~(*DTTFiterator)&0x1F000)>>12;
380 
381  if(qual!=0){
382  dtTracks.push_back(
383  L1MuDTTrackCand( 0, phi, 0, pt, ch, 1, 0, qual, bxID, wheelID, sectorID,
384  muonID, addr1[muonID], addr2[muonID], addr3[muonID], addr4[muonID] ) );
385  }
386  }
387  //Output
388 
389  //Output
390  if(wheelID==0 && bitsID>=0x8){
391 
392  int wheelTh = bitsID&0x7;
393 
394  int etaALL;
395 
396  etaALL = ~(*DTTFiterator)&0x007F;
397  if (etaALL) {
398  etTrack[bxID+1][sectorID][wheelTh][0] = (*DTTFiterator)&0x003F;
399  efTrack[bxID+1][sectorID][wheelTh][0] = (~(*DTTFiterator)&0x0040)>>6;
400  }
401 
402  etaALL = (~(*DTTFiterator)&0x3F80)>>7;
403  if (etaALL) {
404  etTrack[bxID+1][sectorID][wheelTh][1]= ( (*DTTFiterator)&0x1F80)>>7;
405  efTrack[bxID+1][sectorID][wheelTh][1]= (~(*DTTFiterator)&0x2000)>>13;
406  }
407  }
408  //Output
409 
410  } // end for-loop container content
411 
412  delete dataWord1;
413  delete dataWord2;
414  return;
415 }
416 
418 
419  for ( L1MuDTTrackContainer::TrackIterator i = dtTracks.begin();
420  i != dtTracks.end();
421  i++ ) {
422  int bxTh = i->bx()+1;
423  int sectorTh = i->scNum();
424  int wheelTh = i->whNum()+3;
425  if(wheelTh > 3) wheelTh-=1;
426  int muonTh = i->TrkTag();
427 
428  i->setEtaPacked(etTrack[bxTh][sectorTh][wheelTh][muonTh]);
429  i->setFineHaloPacked(efTrack[bxTh][sectorTh][wheelTh][muonTh]);
430  }
431 
432  return;
433 }
434 
435 // access data
437  return phiSegments;
438 }
439 
441  return theSegments;
442 }
443 
445  return dtTracks;
446 }
447 
449  phiSegments.clear();
450  theSegments.clear();
451  dtTracks.clear();
452 
453  for(int i=0; i<3; i++){
454  for(int j=0; j<12; j++){
455  for(int k=0; k<6; k++){
456  for(int l=0; l<2; l++){
457  etTrack[i][j][k][l] = 0;
458  efTrack[i][j][k][l] = 0;
459  }
460  }
461  }
462  }
463 
464  return;
465 }
466 
467 int DTTFFEDReader::channel( int wheel, int sector, int bx ){
468 
469  // wheel : -3 -2 -1 +1 +2 +3 <=> PHTF's : N2, N1, N0, P0, P1, P2
470  // 0 <=> ETTF
471  // sector : 0 -> 11
472  // bx : -1 -> +1
473 
474  int myChannel = 255;
475 
476  if ( abs(bx) > 1) { return myChannel; }
477  if ( sector < 0 || sector > 11) { return myChannel; }
478  if ( abs(wheel) > 3) { return myChannel; }
479 
480  myChannel = sector*21 + wheel*3 - bx + 10 ;
481 
482  if (myChannel > 125) myChannel += 2;
483 
484  return myChannel;
485 }
486 
487 int DTTFFEDReader::bxNr( int channel ){
488 
489  int myChannel = channel;
490 
491  if (myChannel > 127) myChannel -= 2;
492 
493  if (myChannel < 0 || myChannel > 251 ){ return -999; }
494 
495  int myBx = 1-(myChannel%3);
496 
497  return myBx;
498 }
499 
500 int DTTFFEDReader::sector( int channel ){
501 
502  int myChannel = channel;
503 
504  if (myChannel > 127) myChannel -= 2;
505 
506  if (myChannel < 0 || myChannel > 251 ){ return -999; }
507 
508  return myChannel/21;
509 }
510 
511 int DTTFFEDReader::wheel( int channel ){
512 
513  int myChannel = channel;
514 
515  if (myChannel > 127) myChannel -= 2;
516 
517  if (myChannel < 0 || myChannel > 251 ){ return -999; }
518 
519  int myWheel = ((myChannel%21)/3)-3;
520 
521  return myWheel;
522 }
523 
524 void DTTFFEDReader::calcCRC(int myD1, int myD2, int &myC){
525 
526  int myCRC[16],D[64],C[16];
527 
528  for( int i=0; i < 32; i++ ){ D[i]=(myD2>>i)&0x1; }
529  for( int i=0; i < 32; i++ ){ D[i+32]=(myD1>>i)&0x1; }
530  for( int i=0; i < 16; i++ ){ C[i]=(myC>>i)&0x1; }
531 
532  myCRC[0] = ( D[63] + D[62] + D[61] + D[60] + D[55] + D[54] +
533  D[53] + D[52] + D[51] + D[50] + D[49] + D[48] +
534  D[47] + D[46] + D[45] + D[43] + D[41] + D[40] +
535  D[39] + D[38] + D[37] + D[36] + D[35] + D[34] +
536  D[33] + D[32] + D[31] + D[30] + D[27] + D[26] +
537  D[25] + D[24] + D[23] + D[22] + D[21] + D[20] +
538  D[19] + D[18] + D[17] + D[16] + D[15] + D[13] +
539  D[12] + D[11] + D[10] + D[9] + D[8] + D[7] +
540  D[6] + D[5] + D[4] + D[3] + D[2] + D[1] +
541  D[0] + C[0] + C[1] + C[2] + C[3] + C[4] +
542  C[5] + C[6] + C[7] + C[12] + C[13] + C[14] +
543  C[15] )%2;
544 
545  myCRC[1] = ( D[63] + D[62] + D[61] + D[56] + D[55] + D[54] +
546  D[53] + D[52] + D[51] + D[50] + D[49] + D[48] +
547  D[47] + D[46] + D[44] + D[42] + D[41] + D[40] +
548  D[39] + D[38] + D[37] + D[36] + D[35] + D[34] +
549  D[33] + D[32] + D[31] + D[28] + D[27] + D[26] +
550  D[25] + D[24] + D[23] + D[22] + D[21] + D[20] +
551  D[19] + D[18] + D[17] + D[16] + D[14] + D[13] +
552  D[12] + D[11] + D[10] + D[9] + D[8] + D[7] +
553  D[6] + D[5] + D[4] + D[3] + D[2] + D[1] +
554  C[0] + C[1] + C[2] + C[3] + C[4] + C[5] +
555  C[6] + C[7] + C[8] + C[13] + C[14] + C[15] )%2;
556 
557  myCRC[2] = ( D[61] + D[60] + D[57] + D[56] + D[46] + D[42] +
558  D[31] + D[30] + D[29] + D[28] + D[16] + D[14] +
559  D[1] + D[0] + C[8] + C[9] + C[12] + C[13] )%2;
560 
561  myCRC[3] = ( D[62] + D[61] + D[58] + D[57] + D[47] + D[43] +
562  D[32] + D[31] + D[30] + D[29] + D[17] + D[15] +
563  D[2] + D[1] + C[9] + C[10] + C[13] + C[14] )%2;
564 
565  myCRC[4] = ( D[63] + D[62] + D[59] + D[58] + D[48] + D[44] +
566  D[33] + D[32] + D[31] + D[30] + D[18] + D[16] +
567  D[3] + D[2] + C[0] + C[10] + C[11] + C[14] +
568  C[15] )%2;
569 
570  myCRC[5] = ( D[63] + D[60] + D[59] + D[49] + D[45] + D[34] +
571  D[33] + D[32] + D[31] + D[19] + D[17] + D[4] +
572  D[3] + C[1] + C[11] + C[12] + C[15] )%2;
573 
574  myCRC[6] = ( D[61] + D[60] + D[50] + D[46] + D[35] + D[34] +
575  D[33] + D[32] + D[20] + D[18] + D[5] + D[4] +
576  C[2] + C[12] + C[13] )%2;
577 
578  myCRC[7] = ( D[62] + D[61] + D[51] + D[47] + D[36] + D[35] +
579  D[34] + D[33] + D[21] + D[19] + D[6] + D[5] +
580  C[3] + C[13] + C[14] )%2;
581 
582  myCRC[8] = ( D[63] + D[62] + D[52] + D[48] + D[37] + D[36] +
583  D[35] + D[34] + D[22] + D[20] + D[7] + D[6] +
584  C[0] + C[4] + C[14] + C[15] )%2;
585 
586  myCRC[9] = ( D[63] + D[53] + D[49] + D[38] + D[37] + D[36] +
587  D[35] + D[23] + D[21] + D[8] + D[7] + C[1] +
588  C[5] + C[15] )%2;
589 
590  myCRC[10] = ( D[54] + D[50] + D[39] + D[38] + D[37] + D[36] +
591  D[24] + D[22] + D[9] + D[8] + C[2] + C[6] )%2;
592 
593  myCRC[11] = ( D[55] + D[51] + D[40] + D[39] + D[38] + D[37] +
594  D[25] + D[23] + D[10] + D[9] + C[3] + C[7] )%2;
595 
596  myCRC[12] = ( D[56] + D[52] + D[41] + D[40] + D[39] + D[38] +
597  D[26] + D[24] + D[11] + D[10] + C[4] + C[8] )%2;
598 
599  myCRC[13] = ( D[57] + D[53] + D[42] + D[41] + D[40] + D[39] +
600  D[27] + D[25] + D[12] + D[11] + C[5] + C[9] )%2;
601 
602  myCRC[14] = ( D[58] + D[54] + D[43] + D[42] + D[41] + D[40] +
603  D[28] + D[26] + D[13] + D[12] + C[6] + C[10] )%2;
604 
605  myCRC[15] = ( D[63] + D[62] + D[61] + D[60] + D[59] + D[54] +
606  D[53] + D[52] + D[51] + D[50] + D[49] + D[48] +
607  D[47] + D[46] + D[45] + D[44] + D[42] + D[40] +
608  D[39] + D[38] + D[37] + D[36] + D[35] + D[34] +
609  D[33] + D[32] + D[31] + D[30] + D[29] + D[26] +
610  D[25] + D[24] + D[23] + D[22] + D[21] + D[20] +
611  D[19] + D[18] + D[17] + D[16] + D[15] + D[14] +
612  D[12] + D[11] + D[10] + D[9] + D[8] + D[7] +
613  D[6] + D[5] + D[4] + D[3] + D[2] + D[1] +
614  D[0] + C[0] + C[1] + C[2] + C[3] + C[4] +
615  C[5] + C[6] + C[11] + C[12] + C[13] + C[14] +
616  C[15] )%2;
617 
618  int tempC = 0x0;
619  for(int i=0; i<16 ; i++){ tempC = tempC + (myCRC[i]<<i); }
620  myC = tempC ;
621  return;
622 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
void produce(edm::Event &e, const edm::EventSetup &c)
Produce digis out of raw data.
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:47
const L1MuDTChambThContainer::The_Container & t_data()
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:116
virtual ~DTTFFEDReader()
Destructor.
void clear(CLHEP::HepGenMatrix &m)
Helper function: Reset all elements of a matrix to 0.
Definition: matutil.cc:167
DTTFFEDReader(const edm::ParameterSet &pset)
Constructor.
std::vector< L1MuDTTrackCand > TrackContainer
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int j
Definition: DBlmapReader.cc:9
std::vector< L1MuDTChambPhDigi > Phi_Container
std::vector< L1MuDTChambThDigi > The_Container
int k[5][pyjets_maxn]
TrackContainer::iterator TrackIterator
void process(edm::Event &e)
static const int muonID
Definition: TopGenEvent.h:20
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:150
void calcCRC(int myD1, int myD2, int &myC)
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
const L1MuDTTrackContainer::TrackContainer & k_data()
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:28
int channel(int wheel, int sector, int bx)
void analyse(edm::Event &e)
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:6
int wheel(int channel)
bool fillRawData(edm::Event &e, L1MuDTChambPhContainer::Phi_Container &phi_data, L1MuDTChambThContainer::The_Container &the_data, L1MuDTTrackContainer::TrackContainer &tra_data)
Generate and fill FED raw data for a full event.
const L1MuDTChambPhContainer::Phi_Container & p_data()
tuple process
Definition: LaserDQM_cfg.py:3
int bxNr(int channel)
int sector(int channel)
Definition: DDAxes.h:10