52 typedef std::map<CSCDetId, std::pair<std::vector<CSCWireDigi>, std::vector<CSCWireDigi> > > matchingDetWireCollection;
53 typedef std::map<CSCDetId, std::pair<std::vector<CSCStripDigi>, std::vector<CSCStripDigi> > >
54 matchingDetStripCollection;
55 typedef std::map<CSCDetId, std::pair<std::vector<CSCComparatorDigi>, std::vector<CSCComparatorDigi> > >
56 matchingDetComparatorCollection;
57 typedef std::map<CSCDetId, std::pair<std::vector<CSCCLCTDigi>, std::vector<CSCCLCTDigi> > > matchingDetCLCTCollection;
58 typedef std::map<CSCDetId, std::pair<std::vector<CSCALCTDigi>, std::vector<CSCALCTDigi> > > matchingDetALCTCollection;
59 typedef std::map<CSCDetId, std::pair<std::vector<CSCCorrelatedLCTDigi>, std::vector<CSCCorrelatedLCTDigi> > >
60 matchingDetLCTCollection;
113 L1CSCTrackCollection::const_iterator trk = _trk->begin(), strk = _strk->begin();
116 matchingDetWireCollection
wires;
117 matchingDetStripCollection
strips;
118 matchingDetComparatorCollection comps;
119 matchingDetCLCTCollection clcts;
120 matchingDetALCTCollection alcts;
121 matchingDetLCTCollection lcts, trackstubs;
125 for (; wi != _wi->end(); ++wi) {
127 std::vector<CSCWireDigi>::iterator beg =
wires[(*wi).first].first.end();
128 wires[(*wi).first].first.insert(beg,
b,
e);
130 for (; swi != _swi->end(); ++swi) {
134 if ((*swi).first.ring() == 4)
135 _id =
CSCDetId((*swi).first.endcap(), (*swi).first.station(), 1, (*swi).first.chamber(), (*swi).first.layer());
137 std::vector<CSCWireDigi>::iterator beg =
wires[_id].second.end();
139 wires[_id].second.insert(beg,
b,
e);
145 for (; st != _st->end(); ++st) {
147 std::vector<CSCStripDigi>::iterator beg =
strips[(*st).first].first.end();
152 strips[(*st).first].first.insert(beg, zs.begin(), zs.end());
154 for (; sst != _sst->end(); ++sst) {
162 std::vector<CSCStripDigi>::iterator beg =
strips[_id].second.end();
166 strips[_id].second.insert(beg, relab.begin(), relab.end());
171 for (;
cmp != _cmp->end(); ++
cmp) {
173 std::vector<CSCComparatorDigi>::iterator beg = comps[(*cmp).first].first.end();
175 comps[(*cmp).first].first.insert(beg,
b,
e);
177 for (; scmp != _scmp->end(); ++scmp) {
181 if ((*scmp).first.ring() == 4)
183 CSCDetId((*scmp).first.endcap(), (*scmp).first.station(), 1, (*scmp).first.chamber(), (*scmp).first.layer());
185 std::vector<CSCComparatorDigi>::iterator beg = comps[_id].second.begin();
187 if ((*scmp).first.ring() == 4)
188 beg = comps[_id].
second.end();
192 std::vector<CSCComparatorDigi> relab =
relabelCompDigis(theMapping, (*scmp).first, zs.begin(), zs.end());
194 comps[_id].second.insert(beg, relab.begin(), relab.end());
198 for (; clct != _clct->end(); ++clct) {
200 std::vector<CSCCLCTDigi>::iterator beg = clcts[(*clct).first].first.end();
202 clcts[(*clct).first].first.insert(beg,
b,
e);
204 for (; sclct != _sclct->end(); ++sclct) {
208 if ((*sclct).first.ring() == 4)
210 (*sclct).first.endcap(), (*sclct).first.station(), 1, (*sclct).first.chamber(), (*sclct).first.layer());
212 std::vector<CSCCLCTDigi>::iterator beg = clcts[_id].second.begin();
214 if ((*sclct).first.ring() == 4)
215 beg = clcts[_id].
second.end();
217 clcts[_id].second.insert(beg,
b,
e);
221 for (; alct != _alct->end(); ++alct) {
223 std::vector<CSCALCTDigi>::iterator beg = alcts[(*alct).first].first.end();
225 alcts[(*alct).first].first.insert(beg,
b,
e);
227 for (; salct != _salct->end(); ++salct) {
231 if ((*salct).first.ring() == 4)
233 (*salct).first.endcap(), (*salct).first.station(), 1, (*salct).first.chamber(), (*salct).first.layer());
235 std::vector<CSCALCTDigi>::iterator beg = alcts[_id].second.begin();
237 if ((*salct).first.ring() == 4)
238 beg = alcts[_id].
second.end();
240 alcts[_id].second.insert(beg,
b,
e);
244 for (; lct != _lct->end(); ++lct) {
246 std::vector<CSCCorrelatedLCTDigi>::iterator beg = lcts[(*lct).first].first.end();
248 lcts[(*lct).first].first.insert(beg,
b,
e);
250 for (; slct != _slct->end(); ++slct) {
254 if ((*slct).first.ring() == 4)
256 CSCDetId((*slct).first.endcap(), (*slct).first.station(), 1, (*slct).first.chamber(), (*slct).first.layer());
258 std::vector<CSCCorrelatedLCTDigi>::iterator beg = lcts[_id].second.begin();
260 if ((*slct).first.ring() == 4)
261 beg = lcts[_id].
second.end();
263 lcts[_id].second.insert(beg,
b,
e);
266 for (; trk != _trk->end(); ++trk) {
267 tracks.push_back(trk->first);
269 for (; strk != _strk->end(); ++strk) {
274 matchingDetWireCollection::const_iterator
w;
275 matchingDetStripCollection::const_iterator
s;
276 matchingDetComparatorCollection::const_iterator
c;
277 matchingDetCLCTCollection::const_iterator
cl;
278 matchingDetALCTCollection::const_iterator al;
279 matchingDetLCTCollection::const_iterator lc;
282 if (
w->second.first.size() !=
w->second.second.size()) {
283 std::cout <<
"Major error! # of wire digis in detID: " <<
w->first <<
" is not equal between sim and unpacked!"
287 std::vector<CSCWireDigi>
a =
w->second.second;
288 std::vector<CSCWireDigi>
b =
w->second.first;
290 for (std::vector<CSCWireDigi>::const_iterator
i =
a.begin();
i !=
a.end(); ++
i)
292 std::cout <<
"UNPACKER OUTPUT:" << std::endl;
293 for (std::vector<CSCWireDigi>::const_iterator
i =
b.begin();
i !=
b.end(); ++
i)
296 int max =
std::min(
w->second.first.size(),
w->second.second.size());
297 std::vector<CSCWireDigi>
cv =
w->second.first;
298 std::vector<CSCWireDigi>
sv =
w->second.second;
299 for (
int i = 0;
i <
max; ++
i) {
300 if (
sv[
i].getWireGroup() !=
cv[
i].getWireGroup()) {
301 std::cout <<
"In detId: " <<
w->first << std::endl;
302 std::cout <<
"Wire Groups do not match: " <<
sv[
i].getWireGroup() <<
" != " <<
cv[
i].getWireGroup()
305 if (
sv[
i].getTimeBin() !=
cv[
i].getTimeBin()) {
306 std::cout <<
"In detId: " <<
w->first << std::endl;
307 std::cout <<
"First Time Bins do not match: " <<
sv[
i].getTimeBin() <<
" != " <<
cv[
i].getTimeBin()
310 if (
sv[
i].getTimeBinWord() !=
cv[
i].getTimeBinWord()) {
311 std::cout <<
"In detId: " <<
w->first << std::endl;
312 std::cout <<
"Time Bin Words do not match: " <<
sv[
i].getTimeBinWord() <<
" != " <<
cv[
i].getTimeBinWord()
318 if (
s->second.first.size() !=
s->second.second.size()) {
319 std::cout <<
"Major error! # of strip digis in detID: " <<
s->first <<
" is not equal between sim and unpacked!"
323 std::vector<CSCStripDigi>
a =
s->second.second;
324 std::vector<CSCStripDigi>
b =
s->second.first;
326 for (std::vector<CSCStripDigi>::const_iterator
i =
a.begin();
i !=
a.end(); ++
i)
328 std::cout <<
"UNPACKER OUTPUT:" << std::endl;
329 for (std::vector<CSCStripDigi>::const_iterator
i =
b.begin();
i !=
b.end(); ++
i)
332 int max =
std::min(
s->second.first.size(),
s->second.second.size());
333 std::vector<CSCStripDigi>
cv =
s->second.first;
334 std::vector<CSCStripDigi>
sv =
s->second.second;
335 for (
int i = 0;
i <
max; ++
i) {
336 bool me1a =
s->first.station() == 1 &&
s->first.ring() == 4;
337 bool me1b =
s->first.station() == 1 &&
s->first.ring() == 1;
338 bool zplus =
s->first.endcap() == 1;
346 if (
sv[
k].getStrip() !=
cv[
i].getStrip()) {
347 std::cout <<
"In detId: " <<
s->first << std::endl;
348 std::cout <<
"Strips do not match: " <<
sv[
k].getStrip() <<
" != " <<
cv[
i].getStrip() << std::endl;
351 std::cout <<
"In detId: " <<
s->first << std::endl;
352 std::cout <<
"ADC Readouts not of equal size!" << std::endl;
353 std::cout <<
sv[
k].getADCCounts().size() <<
' ' <<
cv[
i].getADCCounts().size() << std::endl;
355 std::vector<int> sADC =
sv[
k].getADCCounts();
356 std::vector<int> uADC =
cv[
i].getADCCounts();
358 for (
unsigned iadc = 0; iadc < sADC.size(); ++iadc)
359 if (sADC[iadc] != uADC[iadc]) {
360 std::cout <<
"In detId: " <<
s->first << std::endl;
361 std::cout <<
"ADC counts not equal at index: " << iadc << std::endl
362 << std::hex << sADC[iadc] <<
" != " << uADC[iadc] <<
std::dec << std::endl;
365 if (
sv[
k].getADCOverflow().size() !=
cv[
i].getADCOverflow().size()) {
366 std::cout <<
"In detId: " <<
s->first << std::endl;
367 std::cout <<
"ADC Overflows not of equal size!" << std::endl;
368 std::cout <<
sv[
k].getADCOverflow().size() <<
' ' <<
cv[
i].getADCOverflow().size() << std::endl;
370 std::vector<uint16_t> sADC =
sv[
k].getADCOverflow();
371 std::vector<uint16_t> uADC =
cv[
i].getADCOverflow();
373 for (
unsigned iadc = 0; iadc < sADC.size(); ++iadc)
374 if (sADC[iadc] != uADC[iadc]) {
375 std::cout <<
"In detId: " <<
s->first << std::endl;
376 std::cout <<
"ADC overflows not equal at index: " << iadc << std::endl
377 << std::hex << sADC[iadc] <<
" != " << uADC[iadc] <<
std::dec << std::endl;
380 if (
sv[
k].getOverlappedSample().size() !=
cv[
i].getOverlappedSample().size()) {
381 std::cout <<
"In detId: " <<
s->first << std::endl;
382 std::cout <<
"Overlapped Samples not of equal size!" << std::endl;
383 std::cout <<
sv[
k].getOverlappedSample().size() <<
' ' <<
cv[
i].getOverlappedSample().size() << std::endl;
385 std::vector<uint16_t> sADC =
sv[
k].getOverlappedSample();
386 std::vector<uint16_t> uADC =
cv[
i].getOverlappedSample();
388 for (
unsigned iadc = 0; iadc < sADC.size(); ++iadc)
389 if (sADC[iadc] != uADC[iadc]) {
390 std::cout <<
"In detId: " <<
s->first << std::endl;
391 std::cout <<
"Overlapped Samples not equal at index: " << iadc << std::endl
392 << std::hex << sADC[iadc] <<
" != " << uADC[iadc] <<
std::dec << std::endl;
395 if (
sv[
k].getErrorstat().size() !=
cv[
i].getErrorstat().size()) {
396 std::cout <<
"In detId: " <<
s->first << std::endl;
397 std::cout <<
"Errorstat not of equal size!" << std::endl;
398 std::cout <<
sv[
k].getErrorstat().size() <<
' ' <<
cv[
i].getErrorstat().size() << std::endl;
400 std::vector<uint16_t> sADC =
sv[
k].getErrorstat();
401 std::vector<uint16_t> uADC =
cv[
i].getErrorstat();
403 for (
unsigned iadc = 0; iadc < sADC.size(); ++iadc)
404 if (sADC[iadc] != uADC[iadc]) {
405 std::cout <<
"In detId: " <<
s->first << std::endl;
406 std::cout <<
"Errorstat not equal at index: " << iadc << std::endl
407 << std::hex << sADC[iadc] <<
" != " << uADC[iadc] <<
std::dec << std::endl;
411 std::cout <<
"In detId: " <<
s->first << std::endl;
412 std::cout <<
"Pedestals not equal: " <<
sv[
k].pedestal() <<
" != " <<
cv[
i].pedestal() << std::endl;
415 std::cout <<
"In detId: " <<
s->first << std::endl;
416 std::cout <<
"Amplitudes not equal: " <<
sv[
k].amplitude() <<
" != " <<
cv[
i].amplitude() << std::endl;
420 for (
c = comps.begin();
c != comps.end(); ++
c) {
421 if (
c->second.first.size() !=
c->second.second.size()) {
422 std::cout <<
"Major error! # of comparator digis in detID: " <<
c->first
423 <<
" is not equal between sim and unpacked!" << std::endl;
426 std::vector<CSCComparatorDigi>
a =
c->second.second;
427 std::vector<CSCComparatorDigi>
b =
c->second.first;
429 for (std::vector<CSCComparatorDigi>::const_iterator
i =
a.begin();
i !=
a.end(); ++
i)
431 std::cout <<
"UNPACKER OUTPUT:" << std::endl;
432 for (std::vector<CSCComparatorDigi>::const_iterator
i =
b.begin();
i !=
b.end(); ++
i)
435 int max =
std::min(
c->second.first.size(),
c->second.second.size());
436 std::vector<CSCComparatorDigi>
cv =
c->second.first;
437 std::vector<CSCComparatorDigi>
sv =
c->second.second;
438 for (
int i = 0;
i <
max; ++
i) {
439 if (
sv[
i].getStrip() !=
cv[
i].getStrip()) {
440 std::cout <<
"In detId: " <<
s->first << std::endl;
441 std::cout <<
"Comparator strips do not match: " <<
sv[
i].getStrip() <<
" != " <<
cv[
i].getStrip() << std::endl;
443 if (
sv[
i].getComparator() !=
cv[
i].getComparator()) {
444 std::cout <<
"In detId: " <<
c->first << std::endl;
445 std::cout <<
"Comparators do not match: " <<
sv[
i].getComparator() <<
" != " <<
cv[
i].getComparator()
448 if (
sv[
i].getTimeBinWord() !=
cv[
i].getTimeBinWord()) {
449 std::cout <<
"In detId: " <<
c->first << std::endl;
450 std::cout <<
"Comparator time bins words do not match: " <<
sv[
i].getTimeBinWord()
451 <<
" != " <<
cv[
i].getTimeBinWord() << std::endl;
455 for (
cl = clcts.begin();
cl != clcts.end(); ++
cl) {
456 if (
cl->second.first.size() !=
cl->second.second.size()) {
457 std::cout <<
"Major error! # of CLCT digis in detID: " <<
cl->first <<
" is not equal between sim and unpacked!"
461 std::vector<CSCCLCTDigi>
a =
cl->second.second;
462 std::vector<CSCCLCTDigi>
b =
cl->second.first;
464 for (std::vector<CSCCLCTDigi>::const_iterator
i =
a.begin();
i !=
a.end(); ++
i)
466 std::cout <<
"UNPACKER OUTPUT:" << std::endl;
467 for (std::vector<CSCCLCTDigi>::const_iterator
i =
b.begin();
i !=
b.end(); ++
i)
471 std::vector<CSCCLCTDigi>
cv =
cl->second.first;
472 std::vector<CSCCLCTDigi>
sv =
cl->second.second;
473 for (
int i = 0;
i <
max; ++
i) {
474 if (
cv[
i].getKeyStrip() !=
sv[
i].getKeyStrip()) {
475 std::cout <<
"In detId: " <<
cl->first << std::endl;
476 std::cout <<
"CLCT key strips do not match: " <<
sv[
i].getKeyStrip() <<
" != " <<
cv[
i].getKeyStrip()
479 if (
cv[
i].getStrip() !=
sv[
i].getStrip()) {
480 std::cout <<
"In detId: " <<
cl->first << std::endl;
481 std::cout <<
"CLCT strips do not match: " <<
sv[
i].getStrip() <<
" != " <<
cv[
i].getStrip() << std::endl;
483 if (
cv[
i].isValid() !=
sv[
i].isValid()) {
484 std::cout <<
"In detId: " <<
cl->first << std::endl;
485 std::cout <<
"CLCT Valid bits do not match: " <<
sv[
i].isValid() <<
" != " <<
cv[
i].isValid() << std::endl;
487 if (
cv[
i].getQuality() !=
sv[
i].getQuality()) {
488 std::cout <<
"In detId: " <<
cl->first << std::endl;
489 std::cout <<
"CLCT qualities do not match: " <<
sv[
i].getQuality() <<
" != " <<
cv[
i].getQuality() << std::endl;
491 if (
cv[
i].getPattern() !=
sv[
i].getPattern()) {
492 std::cout <<
"In detId: " <<
cl->first << std::endl;
493 std::cout <<
"CLCT patterns do not match: " <<
sv[
i].getPattern() <<
" != " <<
cv[
i].getPattern() << std::endl;
495 if (
cv[
i].getStripType() !=
sv[
i].getStripType()) {
496 std::cout <<
"In detId: " <<
cl->first << std::endl;
497 std::cout <<
"CLCT strip types do not match: " <<
sv[
i].getStripType() <<
" != " <<
cv[
i].getStripType()
500 if (
cv[
i].getBend() !=
sv[
i].getBend()) {
501 std::cout <<
"In detId: " <<
cl->first << std::endl;
502 std::cout <<
"CLCT bends do not match: " <<
sv[
i].getBend() <<
" != " <<
cv[
i].getBend() << std::endl;
504 if (
cv[
i].getCFEB() !=
sv[
i].getCFEB()) {
505 std::cout <<
"In detId: " <<
cl->first << std::endl;
506 std::cout <<
"CLCT CFEBs do not match: " <<
sv[
i].getCFEB() <<
" != " <<
cv[
i].getCFEB() << std::endl;
508 if (((
short)
cv[
i].getBX()) != ((
short)
sv[
i].getBX()) - 4) {
509 std::cout <<
"In detId: " <<
cl->first << std::endl;
510 std::cout <<
"CLCT BX do not match: " <<
sv[
i].getBX() - 4 <<
" != " <<
cv[
i].getBX() << std::endl;
512 if (
cv[
i].getFullBX() !=
sv[
i].getFullBX()) {
513 std::cout <<
"In detId: " <<
cl->first << std::endl;
514 std::cout <<
"CLCT Full BX do not match: " <<
sv[
i].getFullBX() <<
" != " <<
cv[
i].getFullBX() << std::endl;
516 if (
cv[
i].getTrknmb() !=
sv[
i].getTrknmb()) {
517 std::cout <<
"In detId: " <<
cl->first << std::endl;
518 std::cout <<
"CLCT Track numbers do not match: " <<
sv[
i].getTrknmb() <<
" != " <<
cv[
i].getTrknmb()
523 for (al = alcts.begin(); al != alcts.end(); ++al) {
524 if (al->second.first.size() != al->second.second.size()) {
525 std::cout <<
"Major error! # of ALCT digis in detID: " << al->first <<
" is not equal between sim and unpacked!"
529 std::vector<CSCALCTDigi>
a = al->second.second;
530 std::vector<CSCALCTDigi>
b = al->second.first;
532 for (std::vector<CSCALCTDigi>::const_iterator
i =
a.begin();
i !=
a.end(); ++
i)
534 std::cout <<
"UNPACKER OUTPUT:" << std::endl;
535 for (std::vector<CSCALCTDigi>::const_iterator
i =
b.begin();
i !=
b.end(); ++
i)
538 int max =
std::min(al->second.first.size(), al->second.second.size());
539 std::vector<CSCALCTDigi>
cv = al->second.first;
540 std::vector<CSCALCTDigi>
sv = al->second.second;
541 for (
int i = 0;
i <
max; ++
i) {
542 if (
cv[
i].getKeyWG() !=
sv[
i].getKeyWG()) {
543 std::cout <<
"In detId: " << al->first << std::endl;
544 std::cout <<
"ALCT key wire groups do not match: " <<
sv[
i].getKeyWG() <<
" != " <<
cv[
i].getKeyWG()
547 if (
cv[
i].isValid() !=
sv[
i].isValid()) {
548 std::cout <<
"In detId: " << al->first << std::endl;
549 std::cout <<
"ALCT Valid bits do not match: " <<
sv[
i].isValid() <<
" != " <<
cv[
i].isValid() << std::endl;
551 if (
cv[
i].getQuality() !=
sv[
i].getQuality()) {
552 std::cout <<
"In detId: " << al->first << std::endl;
553 std::cout <<
"ALCT qualities do not match: " <<
sv[
i].getQuality() <<
" != " <<
cv[
i].getQuality() << std::endl;
555 if (
cv[
i].getAccelerator() !=
sv[
i].getAccelerator()) {
556 std::cout <<
"In detId: " << al->first << std::endl;
557 std::cout <<
"ALCT accelerator bits do not match: " <<
sv[
i].getAccelerator()
558 <<
" != " <<
cv[
i].getAccelerator() << std::endl;
560 if (
cv[
i].getCollisionB() !=
sv[
i].getCollisionB()) {
561 std::cout <<
"In detId: " << al->first << std::endl;
562 std::cout <<
"ALCT CollisionB flags do not match: " <<
sv[
i].getCollisionB() <<
" != " <<
cv[
i].getCollisionB()
565 if ((
cv[
i].getBX()) != (
sv[
i].getBX())) {
566 std::cout <<
"In detId: " << al->first << std::endl;
567 std::cout <<
"ALCT BX do not match: " <<
sv[
i].getBX() <<
" != " <<
cv[
i].getBX() << std::endl;
569 if (
cv[
i].getFullBX() !=
sv[
i].getFullBX()) {
570 std::cout <<
"In detId: " <<
cl->first << std::endl;
571 std::cout <<
"ALCT Full BX do not match: " <<
sv[
i].getFullBX() <<
" != " <<
cv[
i].getFullBX() << std::endl;
575 for (lc = lcts.begin(); lc != lcts.end(); ++lc) {
576 if (lc->second.first.size() != lc->second.second.size()) {
577 std::cout <<
"Major error! # of Correlated LCT digis in detID: " << lc->first
578 <<
" is not equal between sim and unpacked!" << std::endl;
581 std::vector<CSCCorrelatedLCTDigi>
a = lc->second.second;
582 std::vector<CSCCorrelatedLCTDigi>
b = lc->second.first;
584 for (std::vector<CSCCorrelatedLCTDigi>::const_iterator
i =
a.begin();
i !=
a.end(); ++
i)
586 std::cout <<
"UNPACKER OUTPUT:" << std::endl;
587 for (std::vector<CSCCorrelatedLCTDigi>::const_iterator
i =
b.begin();
i !=
b.end(); ++
i)
590 int max =
std::min(lc->second.first.size(), lc->second.second.size());
591 std::vector<CSCCorrelatedLCTDigi>
cv = lc->second.first;
592 std::vector<CSCCorrelatedLCTDigi>
sv = lc->second.second;
593 for (
int i = 0;
i <
max; ++
i) {
594 if (
cv[
i].getStrip() !=
sv[
i].getStrip()) {
595 std::cout <<
"In detId: " << lc->first << std::endl;
596 std::cout <<
"Correlated LCT strips do not match: " <<
sv[
i].getStrip() <<
" != " <<
cv[
i].getStrip()
599 if (
cv[
i].getKeyWG() !=
sv[
i].getKeyWG()) {
600 std::cout <<
"In detId: " << lc->first << std::endl;
601 std::cout <<
"Correlated LCT key wire groups do not match: " <<
sv[
i].getKeyWG() <<
" != " <<
cv[
i].getKeyWG()
604 if (
cv[
i].isValid() !=
sv[
i].isValid()) {
605 std::cout <<
"In detId: " << lc->first << std::endl;
606 std::cout <<
"Correlated LCT Valid bits do not match: " <<
sv[
i].isValid() <<
" != " <<
cv[
i].isValid()
609 if (
cv[
i].getQuality() !=
sv[
i].getQuality()) {
610 std::cout <<
"In detId: " << lc->first << std::endl;
611 std::cout <<
"Correlated LCT qualities do not match: " <<
sv[
i].getQuality() <<
" != " <<
cv[
i].getQuality()
614 if (
cv[
i].getPattern() !=
sv[
i].getPattern()) {
615 std::cout <<
"In detId: " << lc->first << std::endl;
616 std::cout <<
"Correlated LCT ALCT patterns do not match: " <<
sv[
i].getPattern() <<
" != " <<
cv[
i].getPattern()
619 if (
cv[
i].getCLCTPattern() !=
sv[
i].getCLCTPattern()) {
620 std::cout <<
"In detId: " << lc->first << std::endl;
621 std::cout <<
"Correlated LCT CLCT patterns do not match: " <<
sv[
i].getCLCTPattern()
622 <<
" != " <<
cv[
i].getCLCTPattern() << std::endl;
624 if (
cv[
i].getStripType() !=
sv[
i].getStripType()) {
625 std::cout <<
"In detId: " << lc->first << std::endl;
626 std::cout <<
"Correlated LCT strip types do not match: " <<
sv[
i].getStripType()
627 <<
" != " <<
cv[
i].getStripType() << std::endl;
629 if (
cv[
i].getBend() !=
sv[
i].getBend()) {
630 std::cout <<
"In detId: " << lc->first << std::endl;
631 std::cout <<
"Correlated LCT bends do not match: " <<
sv[
i].getBend() <<
" != " <<
cv[
i].getBend() << std::endl;
633 if (
cv[
i].getMPCLink() !=
sv[
i].getMPCLink()) {
634 std::cout <<
"In detId: " << lc->first << std::endl;
635 std::cout <<
"Correlated LCT MPC Links do not match: " <<
sv[
i].getMPCLink() <<
" != " <<
cv[
i].getMPCLink()
638 if ((
cv[
i].getBX()) != (
sv[
i].getBX() - 6)) {
639 std::cout <<
"In detId: " << lc->first << std::endl;
640 std::cout <<
"Correlated LCT BX do not match: " <<
sv[
i].getBX() - 6 <<
" != " <<
cv[
i].getBX() << std::endl;
642 if (
cv[
i].getCSCID() !=
sv[
i].getCSCID()) {
643 std::cout <<
"In detId: " << lc->first << std::endl;
644 std::cout <<
"Correlated LCT CSCIDs do not match: " <<
sv[
i].getCSCID() <<
" != " <<
cv[
i].getCSCID()
647 if (
cv[
i].getBX0() !=
sv[
i].getBX0()) {
648 std::cout <<
"In detId: " << lc->first << std::endl;
649 std::cout <<
"Correlated LCT BX0s do not match: " <<
sv[
i].getBX0() <<
" != " <<
cv[
i].getBX0() << std::endl;
651 if (
cv[
i].getSyncErr() !=
sv[
i].getSyncErr()) {
652 std::cout <<
"In detId: " << lc->first << std::endl;
653 std::cout <<
"Correlated LCT SyncErrs do not match: " <<
sv[
i].getSyncErr() <<
" != " <<
cv[
i].getSyncErr()
656 if (
cv[
i].getTrknmb() !=
sv[
i].getTrknmb()) {
657 std::cout <<
"In detId: " << lc->first << std::endl;
658 std::cout <<
"Correlated LCT Track numbers do not match: " <<
sv[
i].getTrknmb() <<
" != " <<
cv[
i].getTrknmb()
663 if (
tracks.get().size() != simtracks.
get().size()) {
664 std::cout <<
"Major error! # of L1 Tracks is not equal between sim and unpacked!" << std::endl;
665 std::vector<csc::L1Track>
a = simtracks.
get();
666 std::vector<csc::L1Track>
b =
tracks.get();
668 for (std::vector<csc::L1Track>::const_iterator
i =
a.begin();
i !=
a.end(); ++
i)
670 std::cout <<
"UNPACKER OUTPUT:" << std::endl;
671 for (std::vector<csc::L1Track>::const_iterator
i =
b.begin();
i !=
b.end(); ++
i)
682 std::vector<CSCWireDigi>::const_iterator
e) {
683 typedef std::map<int, std::vector<CSCWireDigi> > wire2digi;
685 std::vector<CSCWireDigi> _r;
688 for (std::vector<CSCWireDigi>::const_iterator
i =
b;
i !=
e; ++
i)
689 _wr2digis[
i->getWireGroup()].push_back(*
i);
691 for (wire2digi::const_iterator
i = _wr2digis.begin();
i != _wr2digis.end(); ++
i) {
695 for (std::vector<CSCWireDigi>::const_iterator
d =
i->second.begin();
d !=
i->second.end(); ++
d) {
696 std::vector<int> binson =
d->getTimeBinsOn();
697 for (std::vector<int>::const_iterator
t = binson.begin();
t != binson.end(); ++
t)
709 std::vector<CSCStripDigi>::const_iterator
b,
710 std::vector<CSCStripDigi>::const_iterator
e) {
711 std::vector<CSCStripDigi> _r;
717 for (std::vector<CSCStripDigi>::const_iterator
i =
b;
i !=
e; ++
i) {
718 int strip =
i->getStrip();
725 CSCStripDigi(
strip,
i->getADCCounts(),
i->getADCOverflow(),
i->getOverlappedSample(),
i->getErrorstat()));
732 std::vector<CSCComparatorDigi>::const_iterator
b,
733 std::vector<CSCComparatorDigi>::const_iterator
e) {
734 std::vector<CSCComparatorDigi> _r;
740 for (std::vector<CSCComparatorDigi>::const_iterator
i =
b;
i !=
e; ++
i) {
741 int strip =
i->getStrip();
754 std::vector<CSCStripDigi>::const_iterator
e) {
755 std::vector<CSCStripDigi> _r;
761 std::vector<CSCStripDigi>::const_iterator
e) {
762 std::vector<CSCStripDigi> _r;
765 for (std::vector<CSCStripDigi>::const_iterator
i =
b;
i !=
e; ++
i) {
768 for (std::vector<int>::const_iterator
a =
counts.begin();
a !=
counts.end(); ++
a)
781 std::vector<CSCComparatorDigi>::const_iterator
e) {
782 std::vector<CSCComparatorDigi> _r;
784 for (std::vector<CSCComparatorDigi>::const_iterator
i =
b;
i !=
e; ++
i) {
785 bool present =
false;
787 if (
i->getTimeBin() < 10)