14 std::unique_ptr<TrigConf::L1ThrExtraInfoBase> extraInfo(
nullptr);
16 if( thrTypeName ==
"EM" )
17 return std::make_unique<L1ThrExtraInfo_EMTAULegacy>(thrTypeName, data);
19 if( thrTypeName ==
"TAU" )
20 return std::make_unique<L1ThrExtraInfo_EMTAULegacy>(thrTypeName, data);
22 if( thrTypeName ==
"JET" )
23 return std::make_unique<L1ThrExtraInfo_JETLegacy>(thrTypeName, data);
25 if( thrTypeName ==
"XS" )
26 return std::make_unique<L1ThrExtraInfo_XSLegacy>(thrTypeName, data);
28 if( thrTypeName ==
"MU" )
29 return std::make_unique<L1ThrExtraInfo_MU>(thrTypeName, data);
31 if( thrTypeName ==
"eEM" )
32 return std::make_unique<L1ThrExtraInfo_eEM>(thrTypeName, data);
34 if( thrTypeName ==
"jEM" )
35 return std::make_unique<L1ThrExtraInfo_jEM>(thrTypeName, data);
37 if( thrTypeName ==
"eTAU" )
38 return std::make_unique<L1ThrExtraInfo_eTAU>(thrTypeName, data);
40 if( thrTypeName ==
"jTAU" )
41 return std::make_unique<L1ThrExtraInfo_jTAU>(thrTypeName, data);
43 if( thrTypeName ==
"cTAU" )
44 return std::make_unique<L1ThrExtraInfo_cTAU>(thrTypeName, data);
46 if( thrTypeName ==
"jJ" )
47 return std::make_unique<L1ThrExtraInfo_jJ>(thrTypeName, data);
49 if( thrTypeName ==
"jLJ" )
50 return std::make_unique<L1ThrExtraInfo_jLJ>(thrTypeName, data);
52 if( thrTypeName ==
"gJ" )
53 return std::make_unique<L1ThrExtraInfo_gJ>(thrTypeName, data);
55 if( thrTypeName ==
"gLJ" )
56 return std::make_unique<L1ThrExtraInfo_gLJ>(thrTypeName, data);
58 if( thrTypeName ==
"jXE" )
59 return std::make_unique<L1ThrExtraInfo_jXE>(thrTypeName, data);
61 if( thrTypeName ==
"jTE" )
62 return std::make_unique<L1ThrExtraInfo_jTE>(thrTypeName, data);
64 if( thrTypeName ==
"gXE" )
65 return std::make_unique<L1ThrExtraInfo_gXE>(thrTypeName, data);
67 if( thrTypeName ==
"gTE" )
68 return std::make_unique<L1ThrExtraInfo_gTE>(thrTypeName, data);
70 if( thrTypeName ==
"cXE" )
71 return std::make_unique<L1ThrExtraInfo_cXE>(thrTypeName, data);
74 return std::make_unique<L1ThrExtraInfoBase>(thrTypeName, data);
88 auto success =
m_thrExtraInfo.emplace(thrTypeName, std::shared_ptr<TrigConf::L1ThrExtraInfoBase>(std::move(extraInfo)));
89 return std::weak_ptr<TrigConf::L1ThrExtraInfoBase>( success.first->second );
92 catch(std::exception & ex) {
93 std::cerr <<
"L1ThrExtraInfo::addExtraInfo: exception occured when building extra info for " << thrTypeName << std::endl;
96 return std::weak_ptr<TrigConf::L1ThrExtraInfoBase>(
m_emptyInfo );
591 if(
x.first ==
"ptMinToTopo1" ) {
593 }
else if(
x.first ==
"ptMinToTopo2" ){
595 }
else if(
x.first ==
"seedThrA" ){
597 }
else if(
x.first ==
"seedThrB" ){
599 }
else if(
x.first ==
"seedThrC" ){
601 }
else if(
x.first ==
"rhoTowerMinA" ){
602 float rhoTower_tmp = 1000*
x.second.getValue<
float>();
603 if( (
int)rhoTower_tmp != rhoTower_tmp)
604 throw std::runtime_error(
"gLJ: rhoTower param " + std::to_string(rhoTower_tmp/1000.) +
" cannot be converted in MeV" );
606 }
else if(
x.first ==
"rhoTowerMinB" ){
607 float rhoTower_tmp = 1000*
x.second.getValue<
float>();
608 if( (
int)rhoTower_tmp != rhoTower_tmp)
609 throw std::runtime_error(
"gLJ: rhoTower param " + std::to_string(rhoTower_tmp/1000.) +
" cannot be converted in MeV" );
611 }
else if(
x.first ==
"rhoTowerMinC" ){
612 float rhoTower_tmp = 1000*
x.second.getValue<
float>();
613 if( (
int)rhoTower_tmp != rhoTower_tmp)
614 throw std::runtime_error(
"gLJ: rhoTower param " + std::to_string(rhoTower_tmp/1000.) +
" cannot be converted in MeV" );
616 }
else if(
x.first ==
"rhoTowerMaxA" ){
617 float rhoTower_tmp = 1000*
x.second.getValue<
float>();
618 if( (
int)rhoTower_tmp != rhoTower_tmp)
619 throw std::runtime_error(
"gLJ: rhoTower param " + std::to_string(rhoTower_tmp/1000.) +
" cannot be converted in MeV" );
621 }
else if(
x.first ==
"rhoTowerMaxB" ){
622 float rhoTower_tmp = 1000*
x.second.getValue<
float>();
623 if( (
int)rhoTower_tmp != rhoTower_tmp)
624 throw std::runtime_error(
"gLJ: rhoTower param " + std::to_string(rhoTower_tmp/1000.) +
" cannot be converted in MeV" );
626 }
else if(
x.first ==
"rhoTowerMaxC" ){
627 float rhoTower_tmp = 1000*
x.second.getValue<
float>();
628 if( (
int)rhoTower_tmp != rhoTower_tmp)
629 throw std::runtime_error(
"gLJ: rhoTower param " + std::to_string(rhoTower_tmp/1000.) +
" cannot be converted in MeV" );
849 for(
const auto &
x : ds.data() ) {
850 m_rpcPtMap.emplace(
static_cast<unsigned int>(std::stoul(
x.first)),
851 static_cast<unsigned int>(std::stoul(
x.second.data())));
856 for(
auto &
x : ds.data() ) {
857 m_tgcPtMap.emplace(
static_cast<unsigned int>(std::stoul(
x.first)),
858 static_cast<unsigned int>(std::stoul(
x.second.data())));
862 const std::string & listName =
x.first;
863 std::map<std::string, std::vector<unsigned int>> roisBySector;
864 for(
auto & list :
x.second ) {
865 const std::string & sectorName = list.second.get_child(
"sectorName").get_value<std::string>();
866 std::vector<unsigned int> rois;
867 for(
auto & roi : list.second.get_child(
"rois") ) {
868 rois.push_back(
static_cast<unsigned int>(std::stoul( roi.second.data() )) );
870 roisBySector.emplace(sectorName, std::move(rois));