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 JES/JER recommendations currently not available for fast sim in Run 3, falling back 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;
229 if(fatjetcoll ==
"AnalysisLargeRJets") {
230 ATH_MSG_DEBUG(
"Fall back to calibration for AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets, original name for AnalysisLargeRJets");
231 fatjetcoll =
"AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets";
233 if (fatjetcoll.size()>3)fatjetcoll.erase(fatjetcoll.size()-4,4);
235 toolName =
"JetFatCalibTool_" +
m_fatJets;
241 if(
isData()) jesCalibSeqFat +=
"_Insitu";
265 #ifndef XAOD_STANDALONE
274 ATH_MSG_ERROR(
"Error while reading large-R config file : " << WConfigPath );
275 return StatusCode::FAILURE;
277 else ATH_MSG_DEBUG(
"Successfully read large-R config file : " << WConfigPath );
292 #ifndef XAOD_STANDALONE
301 ATH_MSG_ERROR(
"Error while reading large-R config file : " << ZConfigPath );
302 return StatusCode::FAILURE;
304 else ATH_MSG_DEBUG(
"Successfully read large-R config file : " << ZConfigPath );
319 #ifndef XAOD_STANDALONE
328 ATH_MSG_ERROR(
"Error while reading large-R config file : " << TopConfigPath );
329 return StatusCode::FAILURE;
331 else ATH_MSG_DEBUG(
"Successfully read large-R config file : " << TopConfigPath );
373 if(jetdef !=
"AntiKt4EMPFlow"){
374 ATH_MSG_WARNING(
"Jet Uncertaintes recommendations only exist for PFlow jets, falling back to AntiKt4EMPFlow");
375 jetdef =
"AntiKt4EMPFlow";
377 toolName =
"JetUncertaintiesTool_" + jetdef;
380 ATH_MSG_WARNING(
"Jet Uncertaintes pre-recommendations for Run3 only exist for full sim");
395 ATH_MSG_INFO(
"Set up Jet PD Smear Uncertainty tool...");
400 if(jetdef !=
"AntiKt4EMPFlow"){
401 ATH_MSG_WARNING(
"Jet Uncertaintes recommendations only exist for PFlow jets, falling back to AntiKt4EMPFlow");
402 jetdef =
"AntiKt4EMPFlow";
404 toolName =
"JetUncertaintiesPDSmearTool_" + jetdef;
411 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.");
412 return StatusCode::FAILURE;
422 ATH_MSG_DEBUG(
"Do not retrieve the jet PD Smearing tool if it is not configured");
428 ATH_MSG_INFO(
"Won't initialise jet uncertainty tool for fat jets until we get rec for UFO");
465 ATH_MSG_INFO(
" Won't initialise Wtagger uncertainty tool for fat jets until we get rec for UFO");
480 ATH_MSG_INFO(
" Won't initialise Ztagger uncertainty tool for fat jets until we get rec for UFO");
495 ATH_MSG_INFO(
" Won't initialise top-tagger uncertainty tool for fat jets until we get rec for UFO");
523 toolName =
"JetCleaningTool";
535 toolName =
"PileupLabelingTool";
539 #ifndef XAOD_STANDALONE
552 toolName =
"NNJvtMomentTool";
555 #ifndef XAOD_STANDALONE
567 toolName =
"NNJvtSelectionTool";
581 toolName =
"NNJvtEfficiencyTool";
595 toolName =
"fJvtSelectionTool";
609 toolName =
"fJvtEfficiencyTool";
625 std::string muQualBaseline =
"";
628 ATH_MSG_WARNING(
"No muon scale factors are available for VeryLoose working point.");
633 case 4: muQualBaseline =
"HighPt";
break;
634 case 5: muQualBaseline =
"LowPt";
break;
635 case 6: muQualBaseline =
"LowPtMVA";
break;
636 case 7: muQualBaseline =
"HighPt3Layers";
break;
639 return StatusCode::FAILURE;
656 if (IdBaselineInt == 4) {
667 toolName =
"MuonSelectionTool_Baseline_" + muQualBaseline;
673 ") that is tighter than the signal cut (" <<
m_muEta <<
"). Please check your config." );
674 return StatusCode::FAILURE;
678 if (IdBaselineInt == 6){
681 }
else if (IdBaselineInt == 7){
690 std::string muQual =
"";
693 ATH_MSG_WARNING(
"No muon scale factors are available for VeryLoose working point.");
698 case 4: muQual =
"HighPt";
break;
699 case 5: muQual =
"LowPt";
break;
700 case 6: muQual =
"LowPtMVA";
break;
701 case 7: muQual =
"HighPt3Layers";
break;
703 ATH_MSG_ERROR(
"Invalid muon working point provided: " <<
m_muId <<
". Cannot initialise!");
704 return StatusCode::FAILURE;
709 toolName =
"MuonSelectionTool_" + muQual;
717 }
else if (IdInt == 7){
727 toolName =
"MuonSelectionHighPtTool_" + muQual;
740 toolName =
"MuonLRTOverlapRemovalTool";
751 toolName =
"MuonEfficiencyScaleFactors_" + muQual;
761 toolName =
"MuonEfficiencyScaleFactorsBMHighPt_" + muQual;
771 ATH_MSG_WARNING(
"Requested TTVA SFs without d0sig and z0 cuts. Disabling scale factors as they will not make sense.");
776 toolName =
"MuonTTVAEfficiencyScaleFactors";
789 toolName =
"MuonIsolationScaleFactors_" +
m_muIso_WP;
795 <<
") does not have SFs defined. Will try to find an appropriate fall-back.");
800 <<
" is not supported, and does not have SFs available. Falling back to "
802 <<
" for SF determination.");
804 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! ***");
805 return StatusCode::FAILURE;
825 <<
") does not have SFs defined. Will try to find an appropriate fall-back.");
830 <<
" is not supported, and does not have SFs available. Falling back to "
831 << tmp_muIsoHighPt_WP
832 <<
" for SF determination.");
834 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! ***");
835 return StatusCode::FAILURE;
853 toolName =
"MuonTriggerScaleFactors_" + muQual;
855 if ( muQual==
"LowPt" ) {
856 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!");
877 toolName =
"EleSelLikelihood_" +
m_eleId;
879 if (
m_eleId.find(
"DNN") != std::string::npos) {
887 ATH_MSG_INFO(
"Overriding specified Ele.Id working point in favour of configuration file");
891 return StatusCode::FAILURE;
894 ATH_MSG_WARNING(
" ****************************************************************************");
896 ATH_MSG_WARNING(
" These may be used for loose electron CRs but no scale factors are provided.");
897 ATH_MSG_WARNING(
" ****************************************************************************");
919 ATH_MSG_INFO(
"Overriding specified EleBaseline.Id working point in favour of configuration file");
923 return StatusCode::FAILURE;
936 toolName =
"ElectronLRTOverlapRemovalTool";
953 return StatusCode::FAILURE;
967 return StatusCode::FAILURE;
1000 ATH_MSG_INFO(
"Running on Run2 samples; Using egamma SF tools from R21 map ");
1004 toolName =
"AsgElectronEfficiencyCorrectionTool_reco";
1015 std::string eleId = TString(
m_eleId).ReplaceAll(
"AndBLayer",
"BLayer").ReplaceAll(
"LLH",
"").Data();
1017 if (
m_eleId.find(
"DNN") != std::string::npos) {
1018 eleId = TString(eleId).ReplaceAll(
"DNNnoCF",
"").ReplaceAll(
"DNN",
"").ReplaceAll(
"Loose",
"LooseBLayer").Data();
1019 ATH_MSG_WARNING(
"Electron DNN ID working point " <<
m_eleId <<
" doesn't have SFs yet, fall back to " << eleId);
1023 toolName =
"AsgElectronEfficiencyCorrectionTool_id_" +
m_eleId;
1027 std::map<std::string,std::string> corrFNList;
1030 std::string
WP = WP_fname.substr(0,WP_fname.find(
":"));
1031 std::string
fname = WP_fname.substr(WP_fname.find(
":")+1);
1034 ATH_MSG_WARNING(
"Will use correction file rather than central map file." );
1039 std::string EleIso(
"");
1045 ATH_MSG_WARNING(
"(AsgElectronEfficiencyCorrectionTool_iso_*) Your selected electron Iso WP ("
1047 <<
") does not have iso SFs defined. Falling back to "
1049 <<
" for SF calculations");
1053 return StatusCode::FAILURE;
1056 toolName =
"AsgElectronEfficiencyCorrectionTool_iso_" +
m_eleId + EleIso;
1059 if ( (!
m_EG_corrFNList.empty()) && corrFNList.find(EleIso)!=corrFNList.end() ) {
1066 ATH_MSG_WARNING(
"(" << toolName <<
") Your electron Iso WP: " << EleIso<<
" is no longer supported. This will almost certainly cause a crash now.");
1078 if (!
isData() && ((EleIso.find(
"TightTrackOnly_VarRad")!=std::string::npos)||
1079 (EleIso.find(
"TightTrackOnly_FixedRad")!=std::string::npos)||
1080 (EleIso.find(
"Tight_VarRad")!=std::string::npos)||
1081 (EleIso.find(
"Loose_VarRad")!=std::string::npos))) {
1082 if (
isAtlfast())
ATH_MSG_WARNING(
"(AsgElectronEfficiencyCorrectionTool/"+toolName+
"). Your selected electron Iso WP (" + EleIso +
") don't have AFII SF. Falling back to FullSim");
1095 std::string EleIsohighPt(
"");
1101 ATH_MSG_WARNING(
"(AsgElectronEfficiencyCorrectionTool_iso_*) Your selected high-pT electron Iso WP ("
1103 <<
") does not have iso SFs defined. Falling back to "
1105 <<
" for SF calculations");
1109 return StatusCode::FAILURE;
1112 toolName =
"AsgElectronEfficiencyCorrectionTool_isoHigPt_" +
m_eleId + EleIsohighPt;
1115 if ( (!
m_EG_corrFNList.empty()) && corrFNList.find(EleIsohighPt)!=corrFNList.end() ) {
1123 ATH_MSG_WARNING(
"(" << toolName <<
") Your electron high-pt Iso WP: " << EleIsohighPt <<
" is no longer supported. This will almost certainly cause a crash now.");
1144 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);
1145 std::string triggerEleID =
m_isRun3? TString(eleId).ReplaceAll(
"LooseBLayer",
"Loose").Data() : eleId;
1151 bool pass_isRun3TrigSFFallback =
true;
1152 if (triggerEleID.find(
"Medium") != std::string::npos && triggerEleIso.find(
"Loose") != std::string::npos) {triggerEleID =
"Loose";}
1153 else if (triggerEleID.find(
"Medium") != std::string::npos && triggerEleIso.find(
"Tight") != std::string::npos) {triggerEleID =
"Tight"; triggerEleIso =
"Tight_VarRad";}
1154 else if (triggerEleID.find(
"Medium") != std::string::npos && triggerEleIso.find(
"HighPtCaloOnly") != std::string::npos) {triggerEleID =
"Tight"; triggerEleIso =
"Tight_VarRad";}
1155 else if (triggerEleID.find(
"Tight") != std::string::npos && triggerEleIso.find(
"Loose") != std::string::npos) {triggerEleID =
"Loose";}
1156 else if (triggerEleID.find(
"Tight") != std::string::npos && triggerEleIso.find(
"Tight") != std::string::npos) {triggerEleIso=
"Tight_VarRad";}
1157 else if (triggerEleID.find(
"Tight") != std::string::npos && triggerEleIso.find(
"HighPtCaloOnly") != std::string::npos) {triggerEleID =
"Tight"; triggerEleIso =
"Tight_VarRad";}
1158 else if (triggerEleID.find(
"Loose") != std::string::npos && triggerEleIso.find(
"Tight") != std::string::npos) {triggerEleID =
"Loose"; triggerEleIso =
"Loose_VarRad";}
1159 else if (triggerEleID.find(
"Loose") != std::string::npos && triggerEleIso.find(
"HighPtCaloOnly") != std::string::npos) {triggerEleID =
"Loose"; triggerEleIso =
"Loose_VarRad";}
1160 else {pass_isRun3TrigSFFallback=
false;}
1161 if(pass_isRun3TrigSFFallback){
1162 ATH_MSG_INFO(
" ************** This is only for testing/studying purpose! ************** ");
1163 ATH_MSG_INFO(
" ************** For official recommendation, please get in contact with the SUSY Bkg Forum ************** ");
1164 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' ");
1165 ATH_MSG_INFO(
"Only for single-lepton trigger scale factor, fall back to Electron ID: -> "<< triggerEleID <<
" with Isolation: " << triggerEleIso);
1177 ATH_MSG_WARNING(
"(AsgElectronEfficiencyCorrectionTool_trig_singleLep_*) Your selected electron Iso WP ("
1179 <<
") does not have trigger SFs defined. Falling back to "
1181 <<
" for SF calculations");
1185 return StatusCode::FAILURE;
1188 toolName =
"AsgElectronEfficiencyCorrectionTool_trig_singleLep_" + triggerEleID;
1204 toolName =
"AsgElectronEfficiencyCorrectionTool_trigEff_singleLep_" + triggerEleID;
1221 std::map<std::string,std::string> electronTriggerSFMapMixedLepton {
1223 {
"e24_lhmedium_L1EM20VH_OR_e60_lhmedium_OR_e120_lhloose,e26_lhtight_nod0_ivarloose_OR_e60_lhmedium_nod0_OR_e140_lhloose_nod0",
m_electronTriggerSFStringSingle},
1224 {
"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"},
1225 {
"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"},
1226 {
"e17_lhloose,e17_lhloose_nod0",
"MULTI_L_2015_e17_lhloose_2016_2018_e17_lhloose_nod0"},
1227 {
"e12_lhloose,e12_lhloose_nod0",
"MULTI_L_2015_e12_lhloose_2016_2018_e12_lhloose_nod0"},
1228 {
"e7_lhmedium,e7_lhmedium_nod0",
"MULTI_L_2015_e7_lhmedium_2016_2018_e7_lhmedium_nod0"},
1229 {
"e9_lhloose,e9_lhloose_nod0,e12_lhvloose_nod0_L1EM10VH",
"TRI_E_2015_e9_lhloose_2016_e9_lhloose_nod0_2017_2018_e12_lhvloose_nod0_L1EM10VH"}
1235 if (triglist_2017to2018.find(
"2e17_lhvloose_nod0_L12EM15VHI") != std::string::npos) {
1236 electronTriggerSFMapMixedLepton[
"e17_lhvloose_nod0_L1EM15VHI"] =
"DI_E_2015_e12_lhloose_L1EM10VH_2016_e17_lhvloose_nod0_2017_2018_e17_lhvloose_nod0_L1EM15VHI";
1239 std::string triggerMixedEleIso(
"");
1241 for(
auto const&
item : electronTriggerSFMapMixedLepton){
1248 ATH_MSG_WARNING(
"(AsgElectronEfficiencyCorrectionTool_trig_mixLep_*) Your selected electron Iso WP ("
1250 <<
") does not have trigger SFs defined. Falling back to "
1251 << triggerMixedEleIso
1252 <<
" for SF calculations");
1254 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! ***");
1255 return StatusCode::FAILURE;
1258 ATH_MSG_VERBOSE (
"Selected WP: " <<
item.second <<
"_" << eleId <<
"_" << triggerMixedEleIso);
1260 toolName =
"AsgElectronEfficiencyCorrectionTool_trig_mixLep_" + (
item.first).substr(0,8) +
m_eleId;
1264 ATH_CHECK( t_sf->setProperty(
"IdKey", eleId) );
1265 ATH_CHECK( t_sf->setProperty(
"IsoKey", triggerMixedEleIso) );
1270 ATH_CHECK( t_sf->setProperty(
"OutputLevel", this->msg().level()) );
1273 #ifndef XAOD_STANDALONE
1279 toolName =
"AsgElectronEfficiencyCorrectionTool_trigEff_mixLep_" + (
item.first).substr(0,8) +
m_eleId;
1282 ATH_CHECK( t_eff->setProperty(
"TriggerKey",
"Eff_"+
item.second) );
1283 ATH_CHECK( t_eff->setProperty(
"IdKey", eleId) );
1284 ATH_CHECK( t_eff->setProperty(
"IsoKey", triggerMixedEleIso) );
1289 ATH_CHECK( t_eff->setProperty(
"OutputLevel", this->msg().level()) );
1292 #ifndef XAOD_STANDALONE
1300 else ATH_MSG_WARNING(
"*** THE ELECTRON TRIGGER SF MIXED AND SF DILEP ARE CURRENTY NOT SUPPORTED IN RUN3 ***");
1302 ATH_MSG_WARNING(
"*** THE ELECTRON CHARGE FLIP SF ARE CURRENTY NOT SUPPORTED ***");
1346 photonIso_forTrigSF =
"TightCaloOnly";
1348 photonIso_forTrigSF = TString(
m_photonIso_WP).ReplaceAll(
"FixedCut",
"").Data();
1360 std::map<std::string,std::string> diphotonTriggerSFMapAsymmetric {
1362 {
"g25_loose,g25_medium_L1EM20VH",
"DI_PH_2015_g25_loose_2016_g25_loose_2017_g25_medium_L1EM20VH_2018_g25_medium_L1EM20VH"},
1363 {
"g35_loose,g35_medium_L1EM20VH",
"DI_PH_2015_g35_loose_2016_g35_loose_2017_g35_medium_L1EM20VH_2018_g35_medium_L1EM20VH"},
1366 for(
auto const&
item : diphotonTriggerSFMapAsymmetric){
1368 toolName =
"AsgPhotonEfficiencyCorrectionTool_trigSF_asymm_diphoton_" + (
item.first).substr(0,9) + photonIso_forTrigSF;
1370 ATH_CHECK( ph_trigSF->setProperty(
"MapFilePath",
"PhotonEfficiencyCorrection/2015_2018/rel21.2/Summer2020_Rec_v1/map1.txt") );
1371 ATH_CHECK( ph_trigSF->setProperty(
"IsoKey", photonIso_forTrigSF) );
1372 ATH_CHECK( ph_trigSF->setProperty(
"TriggerKey",
item.second) );
1373 ATH_CHECK( ph_trigSF->setProperty(
"ForceDataType", 1) );
1374 ATH_CHECK( ph_trigSF->setProperty(
"OutputLevel", this->msg().level()) );
1377 #ifndef XAOD_STANDALONE
1383 toolName =
"AsgPhotonEfficiencyCorrectionTool_trigEff_asymm_diphoton_" + (
item.first).substr(0,9) + photonIso_forTrigSF;
1385 ATH_CHECK( ph_trigEff->setProperty(
"MapFilePath",
"PhotonEfficiencyCorrection/2015_2018/rel21.2/Summer2020_Rec_v1/map1.txt") );
1386 ATH_CHECK( ph_trigEff->setProperty(
"IsoKey", photonIso_forTrigSF) );
1387 ATH_CHECK( ph_trigEff->setProperty(
"TriggerKey",
"Eff_"+
item.second) );
1388 ATH_CHECK( ph_trigEff->setProperty(
"ForceDataType", 1) );
1389 ATH_CHECK( ph_trigEff->setProperty(
"OutputLevel", this->msg().level()) );
1392 #ifndef XAOD_STANDALONE
1461 else if (
m_tauId ==
"rnn001")
inputfile =
"SUSYTools/tau_selection_rnn001.conf";
1462 else if (
m_tauId ==
"VeryLoose")
inputfile =
"SUSYTools/tau_selection_veryloose.conf";
1463 else if (
m_tauId ==
"Loose")
inputfile =
"SUSYTools/tau_selection_loose.conf";
1464 else if (
m_tauId ==
"Medium")
inputfile =
"SUSYTools/tau_selection_medium.conf";
1465 else if (
m_tauId ==
"Tight")
inputfile =
"SUSYTools/tau_selection_tight.conf";
1468 return StatusCode::FAILURE;
1474 return StatusCode::FAILURE;
1483 toolName =
"TauSelectionTool_" +
m_tauId;
1501 return StatusCode::FAILURE;
1516 toolName =
"TauEffTool_" +
m_tauId;
1520 std::vector<int> correction_types;
1523 ANA_MSG_DEBUG(
"Found JetIDWP in tau config file : " << jetIDWP );
1531 ATH_MSG_ERROR(
"Invalid Tau ID in tau config file " << jetIDWP);
1532 return StatusCode::FAILURE;
1535 correction_types.insert(correction_types.end(), {TauAnalysisTools::EfficiencyCorrectionType::SFRecoHadTau,
1536 TauAnalysisTools::EfficiencyCorrectionType::SFJetIDHadTau});
1540 ANA_MSG_DEBUG(
"Found EleIDWP in tau config file : " << eleIDWP );
1541 int ele_id_lvl = -1;
1546 ATH_MSG_INFO(
"No or invalid Ele OR in tau config file " << eleIDWP <<
" will not apply SFs for electro veto" );
1549 if (ele_id_lvl != -1 )
1550 correction_types.insert(correction_types.end(), {TauAnalysisTools::EfficiencyCorrectionType::SFEleIDHadTau,
1551 TauAnalysisTools::EfficiencyCorrectionType::SFEleIDElectron});
1574 return StatusCode::FAILURE;
1579 {
"HLT_tau25_medium1_tracktwo",
"HLT_tau25_medium1_tracktwo"},
1580 {
"HLT_tau35_medium1_tracktwo",
"HLT_tau35_medium1_tracktwo"},
1581 {
"HLT_tau50L1TAU12_medium1_tracktwo",
"HLT_tau50_medium1_tracktwo_L1TAU12"},
1582 {
"HLT_tau60_medium1_tracktwo",
"HLT_tau60_medium1_tracktwo"},
1583 {
"HLT_tau80L1TAU60_medium1_tracktwo",
"HLT_tau80_medium1_tracktwo_L1TAU60"},
1584 {
"HLT_tau125_medium1_tracktwo",
"HLT_tau125_medium1_tracktwo"},
1585 {
"HLT_tau160_medium1_tracktwo",
"HLT_tau160_medium1_tracktwo"},
1586 {
"HLT_tau160L1TAU100_medium1_tracktwo",
"HLT_tau160_medium1_tracktwo_L1TAU100"},
1588 {
"HLT_tau25_medium1_tracktwoEF",
"HLT_tau25_medium1_tracktwoEF"},
1589 {
"HLT_tau35L1TAU12IM_medium1_tracktwoEF",
"HLT_tau35_medium1_tracktwoEF_L1TAU12IM"},
1590 {
"HLT_tau35_medium1_tracktwoEF",
"HLT_tau35_medium1_tracktwoEF"},
1591 {
"HLT_tau60_medium1_tracktwoEF",
"HLT_tau60_medium1_tracktwoEF"},
1592 {
"HLT_tau80L1TAU60_medium1_tracktwoEF",
"HLT_tau80_medium1_tracktwoEF_L1TAU60"},
1593 {
"HLT_tau160L1TAU100_medium1_tracktwoEF",
"HLT_tau160_medium1_tracktwoEF_L1TAU100"},
1595 {
"HLT_tau25_medium1_tracktwoEF_OR_mediumRNN_tracktwoMVA",
"HLT_tau25_medium1_tracktwoEF,HLT_tau25_mediumRNN_tracktwoMVA"},
1596 {
"HLT_tau35L1TAU12IM_medium1_tracktwoEF_OR_mediumRNN_tracktwoMVA",
"HLT_tau35_medium1_tracktwoEF_L1TAU12IM,HLT_tau35_mediumRNN_tracktwoMVA_L1TAU12IM"},
1597 {
"HLT_tau35_medium1_tracktwoEF_OR_mediumRNN_tracktwoMVA",
"HLT_tau35_medium1_tracktwoEF,HLT_tau35_mediumRNN_tracktwoMVA"},
1598 {
"HLT_tau60_medium1_tracktwoEF_OR_mediumRNN_tracktwoMVA",
"HLT_tau60_medium1_tracktwoEF,HLT_tau60_mediumRNN_tracktwoMVA"},
1599 {
"HLT_tau80L1TAU60_medium1_tracktwoEF_OR_mediumRNN_tracktwoMVA",
"HLT_tau80_medium1_tracktwoEF_L1TAU60,HLT_tau80_mediumRNN_tracktwoMVA_L1TAU60"},
1600 {
"HLT_tau160L1TAU100_medium1_tracktwoEF_OR_mediumRNN_tracktwoMVA",
"HLT_tau160_medium1_tracktwoEF_L1TAU100,HLT_tau160_mediumRNN_tracktwoMVA_L1TAU100"}
1604 toolName =
"TauTrigEffTool_" +
m_tauId +
"_" + trigger.first;
1606 ATH_CHECK( tau_trigSF->setProperty(
"EfficiencyCorrectionTypes", std::vector<int>({TauAnalysisTools::SFTriggerHadTau})) );
1607 ATH_CHECK( tau_trigSF->setProperty(
"TriggerName", trigger.first) );
1608 ATH_CHECK( tau_trigSF->setProperty(
"JetIDLevel", iTauID) );
1610 ATH_CHECK( tau_trigSF->setProperty(
"OutputLevel", this->msg().level()) );
1651 std::string jetcollBTag =
jetcoll;
1652 if (
jetcoll ==
"AntiKt4LCTopoJets") {
1653 ATH_MSG_WARNING(
" *** HACK *** Treating LCTopoJets jets as EMTopo -- use at your own risk!");
1654 jetcollBTag =
"AntiKt4EMTopoJets";
1661 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"));
1665 if (jetcollBTag.find(
"AntiKt4EMTopoJets") == std::string::npos && jetcollBTag.find(
"AntiKt4EMPFlowJets")==std::string::npos) {
1666 ATH_MSG_WARNING(
"** Only AntiKt4EMTopoJets and AntiKt4EMPFlowJets are supported with FTAG scale factors!");
1667 return StatusCode::FAILURE;
1684 if (
jetcoll !=
"AntiKt4EMTopoJets" &&
jetcoll !=
"AntiKt4EMPFlowJets") {
1685 ATH_MSG_WARNING(
"** Only AntiKt4EMTopoJets and AntiKt4EMPFlowJets are supported with FTAG scale factors!");
1686 return StatusCode::FAILURE;
1689 toolName =
"BTagSelOR_" + jetcollBTag +
m_orBtagWP;
1702 const std::string& BTagColl_TrkJet = trkjetcoll;
1706 ATH_MSG_INFO(
"TrackJet collection set to None: disabling btagging for TrackJets.");
1710 if (trkjetcoll.find(
"AntiKt2PV0TrackJets")==std::string::npos && trkjetcoll.find(
"AntiKtVR30Rmax4Rmin02TrackJets")==std::string::npos) {
1711 ATH_MSG_WARNING(
"** Only AntiKt2PV0TrackJets and AntiKtVR30Rmax4Rmin02TrackJets are supported with FTAG scale factors!");
1712 return StatusCode::FAILURE;
1731 std::string MCshowerID;
1733 MCshowerID=
"default";
1744 MCshowerID=
"default";
1751 if (
jetcoll !=
"AntiKt4EMTopoJets" &&
jetcoll !=
"AntiKt4EMPFlowJets") {
1752 ATH_MSG_WARNING(
"** Only AntiKt4EMTopoJets and AntiKt4EMPFlowJets are supported with FTAG scale factors!");
1753 return StatusCode::FAILURE;
1775 if (trkjetcoll.find(
"AntiKt2PV0TrackJets")==std::string::npos && trkjetcoll.find(
"AntiKtVR30Rmax4Rmin02TrackJets")==std::string::npos) {
1776 ATH_MSG_WARNING(
"** Only AntiKt2PV0TrackJets and AntiKtVR30Rmax4Rmin02TrackJets are supported with FTAG scale factors!");
1777 return StatusCode::FAILURE;
1780 toolName =
"BTagSF_" + trkjetcoll;
1833 ATH_MSG_ERROR(
"Can only have CST *or* TST configured for MET maker. Please unset either METDoCaloSyst or METDoTrkSyst in your config file" );
1834 return StatusCode::FAILURE;
1859 #ifndef XAOD_STANDALONE // Athena and AthAnalysis; need to take into account that MuonCalibTool is private tool
1864 if(jetname ==
"AntiKt4EMTopo" || jetname ==
"AntiKt4EMPFlow"){
1867 ATH_MSG_WARNING(
"Object-based METSignificance recommendations only exist for EMTopo and PFlow, falling back to AntiKt4EMTopo");
1878 if (IdBaselineInt == 4)
1882 #else // AnalysisBase; can just pass the muon calib tool configured above
1887 if(jetname ==
"AntiKt4EMTopo" || jetname ==
"AntiKt4EMPFlow"){
1890 ATH_MSG_WARNING(
"Object-based METSignificance recommendations only exist for EMTopo and PFlow, falling back to AntiKt4EMTopo");
1916 #ifndef XAOD_STANDALONE // Athena and AthAnalysis
1919 #else // AnalysisBase
1963 std::string no2e17(
"");
1973 ATH_MSG_DEBUG(
"TrigGlobalEfficiencyCorrectionTool/TrigGlobal_diLep: no2e17 trigger string: " << no2e17 );
1975 std::map<std::string,std::string> triggers_diLep;
1979 triggers_diLep[
"326834-328393"] = no2e17;
1998 std::string no2e17(
"");
2008 ATH_MSG_DEBUG(
"TrigGlobalEfficiencyCorrectionTool/TrigGlobal_multiLep: no2e17 trigger string: " << no2e17 );
2010 std::map<std::string,std::string> triggers_multiLep;
2014 triggers_multiLep[
"326834-328393"] = no2e17;
2114 #ifndef XAOD_ANALYSIS
2131 std::string toolName =
"ORTool" +
suffix;
2132 ATH_MSG_INFO(
"SUSYTools: Autoconfiguring " << toolName);
2275 return StatusCode::SUCCESS;