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();
114 std::vector<csctf::TrackStub>::const_iterator
dt = _dt->get().begin(), sdt = _sdt->get().begin();
122 matchingDetWireCollection
wires;
123 matchingDetStripCollection
strips;
124 matchingDetComparatorCollection comps;
125 matchingDetCLCTCollection clcts;
126 matchingDetALCTCollection alcts;
127 matchingDetLCTCollection lcts, trackstubs;
131 for (; wi != _wi->end(); ++wi) {
133 std::vector<CSCWireDigi>::iterator beg = wires[(*wi).first].first.end();
134 wires[(*wi).first].first.insert(beg, b,
e);
136 for (; swi != _swi->end(); ++swi) {
140 if ((*swi).first.ring() == 4)
141 _id =
CSCDetId((*swi).first.endcap(), (*swi).first.station(), 1, (*swi).first.chamber(), (*swi).first.layer());
143 std::vector<CSCWireDigi>::iterator beg = wires[
_id].second.end();
145 wires[
_id].second.insert(beg, b,
e);
151 for (; st != _st->end(); ++st) {
153 std::vector<CSCStripDigi>::iterator beg = strips[(*st).first].first.end();
158 strips[(*st).first].first.insert(beg, zs.begin(), zs.end());
160 for (; sst != _sst->end(); ++sst) {
168 std::vector<CSCStripDigi>::iterator beg = strips[
_id].second.end();
172 strips[
_id].second.insert(beg, relab.begin(), relab.end());
177 for (; cmp != _cmp->end(); ++
cmp) {
179 std::vector<CSCComparatorDigi>::iterator beg = comps[(*cmp).first].first.end();
181 comps[(*cmp).first].first.insert(beg, b,
e);
183 for (; scmp != _scmp->end(); ++scmp) {
187 if ((*scmp).first.ring() == 4)
189 CSCDetId((*scmp).first.endcap(), (*scmp).first.station(), 1, (*scmp).first.chamber(), (*scmp).first.layer());
191 std::vector<CSCComparatorDigi>::iterator beg = comps[
_id].second.begin();
193 if ((*scmp).first.ring() == 4)
194 beg = comps[_id].
second.end();
198 std::vector<CSCComparatorDigi> relab =
relabelCompDigis(theMapping, (*scmp).first, zs.begin(), zs.end());
200 comps[
_id].second.insert(beg, relab.begin(), relab.end());
204 for (; clct != _clct->end(); ++clct) {
206 std::vector<CSCCLCTDigi>::iterator beg = clcts[(*clct).first].first.end();
208 clcts[(*clct).first].first.insert(beg, b,
e);
210 for (; sclct != _sclct->end(); ++sclct) {
214 if ((*sclct).first.ring() == 4)
216 (*sclct).first.endcap(), (*sclct).first.station(), 1, (*sclct).first.chamber(), (*sclct).first.layer());
218 std::vector<CSCCLCTDigi>::iterator beg = clcts[
_id].second.begin();
220 if ((*sclct).first.ring() == 4)
221 beg = clcts[_id].
second.end();
223 clcts[
_id].second.insert(beg, b,
e);
227 for (; alct != _alct->end(); ++alct) {
229 std::vector<CSCALCTDigi>::iterator beg = alcts[(*alct).first].first.end();
231 alcts[(*alct).first].first.insert(beg, b,
e);
233 for (; salct != _salct->end(); ++salct) {
237 if ((*salct).first.ring() == 4)
239 (*salct).first.endcap(), (*salct).first.station(), 1, (*salct).first.chamber(), (*salct).first.layer());
241 std::vector<CSCALCTDigi>::iterator beg = alcts[
_id].second.begin();
243 if ((*salct).first.ring() == 4)
244 beg = alcts[_id].
second.end();
246 alcts[
_id].second.insert(beg, b,
e);
250 for (; lct != _lct->end(); ++lct) {
252 std::vector<CSCCorrelatedLCTDigi>::iterator beg = lcts[(*lct).first].first.end();
254 lcts[(*lct).first].first.insert(beg, b,
e);
256 for (; slct != _slct->end(); ++slct) {
260 if ((*slct).first.ring() == 4)
262 CSCDetId((*slct).first.endcap(), (*slct).first.station(), 1, (*slct).first.chamber(), (*slct).first.layer());
264 std::vector<CSCCorrelatedLCTDigi>::iterator beg = lcts[
_id].second.begin();
266 if ((*slct).first.ring() == 4)
267 beg = lcts[_id].
second.end();
269 lcts[
_id].second.insert(beg, b,
e);
272 for (; trk != _trk->end(); ++trk) {
275 for (; strk != _strk->end(); ++strk) {
280 matchingDetWireCollection::const_iterator
w;
281 matchingDetStripCollection::const_iterator
s;
282 matchingDetComparatorCollection::const_iterator
c;
283 matchingDetCLCTCollection::const_iterator
cl;
284 matchingDetALCTCollection::const_iterator al;
285 matchingDetLCTCollection::const_iterator lc;
287 for (w = wires.begin(); w != wires.end(); ++
w) {
288 if (w->second.first.size() != w->second.second.size()) {
289 std::cout <<
"Major error! # of wire digis in detID: " << w->first <<
" is not equal between sim and unpacked!" 293 std::vector<CSCWireDigi>
a = w->second.second;
294 std::vector<CSCWireDigi>
b = w->second.first;
296 for (std::vector<CSCWireDigi>::const_iterator
i = a.begin();
i != a.end(); ++
i)
298 std::cout <<
"UNPACKER OUTPUT:" << std::endl;
299 for (std::vector<CSCWireDigi>::const_iterator
i = b.begin();
i != b.end(); ++
i)
302 int max =
std::min(w->second.first.size(), w->second.second.size());
303 std::vector<CSCWireDigi>
cv = w->second.first;
304 std::vector<CSCWireDigi>
sv = w->second.second;
305 for (
int i = 0;
i <
max; ++
i) {
306 if (sv[
i].getWireGroup() != cv[
i].getWireGroup()) {
307 std::cout <<
"In detId: " << w->first << std::endl;
308 std::cout <<
"Wire Groups do not match: " << sv[
i].getWireGroup() <<
" != " << cv[
i].getWireGroup()
311 if (sv[
i].getTimeBin() != cv[
i].getTimeBin()) {
312 std::cout <<
"In detId: " << w->first << std::endl;
313 std::cout <<
"First Time Bins do not match: " << sv[
i].getTimeBin() <<
" != " << cv[
i].getTimeBin()
316 if (sv[
i].getTimeBinWord() != cv[
i].getTimeBinWord()) {
317 std::cout <<
"In detId: " << w->first << std::endl;
318 std::cout <<
"Time Bin Words do not match: " << sv[
i].getTimeBinWord() <<
" != " << cv[
i].getTimeBinWord()
323 for (s = strips.begin(); s != strips.end(); ++
s) {
324 if (s->second.first.size() != s->second.second.size()) {
325 std::cout <<
"Major error! # of strip digis in detID: " << s->first <<
" is not equal between sim and unpacked!" 329 std::vector<CSCStripDigi>
a = s->second.second;
330 std::vector<CSCStripDigi>
b = s->second.first;
332 for (std::vector<CSCStripDigi>::const_iterator
i = a.begin();
i != a.end(); ++
i)
334 std::cout <<
"UNPACKER OUTPUT:" << std::endl;
335 for (std::vector<CSCStripDigi>::const_iterator
i = b.begin();
i != b.end(); ++
i)
338 int max =
std::min(s->second.first.size(), s->second.second.size());
339 std::vector<CSCStripDigi>
cv = s->second.first;
340 std::vector<CSCStripDigi>
sv = s->second.second;
341 for (
int i = 0;
i <
max; ++
i) {
342 bool me1a = s->first.station() == 1 && s->first.ring() == 4;
343 bool me1b = s->first.station() == 1 && s->first.ring() == 1;
344 bool zplus = s->first.endcap() == 1;
352 if (sv[k].getStrip() != cv[i].getStrip()) {
353 std::cout <<
"In detId: " << s->first << std::endl;
354 std::cout <<
"Strips do not match: " << sv[
k].getStrip() <<
" != " << cv[
i].getStrip() << std::endl;
356 if (sv[k].getADCCounts().
size() != cv[i].getADCCounts().
size()) {
357 std::cout <<
"In detId: " << s->first << std::endl;
358 std::cout <<
"ADC Readouts not of equal size!" << std::endl;
359 std::cout << sv[
k].getADCCounts().size() <<
' ' << cv[
i].getADCCounts().size() << std::endl;
361 std::vector<int> sADC = sv[
k].getADCCounts();
362 std::vector<int> uADC = cv[
i].getADCCounts();
364 for (
unsigned iadc = 0; iadc < sADC.size(); ++iadc)
365 if (sADC[iadc] != uADC[iadc]) {
366 std::cout <<
"In detId: " << s->first << std::endl;
367 std::cout <<
"ADC counts not equal at index: " << iadc << std::endl
368 << std::hex << sADC[iadc] <<
" != " << uADC[iadc] <<
std::dec << std::endl;
371 if (sv[k].getADCOverflow().size() != cv[
i].getADCOverflow().size()) {
372 std::cout <<
"In detId: " << s->first << std::endl;
373 std::cout <<
"ADC Overflows not of equal size!" << std::endl;
374 std::cout << sv[
k].getADCOverflow().size() <<
' ' << cv[
i].getADCOverflow().size() << std::endl;
376 std::vector<uint16_t> sADC = sv[
k].getADCOverflow();
377 std::vector<uint16_t> uADC = cv[
i].getADCOverflow();
379 for (
unsigned iadc = 0; iadc < sADC.size(); ++iadc)
380 if (sADC[iadc] != uADC[iadc]) {
381 std::cout <<
"In detId: " << s->first << std::endl;
382 std::cout <<
"ADC overflows not equal at index: " << iadc << std::endl
383 << std::hex << sADC[iadc] <<
" != " << uADC[iadc] <<
std::dec << std::endl;
386 if (sv[k].getOverlappedSample().size() != cv[
i].getOverlappedSample().size()) {
387 std::cout <<
"In detId: " << s->first << std::endl;
388 std::cout <<
"Overlapped Samples not of equal size!" << std::endl;
389 std::cout << sv[
k].getOverlappedSample().size() <<
' ' << cv[
i].getOverlappedSample().size() << std::endl;
391 std::vector<uint16_t> sADC = sv[
k].getOverlappedSample();
392 std::vector<uint16_t> uADC = cv[
i].getOverlappedSample();
394 for (
unsigned iadc = 0; iadc < sADC.size(); ++iadc)
395 if (sADC[iadc] != uADC[iadc]) {
396 std::cout <<
"In detId: " << s->first << std::endl;
397 std::cout <<
"Overlapped Samples not equal at index: " << iadc << std::endl
398 << std::hex << sADC[iadc] <<
" != " << uADC[iadc] <<
std::dec << std::endl;
401 if (sv[k].getErrorstat().size() != cv[
i].getErrorstat().size()) {
402 std::cout <<
"In detId: " << s->first << std::endl;
403 std::cout <<
"Errorstat not of equal size!" << std::endl;
404 std::cout << sv[
k].getErrorstat().size() <<
' ' << cv[
i].getErrorstat().size() << std::endl;
406 std::vector<uint16_t> sADC = sv[
k].getErrorstat();
407 std::vector<uint16_t> uADC = cv[
i].getErrorstat();
409 for (
unsigned iadc = 0; iadc < sADC.size(); ++iadc)
410 if (sADC[iadc] != uADC[iadc]) {
411 std::cout <<
"In detId: " << s->first << std::endl;
412 std::cout <<
"Errorstat not equal at index: " << iadc << std::endl
413 << std::hex << sADC[iadc] <<
" != " << uADC[iadc] <<
std::dec << std::endl;
416 if (sv[k].
pedestal() != cv[
i].pedestal()) {
417 std::cout <<
"In detId: " << s->first << std::endl;
418 std::cout <<
"Pedestals not equal: " << sv[
k].pedestal() <<
" != " << cv[
i].pedestal() << std::endl;
421 std::cout <<
"In detId: " << s->first << std::endl;
422 std::cout <<
"Amplitudes not equal: " << sv[
k].amplitude() <<
" != " << cv[
i].amplitude() << std::endl;
426 for (c = comps.begin(); c != comps.end(); ++
c) {
427 if (c->second.first.size() != c->second.second.size()) {
428 std::cout <<
"Major error! # of comparator digis in detID: " << c->first
429 <<
" is not equal between sim and unpacked!" << std::endl;
432 std::vector<CSCComparatorDigi>
a = c->second.second;
433 std::vector<CSCComparatorDigi>
b = c->second.first;
435 for (std::vector<CSCComparatorDigi>::const_iterator
i = a.begin();
i != a.end(); ++
i)
437 std::cout <<
"UNPACKER OUTPUT:" << std::endl;
438 for (std::vector<CSCComparatorDigi>::const_iterator
i = b.begin();
i != b.end(); ++
i)
441 int max =
std::min(c->second.first.size(), c->second.second.size());
442 std::vector<CSCComparatorDigi>
cv = c->second.first;
443 std::vector<CSCComparatorDigi>
sv = c->second.second;
444 for (
int i = 0;
i <
max; ++
i) {
445 if (sv[
i].getStrip() != cv[
i].getStrip()) {
446 std::cout <<
"In detId: " << s->first << std::endl;
447 std::cout <<
"Comparator strips do not match: " << sv[
i].getStrip() <<
" != " << cv[
i].getStrip() << std::endl;
449 if (sv[
i].getComparator() != cv[
i].getComparator()) {
450 std::cout <<
"In detId: " << c->first << std::endl;
451 std::cout <<
"Comparators do not match: " << sv[
i].getComparator() <<
" != " << cv[
i].getComparator()
454 if (sv[
i].getTimeBinWord() != cv[
i].getTimeBinWord()) {
455 std::cout <<
"In detId: " << c->first << std::endl;
456 std::cout <<
"Comparator time bins words do not match: " << sv[
i].getTimeBinWord()
457 <<
" != " << cv[
i].getTimeBinWord() << std::endl;
461 for (cl = clcts.begin(); cl != clcts.end(); ++
cl) {
462 if (cl->second.first.size() != cl->second.second.size()) {
463 std::cout <<
"Major error! # of CLCT digis in detID: " << cl->first <<
" is not equal between sim and unpacked!" 467 std::vector<CSCCLCTDigi>
a = cl->second.second;
468 std::vector<CSCCLCTDigi>
b = cl->second.first;
470 for (std::vector<CSCCLCTDigi>::const_iterator
i = a.begin();
i != a.end(); ++
i)
472 std::cout <<
"UNPACKER OUTPUT:" << std::endl;
473 for (std::vector<CSCCLCTDigi>::const_iterator
i = b.begin();
i != b.end(); ++
i)
476 int max =
std::min(cl->second.first.size(), cl->second.second.size());
477 std::vector<CSCCLCTDigi>
cv = cl->second.first;
478 std::vector<CSCCLCTDigi>
sv = cl->second.second;
479 for (
int i = 0;
i <
max; ++
i) {
480 if (cv[
i].getKeyStrip() != sv[
i].getKeyStrip()) {
481 std::cout <<
"In detId: " << cl->first << std::endl;
482 std::cout <<
"CLCT key strips do not match: " << sv[
i].getKeyStrip() <<
" != " << cv[
i].getKeyStrip()
485 if (cv[
i].getStrip() != sv[
i].getStrip()) {
486 std::cout <<
"In detId: " << cl->first << std::endl;
487 std::cout <<
"CLCT strips do not match: " << sv[
i].getStrip() <<
" != " << cv[
i].getStrip() << std::endl;
489 if (cv[
i].isValid() != sv[
i].isValid()) {
490 std::cout <<
"In detId: " << cl->first << std::endl;
491 std::cout <<
"CLCT Valid bits do not match: " << sv[
i].isValid() <<
" != " << cv[
i].isValid() << std::endl;
493 if (cv[
i].getQuality() != sv[
i].getQuality()) {
494 std::cout <<
"In detId: " << cl->first << std::endl;
495 std::cout <<
"CLCT qualities do not match: " << sv[
i].getQuality() <<
" != " << cv[
i].getQuality() << std::endl;
497 if (cv[
i].getPattern() != sv[
i].getPattern()) {
498 std::cout <<
"In detId: " << cl->first << std::endl;
499 std::cout <<
"CLCT patterns do not match: " << sv[
i].getPattern() <<
" != " << cv[
i].getPattern() << std::endl;
501 if (cv[
i].getStripType() != sv[
i].getStripType()) {
502 std::cout <<
"In detId: " << cl->first << std::endl;
503 std::cout <<
"CLCT strip types do not match: " << sv[
i].getStripType() <<
" != " << cv[
i].getStripType()
506 if (cv[
i].getBend() != sv[
i].getBend()) {
507 std::cout <<
"In detId: " << cl->first << std::endl;
508 std::cout <<
"CLCT bends do not match: " << sv[
i].getBend() <<
" != " << cv[
i].getBend() << std::endl;
510 if (cv[
i].getCFEB() != sv[
i].getCFEB()) {
511 std::cout <<
"In detId: " << cl->first << std::endl;
512 std::cout <<
"CLCT CFEBs do not match: " << sv[
i].getCFEB() <<
" != " << cv[
i].getCFEB() << std::endl;
514 if (((
short)cv[
i].getBX()) != ((
short)sv[
i].getBX()) - 4) {
515 std::cout <<
"In detId: " << cl->first << std::endl;
516 std::cout <<
"CLCT BX do not match: " << sv[
i].getBX() - 4 <<
" != " << cv[
i].getBX() << std::endl;
518 if (cv[
i].getFullBX() != sv[
i].getFullBX()) {
519 std::cout <<
"In detId: " << cl->first << std::endl;
520 std::cout <<
"CLCT Full BX do not match: " << sv[
i].getFullBX() <<
" != " << cv[
i].getFullBX() << std::endl;
522 if (cv[
i].getTrknmb() != sv[
i].getTrknmb()) {
523 std::cout <<
"In detId: " << cl->first << std::endl;
524 std::cout <<
"CLCT Track numbers do not match: " << sv[
i].getTrknmb() <<
" != " << cv[
i].getTrknmb()
529 for (al = alcts.begin(); al != alcts.end(); ++al) {
530 if (al->second.first.size() != al->second.second.size()) {
531 std::cout <<
"Major error! # of ALCT digis in detID: " << al->first <<
" is not equal between sim and unpacked!" 535 std::vector<CSCALCTDigi>
a = al->second.second;
536 std::vector<CSCALCTDigi>
b = al->second.first;
538 for (std::vector<CSCALCTDigi>::const_iterator
i = a.begin();
i != a.end(); ++
i)
540 std::cout <<
"UNPACKER OUTPUT:" << std::endl;
541 for (std::vector<CSCALCTDigi>::const_iterator
i = b.begin();
i != b.end(); ++
i)
544 int max =
std::min(al->second.first.size(), al->second.second.size());
545 std::vector<CSCALCTDigi>
cv = al->second.first;
546 std::vector<CSCALCTDigi>
sv = al->second.second;
547 for (
int i = 0;
i <
max; ++
i) {
548 if (cv[
i].getKeyWG() != sv[
i].getKeyWG()) {
549 std::cout <<
"In detId: " << al->first << std::endl;
550 std::cout <<
"ALCT key wire groups do not match: " << sv[
i].getKeyWG() <<
" != " << cv[
i].getKeyWG()
553 if (cv[
i].isValid() != sv[
i].isValid()) {
554 std::cout <<
"In detId: " << al->first << std::endl;
555 std::cout <<
"ALCT Valid bits do not match: " << sv[
i].isValid() <<
" != " << cv[
i].isValid() << std::endl;
557 if (cv[
i].getQuality() != sv[
i].getQuality()) {
558 std::cout <<
"In detId: " << al->first << std::endl;
559 std::cout <<
"ALCT qualities do not match: " << sv[
i].getQuality() <<
" != " << cv[
i].getQuality() << std::endl;
561 if (cv[
i].getAccelerator() != sv[
i].getAccelerator()) {
562 std::cout <<
"In detId: " << al->first << std::endl;
563 std::cout <<
"ALCT accelerator bits do not match: " << sv[
i].getAccelerator()
564 <<
" != " << cv[
i].getAccelerator() << std::endl;
566 if (cv[
i].getCollisionB() != sv[
i].getCollisionB()) {
567 std::cout <<
"In detId: " << al->first << std::endl;
568 std::cout <<
"ALCT CollisionB flags do not match: " << sv[
i].getCollisionB() <<
" != " << cv[
i].getCollisionB()
571 if ((cv[
i].getBX()) != (sv[
i].getBX())) {
572 std::cout <<
"In detId: " << al->first << std::endl;
573 std::cout <<
"ALCT BX do not match: " << sv[
i].getBX() <<
" != " << cv[
i].getBX() << std::endl;
575 if (cv[
i].getFullBX() != sv[
i].getFullBX()) {
576 std::cout <<
"In detId: " << cl->first << std::endl;
577 std::cout <<
"ALCT Full BX do not match: " << sv[
i].getFullBX() <<
" != " << cv[
i].getFullBX() << std::endl;
581 for (lc = lcts.begin(); lc != lcts.end(); ++lc) {
582 if (lc->second.first.size() != lc->second.second.size()) {
583 std::cout <<
"Major error! # of Correlated LCT digis in detID: " << lc->first
584 <<
" is not equal between sim and unpacked!" << std::endl;
587 std::vector<CSCCorrelatedLCTDigi>
a = lc->second.second;
588 std::vector<CSCCorrelatedLCTDigi>
b = lc->second.first;
590 for (std::vector<CSCCorrelatedLCTDigi>::const_iterator
i = a.begin();
i != a.end(); ++
i)
592 std::cout <<
"UNPACKER OUTPUT:" << std::endl;
593 for (std::vector<CSCCorrelatedLCTDigi>::const_iterator
i = b.begin();
i != b.end(); ++
i)
596 int max =
std::min(lc->second.first.size(), lc->second.second.size());
597 std::vector<CSCCorrelatedLCTDigi>
cv = lc->second.first;
598 std::vector<CSCCorrelatedLCTDigi>
sv = lc->second.second;
599 for (
int i = 0;
i <
max; ++
i) {
600 if (cv[
i].getStrip() != sv[
i].getStrip()) {
601 std::cout <<
"In detId: " << lc->first << std::endl;
602 std::cout <<
"Correlated LCT strips do not match: " << sv[
i].getStrip() <<
" != " << cv[
i].getStrip()
605 if (cv[
i].getKeyWG() != sv[
i].getKeyWG()) {
606 std::cout <<
"In detId: " << lc->first << std::endl;
607 std::cout <<
"Correlated LCT key wire groups do not match: " << sv[
i].getKeyWG() <<
" != " << cv[
i].getKeyWG()
610 if (cv[
i].isValid() != sv[
i].isValid()) {
611 std::cout <<
"In detId: " << lc->first << std::endl;
612 std::cout <<
"Correlated LCT Valid bits do not match: " << sv[
i].isValid() <<
" != " << cv[
i].isValid()
615 if (cv[
i].getQuality() != sv[
i].getQuality()) {
616 std::cout <<
"In detId: " << lc->first << std::endl;
617 std::cout <<
"Correlated LCT qualities do not match: " << sv[
i].getQuality() <<
" != " << cv[
i].getQuality()
620 if (cv[
i].getPattern() != sv[
i].getPattern()) {
621 std::cout <<
"In detId: " << lc->first << std::endl;
622 std::cout <<
"Correlated LCT ALCT patterns do not match: " << sv[
i].getPattern() <<
" != " << cv[
i].getPattern()
625 if (cv[
i].getCLCTPattern() != sv[
i].getCLCTPattern()) {
626 std::cout <<
"In detId: " << lc->first << std::endl;
627 std::cout <<
"Correlated LCT CLCT patterns do not match: " << sv[
i].getCLCTPattern()
628 <<
" != " << cv[
i].getCLCTPattern() << std::endl;
630 if (cv[
i].getStripType() != sv[
i].getStripType()) {
631 std::cout <<
"In detId: " << lc->first << std::endl;
632 std::cout <<
"Correlated LCT strip types do not match: " << sv[
i].getStripType()
633 <<
" != " << cv[
i].getStripType() << std::endl;
635 if (cv[
i].getBend() != sv[
i].getBend()) {
636 std::cout <<
"In detId: " << lc->first << std::endl;
637 std::cout <<
"Correlated LCT bends do not match: " << sv[
i].getBend() <<
" != " << cv[
i].getBend() << std::endl;
639 if (cv[
i].getMPCLink() != sv[
i].getMPCLink()) {
640 std::cout <<
"In detId: " << lc->first << std::endl;
641 std::cout <<
"Correlated LCT MPC Links do not match: " << sv[
i].getMPCLink() <<
" != " << cv[
i].getMPCLink()
644 if ((cv[
i].getBX()) != (sv[
i].getBX() - 6)) {
645 std::cout <<
"In detId: " << lc->first << std::endl;
646 std::cout <<
"Correlated LCT BX do not match: " << sv[
i].getBX() - 6 <<
" != " << cv[
i].getBX() << std::endl;
648 if (cv[
i].getCSCID() != sv[
i].getCSCID()) {
649 std::cout <<
"In detId: " << lc->first << std::endl;
650 std::cout <<
"Correlated LCT CSCIDs do not match: " << sv[
i].getCSCID() <<
" != " << cv[
i].getCSCID()
653 if (cv[
i].getBX0() != sv[
i].getBX0()) {
654 std::cout <<
"In detId: " << lc->first << std::endl;
655 std::cout <<
"Correlated LCT BX0s do not match: " << sv[
i].getBX0() <<
" != " << cv[
i].getBX0() << std::endl;
657 if (cv[
i].getSyncErr() != sv[
i].getSyncErr()) {
658 std::cout <<
"In detId: " << lc->first << std::endl;
659 std::cout <<
"Correlated LCT SyncErrs do not match: " << sv[
i].getSyncErr() <<
" != " << cv[
i].getSyncErr()
662 if (cv[
i].getTrknmb() != sv[
i].getTrknmb()) {
663 std::cout <<
"In detId: " << lc->first << std::endl;
664 std::cout <<
"Correlated LCT Track numbers do not match: " << sv[
i].getTrknmb() <<
" != " << cv[
i].getTrknmb()
669 if (tracks.
get().size() != simtracks.
get().size()) {
670 std::cout <<
"Major error! # of L1 Tracks is not equal between sim and unpacked!" << std::endl;
671 std::vector<csc::L1Track>
a = simtracks.
get();
672 std::vector<csc::L1Track>
b = tracks.
get();
674 for (std::vector<csc::L1Track>::const_iterator
i = a.begin();
i != a.end(); ++
i)
676 std::cout <<
"UNPACKER OUTPUT:" << std::endl;
677 for (std::vector<csc::L1Track>::const_iterator
i = b.begin();
i != b.end(); ++
i)
688 std::vector<CSCWireDigi>::const_iterator
e) {
689 typedef std::map<int, std::vector<CSCWireDigi> > wire2digi;
691 std::vector<CSCWireDigi> _r;
694 for (std::vector<CSCWireDigi>::const_iterator
i = b;
i !=
e; ++
i)
695 _wr2digis[
i->getWireGroup()].push_back(*
i);
697 for (wire2digi::const_iterator
i = _wr2digis.begin();
i != _wr2digis.end(); ++
i) {
701 for (std::vector<CSCWireDigi>::const_iterator
d =
i->second.begin();
d !=
i->second.end(); ++
d) {
702 std::vector<int> binson =
d->getTimeBinsOn();
703 for (std::vector<int>::const_iterator
t = binson.begin();
t != binson.end(); ++
t)
715 std::vector<CSCStripDigi>::const_iterator
b,
716 std::vector<CSCStripDigi>::const_iterator
e) {
717 std::vector<CSCStripDigi> _r;
723 for (std::vector<CSCStripDigi>::const_iterator
i = b;
i !=
e; ++
i) {
724 int strip =
i->getStrip();
731 CSCStripDigi(strip,
i->getADCCounts(),
i->getADCOverflow(),
i->getOverlappedSample(),
i->getErrorstat()));
738 std::vector<CSCComparatorDigi>::const_iterator
b,
739 std::vector<CSCComparatorDigi>::const_iterator
e) {
740 std::vector<CSCComparatorDigi> _r;
746 for (std::vector<CSCComparatorDigi>::const_iterator
i = b;
i !=
e; ++
i) {
747 int strip =
i->getStrip();
760 std::vector<CSCStripDigi>::const_iterator
e) {
761 std::vector<CSCStripDigi> _r;
767 std::vector<CSCStripDigi>::const_iterator
e) {
768 std::vector<CSCStripDigi> _r;
771 for (std::vector<CSCStripDigi>::const_iterator
i = b;
i !=
e; ++
i) {
773 counts =
i->getADCCounts();
774 for (std::vector<int>::const_iterator
a = counts.begin();
a != counts.end(); ++
a)
787 std::vector<CSCComparatorDigi>::const_iterator
e) {
788 std::vector<CSCComparatorDigi> _r;
790 for (std::vector<CSCComparatorDigi>::const_iterator
i = b;
i !=
e; ++
i) {
791 bool present =
false;
793 if (
i->getTimeBin() < 10)
T getParameter(std::string const &) const
edm::EDGetTokenT< CSCComparatorDigiCollection > cd1_token
~CSCDigiValidator() override
std::vector< T > get() const
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
void push_back(const T &data)
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
bool filter(edm::Event &, const edm::EventSetup &) override
std::vector< DigiType >::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)
strips
#turn off noise in all subdetectors simHcalUnsuppressedDigis.doNoise = False mix.digitizers.hcal.doNoise = False simEcalUnsuppressedDigis.doNoise = False mix.digitizers.ecal.doNoise = False simEcalUnsuppressedDigis.doESNoise = False simSiPixelDigis.AddNoise = False mix.digitizers.pixel.AddNoise = False simSiStripDigis.Noise = False mix.digitizers.strip.AddNoise = False
std::vector< CSCWireDigi > sanitizeWireDigis(std::vector< CSCWireDigi >::const_iterator, std::vector< CSCWireDigi >::const_iterator)
T const * product() const
std::vector< CSCStripDigi > relabelStripDigis(const CSCChamberMap *, CSCDetId, std::vector< CSCStripDigi >::const_iterator, std::vector< CSCStripDigi >::const_iterator)