331 std::cout <<
"L1TdeGCT::analyze() start\n" << std::flush;
339 <<
"Cannot find L1DataEmulRecord" 340 <<
" Please verify that comparator was successfully executed." 341 <<
" Emulator DQM for GCT will be skipped!" 351 std::cout <<
"[L1TdeGCT] Gct information not generated in de-record." 352 <<
" Skiping event!\n" << std::flush;
357 for(
int j=0; j<2; j++)
362 <<
" data: " << DEncand[0]
363 <<
" emul: " << DEncand[1]
377 for(L1DEDigiCollection::const_iterator it=deColl.begin();
378 it!=deColl.end(); it++)
381 gctColl.push_back(*it);
384 std::cout <<
"[L1TdeGCT] record has " << gctColl.size()
385 <<
" gct de digis\n" << std::flush;
386 for(L1DEDigiCollection::const_iterator it=gctColl.begin();
387 it!=gctColl.end(); it++)
396 for(L1DEDigiCollection::const_iterator it=gctColl.begin();
397 it!=gctColl.end(); it++) {
406 std::cout <<
"[L1TdeGCT] processing digi " 414 if(sid!=
GCT || it->empty()) {
415 LogDebug(
"L1TdeGCT") <<
"consistency check failure, non-gct digis!";
419 int type = it->type();
420 double phiv = it->x1();
421 double etav = it->x2();
424 float rnkv = rankarr[0];
428 unsigned int mask = (~0x0);
433 LogDebug(
"L1TdeGCT") <<
"consistency check failure, col type outbounds:" 441 if(it->type()<5&&it->type()!=3)
446 wei=1.;
if(!type) wei=0.;
447 if(etav!=nullVal && phiv!=nullVal)
456 wei=1.;
if(type==4) wei=0.;
465 unsigned int word[2];
467 std::bitset<32> dbits(word[0]);
468 std::bitset<32> ebits(word[1]);
469 unsigned int dexor = ( (word[0]) ^ (word[1]) );
471 std::bitset<32> debits(dexor);
473 std::bitset<32> dembits( ( (dexor) & (mask) ) );
477 <<
" sid:" << sid <<
" cid:" << cid <<
"\n" 478 <<
" data:0x" << std::hex << word[0] <<
std::dec 479 <<
" bitset:" << dbits
481 <<
" emul:0x" << std::hex << word[1] <<
std::dec 482 <<
" bitset:" << ebits
484 <<
" xor:0x" << std::hex << dexor <<
std::dec 485 <<
" bitset:" << debits
486 <<
" bitset:" << ( (dbits) ^ (ebits) )
487 <<
"\n" << std::flush;
490 for(
int ibit=0; ibit<32; ibit++) {
493 if(type==3 || type==4) wei=0.;
494 if(dbits [ibit])
dword[ccid]->
Fill(ibit,wei);
495 if(ebits [ibit])
eword[ccid]->
Fill(ibit,wei);
496 if(debits [ibit])
deword[ccid]->
Fill(ibit,wei);
506 for(L1DEDigiCollection::const_iterator it=gctColl.begin();
507 it!=gctColl.end(); it++) {
509 ccid = (ccid<0 || ccid >=
nGctColl_) ? 0:ccid;
515 if(!hasCol[
i])
continue;
528 std::cout <<
"[L1TDEMON] analyze rate computation\t\n" 534 <<
"hasCol: " << hasCol[
i]
535 <<
" nagree: " << nagree[
i]
537 <<
"\n" << std::flush;
538 if(rate>1. || rate<0.)
541 <<
"\n" << std::flush;
550 std::cout <<
"[L1TdeGCT] Gct information not generated in de-record." 551 <<
" Skiping event!\n" << std::flush;
556 for(
int j=0; j<2; j++)
561 <<
" data: " << DEncand[0]
562 <<
" emul: " << DEncand[1]
572 stage1layer2Coll.reserve(21);
573 stage1layer2Coll.clear();
576 for(L1DEDigiCollection::const_iterator it=deColl.begin();
577 it!=deColl.end(); it++)
580 stage1layer2Coll.push_back(*it);
583 std::cout <<
"[L1TdeSTAGE1LAYER2] record has " << stage1layer2Coll.size()
584 <<
" stage1layer2 de digis\n" << std::endl;
585 for(L1DEDigiCollection::const_iterator it=stage1layer2Coll.begin();
586 it!=stage1layer2Coll.end(); it++)
595 for(L1DEDigiCollection::const_iterator it=stage1layer2Coll.begin();
596 it!=stage1layer2Coll.end(); it++) {
605 std::cout <<
"[L1TdeStage1Layer2] processing digi " 612 if(sid!=
GCT || it->empty()) {
613 LogDebug(
"L1TdeGCT") <<
"consistency check failure, non-stage1layer2 digis!";
617 int type = it->type();
618 double phiv = it->x1();
619 double etav = it->x2();
622 float rnkv = rankarr[0];
626 unsigned int mask = (~0x0);
631 LogDebug(
"L1TdeGCT") <<
"consistency check failure, col type outbounds:" 639 if(it->type()<5&&it->type()!=3)
642 wei=1.;
if(!type) wei=0.;
643 if(etav!=nullVal && phiv!=nullVal)
652 wei=1.;
if(type==4) wei=0.;
661 unsigned int word_stage1layer2[2];
662 it->data(word_stage1layer2);
663 std::bitset<32> dbits(word_stage1layer2[0]);
664 std::bitset<32> ebits(word_stage1layer2[1]);
665 unsigned int dexor = ( (word_stage1layer2[0]) ^ (word_stage1layer2[1]) );
667 std::bitset<32> debits(dexor);
669 std::bitset<32> dembits( ( (dexor) & (mask) ) );
673 <<
" sid:" << sid <<
" cid:" << cid <<
"\n" 674 <<
" data:0x" << std::hex << word_stage1layer2[0] <<
std::dec 675 <<
" bitset:" << dbits
677 <<
" emul:0x" << std::hex << word_stage1layer2[1] <<
std::dec 678 <<
" bitset:" << ebits
680 <<
" xor:0x" << std::hex << dexor <<
std::dec 681 <<
" bitset:" << debits
682 <<
" bitset:" << ( (dbits) ^ (ebits) )
683 <<
"\n" << std::flush;
686 for(
int ibit=0; ibit<32; ibit++) {
689 if(type==3 || type==4) wei=0.;
701 for(L1DEDigiCollection::const_iterator it=stage1layer2Coll.begin();
702 it!=stage1layer2Coll.end(); it++) {
710 if(!hasCol[
i])
continue;
723 std::cout <<
"[L1TDEMON] analyze rate computation\t\n" 729 <<
"hasCol: " << hasCol[
i]
730 <<
" nagree: " << nagree[
i]
732 <<
"\n" << std::flush;
733 if(rate>1. || rate<0.)
736 <<
"\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_]
int getNCand(int i, int j) const
MonitorElement * rnkData[nGctColl_]
MonitorElement * sysncand[2]
MonitorElement * errortype_stage1layer2[nStage1Layer2Coll_]
MonitorElement * rnkData_stage1layer2[nStage1Layer2Coll_]
MonitorElement * dword[nGctColl_]
L1DEDigiCollection getColl() const
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_
bool get_isComp(int i) const