34 <<
"===========================" << endl
35 <<
"===== =====" << endl
36 <<
"===== Example L1 Calo =====" << endl
37 <<
"===== =====" << endl
38 <<
"===========================" << endl << endl;
41 fileLoader.
loadFile( filename, l1menu);
42 cout <<
"Loaded the L1 menu " << l1menu.name() << endl;
43 cout <<
"Information to configure eFEX" << endl;
44 cout <<
"For producing eEM objects you need the working points" << endl;
45 auto & ei_eEM = l1menu.thrExtraInfo().eEM();
46 for(
int ieta : { -30, -20, -10, 0, 10, 20, 30 } ) {
47 unsigned int ptMinToTopo = ei_eEM.ptMinToTopo();
48 cout <<
"ptmin=" << ptMinToTopo << endl;
52 int reta_loose_fw = iso_loose.reta_fw();
53 int rhad_loose_fw = iso_loose.rhad_fw();
54 int wstot_loose_fw = iso_loose.wstot_fw();
55 int reta_loose_d = iso_loose.reta_d();
56 int rhad_loose_d = iso_loose.rhad_d();
57 int wstot_loose_d = iso_loose.wstot_d();
58 cout <<
"ieta=" << ieta <<
" loose => reta_fw=" << reta_loose_fw <<
", rhad_fw=" << rhad_loose_fw <<
", wstot_fw=" << wstot_loose_fw << endl;
59 cout <<
"ieta=" << ieta <<
" loose => reta_d=" << reta_loose_d <<
", rhad_d=" << rhad_loose_d <<
", wstot_d=" << wstot_loose_d << endl;
60 int reta_medium_fw = iso_medium.reta_fw();
61 int rhad_medium_fw = iso_medium.rhad_fw();
62 int wstot_medium_fw = iso_medium.wstot_fw();
63 int reta_medium_d = iso_medium.reta_d();
64 int rhad_medium_d = iso_medium.rhad_d();
65 int wstot_medium_d = iso_medium.wstot_d();
66 cout <<
"ieta=" << ieta <<
" medium => reta_fw=" << reta_medium_fw <<
", rhad_fw=" << rhad_medium_fw <<
", wstot_fw=" << wstot_medium_fw << endl;
67 cout <<
"ieta=" << ieta <<
" medium => reta_d=" << reta_medium_d <<
", rhad_d=" << rhad_medium_d <<
", wstot_d=" << wstot_medium_d << endl;
68 int reta_tight_fw = iso_tight.reta_fw();
69 int rhad_tight_fw = iso_tight.rhad_fw();
70 int wstot_tight_fw = iso_tight.wstot_fw();
71 int reta_tight_d = iso_tight.reta_d();
72 int rhad_tight_d = iso_tight.rhad_d();
73 int wstot_tight_d = iso_tight.wstot_d();
74 cout <<
"ieta=" << ieta <<
" tight => reta_fw=" << reta_tight_fw <<
", rhad_fw=" << rhad_tight_fw <<
", wstot_fw=" << wstot_tight_fw << endl;
75 cout <<
"ieta=" << ieta <<
" tight => reta_d=" << reta_tight_d <<
", rhad_d=" << rhad_tight_d <<
", wstot_d=" << wstot_tight_d << endl;
126 cout <<
"L1 menu has " << l1menu.connectorNames().size() <<
" connectors configured" << endl;
127 for(
const string & connName : l1menu.connectorNames() ) {
128 auto & conn = l1menu.connector(connName);
129 cout <<
"Connector " << connName << (conn.legacy() ?
" (legacy)":
"") <<
" has " << conn.size() <<
" trigger lines configured:" << endl;
130 if( connName ==
"MuCTPiOpt0" ) {
131 for(
auto & tl : conn.triggerLines() ) {
132 cout <<
" Triggerline " << tl.name() <<
" bits=[" << tl.startbit() <<
".." << tl.endbit() <<
"] is a muon threshold " << endl;
134 }
else if( connName ==
"AlfaCtpin" ) {
135 for(
size_t clock : { 0, 1 } ) {
136 for(
auto & tl : conn.triggerLines(0, clock) ) {
137 cout <<
" Triggerline " << tl.name() <<
" (clock " << clock <<
", bit " << tl.startbit() <<
") is an ALFA threshold " << endl;
141 for(
auto & tl : conn.triggerLines() ) {
142 cout <<
" Triggerline " << tl.name() <<
" bits=[" << tl.startbit() <<
".." << tl.endbit() <<
"] is a legacy threshold " << endl;
145 for(
auto & tl : conn.triggerLines() ) {
146 const string & tlName = tl.name();
147 auto & topoAlg = l1menu.algorithmFromTriggerline(tlName);
148 cout <<
" Triggerline " << tlName <<
" bits=[" << tl.startbit() <<
".." << tl.endbit()
149 <<
"] is produced by topo algorithm " << topoAlg.name() << endl;
152 for(
size_t fpga : { 0, 1 } ) {
153 for(
size_t clock : { 0, 1 } ) {
154 for(
auto & tl : conn.triggerLines(fpga, clock) ) {
155 const string & tlName = tl.name();
156 auto & topoAlg = l1menu.algorithmFromTriggerline(tlName);
157 cout <<
" Triggerline " << tlName <<
" bits=[" << tl.startbit() <<
".." << tl.endbit()
158 <<
"] is produced by topo algorithm " << topoAlg.name() << endl;
178 cout <<
"Number of topo algorithms: " << l1menu.topoAlgorithmNames(
"TOPO").size() << endl;
179 cout <<
"Number of topo algorithm outputs: " << l1menu.topoAlgorithmOutputNames(
"TOPO").size() << endl;
181 const auto & tl = l1menu.connector(
"LegacyTopo1").triggerLines(0,0)[0];
182 auto & topoAlg = l1menu.algorithmFromTriggerline(tl.name());
185 auto & topoAlgInvmassLeg = l1menu.algorithmFromTriggerline(
"R2TOPO_900INVM9999-AJ30s6-AJ20s6");
186 topoAlgInvmassLeg.print();
187 cout <<
"Explicit access to 'NumResultBits' as unsigned int: " << topoAlgInvmassLeg.genericParameter<
unsigned int>(
"NumResultBits") << endl;
189 auto & topoAlgEMJ = l1menu.algorithmFromOutput(
"0DR03-eEM7ab-CjJ15ab",
"TOPO");
192 auto & topoMultAlg = l1menu.algorithm(
"Mult_eEM22M",
"MULTTOPO");
194 cout <<
" threshold definition: " << topoMultAlg.getAttribute(
"threshold") << endl;
197 for(
auto & algName : l1menu.topoAlgorithmNames(
"TOPO") ) {
198 auto & alg = l1menu.algorithm( algName,
"TOPO" );
199 cout << algName <<
" has inputs ";
200 for(
auto & inp : alg.inputs() ) {
221 cout <<
"L1 menu has " << l1menu.thresholdTypes().size() <<
" threshold types configured: " << endl <<
" ";
222 for(
const string & tt : l1menu.thresholdTypes()) { cout << tt <<
" "; } cout << endl;
223 for(
const string & tt : l1menu.thresholdTypes()) {
224 cout <<
"L1 menu has " << l1menu.thresholds(tt).size() <<
" thresholds of type " << tt;
226 cout <<
" thresholds, going to print the first three." << endl;
228 for(
const auto& thr : l1menu.thresholds(tt) ) {
229 cout <<
" " << thr->name() <<
" of type " << thr->type() <<
" (mapping " << thr->mapping() <<
") " << endl;
235 if(tt !=
"internal") {
236 for(
const auto& thr : l1menu.thresholds(tt) ) {
237 if(thr->name().find(
"MULT-CMU") != std::string::npos){
continue; }
238 const std::string & connName = l1menu.connectorNameFromThreshold(thr->name());
239 if(! l1menu.connector(connName).hasLine(thr->name())) {
240 throw std::runtime_error(
"Threshold " + thr->name() +
" does not exist as triggerline of connector " + connName);
251 cout << thrTAU.name() <<
":" << endl;
252 for(
int eta : {0, 10, 20, -10,-20}) {
253 cout <<
" value at eta = " <<
eta <<
": " << thrTAU.thrValue(
eta) <<
" GeV, "<< thrTAU.thrValueCounts(
eta) <<
" counts, iso " << thrTAU.isolationMask() << endl;
258 for (
const string & thrName : l1menu.thresholdNames() ) {
259 cout << thrName <<
" threshold value: " << l1menu.threshold(thrName).thrValue() << endl;
263 cout <<
"XE30 cut: " << l1menu.threshold(
"XE30").thrValue() << endl;
265 if(thrjXE) cout <<
"jXESPARE1 cut [100 MeV]: " << thrjXE.
thrValue100MeV() << endl;
268 auto thrJET = dynamic_pointer_cast<TrigConf::L1Threshold_JET>(l1menu.thresholds(
"JET")[0]);
270 cout << thrJET->name() <<
":" << endl;
271 for(
int eta : {0, 20, 30, 40}) {
272 cout <<
" value at eta = " <<
eta <<
": " << thrJET->thrValue(
eta) <<
" GeV, "
273 << thrJET->thrValueMeV(
eta) <<
" MeV, " << thrJET->thrValueCounts(
eta) <<
" counts" << endl;
277 auto thrXE = dynamic_pointer_cast<TrigConf::L1Threshold_XE>(l1menu.thresholds(
"XE")[0]);
279 cout << thrXE->name() <<
": value " << thrXE->thrValue() <<
" GeV, " << thrXE->thrValueMeV() <<
" MeV, " << thrXE->thrValueCounts() <<
" counts" << endl;
290 cout <<
"eEM26M isolation: rhad = " << (int)threEM.
rhad() <<
", reta = " << (int)threEM.reta() <<
", wstot = " << (int)threEM.wstot() << endl;
294 cout << threTAU.name() <<
":" << endl;
295 for(
int eta : {0, 10, 20, -10,-20}) {
296 cout <<
" value at eta = " <<
eta <<
": " << threTAU.thrValue(
eta) <<
" GeV, " << threTAU.thrValueCounts(
eta) <<
" counts, iso " << (int)threTAU.rCore() << endl;
301 cout <<
"jEM20M isolation: iso = " << (int)thrjEM.
iso() <<
", frac = " << (int)thrjEM.frac() <<
", frac2 = " << (int)thrjEM.frac2() << endl;
305 cout << thrjJET.name() <<
":" << endl;
306 for(
int eta : {0, 20, 30, 40}) {
307 cout <<
" value at eta = " <<
eta <<
": " << thrjJET.thrValue(
eta) <<
" GeV, "
308 << thrjJET.thrValueMeV(
eta) <<
" MeV, " << thrjJET.thrValueCounts(
eta) <<
" counts" << endl;
314 cout <<
"Threshold MU8VF with "
315 <<
"barrel pt=" << thrMU8VF.
ptBarrel() <<
" (idx " << thrMU8VF.idxBarrel() <<
"), "
316 <<
"endcap pt=" << thrMU8VF.ptEndcap() <<
" (idx " << thrMU8VF.idxEndcap() <<
"), and "
317 <<
"forward pt=" << thrMU8VF.ptForward() <<
" (idx " << thrMU8VF.idxForward() <<
")" << endl;
330 section(
"Extra information for threholds");
331 cout <<
"These threshold types have extra information" << endl <<
" ";
332 for(
const string & tt : l1menu.thresholdTypes()) {
333 if( l1menu.thrExtraInfo().hasInfo(tt) ) {
337 cout << endl <<
"going to print details of the extra threshold information" << endl;
339 auto & exEM = l1menu.thrExtraInfo().EM();
340 cout <<
" EM" << endl;
341 cout <<
" energy resolution (MeV) " << exEM.resolutionMeV() << endl;
342 cout <<
" ptMinToTopo " << exEM.ptMinToTopo() << endl;
343 for(
const std::string tt : {
"HAIsoForEMthr",
"EMIsoForEMthr"} ) {
344 cout <<
" Isolation " << tt << endl;
345 for(
size_t bit = 1; bit <= 5; bit++) {
346 auto & iso = exEM.isolation(tt, bit);
347 cout <<
" " << iso << endl;
352 auto & ex = l1menu.thrExtraInfo().JET();
353 cout <<
" JET" << endl;
354 cout <<
" jetScale " << ex.jetScale() << endl;
355 cout <<
" energy resolution (MeV) " << ex.resolutionMeV() << endl;
356 cout <<
" ptMinToTopoSmallWindow " << ex.ptMinToTopoSmallWindow() << endl;
357 cout <<
" ptMinToTopoLargeWindow " << ex.ptMinToTopoLargeWindow() << endl;
358 cout <<
" ptMinToTopoSmallWindow (MeV) " << ex.ptMinToTopoSmallWindowMeV() << endl;
359 cout <<
" ptMinToTopoLargeWindow (MeV) " << ex.ptMinToTopoLargeWindowMeV() << endl;
360 cout <<
" ptMinToTopoSmallWindow (counts) " << ex.ptMinToTopoSmallWindowCounts() << endl;
361 cout <<
" ptMinToTopoLargeWindow (counts) " << ex.ptMinToTopoLargeWindowCounts() << endl;
364 auto & ex = l1menu.thrExtraInfo().TAU();
365 cout <<
" TAU" << endl;
366 cout <<
" energy resolution (MeV) " << ex.resolutionMeV() << endl;
367 cout <<
" ptMinToTopo " << ex.ptMinToTopo() << endl;
368 cout <<
" ptMinToTopo (MeV) " << ex.ptMinToTopoMeV() << endl;
369 cout <<
" ptMinToTopo (counts)" << ex.ptMinToTopoCounts() << endl;
370 cout <<
" Isolation EMIsoForTAUthr" << endl;
371 for(
size_t bit = 1; bit <= 5; bit++) {
372 cout <<
" " << ex.isolation(
"EMIsoForTAUthr", bit) << endl;
376 auto & ex = l1menu.thrExtraInfo().eEM();
377 cout <<
" eEM" << endl;
378 cout <<
" iso maxEt (GeV) " << ex.maxEt() << endl;
379 cout <<
" iso maxEt (MeV) " << ex.maxEtMeV() << endl;
380 cout <<
" iso maxEt (Counts) " << ex.maxEtCounts(ex.resolutionMeV()) << endl;
381 cout <<
" energy resolution (MeV) " << ex.resolutionMeV() << endl;
382 cout <<
" ptMinToTopo " << ex.ptMinToTopo() << endl;
383 cout <<
" ptMinToTopo (MeV) " << ex.ptMinToTopoMeV() << endl;
384 cout <<
" ptMinToTopo (counts)" << ex.ptMinToTopoCounts() << endl;
385 cout <<
" working point Loose" << endl;
387 cout <<
" range etaMin=" << iso.etaMin() <<
", etaMax=" << iso.etaMax()
388 <<
", priority=" << iso.priority() <<
", symmetric=" << (iso.symmetric() ?
"yes" :
"no")
389 <<
", isolation=" << iso.value() << endl;
391 cout <<
" working point Medium" << endl;
393 cout <<
" range etaMin=" << iso.etaMin() <<
", etaMax=" << iso.etaMax()
394 <<
", priority=" << iso.priority() <<
", symmetric=" << (iso.symmetric() ?
"yes" :
"no")
395 <<
", isolation=" << iso.value() << endl;
397 cout <<
" working point Tight" << endl;
399 cout <<
" range etaMin=" << iso.etaMin() <<
", etaMax=" << iso.etaMax()
400 <<
", priority=" << iso.priority() <<
", symmetric=" << (iso.symmetric() ?
"yes" :
"no")
401 <<
", isolation=" << iso.value() << endl;
406 for(
int ieta : { -30, -20, -10, 0, 10, 20, 30 } ) {
408 int reta_loose_fw = iso_loose.reta_fw();
409 int rhad_loose_fw = iso_loose.rhad_fw();
410 int wstot_loose_fw = iso_loose.wstot_fw();
411 int reta_loose_d = iso_loose.reta_d();
412 int rhad_loose_d = iso_loose.rhad_d();
413 int wstot_loose_d = iso_loose.wstot_d();
414 cout <<
"ieta=" << ieta <<
" loose => reta_fw=" << reta_loose_fw <<
", rhad_fw=" << rhad_loose_fw <<
", wstot_fw=" << wstot_loose_fw << endl;
415 cout <<
"ieta=" << ieta <<
" loose => reta_d=" << reta_loose_d <<
", rhad_d=" << rhad_loose_d <<
", wstot_d=" << wstot_loose_d << endl;
420 auto & ex = l1menu.thrExtraInfo().jEM();
421 cout <<
" jEM" << endl;
422 cout <<
" energy resolution (MeV) " << ex.resolutionMeV() << endl;
423 cout <<
" ptMinToTopo " << ex.ptMinToTopo(
"1A") << endl;
424 cout <<
" ptMinToTopo (MeV) " << ex.ptMinToTopoMeV(
"1A") << endl;
425 cout <<
" ptMinToTopo (counts)" << ex.ptMinToTopoCounts(
"1A") << endl;
426 cout <<
" ptMinxTOB " << ex.ptMinxTOB(
"1A") << endl;
427 cout <<
" ptMinxTOB (MeV) " << ex.ptMinxTOBMeV(
"1A") << endl;
428 cout <<
" ptMinxTOB (counts) " << ex.ptMinxTOBCounts(
"1A") << endl;
429 cout <<
" working point Loose" << endl;
431 cout <<
" range etaMin=" << iso.etaMin() <<
", etaMax=" << iso.etaMax()
432 <<
", priority=" << iso.priority() <<
", symmetric=" << (iso.symmetric() ?
"yes" :
"no")
433 <<
", isolation=" << iso.value() << endl;
435 cout <<
" working point Medium" << endl;
437 cout <<
" range etaMin=" << iso.etaMin() <<
", etaMax=" << iso.etaMax()
438 <<
", priority=" << iso.priority() <<
", symmetric=" << (iso.symmetric() ?
"yes" :
"no")
439 <<
", isolation=" << iso.value() << endl;
441 cout <<
" working point Tight" << endl;
443 cout <<
" range etaMin=" << iso.etaMin() <<
", etaMax=" << iso.etaMax()
444 <<
", priority=" << iso.priority() <<
", symmetric=" << (iso.symmetric() ?
"yes" :
"no")
445 <<
", isolation=" << iso.value() << endl;
451 auto & ex = l1menu.thrExtraInfo().jJ();
452 cout <<
" jJ" << endl;
453 cout <<
" energy resolution (MeV) " << ex.resolutionMeV() << endl;
454 cout <<
" ptMinToTopo " << ex.ptMinToTopo(
"1A") << endl;
455 cout <<
" ptMinToTopo (MeV) " << ex.ptMinToTopoMeV(
"1A") << endl;
456 cout <<
" ptMinToTopo (counts) " << ex.ptMinToTopoCounts(
"1A") << endl;
457 cout <<
" ptMinxTOB " << ex.ptMinxTOB(
"1A") << endl;
458 cout <<
" ptMinxTOB (MeV) " << ex.ptMinxTOBMeV(
"1A") << endl;
459 cout <<
" ptMinxTOB (counts) " << ex.ptMinxTOBCounts(
"1A") << endl;
462 auto & ex = l1menu.thrExtraInfo().jLJ();
463 cout <<
" jLJ" << endl;
464 cout <<
" energy resolution (MeV) " << ex.resolutionMeV() << endl;
465 cout <<
" ptMinToTopo " << ex.ptMinToTopo(
"1A") << endl;
466 cout <<
" ptMinToTopo (MeV) " << ex.ptMinToTopoMeV(
"1A") << endl;
467 cout <<
" ptMinToTopo (counts) " << ex.ptMinToTopoCounts(
"1A") << endl;
468 cout <<
" ptMinxTOB " << ex.ptMinxTOB(
"1A") << endl;
469 cout <<
" ptMinxTOB (MeV) " << ex.ptMinxTOBMeV(
"1A") << endl;
470 cout <<
" ptMinxTOB (counts) " << ex.ptMinxTOBCounts(
"1A") << endl;
473 auto & ex = l1menu.thrExtraInfo().gLJ();
474 cout <<
" gLJ" << endl;
475 cout <<
" energy resolution (MeV) " << ex.resolutionMeV() << endl;
476 cout <<
" ptMinToTopo (eta range "<<std::to_string(1)<<
") in GeV " << ex.ptMinToTopo(1) << endl;
477 cout <<
" ptMinToTopo (MeV) " << ex.ptMinToTopoMeV(1) << endl;
478 cout <<
" ptMinToTopo (counts) " << ex.ptMinToTopoCounts(1) << endl;
479 cout <<
" seedThr(A) " << ex.seedThr(
'A') << endl;
480 cout <<
" seedThr(A) (MeV) " << ex.seedThrMeV(
'A') << endl;
481 cout <<
" rhoTowerMin(B) " << ex.rhoTowerMin(
'B') << endl;
482 cout <<
" rhoTowerMin(B) (MeV) " << ex.rhoTowerMinMeV(
'B') << endl;
483 cout <<
" rhoTowerMax(C) " << ex.rhoTowerMax(
'C') << endl;
484 cout <<
" rhoTowerMax(C) (MeV) " << ex.rhoTowerMaxMeV(
'C') << endl;
487 auto & ex = l1menu.thrExtraInfo().gXE();
488 cout <<
" gXE" << endl;
489 cout <<
" energy resolution (MeV) " << ex.resolutionMeV() << endl;
490 cout <<
" seedThr(A) " << ex.seedThr(
'A') << endl;
491 cout <<
" seedThr(A) (MeV) " << ex.seedThrMeV(
'A') << endl;
492 cout <<
" XERHO_sigmaPosA " << ex.XERHO_param(
'A',
true) << endl;
493 cout <<
" XERHO_sigmaNegB " << ex.XERHO_param(
'B',
false) << endl;
494 cout <<
" XEJWOJ_a_C " << ex.JWOJ_param(
'C',
'a') << endl;
495 cout <<
" XEJWOJ_b_B " << ex.JWOJ_param(
'B',
'b') << endl;
496 cout <<
" XEJWOJ_c_A " << ex.JWOJ_param(
'A',
'c') << endl;
499 auto & ex = l1menu.thrExtraInfo().eTAU();
500 cout <<
" eTAU" << endl;
501 cout <<
" energy resolution (MeV) " << ex.resolutionMeV() << endl;
502 cout <<
" ptMinToTopo " << ex.ptMinToTopo() << endl;
503 cout <<
" ptMinToTopo (MeV) " << ex.ptMinToTopoMeV() << endl;
504 cout <<
" ptMinToTopo (counts)" << ex.ptMinToTopoCounts() << endl;
505 cout <<
" working point Loose" << endl;
507 cout <<
" range etaMin=" << iso.etaMin() <<
", etaMax=" << iso.etaMax()
508 <<
", priority=" << iso.priority() <<
", symmetric=" << (iso.symmetric() ?
"yes" :
"no")
509 <<
", isolation=" << iso.value() << endl;
511 cout <<
" working point Medium" << endl;
513 cout <<
" range etaMin=" << iso.etaMin() <<
", etaMax=" << iso.etaMax()
514 <<
", priority=" << iso.priority() <<
", symmetric=" << (iso.symmetric() ?
"yes" :
"no")
515 <<
", isolation=" << iso.value() << endl;
517 cout <<
" working point Tight" << endl;
519 cout <<
" range etaMin=" << iso.etaMin() <<
", etaMax=" << iso.etaMax()
520 <<
", priority=" << iso.priority() <<
", symmetric=" << (iso.symmetric() ?
"yes" :
"no")
521 <<
", isolation=" << iso.value() << endl;
525 auto & ex = l1menu.thrExtraInfo().jTAU();
526 cout <<
" jTAU" << endl;
527 cout <<
" energy resolution (MeV) " << ex.resolutionMeV() << endl;
528 cout <<
" ptMinToTopo " << ex.ptMinToTopo(
"1A") << endl;
529 cout <<
" ptMinToTopo (MeV) " << ex.ptMinToTopoMeV(
"1A") << endl;
530 cout <<
" ptMinToTopo (counts)" << ex.ptMinToTopoCounts(
"1A") << endl;
531 cout <<
" ptMinxTOB " << ex.ptMinxTOB(
"1A") << endl;
532 cout <<
" ptMinxTOB (MeV) " << ex.ptMinxTOBMeV(
"1A") << endl;
533 cout <<
" ptMinxTOB (counts) " << ex.ptMinxTOBCounts(
"1A") << endl;
534 cout <<
" working point Loose" << endl;
536 cout <<
" range etaMin=" << iso.etaMin() <<
", etaMax=" << iso.etaMax()
537 <<
", priority=" << iso.priority() <<
", symmetric=" << (iso.symmetric() ?
"yes" :
"no")
538 <<
", isolation=" << iso.value() << endl;
540 cout <<
" working point Medium" << endl;
542 cout <<
" range etaMin=" << iso.etaMin() <<
", etaMax=" << iso.etaMax()
543 <<
", priority=" << iso.priority() <<
", symmetric=" << (iso.symmetric() ?
"yes" :
"no")
544 <<
", isolation=" << iso.value() << endl;
546 cout <<
" working point Tight" << endl;
548 cout <<
" range etaMin=" << iso.etaMin() <<
", etaMax=" << iso.etaMax()
549 <<
", priority=" << iso.priority() <<
", symmetric=" << (iso.symmetric() ?
"yes" :
"no")
550 <<
", isolation=" << iso.value() << endl;
554 auto & ex = l1menu.thrExtraInfo().cTAU();
555 cout <<
" cTAU" << endl;
556 cout <<
" working point Loose" << endl;
558 cout <<
" range etaMin=" << iso.etaMin() <<
", etaMax=" << iso.etaMax()
559 <<
", priority=" << iso.priority() <<
", symmetric=" << (iso.symmetric() ?
"yes" :
"no")
560 <<
", isolation=" << iso.value() << endl;
562 cout <<
" working point Medium" << endl;
564 cout <<
" range etaMin=" << iso.etaMin() <<
", etaMax=" << iso.etaMax()
565 <<
", priority=" << iso.priority() <<
", symmetric=" << (iso.symmetric() ?
"yes" :
"no")
566 <<
", isolation=" << iso.value() << endl;
568 cout <<
" working point Tight" << endl;
570 cout <<
" range etaMin=" << iso.etaMin() <<
", etaMax=" << iso.etaMax()
571 <<
", priority=" << iso.priority() <<
", symmetric=" << (iso.symmetric() ?
"yes" :
"no")
572 <<
", isolation=" << iso.value() << endl;
576 auto & exMU = l1menu.thrExtraInfo().MU();
577 cout <<
" MU" << endl;
578 cout <<
" known pt values for rpc ";
579 for(
auto pt : exMU.knownRpcPtValues()) cout << pt <<
" ";
580 cout << endl <<
" known pt values for tgc ";
581 for(
auto pt : exMU.knownTgcPtValues()) cout << pt <<
" ";
583 cout <<
" RPC pt value for index 2: "<< exMU.ptForRpcIdx(2) << endl;
584 cout <<
" TGC pt value for index 2: "<< exMU.ptForTgcIdx(2) << endl;
585 cout <<
" TGC index for RPC index 2: "<< exMU.tgcIdxForRpcIdx(2) << endl;
586 if(
const auto & list = exMU.exclusionListNames(); std::find(list.begin(), list.end(),
"rpcFeet")!=list.end() ) {
587 cout <<
" exclusionList 'rpcFeet'" << endl;
588 for(
auto &
x : exMU.exclusionList(
"rpcFeet")) {
589 cout <<
" sector " <<
x.first <<
": ";
590 for(
auto roi :
x.second ) cout << roi <<
" ";
701int main(
int argc,
char** argv) {
705 std::string dbalias {
"TRIGGERDB_RUN3"};
706 std::vector<std::string> knownParameters {
"file",
"f",
"smk",
"db",
"help",
"h" };
708 std::string currentParameter(
"");
709 std::string listofUnknownParameters =
"";
710 std::string listofUnknownArguments =
"";
711 for(
int i=1; i<argc; i++) {
713 std::string currentWord(argv[i]);
714 bool isParam = currentWord[0]==
'-';
717 int firstChar = currentWord.find_first_not_of(
'-');
718 string paramName = currentWord.substr(firstChar);
721 if ( isParam && std::find(knownParameters.begin(), knownParameters.end(), paramName) == knownParameters.end() ) {
722 listofUnknownParameters +=
" " + currentWord;
727 currentParameter =
"";
729 if(paramName ==
"h" || paramName ==
"help" ) { help =
true;
continue; }
730 currentParameter = std::move(paramName);
735 if(currentParameter ==
"file" || currentParameter ==
"f") {
736 filename = std::move(currentWord);
739 if(currentParameter ==
"smk") {
740 smk = stoul(currentWord);
743 if(currentParameter ==
"db") {
744 dbalias = std::move(currentWord);
747 listofUnknownArguments +=
" " + currentWord;
750 if ( not listofUnknownParameters.empty() ) {
751 cerr <<
"Unknown parameter(s):" << listofUnknownParameters << endl;
756 if ( not listofUnknownArguments.empty() ) {
757 cerr <<
"Unknown argument(s):" << listofUnknownArguments << endl;
762 if( filename.empty() && smk==0 ) {
764 const char* env_AV = std::getenv(
"AtlasVersion");
765 const char* env_xmlpath = std::getenv(
"XMLPATH");
766 if( env_AV !=
nullptr and env_xmlpath !=
nullptr ) {
767 vector<string> paths;
768 string xmlpath(env_xmlpath);
769 boost::algorithm::split(paths, xmlpath, boost::is_any_of(
":"));
770 for(
const string & p : paths) {
771 string testFN = p +
"/TriggerMenuMT/L1Menu_Dev_pp_run3_v1_" + string(env_AV) +
".json";
773 if (stat (testFN.c_str(), &buffer) == 0) {
774 filename = std::move(testFN);
780 cout <<
"No filename or smk specified and no default L1 menu file found in the release" << endl;
798 }
catch (std::ios_base::failure & e){
799 std::cout<<
"ios_base exception "<<e.what()<<
" caught in TestTriggerMenuAccess.\n";
806 string filetype = fileLoader.
getFileType( filename );
807 if(filetype ==
"l1menu") {
809 fileLoader.
loadFile( filename, l1menu);
811 }
else if(filetype ==
"hltmenu") {
813 fileLoader.
loadFile( filename, hltmenu);
816 cout <<
"File " << filename <<
" is neither an L1 or an HLT menu json file" << endl;
820 cout <<
"Finished " << (success ?
"successfully" :
"with failures") << endl;
821 return success ? 0 : 1;