100 std::pair<std::vector<CSCWireDigi>,std::vector<CSCWireDigi> > >
101 matchingDetWireCollection;
103 std::pair<std::vector<CSCStripDigi>,std::vector<CSCStripDigi> > >
104 matchingDetStripCollection;
106 std::pair<std::vector<CSCComparatorDigi>,std::vector<CSCComparatorDigi> > >
107 matchingDetComparatorCollection;
109 std::pair<std::vector<CSCCLCTDigi>,std::vector<CSCCLCTDigi> > >
110 matchingDetCLCTCollection;
112 std::pair<std::vector<CSCALCTDigi>,std::vector<CSCALCTDigi> > >
113 matchingDetALCTCollection;
115 std::pair<std::vector<CSCCorrelatedLCTDigi>,std::vector<CSCCorrelatedLCTDigi> > >
116 matchingDetLCTCollection;
167 wi = _wi->begin(), swi= _swi->begin();
169 st = _st->begin(), sst = _sst->begin();
171 cmp = _cmp->begin(), scmp = _scmp->begin();
173 clct = _clct->begin(), sclct = _sclct->begin();
175 alct = _alct->begin(), salct = _salct->begin();
177 lct = _lct->begin(), slct = _slct->begin();
178 L1CSCTrackCollection::const_iterator
179 trk = _trk->begin(), strk = _strk->begin();
180 std::vector<csctf::TrackStub>::const_iterator
181 dt = _dt->get().begin(), sdt = _sdt->get().begin();
183 dt++;
dt--; sdt++; sdt--;
186 matchingDetWireCollection wires;
187 matchingDetStripCollection
strips;
188 matchingDetComparatorCollection comps;
189 matchingDetCLCTCollection clcts;
190 matchingDetALCTCollection alcts;
191 matchingDetLCTCollection lcts,trackstubs;
195 for(;wi != _wi->end();++wi)
198 b=(*wi).second.first,
e=(*wi).second.second;
199 std::vector<CSCWireDigi>::iterator
200 beg=wires[(*wi).first].first.end();
201 wires[(*wi).first].first.insert(beg,b,
e);
203 for(;swi != _swi->end();++swi)
206 b=(*swi).second.first,
e=(*swi).second.second;
209 if((*swi).first.ring() == 4)
210 _id =
CSCDetId((*swi).first.endcap(),(*swi).first.station(),
211 1, (*swi).first.chamber(),(*swi).first.layer());
213 std::vector<CSCWireDigi>::iterator
214 beg=wires[_id].second.end();
216 wires[_id].second.insert(beg,b,
e);
219 wires[_id].second.end());
223 for(;st != _st->end();++st)
226 b=(*st).second.first,
e=(*st).second.second;
227 std::vector<CSCStripDigi>::iterator
228 beg=
strips[(*st).first].first.end();
233 strips[(*st).first].first.insert(beg,zs.begin(),zs.end());
235 for(;sst != _sst->end();++sst)
238 b=(*sst).second.first,
e=(*sst).second.second;
245 std::vector<CSCStripDigi>::iterator
246 beg=
strips[_id].second.end();
250 strips[_id].second.insert(beg,relab.begin(),relab.end());
255 for(;cmp != _cmp->end();++cmp)
258 b=(*cmp).second.first,
e=(*cmp).second.second;
259 std::vector<CSCComparatorDigi>::iterator
260 beg=comps[(*cmp).first].first.end();
262 comps[(*cmp).first].first.insert(beg,b,
e);
264 for(;scmp != _scmp->end();++scmp)
267 b=(*scmp).second.first,
e=(*scmp).second.second;
270 if((*scmp).first.ring() == 4)
271 _id =
CSCDetId((*scmp).first.endcap(),(*scmp).first.station(),
272 1, (*scmp).first.chamber(),(*scmp).first.layer());
274 std::vector<CSCComparatorDigi>::iterator
275 beg=comps[_id].second.begin();
277 if((*scmp).first.ring()==4)
278 beg=comps[_id].
second.end();
280 std::vector<CSCComparatorDigi> zs =
283 std::vector<CSCComparatorDigi> relab =
288 comps[_id].second.insert(beg,relab.begin(),relab.end());
292 for(;clct != _clct->end();++clct)
295 b=(*clct).second.first,
e=(*clct).second.second;
296 std::vector<CSCCLCTDigi>::iterator
297 beg=clcts[(*clct).first].first.end();
299 clcts[(*clct).first].first.insert(beg,b,
e);
301 for(;sclct != _sclct->end();++sclct)
304 b=(*sclct).second.first,
e=(*sclct).second.second;
307 if((*sclct).first.ring() == 4)
308 _id =
CSCDetId((*sclct).first.endcap(),(*sclct).first.station(),
309 1, (*sclct).first.chamber(),(*sclct).first.layer());
311 std::vector<CSCCLCTDigi>::iterator
312 beg=clcts[_id].second.begin();
314 if((*sclct).first.ring()==4)
315 beg=clcts[_id].
second.end();
317 clcts[_id].second.insert(beg,b,
e);
321 for(;alct != _alct->end();++alct)
324 b=(*alct).second.first,
e=(*alct).second.second;
325 std::vector<CSCALCTDigi>::iterator
326 beg=alcts[(*alct).first].first.end();
328 alcts[(*alct).first].first.insert(beg,b,
e);
330 for(;salct != _salct->end();++salct)
333 b=(*salct).second.first,
e=(*salct).second.second;
336 if((*salct).first.ring() == 4)
337 _id =
CSCDetId((*salct).first.endcap(),(*salct).first.station(),
338 1, (*salct).first.chamber(),(*salct).first.layer());
340 std::vector<CSCALCTDigi>::iterator
341 beg=alcts[_id].second.begin();
343 if((*salct).first.ring()==4)
344 beg=alcts[_id].
second.end();
346 alcts[_id].second.insert(beg,b,
e);
350 for(;lct != _lct->end();++lct)
353 b=(*lct).second.first,
e=(*lct).second.second;
354 std::vector<CSCCorrelatedLCTDigi>::iterator
355 beg=lcts[(*lct).first].first.end();
357 lcts[(*lct).first].first.insert(beg,b,
e);
359 for(;slct != _slct->end();++slct)
362 b=(*slct).second.first,
e=(*slct).second.second;
365 if((*slct).first.ring() == 4)
366 _id =
CSCDetId((*slct).first.endcap(),(*slct).first.station(),
367 1, (*slct).first.chamber(),(*slct).first.layer());
369 std::vector<CSCCorrelatedLCTDigi>::iterator
370 beg=lcts[_id].second.begin();
372 if((*slct).first.ring()==4)
373 beg=lcts[_id].
second.end();
375 lcts[_id].second.insert(beg,b,
e);
378 for(; trk != _trk->end(); ++trk)
380 tracks.push_back(trk->first);
383 for(;strk != _strk->end(); ++strk)
385 simtracks.push_back(strk->first);
389 matchingDetWireCollection::const_iterator
w;
390 matchingDetStripCollection::const_iterator
s;
391 matchingDetComparatorCollection::const_iterator
c;
392 matchingDetCLCTCollection::const_iterator cl;
393 matchingDetALCTCollection::const_iterator al;
394 matchingDetLCTCollection::const_iterator lc;
396 for(
w = wires.begin();
w != wires.end(); ++
w)
398 if(
w->second.first.size() !=
w->second.second.size())
400 std::cout <<
"Major error! # of wire digis in detID: " <<
w->first
401 <<
" is not equal between sim and unpacked!" << std::endl;
404 std::vector<CSCWireDigi>
a =
w->second.second;
405 std::vector<CSCWireDigi> b =
w->second.first;
407 for(std::vector<CSCWireDigi>::const_iterator
i = a.begin();
i != a.end(); ++
i)
409 std::cout <<
"UNPACKER OUTPUT:" << std::endl;
410 for(std::vector<CSCWireDigi>::const_iterator
i = b.begin();
i != b.end(); ++
i)
414 int max =
std::min(
w->second.first.size(),
w->second.second.size());
415 std::vector<CSCWireDigi>
cv =
w->second.first;
416 std::vector<CSCWireDigi> sv =
w->second.second;
417 for(
int i = 0;
i <
max; ++
i)
419 if(sv[
i].getWireGroup() != cv[
i].getWireGroup())
421 std::cout <<
"In detId: " <<
w->first << std::endl;
422 std::cout <<
"Wire Groups do not match: " << sv[
i].getWireGroup()
423 <<
" != " << cv[
i].getWireGroup() << std::endl;
425 if(sv[
i].getTimeBin() != cv[
i].getTimeBin())
427 std::cout <<
"In detId: " <<
w->first << std::endl;
428 std::cout <<
"First Time Bins do not match: " << sv[
i].getTimeBin()
429 <<
" != " << cv[
i].getTimeBin() << std::endl;
431 if(sv[
i].getTimeBinWord() != cv[
i].getTimeBinWord())
433 std::cout <<
"In detId: " <<
w->first << std::endl;
434 std::cout <<
"Time Bin Words do not match: " << sv[
i].getTimeBinWord()
435 <<
" != " << cv[
i].getTimeBinWord() << std::endl;
441 if(
s->second.first.size() !=
s->second.second.size())
443 std::cout <<
"Major error! # of strip digis in detID: " <<
s->first
444 <<
" is not equal between sim and unpacked!" << std::endl;
447 std::vector<CSCStripDigi> a =
s->second.second;
448 std::vector<CSCStripDigi> b =
s->second.first;
450 for(std::vector<CSCStripDigi>::const_iterator
i = a.begin();
i != a.end(); ++
i)
452 std::cout <<
"UNPACKER OUTPUT:" << std::endl;
453 for(std::vector<CSCStripDigi>::const_iterator
i = b.begin();
i != b.end(); ++
i)
456 int max =
std::min(
s->second.first.size(),
s->second.second.size());
457 std::vector<CSCStripDigi> cv =
s->second.first;
458 std::vector<CSCStripDigi> sv =
s->second.second;
459 for(
int i = 0;
i <
max; ++
i)
461 bool me1a =
s->first.station()==1 &&
s->first.ring()==4;
462 bool me1b =
s->first.station()==1 &&
s->first.ring()==1;
463 bool zplus =
s->first.endcap()==1;
466 if(me1a && zplus) k=max-
i-1;
467 if(me1b && !zplus) k=max-i-1;
469 if(sv[k].getStrip() != cv[i].getStrip())
471 std::cout <<
"In detId: " <<
s->first << std::endl;
472 std::cout <<
"Strips do not match: " << sv[
k].getStrip()
473 <<
" != " << cv[
i].getStrip() << std::endl;
475 if(sv[k].getADCCounts().
size() != cv[i].getADCCounts().
size())
477 std::cout <<
"In detId: " <<
s->first << std::endl;
478 std::cout <<
"ADC Readouts not of equal size!" << std::endl;
479 std::cout << sv[
k].getADCCounts().size() <<
' '
480 << cv[
i].getADCCounts().size() << std::endl;
484 std::vector<int> sADC = sv[
k].getADCCounts();
485 std::vector<int> uADC = cv[
i].getADCCounts();
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 <<
"ADC counts not equal at index: " << iadc << std::endl
492 << std::hex <<sADC[iadc] <<
" != " << uADC[iadc] << std::dec
496 if(sv[k].getADCOverflow().size() != cv[
i].getADCOverflow().size())
498 std::cout <<
"In detId: " <<
s->first << std::endl;
499 std::cout <<
"ADC Overflows not of equal size!" << std::endl;
500 std::cout << sv[
k].getADCOverflow().size() <<
' '
501 << cv[
i].getADCOverflow().size() << std::endl;
505 std::vector<uint16_t> sADC = sv[
k].getADCOverflow();
506 std::vector<uint16_t> uADC = cv[
i].getADCOverflow();
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 <<
"ADC overflows not equal at index: " << iadc << std::endl
513 << std::hex <<sADC[iadc] <<
" != " << uADC[iadc] << std::dec
517 if(sv[k].getOverlappedSample().size() != cv[
i].getOverlappedSample().size())
519 std::cout <<
"In detId: " <<
s->first << std::endl;
520 std::cout <<
"Overlapped Samples not of equal size!" << std::endl;
521 std::cout << sv[
k].getOverlappedSample().size() <<
' '
522 << cv[
i].getOverlappedSample().size() << std::endl;
526 std::vector<uint16_t> sADC = sv[
k].getOverlappedSample();
527 std::vector<uint16_t> uADC = cv[
i].getOverlappedSample();
529 for(
unsigned iadc = 0; iadc < sADC.size(); ++iadc)
530 if(sADC[iadc] != uADC[iadc])
532 std::cout <<
"In detId: " <<
s->first << std::endl;
533 std::cout <<
"Overlapped Samples not equal at index: " << iadc << std::endl
534 << std::hex <<sADC[iadc] <<
" != " << uADC[iadc] << std::dec
538 if(sv[k].getErrorstat().size() != cv[
i].getErrorstat().size())
540 std::cout <<
"In detId: " <<
s->first << std::endl;
541 std::cout <<
"Errorstat not of equal size!" << std::endl;
542 std::cout << sv[
k].getErrorstat().size() <<
' '
543 << cv[
i].getErrorstat().size() << std::endl;
547 std::vector<uint16_t> sADC = sv[
k].getErrorstat();
548 std::vector<uint16_t> uADC = cv[
i].getErrorstat();
550 for(
unsigned iadc = 0; iadc < sADC.size(); ++iadc)
551 if(sADC[iadc] != uADC[iadc])
553 std::cout <<
"In detId: " <<
s->first << std::endl;
554 std::cout <<
"Errorstat not equal at index: " << iadc << std::endl
555 << std::hex <<sADC[iadc] <<
" != " << uADC[iadc] << std::dec
559 if(sv[k].pedestal() != cv[
i].pedestal())
561 std::cout <<
"In detId: " <<
s->first << std::endl;
562 std::cout <<
"Pedestals not equal: " << sv[
k].pedestal() <<
" != "
563 << cv[
i].pedestal() << std::endl;
565 if(sv[k].amplitude() != cv[i].amplitude())
567 std::cout <<
"In detId: " <<
s->first << std::endl;
568 std::cout <<
"Amplitudes not equal: " << sv[
k].amplitude() <<
" != "
569 << cv[
i].amplitude() << std::endl;
573 for(
c = comps.begin();
c != comps.end(); ++
c)
575 if(
c->second.first.size() !=
c->second.second.size())
577 std::cout <<
"Major error! # of comparator digis in detID: " <<
c->first
578 <<
" is not equal between sim and unpacked!" << std::endl;
581 std::vector<CSCComparatorDigi> a =
c->second.second;
582 std::vector<CSCComparatorDigi> b =
c->second.first;
584 for(std::vector<CSCComparatorDigi>::const_iterator i = a.begin(); i != a.end(); ++
i)
586 std::cout <<
"UNPACKER OUTPUT:" << std::endl;
587 for(std::vector<CSCComparatorDigi>::const_iterator i = b.begin(); i != b.end(); ++
i)
590 int max =
std::min(
c->second.first.size(),
c->second.second.size());
591 std::vector<CSCComparatorDigi> cv =
c->second.first;
592 std::vector<CSCComparatorDigi> sv =
c->second.second;
593 for(
int i = 0; i <
max; ++
i)
595 if(sv[i].getStrip() != cv[
i].getStrip())
597 std::cout <<
"In detId: " <<
s->first << std::endl;
598 std::cout <<
"Comparator strips do not match: " << sv[
i].getStrip()
599 <<
" != " << cv[
i].getStrip() << std::endl;
601 if(sv[i].getComparator() != cv[i].getComparator())
603 std::cout <<
"In detId: " <<
c->first << std::endl;
604 std::cout <<
"Comparators do not match: " << sv[
i].getComparator()
605 <<
" != " << cv[
i].getComparator() << std::endl;
607 if(sv[i].getTimeBinWord() != cv[i].getTimeBinWord())
609 std::cout <<
"In detId: " <<
c->first << std::endl;
610 std::cout <<
"Comparator time bins words do not match: " << sv[
i].getTimeBinWord()
611 <<
" != " << cv[
i].getTimeBinWord() << std::endl;
615 for(cl = clcts.begin(); cl != clcts.end(); ++cl)
617 if(cl->second.first.size() != cl->second.second.size())
619 std::cout <<
"Major error! # of CLCT digis in detID: " << cl->first
620 <<
" is not equal between sim and unpacked!" << std::endl;
623 std::vector<CSCCLCTDigi> a = cl->second.second;
624 std::vector<CSCCLCTDigi> b = cl->second.first;
626 for(std::vector<CSCCLCTDigi>::const_iterator i = a.begin(); i != a.end(); ++
i)
628 std::cout <<
"UNPACKER OUTPUT:" << std::endl;
629 for(std::vector<CSCCLCTDigi>::const_iterator i = b.begin(); i != b.end(); ++
i)
632 int max =
std::min(cl->second.first.size(),cl->second.second.size());
633 std::vector<CSCCLCTDigi> cv = cl->second.first;
634 std::vector<CSCCLCTDigi> sv = cl->second.second;
635 for(
int i = 0; i <
max; ++
i)
637 if(cv[i].getKeyStrip() != sv[
i].getKeyStrip())
639 std::cout <<
"In detId: " << cl->first << std::endl;
640 std::cout <<
"CLCT key strips do not match: " << sv[
i].getKeyStrip()
641 <<
" != " << cv[
i].getKeyStrip() << std::endl;
643 if(cv[i].getStrip() != sv[i].getStrip())
645 std::cout <<
"In detId: " << cl->first << std::endl;
646 std::cout <<
"CLCT strips do not match: " << sv[
i].getStrip()
647 <<
" != " << cv[
i].getStrip() << std::endl;
649 if(cv[i].isValid() != sv[i].isValid())
651 std::cout <<
"In detId: " << cl->first << std::endl;
652 std::cout <<
"CLCT Valid bits do not match: " << sv[
i].isValid()
653 <<
" != " << cv[
i].isValid() << std::endl;
655 if(cv[i].getQuality() != sv[i].getQuality())
657 std::cout <<
"In detId: " << cl->first << std::endl;
658 std::cout <<
"CLCT qualities do not match: " << sv[
i].getQuality()
659 <<
" != " << cv[
i].getQuality() << std::endl;
661 if(cv[i].getPattern() != sv[i].getPattern())
663 std::cout <<
"In detId: " << cl->first << std::endl;
664 std::cout <<
"CLCT patterns do not match: " << sv[
i].getPattern()
665 <<
" != " << cv[
i].getPattern() << std::endl;
667 if(cv[i].getStripType() != sv[i].getStripType())
669 std::cout <<
"In detId: " << cl->first << std::endl;
670 std::cout <<
"CLCT strip types do not match: " << sv[
i].getStripType()
671 <<
" != " << cv[
i].getStripType() << std::endl;
673 if(cv[i].getBend() != sv[i].getBend())
675 std::cout <<
"In detId: " << cl->first << std::endl;
676 std::cout <<
"CLCT bends do not match: " << sv[
i].getBend()
677 <<
" != " << cv[
i].getBend() << std::endl;
679 if(cv[i].getCFEB() != sv[i].getCFEB())
681 std::cout <<
"In detId: " << cl->first << std::endl;
682 std::cout <<
"CLCT CFEBs do not match: " << sv[
i].getCFEB()
683 <<
" != " << cv[
i].getCFEB() << std::endl;
685 if(((
short)cv[i].getBX()) != ((
short)sv[i].getBX()) - 4)
687 std::cout <<
"In detId: " << cl->first << std::endl;
688 std::cout <<
"CLCT BX do not match: " << sv[
i].getBX() - 4
689 <<
" != " << cv[
i].getBX() << std::endl;
691 if(cv[i].getFullBX() != sv[i].getFullBX())
693 std::cout <<
"In detId: " << cl->first << std::endl;
694 std::cout <<
"CLCT Full BX do not match: " << sv[
i].getFullBX()
695 <<
" != " << cv[
i].getFullBX() << std::endl;
697 if(cv[i].getTrknmb() != sv[i].getTrknmb())
699 std::cout <<
"In detId: " << cl->first << std::endl;
700 std::cout <<
"CLCT Track numbers do not match: " << sv[
i].getTrknmb()
701 <<
" != " << cv[
i].getTrknmb() << std::endl;
705 for(al = alcts.begin(); al != alcts.end(); ++al)
707 if(al->second.first.size() != al->second.second.size())
709 std::cout <<
"Major error! # of ALCT digis in detID: " << al->first
710 <<
" is not equal between sim and unpacked!" << std::endl;
713 std::vector<CSCALCTDigi> a = al->second.second;
714 std::vector<CSCALCTDigi> b = al->second.first;
716 for(std::vector<CSCALCTDigi>::const_iterator i = a.begin(); i != a.end(); ++
i)
718 std::cout <<
"UNPACKER OUTPUT:" << std::endl;
719 for(std::vector<CSCALCTDigi>::const_iterator i = b.begin(); i != b.end(); ++
i)
722 int max =
std::min(al->second.first.size(),al->second.second.size());
723 std::vector<CSCALCTDigi> cv = al->second.first;
724 std::vector<CSCALCTDigi> sv = al->second.second;
725 for(
int i = 0; i <
max; ++
i)
727 if(cv[i].getKeyWG() != sv[
i].getKeyWG())
729 std::cout <<
"In detId: " << al->first << std::endl;
730 std::cout <<
"ALCT key wire groups do not match: " << sv[
i].getKeyWG()
731 <<
" != " << cv[
i].getKeyWG() << std::endl;
733 if(cv[i].isValid() != sv[i].isValid())
735 std::cout <<
"In detId: " << al->first << std::endl;
736 std::cout <<
"ALCT Valid bits do not match: " << sv[
i].isValid()
737 <<
" != " << cv[
i].isValid() << std::endl;
739 if(cv[i].getQuality() != sv[i].getQuality())
741 std::cout <<
"In detId: " << al->first << std::endl;
742 std::cout <<
"ALCT qualities do not match: " << sv[
i].getQuality()
743 <<
" != " << cv[
i].getQuality() << std::endl;
745 if(cv[i].getAccelerator() != sv[i].getAccelerator())
747 std::cout <<
"In detId: " << al->first << std::endl;
748 std::cout <<
"ALCT accelerator bits do not match: " << sv[
i].getAccelerator()
749 <<
" != " << cv[
i].getAccelerator() << std::endl;
751 if(cv[i].getCollisionB() != sv[i].getCollisionB())
753 std::cout <<
"In detId: " << al->first << std::endl;
754 std::cout <<
"ALCT CollisionB flags do not match: " << sv[
i].getCollisionB()
755 <<
" != " << cv[
i].getCollisionB() << std::endl;
757 if((cv[i].getBX()) != (sv[i].getBX()))
759 std::cout <<
"In detId: " << al->first << std::endl;
760 std::cout <<
"ALCT BX do not match: " << sv[
i].getBX()
761 <<
" != " << cv[
i].getBX() << std::endl;
763 if(cv[i].getFullBX() != sv[i].getFullBX())
765 std::cout <<
"In detId: " << cl->first << std::endl;
766 std::cout <<
"ALCT Full BX do not match: " << sv[
i].getFullBX()
767 <<
" != " << cv[
i].getFullBX() << std::endl;
771 for(lc = lcts.begin(); lc != lcts.end(); ++lc)
773 if(lc->second.first.size() != lc->second.second.size())
775 std::cout <<
"Major error! # of Correlated LCT digis in detID: " << lc->first
776 <<
" is not equal between sim and unpacked!" << std::endl;
779 std::vector<CSCCorrelatedLCTDigi> a = lc->second.second;
780 std::vector<CSCCorrelatedLCTDigi> b = lc->second.first;
782 for(std::vector<CSCCorrelatedLCTDigi>::const_iterator i = a.begin(); i != a.end(); ++
i)
784 std::cout <<
"UNPACKER OUTPUT:" << std::endl;
785 for(std::vector<CSCCorrelatedLCTDigi>::const_iterator i = b.begin(); i != b.end(); ++
i)
788 int max =
std::min(lc->second.first.size(),lc->second.second.size());
789 std::vector<CSCCorrelatedLCTDigi> cv = lc->second.first;
790 std::vector<CSCCorrelatedLCTDigi> sv = lc->second.second;
791 for(
int i = 0; i <
max; ++
i)
793 if(cv[i].getStrip() != sv[
i].getStrip())
795 std::cout <<
"In detId: " << lc->first << std::endl;
796 std::cout <<
"Correlated LCT strips do not match: " << sv[
i].getStrip()
797 <<
" != " << cv[
i].getStrip() << std::endl;
799 if(cv[i].getKeyWG() != sv[i].getKeyWG())
801 std::cout <<
"In detId: " << lc->first << std::endl;
802 std::cout <<
"Correlated LCT key wire groups do not match: " << sv[
i].getKeyWG()
803 <<
" != " << cv[
i].getKeyWG() << std::endl;
805 if(cv[i].isValid() != sv[i].isValid())
807 std::cout <<
"In detId: " << lc->first << std::endl;
808 std::cout <<
"Correlated LCT Valid bits do not match: " << sv[
i].isValid()
809 <<
" != " << cv[
i].isValid() << std::endl;
811 if(cv[i].getQuality() != sv[i].getQuality())
813 std::cout <<
"In detId: " << lc->first << std::endl;
814 std::cout <<
"Correlated LCT qualities do not match: " << sv[
i].getQuality()
815 <<
" != " << cv[
i].getQuality() << std::endl;
817 if(cv[i].getPattern() != sv[i].getPattern())
819 std::cout <<
"In detId: " << lc->first << std::endl;
820 std::cout <<
"Correlated LCT ALCT patterns do not match: " << sv[
i].getPattern()
821 <<
" != " << cv[
i].getPattern() << std::endl;
823 if(cv[i].getCLCTPattern() != sv[i].getCLCTPattern())
825 std::cout <<
"In detId: " << lc->first << std::endl;
826 std::cout <<
"Correlated LCT CLCT patterns do not match: " << sv[
i].getCLCTPattern()
827 <<
" != " << cv[
i].getCLCTPattern() << std::endl;
829 if(cv[i].getStripType() != sv[i].getStripType())
831 std::cout <<
"In detId: " << lc->first << std::endl;
832 std::cout <<
"Correlated LCT strip types do not match: " << sv[
i].getStripType()
833 <<
" != " << cv[
i].getStripType() << std::endl;
835 if(cv[i].getBend() != sv[i].getBend())
837 std::cout <<
"In detId: " << lc->first << std::endl;
838 std::cout <<
"Correlated LCT bends do not match: " << sv[
i].getBend()
839 <<
" != " << cv[
i].getBend() << std::endl;
841 if(cv[i].getMPCLink() != sv[i].getMPCLink())
843 std::cout <<
"In detId: " << lc->first << std::endl;
844 std::cout <<
"Correlated LCT MPC Links do not match: " << sv[
i].getMPCLink()
845 <<
" != " << cv[
i].getMPCLink() << std::endl;
847 if((cv[i].getBX()) != (sv[i].getBX()-6))
849 std::cout <<
"In detId: " << lc->first << std::endl;
850 std::cout <<
"Correlated LCT BX do not match: " << sv[
i].getBX()-6
851 <<
" != " << cv[
i].getBX() << std::endl;
853 if(cv[i].getCSCID() != sv[i].getCSCID())
855 std::cout <<
"In detId: " << lc->first << std::endl;
856 std::cout <<
"Correlated LCT CSCIDs do not match: " << sv[
i].getCSCID()
857 <<
" != " << cv[
i].getCSCID() << std::endl;
859 if(cv[i].getBX0() != sv[i].getBX0())
861 std::cout <<
"In detId: " << lc->first << std::endl;
862 std::cout <<
"Correlated LCT BX0s do not match: " << sv[
i].getBX0()
863 <<
" != " << cv[
i].getBX0() << std::endl;
865 if(cv[i].getSyncErr() != sv[i].getSyncErr())
867 std::cout <<
"In detId: " << lc->first << std::endl;
868 std::cout <<
"Correlated LCT SyncErrs do not match: " << sv[
i].getSyncErr()
869 <<
" != " << cv[
i].getSyncErr() << std::endl;
871 if(cv[i].getTrknmb() != sv[i].getTrknmb())
873 std::cout <<
"In detId: " << lc->first << std::endl;
874 std::cout <<
"Correlated LCT Track numbers do not match: " << sv[
i].getTrknmb()
875 <<
" != " << cv[
i].getTrknmb() << std::endl;
879 if(
tracks.get().size() != simtracks.get().size())
881 std::cout <<
"Major error! # of L1 Tracks is not equal between sim and unpacked!" << std::endl;
882 std::vector<csc::L1Track> a = simtracks.get();
883 std::vector<csc::L1Track> b =
tracks.get();
885 for(std::vector<csc::L1Track>::const_iterator i = a.begin(); i != a.end(); ++
i)
887 std::cout <<
"UNPACKER OUTPUT:" << std::endl;
888 for(std::vector<csc::L1Track>::const_iterator i = b.begin(); i != b.end(); ++
i)
edm::InputTag csctfstubs2
std::vector< CSCComparatorDigi > zeroSupCompDigis(std::vector< CSCComparatorDigi >::const_iterator, std::vector< CSCComparatorDigi >::const_iterator)
std::vector< CSCComparatorDigi > relabelCompDigis(const CSCChamberMap *m, CSCDetId _id, std::vector< CSCComparatorDigi >::const_iterator b, std::vector< CSCComparatorDigi >::const_iterator e)
edm::InputTag csctfstubs1
U second(std::pair< T, U > const &p)
const T & max(const T &a, const T &b)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::vector< DigiType >::const_iterator const_iterator
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)