19 typedef typename T::const_iterator
col_cit;
29 <<
"DEutils::DEutils() :: " 30 <<
"specialization is still missing for collection of type:" <<
de_type() << std::endl;
34 inline int de_type()
const {
return de_trait::de_type(); }
62 double x1 = (aflag != 4) ? itd->id().iphi() : itm->id().iphi();
63 double x2 = (aflag != 4) ? itd->id().ieta() : itm->id().ieta();
65 unsigned int dwS = (aflag == 4) ? 0 : itd->sample(itd->sampleOfInterest()).raw();
66 unsigned int ewS = (aflag == 3) ? 0 : itm->sample(itm->sampleOfInterest()).raw();
68 unsigned int mask = 0x0eff;
71 unsigned int dwI = (aflag == 4) ? 0 : itd->id().rawId();
72 unsigned int ewI = (aflag == 3) ? 0 : itm->id().rawId();
75 unsigned int dw = (dwI & 0xfe00ffff) | ((dwS & 0x000001ff) << 16);
76 unsigned int ew = (ewI & 0xfe00ffff) | ((ewS & 0x000001ff) << 16);
78 int de = (aflag == 4) ? 0 : itd->compressedEt();
79 int ee = (aflag == 3) ? 0 : itm->compressedEt();
80 digi.
setRank((
float)de, (
float)ee);
81 L1MonitorDigi dedata(
dedefs::ETP, cid, itd->id().iphi(), itd->id().ieta(), 0, itd->compressedEt(), itd->id().rawId());
82 L1MonitorDigi deemul(
dedefs::ETP, cid, itm->id().iphi(), itm->id().ieta(), 0, itm->compressedEt(), itm->id().rawId());
91 double x1 = (aflag != 4) ? itd->id().iphi() : itm->id().iphi();
92 double x2 = (aflag != 4) ? itd->id().ieta() : itm->id().ieta();
94 unsigned int dw = (aflag == 4) ? 0 : itd->t0().raw();
95 unsigned int ew = (aflag == 3) ? 0 : itm->t0().raw();
98 unsigned int mask = 0x01ff;
102 int de = (aflag == 4) ? 0 : itd->SOI_compressedEt();
103 int ee = (aflag == 3) ? 0 : itm->SOI_compressedEt();
104 digi.
setRank((
float)de, (
float)ee);
112 double x1,
x2, x3(0.);
114 x1 = (aflag != 4) ? itd->regionId().iphi() : itm->regionId().iphi();
115 x2 = (aflag != 4) ? itd->regionId().ieta() : itm->regionId().ieta();
116 x3 = (aflag != 4) ? itd->regionId().rctCard() : itm->regionId().rctCard();
119 unsigned int dw = itd->raw();
120 unsigned int ew = itm->raw();
122 dw += (((itd->rctCrate()) & 0x1f) << 10);
123 dw += (((itd->isolated() ? 1 : 0) & 0
x1) << 15);
124 dw += (((itd->index()) & 0x3) << 16);
126 ew += (((itm->rctCrate()) & 0x1f) << 10);
127 ew += (((itm->isolated() ? 1 : 0) & 0
x1) << 15);
128 ew += (((itm->index()) & 0x3) << 16);
129 dw = (aflag == 4) ? 0 : dw;
130 ew = (aflag == 3) ? 0 : ew;
135 int de = (aflag == 4) ? 0 : itd->rank();
136 int ee = (aflag == 3) ? 0 : itm->rank();
137 digi.
setRank((
float)de, (
float)ee);
145 double x1,
x2, x3(0.);
146 x1 = (aflag != 4) ? itd->id().iphi() : itm->id().iphi();
147 x2 = (aflag != 4) ? itd->id().ieta() : itm->id().ieta();
148 x3 = (aflag != 4) ? itd->id().rctCard() : itm->id().rctCard();
150 unsigned int dw = itd->raw();
151 unsigned int ew = itm->raw();
152 unsigned int mask = 0x3fff;
156 dw += (((itd->id().ieta()) & 0x1f) << 14);
157 dw += (((itd->id().iphi()) & 0x1f) << 19);
159 ew += (((itm->id().ieta()) & 0x1f) << 14);
160 ew += (((itm->id().iphi()) & 0x1f) << 19);
161 dw = (aflag == 4) ? 0 : dw;
162 ew = (aflag == 3) ? 0 : ew;
165 int de = (aflag == 4) ? 0 : itd->et();
166 int ee = (aflag == 3) ? 0 : itm->et();
167 digi.
setRank((
float)de, (
float)ee);
177 double x1 = (aflag != 4) ? itd->regionId().iphi() : itm->regionId().iphi();
178 double x2 = (aflag != 4) ? itd->regionId().ieta() : itm->regionId().ieta();
180 unsigned int dw = (aflag == 4) ? 0 : itd->raw();
181 unsigned int ew = (aflag == 3) ? 0 : itm->raw();
185 int de = (aflag == 4) ? 0 : itd->rank();
186 int ee = (aflag == 3) ? 0 : itm->rank();
187 digi.
setRank((
float)de, (
float)ee);
197 double x1 = (aflag != 4) ? itd->phiIndex() : itm->phiIndex();
198 unsigned deta(0), eeta(0);
199 if (!itd->isForward())
200 deta = (itd->etaSign() == 1 ? 10 - (itd->etaIndex() & 0x7) : (itd->etaIndex() & 0x7) + 11);
202 deta = (itd->etaSign() == 1 ? 3 - (itd->etaIndex() & 0x7) : (itd->etaIndex() & 0x7) + 18);
203 if (!itm->isForward())
204 eeta = (itm->etaSign() == 1 ? 10 - (itm->etaIndex() & 0x7) : (itm->etaIndex() & 0x7) + 11);
206 eeta = (itm->etaSign() == 1 ? 3 - (itm->etaIndex() & 0x7) : (itm->etaIndex() & 0x7) + 18);
207 double x2 = (aflag != 4) ? deta : eeta;
209 unsigned int dw = (aflag == 4) ? 0 : itd->raw();
210 unsigned int ew = (aflag == 3) ? 0 : itm->raw();
214 int de = (aflag == 4) ? 0 : itd->rank();
215 int ee = (aflag == 3) ? 0 : itm->rank();
216 digi.
setRank((
float)de, (
float)ee);
227 unsigned int dw = (aflag == 4) ? 0 : itd->raw();
228 unsigned int ew = (aflag == 3) ? 0 : itm->raw();
232 int de = (aflag == 4) ? 0 : itd->et();
233 int ee = (aflag == 3) ? 0 : itm->et();
234 digi.
setRank((
float)de, (
float)ee);
241 double x1 = (aflag != 4) ? itd->phi() : itm->phi();
244 unsigned int dw = (aflag == 4) ? 0 : itd->raw();
245 unsigned int ew = (aflag == 3) ? 0 : itm->raw();
249 int de = (aflag == 4) ? 0 : itd->et();
250 int ee = (aflag == 3) ? 0 : itm->et();
251 digi.
setRank((
float)de, (
float)ee);
262 unsigned int dw = (aflag == 4) ? 0 : itd->raw();
263 unsigned int ew = (aflag == 3) ? 0 : itm->raw();
267 int de = (aflag == 4) ? 0 : itd->et();
268 int ee = (aflag == 3) ? 0 : itm->et();
269 digi.
setRank((
float)de, (
float)ee);
279 unsigned int dw = (aflag == 4) ? 0 : itd->raw();
280 unsigned int ew = (aflag == 3) ? 0 : itm->raw();
284 digi.
setRank((
float)de, (
float)ee);
294 unsigned int dw = (aflag == 4) ? 0 : itd->raw();
295 unsigned int ew = (aflag == 3) ? 0 : itm->raw();
299 digi.
setRank((
float)de, (
float)ee);
306 double x1 = (aflag != 4) ? itd->phi() : itm->phi();
309 unsigned int dw = (aflag == 4) ? 0 : itd->raw();
310 unsigned int ew = (aflag == 3) ? 0 : itm->raw();
314 int de = (aflag == 4) ? 0 : itd->et();
315 int ee = (aflag == 3) ? 0 : itm->et();
316 digi.
setRank((
float)de, (
float)ee);
327 unsigned int dw = (aflag == 4) ? 0 : itd->raw0();
328 unsigned int ew = (aflag == 3) ? 0 : itm->raw0();
332 digi.
setRank((
float)de, (
float)ee);
339 switch (itd->type_idx()) {
359 double x1 = (aflag != 4) ? itd->phi_packed() : itm->phi_packed();
360 double x2 = (aflag != 4) ? itd->eta_packed() : itm->eta_packed();
362 unsigned int dw = (aflag == 4) ? 0 : itd->getDataWord();
363 unsigned int ew = (aflag == 3) ? 0 : itm->getDataWord();
364 unsigned int mask = 0xffffffff;
372 int de = (aflag == 4) ? 0 : itd->pt_packed();
373 int ee = (aflag == 3) ? 0 : itm->pt_packed();
374 digi.
setRank((
float)de, (
float)ee);
378 std::cout <<
"L1DataEmulDigi DEutils<L1MuRegionalCandCollection>] dedigi info" 381 <<
" phipackd:" << itd->phi_packed() <<
"," << itm->phi_packed() <<
" etapackd:" << itd->eta_packed()
382 <<
"," << itm->eta_packed() << std::endl;
392 double x1 = (aflag != 4) ? itd->phiIndex() : itm->phiIndex();
393 double x2 = (aflag != 4) ? itd->etaIndex() : itm->etaIndex();
395 unsigned int dw = (aflag == 4) ? 0 : itd->getDataWord();
396 unsigned int ew = (aflag == 3) ? 0 : itm->getDataWord();
397 unsigned int mask = 0x3ffffff;
399 mask &= (~(0x0c00000));
403 int de = (aflag == 4) ? 0 : itd->ptIndex();
404 int ee = (aflag == 3) ? 0 : itm->ptIndex();
405 digi.
setRank((
float)de, (
float)ee);
407 std::cout <<
"l1dataemuldigi l1mugmtcandcoll type:" 411 << std::hex <<
" word d:" << dw <<
"e:" << ew <<
std::dec << std::endl;
419 double x1 = (aflag != 4) ? itd->scNum() : itm->scNum();
420 double x2 = (aflag != 4) ? itd->whNum() : itm->whNum();
421 double x3 = (aflag != 4) ? itd->stNum() : itm->stNum();
425 int dr = (aflag == 4) ? 0 : itd->code();
426 int er = (aflag == 3) ? 0 : itm->code();
435 double x1 = (aflag != 4) ? itd->scNum() : itm->scNum();
436 double x2 = (aflag != 4) ? itd->whNum() : itm->whNum();
437 double x3 = (aflag != 4) ? itd->stNum() : itm->stNum();
441 for (
int i = 0;
i < 7;
i++) {
442 if (itd->code(
i) >=
dr)
443 dr = itd->quality(
i);
444 if (itm->code(
i) >= er)
445 er = itm->quality(
i);
448 dr = (aflag == 4) ? 0 :
dr;
449 er = (aflag == 3) ? 0 : er;
458 double x1 = (aflag != 4) ? itd->getStrip() : itm->getStrip();
459 double x2 = (aflag != 4) ? itd->getKeyWG() : itm->getKeyWG();
460 double x3 = (aflag != 4) ? itd->getTrknmb() : itm->getTrknmb();
463 int dq = (aflag == 4) ? 0 : itd->getQuality();
464 int eq = (aflag == 3) ? 0 : itm->getQuality();
465 digi.
setRank((
float)dq, (
float)eq);
467 static const int kValidBitWidth = 1;
468 static const int kQualityBitWidth = 4;
469 static const int kPatternBitWidth = 4;
470 static const int kWireGroupBitWidth = 7;
471 static const int kHalfstripBitWidth = 8;
472 static const int kBendBitWidth = 1;
473 static const int kBxBitWidth = 1;
475 static const int kMPCLinkBitWidth = 2;
476 static const int kCSCIdBitWidth = 4;
478 unsigned shift = 0, dw = 0, ew = 0;
479 dw = itd->isValid() & ((1 << kValidBitWidth) - 1);
480 dw += (itd->getQuality() & ((1 << kQualityBitWidth) - 1)) << (
shift += kValidBitWidth);
481 dw += (itd->getPattern() & ((1 << kPatternBitWidth) - 1)) << (
shift += kQualityBitWidth);
482 dw += (itd->getKeyWG() & ((1 << kWireGroupBitWidth) - 1)) << (
shift += kPatternBitWidth);
483 dw += (itd->getStrip() & ((1 << kHalfstripBitWidth) - 1)) << (
shift += kWireGroupBitWidth);
484 dw += (itd->getBend() & ((1 << kBendBitWidth) - 1)) << (
shift += kHalfstripBitWidth);
485 dw += (itd->getBX() & ((1 << kBxBitWidth) - 1)) << (
shift += kBendBitWidth);
486 dw += (itd->getMPCLink() & ((1 << kMPCLinkBitWidth) - 1)) << (
shift += kBxBitWidth);
487 dw += (itd->getCSCID() & ((1 << kCSCIdBitWidth) - 1)) << (
shift += kMPCLinkBitWidth);
489 ew = itm->isValid() & ((1 << kValidBitWidth) - 1);
490 ew += (itm->getQuality() & ((1 << kQualityBitWidth) - 1)) << (
shift += kValidBitWidth);
491 ew += (itm->getPattern() & ((1 << kPatternBitWidth) - 1)) << (
shift += kQualityBitWidth);
492 ew += (itm->getKeyWG() & ((1 << kWireGroupBitWidth) - 1)) << (
shift += kPatternBitWidth);
493 ew += (itm->getStrip() & ((1 << kHalfstripBitWidth) - 1)) << (
shift += kWireGroupBitWidth);
494 ew += (itm->getBend() & ((1 << kBendBitWidth) - 1)) << (
shift += kHalfstripBitWidth);
495 ew += (itm->getBX() & ((1 << kBxBitWidth) - 1)) << (
shift += kBendBitWidth);
496 ew += (itm->getMPCLink() & ((1 << kMPCLinkBitWidth) - 1)) << (
shift += kBxBitWidth);
497 ew += (itm->getCSCID() & ((1 << kCSCIdBitWidth) - 1)) << (
shift += kMPCLinkBitWidth);
506 double x2 = (aflag != 4) ? itd->getKeyWG() : itm->getKeyWG();
507 double x3 = (aflag != 4) ? itd->getTrknmb() : itm->getTrknmb();
509 int dq = (aflag == 4) ? 0 : itd->getQuality();
510 int eq = (aflag == 3) ? 0 : itm->getQuality();
511 digi.
setRank((
float)dq, (
float)eq);
513 static const int kValidBitWidth = 1;
514 static const int kQualityBitWidth = 2;
515 static const int kAccelBitWidth = 1;
516 static const int kPatternBBitWidth = 1;
517 static const int kWireGroupBitWidth = 7;
518 static const int kBxBitWidth = 5;
520 unsigned shift = 0, dw = 0, ew = 0;
521 dw = itd->isValid() & ((1 << kValidBitWidth) - 1);
522 dw += (itd->getQuality() & ((1 << kQualityBitWidth) - 1)) << (
shift += kValidBitWidth);
523 dw += (itd->getAccelerator() & ((1 << kAccelBitWidth) - 1)) << (
shift += kQualityBitWidth);
524 dw += (itd->getCollisionB() & ((1 << kPatternBBitWidth) - 1)) << (
shift += kAccelBitWidth);
525 dw += (itd->getKeyWG() & ((1 << kWireGroupBitWidth) - 1)) << (
shift += kPatternBBitWidth);
526 dw += (itd->getBX() & ((1 << kBxBitWidth) - 1)) << (
shift += kWireGroupBitWidth);
528 ew = itm->isValid() & ((1 << kValidBitWidth) - 1);
529 ew += (itm->getQuality() & ((1 << kQualityBitWidth) - 1)) << (
shift += kValidBitWidth);
530 ew += (itm->getAccelerator() & ((1 << kAccelBitWidth) - 1)) << (
shift += kQualityBitWidth);
531 ew += (itm->getCollisionB() & ((1 << kPatternBBitWidth) - 1)) << (
shift += kAccelBitWidth);
532 ew += (itm->getKeyWG() & ((1 << kWireGroupBitWidth) - 1)) << (
shift += kPatternBBitWidth);
533 ew += (itm->getBX() & ((1 << kBxBitWidth) - 1)) << (
shift += kWireGroupBitWidth);
541 double x1 = (aflag != 4) ? itd->getKeyStrip() : itm->getKeyStrip();
542 double x3 = (aflag != 4) ? itd->getTrknmb() : itm->getTrknmb();
544 int dq = (aflag == 4) ? 0 : itd->getQuality();
545 int eq = (aflag == 3) ? 0 : itm->getQuality();
546 digi.
setRank((
float)dq, (
float)eq);
548 static const int kValidBitWidth = 1;
549 static const int kQualityBitWidth = 3;
550 static const int kPatternBitWidth = 4;
551 static const int kBendBitWidth = 1;
552 static const int kHalfstripBitWidth = 5;
553 static const int kCFEBBitWidth = 3;
554 static const int kBxBitWidth = 2;
556 unsigned shift = 0, dw = 0, ew = 0;
557 dw = itd->isValid() & ((1 << kValidBitWidth) - 1);
558 dw += (itd->getQuality() & ((1 << kQualityBitWidth) - 1)) << (
shift += kValidBitWidth);
559 dw += (itd->getPattern() & ((1 << kPatternBitWidth) - 1)) << (
shift += kQualityBitWidth);
560 dw += (itd->getBend() & ((1 << kBendBitWidth) - 1)) << (
shift += kPatternBitWidth);
561 dw += (itd->getStrip() & ((1 << kHalfstripBitWidth) - 1)) << (
shift += kBendBitWidth);
562 dw += (itd->getCFEB() & ((1 << kCFEBBitWidth) - 1)) << (
shift += kHalfstripBitWidth);
563 dw += (itd->getBX() & ((1 << kBxBitWidth) - 1)) << (
shift += kCFEBBitWidth);
565 ew = itm->isValid() & ((1 << kValidBitWidth) - 1);
566 ew += (itm->getQuality() & ((1 << kQualityBitWidth) - 1)) << (
shift += kValidBitWidth);
567 ew += (itm->getPattern() & ((1 << kPatternBitWidth) - 1)) << (
shift += kQualityBitWidth);
568 ew += (itm->getBend() & ((1 << kBendBitWidth) - 1)) << (
shift += kPatternBitWidth);
569 ew += (itm->getStrip() & ((1 << kHalfstripBitWidth) - 1)) << (
shift += kBendBitWidth);
570 ew += (itm->getCFEB() & ((1 << kCFEBBitWidth) - 1)) << (
shift += kHalfstripBitWidth);
571 ew += (itm->getBX() & ((1 << kBxBitWidth) - 1)) << (
shift += kCFEBBitWidth);
581 x1 = (aflag != 4) ? itd->slot() : itm->slot();
593 template <
typename T>
612 template <
typename T>
617 template <
typename T>
619 return !de_equal(lhs, rhs);
625 unsigned int mask = 0x0fff;
627 val &= ((lhs[lhs.sampleOfInterest()].raw() & mask) == (rhs[rhs.sampleOfInterest()].raw() & mask));
628 val &= (lhs.id().rawId() == rhs.id().rawId());
635 unsigned int mask = 0x01ff;
636 val &= ((lhs.t0().raw() & mask) == (rhs.t0().raw() & mask));
637 val &= (lhs.id().rawId() == rhs.id().rawId());
644 val &= (lhs.raw() == rhs.raw());
645 val &= (lhs.rctCrate() == rhs.rctCrate());
646 val &= (lhs.isolated() == rhs.isolated());
647 val &= (lhs.index() == rhs.index());
655 val &= (lhs.et() == rhs.et());
656 val &= (lhs.rctCrate() == rhs.rctCrate());
657 val &= (lhs.rctRegionIndex() == rhs.rctRegionIndex());
658 val &= (lhs.id().isHf() == rhs.id().isHf());
659 if (!lhs.id().isHf()) {
660 val &= (lhs.overFlow() == rhs.overFlow());
661 val &= (lhs.tauVeto() == rhs.tauVeto());
665 val &= (lhs.rctCard() == rhs.rctCard());
667 val &= (lhs.fineGrain() == rhs.fineGrain());
714 val &= (lhs.whNum() == rhs.whNum());
715 val &= (lhs.scNum() == rhs.scNum());
716 val &= (lhs.stNum() == rhs.stNum());
719 val &= (lhs.code() == rhs.code());
720 val &= (lhs.Ts2Tag() == rhs.Ts2Tag());
729 val &= (lhs.whNum() == rhs.whNum());
730 val &= (lhs.scNum() == rhs.scNum());
731 val &= (lhs.stNum() == rhs.stNum());
744 val &= (lhs.type_idx() == rhs.type_idx());
745 val &= (lhs.bx() == rhs.bx());
748 unsigned int dw = lhs.getDataWord();
749 unsigned int ew = rhs.getDataWord();
750 unsigned int mask = 0xffffffff;
754 if (rhs.type_idx() == 1 || rhs.type_idx() == 3)
769 unsigned int dw = rhs.getDataWord();
770 unsigned int ew = lhs.getDataWord();
771 unsigned int mask = 0x3ffffff;
773 mask &= (~(0x0c00000));
786 val &= (lhs.isValid() == rhs.isValid());
787 val &= (lhs.getQuality() == rhs.getQuality());
788 val &= (lhs.getKeyWG() == rhs.getKeyWG());
789 val &= (lhs.getStrip() == rhs.getStrip());
790 val &= (lhs.getPattern() == rhs.getPattern());
791 val &= (lhs.getBend() == rhs.getBend());
792 val &= (lhs.getBX() == rhs.getBX());
793 val &= (lhs.getMPCLink() == rhs.getMPCLink());
794 val &= (lhs.getCSCID() == rhs.getCSCID());
809 val &= (lhs.slot() == rhs.slot());
810 val &= (lhs.BXN() == rhs.BXN());
811 val &= (lhs.FMM() == rhs.FMM());
812 val &= (lhs.SEs() == rhs.SEs());
813 val &= (lhs.SMs() == rhs.SMs());
814 val &= (lhs.BXs() == rhs.BXs());
815 val &= (lhs.AFs() == rhs.AFs());
816 val &= (lhs.VPs() == rhs.VPs());
822 template <
typename T>
827 template <
typename T>
829 return !de_equal_loc(lhs, rhs);
835 val &= (lhs.id().zside() == rhs.id().zside());
836 val &= (lhs.id().ietaAbs() == rhs.id().ietaAbs());
837 val &= (lhs.id().iphi() == rhs.id().iphi());
844 val &= (lhs.id().zside() == rhs.id().zside());
845 val &= (lhs.id().ietaAbs() == rhs.id().ietaAbs());
846 val &= (lhs.id().iphi() == rhs.id().iphi());
853 val &= (lhs.rctCrate() == rhs.rctCrate());
854 val &= (lhs.rctCard() == rhs.rctCard());
855 val &= (lhs.rctRegion() == rhs.rctRegion());
862 val &= (lhs.rctCrate() == rhs.rctCrate());
863 val &= (lhs.id().isHf() == rhs.id().isHf());
864 if (!lhs.id().isHf())
865 val &= (lhs.rctCard() == rhs.rctCard());
866 val &= (lhs.rctRegionIndex() == rhs.rctRegionIndex());
873 val &= (lhs.etaIndex() == rhs.etaIndex());
874 val &= (lhs.phiIndex() == rhs.phiIndex());
880 val &= (lhs.etaIndex() == rhs.etaIndex());
881 val &= (lhs.phiIndex() == rhs.phiIndex());
892 val &= (lhs.phi() == rhs.phi());
902 val &= (lhs.phi() == rhs.phi());
921 val &= (lhs.phi_packed() == rhs.phi_packed());
922 val &= (lhs.eta_packed() == rhs.eta_packed());
931 val &= (lhs.phiIndex() == rhs.phiIndex());
932 val &= (lhs.etaIndex() == rhs.etaIndex());
939 val &= (lhs.whNum() == rhs.whNum());
940 val &= (lhs.scNum() == rhs.scNum());
941 val &= (lhs.stNum() == rhs.stNum());
951 val &= (lhs.whNum() == rhs.whNum());
952 val &= (lhs.scNum() == rhs.scNum());
953 val &= (lhs.stNum() == rhs.stNum());
961 val &= (lhs.getCSCID() == rhs.getCSCID());
962 val &= (lhs.getStrip() == rhs.getStrip());
963 val &= (lhs.getKeyWG() == rhs.getKeyWG());
970 val &= (lhs.getTrknmb() == rhs.getTrknmb());
971 val &= (lhs.getKeyWG() == rhs.getKeyWG());
977 val &= (lhs.getTrknmb() == rhs.getTrknmb());
978 val &= (lhs.getKeyStrip() == rhs.getKeyStrip());
984 val &= (lhs.slot() == rhs.slot());
990 template <
typename T>
999 unsigned int raw = it->sample(it->sampleOfInterest()).raw();
1000 unsigned int mask = 0x0fff;
1006 unsigned int ttf = it->ttFlag();
1007 val |= ((ttf != 0x1) && (ttf != 0x3));
1014 unsigned int mask = 0x01ff;
1015 return (it->size() == 0 || ((it->t0().raw() & mask) == 0) || it->SOI_compressedEt() == 0);
1020 return ((it->rank()) == 0);
1026 return ((it->et()) == 0);
1032 return (it->empty());
1037 return (it->empty());
1042 return (it->empty());
1046 return (it->empty());
1050 return (it->empty());
1054 return (it->empty());
1058 return (it->empty());
1062 return (it->empty());
1066 return (it->empty());
1071 return (it->bxNum() != 0 || it->code() == 7);
1077 return (it->whNum() == 0 && it->scNum() == 0 && it->stNum() == 0);
1086 if (it->type_idx() == 1 || it->type_idx() == 3)
1090 return (it->empty());
1098 return (it->empty());
1105 return !(it->isValid());
1109 return !(it->isValid());
1113 return !(it->isValid());
1118 unsigned data = it->slot() | it->BXN() | it->FMM() | it->SEs() | it->SMs() | it->BXs() | it->AFs() | it->VPs();
1124 template <
typename T>
1126 std::stringstream
ss;
1127 ss <<
"[DEutils<T>::print()] specialization still missing for collection!";
1135 std::stringstream
ss;
1136 ss <<
"0x" << std::setw(4) << std::setfill(
'0') << std::hex << it->sample(it->sampleOfInterest()).raw()
1137 << std::setfill(
' ') <<
std::dec <<
", et:" << std::setw(3) << it->compressedEt() <<
", fg:" << std::setw(1)
1138 << it->fineGrain() <<
", ttf:" << std::setw(2) << it->ttFlag()
1139 <<
", sdet:" << ((it->id().subDet() ==
EcalBarrel) ? (
"Barrel") : (
"Endcap"))
1140 <<
", iz:" << ((it->id().zside() > 0) ? (
"+") : (
"-")) <<
", ieta:" << std::setw(2) << it->id().ietaAbs()
1141 <<
", iphi:" << std::setw(2)
1150 std::stringstream
ss;
1151 ss <<
"0x" << std::setw(4) << std::setfill(
'0') << std::hex << it->t0().raw() << std::setfill(
' ') <<
std::dec 1152 <<
", et:" << std::setw(3) << it->SOI_compressedEt() <<
", fg:" << std::setw(1) << it->SOI_fineGrain()
1153 <<
", sdet:" << it->id().subdet() <<
", iz:" << ((it->id().zside() > 0) ? (
"+") : (
"-"))
1154 <<
", ieta:" << std::setw(2) << it->id().ietaAbs() <<
", iphi:" << std::setw(2) << it->id().iphi() << std::endl;
1161 std::stringstream
ss;
1162 ss <<
"0x" << std::setw(4) << std::setfill(
'0') << std::hex << it->raw() <<
", rank=0x" << std::setw(2) << std::hex
1163 << it->rank() << std::setfill(
' ') <<
std::dec <<
", region:" << std::setw(1) << it->rctRegion()
1164 <<
", card:" << std::setw(1) << it->rctCard() <<
", crate:" << std::setw(2) << it->rctCrate()
1165 <<
", ieta:" << std::setw(2) << it->regionId().ieta()
1166 <<
", iphi:" << std::setw(2)
1167 << it->regionId().iphi()
1170 <<
", iso:" << std::setw(1) << it->isolated() <<
", index:" << std::setw(1) << it->index() <<
", bx:" << it->bx()
1178 std::stringstream
ss;
1179 ss <<
"L1CaloRegion:" 1180 <<
" et=" << it->et() <<
" o/f=" << it->overFlow() <<
" f/g=" << it->fineGrain() <<
" tau=" << it->tauVeto()
1181 <<
" rct(crate=" << it->rctCrate() <<
" card=" << it->rctCard() <<
" rgn=" << it->rctRegionIndex()
1182 <<
" eta=" << it->rctEta() <<
" phi=" << it->rctPhi() <<
")\n\t\t" 1183 <<
"gct(eta=" << it->gctEta() <<
" phi=" << it->gctPhi() <<
")" << std::hex <<
" cap_block=" << it->capBlock()
1184 <<
std::dec <<
" index=" << it->capIndex() <<
" bx=" << it->bx() << std::endl;
1192 std::stringstream
ss;
1195 ss <<
"0x" << std::setw(4) << std::setfill(
'0') << std::hex << it->raw() <<
", rank=0x" << std::setw(2) << std::hex
1196 << it->rank() << std::setfill(
' ') <<
std::dec <<
", etaSign:" << it->etaSign()
1197 <<
", eta:" << (it->etaIndex() & 0x7)
1198 <<
", phi:" << std::setw(2) << it->phiIndex()
1199 <<
" (ieta:" << std::setw(2) << it->regionId().ieta()
1200 <<
",iphi:" << std::setw(2) << it->regionId().iphi() <<
")" 1201 <<
", iso:" << it->isolated() <<
", cap block:" << std::setw(3) << it->capBlock() <<
", index:" << it->capIndex()
1202 <<
", bx:" << it->bx() << std::endl;
1216 std::stringstream
ss;
1217 ss <<
"0x" << std::setw(4) << std::setfill(
'0') << std::hex << it->raw() <<
" " << *it <<
std::dec << std::endl;
1222 std::stringstream
ss;
1228 std::stringstream
ss;
1234 std::stringstream
ss;
1240 std::stringstream
ss;
1246 std::stringstream
ss;
1252 std::stringstream
ss;
1258 std::stringstream
ss;
1265 std::stringstream
ss;
1267 <<
" bxNum:" << it->bxNum() <<
" whNum:" << it->whNum() <<
" scNum:" << it->scNum() <<
" stNum:" << it->stNum()
1268 <<
" phi:" << it->phi() <<
" phiB:" << it->phiB() <<
" code:" << it->code() <<
" Ts2Tag:" << it->Ts2Tag()
1269 <<
" BxCnt:" << it->BxCnt() << std::endl;
1276 std::stringstream
ss;
1278 <<
" bxNum:" << it->bxNum() <<
" whNum:" << it->whNum() <<
" scNum:" << it->scNum() <<
" stNum:" << it->stNum()
1286 std::stringstream
ss;
1288 ss << std::setiosflags(std::ios::showpoint |
std::ios::fixed | std::ios::right | std::ios::adjustfield);
1289 ss << std::hex << std::setfill(
'0') <<
" 0x" << std::setw(8) << it->getDataWord();
1291 ss << std::hex << std::setfill(
'0') <<
" pt:0x" << std::setw(2) << it->pt_packed() <<
" phi:0x" << std::setw(2)
1292 << it->phi_packed() <<
" eta:0x" << std::setw(2) << it->eta_packed();
1298 ss <<
std::dec << std::setfill(
' ') <<
" qua:" << std::setw(1) << it->quality() <<
" cha:" << std::setw(2)
1299 << it->chargeValue() <<
" chav:" << std::setw(1) << it->chargeValid() <<
" fh:" << std::setw(1) << it->isFineHalo()
1300 <<
" bx:" << std::setw(4) << it->bx() <<
" [id:" << std::setw(1) << it->type_idx()
1309 std::stringstream
ss;
1310 ss << std::setiosflags(std::ios::showpoint |
std::ios::fixed | std::ios::right | std::ios::adjustfield);
1312 ss << std::hex << std::setfill(
'0') <<
" 0x" << std::setw(7) << it->getDataWord();
1314 ss << std::hex << std::setfill(
'0') <<
" pt:0x" << std::setw(2) << it->ptIndex() <<
" eta:0x" << std::setw(2)
1315 << it->etaIndex() <<
" phi:0x" << std::setw(3) << it->phiIndex();
1321 ss <<
std::dec << std::setfill(
' ') <<
" cha:" << std::setw(2) << it->charge() <<
" qua:" << std::setw(3)
1322 << it->quality() <<
" iso:" << std::setw(1) << it->isol() <<
" mip:" << std::setw(1) << it->mip()
1323 <<
" bx:" << it->bx() << std::endl;
1330 std::stringstream
ss;
1349 std::stringstream
ss;
1350 ss << *it << std::endl;
1356 std::stringstream
ss;
1357 ss << *it << std::endl;
1363 std::stringstream
ss;
1364 ss <<
" slot:" << it->slot() <<
" bxn:" << it->BXN() <<
" fmm:" << it->FMM() <<
" ses:" << it->SEs()
1365 <<
" sms:" << it->SMs() <<
" bxs:" << it->BXs() <<
" afs:" << it->AFs() <<
" vps:" << it->VPs() << std::endl;
1371 template <
typename T>
1373 const int nlabel = 17;
1375 return "un-defined";
1378 switch (de_type()) {
1381 str[1] =
"EcalTrigPrimDigiCollection";
1382 str[2] =
"EcalTriggerPrimitiveDigi";
1386 str[1] =
"HcalTrigPrimDigiCollection";
1387 str[2] =
"HcalTriggerPrimitiveDigi";
1391 str[1] =
"L1CaloEmCollection";
1392 str[2] =
"L1CaloEmCand";
1395 str[0] =
"RCT region";
1396 str[1] =
"L1CaloRegionCollection";
1397 str[2] =
"L1CaloRegion";
1400 str[0] =
"GCT em isolated";
1401 str[1] =
"L1GctEmCandCollection";
1402 str[2] =
"L1GctEmCand";
1405 str[0] =
"GCT em non-isolated";
1406 str[1] =
"L1GctEmCandCollection";
1407 str[2] =
"L1GctEmCand";
1410 str[0] =
"GCT central jet";
1411 str[1] =
"L1GctJetCandCollection";
1412 str[2] =
"L1GctJetCand";
1415 str[0] =
"GCT forward jet";
1416 str[1] =
"L1GctJetCandCollection";
1417 str[2] =
"L1GctJetCand";
1420 str[0] =
"GCT tau jet";
1421 str[1] =
"L1GctJetCandCollection";
1422 str[2] =
"L1GctJetCand";
1425 str[0] =
"Stage1Layer2 iso-tau jet";
1426 str[1] =
"L1GctJetCandCollection";
1427 str[2] =
"L1GctJetCand";
1431 str[1] =
"L1GctEtHadCollection";
1432 str[2] =
"L1GctEtHad";
1435 str[0] =
"GCT et miss";
1436 str[1] =
"L1GctEtMissCollection";
1437 str[2] =
"L1GctEtMiss";
1440 str[0] =
"GCT et total";
1441 str[1] =
"L1GctEtTotalCollection";
1442 str[2] =
"L1GctEtTotal";
1445 str[0] =
"GCT ht miss";
1446 str[1] =
"L1GctHtMissCollection";
1447 str[2] =
"L1GctHtMiss";
1450 str[0] =
"GCT hf ring";
1451 str[1] =
"L1GctHFRingEtSumsCollection";
1452 str[2] =
"L1GctHFRingEtSums";
1455 str[0] =
"GCT hf bit counts";
1456 str[1] =
"L1GctHFBitCountsCollection";
1457 str[2] =
"L1GctHFBitCounts";
1461 str[0] =
"DT tp phi";
1462 str[1] =
"L1MuDTChambPhDigiCollection";
1463 str[2] =
"L1MuDTChambPhDigi";
1466 str[0] =
"DT tp theta";
1467 str[1] =
"L1MuDTChambThDigiCollection";
1468 str[2] =
"L1MuDTChambThDigi";
1472 str[1] =
"CSCALCTDigiCollection";
1473 str[2] =
"CSCALCTDigi";
1477 str[1] =
"CSCCLCTDigiCollection";
1478 str[2] =
"CSCCLCTDigi";
1482 str[1] =
"CSCCorrelatedLCTDigiCollection";
1483 str[2] =
"CSCCorrelatedLCTDigi";
1486 str[0] =
"CSC tf status";
1487 str[1] =
"L1CSCSPStatusDigiCollection_";
1488 str[2] =
"L1CSCSPStatusDigi";
1491 str[0] =
"Mu reg tf";
1492 str[1] =
"L1MuRegionalCandCollection";
1493 str[2] =
"L1MuRegionalCand";
1497 str[1] =
"LTCDigiCollection";
1501 str[0] =
"GMT cand";
1502 str[1] =
"L1MuGMTCandCollection";
1503 str[2] =
"L1MuGMTCand";
1506 str[0] =
"GMT record";
1507 str[1] =
"L1MuGMTReadoutRecordCollection";
1508 str[2] =
"L1MuGMTReadoutRecord";
1522 template <
typename T>
1533 return x.compressedEt() >
y.compressedEt();
1537 return x.SOI_compressedEt() >
y.SOI_compressedEt();
1542 if (
x.rank() !=
y.rank()) {
1543 return (
x.rank() <
y.rank());
1544 }
else if (
x.isolated() !=
y.isolated()) {
1545 return (
x.isolated()) ?
true :
false;
1546 }
else if (
x.rctRegion() !=
y.rctRegion()) {
1547 return (
x.rctRegion() <
y.rctRegion());
1548 }
else if (
x.rctCrate() !=
y.rctCrate()) {
1549 return (
x.rctCrate() <
y.rctCrate());
1550 }
else if (
x.rctCard() !=
y.rctCard()) {
1551 return (
x.rctCard() <
y.rctCard());
1553 return x.raw() <
y.raw();
1559 return x.et() <
y.et();
1564 if (
x.rank() !=
y.rank()) {
1565 return x.rank() <
y.rank();
1567 if (
x.etaIndex() !=
y.etaIndex()) {
1568 return y.etaIndex() <
x.etaIndex();
1570 return x.phiIndex() <
y.phiIndex();
1576 if (
x.rank() !=
y.rank()) {
1577 return x.rank() <
y.rank();
1579 if (
x.etaIndex() !=
y.etaIndex()) {
1580 return y.etaIndex() <
x.etaIndex();
1582 return x.phiIndex() <
y.phiIndex();
1596 if (
x.whNum() !=
y.whNum()) {
1597 return x.whNum() <
y.whNum();
1599 if (
x.scNum() !=
y.scNum()) {
1600 return y.scNum() <
x.scNum();
1602 return x.stNum() <
y.stNum();
1608 if (
x.whNum() !=
y.whNum()) {
1609 return x.whNum() <
y.whNum();
1611 if (
x.scNum() !=
y.scNum()) {
1612 return y.scNum() <
x.scNum();
1614 return x.stNum() <
y.stNum();
1621 if (
x.phi_packed() !=
y.phi_packed()) {
1622 return x.phi_packed() <
y.phi_packed();
1624 if (
x.eta_packed() !=
y.eta_packed()) {
1625 return y.eta_packed() <
x.eta_packed();
1627 return x.quality_packed() <
y.quality_packed();
1634 if (
x.bx() !=
y.bx()) {
1635 return x.bx() <
y.bx();
1636 }
else if (
x.ptIndex() !=
y.ptIndex()) {
1637 return x.ptIndex() <
y.ptIndex();
1639 return x.quality() <
y.quality();
1645 if (
x.getTrknmb() !=
y.getTrknmb()) {
1646 return x.getTrknmb() <
y.getTrknmb();
1648 if (
x.getKeyWG() !=
y.getKeyWG()) {
1649 return y.getKeyWG() <
x.getKeyWG();
1651 return x.getQuality() <
y.getQuality();
T::const_iterator col_cit
de_trait::cand_type cand_type
L1DataEmulDigi DEDigi(col_cit itd, col_cit itm, int ctype)
— form de-digi —
void setRank(float d, float e)
de_trait::coll_type coll_type
void setData(unsigned int d, unsigned int e)
Log< level::Error, false > LogError
bool de_nequal(const cand_type &, const cand_type &)
bool de_nequal_loc(const cand_type &, const cand_type &)
std::string print(col_cit) const
— print candidate —
void setDEpair(const L1MonitorDigi &d, const L1MonitorDigi &e)
bool de_equal_loc(const cand_type &, const cand_type &)
— candidate location-match definition —
bool operator()(const cand_type &x, const cand_type &y) const
char data[epos_bytes_allocation]
std::string GetName(int i=0) const
— name candidate —
col_it de_find(col_it, col_it, const cand_type &)
— find candidate —
static unsigned int const shift
de_trait::cand_type cand_type
bool is_empty(col_cit) const
— candidate emptiness definition —
bool de_equal(const cand_type &, const cand_type &)
— candidate match definition —