85 void dumpTestVectors(
int bx, std::ofstream& myCout,
94 cms_uint64_t formatMuon(std::vector<l1t::Muon>::const_iterator
mu);
95 unsigned int formatEG(std::vector<l1t::EGamma>::const_iterator eg);
96 unsigned int formatTau(std::vector<l1t::Tau>::const_iterator
tau);
97 unsigned int formatJet(std::vector<l1t::Jet>::const_iterator
jet);
98 unsigned int formatMissET(std::vector<l1t::EtSum>::const_iterator etSum);
99 unsigned int formatTotalET(std::vector<l1t::EtSum>::const_iterator etSum);
100 unsigned int formatTowerCounts(std::vector<l1t::EtSum>::const_iterator etSum);
101 unsigned int formatAsym(std::vector<l1t::EtSum>::const_iterator etSum);
102 unsigned int formatHMB(std::vector<l1t::EtSum>::const_iterator etSum);
103 std::pair<unsigned int, unsigned int> formatCentrality(std::vector<l1t::EtSum>::const_iterator etSum);
136 uGtAlgToken = consumes<BXVector<GlobalAlgBlk>>(uGtAlgInputTag);
137 uGtExtToken = consumes<BXVector<GlobalExtBlk>>(uGtExtInputTag);
138 uGtObjectMapToken = consumes<GlobalObjectMapRecord>(iConfig.
getParameter<
InputTag>(
"uGtObjectMapInputTag"));
143 m_dumpGTRecord = iConfig.
getParameter<
bool>(
"dumpGTRecord");
144 m_dumpObjectMap = iConfig.
getParameter<
bool>(
"dumpGTObjectMap");
145 m_dumpTriggerResults = iConfig.
getParameter<
bool>(
"dumpTrigResults");
149 m_dumpTestVectors = iConfig.
getParameter<
bool>(
"dumpVectors");
151 if(m_dumpTestVectors) m_testVectorFile.open(fileName.c_str());
157 m_absBx += m_bxOffset;
160 unsigned int preScColumn = iConfig.
getParameter<
int>(
"psColumn");
162 m_gtUtil =
new L1TGlobalUtil(iConfig, consumesCollector(), *
this, uGtAlgInputTag, uGtExtInputTag);
163 m_gtUtil->OverridePrescalesAndMasks(preScaleFileName,preScColumn);
195 iEvent.
getByToken(uGtObjectMapToken, gtObjectMapRecord);
201 m_gtUtil->retrieveL1(iEvent,evSetup,uGtAlgToken);
203 LogDebug(
"GtRecordDump") <<
"retrieved L1 data " << endl;
206 const std::vector<std::pair<std::string, bool> > initialDecisions = m_gtUtil->decisionsInitial();
207 const std::vector<std::pair<std::string, bool> > intermDecisions = m_gtUtil->decisionsInterm();
208 const std::vector<std::pair<std::string, bool> > finalDecisions = m_gtUtil->decisionsFinal();
209 const std::vector<std::pair<std::string, int> > prescales = m_gtUtil->prescales();
210 const std::vector<std::pair<std::string, std::vector<int> > > masks = m_gtUtil->masks();
212 LogDebug(
"GtRecordDump") <<
"retrieved all event vectors " << endl;
215 if(m_dumpTriggerResults) {
216 cout <<
" Bit Algorithm Name Init aBXM Final PS Factor Num Bx Masked " << endl;
217 cout <<
"===============================================================================================================================" << endl;
219 for(
unsigned int i=0;
i<initialDecisions.size();
i++) {
223 bool resultInit = (initialDecisions.at(
i)).
second;
226 if(m_algoSummary.count(name)==0) {
227 std::vector<int> tst;
229 m_algoSummary[
name]=tst;
231 if (resultInit) (m_algoSummary.find(name)->second).at(0) += 1;
234 bool resultInterm = (intermDecisions.at(
i)).
second;
235 if (resultInterm) (m_algoSummary.find(name)->second).at(1) += 1;
236 bool resultFin = (finalDecisions.at(
i)).
second;
237 if (resultFin) (m_algoSummary.find(name)->second).at(2) += 1;
243 if(m_dumpTriggerResults && name !=
"NULL")
cout <<
std::dec << setfill(
' ') <<
" " << setw(5) <<
i <<
" " << setw(60) << name.c_str() <<
" " << setw(7) << resultInit << setw(7) << resultInterm << setw(7) << resultFin << setw(10) << prescale << setw(11) << mask.size() << endl;
245 bool finOR = m_gtUtil->getFinalOR();
246 if(m_dumpTriggerResults) {
247 cout <<
" FinalOR = " << finOR <<endl;
248 cout <<
"================================================================================================================================" << endl;
251 if(m_dumpObjectMap) {
253 if (!gtObjectMapRecord.
isValid()) {
254 edm::LogWarning(
"GtRecordDump") <<
" Warning: GlobalObjectMapRecord requested in configuration, but not found in the event." << std::endl;
257 const std::vector<GlobalObjectMap>& objMaps = gtObjectMapRecord->
gtObjectMap();
258 for (
size_t imap =0; imap < objMaps.size(); imap++) {
266 if(mapDecision != (finalDecisions.at(bit)).
second) {
267 std::cout <<
"WARNING: GlobalAlgBlk and ObjectMap Disagree on result for bit " << bit <<
" Alg: " << oMap.
algoName() << std::endl;
272 if(mapDecision != 0) {
275 std::cout <<
" -------------------------------------------------------------------------------------------- \n" <<
276 " Bit " << setw(3) << bit <<
" Decision " << setw(2) << mapDecision <<
" Alg Name " << setw(40) << oMap.
algoName() << std::endl;
279 const std::vector<GlobalLogicParser::OperandToken>& opTokenVecObjMap = oMap.
operandTokenVector();
280 const std::vector<L1TObjectTypeInCond>& condObjTypeVec = oMap.
objectTypeVector();
283 for(
size_t iCond=0; iCond<opTokenVecObjMap.size(); iCond++) {
285 std::cout <<
" " << iCond <<
") Condition Token: " << opTokenVecObjMap.at(iCond).tokenName <<
" Types: ";
286 std::vector<l1t::GlobalObject> condObjType = condObjTypeVec[iCond];
287 for(
size_t iCondType=0; iCondType<condObjType.size(); iCondType++) {
288 std::cout << condObjType.at(iCondType) <<
" ";
293 std::cout <<
" Combinations in Condition [" << condComb->size() <<
"] : ";
294 for (std::vector<SingleCombInCond>::const_iterator itComb = (*condComb).begin(); itComb != (*condComb).end(); itComb++) {
298 unsigned int iType = 0;
300 for (SingleCombInCond::const_iterator itObject = (*itComb).begin(); itObject != (*itComb).end(); itObject++) {
313 if(iType<condObjType.size()-1)
std::cout <<
",";
334 cout <<
" ----------------------------------------------------- " << endl;
335 cout <<
" *********** Run " <<
std::dec << iEvent.
id().
run() <<
" Event " << iEvent.
id().
event() <<
" ************** " << endl;
336 cout <<
" ----------------------------------------------------- " << endl;
339 for(
int i =m_minBx;
i <= m_maxBx; ++
i) {
341 cout <<
" ========= Rel BX = " <<
std::dec <<
i <<
" ====== Total BX = " << m_absBx <<
" ==========" << endl;
345 cout <<
" ------ EGammas -------- " << endl;
347 if(
i>=egammas->getFirstBX() &&
i<=egammas->getLastBX()) {
348 for(std::vector<l1t::EGamma>::const_iterator eg = egammas->begin(
i); eg != egammas->end(
i); ++eg) {
349 cout <<
" " <<
std::dec << std::setw(2) << std::setfill(
' ') << nObj << std::setfill(
'0')<<
")";
350 cout <<
" Pt " <<
std::dec << std::setw(3) << eg->hwPt() <<
" (0x" << std::hex << std::setw(3) << std::setfill(
'0') << eg->hwPt() <<
")";
351 cout <<
" Eta " <<
std::dec << std::setw(3) << eg->hwEta() <<
" (0x" << std::hex << std::setw(2) << std::setfill(
'0') << (eg->hwEta()&0xff) <<
")";
352 cout <<
" Phi " <<
std::dec << std::setw(3) << eg->hwPhi() <<
" (0x" << std::hex << std::setw(2) << std::setfill(
'0') << eg->hwPhi() <<
")";
353 cout <<
" Iso " <<
std::dec << std::setw(1) << eg->hwIso() ;
354 cout <<
" Qual "<<
std::dec << std::setw(1) << eg->hwQual() ;
359 cout <<
"No EG stored for this bx " <<
i << endl;
362 cout <<
"No EG Data in this event " << endl;
367 cout <<
" ------ Muons --------" << endl;
369 if(
i>=muons->getFirstBX() &&
i<=muons->getLastBX()) {
370 for(std::vector<l1t::Muon>::const_iterator
mu = muons->begin(
i);
mu != muons->end(
i); ++
mu) {
371 cout <<
" " <<
std::dec << std::setw(2) << std::setfill(
' ') << nObj << std::setfill(
'0')<<
")";
372 cout <<
" Pt " <<
std::dec << std::setw(3) <<
mu->hwPt() <<
" (0x" << std::hex << std::setw(3) << std::setfill(
'0') <<
mu->hwPt() <<
")";
373 cout <<
" EtaAtVtx " <<
std::dec << std::setw(3) <<
mu->hwEtaAtVtx() <<
" (0x" << std::hex << std::setw(3) << std::setfill(
'0') << (
mu->hwEtaAtVtx()&0x1ff) <<
")";
374 cout <<
" Eta " <<
std::dec << std::setw(3) <<
mu->hwEta() <<
" (0x" << std::hex << std::setw(3) << std::setfill(
'0') << (
mu->hwEta()&0x1ff) <<
")";
375 cout <<
" PhiAtVtx " <<
std::dec << std::setw(3) <<
mu->hwPhiAtVtx() <<
" (0x" << std::hex << std::setw(3) << std::setfill(
'0') <<
mu->hwPhiAtVtx() <<
")";
376 cout <<
" Phi " <<
std::dec << std::setw(3) <<
mu->hwPhi() <<
" (0x" << std::hex << std::setw(3) << std::setfill(
'0') <<
mu->hwPhi() <<
")";
384 cout <<
"No Muons stored for this bx " <<
i << endl;
387 cout <<
"No Muon Data in this event " << endl;
392 cout <<
" ------ Taus ----------" << endl;
394 if(
i>=taus->getFirstBX() &&
i<=taus->getLastBX()) {
395 for(std::vector<l1t::Tau>::const_iterator
tau = taus->begin(
i);
tau != taus->end(
i); ++
tau) {
396 cout <<
" " <<
std::dec << std::setw(2) << std::setfill(
' ') << nObj << std::setfill(
'0')<<
")";
397 cout <<
" Pt " <<
std::dec << std::setw(3) <<
tau->hwPt() <<
" (0x" << std::hex << std::setw(3) << std::setfill(
'0') <<
tau->hwPt() <<
")";
398 cout <<
" Eta " <<
std::dec << std::setw(3) <<
tau->hwEta() <<
" (0x" << std::hex << std::setw(2) << std::setfill(
'0') << (
tau->hwEta()&0xff) <<
")";
399 cout <<
" Phi " <<
std::dec << std::setw(3) <<
tau->hwPhi() <<
" (0x" << std::hex << std::setw(2) << std::setfill(
'0') <<
tau->hwPhi() <<
")";
406 cout <<
"No Taus stored for this bx " <<
i << endl;
409 cout <<
"No Tau Data in this event " << endl;
414 cout <<
" ------ Jets ----------" << endl;
416 if(
i>=jets->getFirstBX() &&
i<=jets->getLastBX()) {
417 for(std::vector<l1t::Jet>::const_iterator
jet = jets->begin(
i);
jet != jets->end(
i); ++
jet) {
418 cout <<
" " <<
std::dec << std::setw(2) << std::setfill(
' ') << nObj << std::setfill(
'0')<<
")";
419 cout <<
" Pt " <<
std::dec << std::setw(3) <<
jet->hwPt() <<
" (0x" << std::hex << std::setw(3) << std::setfill(
'0') <<
jet->hwPt() <<
")";
420 cout <<
" Eta " <<
std::dec << std::setw(3) <<
jet->hwEta() <<
" (0x" << std::hex << std::setw(2) << std::setfill(
'0') << (
jet->hwEta()&0xff) <<
")";
421 cout <<
" Phi " <<
std::dec << std::setw(3) <<
jet->hwPhi() <<
" (0x" << std::hex << std::setw(2) << std::setfill(
'0') <<
jet->hwPhi() <<
")";
427 cout <<
"No Jets stored for this bx " <<
i << endl;
430 cout <<
"No jet Data in this event " << endl;
434 cout <<
" ------ EtSums ----------" << endl;
436 if(
i>=etsums->getFirstBX() &&
i<=etsums->getLastBX()) {
437 for(std::vector<l1t::EtSum>::const_iterator etsum = etsums->begin(
i); etsum != etsums->end(
i); ++etsum) {
438 switch ( etsum->getType() ) {
461 cout <<
" TowerCounts: ";
470 cout <<
" AsymEtHF: ";
473 cout <<
" AsymHtHF: ";
488 cout <<
" Centrality: ";
491 cout <<
" Unknown: ";
494 cout <<
" Et " <<
std::dec << std::setw(3) << etsum->hwPt() <<
" (0x" << std::hex << std::setw(3) << std::setfill(
'0') << etsum->hwPt() <<
")";
498 cout <<
" Phi " <<
std::dec << std::setw(3) << etsum->hwPhi() <<
" (0x" << std::hex << std::setw(2) << std::setfill(
'0') << etsum->hwPhi() <<
")";
502 cout <<
"No EtSums stored for this bx " <<
i << endl;
505 cout <<
"No EtSum Data in this event " << endl;
509 cout <<
" ------ uGtExt ----------" << endl;
511 if(
i>=uGtExt->getFirstBX() &&
i<=uGtExt->getLastBX()) {
512 for(std::vector<GlobalExtBlk>::const_iterator extBlk = uGtExt->begin(
i); extBlk != uGtExt->end(
i); ++extBlk) {
516 cout <<
"No Ext Conditions stored for this bx " <<
i << endl;
519 cout <<
"No uGtExt Data in this event " << endl;
523 cout <<
" ------ uGtAlg ----------" << endl;
525 if(
i>=uGtAlg->getFirstBX() &&
i<=uGtAlg->getLastBX()) {
526 for(std::vector<GlobalAlgBlk>::const_iterator algBlk = uGtAlg->begin(
i); algBlk != uGtAlg->end(
i); ++algBlk) {
530 cout <<
"No Alg Decisions stored for this bx " <<
i << endl;
533 cout <<
"No uGtAlg Data in this event " << endl;
545 if(m_dumpTestVectors) {
546 for(
int i=m_minBxVectors;
i<=m_maxBxVectors;
i++) {
554 dumpTestVectors(
i, m_testVectorFile, muons, egammas, taus, jets, etsums, uGtAlg, uGtExt);
571 cout <<
"=========================== Global Trigger Summary Report ==================================" << endl;
572 cout <<
" Algorithm Name Init aBXM Final " << endl;
573 cout <<
"=============================================================================================" << endl;
574 for (
std::map<
std::string, std::vector<int> >::const_iterator itAlgo = m_algoSummary.begin(); itAlgo != m_algoSummary.end(); itAlgo++) {
577 int initCnt = (itAlgo->second).at(0);
578 int initPre = (itAlgo->second).at(1);
579 int initFnl = (itAlgo->second).at(2);
580 if(name !=
"NULL")
cout <<
std::dec << setfill(
' ') << setw(60) << name.c_str() << setw(10) << initCnt << setw(10) << initPre << setw(10) << initFnl << endl;
582 cout <<
"===========================================================================================================" << endl;
587 void GtRecordDump::dumpTestVectors(
int bx, std::ofstream& myOutFile,
601 myOutFile <<
std::dec << std::setw(4) << std::setfill(
'0') << m_absBx;
606 for(std::vector<l1t::Muon>::const_iterator
mu =
muons->begin(bx);
mu !=
muons->end(bx); ++
mu) {
609 myOutFile <<
" " << std::hex << std::setw(16) << std::setfill(
'0') << packedWd;
614 for(
int i=nDumped;
i<8;
i++) {
615 myOutFile <<
" " << std::hex << std::setw(16) << std::setfill(
'0') <<
empty;
620 if(egammas.isValid()){
621 for(std::vector<l1t::EGamma>::const_iterator eg = egammas->begin(bx); eg != egammas->end(bx); ++eg) {
622 unsigned int packedWd = formatEG(eg);
624 myOutFile <<
" " << std::hex << std::setw(8) << std::setfill(
'0') << packedWd;
629 for(
int i=nDumped;
i<12;
i++) {
630 myOutFile <<
" " << std::hex << std::setw(8) << std::setfill(
'0') <<
empty;
637 if(m_tvVersion>1) maxTau = 12;
639 for(std::vector<l1t::Tau>::const_iterator
tau =
taus->begin(bx);
tau !=
taus->end(bx); ++
tau) {
640 unsigned int packedWd = formatTau(
tau);
642 myOutFile <<
" " << std::hex << std::setw(8) << std::setfill(
'0') << packedWd;
647 for(
int i=nDumped;
i<maxTau;
i++) {
648 myOutFile <<
" " << std::hex << std::setw(8) << std::setfill(
'0') <<
empty;
654 for(std::vector<l1t::Jet>::const_iterator
jet =
jets->begin(bx);
jet !=
jets->end(bx); ++
jet) {
655 unsigned int packedWd = formatJet(
jet);
657 myOutFile <<
" " << std::hex << std::setw(8) << std::setfill(
'0') << packedWd;
662 for(
int i=nDumped;
i<12;
i++) {
663 myOutFile <<
" " << std::hex << std::setw(8) << std::setfill(
'0') <<
empty;
667 unsigned int ETTpackWd = 0;
668 unsigned int HTTpackWd = 0;
669 unsigned int ETMpackWd = 0;
670 unsigned int HTMpackWd = 0;
671 unsigned int ETMHFpackWd = 0;
672 unsigned int HTMHFpackWd = 0;
675 unsigned int ETTempackWd = 0;
676 unsigned int HFP0packWd = 0;
677 unsigned int HFM0packWd = 0;
678 unsigned int HFP1packWd = 0;
679 unsigned int HFM1packWd = 0;
680 unsigned int TowerCountspackWd = 0;
681 unsigned int AsymEtpackWd = 0;
682 unsigned int AsymHtpackWd = 0;
683 unsigned int AsymEtHFpackWd = 0;
684 unsigned int AsymHtHFpackWd = 0;
685 unsigned int CENT30packWd = 0;
686 unsigned int CENT74packWd = 0;
687 std::pair<unsigned int, unsigned int> centrality(0,0);
689 if(etsums.isValid()){
690 for(std::vector<l1t::EtSum>::const_iterator etsum = etsums->begin(bx); etsum != etsums->end(bx); ++etsum) {
692 switch ( etsum->getType() ) {
694 ETMpackWd = formatMissET(etsum);
697 ETMHFpackWd = formatMissET(etsum);
700 HTMHFpackWd = formatMissET(etsum);
703 HTMpackWd = formatMissET(etsum);
706 ETTpackWd = formatTotalET(etsum);
709 ETTempackWd = formatTotalET(etsum);
712 HTTpackWd = formatTotalET(etsum);
715 TowerCountspackWd = formatTowerCounts(etsum);
718 HFP0packWd = formatHMB(etsum);
721 HFM0packWd = formatHMB(etsum);
724 HFP1packWd = formatHMB(etsum);
727 HFM1packWd = formatHMB(etsum);
730 centrality = formatCentrality(etsum);
731 CENT30packWd = centrality.first;
732 CENT74packWd = centrality.second;
735 AsymEtpackWd = formatAsym(etsum);
738 AsymHtpackWd = formatAsym(etsum);
741 AsymEtHFpackWd = formatAsym(etsum);
744 AsymHtHFpackWd = formatAsym(etsum);
753 ETTpackWd |= HFP0packWd;
754 HTTpackWd |= HFM0packWd;
755 ETMpackWd |= HFP1packWd;
756 HTMpackWd |= HFM1packWd;
759 if(m_tvVersion>1) ETTpackWd |= ( ETTempackWd << 12);
762 if(m_tvVersion>1) HTTpackWd |= ( TowerCountspackWd << 12);
764 ETMpackWd |= AsymEtpackWd;
765 HTMpackWd |= AsymHtpackWd;
766 ETMHFpackWd |= AsymEtHFpackWd;
767 HTMHFpackWd |= AsymHtHFpackWd;
769 ETMHFpackWd |= CENT30packWd;
770 HTMHFpackWd |= CENT74packWd;
774 myOutFile <<
" " << std::hex << std::setw(8) << std::setfill(
'0') << ETTpackWd;
775 myOutFile <<
" " << std::hex << std::setw(8) << std::setfill(
'0') << HTTpackWd;
776 myOutFile <<
" " << std::hex << std::setw(8) << std::setfill(
'0') << ETMpackWd;
777 myOutFile <<
" " << std::hex << std::setw(8) << std::setfill(
'0') << HTMpackWd;
779 myOutFile <<
" " << std::hex << std::setw(8) << std::setfill(
'0') << ETMHFpackWd;
781 myOutFile <<
" " << std::hex << std::setw(8) << std::setfill(
'0') << HTMHFpackWd;
783 myOutFile <<
" " << std::hex << std::setw(8) << std::setfill(
'0') <<
empty;
790 for(
int i=0;
i<6;
i++) myOutFile <<
" " << std::hex << std::setw(8) << std::setfill(
'0') <<
empty;
796 if(uGtExt.isValid()) {
797 for(std::vector<GlobalExtBlk>::const_iterator extBlk = uGtExt->begin(bx); extBlk != uGtExt->end(bx); ++extBlk) {
798 for(
int i=255;
i>-1;
i--) {
799 if(extBlk->getExternalDecision(
i)) digit |= (1 << (
i%4));
801 myOutFile << std::hex << std::setw(1) << digit;
807 myOutFile << std::hex << std::setw(64) << std::setfill(
'0') <<
empty;
813 if(uGtAlg.isValid()) {
814 for(std::vector<GlobalAlgBlk>::const_iterator algBlk = uGtAlg->begin(bx); algBlk != uGtAlg->end(bx); ++algBlk) {
815 for(
int i=511;
i>-1;
i--) {
816 if(algBlk->getAlgoDecisionFinal(
i)) digit |= (1 << (
i%4));
818 myOutFile << std::hex << std::setw(1) << digit;
824 unsigned int finalOr = (algBlk->getFinalOR() & 0x1);
825 myOutFile <<
" " << std::hex << std::setw(1) << std::setfill(
'0') << finalOr;
828 myOutFile << std::hex << std::setw(128) << std::setfill(
'0') <<
empty;
837 cms_uint64_t GtRecordDump::formatMuon(std::vector<l1t::Muon>::const_iterator
mu){
842 packedVal |= ((
cms_uint64_t)(mu->hwPhi() & 0x3ff) <<43);
843 packedVal |= ((
cms_uint64_t)(mu->hwPhiAtVtx() & 0x3ff) <<0);
844 packedVal |= ((
cms_uint64_t)(mu->hwEta() & 0x1ff) <<53);
845 packedVal |= ((
cms_uint64_t)(mu->hwEtaAtVtx() & 0x1ff) <<23);
847 packedVal |= ((
cms_uint64_t)(mu->hwChargeValid() & 0x1) <<35);
848 packedVal |= ((
cms_uint64_t)(mu->hwCharge() & 0x1) <<34);
855 unsigned int GtRecordDump::formatEG(std::vector<l1t::EGamma>::const_iterator eg){
857 unsigned int packedVal = 0;
860 packedVal |= ((eg->hwPhi() & 0xff) <<17);
861 packedVal |= ((eg->hwEta() & 0xff) <<9);
862 packedVal |= ((eg->hwPt() & 0x1ff) <<0);
863 packedVal |= ((eg->hwIso() & 0x3) <<25);
864 packedVal |= ((eg->hwQual() & 0x31) <<27);
869 unsigned int GtRecordDump::formatTau(std::vector<l1t::Tau>::const_iterator
tau){
871 unsigned int packedVal = 0;
874 packedVal |= ((tau->hwPhi() & 0xff) <<17);
875 packedVal |= ((tau->hwEta() & 0xff) <<9);
876 packedVal |= ((tau->hwPt() & 0x1ff) <<0);
877 packedVal |= ((tau->hwIso() & 0x3) <<25);
878 packedVal |= ((tau->hwQual() & 0x31) <<27);
883 unsigned int GtRecordDump::formatJet(std::vector<l1t::Jet>::const_iterator
jet){
885 unsigned int packedVal = 0;
888 packedVal |= ((jet->hwPhi() & 0xff) <<19);
889 packedVal |= ((jet->hwEta() & 0xff) <<11);
890 packedVal |= ((jet->hwPt() & 0x7ff) <<0);
891 packedVal |= ((jet->hwQual() & 0x1) <<27);
896 unsigned int GtRecordDump::formatMissET(std::vector<l1t::EtSum>::const_iterator etSum){
898 unsigned int packedVal = 0;
901 packedVal |= ((etSum->hwPhi() & 0xff) <<12);
902 packedVal |= ((etSum->hwPt() & 0xfff) <<0);
907 unsigned int GtRecordDump::formatTotalET(std::vector<l1t::EtSum>::const_iterator etSum){
909 unsigned int packedVal = 0;
912 packedVal |= ((etSum->hwPt() & 0xfff) <<0);
917 unsigned int GtRecordDump::formatTowerCounts(std::vector<l1t::EtSum>::const_iterator etSum){
919 unsigned int packedVal = 0;
926 packedVal |= ((etSum->hwPt() & 0x1fff) <<0);
931 unsigned int GtRecordDump::formatAsym(std::vector<l1t::EtSum>::const_iterator etSum){
934 unsigned int packedVal = 0;
935 unsigned int shift = 20;
938 packedVal |= ((etSum->hwPt() & 0xff) << shift);
943 unsigned int GtRecordDump::formatHMB(std::vector<l1t::EtSum>::const_iterator etSum){
946 unsigned int packedVal = 0;
947 unsigned int shift = 28;
950 packedVal |= ((etSum->hwPt() & 0xf) << shift);
955 std::pair<unsigned int, unsigned int> GtRecordDump::formatCentrality(std::vector<l1t::EtSum>::const_iterator etSum){
958 unsigned int centword = etSum->hwPt();
961 int firstfour = (centword & 0xF);
962 int lastfour = (centword >> 4) & 0xF;
965 unsigned int packedValLN = 0;
966 unsigned int packedValUN = 0;
967 unsigned int shift = 28;
970 packedValLN |= ((firstfour & 0xf) << shift);
971 packedValUN |= ((lastfour & 0xf) << shift);
973 std::pair<unsigned int, unsigned int> centrality(packedValLN, packedValUN);
T getParameter(std::string const &) const
EventNumber_t event() const
std::map< std::string, std::vector< int > > m_algoSummary
EDGetToken uGtObjectMapToken
const std::vector< L1TObjectTypeInCond > & objectTypeVector() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
bool algoGtlResult() const
const std::vector< GlobalObjectMap > & gtObjectMap() const
get / set the vector of object maps
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
U second(std::pair< T, U > const &p)
#define DEFINE_FWK_MODULE(type)
int algoBitNumber() const
get / set bit number for algorithm in the object map
bool m_dumpTriggerResults
const std::vector< GlobalLogicParser::OperandToken > & operandTokenVector() const
const std::string & algoName() const
destructor
const CombinationsInCond * getCombinationsInCond(const std::string &condNameVal) const
return all the combinations passing the requirements imposed in condition condNameVal ...
static unsigned int const shift
unsigned long long cms_uint64_t
T first(std::pair< T, U > const &p)
std::vector< SingleCombInCond > CombinationsInCond
all the object combinations evaluated to true in the condition
std::ofstream m_testVectorFile