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);
72 return std::make_unique<L1ThrExtraInfoBase>(thrTypeName,
data);
86 auto success =
m_thrExtraInfo.emplace(thrTypeName, std::shared_ptr<TrigConf::L1ThrExtraInfoBase>(std::move(extraInfo)));
87 return std::weak_ptr<TrigConf::L1ThrExtraInfoBase>( success.first->second );
90 catch(std::exception & ex) {
91 std::cerr <<
"L1ThrExtraInfo::addExtraInfo: exception occured when building extra info for " << thrTypeName << std::endl;
94 return std::weak_ptr<TrigConf::L1ThrExtraInfoBase>(
m_emptyInfo );
585 if(
x.first ==
"ptMinToTopo1" ) {
587 }
else if(
x.first ==
"ptMinToTopo2" ){
589 }
else if(
x.first ==
"seedThrA" ){
591 }
else if(
x.first ==
"seedThrB" ){
593 }
else if(
x.first ==
"seedThrC" ){
595 }
else if(
x.first ==
"rhoTowerMinA" ){
596 float rhoTower_tmp = 1000*
x.second.getValue<
float>();
597 if( (
int)rhoTower_tmp != rhoTower_tmp)
598 throw std::runtime_error(
"gLJ: rhoTower param " + std::to_string(rhoTower_tmp/1000.) +
" cannot be converted in MeV" );
600 }
else if(
x.first ==
"rhoTowerMinB" ){
601 float rhoTower_tmp = 1000*
x.second.getValue<
float>();
602 if( (
int)rhoTower_tmp != rhoTower_tmp)
603 throw std::runtime_error(
"gLJ: rhoTower param " + std::to_string(rhoTower_tmp/1000.) +
" cannot be converted in MeV" );
605 }
else if(
x.first ==
"rhoTowerMinC" ){
606 float rhoTower_tmp = 1000*
x.second.getValue<
float>();
607 if( (
int)rhoTower_tmp != rhoTower_tmp)
608 throw std::runtime_error(
"gLJ: rhoTower param " + std::to_string(rhoTower_tmp/1000.) +
" cannot be converted in MeV" );
610 }
else if(
x.first ==
"rhoTowerMaxA" ){
611 float rhoTower_tmp = 1000*
x.second.getValue<
float>();
612 if( (
int)rhoTower_tmp != rhoTower_tmp)
613 throw std::runtime_error(
"gLJ: rhoTower param " + std::to_string(rhoTower_tmp/1000.) +
" cannot be converted in MeV" );
615 }
else if(
x.first ==
"rhoTowerMaxB" ){
616 float rhoTower_tmp = 1000*
x.second.getValue<
float>();
617 if( (
int)rhoTower_tmp != rhoTower_tmp)
618 throw std::runtime_error(
"gLJ: rhoTower param " + std::to_string(rhoTower_tmp/1000.) +
" cannot be converted in MeV" );
620 }
else if(
x.first ==
"rhoTowerMaxC" ){
621 float rhoTower_tmp = 1000*
x.second.getValue<
float>();
622 if( (
int)rhoTower_tmp != rhoTower_tmp)
623 throw std::runtime_error(
"gLJ: rhoTower param " + std::to_string(rhoTower_tmp/1000.) +
" cannot be converted in MeV" );
822 for(
const auto &
x : ds.data() ) {
823 m_rpcPtMap.emplace(
static_cast<unsigned int>(std::stoul(
x.first)),
824 static_cast<unsigned int>(std::stoul(
x.second.data())));
829 for(
auto &
x : ds.data() ) {
830 m_tgcPtMap.emplace(
static_cast<unsigned int>(std::stoul(
x.first)),
831 static_cast<unsigned int>(std::stoul(
x.second.data())));
835 const std::string & listName =
x.first;
836 std::map<std::string, std::vector<unsigned int>> roisBySector;
837 for(
auto & list :
x.second ) {
838 const std::string & sectorName = list.second.get_child(
"sectorName").get_value<std::string>();
839 std::vector<unsigned int> rois;
840 for(
auto & roi : list.second.get_child(
"rois") ) {
841 rois.push_back(
static_cast<unsigned int>(std::stoul( roi.second.data() )) );
843 roisBySector.emplace(sectorName, std::move(rois));