330 std::cout <<
"L1TdeGCT::analyze() start\n" << std::flush;
338 <<
"Cannot find L1DataEmulRecord"
339 <<
" Please verify that comparator was successfully executed."
340 <<
" Emulator DQM for GCT will be skipped!"
347 bool isComp = deRecord->get_isComp(
GCT);
350 std::cout <<
"[L1TdeGCT] Gct information not generated in de-record."
351 <<
" Skiping event!\n" << std::flush;
356 for(
int j=0;
j<2;
j++)
357 DEncand[
j] = deRecord->getNCand(
GCT,
j);
361 <<
" data: " << DEncand[0]
362 <<
" emul: " << DEncand[1]
367 deColl = deRecord->getColl();
376 for(L1DEDigiCollection::const_iterator it=deColl.begin();
377 it!=deColl.end(); it++)
380 gctColl.push_back(*it);
383 std::cout <<
"[L1TdeGCT] record has " << gctColl.size()
384 <<
" gct de digis\n" << std::flush;
385 for(L1DEDigiCollection::const_iterator it=gctColl.begin();
386 it!=gctColl.end(); it++)
395 for(L1DEDigiCollection::const_iterator it=gctColl.begin();
396 it!=gctColl.end(); it++) {
405 std::cout <<
"[L1TdeGCT] processing digi "
413 if(sid!=
GCT || it->empty()) {
414 LogDebug(
"L1TdeGCT") <<
"consistency check failure, non-gct digis!";
418 int type = it->type();
419 double phiv = it->x1();
420 double etav = it->x2();
423 float rnkv = rankarr[0];
427 unsigned int mask = (~0x0);
432 LogDebug(
"L1TdeGCT") <<
"consistency check failure, col type outbounds:"
440 if(it->type()<5&&it->type()!=3)
445 wei=1.;
if(!type) wei=0.;
446 if(etav!=nullVal && phiv!=nullVal)
455 wei=1.;
if(type==4) wei=0.;
464 unsigned int word[2];
466 std::bitset<32> dbits(word[0]);
467 std::bitset<32> ebits(word[1]);
468 unsigned int dexor = ( (word[0]) ^ (word[1]) );
470 std::bitset<32> debits(dexor);
472 std::bitset<32> dembits( ( (dexor) & (mask) ) );
476 <<
" sid:" << sid <<
" cid:" << cid <<
"\n"
477 <<
" data:0x" << std::hex << word[0] <<
std::dec
478 <<
" bitset:" << dbits
480 <<
" emul:0x" << std::hex << word[1] <<
std::dec
481 <<
" bitset:" << ebits
483 <<
" xor:0x" << std::hex << dexor <<
std::dec
484 <<
" bitset:" << debits
485 <<
" bitset:" << ( (dbits) ^ (ebits) )
486 <<
"\n" << std::flush;
489 for(
int ibit=0; ibit<32; ibit++) {
492 if(type==3 || type==4) wei=0.;
493 if(dbits [ibit])
dword[ccid]->
Fill(ibit,wei);
494 if(ebits [ibit])
eword[ccid]->
Fill(ibit,wei);
495 if(debits [ibit])
deword[ccid]->
Fill(ibit,wei);
505 for(L1DEDigiCollection::const_iterator it=gctColl.begin();
506 it!=gctColl.end(); it++) {
508 ccid = (ccid<0 || ccid >=
nGctColl_) ? 0:ccid;
514 if(!hasCol[
i])
continue;
527 std::cout <<
"[L1TDEMON] analyze rate computation\t\n"
533 <<
"hasCol: " << hasCol[
i]
534 <<
" nagree: " << nagree[
i]
536 <<
"\n" << std::flush;
537 if(rate>1. || rate<0.)
540 <<
"\n" << std::flush;
546 bool isComp = deRecord->get_isComp(
GCT);
549 std::cout <<
"[L1TdeGCT] Gct information not generated in de-record."
550 <<
" Skiping event!\n" << std::flush;
555 for(
int j=0;
j<2;
j++)
556 DEncand[
j] = deRecord->getNCand(
GCT,
j);
560 <<
" data: " << DEncand[0]
561 <<
" emul: " << DEncand[1]
566 deColl = deRecord->getColl();
571 stage1layer2Coll.reserve(21);
572 stage1layer2Coll.
clear();
575 for(L1DEDigiCollection::const_iterator it=deColl.begin();
576 it!=deColl.end(); it++)
579 stage1layer2Coll.push_back(*it);
582 std::cout <<
"[L1TdeSTAGE1LAYER2] record has " << stage1layer2Coll.size()
583 <<
" stage1layer2 de digis\n" << std::endl;
584 for(L1DEDigiCollection::const_iterator it=stage1layer2Coll.begin();
585 it!=stage1layer2Coll.end(); it++)
594 for(L1DEDigiCollection::const_iterator it=stage1layer2Coll.begin();
595 it!=stage1layer2Coll.end(); it++) {
604 std::cout <<
"[L1TdeStage1Layer2] processing digi "
611 if(sid!=
GCT || it->empty()) {
612 LogDebug(
"L1TdeGCT") <<
"consistency check failure, non-stage1layer2 digis!";
616 int type = it->type();
617 double phiv = it->x1();
618 double etav = it->x2();
621 float rnkv = rankarr[0];
625 unsigned int mask = (~0x0);
630 LogDebug(
"L1TdeGCT") <<
"consistency check failure, col type outbounds:"
638 if(it->type()<5&&it->type()!=3)
641 wei=1.;
if(!type) wei=0.;
642 if(etav!=nullVal && phiv!=nullVal)
651 wei=1.;
if(type==4) wei=0.;
660 unsigned int word_stage1layer2[2];
661 it->data(word_stage1layer2);
662 std::bitset<32> dbits(word_stage1layer2[0]);
663 std::bitset<32> ebits(word_stage1layer2[1]);
664 unsigned int dexor = ( (word_stage1layer2[0]) ^ (word_stage1layer2[1]) );
666 std::bitset<32> debits(dexor);
668 std::bitset<32> dembits( ( (dexor) & (mask) ) );
672 <<
" sid:" << sid <<
" cid:" << cid <<
"\n"
673 <<
" data:0x" << std::hex << word_stage1layer2[0] <<
std::dec
674 <<
" bitset:" << dbits
676 <<
" emul:0x" << std::hex << word_stage1layer2[1] <<
std::dec
677 <<
" bitset:" << ebits
679 <<
" xor:0x" << std::hex << dexor <<
std::dec
680 <<
" bitset:" << debits
681 <<
" bitset:" << ( (dbits) ^ (ebits) )
682 <<
"\n" << std::flush;
685 for(
int ibit=0; ibit<32; ibit++) {
688 if(type==3 || type==4) wei=0.;
700 for(L1DEDigiCollection::const_iterator it=stage1layer2Coll.begin();
701 it!=stage1layer2Coll.end(); it++) {
709 if(!hasCol[
i])
continue;
722 std::cout <<
"[L1TDEMON] analyze rate computation\t\n"
728 <<
"hasCol: " << hasCol[
i]
729 <<
" nagree: " << nagree[
i]
731 <<
"\n" << std::flush;
732 if(rate>1. || rate<0.)
735 <<
"\n" << std::flush;
MonitorElement * phiData_stage1layer2[nStage1Layer2Coll_]
int colCount_stage1Layer2[nStage1Layer2Coll_]
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * eta_stage1layer2[nStage1Layer2Coll_]
MonitorElement * phi_stage1layer2[nStage1Layer2Coll_]
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * phiData[nGctColl_]
MonitorElement * eword_stage1layer2[nStage1Layer2Coll_]
MonitorElement * phi[nGctColl_]
MonitorElement * eta[nGctColl_]
MonitorElement * sysrates
std::vector< L1DataEmulDigi > L1DEDigiCollection
MonitorElement * dword_stage1layer2[nStage1Layer2Coll_]
static const int nGctColl_
MonitorElement * rnk_stage1layer2[nStage1Layer2Coll_]
MonitorElement * etaData[nGctColl_]
MonitorElement * rnk[nGctColl_]
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
int nWithCol_stage1Layer2[nStage1Layer2Coll_]
MonitorElement * errortype[nGctColl_]
MonitorElement * rnkData[nGctColl_]
MonitorElement * sysncand[2]
MonitorElement * errortype_stage1layer2[nStage1Layer2Coll_]
MonitorElement * rnkData_stage1layer2[nStage1Layer2Coll_]
MonitorElement * dword[nGctColl_]
MonitorElement * etaphi_stage1layer2[nStage1Layer2Coll_]
edm::EDGetTokenT< L1DataEmulRecord > DEsource_
const std::string SystLabel[DEnsys]
double getBinContent(int binx) const
get content of bin (1-D)
MonitorElement * deword[nGctColl_]
MonitorElement * deword_stage1layer2[nStage1Layer2Coll_]
MonitorElement * eword[nGctColl_]
MonitorElement * etaData_stage1layer2[nStage1Layer2Coll_]
MonitorElement * etaphi[nGctColl_]
static const int nStage1Layer2Coll_