17 typedef typename T::const_iterator
col_cit;
28 <<
"DEutils::DEutils() :: "
29 <<
"specialization is still missing for collection of type:"
34 inline int de_type()
const {
return de_trait::de_type();}
64 double x1 = (aflag!=4) ? itd->id().iphi() : itm->id().iphi();
65 double x2 = (aflag!=4) ? itd->id().ieta() : itm->id().ieta();
67 unsigned int dwS = (aflag==4)?0:itd->sample(itd->sampleOfInterest()).raw();
68 unsigned int ewS = (aflag==3)?0:itm->sample(itm->sampleOfInterest()).raw();
70 unsigned int mask = 0x0eff;
71 dwS &= mask; ewS &= mask;
72 unsigned int dwI = (aflag==4)?0:itd->id().rawId();
73 unsigned int ewI = (aflag==3)?0:itm->id().rawId();
76 unsigned int dw = (dwI & 0xfe00ffff ) | ( (dwS & 0x000001ff)<<16 );
77 unsigned int ew = (ewI & 0xfe00ffff ) | ( (ewS & 0x000001ff)<<16 );
79 int de = (aflag==4)?0:itd->compressedEt() ;
80 int ee = (aflag==3)?0:itm->compressedEt() ;
81 digi.
setRank((
float)de,(
float)ee);
83 itd->compressedEt(),itd->id().rawId());
85 itm->compressedEt(),itm->id().rawId());
94 double x1 = (aflag!=4) ? itd->id().iphi() : itm->id().iphi();
95 double x2 = (aflag!=4) ? itd->id().ieta() : itm->id().ieta();
97 unsigned int dw = (aflag==4)?0:itd->t0().raw();
98 unsigned int ew = (aflag==3)?0:itm->t0().raw();
101 unsigned int mask = 0x01ff;
102 dw &= mask; ew &= mask;
104 int de = (aflag==4)?0:itd->SOI_compressedEt();
105 int ee = (aflag==3)?0:itm->SOI_compressedEt();
106 digi.
setRank((
float)de,(
float)ee);
114 double x1, x2, x3(0.);
116 x1 = (aflag!=4) ? itd->regionId().iphi() : itm->regionId().iphi();
117 x2 = (aflag!=4) ? itd->regionId().ieta() : itm->regionId().ieta();
118 x3 = (aflag!=4) ? itd->regionId().rctCard() : itm->regionId().rctCard();
121 unsigned int dw = itd->raw();
122 unsigned int ew = itm->raw();
124 dw += (((itd->rctCrate())&0x1f)<<10);
125 dw += (((itd->isolated()?1:0)&0x1)<<15);
126 dw += (((itd->index())&0x3)<<16);
128 ew += (((itm->rctCrate())&0x1f)<<10);
129 ew += (((itm->isolated()?1:0)&0x1)<<15);
130 ew += (((itm->index())&0x3)<<16);
131 dw = (aflag==4)?0:dw;
132 ew = (aflag==3)?0:ew;
137 int de = (aflag==4)?0:itd->rank();
138 int ee = (aflag==3)?0:itm->rank();
139 digi.
setRank((
float)de,(
float)ee);
147 double x1, x2, x3(0.);
148 x1 = (aflag!=4) ? itd->id().iphi() : itm->id().iphi();
149 x2 = (aflag!=4) ? itd->id().ieta() : itm->id().ieta();
150 x3 = (aflag!=4) ? itd->id().rctCard() : itm->id().rctCard();
152 unsigned int dw = itd->raw();
153 unsigned int ew = itm->raw();
154 unsigned int mask = 0x3fff;
158 dw += (((itd->id().ieta())&0x1f)<<14);
159 dw += (((itd->id().iphi())&0x1f)<<19);
161 ew += (((itm->id().ieta())&0x1f)<<14);
162 ew += (((itm->id().iphi())&0x1f)<<19);
163 dw = (aflag==4)?0:dw;
164 ew = (aflag==3)?0:ew;
167 int de = (aflag==4)?0:itd->et();
168 int ee = (aflag==3)?0:itm->et();
169 digi.
setRank((
float)de,(
float)ee);
179 double x1 = (aflag!=4) ? itd->regionId().iphi() : itm->regionId().iphi();
180 double x2 = (aflag!=4) ? itd->regionId().ieta() : itm->regionId().ieta();
182 unsigned int dw = (aflag==4)?0:itd->raw();
183 unsigned int ew = (aflag==3)?0:itm->raw();
184 dw &= 0x7fff; ew &= 0x7fff;
186 int de = (aflag==4)?0:itd->rank();
187 int ee = (aflag==3)?0:itm->rank();
188 digi.
setRank((
float)de,(
float)ee);
198 double x1 = (aflag!=4) ? itd->phiIndex() : itm->phiIndex();
199 unsigned deta(0), eeta(0);
200 if (!itd->isForward()) deta=(itd->etaSign()==1?10-(itd->etaIndex()&0x7):(itd->etaIndex()&0x7)+11);
201 else deta=(itd->etaSign()==1? 3-(itd->etaIndex()&0x7):(itd->etaIndex()&0x7)+18 );
202 if (!itm->isForward()) eeta=(itm->etaSign()==1?10-(itm->etaIndex()&0x7):(itm->etaIndex()&0x7)+11);
203 else eeta=(itm->etaSign()==1? 3-(itm->etaIndex()&0x7):(itm->etaIndex()&0x7)+18 );
204 double x2 = (aflag!=4) ? deta : eeta;
206 unsigned int dw = (aflag==4)?0:itd->raw();
207 unsigned int ew = (aflag==3)?0:itm->raw();
208 dw &= 0x7fff; ew &= 0x7fff;
210 int de = (aflag==4)?0:itd->rank();
211 int ee = (aflag==3)?0:itm->rank();
212 digi.
setRank((
float)de,(
float)ee);
220 double x1 = 0;
double x2 = 0;
222 unsigned int dw = (aflag==4)?0:itd->raw();
223 unsigned int ew = (aflag==3)?0:itm->raw();
224 dw &= 0x1fff; ew &= 0x1fff;
226 int de = (aflag==4)?0:itd->et();
227 int ee = (aflag==3)?0:itm->et();
228 digi.
setRank((
float)de,(
float)ee);
235 double x1 = (aflag!=4) ? itd->phi() : itm->phi();
238 unsigned int dw = (aflag==4)?0:itd->raw();
239 unsigned int ew = (aflag==3)?0:itm->raw();
240 dw &= 0x8f1fff; ew &= 0x8f1fff;
242 int de = (aflag==4)?0:itd->et();
243 int ee = (aflag==3)?0:itm->et();
244 digi.
setRank((
float)de,(
float)ee);
252 double x1 = 0;
double x2 = 0;
254 unsigned int dw = (aflag==4)?0:itd->raw();
255 unsigned int ew = (aflag==3)?0:itm->raw();
256 dw &= 0x1fff; ew &= 0x1fff;
258 int de = (aflag==4)?0:itd->et();
259 int ee = (aflag==3)?0:itm->et();
260 digi.
setRank((
float)de,(
float)ee);
267 double x1 = 0;
double x2 = 0;
269 unsigned int dw = (aflag==4)?0:itd->raw();
270 unsigned int ew = (aflag==3)?0:itm->raw();
272 int de = 0;
int ee = 0;
273 digi.
setRank((
float)de,(
float)ee);
280 double x1 = 0;
double x2 = 0;
282 unsigned int dw = (aflag==4)?0:itd->raw();
283 unsigned int ew = (aflag==3)?0:itm->raw();
285 int de = 0;
int ee = 0;
286 digi.
setRank((
float)de,(
float)ee);
293 double x1 = (aflag!=4) ? itd->phi() : itm->phi();
296 unsigned int dw = (aflag==4)?0:itd->raw();
297 unsigned int ew = (aflag==3)?0:itm->raw();
298 dw &= 0x8f1fff; ew &= 0x8f1fff;
300 int de = (aflag==4)?0:itd->et();
301 int ee = (aflag==3)?0:itm->et();
302 digi.
setRank((
float)de,(
float)ee);
310 double x1 = 0;
double x2 = 0;
312 unsigned int dw = (aflag==4)?0:itd->raw0();
313 unsigned int ew = (aflag==3)?0:itm->raw0();
315 int de = 0;
int ee = 0;
316 digi.
setRank((
float)de,(
float)ee);
323 switch(itd->type_idx()) {
334 double x1 = (aflag!=4) ? itd->phi_packed() : itm->phi_packed();
335 double x2 = (aflag!=4) ? itd->eta_packed() : itm->eta_packed();
337 unsigned int dw = (aflag==4)?0 : itd->getDataWord();
338 unsigned int ew = (aflag==3)?0 : itm->getDataWord();
339 unsigned int mask = 0xffffffff;
344 dw &= mask; ew &= mask;
346 int de = (aflag==4)?0:itd->pt_packed();
347 int ee = (aflag==3)?0:itm->pt_packed();
348 digi.
setRank((
float)de,(
float)ee);
352 std::cout <<
"L1DataEmulDigi DEutils<L1MuRegionalCandCollection>] dedigi info"
355 <<
" phipackd:" << itd->phi_packed() <<
"," << itm->phi_packed()
356 <<
" etapackd:" << itd->eta_packed() <<
"," << itm->eta_packed()
367 double x1 = (aflag!=4) ? itd->phiIndex() : itm->phiIndex();
368 double x2 = (aflag!=4) ? itd->etaIndex() : itm->etaIndex();
370 unsigned int dw = (aflag==4)?0 : itd->getDataWord();
371 unsigned int ew = (aflag==3)?0 : itm->getDataWord();
372 unsigned int mask = 0x3ffffff;
374 mask &= (~(0x0c00000));
375 dw &= mask; ew &= mask;
377 int de = (aflag==4)?0:itd->ptIndex();
378 int ee = (aflag==3)?0:itm->ptIndex();
379 digi.
setRank((
float)de,(
float)ee);
381 std::cout <<
"l1dataemuldigi l1mugmtcandcoll type:" << cid
384 << std::hex <<
" word d:" << dw <<
"e:" << ew <<
std::dec
393 double x1 = (aflag!=4) ? itd->scNum() : itm->scNum();
394 double x2 = (aflag!=4) ? itd->whNum() : itm->whNum();
395 double x3 = (aflag!=4) ? itd->stNum() : itm->stNum();
399 int dr = (aflag==4)?0:itd->code();
400 int er = (aflag==3)?0:itm->code();
401 digi.
setRank((
float)dr,(
float)er);
409 double x1 = (aflag!=4) ? itd->scNum() : itm->scNum();
410 double x2 = (aflag!=4) ? itd->whNum() : itm->whNum();
411 double x3 = (aflag!=4) ? itd->stNum() : itm->stNum();
415 for(
int i=0;
i<7;
i++){
416 if(itd->code(
i)>=dr) dr=itd->quality(
i);
417 if(itm->code(
i)>=er) er=itm->quality(
i);
420 dr = (aflag==4)?0:dr;
421 er = (aflag==3)?0:er;
422 digi.
setRank((
float)dr,(
float)er);
431 double x1 = (aflag!=4) ? itd->getStrip() : itm->getStrip();
432 double x2 = (aflag!=4) ? itd->getKeyWG() : itm->getKeyWG();
433 double x3 = (aflag!=4) ? itd->getTrknmb(): itm->getTrknmb();
436 int dq = (aflag==4)?0:itd->getQuality();
437 int eq = (aflag==3)?0:itm->getQuality();
438 digi.
setRank((
float)dq,(
float)eq);
440 static const int kValidBitWidth = 1;
441 static const int kQualityBitWidth = 4;
442 static const int kPatternBitWidth = 4;
443 static const int kWireGroupBitWidth = 7;
444 static const int kHalfstripBitWidth = 8;
445 static const int kBendBitWidth = 1;
446 static const int kBxBitWidth = 1;
448 static const int kMPCLinkBitWidth = 2;
449 static const int kCSCIdBitWidth = 4;
451 unsigned shift = 0, dw = 0, ew = 0;
452 dw = itd->isValid() & ((1<<kValidBitWidth)-1);
453 dw += (itd->getQuality() & ((1<<kQualityBitWidth)-1)) <<
454 (shift += kValidBitWidth);
455 dw += (itd->getPattern() & ((1<<kPatternBitWidth)-1)) <<
456 (shift += kQualityBitWidth);
457 dw += (itd->getKeyWG() & ((1<<kWireGroupBitWidth)-1)) <<
458 (shift += kPatternBitWidth);
459 dw += (itd->getStrip() & ((1<<kHalfstripBitWidth)-1)) <<
460 (shift += kWireGroupBitWidth);
461 dw += (itd->getBend() & ((1<<kBendBitWidth)-1)) <<
462 (shift += kHalfstripBitWidth);
463 dw += (itd->getBX() & ((1<<kBxBitWidth)-1)) <<
464 (shift += kBendBitWidth);
465 dw += (itd->getMPCLink() & ((1<<kMPCLinkBitWidth)-1)) <<
466 (shift += kBxBitWidth);
467 dw += (itd->getCSCID() & ((1<<kCSCIdBitWidth)-1)) <<
468 (shift += kMPCLinkBitWidth);
470 ew = itm->isValid() & ((1<<kValidBitWidth)-1);
471 ew += (itm->getQuality() & ((1<<kQualityBitWidth)-1)) <<
472 (shift += kValidBitWidth);
473 ew += (itm->getPattern() & ((1<<kPatternBitWidth)-1)) <<
474 (shift += kQualityBitWidth);
475 ew += (itm->getKeyWG() & ((1<<kWireGroupBitWidth)-1)) <<
476 (shift += kPatternBitWidth);
477 ew += (itm->getStrip() & ((1<<kHalfstripBitWidth)-1)) <<
478 (shift += kWireGroupBitWidth);
479 ew += (itm->getBend() & ((1<<kBendBitWidth)-1)) <<
480 (shift += kHalfstripBitWidth);
481 ew += (itm->getBX() & ((1<<kBxBitWidth)-1)) <<
482 (shift += kBendBitWidth);
483 ew += (itm->getMPCLink() & ((1<<kMPCLinkBitWidth)-1)) <<
484 (shift += kBxBitWidth);
485 ew += (itm->getCSCID() & ((1<<kCSCIdBitWidth)-1)) <<
486 (shift += kMPCLinkBitWidth);
495 double x2 = (aflag!=4) ? itd->getKeyWG () : itm->getKeyWG ();
496 double x3 = (aflag!=4) ? itd->getTrknmb() : itm->getTrknmb();
498 int dq = (aflag==4)?0:itd->getQuality();
499 int eq = (aflag==3)?0:itm->getQuality();
500 digi.
setRank((
float)dq,(
float)eq);
502 static const int kValidBitWidth = 1;
503 static const int kQualityBitWidth = 2;
504 static const int kAccelBitWidth = 1;
505 static const int kPatternBBitWidth = 1;
506 static const int kWireGroupBitWidth = 7;
507 static const int kBxBitWidth = 5;
509 unsigned shift = 0, dw = 0, ew = 0;
510 dw = itd->isValid() & ((1<<kValidBitWidth)-1);
511 dw += (itd->getQuality() & ((1<<kQualityBitWidth)-1)) <<
512 (shift += kValidBitWidth);
513 dw += (itd->getAccelerator() & ((1<<kAccelBitWidth)-1)) <<
514 (shift += kQualityBitWidth);
515 dw += (itd->getCollisionB() & ((1<<kPatternBBitWidth)-1)) <<
516 (shift += kAccelBitWidth);
517 dw += (itd->getKeyWG() & ((1<<kWireGroupBitWidth)-1)) <<
518 (shift += kPatternBBitWidth);
519 dw += (itd->getBX() & ((1<<kBxBitWidth)-1)) <<
520 (shift += kWireGroupBitWidth);
522 ew = itm->isValid() & ((1<<kValidBitWidth)-1);
523 ew += (itm->getQuality() & ((1<<kQualityBitWidth)-1)) <<
524 (shift += kValidBitWidth);
525 ew += (itm->getAccelerator() & ((1<<kAccelBitWidth)-1)) <<
526 (shift += kQualityBitWidth);
527 ew += (itm->getCollisionB() & ((1<<kPatternBBitWidth)-1)) <<
528 (shift += kAccelBitWidth);
529 ew += (itm->getKeyWG() & ((1<<kWireGroupBitWidth)-1)) <<
530 (shift += kPatternBBitWidth);
531 ew += (itm->getBX() & ((1<<kBxBitWidth)-1)) <<
532 (shift += kWireGroupBitWidth);
540 double x1 = (aflag!=4) ? itd->getKeyStrip() : itm->getKeyStrip();
541 double x3 = (aflag!=4) ? itd->getTrknmb() : itm->getTrknmb();
543 int dq = (aflag==4)?0:itd->getQuality();
544 int eq = (aflag==3)?0:itm->getQuality();
545 digi.
setRank((
float)dq,(
float)eq);
547 static const int kValidBitWidth = 1;
548 static const int kQualityBitWidth = 3;
549 static const int kPatternBitWidth = 4;
550 static const int kBendBitWidth = 1;
551 static const int kHalfstripBitWidth = 5;
552 static const int kCFEBBitWidth = 3;
553 static const int kBxBitWidth = 2;
555 unsigned shift = 0, dw = 0, ew = 0;
556 dw = itd->isValid() & ((1<<kValidBitWidth)-1);
557 dw += (itd->getQuality() & ((1<<kQualityBitWidth)-1)) <<
558 (shift += kValidBitWidth);
559 dw += (itd->getPattern() & ((1<<kPatternBitWidth)-1)) <<
560 (shift += kQualityBitWidth);
561 dw += (itd->getBend() & ((1<<kBendBitWidth)-1)) <<
562 (shift += kPatternBitWidth);
563 dw += (itd->getStrip() & ((1<<kHalfstripBitWidth)-1)) <<
564 (shift += kBendBitWidth);
565 dw += (itd->getCFEB() & ((1<<kCFEBBitWidth)-1)) <<
566 (shift += kHalfstripBitWidth);
567 dw += (itd->getBX() & ((1<<kBxBitWidth)-1)) <<
568 (shift += kCFEBBitWidth);
570 ew = itm->isValid() & ((1<<kValidBitWidth)-1);
571 ew += (itm->getQuality() & ((1<<kQualityBitWidth)-1)) <<
572 (shift += kValidBitWidth);
573 ew += (itm->getPattern() & ((1<<kPatternBitWidth)-1)) <<
574 (shift += kQualityBitWidth);
575 ew += (itm->getBend() & ((1<<kBendBitWidth)-1)) <<
576 (shift += kPatternBitWidth);
577 ew += (itm->getStrip() & ((1<<kHalfstripBitWidth)-1)) <<
578 (shift += kBendBitWidth);
579 ew += (itm->getCFEB() & ((1<<kCFEBBitWidth)-1)) <<
580 (shift += kHalfstripBitWidth);
581 ew += (itm->getBX() & ((1<<kBxBitWidth)-1)) <<
582 (shift += kCFEBBitWidth);
592 x1 = (aflag!=4) ? itd->slot() : itm->slot();
604 template <
typename T>
typename
606 for ( ;first!=
last; first++)
607 if ( de_equal(*first,value) )
break;
622 template <
typename T>
627 template <
typename T>
629 return !de_equal(lhs,rhs);
632 template <>
inline bool
635 unsigned int mask = 0x0fff;
637 val &= ((lhs[lhs.sampleOfInterest()].raw()&mask) == (rhs[rhs.sampleOfInterest()].raw()&mask));
638 val &= (lhs.id().rawId() == rhs.id().rawId());
642 template <>
inline bool
645 unsigned int mask = 0x01ff;
646 val &= ((lhs.t0().raw()&mask) == (rhs.t0().raw()&mask));
647 val &= (lhs.id().rawId() == rhs.id().rawId());
651 template <>
inline bool
654 val &= (lhs.raw() == rhs.raw() );
655 val &= (lhs.rctCrate() == rhs.rctCrate());
656 val &= (lhs.isolated() == rhs.isolated());
657 val &= (lhs.index() == rhs.index() );
662 template <>
inline bool
665 val &= (lhs.et() == rhs.et() );
666 val &= (lhs.rctCrate() == rhs.rctCrate() );
667 val &= (lhs.rctRegionIndex() == rhs.rctRegionIndex());
668 val &= (lhs.id().isHf() == rhs.id().isHf());
669 if (!lhs.id().isHf()){
670 val &= (lhs.overFlow() == rhs.overFlow() );
671 val &= (lhs.tauVeto() == rhs.tauVeto() );
675 val &= (lhs.rctCard() == rhs.rctCard() );
677 val &= (lhs.fineGrain() == rhs.fineGrain());
682 template <>
inline bool
696 template <>
inline bool
699 val &= (lhs.whNum() ==rhs.whNum() );
700 val &= (lhs.scNum() ==rhs.scNum() );
701 val &= (lhs.stNum() ==rhs.stNum() );
704 val &= (lhs.code() ==rhs.code() );
705 val &= (lhs.Ts2Tag()==rhs.Ts2Tag());
711 template <>
inline bool
714 val &= (lhs.whNum() ==rhs.whNum() );
715 val &= (lhs.scNum() ==rhs.scNum() );
716 val &= (lhs.stNum() ==rhs.stNum() );
726 template <>
inline bool
729 val &= (lhs.type_idx() == rhs.type_idx());
730 val &= (lhs.bx() == rhs.bx());
732 unsigned int dw = lhs.getDataWord();
733 unsigned int ew = rhs.getDataWord();
734 unsigned int mask = 0xffffffff;
738 if(rhs.type_idx()==1 || rhs.type_idx()==3)
740 dw &= mask; ew &= mask;
747 template <>
inline bool
752 unsigned int dw = rhs.getDataWord();
753 unsigned int ew = lhs.getDataWord();
754 unsigned int mask = 0x3ffffff;
756 mask &= (~(0x0c00000));
757 dw &= mask; ew &= mask;
762 template <>
inline bool
768 val &= (lhs.isValid() == rhs.isValid() );
769 val &= (lhs.getQuality() == rhs.getQuality());
770 val &= (lhs.getKeyWG() == rhs.getKeyWG() );
771 val &= (lhs.getStrip() == rhs.getStrip() );
772 val &= (lhs.getPattern() == rhs.getPattern());
773 val &= (lhs.getBend() == rhs.getBend() );
774 val &= (lhs.getBX() == rhs.getBX() );
775 val &= (lhs.getMPCLink() == rhs.getMPCLink());
776 val &= (lhs.getCSCID() == rhs.getCSCID() );
780 template <>
inline bool
784 template <>
inline bool
788 template <>
inline bool
791 val &= (lhs.slot() == rhs.slot());
792 val &= (lhs.BXN () == rhs.BXN ());
793 val &= (lhs.FMM () == rhs.FMM ());
794 val &= (lhs.SEs () == rhs.SEs ());
795 val &= (lhs.SMs () == rhs.SMs ());
796 val &= (lhs.BXs () == rhs.BXs ());
797 val &= (lhs.AFs () == rhs.AFs ());
798 val &= (lhs.VPs () == rhs.VPs ());
804 template <
typename T>
809 template <
typename T>
811 return !de_equal_loc(lhs,rhs);
815 template <>
inline bool
818 val &= (lhs.id().zside() == rhs.id().zside() );
819 val &= (lhs.id().ietaAbs() == rhs.id().ietaAbs());
820 val &= (lhs.id().iphi() == rhs.id().iphi() );
824 template <>
inline bool
827 val &= (lhs.id().zside() == rhs.id().zside() );
828 val &= (lhs.id().ietaAbs() == rhs.id().ietaAbs());
829 val &= (lhs.id().iphi() == rhs.id().iphi() );
833 template <>
inline bool
836 val &= (lhs.rctCrate() == rhs.rctCrate());
837 val &= (lhs.rctCard() == rhs.rctCard());
838 val &= (lhs.rctRegion() == rhs.rctRegion());
842 template <>
inline bool
845 val &= (lhs.rctCrate() == rhs.rctCrate() );
846 val &= (lhs.id().isHf() == rhs.id().isHf());
847 if (!lhs.id().isHf())
848 val &= (lhs.rctCard() == rhs.rctCard() );
849 val &= (lhs.rctRegionIndex() == rhs.rctRegionIndex());
853 template <>
inline bool
856 val &= (lhs.etaIndex() == rhs.etaIndex());
857 val &= (lhs.phiIndex() == rhs.phiIndex());
860 template <>
inline bool
863 val &= (lhs.etaIndex() == rhs.etaIndex());
864 val &= (lhs.phiIndex() == rhs.phiIndex());
868 template <>
inline bool
872 template <>
inline bool
875 val &= (lhs.phi() == rhs.phi());
878 template <>
inline bool
882 template <>
inline bool
885 val &= (lhs.phi() == rhs.phi());
888 template <>
inline bool
892 template <>
inline bool
896 template <>
inline bool
902 template <>
inline bool
905 val &= (lhs.phi_packed() ==rhs.phi_packed() );
906 val &= (lhs.eta_packed() ==rhs.eta_packed() );
912 template <>
inline bool
915 val &= (lhs.phiIndex() ==rhs.phiIndex() );
916 val &= (lhs.etaIndex() ==rhs.etaIndex() );
920 template <>
inline bool
923 val &= (lhs.whNum() ==rhs.whNum() );
924 val &= (lhs.scNum() ==rhs.scNum() );
925 val &= (lhs.stNum() ==rhs.stNum() );
932 template <>
inline bool
935 val &= (lhs.whNum() ==rhs.whNum() );
936 val &= (lhs.scNum() ==rhs.scNum() );
937 val &= (lhs.stNum() ==rhs.stNum() );
942 template <>
inline bool
945 val &= (lhs.getCSCID() == rhs.getCSCID() );
946 val &= (lhs.getStrip() == rhs.getStrip() );
947 val &= (lhs.getKeyWG() == rhs.getKeyWG() );
951 template <>
inline bool
954 val &= (lhs.getTrknmb() == rhs.getTrknmb() );
955 val &= (lhs.getKeyWG() == rhs.getKeyWG() );
958 template <>
inline bool
961 val &= (lhs.getTrknmb() == rhs.getTrknmb() );
962 val &= (lhs.getKeyStrip() == rhs.getKeyStrip() );
965 template <>
inline bool
968 val &= (lhs.slot() == rhs.slot());
974 template <
typename T>
983 unsigned int raw = it->sample(it->sampleOfInterest()).raw();
984 unsigned int mask = 0x0fff;
989 unsigned int ttf = it->ttFlag();
990 val |= ((ttf!=0x1) && (ttf!=0x3));
997 unsigned int mask = 0x01ff;
998 return ( it->size()==0 || ((it->t0().raw()&mask)==0) || it->SOI_compressedEt()==0 );
1003 return ((it->rank())==0);
1009 return ((it->et())==0);
1015 return (it->empty());
1020 return (it->empty());
1034 return (it->bxNum() != 0 || it->code() == 7);
1040 return (it->whNum()==0 && it->scNum()==0 && it->stNum()==0);
1049 if(it->type_idx()==1 || it->type_idx()==3)
1053 return (it->empty());
1061 return (it->empty());
1068 return !(it->isValid());
1072 return !(it->isValid());
1076 return !(it->isValid());
1082 it->slot() | it->BXN () | it->FMM () | it->SEs () |
1083 it->SMs () | it->BXs () | it->AFs () | it->VPs ();
1089 template <
typename T>
1091 std::stringstream
ss;
1092 ss <<
"[DEutils<T>::print()] specialization still missing for collection!";
1100 std::stringstream
ss;
1101 ss <<
"0x" << std::setw(4) << std::setfill(
'0') << std::hex
1102 << it->sample(it->sampleOfInterest()).raw()
1104 <<
", et:" << std::setw(3) << it->compressedEt()
1105 <<
", fg:" << std::setw(1) << it->fineGrain()
1106 <<
", ttf:" << std::setw(2) << it->ttFlag()
1107 <<
", sdet:" << ((it->id().subDet()==
EcalBarrel)?(
"Barrel"):(
"Endcap"))
1108 <<
", iz:" << ((it->id().zside()>0)?(
"+"):(
"-"))
1109 <<
", ieta:" << std::setw(2) << it->id().ietaAbs()
1110 <<
", iphi:" << std::setw(2) << it->id().iphi()
1118 std::stringstream
ss;
1119 ss <<
"0x" << std::setw(4) << std::setfill(
'0') << std::hex
1122 <<
", et:" << std::setw(3) << it->SOI_compressedEt()
1123 <<
", fg:" << std::setw(1) << it->SOI_fineGrain()
1124 <<
", sdet:" << it->id().subdet()
1125 <<
", iz:" << ((it->id().zside()>0)?(
"+"):(
"-"))
1126 <<
", ieta:" << std::setw(2) << it->id().ietaAbs()
1127 <<
", iphi:" << std::setw(2) << it->id().iphi()
1135 std::stringstream
ss;
1136 ss <<
"0x" << std::setw(4) << std::setfill(
'0') << std::hex << it->raw()
1137 <<
", rank=0x"<< std::setw(2) << std::hex << it->rank()
1139 <<
", region:"<< std::setw(1) << it->rctRegion()
1140 <<
", card:" << std::setw(1) << it->rctCard()
1141 <<
", crate:" << std::setw(2) << it->rctCrate()
1142 <<
", ieta:" << std::setw(2) << it->regionId().ieta()
1143 <<
", iphi:" << std::setw(2) << it->regionId().iphi()
1146 <<
", iso:" << std::setw(1) << it->isolated()
1147 <<
", index:" << std::setw(1) << it->index()
1148 <<
", bx:" << it->bx()
1156 std::stringstream
ss;
1157 ss <<
"L1CaloRegion:"
1158 <<
" et=" << it->et()
1159 <<
" o/f=" << it->overFlow()
1160 <<
" f/g=" << it->fineGrain()
1161 <<
" tau=" << it->tauVeto()
1162 <<
" rct(crate=" << it->rctCrate()
1163 <<
" card=" << it->rctCard()
1164 <<
" rgn=" << it->rctRegionIndex()
1165 <<
" eta=" << it->rctEta()
1166 <<
" phi=" << it->rctPhi()
1168 <<
"gct(eta=" << it->gctEta()
1169 <<
" phi=" << it->gctPhi()
1171 << std::hex <<
" cap_block=" << it->capBlock()
1172 <<
std::dec <<
" index=" << it->capIndex()
1173 <<
" bx=" << it->bx()
1182 std::stringstream
ss;
1185 ss <<
"0x" << std::setw(4) << std::setfill(
'0') << std::hex << it->raw()
1186 <<
", rank=0x"<< std::setw(2) << std::hex << it->rank()
1188 <<
", etaSign:" << it->etaSign()
1189 <<
", eta:" << (it->etaIndex()&0x7)
1190 <<
", phi:" << std::setw(2) << it->phiIndex()
1191 <<
" (ieta:" << std::setw(2) << it->regionId().ieta()
1192 <<
",iphi:" << std::setw(2) << it->regionId().iphi() <<
")"
1193 <<
", iso:" << it->isolated()
1194 <<
", cap block:" << std::setw(3) << it->capBlock()
1195 <<
", index:" << it->capIndex()
1196 <<
", bx:" << it->bx()
1211 std::stringstream
ss;
1212 ss <<
"0x" << std::setw(4) << std::setfill(
'0') << std::hex << it->raw()
1213 <<
" " << *it <<
std::dec << std::endl;
1226 std::stringstream
ss;
1228 <<
" bxNum:" << it->bxNum()
1229 <<
" whNum:" << it->whNum()
1230 <<
" scNum:" << it->scNum()
1231 <<
" stNum:" << it->stNum()
1232 <<
" phi:" << it->phi()
1233 <<
" phiB:" << it->phiB()
1234 <<
" code:" << it->code()
1235 <<
" Ts2Tag:" << it->Ts2Tag()
1236 <<
" BxCnt:" << it->BxCnt()
1244 std::stringstream
ss;
1246 <<
" bxNum:" << it->bxNum()
1247 <<
" whNum:" << it->whNum()
1248 <<
" scNum:" << it->scNum()
1249 <<
" stNum:" << it->stNum()
1257 std::stringstream
ss;
1259 ss << std::setiosflags(std::ios::showpoint | std::ios::fixed | std::ios::right | std::ios::adjustfield);
1260 ss << std::hex << std::setfill(
'0')
1261 <<
" 0x" << std::setw(8) << it->getDataWord();
1263 ss << std::hex << std::setfill(
'0')
1264 <<
" pt:0x" << std::setw(2) << it->pt_packed()
1265 <<
" phi:0x"<< std::setw(2) << it->phi_packed()
1266 <<
" eta:0x"<< std::setw(2) << it->eta_packed();
1272 ss <<
std::dec << std::setfill(
' ')
1273 <<
" qua:" << std::setw(1) << it->quality()
1274 <<
" cha:" << std::setw(2) << it->chargeValue()
1275 <<
" chav:" << std::setw(1) << it->chargeValid()
1276 <<
" fh:" << std::setw(1) << it->isFineHalo()
1277 <<
" bx:" << std::setw(4) << it->bx()
1278 <<
" [id:" << std::setw(1) << it->type_idx() <<
"]"
1286 std::stringstream
ss;
1287 ss << std::setiosflags(std::ios::showpoint | std::ios::fixed | std::ios::right | std::ios::adjustfield);
1289 ss << std::hex << std::setfill(
'0')
1290 <<
" 0x" << std::setw(7) << it->getDataWord();
1292 ss << std::hex << std::setfill(
'0')
1293 <<
" pt:0x" << std::setw(2) << it->ptIndex()
1294 <<
" eta:0x"<< std::setw(2) << it->etaIndex()
1295 <<
" phi:0x"<< std::setw(3) << it->phiIndex();
1301 ss <<
std::dec << std::setfill(
' ')
1302 <<
" cha:" << std::setw(2) << it->charge()
1303 <<
" qua:" << std::setw(3) << it->quality()
1304 <<
" iso:" << std::setw(1) << it->isol()
1305 <<
" mip:" << std::setw(1) << it->mip()
1306 <<
" bx:" << it->bx()
1314 std::stringstream
ss;
1333 std::stringstream
ss;
1342 std::stringstream
ss;
1351 std::stringstream
ss;
1353 <<
" slot:"<< it->slot()
1354 <<
" bxn:" << it->BXN ()
1355 <<
" fmm:" << it->FMM ()
1356 <<
" ses:" << it->SEs ()
1357 <<
" sms:" << it->SMs ()
1358 <<
" bxs:" << it->BXs ()
1359 <<
" afs:" << it->AFs ()
1360 <<
" vps:" << it->VPs ()
1367 template <
typename T>
1370 const int nlabel = 17;
1372 return "un-defined" ;
1378 str[1] =
"EcalTrigPrimDigiCollection";
1379 str[2] =
"EcalTriggerPrimitiveDigi";
1383 str[1] =
"HcalTrigPrimDigiCollection";
1384 str[2] =
"HcalTriggerPrimitiveDigi";
1388 str[1] =
"L1CaloEmCollection";
1389 str[2] =
"L1CaloEmCand";
1392 str[0] =
"RCT region";
1393 str[1] =
"L1CaloRegionCollection";
1394 str[2] =
"L1CaloRegion";
1397 str[0] =
"GCT em isolated";
1398 str[1] =
"L1GctEmCandCollection";
1399 str[2] =
"L1GctEmCand";
1402 str[0] =
"GCT em non-isolated";
1403 str[1] =
"L1GctEmCandCollection";
1404 str[2] =
"L1GctEmCand";
1407 str[0] =
"GCT central jet";
1408 str[1] =
"L1GctJetCandCollection";
1409 str[2] =
"L1GctJetCand";
1412 str[0] =
"GCT forward jet";
1413 str[1] =
"L1GctJetCandCollection";
1414 str[2] =
"L1GctJetCand";
1417 str[0] =
"GCT tau jet";
1418 str[1] =
"L1GctJetCandCollection";
1419 str[2] =
"L1GctJetCand";
1422 str[0] =
"Stage1Layer2 iso-tau jet";
1423 str[1] =
"L1GctJetCandCollection";
1424 str[2] =
"L1GctJetCand";
1428 str[1] =
"L1GctEtHadCollection";
1429 str[2] =
"L1GctEtHad";
1432 str[0] =
"GCT et miss";
1433 str[1] =
"L1GctEtMissCollection";
1434 str[2] =
"L1GctEtMiss";
1437 str[0] =
"GCT et total";
1438 str[1] =
"L1GctEtTotalCollection";
1439 str[2] =
"L1GctEtTotal";
1442 str[0] =
"GCT ht miss";
1443 str[1] =
"L1GctHtMissCollection";
1444 str[2] =
"L1GctHtMiss";
1447 str[0] =
"GCT hf ring";
1448 str[1] =
"L1GctHFRingEtSumsCollection";
1449 str[2] =
"L1GctHFRingEtSums";
1452 str[0] =
"GCT hf bit counts";
1453 str[1] =
"L1GctHFBitCountsCollection";
1454 str[2] =
"L1GctHFBitCounts";
1458 str[0] =
"DT tp phi";
1459 str[1] =
"L1MuDTChambPhDigiCollection";
1460 str[2] =
"L1MuDTChambPhDigi";
1463 str[0] =
"DT tp theta";
1464 str[1] =
"L1MuDTChambThDigiCollection";
1465 str[2] =
"L1MuDTChambThDigi";
1469 str[1] =
"CSCALCTDigiCollection";
1470 str[2] =
"CSCALCTDigi";
1474 str[1] =
"CSCCLCTDigiCollection";
1475 str[2] =
"CSCCLCTDigi";
1479 str[1] =
"CSCCorrelatedLCTDigiCollection";
1480 str[2] =
"CSCCorrelatedLCTDigi";
1483 str[0] =
"CSC tf status";
1484 str[1] =
"L1CSCSPStatusDigiCollection_";
1485 str[2] =
"L1CSCSPStatusDigi";
1488 str[0] =
"Mu reg tf";
1489 str[1] =
"L1MuRegionalCandCollection";
1490 str[2] =
"L1MuRegionalCand";
1494 str[1] =
"LTCDigiCollection";
1498 str[0] =
"GMT cand";
1499 str[1] =
"L1MuGMTCandCollection";
1500 str[2] =
"L1MuGMTCand";
1503 str[0] =
"GMT record";
1504 str[1] =
"L1MuGMTReadoutRecordCollection";
1505 str[2] =
"L1MuGMTReadoutRecord";
1519 template <
typename T>
1520 struct de_rank :
public DEutils<T> ,
public std::binary_function<typename DEutils<T>::cand_type, typename DEutils<T>::cand_type, bool> {
1534 if (
x.rank() !=
y.rank()) {
1535 return (
x.rank() <
y.rank()) ;
1536 }
else if(
x.isolated() !=
y.isolated()) {
1537 return (
x.isolated())?1:0;
1538 }
else if(
x.rctRegion() !=
y.rctRegion()){
1539 return (
x.rctRegion() <
y.rctRegion());
1540 }
else if(
x.rctCrate() !=
y.rctCrate()) {
1541 return (
x.rctCrate() <
y.rctCrate()) ;
1542 }
else if(
x.rctCard() !=
y.rctCard()) {
1543 return (
x.rctCard() <
y.rctCard()) ;
1545 return x.raw() <
y.raw();
1567 if(x.bx()!=y.bx()){
return x.bx() < y.bx();}
1568 else if(x.ptIndex()!=y.ptIndex()){
return x.ptIndex() < y.ptIndex();}
1569 else{
return x.quality() < y.quality();}
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)
bool de_nequal(const cand_type &, const cand_type &)
bool de_nequal_loc(const cand_type &, const cand_type &)
T x() const
Cartesian x coordinate.
bool is_empty(col_cit) const
— candidate emptiness definition —
void setDEpair(const L1MonitorDigi &d, const L1MonitorDigi &e)
std::string print(col_cit) const
— print candidate —
bool de_equal_loc(const cand_type &, const cand_type &)
— candidate location-match definition —
char data[epos_bytes_allocation]
col_it de_find(col_it, col_it, const cand_type &)
— find candidate —
static unsigned int const shift
de_trait::cand_type cand_type
std::string GetName(int i=0) const
— name candidate —
bool operator()(const cand_type &x, const cand_type &y) const
bool de_equal(const cand_type &, const cand_type &)
— candidate match definition —