15 std::unique_ptr<TrigConf::L1ThrExtraInfoBase> extraInfo(
nullptr);
17 if( thrTypeName ==
"EM" )
18 return std::make_unique<L1ThrExtraInfo_EMTAULegacy>(thrTypeName,
data);
20 if( thrTypeName ==
"TAU" )
21 return std::make_unique<L1ThrExtraInfo_EMTAULegacy>(thrTypeName,
data);
23 if( thrTypeName ==
"JET" )
24 return std::make_unique<L1ThrExtraInfo_JETLegacy>(thrTypeName,
data);
26 if( thrTypeName ==
"XS" )
27 return std::make_unique<L1ThrExtraInfo_XSLegacy>(thrTypeName,
data);
29 if( thrTypeName ==
"MU" )
30 return std::make_unique<L1ThrExtraInfo_MU>(thrTypeName,
data);
32 if( thrTypeName ==
"eEM" )
33 return std::make_unique<L1ThrExtraInfo_eEM>(thrTypeName,
data);
35 if( thrTypeName ==
"jEM" )
36 return std::make_unique<L1ThrExtraInfo_jEM>(thrTypeName,
data);
38 if( thrTypeName ==
"eTAU" )
39 return std::make_unique<L1ThrExtraInfo_eTAU>(thrTypeName,
data);
41 if( thrTypeName ==
"jTAU" )
42 return std::make_unique<L1ThrExtraInfo_jTAU>(thrTypeName,
data);
44 if( thrTypeName ==
"cTAU" )
45 return std::make_unique<L1ThrExtraInfo_cTAU>(thrTypeName,
data);
47 if( thrTypeName ==
"jJ" )
48 return std::make_unique<L1ThrExtraInfo_jJ>(thrTypeName,
data);
50 if( thrTypeName ==
"jLJ" )
51 return std::make_unique<L1ThrExtraInfo_jLJ>(thrTypeName,
data);
53 if( thrTypeName ==
"gJ" )
54 return std::make_unique<L1ThrExtraInfo_gJ>(thrTypeName,
data);
56 if( thrTypeName ==
"gLJ" )
57 return std::make_unique<L1ThrExtraInfo_gLJ>(thrTypeName,
data);
59 if( thrTypeName ==
"jXE" )
60 return std::make_unique<L1ThrExtraInfo_jXE>(thrTypeName,
data);
62 if( thrTypeName ==
"jTE" )
63 return std::make_unique<L1ThrExtraInfo_jTE>(thrTypeName,
data);
65 if( thrTypeName ==
"gXE" )
66 return std::make_unique<L1ThrExtraInfo_gXE>(thrTypeName,
data);
68 if( thrTypeName ==
"gTE" )
69 return std::make_unique<L1ThrExtraInfo_gTE>(thrTypeName,
data);
71 if( thrTypeName ==
"cXE" )
72 return std::make_unique<L1ThrExtraInfo_cXE>(thrTypeName,
data);
75 return std::make_unique<L1ThrExtraInfoBase>(thrTypeName,
data);
89 auto success =
m_thrExtraInfo.emplace(thrTypeName, std::shared_ptr<TrigConf::L1ThrExtraInfoBase>(std::move(extraInfo)));
90 return std::weak_ptr<TrigConf::L1ThrExtraInfoBase>( success.first->second );
93 catch(std::exception & ex) {
94 std::cerr <<
"L1ThrExtraInfo::addExtraInfo: exception occured when building extra info for " << thrTypeName << std::endl;
97 return std::weak_ptr<TrigConf::L1ThrExtraInfoBase>(
m_emptyInfo );
593 if(
x.first ==
"ptMinToTopo1" ) {
595 }
else if(
x.first ==
"ptMinToTopo2" ){
597 }
else if(
x.first ==
"seedThrA" ){
599 }
else if(
x.first ==
"seedThrB" ){
601 }
else if(
x.first ==
"seedThrC" ){
603 }
else if(
x.first ==
"rhoTowerMinA" ){
604 float rhoTower_tmp = 1000*
x.second.getValue<
float>();
605 if( (
int)rhoTower_tmp != rhoTower_tmp)
606 throw std::runtime_error(
"gLJ: rhoTower param " + std::to_string(rhoTower_tmp/1000.) +
" cannot be converted in MeV" );
608 }
else if(
x.first ==
"rhoTowerMinB" ){
609 float rhoTower_tmp = 1000*
x.second.getValue<
float>();
610 if( (
int)rhoTower_tmp != rhoTower_tmp)
611 throw std::runtime_error(
"gLJ: rhoTower param " + std::to_string(rhoTower_tmp/1000.) +
" cannot be converted in MeV" );
613 }
else if(
x.first ==
"rhoTowerMinC" ){
614 float rhoTower_tmp = 1000*
x.second.getValue<
float>();
615 if( (
int)rhoTower_tmp != rhoTower_tmp)
616 throw std::runtime_error(
"gLJ: rhoTower param " + std::to_string(rhoTower_tmp/1000.) +
" cannot be converted in MeV" );
618 }
else if(
x.first ==
"rhoTowerMaxA" ){
619 float rhoTower_tmp = 1000*
x.second.getValue<
float>();
620 if( (
int)rhoTower_tmp != rhoTower_tmp)
621 throw std::runtime_error(
"gLJ: rhoTower param " + std::to_string(rhoTower_tmp/1000.) +
" cannot be converted in MeV" );
623 }
else if(
x.first ==
"rhoTowerMaxB" ){
624 float rhoTower_tmp = 1000*
x.second.getValue<
float>();
625 if( (
int)rhoTower_tmp != rhoTower_tmp)
626 throw std::runtime_error(
"gLJ: rhoTower param " + std::to_string(rhoTower_tmp/1000.) +
" cannot be converted in MeV" );
628 }
else if(
x.first ==
"rhoTowerMaxC" ){
629 float rhoTower_tmp = 1000*
x.second.getValue<
float>();
630 if( (
int)rhoTower_tmp != rhoTower_tmp)
631 throw std::runtime_error(
"gLJ: rhoTower param " + std::to_string(rhoTower_tmp/1000.) +
" cannot be converted in MeV" );
845 for(
const auto &
x : ds.data() ) {
846 m_rpcPtMap.emplace(
static_cast<unsigned int>(std::stoul(
x.first)),
847 static_cast<unsigned int>(std::stoul(
x.second.data())));
852 for(
auto &
x : ds.data() ) {
853 m_tgcPtMap.emplace(
static_cast<unsigned int>(std::stoul(
x.first)),
854 static_cast<unsigned int>(std::stoul(
x.second.data())));
858 const std::string & listName =
x.first;
859 std::map<std::string, std::vector<unsigned int>> roisBySector;
860 for(
auto & list :
x.second ) {
861 const std::string & sectorName = list.second.get_child(
"sectorName").get_value<std::string>();
862 std::vector<unsigned int> rois;
863 for(
auto & roi : list.second.get_child(
"rois") ) {
864 rois.push_back(
static_cast<unsigned int>(std::stoul( roi.second.data() )) );
866 roisBySector.emplace(sectorName, std::move(rois));