76 #ifndef XAOD_STANDALONE
84 #define CONFIG_EG_EFF_TOOL( TOOLHANDLE, TOOLNAME, CORRFILE ) \
85 if( !TOOLHANDLE.isUserConfigured() ) { \
86 TOOLHANDLE.setTypeAndName("AsgElectronEfficiencyCorrectionTool/"+TOOLNAME); \
87 std::vector< std::string > corrFileNameList = {CORRFILE}; \
88 ATH_CHECK( TOOLHANDLE.setProperty("CorrectionFileNameList", corrFileNameList) ); \
90 ATH_CHECK (TOOLHANDLE.setProperty("ForceDataType", static_cast<int>(data_type))); \
91 ATH_CHECK( TOOLHANDLE.setProperty("CorrelationModel", m_EG_corrModel) ); \
92 ATH_CHECK( TOOLHANDLE.setProperty("OutputLevel", this->msg().level()) ); \
93 ATH_CHECK( TOOLHANDLE.initialize() ); \
94 } else ATH_CHECK(TOOLHANDLE.retrieve());
96 #define CONFIG_EG_EFF_TOOL_KEY( TOOLHANDLE, TOOLNAME, KEYNAME, KEY, MAP ) \
97 if( !TOOLHANDLE.isUserConfigured() ) { \
98 TOOLHANDLE.setTypeAndName("AsgElectronEfficiencyCorrectionTool/"+TOOLNAME); \
99 ATH_MSG_INFO( "Will now set key \"" << KEYNAME << "\" to value \"" << KEY << "\" when configuring an AsgElectronEfficiencyCorrectionTool" ); \
100 ATH_CHECK( TOOLHANDLE.setProperty(KEYNAME, KEY) ); \
102 ATH_CHECK (TOOLHANDLE.setProperty("ForceDataType", static_cast<int>(data_type))); \
103 ATH_CHECK( TOOLHANDLE.setProperty("CorrelationModel", m_EG_corrModel) ); \
104 ATH_CHECK( TOOLHANDLE.setProperty("OutputLevel", this->msg().level()) ); \
105 ATH_CHECK( TOOLHANDLE.setProperty("MapFilePath", MAP) ); \
106 ATH_CHECK( TOOLHANDLE.initialize() ); \
107 } else if (!isData()) ATH_CHECK(TOOLHANDLE.retrieve());
113 ATH_MSG_FATAL(
"You must set the DataSource property to Data, FullSim or AtlfastII !!");
114 ATH_MSG_FATAL(
"Expect segfaults if you're not checking status codes, which you should be !!");
115 return StatusCode::FAILURE;
119 ATH_MSG_INFO(
"SUSYTools subtools already created. Ignoring this call.");
120 ATH_MSG_INFO(
"Note: No longer necessary to explicitly call SUSYToolsInit. Will avoid creating tools again.");
121 return StatusCode::SUCCESS;
129 std::vector<std::string> file_conf;
135 std::vector<std::string> file_ilumi;
165 ATH_MSG_INFO(
"Using user-configured LRT uncertainty tool");
169 std::string toolName;
171 std::string jetname,
jetcoll,fatjetcoll;
181 toolName =
"JetCalibTool_" + jetname;
183 std::string JES_config_file, calibseq;
187 return StatusCode::FAILURE;
192 ATH_MSG_WARNING(
"Jet rec currently not available for fast sim, temporary fallback to full sim version");
197 JES_config_file = JESconfig;
201 std::string insitu(
"_Insitu");
202 auto found = calibseq.find(insitu);
203 if(
found != std::string::npos){
204 calibseq.erase(
found, insitu.length());
210 ATH_MSG_ERROR(
"JMS calibration is not supported yet for R22. Please modify your settings.");
211 return StatusCode::FAILURE;
228 if(fatjetcoll ==
"AnalysisLargeRJets") {
229 ATH_MSG_DEBUG(
"Fall back to calibration for AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets, original name for AnalysisLargeRJets");
230 fatjetcoll =
"AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets";
232 if (fatjetcoll.size()>3)fatjetcoll.erase(fatjetcoll.size()-4,4);
234 toolName =
"JetFatCalibTool_" +
m_fatJets;
240 if(
isData()) jesCalibSeqFat +=
"_Insitu";
264 #ifndef XAOD_STANDALONE
273 ATH_MSG_ERROR(
"Error while reading large-R config file : " << WConfigPath );
274 return StatusCode::FAILURE;
276 else ATH_MSG_DEBUG(
"Successfully read large-R config file : " << WConfigPath );
291 #ifndef XAOD_STANDALONE
300 ATH_MSG_ERROR(
"Error while reading large-R config file : " << ZConfigPath );
301 return StatusCode::FAILURE;
303 else ATH_MSG_DEBUG(
"Successfully read large-R config file : " << ZConfigPath );
318 #ifndef XAOD_STANDALONE
327 ATH_MSG_ERROR(
"Error while reading large-R config file : " << TopConfigPath );
328 return StatusCode::FAILURE;
330 else ATH_MSG_DEBUG(
"Successfully read large-R config file : " << TopConfigPath );
369 if(jetdef !=
"AntiKt4EMPFlow"){
370 ATH_MSG_WARNING(
"Jet Uncertaintes recommendations only exist for PFlow jets, falling back to AntiKt4EMPFlow");
371 jetdef =
"AntiKt4EMPFlow";
373 toolName =
"JetUncertaintiesTool_" + jetdef;
388 ATH_MSG_INFO(
"Set up Jet PD Smear Uncertainty tool...");
393 if(jetdef !=
"AntiKt4EMPFlow"){
394 ATH_MSG_WARNING(
"Jet Uncertaintes recommendations only exist for PFlow jets, falling back to AntiKt4EMPFlow");
395 jetdef =
"AntiKt4EMPFlow";
397 toolName =
"JetUncertaintiesPDSmearTool_" + jetdef;
404 ATH_MSG_ERROR(
"You are trying to use the SimpleJER set, with PDsmearing. There is no functionality for this. Please fix your config file. Either run with PDSmear set to false, or run with the AllJER or FullJER sets.");
405 return StatusCode::FAILURE;
415 ATH_MSG_DEBUG(
"Do not retrieve the jet PD Smearing tool if it is not configured");
421 ATH_MSG_INFO(
"Won't initialise jet uncertainty tool for fat jets until we get rec for UFO");
458 ATH_MSG_INFO(
" Won't initialise Wtagger uncertainty tool for fat jets until we get rec for UFO");
473 ATH_MSG_INFO(
" Won't initialise Ztagger uncertainty tool for fat jets until we get rec for UFO");
488 ATH_MSG_INFO(
" Won't initialise top-tagger uncertainty tool for fat jets until we get rec for UFO");
515 toolName =
"JetCleaningTool";
527 toolName =
"PileupLabelingTool";
531 #ifndef XAOD_STANDALONE
544 toolName =
"NNJvtMomentTool";
547 #ifndef XAOD_STANDALONE
559 toolName =
"NNJvtSelectionTool";
573 toolName =
"NNJvtEfficiencyTool";
587 toolName =
"fJvtSelectionTool";
601 toolName =
"fJvtEfficiencyTool";
617 std::string muQualBaseline =
"";
620 ATH_MSG_WARNING(
"No muon scale factors are available for VeryLoose working point.");
625 case 4: muQualBaseline =
"HighPt";
break;
626 case 5: muQualBaseline =
"LowPt";
break;
627 case 6: muQualBaseline =
"LowPtMVA";
break;
628 case 7: muQualBaseline =
"HighPt3Layers";
break;
631 return StatusCode::FAILURE;
648 if (IdBaselineInt == 4) {
659 toolName =
"MuonSelectionTool_Baseline_" + muQualBaseline;
665 ") that is tighter than the signal cut (" <<
m_muEta <<
"). Please check your config." );
666 return StatusCode::FAILURE;
670 if (IdBaselineInt == 6){
673 }
else if (IdBaselineInt == 7){
682 std::string muQual =
"";
685 ATH_MSG_WARNING(
"No muon scale factors are available for VeryLoose working point.");
690 case 4: muQual =
"HighPt";
break;
691 case 5: muQual =
"LowPt";
break;
692 case 6: muQual =
"LowPtMVA";
break;
693 case 7: muQual =
"HighPt3Layers";
break;
695 ATH_MSG_ERROR(
"Invalid muon working point provided: " <<
m_muId <<
". Cannot initialise!");
696 return StatusCode::FAILURE;
701 toolName =
"MuonSelectionTool_" + muQual;
709 }
else if (IdInt == 7){
719 toolName =
"MuonSelectionHighPtTool_" + muQual;
732 toolName =
"MuonLRTOverlapRemovalTool";
743 toolName =
"MuonEfficiencyScaleFactors_" + muQual;
756 toolName =
"MuonEfficiencyScaleFactorsBMHighPt_" + muQual;
769 ATH_MSG_WARNING(
"Requested TTVA SFs without d0sig and z0 cuts. Disabling scale factors as they will not make sense.");
774 toolName =
"MuonTTVAEfficiencyScaleFactors";
787 toolName =
"MuonIsolationScaleFactors_" +
m_muIso_WP;
793 <<
") does not have SFs defined. Will try to find an appropriate fall-back.");
798 <<
" is not supported, and does not have SFs available. Falling back to "
800 <<
" for SF determination.");
802 ATH_MSG_ERROR(
"*** The muon isolation WP you selected (" <<
m_muIso_WP <<
") is not currentely supported, and no known fall-back option for SFs exists. Sorry! ***");
803 return StatusCode::FAILURE;
826 <<
") does not have SFs defined. Will try to find an appropriate fall-back.");
831 <<
" is not supported, and does not have SFs available. Falling back to "
832 << tmp_muIsoHighPt_WP
833 <<
" for SF determination.");
835 ATH_MSG_ERROR(
"*** The muon isolation WP you selected (" <<
m_muIsoHighPt_WP <<
") is not currentely supported, and no known fall-back option for SFs exists. Sorry! ***");
836 return StatusCode::FAILURE;
854 toolName =
"MuonTriggerScaleFactors_" + muQual;
856 if ( muQual==
"LowPt" ) {
857 ATH_MSG_WARNING(
"You're using the LowPt muon selection, which is not supported yet in terms of muon trigger scale facorts. TEMPORAIRLY configuring the muonTriggerSFTool for Medium muons. Beware!");
878 toolName =
"EleSelLikelihood_" +
m_eleId;
882 ATH_MSG_INFO(
"Overriding specified Ele.Id working point in favour of configuration file");
886 return StatusCode::FAILURE;
889 ATH_MSG_WARNING(
" ****************************************************************************");
891 ATH_MSG_WARNING(
" These may be used for loose electron CRs but no scale factors are provided.");
892 ATH_MSG_WARNING(
" ****************************************************************************");
908 ATH_MSG_INFO(
"Overriding specified EleBaseline.Id working point in favour of configuration file");
912 return StatusCode::FAILURE;
925 toolName =
"ElectronLRTOverlapRemovalTool";
942 return StatusCode::FAILURE;
956 return StatusCode::FAILURE;
989 ATH_MSG_INFO(
"Running on Run2 samples; Using egamma SF tools from R21 map ");
993 toolName =
"AsgElectronEfficiencyCorrectionTool_reco";
1004 std::string eleId = TString(
m_eleId).ReplaceAll(
"AndBLayer",
"BLayer").ReplaceAll(
"LLH",
"").Data();
1007 toolName =
"AsgElectronEfficiencyCorrectionTool_id_" +
m_eleId;
1011 std::map<std::string,std::string> corrFNList;
1014 std::string
WP = WP_fname.substr(0,WP_fname.find(
":"));
1015 std::string
fname = WP_fname.substr(WP_fname.find(
":")+1);
1018 ATH_MSG_WARNING(
"Will use correction file rather than central map file." );
1023 std::string EleIso(
"");
1029 ATH_MSG_WARNING(
"(AsgElectronEfficiencyCorrectionTool_iso_*) Your selected electron Iso WP ("
1031 <<
") does not have iso SFs defined. Falling back to "
1033 <<
" for SF calculations");
1037 return StatusCode::FAILURE;
1040 toolName =
"AsgElectronEfficiencyCorrectionTool_iso_" +
m_eleId + EleIso;
1043 if ( (!
m_EG_corrFNList.empty()) && corrFNList.find(EleIso)!=corrFNList.end() ) {
1050 ATH_MSG_WARNING(
"(" << toolName <<
") Your electron Iso WP: " << EleIso<<
" is no longer supported. This will almost certainly cause a crash now.");
1062 if (!
isData() && ((EleIso.find(
"TightTrackOnly_VarRad")!=std::string::npos)||
1063 (EleIso.find(
"TightTrackOnly_FixedRad")!=std::string::npos)||
1064 (EleIso.find(
"Tight_VarRad")!=std::string::npos)||
1065 (EleIso.find(
"Loose_VarRad")!=std::string::npos))) {
1066 if (
isAtlfast())
ATH_MSG_WARNING(
"(AsgElectronEfficiencyCorrectionTool/"+toolName+
"). Your selected electron Iso WP (" + EleIso +
") don't have AFII SF. Falling back to FullSim");
1079 std::string EleIsohighPt(
"");
1085 ATH_MSG_WARNING(
"(AsgElectronEfficiencyCorrectionTool_iso_*) Your selected high-pT electron Iso WP ("
1087 <<
") does not have iso SFs defined. Falling back to "
1089 <<
" for SF calculations");
1093 return StatusCode::FAILURE;
1096 toolName =
"AsgElectronEfficiencyCorrectionTool_isoHigPt_" +
m_eleId + EleIsohighPt;
1099 if ( (!
m_EG_corrFNList.empty()) && corrFNList.find(EleIsohighPt)!=corrFNList.end() ) {
1107 ATH_MSG_WARNING(
"(" << toolName <<
") Your electron high-pt Iso WP: " << EleIsohighPt <<
" is no longer supported. This will almost certainly cause a crash now.");
1128 if(
m_isRun3 && eleId.find(
"LooseBLayer") != std::string::npos)
ATH_MSG_WARNING(
"Replacing 'LooseBLayer' with 'Loose' for Electron ID while configuring single-ele trigger SF using: " <<
m_eleEffMapFilePath);
1129 std::string triggerEleID =
m_isRun3? TString(eleId).ReplaceAll(
"LooseBLayer",
"Loose").Data() : eleId;
1135 bool pass_isRun3TrigSFFallback =
true;
1136 if (triggerEleID.find(
"Medium") != std::string::npos && triggerEleIso.find(
"Loose") != std::string::npos) {triggerEleID =
"Loose";}
1137 else if (triggerEleID.find(
"Medium") != std::string::npos && triggerEleIso.find(
"Tight") != std::string::npos) {triggerEleID =
"Tight"; triggerEleIso =
"Tight_VarRad";}
1138 else if (triggerEleID.find(
"Medium") != std::string::npos && triggerEleIso.find(
"HighPtCaloOnly") != std::string::npos) {triggerEleID =
"Tight"; triggerEleIso =
"Tight_VarRad";}
1139 else if (triggerEleID.find(
"Tight") != std::string::npos && triggerEleIso.find(
"Loose") != std::string::npos) {triggerEleID =
"Loose";}
1140 else if (triggerEleID.find(
"Tight") != std::string::npos && triggerEleIso.find(
"Tight") != std::string::npos) {triggerEleIso=
"Tight_VarRad";}
1141 else if (triggerEleID.find(
"Tight") != std::string::npos && triggerEleIso.find(
"HighPtCaloOnly") != std::string::npos) {triggerEleID =
"Tight"; triggerEleIso =
"Tight_VarRad";}
1142 else if (triggerEleID.find(
"Loose") != std::string::npos && triggerEleIso.find(
"Tight") != std::string::npos) {triggerEleID =
"Loose"; triggerEleIso =
"Loose_VarRad";}
1143 else if (triggerEleID.find(
"Loose") != std::string::npos && triggerEleIso.find(
"HighPtCaloOnly") != std::string::npos) {triggerEleID =
"Loose"; triggerEleIso =
"Loose_VarRad";}
1144 else {pass_isRun3TrigSFFallback=
false;}
1145 if(pass_isRun3TrigSFFallback){
1146 ATH_MSG_INFO(
" ************** This is only for testing/studying purpose! ************** ");
1147 ATH_MSG_INFO(
" ************** For official recommendation, please get in contact with the SUSY Bkg Forum ************** ");
1148 ATH_MSG_INFO(
"In the current map ("<<
m_eleEffMapFilePath<<
"), the only supported Electron ID working-points supported for Electron Trigger Scale Factor are 'Loose_Loose_VarRad' and 'Tight_Tight_VarRad' ");
1149 ATH_MSG_INFO(
"Only for single-lepton trigger scale factor, fall back to Electron ID: -> "<< triggerEleID <<
" with Isolation: " << triggerEleIso);
1161 ATH_MSG_WARNING(
"(AsgElectronEfficiencyCorrectionTool_trig_singleLep_*) Your selected electron Iso WP ("
1163 <<
") does not have trigger SFs defined. Falling back to "
1165 <<
" for SF calculations");
1169 return StatusCode::FAILURE;
1172 toolName =
"AsgElectronEfficiencyCorrectionTool_trig_singleLep_" + triggerEleID;
1188 toolName =
"AsgElectronEfficiencyCorrectionTool_trigEff_singleLep_" + triggerEleID;
1205 std::map<std::string,std::string> electronTriggerSFMapMixedLepton {
1207 {
"e24_lhmedium_L1EM20VH_OR_e60_lhmedium_OR_e120_lhloose,e26_lhtight_nod0_ivarloose_OR_e60_lhmedium_nod0_OR_e140_lhloose_nod0",
m_electronTriggerSFStringSingle},
1208 {
"e24_lhvloose_nod0_L1EM20VH,e17_lhvloose_nod0,e12_lhloose_L1EM10VH",
"DI_E_2015_e12_lhloose_L1EM10VH_2016_e17_lhvloose_nod0_2017_2018_e24_lhvloose_nod0_L1EM20VH"},
1209 {
"e26_lhmedium_nod0_L1EM22VHI,e26_lhmedium_nod0",
"MULTI_L_2015_e24_lhmedium_L1EM20VH_OR_e60_lhmedium_OR_e120_lhloose_2016_e26_lhmedium_nod0_L1EM22VHI_2017_2018_e26_lhmedium_nod0"},
1210 {
"e17_lhloose,e17_lhloose_nod0",
"MULTI_L_2015_e17_lhloose_2016_2018_e17_lhloose_nod0"},
1211 {
"e12_lhloose,e12_lhloose_nod0",
"MULTI_L_2015_e12_lhloose_2016_2018_e12_lhloose_nod0"},
1212 {
"e7_lhmedium,e7_lhmedium_nod0",
"MULTI_L_2015_e7_lhmedium_2016_2018_e7_lhmedium_nod0"},
1213 {
"e9_lhloose,e9_lhloose_nod0,e12_lhvloose_nod0_L1EM10VH",
"TRI_E_2015_e9_lhloose_2016_e9_lhloose_nod0_2017_2018_e12_lhvloose_nod0_L1EM10VH"}
1219 if (triglist_2017to2018.find(
"2e17_lhvloose_nod0_L12EM15VHI") != std::string::npos) {
1220 electronTriggerSFMapMixedLepton[
"e17_lhvloose_nod0_L1EM15VHI"] =
"DI_E_2015_e12_lhloose_L1EM10VH_2016_e17_lhvloose_nod0_2017_2018_e17_lhvloose_nod0_L1EM15VHI";
1223 std::string triggerMixedEleIso(
"");
1225 for(
auto const&
item : electronTriggerSFMapMixedLepton){
1232 ATH_MSG_WARNING(
"(AsgElectronEfficiencyCorrectionTool_trig_mixLep_*) Your selected electron Iso WP ("
1234 <<
") does not have trigger SFs defined. Falling back to "
1235 << triggerMixedEleIso
1236 <<
" for SF calculations");
1238 ATH_MSG_ERROR(
"*** THE MIXED ELECTRON TRIGGER SF YOU SELECTED (" <<
item.second <<
") GOT NO SUPPORT FOR YOUR ID+ISO WPs (" <<
m_eleId <<
"+" <<
m_eleIso_WP <<
"). The fallback options failed as well sorry! ***");
1239 return StatusCode::FAILURE;
1242 ATH_MSG_VERBOSE (
"Selected WP: " <<
item.second <<
"_" << eleId <<
"_" << triggerMixedEleIso);
1244 toolName =
"AsgElectronEfficiencyCorrectionTool_trig_mixLep_" + (
item.first).substr(0,8) +
m_eleId;
1248 ATH_CHECK( t_sf->setProperty(
"IdKey", eleId) );
1249 ATH_CHECK( t_sf->setProperty(
"IsoKey", triggerMixedEleIso) );
1254 ATH_CHECK( t_sf->setProperty(
"OutputLevel", this->msg().level()) );
1257 #ifndef XAOD_STANDALONE
1263 toolName =
"AsgElectronEfficiencyCorrectionTool_trigEff_mixLep_" + (
item.first).substr(0,8) +
m_eleId;
1266 ATH_CHECK( t_eff->setProperty(
"TriggerKey",
"Eff_"+
item.second) );
1267 ATH_CHECK( t_eff->setProperty(
"IdKey", eleId) );
1268 ATH_CHECK( t_eff->setProperty(
"IsoKey", triggerMixedEleIso) );
1273 ATH_CHECK( t_eff->setProperty(
"OutputLevel", this->msg().level()) );
1276 #ifndef XAOD_STANDALONE
1284 else ATH_MSG_WARNING(
"*** THE ELECTRON TRIGGER SF MIXED AND SF DILEP ARE CURRENTY NOT SUPPORTED IN RUN3 ***");
1286 ATH_MSG_WARNING(
"*** THE ELECTRON CHARGE FLIP SF ARE CURRENTY NOT SUPPORTED ***");
1330 photonIso_forTrigSF =
"TightCaloOnly";
1332 photonIso_forTrigSF = TString(
m_photonIso_WP).ReplaceAll(
"FixedCut",
"").Data();
1344 std::map<std::string,std::string> diphotonTriggerSFMapAsymmetric {
1346 {
"g25_loose,g25_medium_L1EM20VH",
"DI_PH_2015_g25_loose_2016_g25_loose_2017_g25_medium_L1EM20VH_2018_g25_medium_L1EM20VH"},
1347 {
"g35_loose,g35_medium_L1EM20VH",
"DI_PH_2015_g35_loose_2016_g35_loose_2017_g35_medium_L1EM20VH_2018_g35_medium_L1EM20VH"},
1350 for(
auto const&
item : diphotonTriggerSFMapAsymmetric){
1352 toolName =
"AsgPhotonEfficiencyCorrectionTool_trigSF_asymm_diphoton_" + (
item.first).substr(0,9) + photonIso_forTrigSF;
1354 ATH_CHECK( ph_trigSF->setProperty(
"MapFilePath",
"PhotonEfficiencyCorrection/2015_2018/rel21.2/Summer2020_Rec_v1/map1.txt") );
1355 ATH_CHECK( ph_trigSF->setProperty(
"IsoKey", photonIso_forTrigSF) );
1356 ATH_CHECK( ph_trigSF->setProperty(
"TriggerKey",
item.second) );
1357 ATH_CHECK( ph_trigSF->setProperty(
"ForceDataType", 1) );
1358 ATH_CHECK( ph_trigSF->setProperty(
"OutputLevel", this->msg().level()) );
1361 #ifndef XAOD_STANDALONE
1367 toolName =
"AsgPhotonEfficiencyCorrectionTool_trigEff_asymm_diphoton_" + (
item.first).substr(0,9) + photonIso_forTrigSF;
1369 ATH_CHECK( ph_trigEff->setProperty(
"MapFilePath",
"PhotonEfficiencyCorrection/2015_2018/rel21.2/Summer2020_Rec_v1/map1.txt") );
1370 ATH_CHECK( ph_trigEff->setProperty(
"IsoKey", photonIso_forTrigSF) );
1371 ATH_CHECK( ph_trigEff->setProperty(
"TriggerKey",
"Eff_"+
item.second) );
1372 ATH_CHECK( ph_trigEff->setProperty(
"ForceDataType", 1) );
1373 ATH_CHECK( ph_trigEff->setProperty(
"OutputLevel", this->msg().level()) );
1376 #ifndef XAOD_STANDALONE
1445 else if (
m_tauId ==
"VeryLoose")
inputfile =
"SUSYTools/tau_selection_veryloose.conf";
1446 else if (
m_tauId ==
"Loose")
inputfile =
"SUSYTools/tau_selection_loose.conf";
1447 else if (
m_tauId ==
"Medium")
inputfile =
"SUSYTools/tau_selection_medium.conf";
1448 else if (
m_tauId ==
"Tight")
inputfile =
"SUSYTools/tau_selection_tight.conf";
1451 return StatusCode::FAILURE;
1457 return StatusCode::FAILURE;
1466 toolName =
"TauSelectionTool_" +
m_tauId;
1483 return StatusCode::FAILURE;
1498 toolName =
"TauEffTool_" +
m_tauId;
1502 std::vector<int> correction_types;
1505 ANA_MSG_DEBUG(
"Found JetIDWP in tau config file : " << jetIDWP );
1512 ATH_MSG_ERROR(
"Invalid Tau ID in tau config file " << jetIDWP);
1513 return StatusCode::FAILURE;
1516 correction_types.insert(correction_types.end(), {TauAnalysisTools::EfficiencyCorrectionType::SFRecoHadTau,
1517 TauAnalysisTools::EfficiencyCorrectionType::SFJetIDHadTau});
1521 ANA_MSG_DEBUG(
"Found EleIDWP in tau config file : " << eleIDWP );
1522 int ele_id_lvl = -1;
1527 ATH_MSG_INFO(
"No or invalid Ele OR in tau config file " << eleIDWP <<
" will not apply SFs for electro veto" );
1530 if (ele_id_lvl != -1 )
1531 correction_types.insert(correction_types.end(), {TauAnalysisTools::EfficiencyCorrectionType::SFEleIDHadTau,
1532 TauAnalysisTools::EfficiencyCorrectionType::SFEleIDElectron});
1554 return StatusCode::FAILURE;
1559 {
"HLT_tau25_medium1_tracktwo",
"HLT_tau25_medium1_tracktwo"},
1560 {
"HLT_tau35_medium1_tracktwo",
"HLT_tau35_medium1_tracktwo"},
1561 {
"HLT_tau50L1TAU12_medium1_tracktwo",
"HLT_tau50_medium1_tracktwo_L1TAU12"},
1562 {
"HLT_tau60_medium1_tracktwo",
"HLT_tau60_medium1_tracktwo"},
1563 {
"HLT_tau80L1TAU60_medium1_tracktwo",
"HLT_tau80_medium1_tracktwo_L1TAU60"},
1564 {
"HLT_tau125_medium1_tracktwo",
"HLT_tau125_medium1_tracktwo"},
1565 {
"HLT_tau160_medium1_tracktwo",
"HLT_tau160_medium1_tracktwo"},
1566 {
"HLT_tau160L1TAU100_medium1_tracktwo",
"HLT_tau160_medium1_tracktwo_L1TAU100"},
1568 {
"HLT_tau25_medium1_tracktwoEF",
"HLT_tau25_medium1_tracktwoEF"},
1569 {
"HLT_tau35L1TAU12IM_medium1_tracktwoEF",
"HLT_tau35_medium1_tracktwoEF_L1TAU12IM"},
1570 {
"HLT_tau35_medium1_tracktwoEF",
"HLT_tau35_medium1_tracktwoEF"},
1571 {
"HLT_tau60_medium1_tracktwoEF",
"HLT_tau60_medium1_tracktwoEF"},
1572 {
"HLT_tau80L1TAU60_medium1_tracktwoEF",
"HLT_tau80_medium1_tracktwoEF_L1TAU60"},
1573 {
"HLT_tau160L1TAU100_medium1_tracktwoEF",
"HLT_tau160_medium1_tracktwoEF_L1TAU100"},
1575 {
"HLT_tau25_medium1_tracktwoEF_OR_mediumRNN_tracktwoMVA",
"HLT_tau25_medium1_tracktwoEF,HLT_tau25_mediumRNN_tracktwoMVA"},
1576 {
"HLT_tau35L1TAU12IM_medium1_tracktwoEF_OR_mediumRNN_tracktwoMVA",
"HLT_tau35_medium1_tracktwoEF_L1TAU12IM,HLT_tau35_mediumRNN_tracktwoMVA_L1TAU12IM"},
1577 {
"HLT_tau35_medium1_tracktwoEF_OR_mediumRNN_tracktwoMVA",
"HLT_tau35_medium1_tracktwoEF,HLT_tau35_mediumRNN_tracktwoMVA"},
1578 {
"HLT_tau60_medium1_tracktwoEF_OR_mediumRNN_tracktwoMVA",
"HLT_tau60_medium1_tracktwoEF,HLT_tau60_mediumRNN_tracktwoMVA"},
1579 {
"HLT_tau80L1TAU60_medium1_tracktwoEF_OR_mediumRNN_tracktwoMVA",
"HLT_tau80_medium1_tracktwoEF_L1TAU60,HLT_tau80_mediumRNN_tracktwoMVA_L1TAU60"},
1580 {
"HLT_tau160L1TAU100_medium1_tracktwoEF_OR_mediumRNN_tracktwoMVA",
"HLT_tau160_medium1_tracktwoEF_L1TAU100,HLT_tau160_mediumRNN_tracktwoMVA_L1TAU100"}
1586 ATH_CHECK( tau_trigSF->setProperty(
"EfficiencyCorrectionTypes", std::vector<int>({TauAnalysisTools::SFTriggerHadTau})) );
1588 ATH_CHECK( tau_trigSF->setProperty(
"JetIDLevel", iTauID) );
1590 ATH_CHECK( tau_trigSF->setProperty(
"OutputLevel", this->msg().level()) );
1631 std::string jetcollBTag =
jetcoll;
1632 if (
jetcoll ==
"AntiKt4LCTopoJets") {
1633 ATH_MSG_WARNING(
" *** HACK *** Treating LCTopoJets jets as EMTopo -- use at your own risk!");
1634 jetcollBTag =
"AntiKt4EMTopoJets";
1641 ATH_MSG_WARNING(
"You are using a "<<(!
m_isRun3 ?
"Run3":
"Run2")<<
" CDI file while running on "<<(!
m_isRun3 ?
"Run2":
"Run3")<<
" sample; Please updates your CDI file to the correct version for "<<(!
m_isRun3 ?
"Run2":
"Run3"));
1645 if (jetcollBTag.find(
"AntiKt4EMTopoJets") == std::string::npos && jetcollBTag.find(
"AntiKt4EMPFlowJets")==std::string::npos) {
1646 ATH_MSG_WARNING(
"** Only AntiKt4EMTopoJets and AntiKt4EMPFlowJets are supported with FTAG scale factors!");
1647 return StatusCode::FAILURE;
1664 if (
jetcoll !=
"AntiKt4EMTopoJets" &&
jetcoll !=
"AntiKt4EMPFlowJets") {
1665 ATH_MSG_WARNING(
"** Only AntiKt4EMTopoJets and AntiKt4EMPFlowJets are supported with FTAG scale factors!");
1666 return StatusCode::FAILURE;
1669 toolName =
"BTagSelOR_" + jetcollBTag +
m_orBtagWP;
1682 const std::string& BTagColl_TrkJet = trkjetcoll;
1686 ATH_MSG_INFO(
"TrackJet collection set to None: disabling btagging for TrackJets.");
1690 if (trkjetcoll.find(
"AntiKt2PV0TrackJets")==std::string::npos && trkjetcoll.find(
"AntiKtVR30Rmax4Rmin02TrackJets")==std::string::npos) {
1691 ATH_MSG_WARNING(
"** Only AntiKt2PV0TrackJets and AntiKtVR30Rmax4Rmin02TrackJets are supported with FTAG scale factors!");
1692 return StatusCode::FAILURE;
1711 std::string MCshowerID;
1713 MCshowerID=
"default";
1724 MCshowerID=
"default";
1731 if (
jetcoll !=
"AntiKt4EMTopoJets" &&
jetcoll !=
"AntiKt4EMPFlowJets") {
1732 ATH_MSG_WARNING(
"** Only AntiKt4EMTopoJets and AntiKt4EMPFlowJets are supported with FTAG scale factors!");
1733 return StatusCode::FAILURE;
1755 if (trkjetcoll.find(
"AntiKt2PV0TrackJets")==std::string::npos && trkjetcoll.find(
"AntiKtVR30Rmax4Rmin02TrackJets")==std::string::npos) {
1756 ATH_MSG_WARNING(
"** Only AntiKt2PV0TrackJets and AntiKtVR30Rmax4Rmin02TrackJets are supported with FTAG scale factors!");
1757 return StatusCode::FAILURE;
1760 toolName =
"BTagSF_" + trkjetcoll;
1813 ATH_MSG_ERROR(
"Can only have CST *or* TST configured for MET maker. Please unset either METDoCaloSyst or METDoTrkSyst in your config file" );
1814 return StatusCode::FAILURE;
1843 if(jetname ==
"AntiKt4EMTopo" || jetname ==
"AntiKt4EMPFlow"){
1846 ATH_MSG_WARNING(
"Object-based METSignificance recommendations only exist for EMTopo and PFlow, falling back to AntiKt4EMTopo");
1849 #ifndef XAOD_STANDALONE // Athena and AthAnalysis; need to take into account that MuonCalibTool is private tool
1857 if (IdBaselineInt == 4)
1860 #else // AnalysisBase; can just pass the muon calib tool above
1883 #ifndef XAOD_STANDALONE // Athena and AthAnalysis
1886 #else // AnalysisBase
1930 std::string no2e17(
"");
1940 ATH_MSG_DEBUG(
"TrigGlobalEfficiencyCorrectionTool/TrigGlobal_diLep: no2e17 trigger string: " << no2e17 );
1942 std::map<std::string,std::string> triggers_diLep;
1946 triggers_diLep[
"326834-328393"] = no2e17;
1965 std::string no2e17(
"");
1975 ATH_MSG_DEBUG(
"TrigGlobalEfficiencyCorrectionTool/TrigGlobal_multiLep: no2e17 trigger string: " << no2e17 );
1977 std::map<std::string,std::string> triggers_multiLep;
1981 triggers_multiLep[
"326834-328393"] = no2e17;
2081 #ifndef XAOD_ANALYSIS
2098 std::string toolName =
"ORTool" +
suffix;
2099 ATH_MSG_INFO(
"SUSYTools: Autoconfiguring " << toolName);
2242 return StatusCode::SUCCESS;