329 std::cout <<
"L1TdeGCT::analyze() start\n" << std::flush;
337 <<
"Cannot find L1DataEmulRecord" 338 <<
" Please verify that comparator was successfully executed." 339 <<
" Emulator DQM for GCT will be skipped!" 349 std::cout <<
"[L1TdeGCT] Gct information not generated in de-record." 350 <<
" Skiping event!\n" << std::flush;
355 for(
int j=0; j<2; j++)
360 <<
" data: " << DEncand[0]
361 <<
" emul: " << DEncand[1]
375 for(L1DEDigiCollection::const_iterator it=deColl.begin();
376 it!=deColl.end(); it++)
379 gctColl.push_back(*it);
382 std::cout <<
"[L1TdeGCT] record has " << gctColl.size()
383 <<
" gct de digis\n" << std::flush;
384 for(L1DEDigiCollection::const_iterator it=gctColl.begin();
385 it!=gctColl.end(); it++)
394 for(L1DEDigiCollection::const_iterator it=gctColl.begin();
395 it!=gctColl.end(); it++) {
404 std::cout <<
"[L1TdeGCT] processing digi " 412 if(sid!=
GCT || it->empty()) {
413 LogDebug(
"L1TdeGCT") <<
"consistency check failure, non-gct digis!";
417 int type = it->type();
418 double phiv = it->x1();
419 double etav = it->x2();
422 float rnkv = rankarr[0];
426 unsigned int mask = (~0x0);
431 LogDebug(
"L1TdeGCT") <<
"consistency check failure, col type outbounds:" 439 if(it->type()<5&&it->type()!=3)
444 wei=1.;
if(!type) wei=0.;
445 if(etav!=nullVal && phiv!=nullVal)
454 wei=1.;
if(type==4) wei=0.;
463 unsigned int word[2];
465 std::bitset<32> dbits(word[0]);
466 std::bitset<32> ebits(word[1]);
467 unsigned int dexor = ( (word[0]) ^ (word[1]) );
469 std::bitset<32> debits(dexor);
471 std::bitset<32> dembits( ( (dexor) & (mask) ) );
475 <<
" sid:" << sid <<
" cid:" << cid <<
"\n" 476 <<
" data:0x" << std::hex << word[0] <<
std::dec 477 <<
" bitset:" << dbits
479 <<
" emul:0x" << std::hex << word[1] <<
std::dec 480 <<
" bitset:" << ebits
482 <<
" xor:0x" << std::hex << dexor <<
std::dec 483 <<
" bitset:" << debits
484 <<
" bitset:" << ( (dbits) ^ (ebits) )
485 <<
"\n" << std::flush;
488 for(
int ibit=0; ibit<32; ibit++) {
491 if(type==3 || type==4) wei=0.;
492 if(dbits [ibit])
dword[ccid]->
Fill(ibit,wei);
493 if(ebits [ibit])
eword[ccid]->
Fill(ibit,wei);
494 if(debits [ibit])
deword[ccid]->
Fill(ibit,wei);
504 for(L1DEDigiCollection::const_iterator it=gctColl.begin();
505 it!=gctColl.end(); it++) {
507 ccid = (ccid<0 || ccid >=
nGctColl_) ? 0:ccid;
513 if(!hasCol[
i])
continue;
526 std::cout <<
"[L1TDEMON] analyze rate computation\t\n" 532 <<
"hasCol: " << hasCol[
i]
533 <<
" nagree: " << nagree[
i]
535 <<
"\n" << std::flush;
536 if(rate>1. || rate<0.)
539 <<
"\n" << std::flush;
548 std::cout <<
"[L1TdeGCT] Gct information not generated in de-record." 549 <<
" Skiping event!\n" << std::flush;
554 for(
int j=0; j<2; j++)
559 <<
" data: " << DEncand[0]
560 <<
" emul: " << DEncand[1]
570 stage1layer2Coll.reserve(21);
571 stage1layer2Coll.clear();
574 for(L1DEDigiCollection::const_iterator it=deColl.begin();
575 it!=deColl.end(); it++)
578 stage1layer2Coll.push_back(*it);
581 std::cout <<
"[L1TdeSTAGE1LAYER2] record has " << stage1layer2Coll.size()
582 <<
" stage1layer2 de digis\n" << std::endl;
583 for(L1DEDigiCollection::const_iterator it=stage1layer2Coll.begin();
584 it!=stage1layer2Coll.end(); it++)
593 for(L1DEDigiCollection::const_iterator it=stage1layer2Coll.begin();
594 it!=stage1layer2Coll.end(); it++) {
603 std::cout <<
"[L1TdeStage1Layer2] processing digi " 610 if(sid!=
GCT || it->empty()) {
611 LogDebug(
"L1TdeGCT") <<
"consistency check failure, non-stage1layer2 digis!";
615 int type = it->type();
616 double phiv = it->x1();
617 double etav = it->x2();
620 float rnkv = rankarr[0];
624 unsigned int mask = (~0x0);
629 LogDebug(
"L1TdeGCT") <<
"consistency check failure, col type outbounds:" 637 if(it->type()<5&&it->type()!=3)
640 wei=1.;
if(!type) wei=0.;
641 if(etav!=nullVal && phiv!=nullVal)
650 wei=1.;
if(type==4) wei=0.;
659 unsigned int word_stage1layer2[2];
660 it->data(word_stage1layer2);
661 std::bitset<32> dbits(word_stage1layer2[0]);
662 std::bitset<32> ebits(word_stage1layer2[1]);
663 unsigned int dexor = ( (word_stage1layer2[0]) ^ (word_stage1layer2[1]) );
665 std::bitset<32> debits(dexor);
667 std::bitset<32> dembits( ( (dexor) & (mask) ) );
671 <<
" sid:" << sid <<
" cid:" << cid <<
"\n" 672 <<
" data:0x" << std::hex << word_stage1layer2[0] <<
std::dec 673 <<
" bitset:" << dbits
675 <<
" emul:0x" << std::hex << word_stage1layer2[1] <<
std::dec 676 <<
" bitset:" << ebits
678 <<
" xor:0x" << std::hex << dexor <<
std::dec 679 <<
" bitset:" << debits
680 <<
" bitset:" << ( (dbits) ^ (ebits) )
681 <<
"\n" << std::flush;
684 for(
int ibit=0; ibit<32; ibit++) {
687 if(type==3 || type==4) wei=0.;
699 for(L1DEDigiCollection::const_iterator it=stage1layer2Coll.begin();
700 it!=stage1layer2Coll.end(); it++) {
708 if(!hasCol[
i])
continue;
721 std::cout <<
"[L1TDEMON] analyze rate computation\t\n" 727 <<
"hasCol: " << hasCol[
i]
728 <<
" nagree: " << nagree[
i]
730 <<
"\n" << std::flush;
731 if(rate>1. || rate<0.)
734 <<
"\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