9 "COMPARE_COLLS", std::vector<unsigned int>(0,
DEnsys));
11 if ((
int)dosys.size() !=
DEnsys)
12 edm::LogError(
"L1Comparator") <<
"wrong selection of systems to be compared\n" 13 <<
"\t the size of the mask COPARE_COLLS (" << dosys.size() <<
") is not " <<
DEnsys 17 for (
int isys = 0; isys <
DEnsys; isys++)
18 if (dosys[isys] != 0 && dosys[isys] != 1)
19 throw cms::Exception(
"Invalid configuration") <<
"L1Comparator: comparison flag for system " << isys
20 <<
" is non boolean: " << dosys[isys] <<
". Exiting.\n";
22 std::array<bool, dedefs::DEnsys>
ret;
30 : m_stage1_layer2_{iConfig.
getParameter<
bool>(
"stage1_layer2_")},
31 verbose_{iConfig.getUntrackedParameter<
int>(
"VerboseFlag", 0)},
32 tokenTriggerKey_{esConsumes<edm::Transition::BeginRun>()},
33 m_doSys{fillDoSys(iConfig)},
34 m_dumpFileName{iConfig.getUntrackedParameter<
std::string>(
"DumpFile",
"")},
35 m_dumpMode{iConfig.getUntrackedParameter<
int>(
"DumpMode", 0)},
38 std::cout <<
"\nL1COMPARATOR constructor...\n" << std::flush;
46 std::cout <<
"[L1Comparator] list of systems to process: ";
70 if (!m_dumpFile.good())
72 <<
" L1Comparator::L1Comparator() : " 73 <<
" couldn't open dump file " << m_dumpFileName.c_str() << std::endl;
80 produces<L1DataEmulRecord>().setBranchAlias(
"L1DataEmulRecord");
87 tokenCaloEm_[0] = consumes<L1CaloEmCollection>(tag0);
88 tokenCaloEm_[1] = consumes<L1CaloEmCollection>(tag1);
89 tokenCaloRegion_[0] = consumes<L1CaloRegionCollection>(tag0);
90 tokenCaloRegion_[1] = consumes<L1CaloRegionCollection>(tag1);
99 if (m_stage1_layer2_ ==
false) {
100 for (
int i = 0;
i < 2; ++
i) {
104 tokenGctEmCand_nonIsoEm_[
i] = consumes<L1GctEmCandCollection>(
edm::InputTag(
label,
"nonIsoEm"));
105 tokenGctJetCand_cenJets_[
i] = consumes<L1GctJetCandCollection>(
edm::InputTag(
label,
"cenJets"));
106 tokenGctJetCand_forJets_[
i] = consumes<L1GctJetCandCollection>(
edm::InputTag(
label,
"forJets"));
107 tokenGctJetCand_tauJets_[
i] = consumes<L1GctJetCandCollection>(
edm::InputTag(
label,
"tauJets"));
108 tokenGctEtTotal_[
i] = consumes<L1GctEtTotalCollection>(
tag);
109 tokenGctEtHad_[
i] = consumes<L1GctEtHadCollection>(
tag);
110 tokenGctEtMiss_[
i] = consumes<L1GctEtMissCollection>(
tag);
111 tokenGctHFRingEtSums_[
i] = consumes<L1GctHFRingEtSumsCollection>(
tag);
112 tokenGctHFBitCounts_[
i] = consumes<L1GctHFBitCountsCollection>(
tag);
113 tokenGctHtMiss_[
i] = consumes<L1GctHtMissCollection>(
tag);
114 tokenGctJetCounts_[
i] = consumes<L1GctJetCountsCollection>(
tag);
117 if (m_stage1_layer2_ ==
true) {
118 for (
int i = 0;
i < 2; ++
i) {
122 tokenGctEmCand_nonIsoEm_[
i] = consumes<L1GctEmCandCollection>(
edm::InputTag(
label,
"nonIsoEm"));
123 tokenGctJetCand_cenJets_[
i] = consumes<L1GctJetCandCollection>(
edm::InputTag(
label,
"cenJets"));
124 tokenGctJetCand_forJets_[
i] = consumes<L1GctJetCandCollection>(
edm::InputTag(
label,
"forJets"));
125 tokenGctJetCand_tauJets_[
i] = consumes<L1GctJetCandCollection>(
edm::InputTag(
label,
"tauJets"));
126 tokenGctJetCand_isoTauJets_[
i] = consumes<L1GctJetCandCollection>(
edm::InputTag(
label,
"isoTauJets"));
127 tokenGctEtTotal_[
i] = consumes<L1GctEtTotalCollection>(
tag);
128 tokenGctEtHad_[
i] = consumes<L1GctEtHadCollection>(
tag);
129 tokenGctEtMiss_[
i] = consumes<L1GctEtMissCollection>(
tag);
130 tokenGctHFRingEtSums_[
i] = consumes<L1GctHFRingEtSumsCollection>(
tag);
131 tokenGctHFBitCounts_[
i] = consumes<L1GctHFBitCountsCollection>(
tag);
132 tokenGctHtMiss_[
i] = consumes<L1GctHtMissCollection>(
tag);
133 tokenGctJetCounts_[
i] = consumes<L1GctJetCountsCollection>(
tag);
143 tokenMuDTChambPh_[0] = consumes<L1MuDTChambPhContainer>(tag0);
144 tokenMuDTChambPh_[1] = consumes<L1MuDTChambPhContainer>(tag1);
145 tokenMuDTChambTh_[0] = consumes<L1MuDTChambThContainer>(tag0);
146 tokenMuDTChambTh_[1] = consumes<L1MuDTChambThContainer>(tag1);
154 tokenMuDTTrack_[0] = consumes<L1MuDTTrackContainer>(
edm::InputTag(tag0.
label(),
"DATA"));
155 tokenMuDTTrack_[1] = consumes<L1MuDTTrackContainer>(
edm::InputTag(tag1.label(),
"DTTF"));
163 tokenMuRegionalCandRPCb_[0] = consumes<L1MuRegionalCandCollection>(
edm::InputTag(tag0.
label(),
"RPCb"));
164 tokenMuRegionalCandRPCb_[1] = consumes<L1MuRegionalCandCollection>(
edm::InputTag(tag1.label(),
"RPCb"));
165 tokenMuRegionalCandRPCf_[0] = consumes<L1MuRegionalCandCollection>(
edm::InputTag(tag0.
label(),
"RPCf"));
166 tokenMuRegionalCandRPCf_[1] = consumes<L1MuRegionalCandCollection>(
edm::InputTag(tag1.label(),
"RPCf"));
174 tokenLTCDigi_[0] = consumes<LTCDigiCollection>(dummyTag);
175 tokenLTCDigi_[1] = consumes<LTCDigiCollection>(dummyTag);
183 tokenMuGMTCand_[0] = consumes<L1MuGMTCandCollection>(tag0);
184 tokenMuGMTCand_[1] = consumes<L1MuGMTCandCollection>(tag1);
185 tokenMuReadoutCand_[0] = consumes<L1MuGMTReadoutCollection>(tag0);
186 tokenMuReadoutCand_[1] = consumes<L1MuGMTReadoutCollection>(tag1);
190 std::cout <<
"\nL1Comparator constructor...done.\n" << std::flush;
196 std::cout <<
"\nL1COMPARATOR beginRun...\n" << std::flush;
198 auto runDoSys = std::make_shared<RunCache>();
214 std::cout <<
"RCT key is empty. Sub-systems is disabled (" << (*runDoSys)[
RCT] <<
")\n";
216 std::cout <<
"GCT key is empty. Sub-systems is disabled (" << (*runDoSys)[
GCT] <<
")\n";
218 std::cout <<
"DTTF key is empty. Sub-systems is disabled (" << (*runDoSys)[
DTF] <<
")\n";
220 std::cout <<
"CSCTF key is empty. Sub-systems is disabled (" << (*runDoSys)[
CTF] <<
")\n";
222 std::cout <<
"RPC key is empty. Sub-systems is disabled (" << (*runDoSys)[
RPC] <<
")\n";
224 std::cout <<
"GMT key is empty. Sub-systems is disabled (" << (*runDoSys)[
GMT] <<
")\n";
226 std::cout <<
"GT key is empty. Sub-systems is disabled (" << (*runDoSys)[
GLT] <<
")\n";
227 std::cout <<
"TSC key = " << pKey.tscKey() << std::endl;
233 edm::LogWarning(
"L1Comparator") <<
"No L1TriggerKey found." << std::endl;
237 std::cout <<
"L1COMPARATOR beginRun... done\n" << std::flush;
244 <<
"Global data|emulator agreement: " <<
m_match << std::endl;
256 <<
" | run:" <<
eventInfo.runNum_ <<
"\n" 267 auto& runDoSys = *runCache(
runIndex);
397 typedef std::vector<L1MuDTTrackCand> L1MuDTTrackCandCollection;
399 dtf_trk_data_v.clear();
400 dtf_trk_emul_v.clear();
402 L1MuDTTrackCandCollection
const* dttc = dtf_trk_data_->
getContainer();
403 for (L1MuDTTrackCandCollection::const_iterator it = dttc->begin(); it != dttc->end(); it++)
407 L1MuDTTrackCandCollection
const* dttc = dtf_trk_emul_->
getContainer();
408 for (L1MuDTTrackCandCollection::const_iterator it = dttc->begin(); it != dttc->end(); it++)
411 dtf_trk_data = &dtf_trk_data_v;
412 dtf_trk_emul = &dtf_trk_emul_v;
452 gmt_can_data_vec.clear();
453 gmt_can_emul_vec.clear();
454 gmt_rdt_data_vec.clear();
455 gmt_rdt_emul_vec.clear();
457 typedef std::vector<L1MuGMTReadoutRecord>::const_iterator GmtRrIt;
459 std::vector<L1MuGMTReadoutRecord> gmt_rdt_data_bx = gmt_rdt_data_->
getRecords();
460 for (GmtRrIt igmtrr = gmt_rdt_data_bx.begin(); igmtrr != gmt_rdt_data_bx.end(); igmtrr++) {
462 typedef std::vector<L1MuGMTExtendedCand>::const_iterator GmtECIt;
463 std::vector<L1MuGMTExtendedCand> gmc;
464 gmc = igmtrr->getGMTCands();
465 for (GmtECIt iter1 = gmc.begin(); iter1 != gmc.end(); iter1++) {
467 cand.setPhiValue(iter1->phiValue());
468 cand.setEtaValue(iter1->etaValue());
469 cand.setPtValue(iter1->ptValue());
470 gmt_can_data_vec.push_back(
cand);
473 typedef L1MuRegionalCandCollection::const_iterator GmtRCIt;
476 rmc = igmtrr->getDTBXCands();
477 gmt_rdt_data_vec.insert(gmt_rdt_data_vec.end(), rmc.begin(), rmc.end());
479 rmc = igmtrr->getCSCCands();
480 gmt_rdt_data_vec.insert(gmt_rdt_data_vec.end(), rmc.begin(), rmc.end());
482 rmc = igmtrr->getBrlRPCCands();
483 gmt_rdt_data_vec.insert(gmt_rdt_data_vec.end(), rmc.begin(), rmc.end());
485 rmc = igmtrr->getFwdRPCCands();
486 gmt_rdt_data_vec.insert(gmt_rdt_data_vec.end(), rmc.begin(), rmc.end());
489 std::vector<L1MuGMTReadoutRecord> gmt_rdt_emul_bx = gmt_rdt_emul_->
getRecords();
490 for (GmtRrIt igmtrr = gmt_rdt_emul_bx.begin(); igmtrr != gmt_rdt_emul_bx.end(); igmtrr++) {
492 typedef std::vector<L1MuGMTExtendedCand>::const_iterator GmtECIt;
493 std::vector<L1MuGMTExtendedCand> gmc;
494 gmc = igmtrr->getGMTCands();
495 for (GmtECIt iter1 = gmc.begin(); iter1 != gmc.end(); iter1++) {
496 gmt_can_emul_vec.push_back(
L1MuGMTCand(iter1->getDataWord(), iter1->bx()));
499 typedef L1MuRegionalCandCollection::const_iterator GmtRCIt;
502 rmc = igmtrr->getDTBXCands();
503 gmt_rdt_emul_vec.insert(gmt_rdt_emul_vec.end(), rmc.begin(), rmc.end());
505 rmc = igmtrr->getCSCCands();
506 gmt_rdt_emul_vec.insert(gmt_rdt_emul_vec.end(), rmc.begin(), rmc.end());
508 rmc = igmtrr->getBrlRPCCands();
509 gmt_rdt_emul_vec.insert(gmt_rdt_emul_vec.end(), rmc.begin(), rmc.end());
511 rmc = igmtrr->getFwdRPCCands();
512 gmt_rdt_emul_vec.insert(gmt_rdt_emul_vec.end(), rmc.begin(), rmc.end());
515 gmt_rdt_data = &gmt_rdt_data_vec;
516 gmt_rdt_emul = &gmt_rdt_emul_vec;
517 gmt_can_data = &gmt_can_data_vec;
518 gmt_can_emul = &gmt_can_emul_vec;
523 bool isValidDE[
DEnsys][2];
525 for (
int j = 0;
j < 2;
j++)
526 isValidDE[
i][
j] =
false;
534 isValidDE[
GCT][0] = gct_isolaem_data.
isValid();
535 isValidDE[
GCT][1] = gct_isolaem_emul.
isValid();
536 isValidDE[
GCT][0] &= gct_noisoem_data.
isValid();
537 isValidDE[
GCT][1] &= gct_noisoem_emul.
isValid();
538 isValidDE[
GCT][0] &= gct_cenjets_data.
isValid();
539 isValidDE[
GCT][1] &= gct_cenjets_emul.
isValid();
540 isValidDE[
GCT][0] &= gct_forjets_data.
isValid();
541 isValidDE[
GCT][1] &= gct_forjets_emul.
isValid();
542 isValidDE[
GCT][0] &= gct_taujets_data.
isValid();
543 isValidDE[
GCT][1] &= gct_taujets_emul.
isValid();
544 isValidDE[
GCT][0] &= gct_etmiss_data.
isValid();
545 isValidDE[
GCT][1] &= gct_etmiss_emul.
isValid();
546 isValidDE[
GCT][0] &= gct_ettota_data.
isValid();
547 isValidDE[
GCT][1] &= gct_ettota_emul.
isValid();
548 isValidDE[
GCT][0] &= gct_htmiss_data.
isValid();
549 isValidDE[
GCT][1] &= gct_htmiss_emul.
isValid();
550 isValidDE[
GCT][0] &= gct_hfring_data.
isValid();
551 isValidDE[
GCT][1] &= gct_hfring_emul.
isValid();
552 isValidDE[
GCT][0] &= gct_hfbcnt_data.
isValid();
553 isValidDE[
GCT][1] &= gct_hfbcnt_emul.
isValid();
557 isValidDE[
GCT][0] = gct_isolaem_data.
isValid();
558 isValidDE[
GCT][1] = gct_isolaem_emul.
isValid();
559 isValidDE[
GCT][0] &= gct_noisoem_data.
isValid();
560 isValidDE[
GCT][1] &= gct_noisoem_emul.
isValid();
561 isValidDE[
GCT][0] &= gct_cenjets_data.
isValid();
562 isValidDE[
GCT][1] &= gct_cenjets_emul.
isValid();
563 isValidDE[
GCT][0] &= gct_forjets_data.
isValid();
564 isValidDE[
GCT][1] &= gct_forjets_emul.
isValid();
565 isValidDE[
GCT][0] &= gct_taujets_data.
isValid();
566 isValidDE[
GCT][1] &= gct_taujets_emul.
isValid();
567 isValidDE[
GCT][0] &= gct_isotaujets_data.
isValid();
568 isValidDE[
GCT][1] &= gct_isotaujets_emul.
isValid();
569 isValidDE[
GCT][0] &= gct_etmiss_data.
isValid();
570 isValidDE[
GCT][1] &= gct_etmiss_emul.
isValid();
571 isValidDE[
GCT][0] &= gct_ettota_data.
isValid();
572 isValidDE[
GCT][1] &= gct_ettota_emul.
isValid();
573 isValidDE[
GCT][0] &= gct_htmiss_data.
isValid();
574 isValidDE[
GCT][1] &= gct_htmiss_emul.
isValid();
575 isValidDE[
GCT][0] &= gct_hfring_data.
isValid();
576 isValidDE[
GCT][1] &= gct_hfring_emul.
isValid();
577 isValidDE[
GCT][0] &= gct_hfbcnt_data.
isValid();
578 isValidDE[
GCT][1] &= gct_hfbcnt_emul.
isValid();
603 for (
int j = 0;
j < 2;
j++) {
626 std::cout <<
"L1Comparator start processing the collections.\n" << std::flush;
656 process<L1GctHFBitCountsCollection>(gct_hfbcnt_data, gct_hfbcnt_emul,
GCT,
GCThfbit,
eventInfo);
683 process<L1GctHFBitCountsCollection>(gct_hfbcnt_data, gct_hfbcnt_emul,
GCT,
GCThfbit,
eventInfo);
688 process<L1MuDTChambPhDigiCollection>(dtp_ph_data, dtp_ph_emul,
DTP,
DTtpPh,
eventInfo);
690 process<L1MuDTChambThDigiCollection>(dtp_th_data, dtp_th_emul,
DTP,
DTtpTh,
eventInfo);
696 process<L1MuRegionalCandCollection>(rpc_cen_data, rpc_cen_emul,
RPC,
RPCcen,
eventInfo);
698 process<L1MuRegionalCandCollection>(rpc_for_data, rpc_for_emul,
RPC,
RPCfor,
eventInfo);
703 process<L1MuRegionalCandCollection>(gmt_rdt_data, gmt_rdt_emul,
GMT,
GMTrdt,
eventInfo);
711 std::cout <<
"L1Comparator done processing all collections.\n" << std::flush;
722 bool evt_match =
true;
747 std::cout <<
"\n [L1Comparator] adding empty collection to DErecord\n";
755 std::cout <<
"\n [L1Comparator] printing DErecord" 770 std::cout <<
"L1Comparator::process -ing system:" << sys <<
" (" <<
SystLabel[sys] <<
"), data type " << cid
774 std::cout <<
"L1Comparator::process debug " 775 <<
" (size " <<
data->size() <<
"," <<
emul->size() <<
")" 787 if (
tmp.get_ncand(0) == 0 &&
tmp.get_ncand(1) == 0)
796 int ndata =
cmp.get_ncand(0);
797 int nemul =
cmp.get_ncand(1);
801 <<
" system:" <<
SystLabel[sys] <<
"(id " << sys <<
")" 802 <<
" type:" <<
cmp.GetName(0) <<
"(" <<
cmp.de_type() <<
")" 803 <<
" ndata:" << ndata <<
" nemul:" << nemul <<
" (size " <<
data->size() <<
"," <<
emul->size() <<
")" 807 if (ndata == 0 && nemul == 0) {
810 <<
"empty collections -- exiting!\n" 816 std::ios::adjustfield);
821 <<
" | run:" <<
eventInfo.runNum_ <<
")\n" 827 eventInfo.dumpToFile_ <<
"\n sys:" <<
SystLabel[sys] <<
" (" << sys <<
"), type:" << cid
831 std::cout <<
"L1Comparator::process print:\n" << std::flush <<
cmp.print() << std::flush;
840 for (L1DEDigiCollection::iterator it = dg.begin(); it != dg.end(); it++)
844 for (L1DEDigiCollection::iterator it = dg.begin(); it != dg.end(); it++)
847 for (L1DEDigiCollection::iterator it = dg.begin(); it != dg.end(); it++)
852 for (
int i = 0;
i < 2;
i++)
857 <<
" system:" <<
SystLabel[sys] <<
" type:" <<
cmp.GetName(0) <<
" ndata:" <<
eventInfo.DEncand[sys][0]
858 <<
" nemul:" <<
eventInfo.DEncand[sys][1] <<
" (size " <<
data->size() <<
"," <<
emul->size() <<
")" 859 <<
" ndigis:" << dg.size() <<
" agree? " <<
eventInfo.DEmatchEvt[sys] << std::endl;
862 std::cout <<
"L1Comparator::process -ing system:" << sys <<
" (" <<
SystLabel[sys] <<
")...done.\n" << std::flush;
865 template <
class myCol>
868 std::ostream& dumpStream)
const {
871 typedef typename myCol::iterator col_it;
872 col_sz ndata =
data->size();
873 col_sz nemul =
emul->size();
874 if (ndata != nemul) {
876 dumpStream <<
" #cand mismatch!" 877 <<
"\tdata: " << ndata <<
"\temul: " << nemul << std::endl;
879 col_it itd =
data->begin();
880 col_it itm =
emul->begin();
881 for (col_sz
i = 0;
i < ndata;
i++) {
891 s <<
dt << std::endl;
892 s << em << std::endl << std::endl;
std::shared_ptr< RunCache > globalBeginRun(edm::Run const &, const edm::EventSetup &) const final
const edm::ESGetToken< L1TriggerKey, L1TriggerKeyRcd > tokenTriggerKey_
edm::EDGetTokenT< L1GctEmCandCollection > tokenGctEmCand_nonIsoEm_[2]
edm::EDGetTokenT< LTCDigiCollection > tokenLTCDigi_[2]
T getParameter(std::string const &) const
edm::EDGetTokenT< L1GctEtHadCollection > tokenGctEtHad_[2]
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
edm::EDGetTokenT< L1MuRegionalCandCollection > tokenMuRegionalCandRPCb_[2]
L1Comparator(const edm::ParameterSet &)
ret
prodAgent to be discontinued
edm::EDGetTokenT< L1GctJetCountsCollection > tokenGctJetCounts_[2]
edm::EDGetTokenT< L1GctEtMissCollection > tokenGctEtMiss_[2]
edm::EDGetTokenT< L1GctHFBitCountsCollection > tokenGctHFBitCounts_[2]
edm::EDGetTokenT< L1MuDTChambThContainer > tokenMuDTChambTh_[2]
edm::EDGetTokenT< L1GctJetCandCollection > tokenGctJetCand_tauJets_[2]
std::vector< L1DataEmulDigi > L1DEDigiCollection
The_Container const * getContainer() const
T getUntrackedParameter(std::string const &, T const &) const
bool CompareCollections(edm::Handle< T > data, edm::Handle< T > emul, std::ostream &) const
bool dumpCandidate(const T &dt, const T &em, std::ostream &s) const
edm::EDGetTokenT< L1MuGMTReadoutCollection > tokenMuReadoutCand_[2]
edm::EDGetTokenT< L1GctJetCandCollection > tokenGctJetCand_isoTauJets_[2]
edm::EDGetTokenT< L1MuRegionalCandCollection > tokenMuRegionalCandRPCf_[2]
bool getData(T &iHolder) const
edm::EDGetTokenT< L1GctEtTotalCollection > tokenGctEtTotal_[2]
TrackContainer const * getContainer() const
edm::EDGetTokenT< L1CaloEmCollection > tokenCaloEm_[2]
std::vector< L1MuDTChambThDigi > L1MuDTChambThDigiCollection
std::vector< L1MuRegionalCand > L1MuRegionalCandCollection
edm::EDGetTokenT< L1MuDTChambPhContainer > tokenMuDTChambPh_[2]
std::atomic< bool > m_match
edm::EDGetTokenT< L1GctJetCandCollection > tokenGctJetCand_cenJets_[2]
const std::array< bool, dedefs::DEnsys > m_doSys
Phi_Container const * getContainer() const
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
std::vector< L1MuDTChambPhDigi > L1MuDTChambPhDigiCollection
edm::EDGetTokenT< L1GctHFRingEtSumsCollection > tokenGctHFRingEtSums_[2]
edm::EDGetTokenT< L1GctJetCandCollection > tokenGctJetCand_forJets_[2]
edm::EDGetTokenT< L1GctHtMissCollection > tokenGctHtMiss_[2]
edm::EDGetTokenT< L1CaloRegionCollection > tokenCaloRegion_[2]
const std::string SystLabel[DEnsys]
void process(T const *, T const *, const int, const int, EventInfo &eventInfo) const
char data[epos_bytes_allocation]
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
eventInfo
add run, event number and lumi section
edm::EDGetTokenT< L1MuDTTrackContainer > tokenMuDTTrack_[2]
Log< level::Warning, false > LogWarning
edm::EDGetTokenT< L1GctEmCandCollection > tokenGctEmCand_isoEm_[2]
std::vector< L1MuGMTCand > L1MuGMTCandCollection
edm::EDGetTokenT< L1MuGMTCandCollection > tokenMuGMTCand_[2]
const bool m_stage1_layer2_