7 #include <boost/lexical_cast.hpp> 
   12 std::unique_ptr<TrigConf::L1ThrExtraInfoBase>
 
   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);
 
   71    return std::make_unique<L1ThrExtraInfoBase>(thrTypeName, 
data);
 
   77    m_thrExtraInfo.clear();
 
   81 std::weak_ptr<TrigConf::L1ThrExtraInfoBase>
 
   84       if( 
auto extraInfo = L1ThrExtraInfo::createExtraInfo( thrTypeName, 
data) ) {
 
   85          auto success = m_thrExtraInfo.emplace(thrTypeName, std::shared_ptr<TrigConf::L1ThrExtraInfoBase>(std::move(extraInfo)));
 
   86          return std::weak_ptr<TrigConf::L1ThrExtraInfoBase>( success.first->second );
 
   90       std::cerr << 
"L1ThrExtraInfo::addExtraInfo: exception occured when building extra info for " << thrTypeName << std::endl;
 
   93    return std::weak_ptr<TrigConf::L1ThrExtraInfoBase>( m_emptyInfo );
 
   99    return ( m_thrExtraInfo.find(
typeName) != m_thrExtraInfo.end() );
 
  196       return * m_thrExtraInfo.at(thrTypeName);
 
  199       std::cerr << 
"Threshold type " << thrTypeName << 
" does not have extra info defined" << endl;
 
  211       throw std::out_of_range(
"When accessing the legacy L1Calo EM or TAU isolation bit must be between 1 and 5, but bit="  
  215       return m_isolation.at(thrType)[bit-1];
 
  218       std::cerr << 
"Threshold type " << 
name() << 
" does not have isolation parameters for type " << thrType << endl;
 
  226    for( 
auto & 
x : m_extraInfo ) {
 
  227       if( 
x.first == 
"ptMinToTopo" ) {
 
  228          m_ptMinToTopoMeV = std::lround( 1000 * 
x.second.getValue<
float>() );
 
  229       } 
else if( 
x.first == 
"isolation" ) {
 
  230          for( 
auto & 
y : 
x.second.data() ) {
 
  231             auto & isoV = m_isolation[
y.first] = std::vector<IsolationLegacy>(5);
 
  232             for(
auto & 
c : 
y.second.get_child(
"Parametrization") ) {
 
  234                isoV[iso.isobit()-1] = iso;
 
  245    if( hasExtraInfo(
"significance") ) {
 
  246       auto & 
sig = m_extraInfo[
"significance"];
 
  247       m_xeMin = 
sig.getAttribute<
unsigned int>(
"xeMin");
 
  248       m_xeMax = 
sig.getAttribute<
unsigned int>(
"xeMax");
 
  249       m_teSqrtMin = 
sig.getAttribute<
unsigned int>(
"teSqrtMin");
 
  250       m_teSqrtMax = 
sig.getAttribute<
unsigned int>(
"teSqrtMax");
 
  251       m_xsSigmaScale = 
sig.getAttribute<
unsigned int>(
"xsSigmaScale");
 
  252       m_xsSigmaOffset = 
sig.getAttribute<
unsigned int>(
"xsSigmaOffset");
 
  264    for( 
auto & 
x : m_extraInfo ) {
 
  265       if( 
x.first == 
"ptMinToTopoLargeWindow" ) {
 
  266          m_ptMinToTopoLargeWindowMeV = std::lround( 1000 * 
x.second.getValue<
float>() );
 
  267       } 
else if( 
x.first == 
"ptMinToTopoSmallWindow" ) {
 
  268          m_ptMinToTopoSmallWindowMeV = std::lround( 1000 * 
x.second.getValue<
float>() );
 
  285    m_reta_d  = 
pt.get_optional<
float>(
"reta").get_value_or(0);
 
  286    m_wstot_d = 
pt.get_optional<
float>(
"wstot").get_value_or(0);
 
  287    m_rhad_d  = 
pt.get_optional<
float>(
"rhad").get_value_or(0);
 
  288    m_reta_fw  = 
pt.get_optional<
int>(
"reta_fw").get_value_or(0);
 
  289    m_wstot_fw = 
pt.get_optional<
int>(
"wstot_fw").get_value_or(0);
 
  290    m_rhad_fw  = 
pt.get_optional<
int>(
"rhad_fw").get_value_or(0);
 
  302    for( 
auto & 
x : m_extraInfo ) {
 
  303       if( 
x.first == 
"maxEt" ){
 
  304          m_maxEt = 1000*
x.second.getValue<
unsigned int>();
 
  305       } 
else if( 
x.first == 
"ptMinToTopo" ) {
 
  306          m_ptMinToTopoMeV = lround(1000 * 
x.second.getValue<
float>());
 
  307       } 
else if( 
x.first == 
"workingPoints" ) {
 
  308          for( 
auto & 
y : 
x.second.data() ) {
 
  309             auto wp = Selection::stringToWP(
y.first);
 
  310             auto & iso = m_isolation.emplace(
wp, 
string(
"eEM_WP_" + 
y.first)).first->second;
 
  311             for(
auto & 
c : 
y.second ) {
 
  312                int etamin = 
c.second.get_optional<
int>(
"etamin").get_value_or(-49);
 
  313                int etamax = 
c.second.get_optional<
int>(
"etamax").get_value_or(49);
 
  314                unsigned int priority = 
c.second.get_optional<
unsigned int>(
"priority").get_value_or(0);
 
  318       } 
else if (
x.first == 
"algoVersion") {
 
  319           m_algoVersion = 
x.second.getValue<
unsigned int>();
 
  329    m_iso_d  = 
pt.get_optional<
float>(
"iso").get_value_or(0);
 
  330    m_frac_d = 
pt.get_optional<
float>(
"frac").get_value_or(0);
 
  331    m_frac2_d  = 
pt.get_optional<
float>(
"frac2").get_value_or(0);
 
  332    m_iso_fw  = 
pt.get_optional<
int>(
"iso_fw").get_value_or(0);
 
  333    m_frac_fw = 
pt.get_optional<
int>(
"frac_fw").get_value_or(0);
 
  334    m_frac2_fw  = 
pt.get_optional<
int>(
"frac2_fw").get_value_or(0);
 
  346    for( 
auto & 
x : m_extraInfo ) {
 
  347       if( 
x.first == 
"maxEt" ){
 
  348          m_maxEt = 1000*
x.second.getValue<
unsigned int>();
 
  349       } 
else if( 
x.first == 
"ptMinToTopo1" ) {
 
  350          m_ptMinToTopoMeV1 = 1000*
x.second.getValue<
unsigned int>();
 
  351       } 
else if( 
x.first == 
"ptMinToTopo2" ){
 
  352          m_ptMinToTopoMeV2 = 1000*
x.second.getValue<
unsigned int>();
 
  353       } 
else if( 
x.first == 
"ptMinToTopo3" ){
 
  354          m_ptMinToTopoMeV3 = 1000*
x.second.getValue<
unsigned int>();
 
  355       } 
else if( 
x.first == 
"ptMinxTOB1" ){
 
  356          m_ptMinxTOBMeV1 = 1000*
x.second.getValue<
unsigned int>();
 
  357       } 
else if( 
x.first == 
"ptMinxTOB2" ){
 
  358          m_ptMinxTOBMeV2 = 1000*
x.second.getValue<
unsigned int>();
 
  359       } 
else if( 
x.first == 
"ptMinxTOB3" ){
 
  360          m_ptMinxTOBMeV3 = 1000*
x.second.getValue<
unsigned int>();
 
  361       } 
else if( 
x.first == 
"workingPoints" ) {
 
  362          for( 
auto & 
y : 
x.second.data() ) {
 
  363             auto wp = Selection::stringToWP(
y.first);
 
  364             auto & iso = m_isolation.emplace(
wp, 
string(
"jEM_WP_" + 
y.first)).first->second;
 
  365             for(
auto & 
c : 
y.second ) {
 
  366                int etamin = 
c.second.get_optional<
int>(
"etamin").get_value_or(-49);
 
  367                int etamax = 
c.second.get_optional<
int>(
"etamax").get_value_or(49);
 
  368                unsigned int priority = 
c.second.get_optional<
unsigned int>(
"priority").get_value_or(0);
 
  381    m_rCore_d   = 
pt.get_optional<
float>(
"rCore").get_value_or(0);
 
  382    m_rHad_d    = 
pt.get_optional<
float>(
"rHad").get_value_or(0);
 
  383    m_rCore_fw  = 
pt.get_optional<
float>(
"rCore_fw").get_value_or(0);
 
  384    m_rHad_fw   = 
pt.get_optional<
float>(
"rHad_fw").get_value_or(0);
 
  396    for( 
auto & 
x : m_extraInfo ) {
 
  397       if( 
x.first == 
"maxEt" ){
 
  398          m_maxEt = 1000*
x.second.getValue<
unsigned int>(); 
 
  399       } 
else if( 
x.first == 
"minIsoEt" ){
 
  400          m_minIsoEt = lround(1000 * 
x.second.getValue<
float>()); 
 
  401       } 
else if( 
x.first == 
"ptMinToTopo" ) {
 
  402          m_ptMinToTopoMeV = lround(1000 * 
x.second.getValue<
float>());
 
  403       } 
else if( 
x.first == 
"workingPoints" ) {
 
  404          for( 
auto & 
y : 
x.second.data() ) {
 
  406             auto & iso = m_isolation.emplace(
wp, 
string(
"eTAU_WP_" + 
y.first)).first->second;
 
  407             for(
auto & 
c : 
y.second ) {
 
  408                int etamin = 
c.second.get_optional<
int>(
"etamin").get_value_or(-49);
 
  409                int etamax = 
c.second.get_optional<
int>(
"etamax").get_value_or(49);
 
  410                unsigned int priority = 
c.second.get_optional<
unsigned int>(
"priority").get_value_or(0);
 
  414       } 
else if (
x.first == 
"algoVersion") {
 
  415           m_algoVersion = 
x.second.getValue<
unsigned int>();
 
  425    m_isolation_d    = 
pt.get_optional<
float>(
"isolation").get_value_or(0);
 
  426    m_isolation_fw   = 
pt.get_optional<
float>(
"isolation_fw").get_value_or(0);
 
  438    for( 
auto & 
x : m_extraInfo ) {
 
  439       if( 
x.first == 
"maxEt" ){
 
  440          m_maxEt = 1000*
x.second.getValue<
unsigned int>();
 
  441       } 
else if( 
x.first == 
"ptMinToTopo1" ) {
 
  442          m_ptMinToTopoMeV1 = 1000*
x.second.getValue<
unsigned int>();
 
  443       } 
else if( 
x.first == 
"ptMinToTopo2" ){
 
  444          m_ptMinToTopoMeV2 = 1000*
x.second.getValue<
unsigned int>();
 
  445       } 
else if( 
x.first == 
"ptMinToTopo3" ){
 
  446          m_ptMinToTopoMeV3 = 1000*
x.second.getValue<
unsigned int>();
 
  447       } 
else if( 
x.first == 
"ptMinxTOB1" ){
 
  448          m_ptMinxTOBMeV1 = 1000*
x.second.getValue<
unsigned int>();
 
  449       } 
else if( 
x.first == 
"ptMinxTOB2" ){
 
  450          m_ptMinxTOBMeV2 = 1000*
x.second.getValue<
unsigned int>();
 
  451       } 
else if( 
x.first == 
"ptMinxTOB3" ){
 
  452          m_ptMinxTOBMeV3 = 1000*
x.second.getValue<
unsigned int>();
 
  453       } 
else if( 
x.first == 
"workingPoints" ) {
 
  454          for( 
auto & 
y : 
x.second.data() ) {
 
  456             auto & iso = m_isolation.emplace(
wp, 
string(
"jTAU_WP_" + 
y.first)).first->second;
 
  457             for(
auto & 
c : 
y.second ) {
 
  458                int etamin = 
c.second.get_optional<
int>(
"etamin").get_value_or(-49);
 
  459                int etamax = 
c.second.get_optional<
int>(
"etamax").get_value_or(49);
 
  460                unsigned int priority = 
c.second.get_optional<
unsigned int>(
"priority").get_value_or(0);
 
  473    m_isolation_d    = 
pt.get_optional<
float>(
"isolation").get_value_or(0);
 
  474    m_isolation_fw   = 
pt.get_optional<
unsigned int>(
"isolation_fw").get_value_or(0);
 
  475    m_isolation_jTAUCoreScale_d    = 
pt.get_optional<
float>(
"isolation_jTAUCoreScale").get_value_or(0);
 
  476    m_isolation_jTAUCoreScale_fw   = 
pt.get_optional<
unsigned int>(
"isolation_jTAUCoreScale_fw").get_value_or(0);
 
  477    m_eTAU_rCoreMin_WP_d    = 
pt.get_optional<
float>(
"eTAU_rCoreMin").get_value_or(0);
 
  478    m_eTAU_rCoreMin_WP_fw   = 
pt.get_optional<
unsigned int>(
"eTAU_rCoreMin_WP_fw").get_value_or(0);
 
  479    m_eTAU_rHadMin_WP_d    = 
pt.get_optional<
float>(
"eTAU_rHadMin").get_value_or(0);
 
  480    m_eTAU_rHadMin_WP_fw   = 
pt.get_optional<
unsigned int>(
"eTAU_rHadMin_WP_fw").get_value_or(0);
 
  493    for( 
auto & 
x : m_extraInfo ) {
 
  494       if( 
x.first == 
"workingPoints" ) {
 
  495          for( 
auto & 
y : 
x.second.data() ) {
 
  497             auto & iso = m_isolation.emplace(
wp, 
string(
"cTAU_WP_" + 
y.first)).first->second;
 
  498             for(
auto & 
c : 
y.second ) {
 
  499                int etamin = 
c.second.get_optional<
int>(
"etamin").get_value_or(-49);
 
  500                int etamax = 
c.second.get_optional<
int>(
"etamax").get_value_or(49);
 
  501                unsigned int priority = 
c.second.get_optional<
unsigned int>(
"priority").get_value_or(0);
 
  516    for( 
auto & 
x : m_extraInfo ) {
 
  517       if( 
x.first == 
"ptMinToTopo1" ) {
 
  518          m_ptMinToTopoMeV1 = 1000*
x.second.getValue<
unsigned int>();
 
  519       } 
else if( 
x.first == 
"ptMinToTopo2" ){
 
  520          m_ptMinToTopoMeV2 = 1000*
x.second.getValue<
unsigned int>();
 
  521       } 
else if( 
x.first == 
"ptMinToTopo3" ){
 
  522          m_ptMinToTopoMeV3 = 1000*
x.second.getValue<
unsigned int>();
 
  523       } 
else if( 
x.first == 
"ptMinxTOB1" ){
 
  524          m_ptMinxTOBMeV1 = 1000*
x.second.getValue<
unsigned int>();
 
  525       } 
else if( 
x.first == 
"ptMinxTOB2" ){
 
  526          m_ptMinxTOBMeV2 = 1000*
x.second.getValue<
unsigned int>();
 
  527       } 
else if( 
x.first == 
"ptMinxTOB3" ){
 
  528          m_ptMinxTOBMeV3 = 1000*
x.second.getValue<
unsigned int>();
 
  529       } 
else if( 
x.first == 
"seedThreshold1" ){
 
  530          m_seedThresholdMeV1 = 
int(1000*
x.second.getValue<
float>());
 
  531       } 
else if( 
x.first == 
"seedThreshold2" ){
 
  532          m_seedThresholdMeV2 = 
int(1000*
x.second.getValue<
float>());
 
  533       } 
else if( 
x.first == 
"seedThreshold3" ){
 
  534          m_seedThresholdMeV3 = 
int(1000*
x.second.getValue<
float>());
 
  545    for( 
auto & 
x : m_extraInfo ) {
 
  546       if( 
x.first == 
"ptMinToTopo1" ) {
 
  547          m_ptMinToTopoMeV1 = 1000*
x.second.getValue<
unsigned int>();
 
  548       } 
else if( 
x.first == 
"ptMinToTopo2" ){
 
  549          m_ptMinToTopoMeV2 = 1000*
x.second.getValue<
unsigned int>();
 
  550       } 
else if( 
x.first == 
"ptMinToTopo3" ){
 
  551          m_ptMinToTopoMeV3 = 1000*
x.second.getValue<
unsigned int>();
 
  552       } 
else if( 
x.first == 
"ptMinxTOB1" ){
 
  553          m_ptMinxTOBMeV1 = 1000*
x.second.getValue<
unsigned int>();
 
  554       } 
else if( 
x.first == 
"ptMinxTOB2" ){
 
  555          m_ptMinxTOBMeV2 = 1000*
x.second.getValue<
unsigned int>();
 
  556       } 
else if( 
x.first == 
"ptMinxTOB3" ){
 
  557          m_ptMinxTOBMeV3 = 1000*
x.second.getValue<
unsigned int>();
 
  568    for( 
auto & 
x : m_extraInfo ) {
 
  569       if( 
x.first == 
"ptMinToTopo1" ) {
 
  570          m_ptMinToTopoMeV1 = 1000*
x.second.getValue<
unsigned int>();
 
  571       } 
else if( 
x.first == 
"ptMinToTopo2" ){
 
  572          m_ptMinToTopoMeV2 = 1000*
x.second.getValue<
unsigned int>();
 
  583    for( 
auto & 
x : m_extraInfo ) {
 
  584       if( 
x.first == 
"ptMinToTopo1" ) {
 
  585          m_ptMinToTopoMeV1 = 1000*
x.second.getValue<
unsigned int>();
 
  586       } 
else if( 
x.first == 
"ptMinToTopo2" ){
 
  587          m_ptMinToTopoMeV2 = 1000*
x.second.getValue<
unsigned int>();
 
  588       } 
else if( 
x.first == 
"seedThrA" ){
 
  589          m_seedThrMeVA = 1000*
x.second.getValue<
unsigned int>();
 
  590       } 
else if( 
x.first == 
"seedThrB" ){
 
  591          m_seedThrMeVB = 1000*
x.second.getValue<
unsigned int>();
 
  592       } 
else if( 
x.first == 
"seedThrC" ){
 
  593          m_seedThrMeVC = 1000*
x.second.getValue<
unsigned int>();
 
  594       } 
else if( 
x.first == 
"rhoTowerMinA" ){
 
  595          float rhoTower_tmp = 1000*
x.second.getValue<
float>();
 
  596          if( (
int)rhoTower_tmp != rhoTower_tmp)
 
  597              throw std::runtime_error(
"gLJ: rhoTower param " + 
std::to_string(rhoTower_tmp/1000.) + 
" cannot be converted in MeV" ); 
 
  598          m_rhoTowerMinMeVA = (
int)rhoTower_tmp;        
 
  599       } 
else if( 
x.first == 
"rhoTowerMinB" ){
 
  600          float rhoTower_tmp = 1000*
x.second.getValue<
float>();
 
  601          if( (
int)rhoTower_tmp != rhoTower_tmp)
 
  602              throw std::runtime_error(
"gLJ: rhoTower param " + 
std::to_string(rhoTower_tmp/1000.) + 
" cannot be converted in MeV" );  
 
  603          m_rhoTowerMinMeVB = (
int)rhoTower_tmp; 
 
  604       } 
else if( 
x.first == 
"rhoTowerMinC" ){
 
  605          float rhoTower_tmp = 1000*
x.second.getValue<
float>();
 
  606          if( (
int)rhoTower_tmp != rhoTower_tmp)
 
  607              throw std::runtime_error(
"gLJ: rhoTower param " + 
std::to_string(rhoTower_tmp/1000.) + 
" cannot be converted in MeV" );  
 
  608          m_rhoTowerMinMeVC = (
int)rhoTower_tmp; 
 
  609       } 
else if( 
x.first == 
"rhoTowerMaxA" ){
 
  610          float rhoTower_tmp = 1000*
x.second.getValue<
float>();
 
  611          if( (
int)rhoTower_tmp != rhoTower_tmp)
 
  612              throw std::runtime_error(
"gLJ: rhoTower param " + 
std::to_string(rhoTower_tmp/1000.) + 
" cannot be converted in MeV" );  
 
  613          m_rhoTowerMaxMeVA = (
int)rhoTower_tmp; 
 
  614       } 
else if( 
x.first == 
"rhoTowerMaxB" ){
 
  615          float rhoTower_tmp = 1000*
x.second.getValue<
float>();
 
  616          if( (
int)rhoTower_tmp != rhoTower_tmp)
 
  617              throw std::runtime_error(
"gLJ: rhoTower param " + 
std::to_string(rhoTower_tmp/1000.) + 
" cannot be converted in MeV" );
 
  618          m_rhoTowerMaxMeVB = (
int)rhoTower_tmp;
 
  619       } 
else if( 
x.first == 
"rhoTowerMaxC" ){
 
  620          float rhoTower_tmp = 1000*
x.second.getValue<
float>();
 
  621          if( (
int)rhoTower_tmp != rhoTower_tmp)
 
  622              throw std::runtime_error(
"gLJ: rhoTower param " + 
std::to_string(rhoTower_tmp/1000.) + 
" cannot be converted in MeV" );
 
  623          m_rhoTowerMaxMeVC = (
int)rhoTower_tmp;
 
  642    for( 
auto & 
x : m_extraInfo ) {
 
  643       if( 
x.first == 
"etaBoundary1" ) {
 
  644          m_etaBoundary1 = 
x.second.getValue<
unsigned int>();
 
  645       } 
else if( 
x.first == 
"etaBoundary1_fw" ) {
 
  646          m_etaBoundary1_fw = 
x.second.getValue<
unsigned int>();
 
  647       } 
else if( 
x.first == 
"etaBoundary2" ) {
 
  648          m_etaBoundary2 = 
x.second.getValue<
unsigned int>();
 
  649       } 
else if( 
x.first == 
"etaBoundary2_fw" ) {
 
  650          m_etaBoundary2_fw = 
x.second.getValue<
unsigned int>();
 
  651       } 
else if( 
x.first == 
"etaBoundary3" ) {
 
  652          m_etaBoundary3 = 
x.second.getValue<
unsigned int>();
 
  653       } 
else if( 
x.first == 
"etaBoundary3_fw" ) {
 
  654          m_etaBoundary3_fw = 
x.second.getValue<
unsigned int>();
 
  665    for( 
auto & 
x : m_extraInfo ) {
 
  666       if( 
x.first == 
"seedThrA" ){
 
  667          m_seedThrMeVA = 200*
x.second.getValue<
unsigned int>();
 
  668       } 
else if( 
x.first == 
"seedThrB" ){
 
  669          m_seedThrMeVB = 200*
x.second.getValue<
unsigned int>();
 
  670       } 
else if( 
x.first == 
"seedThrC" ){
 
  671          m_seedThrMeVC = 200*
x.second.getValue<
unsigned int>();
 
  672       } 
else if( 
x.first == 
"XERHO_sigmaPosA" ){
 
  673          m_XERHO_sigmaPosA = 
x.second.getValue<
unsigned int>();
 
  674       } 
else if( 
x.first == 
"XERHO_sigmaPosB" ){
 
  675          m_XERHO_sigmaPosB = 
x.second.getValue<
unsigned int>();
 
  676       } 
else if( 
x.first == 
"XERHO_sigmaPosC" ){
 
  677          m_XERHO_sigmaPosC = 
x.second.getValue<
unsigned int>();
 
  678       } 
else if( 
x.first == 
"XERHO_sigmaNegA" ){
 
  679          m_XERHO_sigmaNegA = 
x.second.getValue<
unsigned int>();
 
  680       } 
else if( 
x.first == 
"XERHO_sigmaNegB" ){
 
  681          m_XERHO_sigmaNegB = 
x.second.getValue<
unsigned int>();
 
  682       } 
else if( 
x.first == 
"XERHO_sigmaNegC" ){
 
  683          m_XERHO_sigmaNegC = 
x.second.getValue<
unsigned int>();
 
  684       } 
else if( 
x.first == 
"XEJWOJ_a_A" ){
 
  685          m_XEJWOJ_a_A = 
x.second.getValue<
unsigned int>();
 
  686       } 
else if( 
x.first == 
"XEJWOJ_a_B" ){
 
  687          m_XEJWOJ_a_B = 
x.second.getValue<
unsigned int>();
 
  688       } 
else if( 
x.first == 
"XEJWOJ_a_C" ){
 
  689          m_XEJWOJ_a_C = 
x.second.getValue<
unsigned int>();
 
  690       } 
else if( 
x.first == 
"XEJWOJ_b_A" ){
 
  691          m_XEJWOJ_b_A = 
x.second.getValue<
unsigned int>();
 
  692       } 
else if( 
x.first == 
"XEJWOJ_b_B" ){
 
  693          m_XEJWOJ_b_B = 
x.second.getValue<
unsigned int>();
 
  694       } 
else if( 
x.first == 
"XEJWOJ_b_C" ){
 
  695          m_XEJWOJ_b_C = 
x.second.getValue<
unsigned int>();
 
  696       } 
else if( 
x.first == 
"XEJWOJ_c_A" ){
 
  697          m_XEJWOJ_c_A = 
x.second.getValue<
unsigned int>();
 
  698       } 
else if( 
x.first == 
"XEJWOJ_c_B" ){
 
  699          m_XEJWOJ_c_B = 
x.second.getValue<
unsigned int>();
 
  700       } 
else if( 
x.first == 
"XEJWOJ_c_C" ){
 
  701          m_XEJWOJ_c_C = 
x.second.getValue<
unsigned int>();
 
  721       return m_rpcPtMap.at(
pt);
 
  724       std::cerr << 
"No RPC index defined for pt " << 
pt << endl;
 
  734       return m_tgcPtMap.at(
pt);
 
  737       std::cerr << 
"No TGC index defined for pt " << 
pt << endl;
 
  746    for(
auto & 
x : m_rpcPtMap){
 
  747       if(
x.second==
idx) 
return x.first;
 
  749    throw std::runtime_error(
"index "+
std::to_string(
idx)+
" not found for RPC roads"); 
 
  757    for(
auto & 
x : m_tgcPtMap){
 
  758       if(
x.second==
idx) 
return x.first;
 
  760    throw std::runtime_error(
"index "+
std::to_string(
idx)+
" not found for TGC roads");
 
  768    int ptValue = ptForRpcIdx(rpcIdx);
 
  769    return tgcIdxForPt(ptValue);
 
  772 std::vector<unsigned int>
 
  775    std::vector<unsigned int> ptValues;   
 
  776    for( 
auto & 
x : m_rpcPtMap ) {
 
  777       ptValues.emplace_back(
x.first);
 
  782 std::vector<unsigned int>
 
  785    std::vector<unsigned int> ptValues;   
 
  786    for( 
auto & 
x : m_tgcPtMap ) {
 
  787       ptValues.emplace_back(
x.first);
 
  793 std::vector<std::string>
 
  796    std::vector<std::string> listNames;   
 
  797    for( 
auto & 
x : m_roiExclusionLists ) {
 
  798       listNames.emplace_back(
x.first);
 
  804 const std::map<std::string, std::vector<unsigned int> > &
 
  808       return m_roiExclusionLists.at(listName);
 
  811       std::cerr << 
"No exclusion list '" << listName << 
"' defined in MU threshold exlusionLists" << endl;
 
  821       for( 
const auto & 
x : 
ds.data() ) {
 
  822          m_rpcPtMap.emplace( boost::lexical_cast<unsigned int, std::string>(
x.first),
 
  823                              boost::lexical_cast<unsigned int, std::string>(
x.second.data()));
 
  828       for( 
auto & 
x : 
ds.data() ) {
 
  829          m_tgcPtMap.emplace( boost::lexical_cast<unsigned int, std::string>(
x.first),
 
  830                              boost::lexical_cast<unsigned int, std::string>(
x.second.data()));
 
  833    for( 
auto & 
x : m_extraInfo[
"exclusionLists"].
data() ) {
 
  834       const std::string & listName = 
x.first;
 
  835       std::map<std::string, std::vector<unsigned int>> roisBySector;
 
  836       for( 
auto & 
list : 
x.second ) {
 
  837          const std::string & 
sectorName = 
list.second.get_child(
"sectorName").get_value<std::string>();
 
  838          std::vector<unsigned int> 
rois;
 
  839          for( 
auto & roi : 
list.second.get_child(
"rois") ) {
 
  840             rois.push_back( boost::lexical_cast<unsigned int, std::string>( roi.second.data() ) );
 
  844       m_roiExclusionLists.emplace(listName, std::move(roisBySector));