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);
146 double x1, x2, x3(0.);
147 x1 = (aflag!=4) ? itd->id().iphi() : itm->id().iphi();
148 x2 = (aflag!=4) ? itd->id().ieta() : itm->id().ieta();
149 x3 = (aflag!=4) ? itd->id().rctCard() : itm->id().rctCard();
151 unsigned int dw = itd->raw();
152 unsigned int ew = itm->raw();
153 unsigned int mask = 0x3fff;
157 dw += (((itd->id().ieta())&0x1f)<<14);
158 dw += (((itd->id().iphi())&0x1f)<<19);
160 ew += (((itm->id().ieta())&0x1f)<<14);
161 ew += (((itm->id().iphi())&0x1f)<<19);
162 dw = (aflag==4)?0:dw;
163 ew = (aflag==3)?0:ew;
166 int de = (aflag==4)?0:itd->et();
167 int ee = (aflag==3)?0:itm->et();
168 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();
182 dw &= 0x7fff; ew &= 0x7fff;
184 int de = (aflag==4)?0:itd->rank();
185 int ee = (aflag==3)?0:itm->rank();
186 digi.
setRank((
float)de,(
float)ee);
195 double x1 = (aflag!=4) ? itd->phiIndex() : itm->phiIndex();
196 unsigned deta(0), eeta(0);
197 if (!itd->isForward()) deta=(itd->etaSign()==1?10-(itd->etaIndex()&0x7):(itd->etaIndex()&0x7)+11);
198 else deta=(itd->etaSign()==1? 3-(itd->etaIndex()&0x7):(itd->etaIndex()&0x7)+18 );
199 if (!itm->isForward()) eeta=(itm->etaSign()==1?10-(itm->etaIndex()&0x7):(itm->etaIndex()&0x7)+11);
200 else eeta=(itm->etaSign()==1? 3-(itm->etaIndex()&0x7):(itm->etaIndex()&0x7)+18 );
201 double x2 = (aflag!=4) ? deta : eeta;
203 unsigned int dw = (aflag==4)?0:itd->raw();
204 unsigned int ew = (aflag==3)?0:itm->raw();
205 dw &= 0x7fff; ew &= 0x7fff;
207 int de = (aflag==4)?0:itd->rank();
208 int ee = (aflag==3)?0:itm->rank();
209 digi.
setRank((
float)de,(
float)ee);
216 double x1 = 0;
double x2 = 0;
218 unsigned int dw = (aflag==4)?0:itd->raw();
219 unsigned int ew = (aflag==3)?0:itm->raw();
220 dw &= 0x1fff; ew &= 0x1fff;
222 int de = (aflag==4)?0:itd->et();
223 int ee = (aflag==3)?0:itm->et();
224 digi.
setRank((
float)de,(
float)ee);
231 double x1 = (aflag!=4) ? itd->phi() : itm->phi();
234 unsigned int dw = (aflag==4)?0:itd->raw();
235 unsigned int ew = (aflag==3)?0:itm->raw();
236 dw &= 0x8f1fff; ew &= 0x8f1fff;
238 int de = (aflag==4)?0:itd->et();
239 int ee = (aflag==3)?0:itm->et();
240 digi.
setRank((
float)de,(
float)ee);
248 double x1 = 0;
double x2 = 0;
250 unsigned int dw = (aflag==4)?0:itd->raw();
251 unsigned int ew = (aflag==3)?0:itm->raw();
252 dw &= 0x1fff; ew &= 0x1fff;
254 int de = (aflag==4)?0:itd->et();
255 int ee = (aflag==3)?0:itm->et();
256 digi.
setRank((
float)de,(
float)ee);
263 double x1 = 0;
double x2 = 0;
265 unsigned int dw = (aflag==4)?0:itd->raw();
266 unsigned int ew = (aflag==3)?0:itm->raw();
268 int de = 0;
int ee = 0;
269 digi.
setRank((
float)de,(
float)ee);
276 double x1 = 0;
double x2 = 0;
278 unsigned int dw = (aflag==4)?0:itd->raw();
279 unsigned int ew = (aflag==3)?0:itm->raw();
281 int de = 0;
int ee = 0;
282 digi.
setRank((
float)de,(
float)ee);
289 double x1 = (aflag!=4) ? itd->phi() : itm->phi();
292 unsigned int dw = (aflag==4)?0:itd->raw();
293 unsigned int ew = (aflag==3)?0:itm->raw();
294 dw &= 0x8f1fff; ew &= 0x8f1fff;
296 int de = (aflag==4)?0:itd->et();
297 int ee = (aflag==3)?0:itm->et();
298 digi.
setRank((
float)de,(
float)ee);
306 double x1 = 0;
double x2 = 0;
308 unsigned int dw = (aflag==4)?0:itd->raw0();
309 unsigned int ew = (aflag==3)?0:itm->raw0();
311 int de = 0;
int ee = 0;
312 digi.
setRank((
float)de,(
float)ee);
318 switch(itd->type_idx()) {
329 double x1 = (aflag!=4) ? itd->phi_packed() : itm->phi_packed();
330 double x2 = (aflag!=4) ? itd->eta_packed() : itm->eta_packed();
332 unsigned int dw = (aflag==4)?0 : itd->getDataWord();
333 unsigned int ew = (aflag==3)?0 : itm->getDataWord();
334 unsigned int mask = 0xffffffff;
339 dw &= mask; ew &= mask;
341 int de = (aflag==4)?0:itd->pt_packed();
342 int ee = (aflag==3)?0:itm->pt_packed();
343 digi.
setRank((
float)de,(
float)ee);
347 std::cout <<
"L1DataEmulDigi DEutils<L1MuRegionalCandCollection>] dedigi info"
350 <<
" phipackd:" << itd->phi_packed() <<
"," << itm->phi_packed()
351 <<
" etapackd:" << itd->eta_packed() <<
"," << itm->eta_packed()
362 double x1 = (aflag!=4) ? itd->phiIndex() : itm->phiIndex();
363 double x2 = (aflag!=4) ? itd->etaIndex() : itm->etaIndex();
365 unsigned int dw = (aflag==4)?0 : itd->getDataWord();
366 unsigned int ew = (aflag==3)?0 : itm->getDataWord();
367 unsigned int mask = 0x3ffffff;
369 mask &= (~(0x0c00000));
370 dw &= mask; ew &= mask;
372 int de = (aflag==4)?0:itd->ptIndex();
373 int ee = (aflag==3)?0:itm->ptIndex();
374 digi.
setRank((
float)de,(
float)ee);
376 std::cout <<
"l1dataemuldigi l1mugmtcandcoll type:" << cid
379 << std::hex <<
" word d:" << dw <<
"e:" << ew <<
std::dec
388 double x1 = (aflag!=4) ? itd->scNum() : itm->scNum();
389 double x2 = (aflag!=4) ? itd->whNum() : itm->whNum();
390 double x3 = (aflag!=4) ? itd->stNum() : itm->stNum();
394 int dr = (aflag==4)?0:itd->code();
395 int er = (aflag==3)?0:itm->code();
396 digi.
setRank((
float)dr,(
float)er);
404 double x1 = (aflag!=4) ? itd->scNum() : itm->scNum();
405 double x2 = (aflag!=4) ? itd->whNum() : itm->whNum();
406 double x3 = (aflag!=4) ? itd->stNum() : itm->stNum();
410 for(
int i=0;
i<7;
i++){
411 if(itd->code(
i)>=dr) dr=itd->quality(
i);
412 if(itm->code(
i)>=er) er=itm->quality(
i);
415 dr = (aflag==4)?0:dr;
416 er = (aflag==3)?0:er;
417 digi.
setRank((
float)dr,(
float)er);
426 double x1 = (aflag!=4) ? itd->getStrip() : itm->getStrip();
427 double x2 = (aflag!=4) ? itd->getKeyWG() : itm->getKeyWG();
428 double x3 = (aflag!=4) ? itd->getTrknmb(): itm->getTrknmb();
431 int dq = (aflag==4)?0:itd->getQuality();
432 int eq = (aflag==3)?0:itm->getQuality();
433 digi.
setRank((
float)dq,(
float)eq);
435 static const int kValidBitWidth = 1;
436 static const int kQualityBitWidth = 4;
437 static const int kPatternBitWidth = 4;
438 static const int kWireGroupBitWidth = 7;
439 static const int kHalfstripBitWidth = 8;
440 static const int kBendBitWidth = 1;
441 static const int kBxBitWidth = 1;
443 static const int kMPCLinkBitWidth = 2;
444 static const int kCSCIdBitWidth = 4;
446 unsigned shift = 0, dw = 0, ew = 0;
447 dw = itd->isValid() & ((1<<kValidBitWidth)-1);
448 dw += (itd->getQuality() & ((1<<kQualityBitWidth)-1)) <<
449 (shift += kValidBitWidth);
450 dw += (itd->getPattern() & ((1<<kPatternBitWidth)-1)) <<
451 (shift += kQualityBitWidth);
452 dw += (itd->getKeyWG() & ((1<<kWireGroupBitWidth)-1)) <<
453 (shift += kPatternBitWidth);
454 dw += (itd->getStrip() & ((1<<kHalfstripBitWidth)-1)) <<
455 (shift += kWireGroupBitWidth);
456 dw += (itd->getBend() & ((1<<kBendBitWidth)-1)) <<
457 (shift += kHalfstripBitWidth);
458 dw += (itd->getBX() & ((1<<kBxBitWidth)-1)) <<
459 (shift += kBendBitWidth);
460 dw += (itd->getMPCLink() & ((1<<kMPCLinkBitWidth)-1)) <<
461 (shift += kBxBitWidth);
462 dw += (itd->getCSCID() & ((1<<kCSCIdBitWidth)-1)) <<
463 (shift += kMPCLinkBitWidth);
465 ew = itm->isValid() & ((1<<kValidBitWidth)-1);
466 ew += (itm->getQuality() & ((1<<kQualityBitWidth)-1)) <<
467 (shift += kValidBitWidth);
468 ew += (itm->getPattern() & ((1<<kPatternBitWidth)-1)) <<
469 (shift += kQualityBitWidth);
470 ew += (itm->getKeyWG() & ((1<<kWireGroupBitWidth)-1)) <<
471 (shift += kPatternBitWidth);
472 ew += (itm->getStrip() & ((1<<kHalfstripBitWidth)-1)) <<
473 (shift += kWireGroupBitWidth);
474 ew += (itm->getBend() & ((1<<kBendBitWidth)-1)) <<
475 (shift += kHalfstripBitWidth);
476 ew += (itm->getBX() & ((1<<kBxBitWidth)-1)) <<
477 (shift += kBendBitWidth);
478 ew += (itm->getMPCLink() & ((1<<kMPCLinkBitWidth)-1)) <<
479 (shift += kBxBitWidth);
480 ew += (itm->getCSCID() & ((1<<kCSCIdBitWidth)-1)) <<
481 (shift += kMPCLinkBitWidth);
490 double x2 = (aflag!=4) ? itd->getKeyWG () : itm->getKeyWG ();
491 double x3 = (aflag!=4) ? itd->getTrknmb() : itm->getTrknmb();
493 int dq = (aflag==4)?0:itd->getQuality();
494 int eq = (aflag==3)?0:itm->getQuality();
495 digi.
setRank((
float)dq,(
float)eq);
497 static const int kValidBitWidth = 1;
498 static const int kQualityBitWidth = 2;
499 static const int kAccelBitWidth = 1;
500 static const int kPatternBBitWidth = 1;
501 static const int kWireGroupBitWidth = 7;
502 static const int kBxBitWidth = 5;
504 unsigned shift = 0, dw = 0, ew = 0;
505 dw = itd->isValid() & ((1<<kValidBitWidth)-1);
506 dw += (itd->getQuality() & ((1<<kQualityBitWidth)-1)) <<
507 (shift += kValidBitWidth);
508 dw += (itd->getAccelerator() & ((1<<kAccelBitWidth)-1)) <<
509 (shift += kQualityBitWidth);
510 dw += (itd->getCollisionB() & ((1<<kPatternBBitWidth)-1)) <<
511 (shift += kAccelBitWidth);
512 dw += (itd->getKeyWG() & ((1<<kWireGroupBitWidth)-1)) <<
513 (shift += kPatternBBitWidth);
514 dw += (itd->getBX() & ((1<<kBxBitWidth)-1)) <<
515 (shift += kWireGroupBitWidth);
517 ew = itm->isValid() & ((1<<kValidBitWidth)-1);
518 ew += (itm->getQuality() & ((1<<kQualityBitWidth)-1)) <<
519 (shift += kValidBitWidth);
520 ew += (itm->getAccelerator() & ((1<<kAccelBitWidth)-1)) <<
521 (shift += kQualityBitWidth);
522 ew += (itm->getCollisionB() & ((1<<kPatternBBitWidth)-1)) <<
523 (shift += kAccelBitWidth);
524 ew += (itm->getKeyWG() & ((1<<kWireGroupBitWidth)-1)) <<
525 (shift += kPatternBBitWidth);
526 ew += (itm->getBX() & ((1<<kBxBitWidth)-1)) <<
527 (shift += kWireGroupBitWidth);
535 double x1 = (aflag!=4) ? itd->getKeyStrip() : itm->getKeyStrip();
536 double x3 = (aflag!=4) ? itd->getTrknmb() : itm->getTrknmb();
538 int dq = (aflag==4)?0:itd->getQuality();
539 int eq = (aflag==3)?0:itm->getQuality();
540 digi.
setRank((
float)dq,(
float)eq);
542 static const int kValidBitWidth = 1;
543 static const int kQualityBitWidth = 3;
544 static const int kPatternBitWidth = 4;
545 static const int kBendBitWidth = 1;
546 static const int kHalfstripBitWidth = 5;
547 static const int kCFEBBitWidth = 3;
548 static const int kBxBitWidth = 2;
550 unsigned shift = 0, dw = 0, ew = 0;
551 dw = itd->isValid() & ((1<<kValidBitWidth)-1);
552 dw += (itd->getQuality() & ((1<<kQualityBitWidth)-1)) <<
553 (shift += kValidBitWidth);
554 dw += (itd->getPattern() & ((1<<kPatternBitWidth)-1)) <<
555 (shift += kQualityBitWidth);
556 dw += (itd->getBend() & ((1<<kBendBitWidth)-1)) <<
557 (shift += kPatternBitWidth);
558 dw += (itd->getStrip() & ((1<<kHalfstripBitWidth)-1)) <<
559 (shift += kBendBitWidth);
560 dw += (itd->getCFEB() & ((1<<kCFEBBitWidth)-1)) <<
561 (shift += kHalfstripBitWidth);
562 dw += (itd->getBX() & ((1<<kBxBitWidth)-1)) <<
563 (shift += kCFEBBitWidth);
565 ew = itm->isValid() & ((1<<kValidBitWidth)-1);
566 ew += (itm->getQuality() & ((1<<kQualityBitWidth)-1)) <<
567 (shift += kValidBitWidth);
568 ew += (itm->getPattern() & ((1<<kPatternBitWidth)-1)) <<
569 (shift += kQualityBitWidth);
570 ew += (itm->getBend() & ((1<<kBendBitWidth)-1)) <<
571 (shift += kPatternBitWidth);
572 ew += (itm->getStrip() & ((1<<kHalfstripBitWidth)-1)) <<
573 (shift += kBendBitWidth);
574 ew += (itm->getCFEB() & ((1<<kCFEBBitWidth)-1)) <<
575 (shift += kHalfstripBitWidth);
576 ew += (itm->getBX() & ((1<<kBxBitWidth)-1)) <<
577 (shift += kCFEBBitWidth);
587 x1 = (aflag!=4) ? itd->slot() : itm->slot();
599 template <
typename T>
typename
601 for ( ;first!=
last; first++)
602 if ( de_equal(*first,value) )
break;
617 template <
typename T>
622 template <
typename T>
624 return !de_equal(lhs,rhs);
627 template <>
inline bool
630 unsigned int mask = 0x0fff;
632 val &= ((lhs[lhs.sampleOfInterest()].raw()&mask) == (rhs[rhs.sampleOfInterest()].raw()&mask));
633 val &= (lhs.id().rawId() == rhs.id().rawId());
637 template <>
inline bool
640 unsigned int mask = 0x01ff;
641 val &= ((lhs.t0().raw()&mask) == (rhs.t0().raw()&mask));
642 val &= (lhs.id().rawId() == rhs.id().rawId());
646 template <>
inline bool
649 val &= (lhs.raw() == rhs.raw() );
650 val &= (lhs.rctCrate() == rhs.rctCrate());
651 val &= (lhs.isolated() == rhs.isolated());
652 val &= (lhs.index() == rhs.index() );
657 template <>
inline bool
660 val &= (lhs.et() == rhs.et() );
661 val &= (lhs.rctCrate() == rhs.rctCrate() );
662 val &= (lhs.rctRegionIndex() == rhs.rctRegionIndex());
663 val &= (lhs.id().isHf() == rhs.id().isHf());
664 if (!lhs.id().isHf()){
665 val &= (lhs.overFlow() == rhs.overFlow() );
666 val &= (lhs.tauVeto() == rhs.tauVeto() );
670 val &= (lhs.rctCard() == rhs.rctCard() );
672 val &= (lhs.fineGrain() == rhs.fineGrain());
677 template <>
inline bool
690 template <>
inline bool
693 val &= (lhs.whNum() ==rhs.whNum() );
694 val &= (lhs.scNum() ==rhs.scNum() );
695 val &= (lhs.stNum() ==rhs.stNum() );
698 val &= (lhs.code() ==rhs.code() );
699 val &= (lhs.Ts2Tag()==rhs.Ts2Tag());
705 template <>
inline bool
708 val &= (lhs.whNum() ==rhs.whNum() );
709 val &= (lhs.scNum() ==rhs.scNum() );
710 val &= (lhs.stNum() ==rhs.stNum() );
720 template <>
inline bool
723 val &= (lhs.type_idx() == rhs.type_idx());
724 val &= (lhs.bx() == rhs.bx());
726 unsigned int dw = lhs.getDataWord();
727 unsigned int ew = rhs.getDataWord();
728 unsigned int mask = 0xffffffff;
732 if(rhs.type_idx()==1 || rhs.type_idx()==3)
734 dw &= mask; ew &= mask;
741 template <>
inline bool
746 unsigned int dw = rhs.getDataWord();
747 unsigned int ew = lhs.getDataWord();
748 unsigned int mask = 0x3ffffff;
750 mask &= (~(0x0c00000));
751 dw &= mask; ew &= mask;
756 template <>
inline bool
762 val &= (lhs.isValid() == rhs.isValid() );
763 val &= (lhs.getQuality() == rhs.getQuality());
764 val &= (lhs.getKeyWG() == rhs.getKeyWG() );
765 val &= (lhs.getStrip() == rhs.getStrip() );
766 val &= (lhs.getPattern() == rhs.getPattern());
767 val &= (lhs.getBend() == rhs.getBend() );
768 val &= (lhs.getBX() == rhs.getBX() );
769 val &= (lhs.getMPCLink() == rhs.getMPCLink());
770 val &= (lhs.getCSCID() == rhs.getCSCID() );
774 template <>
inline bool
778 template <>
inline bool
782 template <>
inline bool
785 val &= (lhs.slot() == rhs.slot());
786 val &= (lhs.BXN () == rhs.BXN ());
787 val &= (lhs.FMM () == rhs.FMM ());
788 val &= (lhs.SEs () == rhs.SEs ());
789 val &= (lhs.SMs () == rhs.SMs ());
790 val &= (lhs.BXs () == rhs.BXs ());
791 val &= (lhs.AFs () == rhs.AFs ());
792 val &= (lhs.VPs () == rhs.VPs ());
798 template <
typename T>
803 template <
typename T>
805 return !de_equal_loc(lhs,rhs);
809 template <>
inline bool
812 val &= (lhs.id().zside() == rhs.id().zside() );
813 val &= (lhs.id().ietaAbs() == rhs.id().ietaAbs());
814 val &= (lhs.id().iphi() == rhs.id().iphi() );
818 template <>
inline bool
821 val &= (lhs.id().zside() == rhs.id().zside() );
822 val &= (lhs.id().ietaAbs() == rhs.id().ietaAbs());
823 val &= (lhs.id().iphi() == rhs.id().iphi() );
827 template <>
inline bool
830 val &= (lhs.rctCrate() == rhs.rctCrate());
831 val &= (lhs.rctCard() == rhs.rctCard());
832 val &= (lhs.rctRegion() == rhs.rctRegion());
836 template <>
inline bool
839 val &= (lhs.rctCrate() == rhs.rctCrate() );
840 val &= (lhs.id().isHf() == rhs.id().isHf());
841 if (!lhs.id().isHf())
842 val &= (lhs.rctCard() == rhs.rctCard() );
843 val &= (lhs.rctRegionIndex() == rhs.rctRegionIndex());
847 template <>
inline bool
850 val &= (lhs.etaIndex() == rhs.etaIndex());
851 val &= (lhs.phiIndex() == rhs.phiIndex());
854 template <>
inline bool
857 val &= (lhs.etaIndex() == rhs.etaIndex());
858 val &= (lhs.phiIndex() == rhs.phiIndex());
861 template <>
inline bool
865 template <>
inline bool
868 val &= (lhs.phi() == rhs.phi());
871 template <>
inline bool
875 template <>
inline bool
878 val &= (lhs.phi() == rhs.phi());
881 template <>
inline bool
885 template <>
inline bool
889 template <>
inline bool
895 template <>
inline bool
898 val &= (lhs.phi_packed() ==rhs.phi_packed() );
899 val &= (lhs.eta_packed() ==rhs.eta_packed() );
905 template <>
inline bool
908 val &= (lhs.phiIndex() ==rhs.phiIndex() );
909 val &= (lhs.etaIndex() ==rhs.etaIndex() );
913 template <>
inline bool
916 val &= (lhs.whNum() ==rhs.whNum() );
917 val &= (lhs.scNum() ==rhs.scNum() );
918 val &= (lhs.stNum() ==rhs.stNum() );
925 template <>
inline bool
928 val &= (lhs.whNum() ==rhs.whNum() );
929 val &= (lhs.scNum() ==rhs.scNum() );
930 val &= (lhs.stNum() ==rhs.stNum() );
935 template <>
inline bool
938 val &= (lhs.getCSCID() == rhs.getCSCID() );
939 val &= (lhs.getStrip() == rhs.getStrip() );
940 val &= (lhs.getKeyWG() == rhs.getKeyWG() );
944 template <>
inline bool
947 val &= (lhs.getTrknmb() == rhs.getTrknmb() );
948 val &= (lhs.getKeyWG() == rhs.getKeyWG() );
951 template <>
inline bool
954 val &= (lhs.getTrknmb() == rhs.getTrknmb() );
955 val &= (lhs.getKeyStrip() == rhs.getKeyStrip() );
958 template <>
inline bool
961 val &= (lhs.slot() == rhs.slot());
967 template <
typename T>
976 unsigned int raw = it->sample(it->sampleOfInterest()).raw();
977 unsigned int mask = 0x0fff;
982 unsigned int ttf = it->ttFlag();
983 val |= ((ttf!=0x1) && (ttf!=0x3));
990 unsigned int mask = 0x01ff;
991 return ( it->size()==0 || ((it->t0().raw()&mask)==0) || it->SOI_compressedEt()==0 );
996 return ((it->rank())==0);
1002 return ((it->et())==0);
1008 return (it->empty());
1013 return (it->empty());
1026 return (it->bxNum() != 0 || it->code() == 7);
1032 return (it->whNum()==0 && it->scNum()==0 && it->stNum()==0);
1041 if(it->type_idx()==1 || it->type_idx()==3)
1045 return (it->empty());
1053 return (it->empty());
1060 return !(it->isValid());
1064 return !(it->isValid());
1068 return !(it->isValid());
1074 it->slot() | it->BXN () | it->FMM () | it->SEs () |
1075 it->SMs () | it->BXs () | it->AFs () | it->VPs ();
1081 template <
typename T>
1083 std::stringstream
ss;
1084 ss <<
"[DEutils<T>::print()] specialization still missing for collection!";
1092 std::stringstream
ss;
1093 ss <<
"0x" << std::setw(4) << std::setfill(
'0') << std::hex
1094 << it->sample(it->sampleOfInterest()).raw()
1096 <<
", et:" << std::setw(3) << it->compressedEt()
1097 <<
", fg:" << std::setw(1) << it->fineGrain()
1098 <<
", ttf:" << std::setw(2) << it->ttFlag()
1099 <<
", sdet:" << ((it->id().subDet()==
EcalBarrel)?(
"Barrel"):(
"Endcap"))
1100 <<
", iz:" << ((it->id().zside()>0)?(
"+"):(
"-"))
1101 <<
", ieta:" << std::setw(2) << it->id().ietaAbs()
1102 <<
", iphi:" << std::setw(2) << it->id().iphi()
1110 std::stringstream
ss;
1111 ss <<
"0x" << std::setw(4) << std::setfill(
'0') << std::hex
1114 <<
", et:" << std::setw(3) << it->SOI_compressedEt()
1115 <<
", fg:" << std::setw(1) << it->SOI_fineGrain()
1116 <<
", sdet:" << it->id().subdet()
1117 <<
", iz:" << ((it->id().zside()>0)?(
"+"):(
"-"))
1118 <<
", ieta:" << std::setw(2) << it->id().ietaAbs()
1119 <<
", iphi:" << std::setw(2) << it->id().iphi()
1127 std::stringstream
ss;
1128 ss <<
"0x" << std::setw(4) << std::setfill(
'0') << std::hex << it->raw()
1129 <<
", rank=0x"<< std::setw(2) << std::hex << it->rank()
1131 <<
", region:"<< std::setw(1) << it->rctRegion()
1132 <<
", card:" << std::setw(1) << it->rctCard()
1133 <<
", crate:" << std::setw(2) << it->rctCrate()
1134 <<
", ieta:" << std::setw(2) << it->regionId().ieta()
1135 <<
", iphi:" << std::setw(2) << it->regionId().iphi()
1138 <<
", iso:" << std::setw(1) << it->isolated()
1139 <<
", index:" << std::setw(1) << it->index()
1140 <<
", bx:" << it->bx()
1148 std::stringstream
ss;
1149 ss <<
"L1CaloRegion:"
1150 <<
" et=" << it->et()
1151 <<
" o/f=" << it->overFlow()
1152 <<
" f/g=" << it->fineGrain()
1153 <<
" tau=" << it->tauVeto()
1154 <<
" rct(crate=" << it->rctCrate()
1155 <<
" card=" << it->rctCard()
1156 <<
" rgn=" << it->rctRegionIndex()
1157 <<
" eta=" << it->rctEta()
1158 <<
" phi=" << it->rctPhi()
1160 <<
"gct(eta=" << it->gctEta()
1161 <<
" phi=" << it->gctPhi()
1163 << std::hex <<
" cap_block=" << it->capBlock()
1164 <<
std::dec <<
" index=" << it->capIndex()
1165 <<
" bx=" << it->bx()
1174 std::stringstream
ss;
1177 ss <<
"0x" << std::setw(4) << std::setfill(
'0') << std::hex << it->raw()
1178 <<
", rank=0x"<< std::setw(2) << std::hex << it->rank()
1180 <<
", etaSign:" << it->etaSign()
1181 <<
", eta:" << (it->etaIndex()&0x7)
1182 <<
", phi:" << std::setw(2) << it->phiIndex()
1183 <<
" (ieta:" << std::setw(2) << it->regionId().ieta()
1184 <<
",iphi:" << std::setw(2) << it->regionId().iphi() <<
")"
1185 <<
", iso:" << it->isolated()
1186 <<
", cap block:" << std::setw(3) << it->capBlock()
1187 <<
", index:" << it->capIndex()
1188 <<
", bx:" << it->bx()
1203 std::stringstream
ss;
1204 ss <<
"0x" << std::setw(4) << std::setfill(
'0') << std::hex << it->raw()
1205 <<
" " << *it <<
std::dec << std::endl;
1218 std::stringstream
ss;
1220 <<
" bxNum:" << it->bxNum()
1221 <<
" whNum:" << it->whNum()
1222 <<
" scNum:" << it->scNum()
1223 <<
" stNum:" << it->stNum()
1224 <<
" phi:" << it->phi()
1225 <<
" phiB:" << it->phiB()
1226 <<
" code:" << it->code()
1227 <<
" Ts2Tag:" << it->Ts2Tag()
1228 <<
" BxCnt:" << it->BxCnt()
1236 std::stringstream
ss;
1238 <<
" bxNum:" << it->bxNum()
1239 <<
" whNum:" << it->whNum()
1240 <<
" scNum:" << it->scNum()
1241 <<
" stNum:" << it->stNum()
1249 std::stringstream
ss;
1251 ss << std::setiosflags(std::ios::showpoint | std::ios::fixed | std::ios::right | std::ios::adjustfield);
1252 ss << std::hex << std::setfill(
'0')
1253 <<
" 0x" << std::setw(8) << it->getDataWord();
1255 ss << std::hex << std::setfill(
'0')
1256 <<
" pt:0x" << std::setw(2) << it->pt_packed()
1257 <<
" phi:0x"<< std::setw(2) << it->phi_packed()
1258 <<
" eta:0x"<< std::setw(2) << it->eta_packed();
1264 ss <<
std::dec << std::setfill(
' ')
1265 <<
" qua:" << std::setw(1) << it->quality()
1266 <<
" cha:" << std::setw(2) << it->chargeValue()
1267 <<
" chav:" << std::setw(1) << it->chargeValid()
1268 <<
" fh:" << std::setw(1) << it->isFineHalo()
1269 <<
" bx:" << std::setw(4) << it->bx()
1270 <<
" [id:" << std::setw(1) << it->type_idx() <<
"]"
1278 std::stringstream
ss;
1279 ss << std::setiosflags(std::ios::showpoint | std::ios::fixed | std::ios::right | std::ios::adjustfield);
1281 ss << std::hex << std::setfill(
'0')
1282 <<
" 0x" << std::setw(7) << it->getDataWord();
1284 ss << std::hex << std::setfill(
'0')
1285 <<
" pt:0x" << std::setw(2) << it->ptIndex()
1286 <<
" eta:0x"<< std::setw(2) << it->etaIndex()
1287 <<
" phi:0x"<< std::setw(3) << it->phiIndex();
1293 ss <<
std::dec << std::setfill(
' ')
1294 <<
" cha:" << std::setw(2) << it->charge()
1295 <<
" qua:" << std::setw(3) << it->quality()
1296 <<
" iso:" << std::setw(1) << it->isol()
1297 <<
" mip:" << std::setw(1) << it->mip()
1298 <<
" bx:" << it->bx()
1306 std::stringstream
ss;
1325 std::stringstream
ss;
1334 std::stringstream
ss;
1343 std::stringstream
ss;
1345 <<
" slot:"<< it->slot()
1346 <<
" bxn:" << it->BXN ()
1347 <<
" fmm:" << it->FMM ()
1348 <<
" ses:" << it->SEs ()
1349 <<
" sms:" << it->SMs ()
1350 <<
" bxs:" << it->BXs ()
1351 <<
" afs:" << it->AFs ()
1352 <<
" vps:" << it->VPs ()
1359 template <
typename T>
1362 const int nlabel = 17;
1364 return "un-defined" ;
1370 str[1] =
"EcalTrigPrimDigiCollection";
1371 str[2] =
"EcalTriggerPrimitiveDigi";
1375 str[1] =
"HcalTrigPrimDigiCollection";
1376 str[2] =
"HcalTriggerPrimitiveDigi";
1380 str[1] =
"L1CaloEmCollection";
1381 str[2] =
"L1CaloEmCand";
1384 str[0] =
"RCT region";
1385 str[1] =
"L1CaloRegionCollection";
1386 str[2] =
"L1CaloRegion";
1389 str[0] =
"GCT em isolated";
1390 str[1] =
"L1GctEmCandCollection";
1391 str[2] =
"L1GctEmCand";
1394 str[0] =
"GCT em non-isolated";
1395 str[1] =
"L1GctEmCandCollection";
1396 str[2] =
"L1GctEmCand";
1399 str[0] =
"GCT central jet";
1400 str[1] =
"L1GctJetCandCollection";
1401 str[2] =
"L1GctJetCand";
1404 str[0] =
"GCT forward jet";
1405 str[1] =
"L1GctJetCandCollection";
1406 str[2] =
"L1GctJetCand";
1409 str[0] =
"GCT tau jet";
1410 str[1] =
"L1GctJetCandCollection";
1411 str[2] =
"L1GctJetCand";
1414 str[0] =
"Stage1Layer2 iso-tau jet";
1415 str[1] =
"L1GctJetCandCollection";
1416 str[2] =
"L1GctJetCand";
1420 str[1] =
"L1GctEtHadCollection";
1421 str[2] =
"L1GctEtHad";
1424 str[0] =
"GCT et miss";
1425 str[1] =
"L1GctEtMissCollection";
1426 str[2] =
"L1GctEtMiss";
1429 str[0] =
"GCT et total";
1430 str[1] =
"L1GctEtTotalCollection";
1431 str[2] =
"L1GctEtTotal";
1434 str[0] =
"GCT ht miss";
1435 str[1] =
"L1GctHtMissCollection";
1436 str[2] =
"L1GctHtMiss";
1439 str[0] =
"GCT hf ring";
1440 str[1] =
"L1GctHFRingEtSumsCollection";
1441 str[2] =
"L1GctHFRingEtSums";
1444 str[0] =
"GCT hf bit counts";
1445 str[1] =
"L1GctHFBitCountsCollection";
1446 str[2] =
"L1GctHFBitCounts";
1449 str[0] =
"DT tp phi";
1450 str[1] =
"L1MuDTChambPhDigiCollection";
1451 str[2] =
"L1MuDTChambPhDigi";
1454 str[0] =
"DT tp theta";
1455 str[1] =
"L1MuDTChambThDigiCollection";
1456 str[2] =
"L1MuDTChambThDigi";
1460 str[1] =
"CSCALCTDigiCollection";
1461 str[2] =
"CSCALCTDigi";
1465 str[1] =
"CSCCLCTDigiCollection";
1466 str[2] =
"CSCCLCTDigi";
1470 str[1] =
"CSCCorrelatedLCTDigiCollection";
1471 str[2] =
"CSCCorrelatedLCTDigi";
1474 str[0] =
"CSC tf status";
1475 str[1] =
"L1CSCSPStatusDigiCollection_";
1476 str[2] =
"L1CSCSPStatusDigi";
1479 str[0] =
"Mu reg tf";
1480 str[1] =
"L1MuRegionalCandCollection";
1481 str[2] =
"L1MuRegionalCand";
1485 str[1] =
"LTCDigiCollection";
1489 str[0] =
"GMT cand";
1490 str[1] =
"L1MuGMTCandCollection";
1491 str[2] =
"L1MuGMTCand";
1494 str[0] =
"GMT record";
1495 str[1] =
"L1MuGMTReadoutRecordCollection";
1496 str[2] =
"L1MuGMTReadoutRecord";
1510 template <
typename T>
1511 struct de_rank :
public DEutils<T> ,
public std::binary_function<typename DEutils<T>::cand_type, typename DEutils<T>::cand_type, bool> {
1525 if (
x.rank() !=
y.rank()) {
1526 return (
x.rank() <
y.rank()) ;
1527 }
else if(
x.isolated() !=
y.isolated()) {
1528 return (
x.isolated())?1:0;
1529 }
else if(
x.rctRegion() !=
y.rctRegion()){
1530 return (
x.rctRegion() <
y.rctRegion());
1531 }
else if(
x.rctCrate() !=
y.rctCrate()) {
1532 return (
x.rctCrate() <
y.rctCrate()) ;
1533 }
else if(
x.rctCard() !=
y.rctCard()) {
1534 return (
x.rctCard() <
y.rctCard()) ;
1536 return x.raw() <
y.raw();
1558 if(x.bx()!=y.bx()){
return x.bx() < y.bx();}
1559 else if(x.ptIndex()!=y.ptIndex()){
return x.ptIndex() < y.ptIndex();}
1560 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 &)
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 —