20 typedef typename T::const_iterator
col_cit;
31 <<
"DEutils::DEutils() :: " 32 <<
"specialization is still missing for collection of type:" 37 inline int de_type()
const {
return de_trait::de_type();}
38 bool de_equal (
const cand_type&,
const cand_type&);
40 bool de_nequal (
const cand_type&,
const cand_type&);
42 col_it
de_find ( col_it, col_it,
const cand_type&);
67 double x1 = (aflag!=4) ? itd->id().iphi() : itm->id().iphi();
68 double x2 = (aflag!=4) ? itd->id().ieta() : itm->id().ieta();
70 unsigned int dwS = (aflag==4)?0:itd->sample(itd->sampleOfInterest()).raw();
71 unsigned int ewS = (aflag==3)?0:itm->sample(itm->sampleOfInterest()).raw();
73 unsigned int mask = 0x0eff;
75 unsigned int dwI = (aflag==4)?0:itd->id().rawId();
76 unsigned int ewI = (aflag==3)?0:itm->id().rawId();
79 unsigned int dw = (dwI & 0xfe00ffff ) | ( (dwS & 0x000001ff)<<16 );
80 unsigned int ew = (ewI & 0xfe00ffff ) | ( (ewS & 0x000001ff)<<16 );
82 int de = (aflag==4)?0:itd->compressedEt() ;
83 int ee = (aflag==3)?0:itm->compressedEt() ;
84 digi.
setRank((
float)de,(
float)ee);
86 itd->compressedEt(),itd->id().rawId());
88 itm->compressedEt(),itm->id().rawId());
97 double x1 = (aflag!=4) ? itd->id().iphi() : itm->id().iphi();
98 double x2 = (aflag!=4) ? itd->id().ieta() : itm->id().ieta();
100 unsigned int dw = (aflag==4)?0:itd->t0().raw();
101 unsigned int ew = (aflag==3)?0:itm->t0().raw();
104 unsigned int mask = 0x01ff;
107 int de = (aflag==4)?0:itd->SOI_compressedEt();
108 int ee = (aflag==3)?0:itm->SOI_compressedEt();
109 digi.
setRank((
float)de,(
float)ee);
117 double x1, x2, x3(0.);
119 x1 = (aflag!=4) ? itd->regionId().iphi() : itm->regionId().iphi();
120 x2 = (aflag!=4) ? itd->regionId().ieta() : itm->regionId().ieta();
121 x3 = (aflag!=4) ? itd->regionId().rctCard() : itm->regionId().rctCard();
124 unsigned int dw = itd->raw();
125 unsigned int ew = itm->raw();
127 dw += (((itd->rctCrate())&0x1f)<<10);
128 dw += (((itd->isolated()?1:0)&0x1)<<15);
129 dw += (((itd->index())&0x3)<<16);
131 ew += (((itm->rctCrate())&0x1f)<<10);
132 ew += (((itm->isolated()?1:0)&0x1)<<15);
133 ew += (((itm->index())&0x3)<<16);
134 dw = (aflag==4)?0:dw;
135 ew = (aflag==3)?0:ew;
140 int de = (aflag==4)?0:itd->rank();
141 int ee = (aflag==3)?0:itm->rank();
142 digi.
setRank((
float)de,(
float)ee);
150 double x1, x2, x3(0.);
151 x1 = (aflag!=4) ? itd->id().iphi() : itm->id().iphi();
152 x2 = (aflag!=4) ? itd->id().ieta() : itm->id().ieta();
153 x3 = (aflag!=4) ? itd->id().rctCard() : itm->id().rctCard();
155 unsigned int dw = itd->raw();
156 unsigned int ew = itm->raw();
157 unsigned int mask = 0x3fff;
161 dw += (((itd->id().ieta())&0x1f)<<14);
162 dw += (((itd->id().iphi())&0x1f)<<19);
164 ew += (((itm->id().ieta())&0x1f)<<14);
165 ew += (((itm->id().iphi())&0x1f)<<19);
166 dw = (aflag==4)?0:dw;
167 ew = (aflag==3)?0:ew;
170 int de = (aflag==4)?0:itd->et();
171 int ee = (aflag==3)?0:itm->et();
172 digi.
setRank((
float)de,(
float)ee);
182 double x1 = (aflag!=4) ? itd->regionId().iphi() : itm->regionId().iphi();
183 double x2 = (aflag!=4) ? itd->regionId().ieta() : itm->regionId().ieta();
185 unsigned int dw = (aflag==4)?0:itd->raw();
186 unsigned int ew = (aflag==3)?0:itm->raw();
187 dw &= 0x7fff; ew &= 0x7fff;
189 int de = (aflag==4)?0:itd->rank();
190 int ee = (aflag==3)?0:itm->rank();
191 digi.
setRank((
float)de,(
float)ee);
201 double x1 = (aflag!=4) ? itd->phiIndex() : itm->phiIndex();
202 unsigned deta(0), eeta(0);
203 if (!itd->isForward()) deta=(itd->etaSign()==1?10-(itd->etaIndex()&0x7):(itd->etaIndex()&0x7)+11);
204 else deta=(itd->etaSign()==1? 3-(itd->etaIndex()&0x7):(itd->etaIndex()&0x7)+18 );
205 if (!itm->isForward()) eeta=(itm->etaSign()==1?10-(itm->etaIndex()&0x7):(itm->etaIndex()&0x7)+11);
206 else 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();
211 dw &= 0x7fff; ew &= 0x7fff;
213 int de = (aflag==4)?0:itd->rank();
214 int ee = (aflag==3)?0:itm->rank();
215 digi.
setRank((
float)de,(
float)ee);
223 double x1 = 0;
double x2 = 0;
225 unsigned int dw = (aflag==4)?0:itd->raw();
226 unsigned int ew = (aflag==3)?0:itm->raw();
227 dw &= 0x1fff; ew &= 0x1fff;
229 int de = (aflag==4)?0:itd->et();
230 int ee = (aflag==3)?0:itm->et();
231 digi.
setRank((
float)de,(
float)ee);
238 double x1 = (aflag!=4) ? itd->phi() : itm->phi();
241 unsigned int dw = (aflag==4)?0:itd->raw();
242 unsigned int ew = (aflag==3)?0:itm->raw();
243 dw &= 0x8f1fff; ew &= 0x8f1fff;
245 int de = (aflag==4)?0:itd->et();
246 int ee = (aflag==3)?0:itm->et();
247 digi.
setRank((
float)de,(
float)ee);
255 double x1 = 0;
double x2 = 0;
257 unsigned int dw = (aflag==4)?0:itd->raw();
258 unsigned int ew = (aflag==3)?0:itm->raw();
259 dw &= 0x1fff; ew &= 0x1fff;
261 int de = (aflag==4)?0:itd->et();
262 int ee = (aflag==3)?0:itm->et();
263 digi.
setRank((
float)de,(
float)ee);
270 double x1 = 0;
double x2 = 0;
272 unsigned int dw = (aflag==4)?0:itd->raw();
273 unsigned int ew = (aflag==3)?0:itm->raw();
275 int de = 0;
int ee = 0;
276 digi.
setRank((
float)de,(
float)ee);
283 double x1 = 0;
double x2 = 0;
285 unsigned int dw = (aflag==4)?0:itd->raw();
286 unsigned int ew = (aflag==3)?0:itm->raw();
288 int de = 0;
int ee = 0;
289 digi.
setRank((
float)de,(
float)ee);
296 double x1 = (aflag!=4) ? itd->phi() : itm->phi();
299 unsigned int dw = (aflag==4)?0:itd->raw();
300 unsigned int ew = (aflag==3)?0:itm->raw();
301 dw &= 0x8f1fff; ew &= 0x8f1fff;
303 int de = (aflag==4)?0:itd->et();
304 int ee = (aflag==3)?0:itm->et();
305 digi.
setRank((
float)de,(
float)ee);
313 double x1 = 0;
double x2 = 0;
315 unsigned int dw = (aflag==4)?0:itd->raw0();
316 unsigned int ew = (aflag==3)?0:itm->raw0();
318 int de = 0;
int ee = 0;
319 digi.
setRank((
float)de,(
float)ee);
326 switch(itd->type_idx()) {
337 double x1 = (aflag!=4) ? itd->phi_packed() : itm->phi_packed();
338 double x2 = (aflag!=4) ? itd->eta_packed() : itm->eta_packed();
340 unsigned int dw = (aflag==4)?0 : itd->getDataWord();
341 unsigned int ew = (aflag==3)?0 : itm->getDataWord();
342 unsigned int mask = 0xffffffff;
349 int de = (aflag==4)?0:itd->pt_packed();
350 int ee = (aflag==3)?0:itm->pt_packed();
351 digi.
setRank((
float)de,(
float)ee);
355 std::cout <<
"L1DataEmulDigi DEutils<L1MuRegionalCandCollection>] dedigi info" 358 <<
" phipackd:" << itd->phi_packed() <<
"," << itm->phi_packed()
359 <<
" etapackd:" << itd->eta_packed() <<
"," << itm->eta_packed()
370 double x1 = (aflag!=4) ? itd->phiIndex() : itm->phiIndex();
371 double x2 = (aflag!=4) ? itd->etaIndex() : itm->etaIndex();
373 unsigned int dw = (aflag==4)?0 : itd->getDataWord();
374 unsigned int ew = (aflag==3)?0 : itm->getDataWord();
375 unsigned int mask = 0x3ffffff;
377 mask &= (~(0x0c00000));
380 int de = (aflag==4)?0:itd->ptIndex();
381 int ee = (aflag==3)?0:itm->ptIndex();
382 digi.
setRank((
float)de,(
float)ee);
384 std::cout <<
"l1dataemuldigi l1mugmtcandcoll type:" << cid
387 << std::hex <<
" word d:" << dw <<
"e:" << ew <<
std::dec 396 double x1 = (aflag!=4) ? itd->scNum() : itm->scNum();
397 double x2 = (aflag!=4) ? itd->whNum() : itm->whNum();
398 double x3 = (aflag!=4) ? itd->stNum() : itm->stNum();
402 int dr = (aflag==4)?0:itd->code();
403 int er = (aflag==3)?0:itm->code();
404 digi.
setRank((
float)dr,(
float)er);
412 double x1 = (aflag!=4) ? itd->scNum() : itm->scNum();
413 double x2 = (aflag!=4) ? itd->whNum() : itm->whNum();
414 double x3 = (aflag!=4) ? itd->stNum() : itm->stNum();
418 for(
int i=0;
i<7;
i++){
419 if(itd->code(
i)>=
dr)
dr=itd->quality(
i);
420 if(itm->code(
i)>=er) er=itm->quality(
i);
423 dr = (aflag==4)?0:
dr;
424 er = (aflag==3)?0:er;
434 double x1 = (aflag!=4) ? itd->getStrip() : itm->getStrip();
435 double x2 = (aflag!=4) ? itd->getKeyWG() : itm->getKeyWG();
436 double x3 = (aflag!=4) ? itd->getTrknmb(): itm->getTrknmb();
439 int dq = (aflag==4)?0:itd->getQuality();
440 int eq = (aflag==3)?0:itm->getQuality();
441 digi.
setRank((
float)dq,(
float)eq);
443 static const int kValidBitWidth = 1;
444 static const int kQualityBitWidth = 4;
445 static const int kPatternBitWidth = 4;
446 static const int kWireGroupBitWidth = 7;
447 static const int kHalfstripBitWidth = 8;
448 static const int kBendBitWidth = 1;
449 static const int kBxBitWidth = 1;
451 static const int kMPCLinkBitWidth = 2;
452 static const int kCSCIdBitWidth = 4;
454 unsigned shift = 0, dw = 0, ew = 0;
455 dw = itd->isValid() & ((1<<kValidBitWidth)-1);
456 dw += (itd->getQuality() & ((1<<kQualityBitWidth)-1)) <<
457 (shift += kValidBitWidth);
458 dw += (itd->getPattern() & ((1<<kPatternBitWidth)-1)) <<
459 (shift += kQualityBitWidth);
460 dw += (itd->getKeyWG() & ((1<<kWireGroupBitWidth)-1)) <<
461 (shift += kPatternBitWidth);
462 dw += (itd->getStrip() & ((1<<kHalfstripBitWidth)-1)) <<
463 (shift += kWireGroupBitWidth);
464 dw += (itd->getBend() & ((1<<kBendBitWidth)-1)) <<
465 (shift += kHalfstripBitWidth);
466 dw += (itd->getBX() & ((1<<kBxBitWidth)-1)) <<
467 (shift += kBendBitWidth);
468 dw += (itd->getMPCLink() & ((1<<kMPCLinkBitWidth)-1)) <<
469 (shift += kBxBitWidth);
470 dw += (itd->getCSCID() & ((1<<kCSCIdBitWidth)-1)) <<
471 (shift += kMPCLinkBitWidth);
473 ew = itm->isValid() & ((1<<kValidBitWidth)-1);
474 ew += (itm->getQuality() & ((1<<kQualityBitWidth)-1)) <<
475 (shift += kValidBitWidth);
476 ew += (itm->getPattern() & ((1<<kPatternBitWidth)-1)) <<
477 (shift += kQualityBitWidth);
478 ew += (itm->getKeyWG() & ((1<<kWireGroupBitWidth)-1)) <<
479 (shift += kPatternBitWidth);
480 ew += (itm->getStrip() & ((1<<kHalfstripBitWidth)-1)) <<
481 (shift += kWireGroupBitWidth);
482 ew += (itm->getBend() & ((1<<kBendBitWidth)-1)) <<
483 (shift += kHalfstripBitWidth);
484 ew += (itm->getBX() & ((1<<kBxBitWidth)-1)) <<
485 (shift += kBendBitWidth);
486 ew += (itm->getMPCLink() & ((1<<kMPCLinkBitWidth)-1)) <<
487 (shift += kBxBitWidth);
488 ew += (itm->getCSCID() & ((1<<kCSCIdBitWidth)-1)) <<
489 (shift += kMPCLinkBitWidth);
498 double x2 = (aflag!=4) ? itd->getKeyWG () : itm->getKeyWG ();
499 double x3 = (aflag!=4) ? itd->getTrknmb() : itm->getTrknmb();
501 int dq = (aflag==4)?0:itd->getQuality();
502 int eq = (aflag==3)?0:itm->getQuality();
503 digi.
setRank((
float)dq,(
float)eq);
505 static const int kValidBitWidth = 1;
506 static const int kQualityBitWidth = 2;
507 static const int kAccelBitWidth = 1;
508 static const int kPatternBBitWidth = 1;
509 static const int kWireGroupBitWidth = 7;
510 static const int kBxBitWidth = 5;
512 unsigned shift = 0, dw = 0, ew = 0;
513 dw = itd->isValid() & ((1<<kValidBitWidth)-1);
514 dw += (itd->getQuality() & ((1<<kQualityBitWidth)-1)) <<
515 (shift += kValidBitWidth);
516 dw += (itd->getAccelerator() & ((1<<kAccelBitWidth)-1)) <<
517 (shift += kQualityBitWidth);
518 dw += (itd->getCollisionB() & ((1<<kPatternBBitWidth)-1)) <<
519 (shift += kAccelBitWidth);
520 dw += (itd->getKeyWG() & ((1<<kWireGroupBitWidth)-1)) <<
521 (shift += kPatternBBitWidth);
522 dw += (itd->getBX() & ((1<<kBxBitWidth)-1)) <<
523 (shift += kWireGroupBitWidth);
525 ew = itm->isValid() & ((1<<kValidBitWidth)-1);
526 ew += (itm->getQuality() & ((1<<kQualityBitWidth)-1)) <<
527 (shift += kValidBitWidth);
528 ew += (itm->getAccelerator() & ((1<<kAccelBitWidth)-1)) <<
529 (shift += kQualityBitWidth);
530 ew += (itm->getCollisionB() & ((1<<kPatternBBitWidth)-1)) <<
531 (shift += kAccelBitWidth);
532 ew += (itm->getKeyWG() & ((1<<kWireGroupBitWidth)-1)) <<
533 (shift += kPatternBBitWidth);
534 ew += (itm->getBX() & ((1<<kBxBitWidth)-1)) <<
535 (shift += kWireGroupBitWidth);
543 double x1 = (aflag!=4) ? itd->getKeyStrip() : itm->getKeyStrip();
544 double x3 = (aflag!=4) ? itd->getTrknmb() : itm->getTrknmb();
546 int dq = (aflag==4)?0:itd->getQuality();
547 int eq = (aflag==3)?0:itm->getQuality();
548 digi.
setRank((
float)dq,(
float)eq);
550 static const int kValidBitWidth = 1;
551 static const int kQualityBitWidth = 3;
552 static const int kPatternBitWidth = 4;
553 static const int kBendBitWidth = 1;
554 static const int kHalfstripBitWidth = 5;
555 static const int kCFEBBitWidth = 3;
556 static const int kBxBitWidth = 2;
558 unsigned shift = 0, dw = 0, ew = 0;
559 dw = itd->isValid() & ((1<<kValidBitWidth)-1);
560 dw += (itd->getQuality() & ((1<<kQualityBitWidth)-1)) <<
561 (shift += kValidBitWidth);
562 dw += (itd->getPattern() & ((1<<kPatternBitWidth)-1)) <<
563 (shift += kQualityBitWidth);
564 dw += (itd->getBend() & ((1<<kBendBitWidth)-1)) <<
565 (shift += kPatternBitWidth);
566 dw += (itd->getStrip() & ((1<<kHalfstripBitWidth)-1)) <<
567 (shift += kBendBitWidth);
568 dw += (itd->getCFEB() & ((1<<kCFEBBitWidth)-1)) <<
569 (shift += kHalfstripBitWidth);
570 dw += (itd->getBX() & ((1<<kBxBitWidth)-1)) <<
571 (shift += kCFEBBitWidth);
573 ew = itm->isValid() & ((1<<kValidBitWidth)-1);
574 ew += (itm->getQuality() & ((1<<kQualityBitWidth)-1)) <<
575 (shift += kValidBitWidth);
576 ew += (itm->getPattern() & ((1<<kPatternBitWidth)-1)) <<
577 (shift += kQualityBitWidth);
578 ew += (itm->getBend() & ((1<<kBendBitWidth)-1)) <<
579 (shift += kPatternBitWidth);
580 ew += (itm->getStrip() & ((1<<kHalfstripBitWidth)-1)) <<
581 (shift += kBendBitWidth);
582 ew += (itm->getCFEB() & ((1<<kCFEBBitWidth)-1)) <<
583 (shift += kHalfstripBitWidth);
584 ew += (itm->getBX() & ((1<<kBxBitWidth)-1)) <<
585 (shift += kCFEBBitWidth);
595 x1 = (aflag!=4) ? itd->slot() : itm->slot();
607 template <
typename T>
typename 609 for ( ;first!=
last; first++)
610 if (
de_equal(*first,value) )
break;
625 template <
typename T>
630 template <
typename T>
635 template <>
inline bool 638 unsigned int mask = 0x0fff;
640 val &= ((lhs[lhs.sampleOfInterest()].raw()&
mask) == (rhs[rhs.sampleOfInterest()].raw()&
mask));
641 val &= (lhs.id().rawId() == rhs.id().rawId());
645 template <>
inline bool 648 unsigned int mask = 0x01ff;
649 val &= ((lhs.t0().raw()&
mask) == (rhs.t0().raw()&
mask));
650 val &= (lhs.id().rawId() == rhs.id().rawId());
654 template <>
inline bool 657 val &= (lhs.raw() == rhs.raw() );
658 val &= (lhs.rctCrate() == rhs.rctCrate());
659 val &= (lhs.isolated() == rhs.isolated());
660 val &= (lhs.index() == rhs.index() );
665 template <>
inline bool 668 val &= (lhs.et() == rhs.et() );
669 val &= (lhs.rctCrate() == rhs.rctCrate() );
670 val &= (lhs.rctRegionIndex() == rhs.rctRegionIndex());
671 val &= (lhs.id().isHf() == rhs.id().isHf());
672 if (!lhs.id().isHf()){
673 val &= (lhs.overFlow() == rhs.overFlow() );
674 val &= (lhs.tauVeto() == rhs.tauVeto() );
678 val &= (lhs.rctCard() == rhs.rctCard() );
680 val &= (lhs.fineGrain() == rhs.fineGrain());
685 template <>
inline bool 699 template <>
inline bool 702 val &= (lhs.whNum() ==rhs.whNum() );
703 val &= (lhs.scNum() ==rhs.scNum() );
704 val &= (lhs.stNum() ==rhs.stNum() );
707 val &= (lhs.code() ==rhs.code() );
708 val &= (lhs.Ts2Tag()==rhs.Ts2Tag());
714 template <>
inline bool 717 val &= (lhs.whNum() ==rhs.whNum() );
718 val &= (lhs.scNum() ==rhs.scNum() );
719 val &= (lhs.stNum() ==rhs.stNum() );
729 template <>
inline bool 732 val &= (lhs.type_idx() == rhs.type_idx());
733 val &= (lhs.bx() == rhs.bx());
735 unsigned int dw = lhs.getDataWord();
736 unsigned int ew = rhs.getDataWord();
737 unsigned int mask = 0xffffffff;
741 if(rhs.type_idx()==1 || rhs.type_idx()==3)
750 template <>
inline bool 755 unsigned int dw = rhs.getDataWord();
756 unsigned int ew = lhs.getDataWord();
757 unsigned int mask = 0x3ffffff;
759 mask &= (~(0x0c00000));
765 template <>
inline bool 771 val &= (lhs.isValid() == rhs.isValid() );
772 val &= (lhs.getQuality() == rhs.getQuality());
773 val &= (lhs.getKeyWG() == rhs.getKeyWG() );
774 val &= (lhs.getStrip() == rhs.getStrip() );
775 val &= (lhs.getPattern() == rhs.getPattern());
776 val &= (lhs.getBend() == rhs.getBend() );
777 val &= (lhs.getBX() == rhs.getBX() );
778 val &= (lhs.getMPCLink() == rhs.getMPCLink());
779 val &= (lhs.getCSCID() == rhs.getCSCID() );
783 template <>
inline bool 787 template <>
inline bool 791 template <>
inline bool 794 val &= (lhs.slot() == rhs.slot());
795 val &= (lhs.BXN () == rhs.BXN ());
796 val &= (lhs.FMM () == rhs.FMM ());
797 val &= (lhs.SEs () == rhs.SEs ());
798 val &= (lhs.SMs () == rhs.SMs ());
799 val &= (lhs.BXs () == rhs.BXs ());
800 val &= (lhs.AFs () == rhs.AFs ());
801 val &= (lhs.VPs () == rhs.VPs ());
807 template <
typename T>
812 template <
typename T>
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.id().zside() == rhs.id().zside() );
831 val &= (lhs.id().ietaAbs() == rhs.id().ietaAbs());
832 val &= (lhs.id().iphi() == rhs.id().iphi() );
836 template <>
inline bool 839 val &= (lhs.rctCrate() == rhs.rctCrate());
840 val &= (lhs.rctCard() == rhs.rctCard());
841 val &= (lhs.rctRegion() == rhs.rctRegion());
845 template <>
inline bool 848 val &= (lhs.rctCrate() == rhs.rctCrate() );
849 val &= (lhs.id().isHf() == rhs.id().isHf());
850 if (!lhs.id().isHf())
851 val &= (lhs.rctCard() == rhs.rctCard() );
852 val &= (lhs.rctRegionIndex() == rhs.rctRegionIndex());
856 template <>
inline bool 859 val &= (lhs.etaIndex() == rhs.etaIndex());
860 val &= (lhs.phiIndex() == rhs.phiIndex());
863 template <>
inline bool 866 val &= (lhs.etaIndex() == rhs.etaIndex());
867 val &= (lhs.phiIndex() == rhs.phiIndex());
871 template <>
inline bool 875 template <>
inline bool 878 val &= (lhs.phi() == rhs.phi());
881 template <>
inline bool 885 template <>
inline bool 888 val &= (lhs.phi() == rhs.phi());
891 template <>
inline bool 895 template <>
inline bool 899 template <>
inline bool 905 template <>
inline bool 908 val &= (lhs.phi_packed() ==rhs.phi_packed() );
909 val &= (lhs.eta_packed() ==rhs.eta_packed() );
915 template <>
inline bool 918 val &= (lhs.phiIndex() ==rhs.phiIndex() );
919 val &= (lhs.etaIndex() ==rhs.etaIndex() );
923 template <>
inline bool 926 val &= (lhs.whNum() ==rhs.whNum() );
927 val &= (lhs.scNum() ==rhs.scNum() );
928 val &= (lhs.stNum() ==rhs.stNum() );
935 template <>
inline bool 938 val &= (lhs.whNum() ==rhs.whNum() );
939 val &= (lhs.scNum() ==rhs.scNum() );
940 val &= (lhs.stNum() ==rhs.stNum() );
945 template <>
inline bool 948 val &= (lhs.getCSCID() == rhs.getCSCID() );
949 val &= (lhs.getStrip() == rhs.getStrip() );
950 val &= (lhs.getKeyWG() == rhs.getKeyWG() );
954 template <>
inline bool 957 val &= (lhs.getTrknmb() == rhs.getTrknmb() );
958 val &= (lhs.getKeyWG() == rhs.getKeyWG() );
961 template <>
inline bool 964 val &= (lhs.getTrknmb() == rhs.getTrknmb() );
965 val &= (lhs.getKeyStrip() == rhs.getKeyStrip() );
968 template <>
inline bool 971 val &= (lhs.slot() == rhs.slot());
977 template <
typename T>
986 unsigned int raw = it->sample(it->sampleOfInterest()).raw();
987 unsigned int mask = 0x0fff;
992 unsigned int ttf = it->ttFlag();
993 val |= ((ttf!=0x1) && (ttf!=0x3));
1000 unsigned int mask = 0x01ff;
1001 return ( it->size()==0 || ((it->t0().raw()&
mask)==0) || it->SOI_compressedEt()==0 );
1006 return ((it->rank())==0);
1012 return ((it->et())==0);
1018 return (it->empty());
1023 return (it->empty());
1037 return (it->bxNum() != 0 || it->code() == 7);
1043 return (it->whNum()==0 && it->scNum()==0 && it->stNum()==0);
1052 if(it->type_idx()==1 || it->type_idx()==3)
1056 return (it->empty());
1064 return (it->empty());
1071 return !(it->isValid());
1075 return !(it->isValid());
1079 return !(it->isValid());
1085 it->slot() | it->BXN () | it->FMM () | it->SEs () |
1086 it->SMs () | it->BXs () | it->AFs () | it->VPs ();
1092 template <
typename T>
1094 std::stringstream ss;
1095 ss <<
"[DEutils<T>::print()] specialization still missing for collection!";
1103 std::stringstream ss;
1104 ss <<
"0x" << std::setw(4) << std::setfill(
'0') << std::hex
1105 << it->sample(it->sampleOfInterest()).raw()
1107 <<
", et:" << std::setw(3) << it->compressedEt()
1108 <<
", fg:" << std::setw(1) << it->fineGrain()
1109 <<
", ttf:" << std::setw(2) << it->ttFlag()
1110 <<
", sdet:" << ((it->id().subDet()==
EcalBarrel)?(
"Barrel"):(
"Endcap"))
1111 <<
", iz:" << ((it->id().zside()>0)?(
"+"):(
"-"))
1112 <<
", ieta:" << std::setw(2) << it->id().ietaAbs()
1113 <<
", iphi:" << std::setw(2) << it->id().iphi()
1121 std::stringstream ss;
1122 ss <<
"0x" << std::setw(4) << std::setfill(
'0') << std::hex
1125 <<
", et:" << std::setw(3) << it->SOI_compressedEt()
1126 <<
", fg:" << std::setw(1) << it->SOI_fineGrain()
1127 <<
", sdet:" << it->id().subdet()
1128 <<
", iz:" << ((it->id().zside()>0)?(
"+"):(
"-"))
1129 <<
", ieta:" << std::setw(2) << it->id().ietaAbs()
1130 <<
", iphi:" << std::setw(2) << it->id().iphi()
1138 std::stringstream ss;
1139 ss <<
"0x" << std::setw(4) << std::setfill(
'0') << std::hex << it->raw()
1140 <<
", rank=0x"<< std::setw(2) << std::hex << it->rank()
1142 <<
", region:"<< std::setw(1) << it->rctRegion()
1143 <<
", card:" << std::setw(1) << it->rctCard()
1144 <<
", crate:" << std::setw(2) << it->rctCrate()
1145 <<
", ieta:" << std::setw(2) << it->regionId().ieta()
1146 <<
", iphi:" << std::setw(2) << it->regionId().iphi()
1149 <<
", iso:" << std::setw(1) << it->isolated()
1150 <<
", index:" << std::setw(1) << it->index()
1151 <<
", bx:" << it->bx()
1159 std::stringstream ss;
1160 ss <<
"L1CaloRegion:" 1161 <<
" et=" << it->et()
1162 <<
" o/f=" << it->overFlow()
1163 <<
" f/g=" << it->fineGrain()
1164 <<
" tau=" << it->tauVeto()
1165 <<
" rct(crate=" << it->rctCrate()
1166 <<
" card=" << it->rctCard()
1167 <<
" rgn=" << it->rctRegionIndex()
1168 <<
" eta=" << it->rctEta()
1169 <<
" phi=" << it->rctPhi()
1171 <<
"gct(eta=" << it->gctEta()
1172 <<
" phi=" << it->gctPhi()
1174 << std::hex <<
" cap_block=" << it->capBlock()
1175 <<
std::dec <<
" index=" << it->capIndex()
1176 <<
" bx=" << it->bx()
1185 std::stringstream ss;
1188 ss <<
"0x" << std::setw(4) << std::setfill(
'0') << std::hex << it->raw()
1189 <<
", rank=0x"<< std::setw(2) << std::hex << it->rank()
1191 <<
", etaSign:" << it->etaSign()
1192 <<
", eta:" << (it->etaIndex()&0x7)
1193 <<
", phi:" << std::setw(2) << it->phiIndex()
1194 <<
" (ieta:" << std::setw(2) << it->regionId().ieta()
1195 <<
",iphi:" << std::setw(2) << it->regionId().iphi() <<
")" 1196 <<
", iso:" << it->isolated()
1197 <<
", cap block:" << std::setw(3) << it->capBlock()
1198 <<
", index:" << it->capIndex()
1199 <<
", bx:" << it->bx()
1214 std::stringstream ss;
1215 ss <<
"0x" << std::setw(4) << std::setfill(
'0') << std::hex << it->raw()
1216 <<
" " << *it <<
std::dec << std::endl;
1229 std::stringstream ss;
1231 <<
" bxNum:" << it->bxNum()
1232 <<
" whNum:" << it->whNum()
1233 <<
" scNum:" << it->scNum()
1234 <<
" stNum:" << it->stNum()
1235 <<
" phi:" << it->phi()
1236 <<
" phiB:" << it->phiB()
1237 <<
" code:" << it->code()
1238 <<
" Ts2Tag:" << it->Ts2Tag()
1239 <<
" BxCnt:" << it->BxCnt()
1247 std::stringstream ss;
1249 <<
" bxNum:" << it->bxNum()
1250 <<
" whNum:" << it->whNum()
1251 <<
" scNum:" << it->scNum()
1252 <<
" stNum:" << it->stNum()
1260 std::stringstream ss;
1262 ss << std::setiosflags(std::ios::showpoint |
std::ios::fixed | std::ios::right | std::ios::adjustfield);
1263 ss << std::hex << std::setfill(
'0')
1264 <<
" 0x" << std::setw(8) << it->getDataWord();
1266 ss << std::hex << std::setfill(
'0')
1267 <<
" pt:0x" << std::setw(2) << it->pt_packed()
1268 <<
" phi:0x"<< std::setw(2) << it->phi_packed()
1269 <<
" eta:0x"<< std::setw(2) << it->eta_packed();
1275 ss <<
std::dec << std::setfill(
' ')
1276 <<
" qua:" << std::setw(1) << it->quality()
1277 <<
" cha:" << std::setw(2) << it->chargeValue()
1278 <<
" chav:" << std::setw(1) << it->chargeValid()
1279 <<
" fh:" << std::setw(1) << it->isFineHalo()
1280 <<
" bx:" << std::setw(4) << it->bx()
1281 <<
" [id:" << std::setw(1) << it->type_idx() <<
"]" 1289 std::stringstream ss;
1290 ss << std::setiosflags(std::ios::showpoint |
std::ios::fixed | std::ios::right | std::ios::adjustfield);
1292 ss << std::hex << std::setfill(
'0')
1293 <<
" 0x" << std::setw(7) << it->getDataWord();
1295 ss << std::hex << std::setfill(
'0')
1296 <<
" pt:0x" << std::setw(2) << it->ptIndex()
1297 <<
" eta:0x"<< std::setw(2) << it->etaIndex()
1298 <<
" phi:0x"<< std::setw(3) << it->phiIndex();
1304 ss <<
std::dec << std::setfill(
' ')
1305 <<
" cha:" << std::setw(2) << it->charge()
1306 <<
" qua:" << std::setw(3) << it->quality()
1307 <<
" iso:" << std::setw(1) << it->isol()
1308 <<
" mip:" << std::setw(1) << it->mip()
1309 <<
" bx:" << it->bx()
1317 std::stringstream ss;
1336 std::stringstream ss;
1345 std::stringstream ss;
1354 std::stringstream ss;
1356 <<
" slot:"<< it->slot()
1357 <<
" bxn:" << it->BXN ()
1358 <<
" fmm:" << it->FMM ()
1359 <<
" ses:" << it->SEs ()
1360 <<
" sms:" << it->SMs ()
1361 <<
" bxs:" << it->BXs ()
1362 <<
" afs:" << it->AFs ()
1363 <<
" vps:" << it->VPs ()
1370 template <
typename T>
1373 const int nlabel = 17;
1375 return "un-defined" ;
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>
1523 struct de_rank :
public DEutils<T> ,
public std::binary_function<typename DEutils<T>::cand_type, typename DEutils<T>::cand_type, bool> {
1537 if (
x.rank() !=
y.rank()) {
1538 return (
x.rank() <
y.rank()) ;
1539 }
else if(
x.isolated() !=
y.isolated()) {
1540 return (
x.isolated())?1:0;
1541 }
else if(
x.rctRegion() !=
y.rctRegion()){
1542 return (
x.rctRegion() <
y.rctRegion());
1543 }
else if(
x.rctCrate() !=
y.rctCrate()) {
1544 return (
x.rctCrate() <
y.rctCrate()) ;
1545 }
else if(
x.rctCard() !=
y.rctCard()) {
1546 return (
x.rctCard() <
y.rctCard()) ;
1548 return x.raw() <
y.raw();
1570 if(x.bx()!=y.bx()){
return x.bx() < y.bx();}
1571 else if(x.ptIndex()!=y.ptIndex()){
return x.ptIndex() < y.ptIndex();}
1572 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 —