4 using namespace dedefs;
9 m_stage1_layer2_ = iConfig.
getParameter<
bool>(
"stage1_layer2_");
12 std::cout <<
"\nL1COMPARATOR constructor...\n" << std::flush;
14 std::vector<unsigned int> dosys(0,
DEnsys);
18 if((
int)dosys.size()!=
DEnsys)
20 <<
"wrong selection of systems to be compared\n"
21 <<
"\t the size of the mask COMPARE_COLLS (" << dosys.size()
22 <<
") is not " <<
DEnsys << std::endl;
25 for(
int isys=0; isys<
DEnsys; isys++)
26 if( dosys[isys]!=0 && dosys[isys]!=1 )
28 <<
"L1Comparator: comparison flag for system " << isys
29 <<
" is non boolean: " << dosys[isys] <<
". Exiting.\n";
32 m_doSys[
i] = dosys[
i];
40 std::cout <<
"[L1Comparator] list of systems to process: ";
53 std::cout <<
"[L1Comparator] debug print collection labels\n";
73 for(
int sys=0; sys<
DEnsys; sys++) {
79 <<
"\n\tdt:" << data_label <<
" : " <<m_DEsource[sys][0]
80 <<
"\n\tem:" << emul_label <<
" : " <<m_DEsource[sys][1]
83 std::cout <<
"\tdt:" << data_label <<
" : " <<m_DEsource[sys][2]
84 <<
"\n\tem:" << emul_label <<
" : " <<m_DEsource[sys][3]
96 if(!m_dumpFile.good())
98 <<
" L1Comparator::L1Comparator() : "
99 <<
" couldn't open dump file " << m_dumpFileName.c_str() << std::endl;
107 for(
int j=0;
j<2;
j++)
109 DEmatchEvt[
i] =
true;
114 produces<L1DataEmulRecord>().setBranchAlias(
"L1DataEmulRecord");
117 std::cout <<
"\nL1Comparator constructor...done.\n" << std::flush;
128 std::cout <<
"\nL1COMPARATOR beginRun...\n" << std::flush;
146 std::cout <<
"RCT key is empty. Sub-systems is disabled ("<<m_doSys[
RCT]<<
")\n";
148 std::cout <<
"GCT key is empty. Sub-systems is disabled ("<<m_doSys[
GCT]<<
")\n";
150 std::cout <<
"DTTF key is empty. Sub-systems is disabled ("<<m_doSys[
DTF]<<
")\n";
152 std::cout <<
"CSCTF key is empty. Sub-systems is disabled ("<<m_doSys[
CTF]<<
")\n";
154 std::cout <<
"RPC key is empty. Sub-systems is disabled ("<<m_doSys[
RPC]<<
")\n";
156 std::cout <<
"GMT key is empty. Sub-systems is disabled ("<<m_doSys[
GMT]<<
")\n";
158 std::cout <<
"GT key is empty. Sub-systems is disabled ("<<m_doSys[
GLT]<<
")\n";
159 std::cout <<
"TSC key = " << pKey->tscKey() << std::endl;
168 <<
"No L1TriggerKey found."
173 std::cout <<
"L1COMPARATOR beginRun... done\n" << std::flush;
179 m_dumpFile <<
"\n\n-------\n"
180 <<
"Global data|emulator agreement: "
181 << m_match << std::endl;
190 runNum_ = iEvent.
id().
run();
193 std::cout <<
"\nL1COMPARATOR entry:" << nevt_ <<
" | evt:" << evtNum_
194 <<
" | run:" << runNum_ <<
"\n" << std::flush;
201 for(
int j=0;
j<2;
j++)
203 DEmatchEvt[
i] =
true;
216 iEvent.
getByLabel(m_DEsource[RCT][0], rct_em_data);
217 iEvent.
getByLabel(m_DEsource[RCT][1], rct_em_emul);
218 iEvent.
getByLabel(m_DEsource[RCT][0], rct_rgn_data);
219 iEvent.
getByLabel(m_DEsource[RCT][1], rct_rgn_emul);
252 if(m_stage1_layer2_ ==
false) {
253 iEvent.
getByLabel(m_DEsource[GCT][0].
label(),
"isoEm", gct_isolaem_data);
254 iEvent.
getByLabel(m_DEsource[GCT][1].
label(),
"isoEm", gct_isolaem_emul);
255 iEvent.
getByLabel(m_DEsource[GCT][0].
label(),
"nonIsoEm",gct_noisoem_data);
256 iEvent.
getByLabel(m_DEsource[GCT][1].
label(),
"nonIsoEm",gct_noisoem_emul);
257 iEvent.
getByLabel(m_DEsource[GCT][0].
label(),
"cenJets", gct_cenjets_data);
258 iEvent.
getByLabel(m_DEsource[GCT][1].
label(),
"cenJets", gct_cenjets_emul);
259 iEvent.
getByLabel(m_DEsource[GCT][0].
label(),
"forJets", gct_forjets_data);
260 iEvent.
getByLabel(m_DEsource[GCT][1].
label(),
"forJets", gct_forjets_emul);
261 iEvent.
getByLabel(m_DEsource[GCT][0].
label(),
"tauJets", gct_taujets_data);
262 iEvent.
getByLabel(m_DEsource[GCT][1].
label(),
"tauJets", gct_taujets_emul);
264 iEvent.
getByLabel(m_DEsource[GCT][0],gct_ht_data);
265 iEvent.
getByLabel(m_DEsource[GCT][1],gct_ht_emul);
266 iEvent.
getByLabel(m_DEsource[GCT][0],gct_etmiss_data);
267 iEvent.
getByLabel(m_DEsource[GCT][1],gct_etmiss_emul);
268 iEvent.
getByLabel(m_DEsource[GCT][0],gct_ettota_data);
269 iEvent.
getByLabel(m_DEsource[GCT][1],gct_ettota_emul);
270 iEvent.
getByLabel(m_DEsource[GCT][0],gct_htmiss_data);
271 iEvent.
getByLabel(m_DEsource[GCT][1],gct_htmiss_emul);
272 iEvent.
getByLabel(m_DEsource[GCT][0],gct_hfring_data);
273 iEvent.
getByLabel(m_DEsource[GCT][1],gct_hfring_emul);
274 iEvent.
getByLabel(m_DEsource[GCT][0],gct_hfbcnt_data);
275 iEvent.
getByLabel(m_DEsource[GCT][1],gct_hfbcnt_emul);
276 iEvent.
getByLabel(m_DEsource[GCT][0],gct_jetcnt_data);
277 iEvent.
getByLabel(m_DEsource[GCT][1],gct_jetcnt_emul);
279 if(m_stage1_layer2_ ==
true){
280 iEvent.
getByLabel(m_DEsource[GCT][0].
label(),
"isoEm", gct_isolaem_data);
281 iEvent.
getByLabel(m_DEsource[GCT][1].
label(),
"isoEm", gct_isolaem_emul);
282 iEvent.
getByLabel(m_DEsource[GCT][0].
label(),
"nonIsoEm",gct_noisoem_data);
283 iEvent.
getByLabel(m_DEsource[GCT][1].
label(),
"nonIsoEm",gct_noisoem_emul);
284 iEvent.
getByLabel(m_DEsource[GCT][0].
label(),
"cenJets", gct_cenjets_data);
285 iEvent.
getByLabel(m_DEsource[GCT][1].
label(),
"cenJets", gct_cenjets_emul);
286 iEvent.
getByLabel(m_DEsource[GCT][0].
label(),
"forJets", gct_forjets_data);
287 iEvent.
getByLabel(m_DEsource[GCT][1].
label(),
"forJets", gct_forjets_emul);
288 iEvent.
getByLabel(m_DEsource[GCT][0].
label(),
"tauJets", gct_taujets_data);
289 iEvent.
getByLabel(m_DEsource[GCT][1].
label(),
"tauJets", gct_taujets_emul);
290 iEvent.
getByLabel(m_DEsource[GCT][0].
label(),
"isoTauJets", gct_isotaujets_data);
291 iEvent.
getByLabel(m_DEsource[GCT][1].
label(),
"isoTauJets", gct_isotaujets_emul);
293 iEvent.
getByLabel(m_DEsource[GCT][0],gct_ht_data);
294 iEvent.
getByLabel(m_DEsource[GCT][1],gct_ht_emul);
295 iEvent.
getByLabel(m_DEsource[GCT][0],gct_etmiss_data);
296 iEvent.
getByLabel(m_DEsource[GCT][1],gct_etmiss_emul);
297 iEvent.
getByLabel(m_DEsource[GCT][0],gct_ettota_data);
298 iEvent.
getByLabel(m_DEsource[GCT][1],gct_ettota_emul);
299 iEvent.
getByLabel(m_DEsource[GCT][0],gct_htmiss_data);
300 iEvent.
getByLabel(m_DEsource[GCT][1],gct_htmiss_emul);
301 iEvent.
getByLabel(m_DEsource[GCT][0],gct_hfring_data);
302 iEvent.
getByLabel(m_DEsource[GCT][1],gct_hfring_emul);
303 iEvent.
getByLabel(m_DEsource[GCT][0],gct_hfbcnt_data);
304 iEvent.
getByLabel(m_DEsource[GCT][1],gct_hfbcnt_emul);
305 iEvent.
getByLabel(m_DEsource[GCT][0],gct_jetcnt_data);
306 iEvent.
getByLabel(m_DEsource[GCT][1],gct_jetcnt_emul);
316 iEvent.
getByLabel(m_DEsource[DTP][0],dtp_ph_data_);
317 iEvent.
getByLabel(m_DEsource[DTP][1],dtp_ph_emul_);
318 iEvent.
getByLabel(m_DEsource[DTP][0],dtp_th_data_);
319 iEvent.
getByLabel(m_DEsource[DTP][1],dtp_th_emul_);
326 if(dtp_ph_data_.
isValid()) dtp_ph_data = dtp_ph_data_->getContainer();
327 if(dtp_ph_emul_.
isValid()) dtp_ph_emul = dtp_ph_emul_->getContainer();
328 if(dtp_th_data_.
isValid()) dtp_th_data = dtp_th_data_->getContainer();
329 if(dtp_th_emul_.
isValid()) dtp_th_emul = dtp_th_emul_->getContainer();
341 typedef std::vector<L1MuDTTrackCand> L1MuDTTrackCandCollection;
343 dtf_trk_data_v.clear(); dtf_trk_emul_v.clear();
345 L1MuDTTrackCandCollection
const *dttc = dtf_trk_data_->getContainer();
346 for(L1MuDTTrackCandCollection::const_iterator it=dttc->begin();
347 it!=dttc->end(); it++)
351 L1MuDTTrackCandCollection
const *dttc = dtf_trk_emul_->getContainer();
352 for(L1MuDTTrackCandCollection::const_iterator it=dttc->begin();
353 it!=dttc->end(); it++)
356 dtf_trk_data =&dtf_trk_data_v;
357 dtf_trk_emul =&dtf_trk_emul_v;
376 iEvent.
getByLabel(m_DEsource[LTC][0],ltc_data);
377 iEvent.
getByLabel(m_DEsource[LTC][1],ltc_emul);
391 iEvent.
getByLabel(m_DEsource[GMT][0], gmt_data);
392 iEvent.
getByLabel(m_DEsource[GMT][1], gmt_emul);
393 iEvent.
getByLabel(m_DEsource[GMT][0], gmt_rdt_data_);
394 iEvent.
getByLabel(m_DEsource[GMT][1], gmt_rdt_emul_);
398 gmt_can_data_vec.clear(); gmt_can_emul_vec.clear();
399 gmt_rdt_data_vec.clear(); gmt_rdt_emul_vec.clear();
401 typedef std::vector<L1MuGMTReadoutRecord>::const_iterator GmtRrIt;
403 std::vector<L1MuGMTReadoutRecord> gmt_rdt_data_bx = gmt_rdt_data_->getRecords();
404 for(GmtRrIt igmtrr=gmt_rdt_data_bx.begin(); igmtrr!=gmt_rdt_data_bx.end(); igmtrr++) {
406 typedef std::vector<L1MuGMTExtendedCand>::const_iterator GmtECIt;
407 std::vector<L1MuGMTExtendedCand> gmc;
408 gmc = igmtrr->getGMTCands();
409 for(GmtECIt iter1=gmc.begin(); iter1!=gmc.end(); iter1++) {
410 L1MuGMTCand cand(iter1->getDataWord(),iter1->bx());
412 cand.setEtaValue(iter1->etaValue());
413 cand.setPtValue (iter1->ptValue ());
414 gmt_can_data_vec.push_back(cand);
417 typedef L1MuRegionalCandCollection::const_iterator GmtRCIt;
420 rmc = igmtrr->getDTBXCands();
421 gmt_rdt_data_vec.insert(gmt_rdt_data_vec.end(),rmc.begin(),rmc.end());
423 rmc = igmtrr->getCSCCands();
424 gmt_rdt_data_vec.insert(gmt_rdt_data_vec.end(),rmc.begin(),rmc.end());
426 rmc = igmtrr->getBrlRPCCands();
427 gmt_rdt_data_vec.insert(gmt_rdt_data_vec.end(),rmc.begin(),rmc.end());
429 rmc = igmtrr->getFwdRPCCands();
430 gmt_rdt_data_vec.insert(gmt_rdt_data_vec.end(),rmc.begin(),rmc.end());
433 std::vector<L1MuGMTReadoutRecord> gmt_rdt_emul_bx = gmt_rdt_emul_->getRecords();
434 for(GmtRrIt igmtrr=gmt_rdt_emul_bx.begin(); igmtrr!=gmt_rdt_emul_bx.end(); igmtrr++) {
436 typedef std::vector<L1MuGMTExtendedCand>::const_iterator GmtECIt;
437 std::vector<L1MuGMTExtendedCand> gmc;
438 gmc = igmtrr->getGMTCands();
439 for(GmtECIt iter1=gmc.begin(); iter1!=gmc.end(); iter1++) {
440 gmt_can_emul_vec.push_back(
L1MuGMTCand(iter1->getDataWord(),iter1->bx()));
443 typedef L1MuRegionalCandCollection::const_iterator GmtRCIt;
446 rmc = igmtrr->getDTBXCands();
447 gmt_rdt_emul_vec.insert(gmt_rdt_emul_vec.end(),rmc.begin(),rmc.end());
449 rmc = igmtrr->getCSCCands();
450 gmt_rdt_emul_vec.insert(gmt_rdt_emul_vec.end(),rmc.begin(),rmc.end());
452 rmc = igmtrr->getBrlRPCCands();
453 gmt_rdt_emul_vec.insert(gmt_rdt_emul_vec.end(),rmc.begin(),rmc.end());
455 rmc = igmtrr->getFwdRPCCands();
456 gmt_rdt_emul_vec.insert(gmt_rdt_emul_vec.end(),rmc.begin(),rmc.end());
459 gmt_rdt_data = &gmt_rdt_data_vec;
460 gmt_rdt_emul = &gmt_rdt_emul_vec;
461 gmt_can_data = &gmt_can_data_vec;
462 gmt_can_emul = &gmt_can_emul_vec;
467 bool isValidDE[
DEnsys][2];
468 for(
int i=0;
i<
DEnsys;
i++)
for(
int j=0;
j<2;
j++) isValidDE[
i][
j]=
false;
473 if(m_stage1_layer2_ ==
false){
474 isValidDE[
GCT][0] = gct_isolaem_data .
isValid(); isValidDE[
GCT][1] = gct_isolaem_emul .
isValid();
475 isValidDE[
GCT][0]&= gct_noisoem_data .
isValid(); isValidDE[
GCT][1]&= gct_noisoem_emul .
isValid();
476 isValidDE[
GCT][0]&= gct_cenjets_data .
isValid(); isValidDE[
GCT][1]&= gct_cenjets_emul .
isValid();
477 isValidDE[
GCT][0]&= gct_forjets_data .
isValid(); isValidDE[
GCT][1]&= gct_forjets_emul .
isValid();
478 isValidDE[
GCT][0]&= gct_taujets_data .
isValid(); isValidDE[
GCT][1]&= gct_taujets_emul .
isValid();
486 if(m_stage1_layer2_ ==
true){
487 isValidDE[
GCT][0] = gct_isolaem_data .
isValid();
488 isValidDE[
GCT][1] = gct_isolaem_emul .
isValid();
489 isValidDE[
GCT][0]&= gct_noisoem_data .
isValid();
490 isValidDE[
GCT][1]&= gct_noisoem_emul .
isValid();
491 isValidDE[
GCT][0]&= gct_cenjets_data .
isValid();
492 isValidDE[
GCT][1]&= gct_cenjets_emul .
isValid();
493 isValidDE[
GCT][0]&= gct_forjets_data .
isValid();
494 isValidDE[
GCT][1]&= gct_forjets_emul .
isValid();
495 isValidDE[
GCT][0]&= gct_taujets_data .
isValid();
496 isValidDE[
GCT][1]&= gct_taujets_emul .
isValid();
497 isValidDE[
GCT][0]&= gct_isotaujets_data .
isValid();
498 isValidDE[
GCT][1]&= gct_isotaujets_emul .
isValid();
499 isValidDE[
GCT][0]&= gct_etmiss_data .
isValid();
500 isValidDE[
GCT][1]&= gct_etmiss_emul .
isValid();
501 isValidDE[
GCT][0]&= gct_ettota_data .
isValid();
502 isValidDE[
GCT][1]&= gct_ettota_emul .
isValid();
503 isValidDE[
GCT][0]&= gct_htmiss_data .
isValid();
504 isValidDE[
GCT][1]&= gct_htmiss_emul .
isValid();
505 isValidDE[
GCT][0]&= gct_hfring_data .
isValid();
506 isValidDE[
GCT][1]&= gct_hfring_emul .
isValid();
507 isValidDE[
GCT][0]&= gct_hfbcnt_data .
isValid();
508 isValidDE[
GCT][1]&= gct_hfbcnt_emul .
isValid();
526 for(
int j=0;
j<2;
j++) {
527 isValid[
i] &= isValidDE[
i][
j];
532 std::cout <<
"L1Comparator sys isValid? (evt:" << nevt_ <<
") ";
549 std::cout <<
"L1Comparator start processing the collections.\n" << std::flush;
552 if(m_doSys[RCT]&&isValid[RCT]) process<L1CaloEmCollection> ( rct_em_data, rct_em_emul,
RCT,
RCTem);
553 if(m_doSys[RCT]&&isValid[RCT]) process<L1CaloRegionCollection> ( rct_rgn_data, rct_rgn_emul,
RCT,
RCTrgn);
555 if(m_stage1_layer2_==
false){
556 if(m_doSys[GCT]&&isValid[GCT]) process<L1GctEmCandCollection> (gct_isolaem_data, gct_isolaem_emul,
GCT,
GCTisolaem);
557 if(m_doSys[GCT]&&isValid[GCT]) process<L1GctEmCandCollection> (gct_noisoem_data, gct_noisoem_emul,
GCT,
GCTnoisoem);
558 if(m_doSys[GCT]&&isValid[GCT]) process<L1GctJetCandCollection> (gct_cenjets_data, gct_cenjets_emul,
GCT,
GCTcenjets);
559 if(m_doSys[GCT]&&isValid[GCT]) process<L1GctJetCandCollection> (gct_forjets_data, gct_forjets_emul,
GCT,
GCTforjets);
560 if(m_doSys[GCT]&&isValid[GCT]) process<L1GctJetCandCollection> (gct_taujets_data, gct_taujets_emul,
GCT,
GCTtaujets);
561 if(m_doSys[GCT]&&isValid[GCT]) process<L1GctEtHadCollection> (gct_ht_data, gct_ht_emul,
GCT,
GCTethad);
562 if(m_doSys[GCT]&&isValid[GCT]) process<L1GctEtMissCollection> (gct_etmiss_data, gct_etmiss_emul,
GCT,
GCTetmiss);
563 if(m_doSys[GCT]&&isValid[GCT]) process<L1GctEtTotalCollection> (gct_ettota_data , gct_ettota_emul,
GCT,
GCTettot);
564 if(m_doSys[GCT]&&isValid[GCT]) process<L1GctHtMissCollection> (gct_htmiss_data, gct_htmiss_emul,
GCT,
GCThtmiss);
565 if(m_doSys[GCT]&&isValid[GCT]) process<L1GctHFRingEtSumsCollection> (gct_hfring_data, gct_hfring_emul,
GCT,
GCThfring);
566 if(m_doSys[GCT]&&isValid[GCT]) process<L1GctHFBitCountsCollection> (gct_hfbcnt_data, gct_hfbcnt_emul,
GCT,
GCThfbit);
569 if(m_stage1_layer2_ ==
true){
570 if(m_doSys[GCT]&&isValid[GCT]) process<L1GctEmCandCollection> (gct_isolaem_data, gct_isolaem_emul,
GCT,
GCTisolaem);
571 if(m_doSys[GCT]&&isValid[GCT]) process<L1GctEmCandCollection> (gct_noisoem_data, gct_noisoem_emul,
GCT,
GCTnoisoem);
572 if(m_doSys[GCT]&&isValid[GCT]) process<L1GctJetCandCollection> (gct_cenjets_data, gct_cenjets_emul,
GCT,
GCTcenjets);
573 if(m_doSys[GCT]&&isValid[GCT]) process<L1GctJetCandCollection> (gct_forjets_data, gct_forjets_emul,
GCT,
GCTforjets);
574 if(m_doSys[GCT]&&isValid[GCT]) process<L1GctJetCandCollection> (gct_taujets_data, gct_taujets_emul,
GCT,
GCTtaujets);
575 if(m_doSys[GCT]&&isValid[GCT]) process<L1GctJetCandCollection> (gct_isotaujets_data,gct_isotaujets_emul,
GCT,
GCTisotaujets);
576 if(m_doSys[GCT]&&isValid[GCT]) process<L1GctEtHadCollection> (gct_ht_data, gct_ht_emul,
GCT,
GCTethad);
577 if(m_doSys[GCT]&&isValid[GCT]) process<L1GctEtMissCollection> (gct_etmiss_data, gct_etmiss_emul,
GCT,
GCTetmiss);
578 if(m_doSys[GCT]&&isValid[GCT]) process<L1GctEtTotalCollection> (gct_ettota_data , gct_ettota_emul,
GCT,
GCTettot);
579 if(m_doSys[GCT]&&isValid[GCT]) process<L1GctHtMissCollection> (gct_htmiss_data, gct_htmiss_emul,
GCT,
GCThtmiss);
580 if(m_doSys[GCT]&&isValid[GCT]) process<L1GctHFRingEtSumsCollection> (gct_hfring_data, gct_hfring_emul,
GCT,
GCThfring);
581 if(m_doSys[GCT]&&isValid[GCT]) process<L1GctHFBitCountsCollection> (gct_hfbcnt_data, gct_hfbcnt_emul,
GCT,
GCThfbit);
584 if(m_doSys[DTP]&&isValid[DTP]) process<L1MuDTChambPhDigiCollection> ( dtp_ph_data, dtp_ph_emul,
DTP,
DTtpPh);
585 if(m_doSys[DTP]&&isValid[DTP]) process<L1MuDTChambThDigiCollection> ( dtp_th_data, dtp_th_emul,
DTP,
DTtpTh);
587 if(m_doSys[DTF]&&isValid[DTF]) process<L1MuRegionalCandCollection> ( dtf_trk_data, dtf_trk_emul,
DTF,
DTtftrk);
589 if(m_doSys[RPC]&&isValid[RPC]) process<L1MuRegionalCandCollection> ( rpc_cen_data, rpc_cen_emul,
RPC,
RPCcen);
590 if(m_doSys[RPC]&&isValid[RPC]) process<L1MuRegionalCandCollection> ( rpc_for_data, rpc_for_emul,
RPC,
RPCfor);
592 if(m_doSys[GMT]&&isValid[GMT]) process<L1MuGMTCandCollection> ( gmt_data, gmt_emul,
GMT,
GMTmain);
593 if(m_doSys[GMT]&&isValid[GMT]) process<L1MuRegionalCandCollection> ( gmt_rdt_data, gmt_rdt_emul,
GMT,
GMTrdt);
594 if(m_doSys[GMT]&&isValid[GMT]) process<L1MuGMTCandCollection> ( gmt_can_data, gmt_can_emul,
GMT,
GMTcnd);
601 std::cout <<
"L1Comparator done processing all collections.\n" << std::flush;
604 std::cout <<
"[L1Comparator] sys match? << evt." << nevt_ <<
": ";
613 bool evt_match =
true;
615 evt_match &= DEmatchEvt[
i];
627 m_match &= evt_match;
628 m_dumpFile << std::flush;
631 if(m_dedigis.size()==0) {
633 std::cout <<
"\n [L1Comparator] adding empty collection to DErecord\n";
638 std::auto_ptr<L1DataEmulRecord>
record
639 (
new L1DataEmulRecord(evt_match,m_doSys,DEmatchEvt,DEncand,m_dedigis, gltdigimon));
641 std::cout <<
"\n [L1Comparator] printing DErecord"
643 <<
"|evt:" << evtNum_
644 <<
"|run:" << runNum_
645 <<
"):\n" << std::flush;
647 <<
"\n" << std::flush;
653 std::cout <<
"L1comparator::analize() end. " << nevt_ << std::endl;
662 std::cout <<
"L1Comparator::process -ing system:" << sys
663 <<
" (" <<
SystLabel[sys] <<
"), data type " << cid
664 <<
"...\n" << std::endl;
666 std::cout <<
"L1Comparator::process debug "
667 <<
" (size " << data->size() <<
"," <<emul->size() <<
")"
668 <<
".\n" << std::endl;
674 else if(m_dumpMode==-1)
676 else if(m_dumpMode>0) {
692 <<
" system:" <<
SystLabel[sys] <<
"(id " << sys <<
")"
694 <<
" ndata:" << ndata
695 <<
" nemul:" << nemul
696 <<
" (size " << data->size() <<
"," <<emul->size() <<
")"
697 <<
".\n" << std::endl;
699 if(ndata==0&&nemul==0) {
702 <<
"empty collections -- exiting!\n" << std::endl;
706 m_dumpFile << std::setiosflags(std::ios::showpoint | std::ios::fixed
707 | std::ios::right | std::ios::adjustfield);
708 std::cout << std::setiosflags(std::ios::showpoint | std::ios::fixed
709 | std::ios::right | std::ios::adjustfield);
711 if(dumpEvent_ && prt ) {
712 m_dumpFile <<
"\nEntry: " << nevt_
713 <<
" (event:" << evtNum_
714 <<
" | run:" << runNum_
715 <<
")\n" << std::flush;
720 m_dumpFile <<
"\n sys:" <<
SystLabel[sys]
721 <<
" (" << sys <<
"), type:" << cid
725 std::cout <<
"L1Comparator::process print:\n" << std::flush
730 DEmatchEvt[sys] &= cmp.
do_compare(m_dumpFile,m_dumpMode);
736 for(L1DEDigiCollection::iterator it=dg.begin(); it!=dg.end();it++)
740 for(L1DEDigiCollection::iterator it=dg.begin(); it!=dg.end();it++)
743 for(L1DEDigiCollection::iterator it=dg.begin(); it!=dg.end();it++)
747 m_dedigis.insert(m_dedigis.end(), dg.begin(), dg.end());
748 for(
int i=0;
i<2;
i++)
755 <<
" ndata:" << DEncand[sys][0]
756 <<
" nemul:" << DEncand[sys][1]
757 <<
" (size " << data->size() <<
"," <<emul->size() <<
")"
758 <<
" ndigis:" << dg.size()
759 <<
" agree? " << DEmatchEvt[sys]
763 std::cout <<
"L1Comparator::process -ing system:"
764 << sys <<
" (" <<
SystLabel[sys] <<
")...done.\n"
768 template <
class myCol>
772 typedef typename myCol::iterator col_it;
773 col_sz ndata = data->size();
774 col_sz nemul = emul->size();
777 m_dumpFile <<
" #cand mismatch!"
778 <<
"\tdata: " << ndata
779 <<
"\temul: " << nemul
782 col_it itd = data ->
begin();
783 col_it itm = emul ->
begin();
784 for (col_sz
i=0;
i<ndata;
i++) {
785 match &= dumpCandidate(*itd++,*itm++, m_dumpFile);
795 s<<em<<std::endl<<std::endl;
T getParameter(std::string const &) const
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
L1Comparator(const edm::ParameterSet &)
std::string print(col_cit it) const
virtual void beginJob(void)
int get_ncand(typeT) const
std::vector< L1DataEmulDigi > L1DEDigiCollection
virtual void produce(edm::Event &, const edm::EventSetup &)
L1DEDigiCollection getDEDigis() const
void setPhiValue(float phiVal)
Setters for physical values.
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
std::string GetName(int i=0) const
std::vector< L1MuDTChambThDigi > L1MuDTChambThDigiCollection
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::vector< L1MuRegionalCand > L1MuRegionalCandCollection
bool do_compare(std::ofstream &, int dump=0)
std::vector< L1MuDTChambPhDigi > L1MuDTChambPhDigiCollection
const std::string SystLabel[DEnsys]
std::vector< std::vector< double > > tmp
bool dumpCandidate(const T &dt, const T &em, std::ostream &s)
char data[epos_bytes_allocation]
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
bool CompareCollections(edm::Handle< T > data, edm::Handle< T > emul)
virtual void beginRun(edm::Run const &, const edm::EventSetup &) overridefinal
std::vector< L1MuGMTCand > L1MuGMTCandCollection
void process(T const *, T const *, const int, const int)