341 std::cout <<
"L1TdeGCT::analyze() start\n" << std::flush;
348 edm::LogInfo(
"DataNotFound") <<
"Cannot find L1DataEmulRecord" 349 <<
" Please verify that comparator was successfully executed." 350 <<
" Emulator DQM for GCT will be skipped!" << std::endl;
359 std::cout <<
"[L1TdeGCT] Gct information not generated in de-record." 360 <<
" Skiping event!\n" 365 int DEncand[2] = {0};
366 for (
int j = 0;
j < 2;
j++)
371 <<
" data: " << DEncand[0] <<
" emul: " << DEncand[1] << std::endl;
383 for (L1DEDigiCollection::const_iterator
it = deColl.begin();
it != deColl.end();
it++)
385 if (
it->sid() ==
GCT)
386 gctColl.push_back(*
it);
389 std::cout <<
"[L1TdeGCT] record has " << gctColl.size() <<
" gct de digis\n" << std::flush;
390 for (L1DEDigiCollection::const_iterator
it = gctColl.begin();
it != gctColl.end();
it++)
399 for (L1DEDigiCollection::const_iterator
it = gctColl.begin();
it != gctColl.end();
it++) {
407 std::cout <<
"[L1TdeGCT] processing digi " 408 <<
" sys:" << sid <<
" type:" << cid <<
" \n\t" << *
it <<
"\n" 412 if (sid !=
GCT ||
it->empty()) {
413 LogDebug(
"L1TdeGCT") <<
"consistency check failure, non-gct digis!";
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:" << ccid <<
"\n";
443 wei = (
type == 0) ? 0. : 1.;
444 if (etav != nullVal && phiv != nullVal)
453 wei = (
type == 4) ? 0. : 1.;
461 unsigned int word[2];
463 std::bitset<32> dbits(
word[0]);
464 std::bitset<32> ebits(
word[1]);
465 unsigned int dexor = ((
word[0]) ^ (
word[1]));
467 std::bitset<32> debits(dexor);
469 std::bitset<32> dembits(((dexor) & (
mask)));
473 <<
" sid:" << sid <<
" cid:" << cid <<
"\n" 474 <<
" data:0x" << std::hex <<
word[0] <<
std::dec <<
" bitset:" << dbits <<
"\n" 475 <<
" emul:0x" << std::hex <<
word[1] <<
std::dec <<
" bitset:" << ebits <<
"\n" 476 <<
" xor:0x" << std::hex << dexor <<
std::dec <<
" bitset:" << debits
477 <<
" bitset:" << ((dbits) ^ (ebits)) <<
"\n" 481 for (
int ibit = 0; ibit < 32; ibit++) {
483 wei = (
type == 3 ||
type == 4) ? 0. : 1.;
497 for (L1DEDigiCollection::const_iterator
it = gctColl.begin();
it != gctColl.end();
it++) {
499 ccid = (ccid < 0 || ccid >=
nGctColl_) ? 0 : ccid;
519 std::cout <<
"[L1TDEMON] analyze rate computation\t\n" 520 <<
" colid:" <<
i <<
"(so far)" 536 std::cout <<
"[L1TdeGCT] Gct information not generated in de-record." 537 <<
" Skiping event!\n" 542 int DEncand[2] = {0};
543 for (
int j = 0;
j < 2;
j++)
548 <<
" data: " << DEncand[0] <<
" emul: " << DEncand[1] << std::endl;
557 stage1layer2Coll.reserve(21);
558 stage1layer2Coll.clear();
560 for (L1DEDigiCollection::const_iterator
it = deColl.begin();
it != deColl.end();
it++)
562 if (
it->sid() ==
GCT)
563 stage1layer2Coll.push_back(*
it);
566 std::cout <<
"[L1TdeSTAGE1LAYER2] record has " << stage1layer2Coll.size() <<
" stage1layer2 de digis\n" 568 for (L1DEDigiCollection::const_iterator
it = stage1layer2Coll.begin();
it != stage1layer2Coll.end();
it++)
577 for (L1DEDigiCollection::const_iterator
it = stage1layer2Coll.begin();
it != stage1layer2Coll.end();
it++) {
585 std::cout <<
"[L1TdeStage1Layer2] processing digi " 586 <<
" sys:" << sid <<
" type:" << cid <<
" \n\t" << *
it <<
"\n" 589 if (sid !=
GCT ||
it->empty()) {
590 LogDebug(
"L1TdeGCT") <<
"consistency check failure, non-stage1layer2 digis!";
595 double phiv =
it->x1();
596 double etav =
it->x2();
599 float rnkv = rankarr[0];
603 unsigned int mask = (~0x0);
608 LogDebug(
"L1TdeGCT") <<
"consistency check failure, col type outbounds:" << ccid <<
"\n";
618 wei = (
type == 0) ? 0. : 1.;
619 if (etav != nullVal && phiv != nullVal)
628 wei = (
type == 4) ? 0. : 1.;
636 unsigned int word_stage1layer2[2];
637 it->data(word_stage1layer2);
638 std::bitset<32> dbits(word_stage1layer2[0]);
639 std::bitset<32> ebits(word_stage1layer2[1]);
640 unsigned int dexor = ((word_stage1layer2[0]) ^ (word_stage1layer2[1]));
642 std::bitset<32> debits(dexor);
644 std::bitset<32> dembits(((dexor) & (
mask)));
648 <<
" sid:" << sid <<
" cid:" << cid <<
"\n" 649 <<
" data:0x" << std::hex << word_stage1layer2[0] <<
std::dec <<
" bitset:" << dbits <<
"\n" 650 <<
" emul:0x" << std::hex << word_stage1layer2[1] <<
std::dec <<
" bitset:" << ebits <<
"\n" 651 <<
" xor:0x" << std::hex << dexor <<
std::dec <<
" bitset:" << debits
652 <<
" bitset:" << ((dbits) ^ (ebits)) <<
"\n" 656 for (
int ibit = 0; ibit < 32; ibit++) {
658 wei = (
type == 3 ||
type == 4) ? 0. : 1.;
671 for (L1DEDigiCollection::const_iterator
it = stage1layer2Coll.begin();
it != stage1layer2Coll.end();
it++) {
693 std::cout <<
"[L1TDEMON] analyze rate computation\t\n" 694 <<
" colid:" <<
i <<
"(so far)" MonitorElement * phiData_stage1layer2[nStage1Layer2Coll_]
int colCount_stage1Layer2[nStage1Layer2Coll_]
MonitorElement * eta_stage1layer2[nStage1Layer2Coll_]
MonitorElement * phi_stage1layer2[nStage1Layer2Coll_]
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_]
L1DEDigiCollection getColl() const
MonitorElement * rnk[nGctColl_]
bool get_isComp(int i) const
int getNCand(int i, int j) const
int nWithCol_stage1Layer2[nStage1Layer2Coll_]
MonitorElement * errortype[nGctColl_]
MonitorElement * rnkData[nGctColl_]
MonitorElement * sysncand[2]
MonitorElement * errortype_stage1layer2[nStage1Layer2Coll_]
Log< level::Info, false > LogInfo
MonitorElement * rnkData_stage1layer2[nStage1Layer2Coll_]
MonitorElement * dword[nGctColl_]
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * etaphi_stage1layer2[nStage1Layer2Coll_]
edm::EDGetTokenT< L1DataEmulRecord > DEsource_
const std::string SystLabel[DEnsys]
MonitorElement * deword[nGctColl_]
MonitorElement * deword_stage1layer2[nStage1Layer2Coll_]
MonitorElement * eword[nGctColl_]
MonitorElement * etaData_stage1layer2[nStage1Layer2Coll_]
MonitorElement * etaphi[nGctColl_]
static const int nStage1Layer2Coll_
virtual double getBinContent(int binx) const
get content of bin (1-D)