60 std::pair<std::vector<CSCWireDigi>,std::vector<CSCWireDigi> > >
61 matchingDetWireCollection;
63 std::pair<std::vector<CSCStripDigi>,std::vector<CSCStripDigi> > >
64 matchingDetStripCollection;
66 std::pair<std::vector<CSCComparatorDigi>,std::vector<CSCComparatorDigi> > >
67 matchingDetComparatorCollection;
69 std::pair<std::vector<CSCCLCTDigi>,std::vector<CSCCLCTDigi> > >
70 matchingDetCLCTCollection;
72 std::pair<std::vector<CSCALCTDigi>,std::vector<CSCALCTDigi> > >
73 matchingDetALCTCollection;
75 std::pair<std::vector<CSCCorrelatedLCTDigi>,std::vector<CSCCorrelatedLCTDigi> > >
76 matchingDetLCTCollection;
125 wi = _wi->begin(), swi= _swi->begin();
127 st = _st->begin(), sst = _sst->begin();
129 cmp = _cmp->begin(), scmp = _scmp->begin();
131 clct = _clct->begin(), sclct = _sclct->begin();
133 alct = _alct->begin(), salct = _salct->begin();
135 lct = _lct->begin(), slct = _slct->begin();
136 L1CSCTrackCollection::const_iterator
137 trk = _trk->begin(), strk = _strk->begin();
138 std::vector<csctf::TrackStub>::const_iterator
139 dt = _dt->get().begin(), sdt = _sdt->get().begin();
141 dt++;
dt--; sdt++; sdt--;
144 matchingDetWireCollection wires;
145 matchingDetStripCollection
strips;
146 matchingDetComparatorCollection comps;
147 matchingDetCLCTCollection clcts;
148 matchingDetALCTCollection alcts;
149 matchingDetLCTCollection lcts,trackstubs;
153 for(;wi != _wi->end();++wi)
156 b=(*wi).second.first,
e=(*wi).second.second;
157 std::vector<CSCWireDigi>::iterator
158 beg=wires[(*wi).first].first.end();
159 wires[(*wi).first].first.insert(beg,b,
e);
161 for(;swi != _swi->end();++swi)
164 b=(*swi).second.first,
e=(*swi).second.second;
167 if((*swi).first.ring() == 4)
168 _id =
CSCDetId((*swi).first.endcap(),(*swi).first.station(),
169 1, (*swi).first.chamber(),(*swi).first.layer());
171 std::vector<CSCWireDigi>::iterator
172 beg=wires[_id].second.end();
174 wires[_id].second.insert(beg,b,
e);
177 wires[_id].second.end());
181 for(;st != _st->end();++st)
184 b=(*st).second.first,
e=(*st).second.second;
185 std::vector<CSCStripDigi>::iterator
186 beg=
strips[(*st).first].first.end();
191 strips[(*st).first].first.insert(beg,zs.begin(),zs.end());
193 for(;sst != _sst->end();++sst)
196 b=(*sst).second.first,
e=(*sst).second.second;
203 std::vector<CSCStripDigi>::iterator
204 beg=
strips[_id].second.end();
208 strips[_id].second.insert(beg,relab.begin(),relab.end());
213 for(;cmp != _cmp->end();++cmp)
216 b=(*cmp).second.first,
e=(*cmp).second.second;
217 std::vector<CSCComparatorDigi>::iterator
218 beg=comps[(*cmp).first].first.end();
220 comps[(*cmp).first].first.insert(beg,b,
e);
222 for(;scmp != _scmp->end();++scmp)
225 b=(*scmp).second.first,
e=(*scmp).second.second;
228 if((*scmp).first.ring() == 4)
229 _id =
CSCDetId((*scmp).first.endcap(),(*scmp).first.station(),
230 1, (*scmp).first.chamber(),(*scmp).first.layer());
232 std::vector<CSCComparatorDigi>::iterator
233 beg=comps[_id].second.begin();
235 if((*scmp).first.ring()==4)
236 beg=comps[_id].
second.end();
238 std::vector<CSCComparatorDigi> zs =
241 std::vector<CSCComparatorDigi> relab =
246 comps[_id].second.insert(beg,relab.begin(),relab.end());
250 for(;clct != _clct->end();++clct)
253 b=(*clct).second.first,
e=(*clct).second.second;
254 std::vector<CSCCLCTDigi>::iterator
255 beg=clcts[(*clct).first].first.end();
257 clcts[(*clct).first].first.insert(beg,b,
e);
259 for(;sclct != _sclct->end();++sclct)
262 b=(*sclct).second.first,
e=(*sclct).second.second;
265 if((*sclct).first.ring() == 4)
266 _id =
CSCDetId((*sclct).first.endcap(),(*sclct).first.station(),
267 1, (*sclct).first.chamber(),(*sclct).first.layer());
269 std::vector<CSCCLCTDigi>::iterator
270 beg=clcts[_id].second.begin();
272 if((*sclct).first.ring()==4)
273 beg=clcts[_id].
second.end();
275 clcts[_id].second.insert(beg,b,
e);
279 for(;alct != _alct->end();++alct)
282 b=(*alct).second.first,
e=(*alct).second.second;
283 std::vector<CSCALCTDigi>::iterator
284 beg=alcts[(*alct).first].first.end();
286 alcts[(*alct).first].first.insert(beg,b,
e);
288 for(;salct != _salct->end();++salct)
291 b=(*salct).second.first,
e=(*salct).second.second;
294 if((*salct).first.ring() == 4)
295 _id =
CSCDetId((*salct).first.endcap(),(*salct).first.station(),
296 1, (*salct).first.chamber(),(*salct).first.layer());
298 std::vector<CSCALCTDigi>::iterator
299 beg=alcts[_id].second.begin();
301 if((*salct).first.ring()==4)
302 beg=alcts[_id].
second.end();
304 alcts[_id].second.insert(beg,b,
e);
308 for(;lct != _lct->end();++lct)
311 b=(*lct).second.first,
e=(*lct).second.second;
312 std::vector<CSCCorrelatedLCTDigi>::iterator
313 beg=lcts[(*lct).first].first.end();
315 lcts[(*lct).first].first.insert(beg,b,
e);
317 for(;slct != _slct->end();++slct)
320 b=(*slct).second.first,
e=(*slct).second.second;
323 if((*slct).first.ring() == 4)
324 _id =
CSCDetId((*slct).first.endcap(),(*slct).first.station(),
325 1, (*slct).first.chamber(),(*slct).first.layer());
327 std::vector<CSCCorrelatedLCTDigi>::iterator
328 beg=lcts[_id].second.begin();
330 if((*slct).first.ring()==4)
331 beg=lcts[_id].
second.end();
333 lcts[_id].second.insert(beg,b,
e);
336 for(; trk != _trk->end(); ++trk)
338 tracks.push_back(trk->first);
341 for(;strk != _strk->end(); ++strk)
343 simtracks.push_back(strk->first);
347 matchingDetWireCollection::const_iterator
w;
348 matchingDetStripCollection::const_iterator
s;
349 matchingDetComparatorCollection::const_iterator
c;
350 matchingDetCLCTCollection::const_iterator
cl;
351 matchingDetALCTCollection::const_iterator al;
352 matchingDetLCTCollection::const_iterator lc;
354 for(
w = wires.begin();
w != wires.end(); ++
w)
356 if(
w->second.first.size() !=
w->second.second.size())
358 std::cout <<
"Major error! # of wire digis in detID: " <<
w->first
359 <<
" is not equal between sim and unpacked!" << std::endl;
362 std::vector<CSCWireDigi>
a =
w->second.second;
363 std::vector<CSCWireDigi>
b =
w->second.first;
365 for(std::vector<CSCWireDigi>::const_iterator
i = a.begin();
i != a.end(); ++
i)
367 std::cout <<
"UNPACKER OUTPUT:" << std::endl;
368 for(std::vector<CSCWireDigi>::const_iterator
i = b.begin();
i != b.end(); ++
i)
372 int max =
std::min(
w->second.first.size(),
w->second.second.size());
373 std::vector<CSCWireDigi>
cv =
w->second.first;
374 std::vector<CSCWireDigi> sv =
w->second.second;
375 for(
int i = 0;
i <
max; ++
i)
377 if(sv[
i].getWireGroup() != cv[
i].getWireGroup())
379 std::cout <<
"In detId: " <<
w->first << std::endl;
380 std::cout <<
"Wire Groups do not match: " << sv[
i].getWireGroup()
381 <<
" != " << cv[
i].getWireGroup() << std::endl;
383 if(sv[
i].getTimeBin() != cv[
i].getTimeBin())
385 std::cout <<
"In detId: " <<
w->first << std::endl;
386 std::cout <<
"First Time Bins do not match: " << sv[
i].getTimeBin()
387 <<
" != " << cv[
i].getTimeBin() << std::endl;
389 if(sv[
i].getTimeBinWord() != cv[
i].getTimeBinWord())
391 std::cout <<
"In detId: " <<
w->first << std::endl;
392 std::cout <<
"Time Bin Words do not match: " << sv[
i].getTimeBinWord()
393 <<
" != " << cv[
i].getTimeBinWord() << std::endl;
399 if(
s->second.first.size() !=
s->second.second.size())
401 std::cout <<
"Major error! # of strip digis in detID: " <<
s->first
402 <<
" is not equal between sim and unpacked!" << std::endl;
405 std::vector<CSCStripDigi>
a =
s->second.second;
406 std::vector<CSCStripDigi>
b =
s->second.first;
408 for(std::vector<CSCStripDigi>::const_iterator
i = a.begin();
i != a.end(); ++
i)
410 std::cout <<
"UNPACKER OUTPUT:" << std::endl;
411 for(std::vector<CSCStripDigi>::const_iterator
i = b.begin();
i != b.end(); ++
i)
414 int max =
std::min(
s->second.first.size(),
s->second.second.size());
415 std::vector<CSCStripDigi>
cv =
s->second.first;
416 std::vector<CSCStripDigi> sv =
s->second.second;
417 for(
int i = 0;
i <
max; ++
i)
419 bool me1a =
s->first.station()==1 &&
s->first.ring()==4;
420 bool me1b =
s->first.station()==1 &&
s->first.ring()==1;
421 bool zplus =
s->first.endcap()==1;
424 if(me1a && zplus) k=max-
i-1;
425 if(me1b && !zplus) k=max-i-1;
427 if(sv[k].getStrip() != cv[i].getStrip())
429 std::cout <<
"In detId: " <<
s->first << std::endl;
430 std::cout <<
"Strips do not match: " << sv[
k].getStrip()
431 <<
" != " << cv[
i].getStrip() << std::endl;
433 if(sv[k].getADCCounts().
size() != cv[i].getADCCounts().
size())
435 std::cout <<
"In detId: " <<
s->first << std::endl;
436 std::cout <<
"ADC Readouts not of equal size!" << std::endl;
437 std::cout << sv[
k].getADCCounts().size() <<
' '
438 << cv[
i].getADCCounts().size() << std::endl;
442 std::vector<int> sADC = sv[
k].getADCCounts();
443 std::vector<int> uADC = cv[
i].getADCCounts();
445 for(
unsigned iadc = 0; iadc < sADC.size(); ++iadc)
446 if(sADC[iadc] != uADC[iadc])
448 std::cout <<
"In detId: " <<
s->first << std::endl;
449 std::cout <<
"ADC counts not equal at index: " << iadc << std::endl
450 << std::hex <<sADC[iadc] <<
" != " << uADC[iadc] <<
std::dec
454 if(sv[k].getADCOverflow().size() != cv[
i].getADCOverflow().size())
456 std::cout <<
"In detId: " <<
s->first << std::endl;
457 std::cout <<
"ADC Overflows not of equal size!" << std::endl;
458 std::cout << sv[
k].getADCOverflow().size() <<
' '
459 << cv[
i].getADCOverflow().size() << std::endl;
463 std::vector<uint16_t> sADC = sv[
k].getADCOverflow();
464 std::vector<uint16_t> uADC = cv[
i].getADCOverflow();
466 for(
unsigned iadc = 0; iadc < sADC.size(); ++iadc)
467 if(sADC[iadc] != uADC[iadc])
469 std::cout <<
"In detId: " <<
s->first << std::endl;
470 std::cout <<
"ADC overflows not equal at index: " << iadc << std::endl
471 << std::hex <<sADC[iadc] <<
" != " << uADC[iadc] <<
std::dec
475 if(sv[k].getOverlappedSample().size() != cv[
i].getOverlappedSample().size())
477 std::cout <<
"In detId: " <<
s->first << std::endl;
478 std::cout <<
"Overlapped Samples not of equal size!" << std::endl;
479 std::cout << sv[
k].getOverlappedSample().size() <<
' '
480 << cv[
i].getOverlappedSample().size() << std::endl;
484 std::vector<uint16_t> sADC = sv[
k].getOverlappedSample();
485 std::vector<uint16_t> uADC = cv[
i].getOverlappedSample();
487 for(
unsigned iadc = 0; iadc < sADC.size(); ++iadc)
488 if(sADC[iadc] != uADC[iadc])
490 std::cout <<
"In detId: " <<
s->first << std::endl;
491 std::cout <<
"Overlapped Samples not equal at index: " << iadc << std::endl
492 << std::hex <<sADC[iadc] <<
" != " << uADC[iadc] <<
std::dec
496 if(sv[k].getErrorstat().size() != cv[
i].getErrorstat().size())
498 std::cout <<
"In detId: " <<
s->first << std::endl;
499 std::cout <<
"Errorstat not of equal size!" << std::endl;
500 std::cout << sv[
k].getErrorstat().size() <<
' '
501 << cv[
i].getErrorstat().size() << std::endl;
505 std::vector<uint16_t> sADC = sv[
k].getErrorstat();
506 std::vector<uint16_t> uADC = cv[
i].getErrorstat();
508 for(
unsigned iadc = 0; iadc < sADC.size(); ++iadc)
509 if(sADC[iadc] != uADC[iadc])
511 std::cout <<
"In detId: " <<
s->first << std::endl;
512 std::cout <<
"Errorstat not equal at index: " << iadc << std::endl
513 << std::hex <<sADC[iadc] <<
" != " << uADC[iadc] <<
std::dec
519 std::cout <<
"In detId: " <<
s->first << std::endl;
520 std::cout <<
"Pedestals not equal: " << sv[
k].pedestal() <<
" != "
521 << cv[
i].pedestal() << std::endl;
523 if(sv[k].amplitude() != cv[i].amplitude())
525 std::cout <<
"In detId: " <<
s->first << std::endl;
526 std::cout <<
"Amplitudes not equal: " << sv[
k].amplitude() <<
" != "
527 << cv[
i].amplitude() << std::endl;
531 for(
c = comps.begin();
c != comps.end(); ++
c)
533 if(
c->second.first.size() !=
c->second.second.size())
535 std::cout <<
"Major error! # of comparator digis in detID: " <<
c->first
536 <<
" is not equal between sim and unpacked!" << std::endl;
539 std::vector<CSCComparatorDigi>
a =
c->second.second;
540 std::vector<CSCComparatorDigi>
b =
c->second.first;
542 for(std::vector<CSCComparatorDigi>::const_iterator
i = a.begin();
i != a.end(); ++
i)
544 std::cout <<
"UNPACKER OUTPUT:" << std::endl;
545 for(std::vector<CSCComparatorDigi>::const_iterator
i = b.begin();
i != b.end(); ++
i)
548 int max =
std::min(
c->second.first.size(),
c->second.second.size());
549 std::vector<CSCComparatorDigi>
cv =
c->second.first;
550 std::vector<CSCComparatorDigi> sv =
c->second.second;
551 for(
int i = 0;
i <
max; ++
i)
553 if(sv[
i].getStrip() != cv[
i].getStrip())
555 std::cout <<
"In detId: " <<
s->first << std::endl;
556 std::cout <<
"Comparator strips do not match: " << sv[
i].getStrip()
557 <<
" != " << cv[
i].getStrip() << std::endl;
559 if(sv[
i].getComparator() != cv[
i].getComparator())
561 std::cout <<
"In detId: " <<
c->first << std::endl;
562 std::cout <<
"Comparators do not match: " << sv[
i].getComparator()
563 <<
" != " << cv[
i].getComparator() << std::endl;
565 if(sv[
i].getTimeBinWord() != cv[
i].getTimeBinWord())
567 std::cout <<
"In detId: " <<
c->first << std::endl;
568 std::cout <<
"Comparator time bins words do not match: " << sv[
i].getTimeBinWord()
569 <<
" != " << cv[
i].getTimeBinWord() << std::endl;
573 for(
cl = clcts.begin();
cl != clcts.end(); ++
cl)
575 if(
cl->second.first.size() !=
cl->second.second.size())
577 std::cout <<
"Major error! # of CLCT digis in detID: " <<
cl->first
578 <<
" is not equal between sim and unpacked!" << std::endl;
581 std::vector<CSCCLCTDigi>
a =
cl->second.second;
582 std::vector<CSCCLCTDigi>
b =
cl->second.first;
584 for(std::vector<CSCCLCTDigi>::const_iterator
i = a.begin();
i != a.end(); ++
i)
586 std::cout <<
"UNPACKER OUTPUT:" << std::endl;
587 for(std::vector<CSCCLCTDigi>::const_iterator
i = b.begin();
i != b.end(); ++
i)
591 std::vector<CSCCLCTDigi>
cv =
cl->second.first;
592 std::vector<CSCCLCTDigi> sv =
cl->second.second;
593 for(
int i = 0;
i <
max; ++
i)
595 if(cv[
i].getKeyStrip() != sv[
i].getKeyStrip())
597 std::cout <<
"In detId: " <<
cl->first << std::endl;
598 std::cout <<
"CLCT key strips do not match: " << sv[
i].getKeyStrip()
599 <<
" != " << cv[
i].getKeyStrip() << std::endl;
601 if(cv[
i].getStrip() != sv[
i].getStrip())
603 std::cout <<
"In detId: " <<
cl->first << std::endl;
604 std::cout <<
"CLCT strips do not match: " << sv[
i].getStrip()
605 <<
" != " << cv[
i].getStrip() << std::endl;
607 if(cv[
i].isValid() != sv[
i].isValid())
609 std::cout <<
"In detId: " <<
cl->first << std::endl;
610 std::cout <<
"CLCT Valid bits do not match: " << sv[
i].isValid()
611 <<
" != " << cv[
i].isValid() << std::endl;
613 if(cv[
i].getQuality() != sv[
i].getQuality())
615 std::cout <<
"In detId: " <<
cl->first << std::endl;
616 std::cout <<
"CLCT qualities do not match: " << sv[
i].getQuality()
617 <<
" != " << cv[
i].getQuality() << std::endl;
619 if(cv[
i].getPattern() != sv[
i].getPattern())
621 std::cout <<
"In detId: " <<
cl->first << std::endl;
622 std::cout <<
"CLCT patterns do not match: " << sv[
i].getPattern()
623 <<
" != " << cv[
i].getPattern() << std::endl;
625 if(cv[
i].getStripType() != sv[
i].getStripType())
627 std::cout <<
"In detId: " <<
cl->first << std::endl;
628 std::cout <<
"CLCT strip types do not match: " << sv[
i].getStripType()
629 <<
" != " << cv[
i].getStripType() << std::endl;
631 if(cv[
i].getBend() != sv[
i].getBend())
633 std::cout <<
"In detId: " <<
cl->first << std::endl;
634 std::cout <<
"CLCT bends do not match: " << sv[
i].getBend()
635 <<
" != " << cv[
i].getBend() << std::endl;
637 if(cv[
i].getCFEB() != sv[
i].getCFEB())
639 std::cout <<
"In detId: " <<
cl->first << std::endl;
640 std::cout <<
"CLCT CFEBs do not match: " << sv[
i].getCFEB()
641 <<
" != " << cv[
i].getCFEB() << std::endl;
643 if(((
short)cv[
i].getBX()) != ((
short)sv[
i].getBX()) - 4)
645 std::cout <<
"In detId: " <<
cl->first << std::endl;
646 std::cout <<
"CLCT BX do not match: " << sv[
i].getBX() - 4
647 <<
" != " << cv[
i].getBX() << std::endl;
649 if(cv[
i].getFullBX() != sv[
i].getFullBX())
651 std::cout <<
"In detId: " <<
cl->first << std::endl;
652 std::cout <<
"CLCT Full BX do not match: " << sv[
i].getFullBX()
653 <<
" != " << cv[
i].getFullBX() << std::endl;
655 if(cv[
i].getTrknmb() != sv[
i].getTrknmb())
657 std::cout <<
"In detId: " <<
cl->first << std::endl;
658 std::cout <<
"CLCT Track numbers do not match: " << sv[
i].getTrknmb()
659 <<
" != " << cv[
i].getTrknmb() << std::endl;
663 for(al = alcts.begin(); al != alcts.end(); ++al)
665 if(al->second.first.size() != al->second.second.size())
667 std::cout <<
"Major error! # of ALCT digis in detID: " << al->first
668 <<
" is not equal between sim and unpacked!" << std::endl;
671 std::vector<CSCALCTDigi>
a = al->second.second;
672 std::vector<CSCALCTDigi>
b = al->second.first;
674 for(std::vector<CSCALCTDigi>::const_iterator
i = a.begin();
i != a.end(); ++
i)
676 std::cout <<
"UNPACKER OUTPUT:" << std::endl;
677 for(std::vector<CSCALCTDigi>::const_iterator
i = b.begin();
i != b.end(); ++
i)
680 int max =
std::min(al->second.first.size(),al->second.second.size());
681 std::vector<CSCALCTDigi>
cv = al->second.first;
682 std::vector<CSCALCTDigi> sv = al->second.second;
683 for(
int i = 0;
i <
max; ++
i)
685 if(cv[
i].getKeyWG() != sv[
i].getKeyWG())
687 std::cout <<
"In detId: " << al->first << std::endl;
688 std::cout <<
"ALCT key wire groups do not match: " << sv[
i].getKeyWG()
689 <<
" != " << cv[
i].getKeyWG() << std::endl;
691 if(cv[
i].isValid() != sv[
i].isValid())
693 std::cout <<
"In detId: " << al->first << std::endl;
694 std::cout <<
"ALCT Valid bits do not match: " << sv[
i].isValid()
695 <<
" != " << cv[
i].isValid() << std::endl;
697 if(cv[
i].getQuality() != sv[
i].getQuality())
699 std::cout <<
"In detId: " << al->first << std::endl;
700 std::cout <<
"ALCT qualities do not match: " << sv[
i].getQuality()
701 <<
" != " << cv[
i].getQuality() << std::endl;
703 if(cv[
i].getAccelerator() != sv[
i].getAccelerator())
705 std::cout <<
"In detId: " << al->first << std::endl;
706 std::cout <<
"ALCT accelerator bits do not match: " << sv[
i].getAccelerator()
707 <<
" != " << cv[
i].getAccelerator() << std::endl;
709 if(cv[
i].getCollisionB() != sv[
i].getCollisionB())
711 std::cout <<
"In detId: " << al->first << std::endl;
712 std::cout <<
"ALCT CollisionB flags do not match: " << sv[
i].getCollisionB()
713 <<
" != " << cv[
i].getCollisionB() << std::endl;
715 if((cv[
i].getBX()) != (sv[
i].getBX()))
717 std::cout <<
"In detId: " << al->first << std::endl;
718 std::cout <<
"ALCT BX do not match: " << sv[
i].getBX()
719 <<
" != " << cv[
i].getBX() << std::endl;
721 if(cv[
i].getFullBX() != sv[
i].getFullBX())
723 std::cout <<
"In detId: " <<
cl->first << std::endl;
724 std::cout <<
"ALCT Full BX do not match: " << sv[
i].getFullBX()
725 <<
" != " << cv[
i].getFullBX() << std::endl;
729 for(lc = lcts.begin(); lc != lcts.end(); ++lc)
731 if(lc->second.first.size() != lc->second.second.size())
733 std::cout <<
"Major error! # of Correlated LCT digis in detID: " << lc->first
734 <<
" is not equal between sim and unpacked!" << std::endl;
737 std::vector<CSCCorrelatedLCTDigi>
a = lc->second.second;
738 std::vector<CSCCorrelatedLCTDigi>
b = lc->second.first;
740 for(std::vector<CSCCorrelatedLCTDigi>::const_iterator
i = a.begin();
i != a.end(); ++
i)
742 std::cout <<
"UNPACKER OUTPUT:" << std::endl;
743 for(std::vector<CSCCorrelatedLCTDigi>::const_iterator
i = b.begin();
i != b.end(); ++
i)
746 int max =
std::min(lc->second.first.size(),lc->second.second.size());
747 std::vector<CSCCorrelatedLCTDigi>
cv = lc->second.first;
748 std::vector<CSCCorrelatedLCTDigi> sv = lc->second.second;
749 for(
int i = 0;
i <
max; ++
i)
751 if(cv[
i].getStrip() != sv[
i].getStrip())
753 std::cout <<
"In detId: " << lc->first << std::endl;
754 std::cout <<
"Correlated LCT strips do not match: " << sv[
i].getStrip()
755 <<
" != " << cv[
i].getStrip() << std::endl;
757 if(cv[
i].getKeyWG() != sv[
i].getKeyWG())
759 std::cout <<
"In detId: " << lc->first << std::endl;
760 std::cout <<
"Correlated LCT key wire groups do not match: " << sv[
i].getKeyWG()
761 <<
" != " << cv[
i].getKeyWG() << std::endl;
763 if(cv[
i].isValid() != sv[
i].isValid())
765 std::cout <<
"In detId: " << lc->first << std::endl;
766 std::cout <<
"Correlated LCT Valid bits do not match: " << sv[
i].isValid()
767 <<
" != " << cv[
i].isValid() << std::endl;
769 if(cv[
i].getQuality() != sv[
i].getQuality())
771 std::cout <<
"In detId: " << lc->first << std::endl;
772 std::cout <<
"Correlated LCT qualities do not match: " << sv[
i].getQuality()
773 <<
" != " << cv[
i].getQuality() << std::endl;
775 if(cv[
i].getPattern() != sv[
i].getPattern())
777 std::cout <<
"In detId: " << lc->first << std::endl;
778 std::cout <<
"Correlated LCT ALCT patterns do not match: " << sv[
i].getPattern()
779 <<
" != " << cv[
i].getPattern() << std::endl;
781 if(cv[
i].getCLCTPattern() != sv[
i].getCLCTPattern())
783 std::cout <<
"In detId: " << lc->first << std::endl;
784 std::cout <<
"Correlated LCT CLCT patterns do not match: " << sv[
i].getCLCTPattern()
785 <<
" != " << cv[
i].getCLCTPattern() << std::endl;
787 if(cv[
i].getStripType() != sv[
i].getStripType())
789 std::cout <<
"In detId: " << lc->first << std::endl;
790 std::cout <<
"Correlated LCT strip types do not match: " << sv[
i].getStripType()
791 <<
" != " << cv[
i].getStripType() << std::endl;
793 if(cv[
i].getBend() != sv[
i].getBend())
795 std::cout <<
"In detId: " << lc->first << std::endl;
796 std::cout <<
"Correlated LCT bends do not match: " << sv[
i].getBend()
797 <<
" != " << cv[
i].getBend() << std::endl;
799 if(cv[
i].getMPCLink() != sv[
i].getMPCLink())
801 std::cout <<
"In detId: " << lc->first << std::endl;
802 std::cout <<
"Correlated LCT MPC Links do not match: " << sv[
i].getMPCLink()
803 <<
" != " << cv[
i].getMPCLink() << std::endl;
805 if((cv[
i].getBX()) != (sv[
i].getBX()-6))
807 std::cout <<
"In detId: " << lc->first << std::endl;
808 std::cout <<
"Correlated LCT BX do not match: " << sv[
i].getBX()-6
809 <<
" != " << cv[
i].getBX() << std::endl;
811 if(cv[
i].getCSCID() != sv[
i].getCSCID())
813 std::cout <<
"In detId: " << lc->first << std::endl;
814 std::cout <<
"Correlated LCT CSCIDs do not match: " << sv[
i].getCSCID()
815 <<
" != " << cv[
i].getCSCID() << std::endl;
817 if(cv[
i].getBX0() != sv[
i].getBX0())
819 std::cout <<
"In detId: " << lc->first << std::endl;
820 std::cout <<
"Correlated LCT BX0s do not match: " << sv[
i].getBX0()
821 <<
" != " << cv[
i].getBX0() << std::endl;
823 if(cv[
i].getSyncErr() != sv[
i].getSyncErr())
825 std::cout <<
"In detId: " << lc->first << std::endl;
826 std::cout <<
"Correlated LCT SyncErrs do not match: " << sv[
i].getSyncErr()
827 <<
" != " << cv[
i].getSyncErr() << std::endl;
829 if(cv[
i].getTrknmb() != sv[
i].getTrknmb())
831 std::cout <<
"In detId: " << lc->first << std::endl;
832 std::cout <<
"Correlated LCT Track numbers do not match: " << sv[
i].getTrknmb()
833 <<
" != " << cv[
i].getTrknmb() << std::endl;
837 if(
tracks.get().size() != simtracks.get().size())
839 std::cout <<
"Major error! # of L1 Tracks is not equal between sim and unpacked!" << std::endl;
840 std::vector<csc::L1Track>
a = simtracks.get();
841 std::vector<csc::L1Track>
b =
tracks.get();
843 for(std::vector<csc::L1Track>::const_iterator
i = a.begin();
i != a.end(); ++
i)
845 std::cout <<
"UNPACKER OUTPUT:" << std::endl;
846 for(std::vector<csc::L1Track>::const_iterator
i = b.begin();
i != b.end(); ++
i)
857 std::vector<CSCWireDigi>
859 std::vector<CSCWireDigi>::const_iterator
e)
861 typedef std::map<int,std::vector<CSCWireDigi> > wire2digi;
863 std::vector<CSCWireDigi> _r;
866 for(std::vector<CSCWireDigi>::const_iterator
i = b;
i !=
e; ++
i)
867 _wr2digis[
i->getWireGroup()].push_back(*
i);
869 for(wire2digi::const_iterator
i = _wr2digis.begin();
i != _wr2digis.end(); ++
i)
874 for(std::vector<CSCWireDigi>::const_iterator d =
i->second.begin();
875 d !=
i->second.end(); ++d)
877 std::vector<int> binson = d->getTimeBinsOn();
878 for(std::vector<int>::const_iterator
t = binson.begin();
879 t != binson.end(); ++
t)
889 std::vector<CSCStripDigi>
891 std::vector<CSCStripDigi>::const_iterator
b,
892 std::vector<CSCStripDigi>::const_iterator
e)
894 std::vector<CSCStripDigi> _r;
900 for(std::vector<CSCStripDigi>::const_iterator
i = b;
i !=
e; ++
i)
902 int strip=
i->getStrip();
908 _r.push_back(
CSCStripDigi(strip,
i->getADCCounts(),
i->getADCOverflow(),
909 i->getOverlappedSample(),
i->getErrorstat()));
914 std::vector<CSCComparatorDigi>
916 std::vector<CSCComparatorDigi>::const_iterator
b,
917 std::vector<CSCComparatorDigi>::const_iterator
e)
919 std::vector<CSCComparatorDigi> _r;
925 for(std::vector<CSCComparatorDigi>::const_iterator
i = b;
i !=
e; ++
i)
927 int strip=
i->getStrip();
934 i->getTimeBinWord()));
939 std::vector<CSCStripDigi>
941 std::vector<CSCStripDigi>::const_iterator
e)
943 std::vector<CSCStripDigi> _r;
948 std::vector<CSCStripDigi>
950 std::vector<CSCStripDigi>::const_iterator
e)
952 std::vector<CSCStripDigi> _r;
953 std::vector<int> counts;
955 for(std::vector<CSCStripDigi>::const_iterator
i = b;
i !=
e; ++
i)
958 counts =
i->getADCCounts();
959 for(std::vector<int>::const_iterator
a = counts.begin();
a != counts.end(); ++
a)
960 if((*
a) != 0) nonzero =
true;
962 if(nonzero) _r.push_back(*
i);
969 std::vector<CSCComparatorDigi>
971 std::vector<CSCComparatorDigi>::const_iterator
e)
973 std::vector<CSCComparatorDigi> _r;
975 for(std::vector<CSCComparatorDigi>::const_iterator
i = b;
i !=
e; ++
i)
977 bool present =
false;
979 if(
i->getTimeBin() < 10) present=
true;
981 if(present) _r.push_back(*
i);
T getParameter(std::string const &) const
edm::EDGetTokenT< CSCComparatorDigiCollection > cd1_token
std::vector< CSCStripDigi > sanitizeStripDigis(std::vector< CSCStripDigi >::const_iterator, std::vector< CSCStripDigi >::const_iterator)
std::vector< CSCComparatorDigi > zeroSupCompDigis(std::vector< CSCComparatorDigi >::const_iterator, std::vector< CSCComparatorDigi >::const_iterator)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< CSCComparatorDigi > relabelCompDigis(const CSCChamberMap *m, CSCDetId _id, std::vector< CSCComparatorDigi >::const_iterator b, std::vector< CSCComparatorDigi >::const_iterator e)
edm::EDGetTokenT< CSCStripDigiCollection > sd1_token
edm::EDGetTokenT< CSCCLCTDigiCollection > cl1_token
edm::EDGetTokenT< CSCCLCTDigiCollection > cl2_token
edm::EDGetTokenT< CSCALCTDigiCollection > al1_token
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > co2_token
edm::EDGetTokenT< CSCALCTDigiCollection > al2_token
U second(std::pair< T, U > const &p)
edm::EDGetTokenT< L1CSCTrackCollection > tr1_token
edm::EDGetTokenT< CSCTriggerContainer< csctf::TrackStub > > ts1_token
edm::EDGetTokenT< CSCWireDigiCollection > wd1_token
edm::EDGetTokenT< CSCStripDigiCollection > sd2_token
edm::EDGetTokenT< CSCWireDigiCollection > wd2_token
CSCDigiValidator(const edm::ParameterSet &)
edm::EDGetTokenT< CSCTriggerContainer< csctf::TrackStub > > ts2_token
std::vector< CSCWireDigi >::const_iterator const_iterator
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > co1_token
edm::EDGetTokenT< CSCComparatorDigiCollection > cd2_token
edm::EDGetTokenT< L1CSCTrackCollection > tr2_token
std::vector< CSCStripDigi > zeroSupStripDigis(std::vector< CSCStripDigi >::const_iterator, std::vector< CSCStripDigi >::const_iterator)
std::vector< CSCWireDigi > sanitizeWireDigis(std::vector< CSCWireDigi >::const_iterator, std::vector< CSCWireDigi >::const_iterator)
tuple size
Write out results.
std::vector< CSCStripDigi > relabelStripDigis(const CSCChamberMap *, CSCDetId, std::vector< CSCStripDigi >::const_iterator, std::vector< CSCStripDigi >::const_iterator)
virtual bool filter(edm::Event &, const edm::EventSetup &)