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 );
372 if(jetdef !=
"AntiKt4EMPFlow"){
373 ATH_MSG_WARNING(
"Jet Uncertaintes recommendations only exist for PFlow jets, falling back to AntiKt4EMPFlow");
374 jetdef =
"AntiKt4EMPFlow";
376 toolName =
"JetUncertaintiesTool_" + jetdef;
379 ATH_MSG_WARNING(
"Jet Uncertaintes pre-recommendations for Run3 only exist for full sim");
394 ATH_MSG_INFO(
"Set up Jet PD Smear Uncertainty tool...");
399 if(jetdef !=
"AntiKt4EMPFlow"){
400 ATH_MSG_WARNING(
"Jet Uncertaintes recommendations only exist for PFlow jets, falling back to AntiKt4EMPFlow");
401 jetdef =
"AntiKt4EMPFlow";
403 toolName =
"JetUncertaintiesPDSmearTool_" + jetdef;
410 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.");
411 return StatusCode::FAILURE;
421 ATH_MSG_DEBUG(
"Do not retrieve the jet PD Smearing tool if it is not configured");
427 ATH_MSG_INFO(
"Won't initialise jet uncertainty tool for fat jets until we get rec for UFO");
464 ATH_MSG_INFO(
" Won't initialise Wtagger uncertainty tool for fat jets until we get rec for UFO");
479 ATH_MSG_INFO(
" Won't initialise Ztagger uncertainty tool for fat jets until we get rec for UFO");
494 ATH_MSG_INFO(
" Won't initialise top-tagger uncertainty tool for fat jets until we get rec for UFO");
522 toolName =
"JetCleaningTool";
534 toolName =
"PileupLabelingTool";
538 #ifndef XAOD_STANDALONE
550 toolName =
"JvtMomentTool";
553 #ifndef XAOD_STANDALONE
566 toolName =
"NNJvtMomentTool";
569 #ifndef XAOD_STANDALONE
581 toolName =
"NNJvtSelectionTool";
595 toolName =
"NNJvtEfficiencyTool";
609 toolName =
"fJvtSelectionTool";
623 toolName =
"fJvtEfficiencyTool";
639 std::string muQualBaseline =
"";
642 ATH_MSG_WARNING(
"No muon scale factors are available for VeryLoose working point.");
647 case 4: muQualBaseline =
"HighPt";
break;
648 case 5: muQualBaseline =
"LowPt";
break;
649 case 6: muQualBaseline =
"LowPtMVA";
break;
650 case 7: muQualBaseline =
"HighPt3Layers";
break;
653 return StatusCode::FAILURE;
670 if (IdBaselineInt == 4) {
681 toolName =
"MuonSelectionTool_Baseline_" + muQualBaseline;
687 ") that is tighter than the signal cut (" <<
m_muEta <<
"). Please check your config." );
688 return StatusCode::FAILURE;
692 if (IdBaselineInt == 6){
695 }
else if (IdBaselineInt == 7){
704 std::string muQual =
"";
707 ATH_MSG_WARNING(
"No muon scale factors are available for VeryLoose working point.");
712 case 4: muQual =
"HighPt";
break;
713 case 5: muQual =
"LowPt";
break;
714 case 6: muQual =
"LowPtMVA";
break;
715 case 7: muQual =
"HighPt3Layers";
break;
717 ATH_MSG_ERROR(
"Invalid muon working point provided: " <<
m_muId <<
". Cannot initialise!");
718 return StatusCode::FAILURE;
723 toolName =
"MuonSelectionTool_" + muQual;
731 }
else if (IdInt == 7){
741 toolName =
"MuonSelectionHighPtTool_" + muQual;
754 toolName =
"MuonLRTOverlapRemovalTool";
765 toolName =
"MuonEfficiencyScaleFactors_" + muQual;
775 toolName =
"MuonEfficiencyScaleFactorsBMHighPt_" + muQual;
785 ATH_MSG_WARNING(
"Requested TTVA SFs without d0sig and z0 cuts. Disabling scale factors as they will not make sense.");
790 toolName =
"MuonTTVAEfficiencyScaleFactors";
803 toolName =
"MuonIsolationScaleFactors_" +
m_muIso_WP;
809 <<
") does not have SFs defined. Will try to find an appropriate fall-back.");
814 <<
" is not supported, and does not have SFs available. Falling back to "
816 <<
" for SF determination.");
818 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! ***");
819 return StatusCode::FAILURE;
839 <<
") does not have SFs defined. Will try to find an appropriate fall-back.");
844 <<
" is not supported, and does not have SFs available. Falling back to "
845 << tmp_muIsoHighPt_WP
846 <<
" for SF determination.");
848 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! ***");
849 return StatusCode::FAILURE;
867 toolName =
"MuonTriggerScaleFactors_" + muQual;
869 if ( muQual==
"LowPt" ) {
870 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!");
891 toolName =
"EleSelLikelihood_" +
m_eleId;
893 if (
m_eleId.find(
"DNN") != std::string::npos) {
901 ATH_MSG_INFO(
"Overriding specified Ele.Id working point in favour of configuration file");
905 return StatusCode::FAILURE;
908 ATH_MSG_WARNING(
" ****************************************************************************");
910 ATH_MSG_WARNING(
" These may be used for loose electron CRs but no scale factors are provided.");
911 ATH_MSG_WARNING(
" ****************************************************************************");
933 ATH_MSG_INFO(
"Overriding specified EleBaseline.Id working point in favour of configuration file");
937 return StatusCode::FAILURE;
950 toolName =
"ElectronLRTOverlapRemovalTool";
967 return StatusCode::FAILURE;
981 return StatusCode::FAILURE;
1014 ATH_MSG_INFO(
"Running on Run2 samples; Using egamma SF tools from R21 map ");
1018 toolName =
"AsgElectronEfficiencyCorrectionTool_reco";
1029 std::string eleId = TString(
m_eleId).ReplaceAll(
"AndBLayer",
"BLayer").ReplaceAll(
"LLH",
"").Data();
1031 if (
m_eleId.find(
"DNN") != std::string::npos) {
1032 eleId = TString(eleId).ReplaceAll(
"DNNnoCF",
"").ReplaceAll(
"DNN",
"").ReplaceAll(
"Loose",
"LooseBLayer").Data();
1033 ATH_MSG_WARNING(
"Electron DNN ID working point " <<
m_eleId <<
" doesn't have SFs yet, fall back to " << eleId);
1037 toolName =
"AsgElectronEfficiencyCorrectionTool_id_" +
m_eleId;
1041 std::map<std::string,std::string> corrFNList;
1044 std::string
WP = WP_fname.substr(0,WP_fname.find(
":"));
1045 std::string
fname = WP_fname.substr(WP_fname.find(
":")+1);
1048 ATH_MSG_WARNING(
"Will use correction file rather than central map file." );
1053 std::string EleIso(
"");
1059 ATH_MSG_WARNING(
"(AsgElectronEfficiencyCorrectionTool_iso_*) Your selected electron Iso WP ("
1061 <<
") does not have iso SFs defined. Falling back to "
1063 <<
" for SF calculations");
1067 return StatusCode::FAILURE;
1070 toolName =
"AsgElectronEfficiencyCorrectionTool_iso_" +
m_eleId + EleIso;
1073 if ( (!
m_EG_corrFNList.empty()) && corrFNList.find(EleIso)!=corrFNList.end() ) {
1080 ATH_MSG_WARNING(
"(" << toolName <<
") Your electron Iso WP: " << EleIso<<
" is no longer supported. This will almost certainly cause a crash now.");
1092 if (!
isData() && ((EleIso.find(
"TightTrackOnly_VarRad")!=std::string::npos)||
1093 (EleIso.find(
"TightTrackOnly_FixedRad")!=std::string::npos)||
1094 (EleIso.find(
"Tight_VarRad")!=std::string::npos)||
1095 (EleIso.find(
"Loose_VarRad")!=std::string::npos))) {
1096 if (
isAtlfast())
ATH_MSG_WARNING(
"(AsgElectronEfficiencyCorrectionTool/"+toolName+
"). Your selected electron Iso WP (" + EleIso +
") don't have AFII SF. Falling back to FullSim");
1109 std::string EleIsohighPt(
"");
1115 ATH_MSG_WARNING(
"(AsgElectronEfficiencyCorrectionTool_iso_*) Your selected high-pT electron Iso WP ("
1117 <<
") does not have iso SFs defined. Falling back to "
1119 <<
" for SF calculations");
1123 return StatusCode::FAILURE;
1126 toolName =
"AsgElectronEfficiencyCorrectionTool_isoHigPt_" +
m_eleId + EleIsohighPt;
1129 if ( (!
m_EG_corrFNList.empty()) && corrFNList.find(EleIsohighPt)!=corrFNList.end() ) {
1137 ATH_MSG_WARNING(
"(" << toolName <<
") Your electron high-pt Iso WP: " << EleIsohighPt <<
" is no longer supported. This will almost certainly cause a crash now.");
1158 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);
1159 std::string triggerEleID =
m_isRun3? TString(eleId).ReplaceAll(
"LooseBLayer",
"Loose").Data() : eleId;
1165 bool pass_isRun3TrigSFFallback =
true;
1166 if (triggerEleID.find(
"Medium") != std::string::npos && triggerEleIso.find(
"Loose") != std::string::npos) {triggerEleID =
"Loose";}
1167 else if (triggerEleID.find(
"Medium") != std::string::npos && triggerEleIso.find(
"Tight") != std::string::npos) {triggerEleID =
"Tight"; triggerEleIso =
"Tight_VarRad";}
1168 else if (triggerEleID.find(
"Medium") != std::string::npos && triggerEleIso.find(
"HighPtCaloOnly") != std::string::npos) {triggerEleID =
"Tight"; triggerEleIso =
"Tight_VarRad";}
1169 else if (triggerEleID.find(
"Tight") != std::string::npos && triggerEleIso.find(
"Loose") != std::string::npos) {triggerEleID =
"Loose";}
1170 else if (triggerEleID.find(
"Tight") != std::string::npos && triggerEleIso.find(
"Tight") != std::string::npos) {triggerEleIso=
"Tight_VarRad";}
1171 else if (triggerEleID.find(
"Tight") != std::string::npos && triggerEleIso.find(
"HighPtCaloOnly") != std::string::npos) {triggerEleID =
"Tight"; triggerEleIso =
"Tight_VarRad";}
1172 else if (triggerEleID.find(
"Loose") != std::string::npos && triggerEleIso.find(
"Tight") != std::string::npos) {triggerEleID =
"Loose"; triggerEleIso =
"Loose_VarRad";}
1173 else if (triggerEleID.find(
"Loose") != std::string::npos && triggerEleIso.find(
"HighPtCaloOnly") != std::string::npos) {triggerEleID =
"Loose"; triggerEleIso =
"Loose_VarRad";}
1174 else {pass_isRun3TrigSFFallback=
false;}
1175 if(pass_isRun3TrigSFFallback){
1176 ATH_MSG_INFO(
" ************** This is only for testing/studying purpose! ************** ");
1177 ATH_MSG_INFO(
" ************** For official recommendation, please get in contact with the SUSY Bkg Forum ************** ");
1178 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' ");
1179 ATH_MSG_INFO(
"Only for single-lepton trigger scale factor, fall back to Electron ID: -> "<< triggerEleID <<
" with Isolation: " << triggerEleIso);
1191 ATH_MSG_WARNING(
"(AsgElectronEfficiencyCorrectionTool_trig_singleLep_*) Your selected electron Iso WP ("
1193 <<
") does not have trigger SFs defined. Falling back to "
1195 <<
" for SF calculations");
1199 return StatusCode::FAILURE;
1202 toolName =
"AsgElectronEfficiencyCorrectionTool_trig_singleLep_" + triggerEleID;
1218 toolName =
"AsgElectronEfficiencyCorrectionTool_trigEff_singleLep_" + triggerEleID;
1235 std::map<std::string,std::string> electronTriggerSFMapMixedLepton {
1237 {
"e24_lhmedium_L1EM20VH_OR_e60_lhmedium_OR_e120_lhloose,e26_lhtight_nod0_ivarloose_OR_e60_lhmedium_nod0_OR_e140_lhloose_nod0",
m_electronTriggerSFStringSingle},
1238 {
"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"},
1239 {
"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"},
1240 {
"e17_lhloose,e17_lhloose_nod0",
"MULTI_L_2015_e17_lhloose_2016_2018_e17_lhloose_nod0"},
1241 {
"e12_lhloose,e12_lhloose_nod0",
"MULTI_L_2015_e12_lhloose_2016_2018_e12_lhloose_nod0"},
1242 {
"e7_lhmedium,e7_lhmedium_nod0",
"MULTI_L_2015_e7_lhmedium_2016_2018_e7_lhmedium_nod0"},
1243 {
"e9_lhloose,e9_lhloose_nod0,e12_lhvloose_nod0_L1EM10VH",
"TRI_E_2015_e9_lhloose_2016_e9_lhloose_nod0_2017_2018_e12_lhvloose_nod0_L1EM10VH"}
1249 if (triglist_2017to2018.find(
"2e17_lhvloose_nod0_L12EM15VHI") != std::string::npos) {
1250 electronTriggerSFMapMixedLepton[
"e17_lhvloose_nod0_L1EM15VHI"] =
"DI_E_2015_e12_lhloose_L1EM10VH_2016_e17_lhvloose_nod0_2017_2018_e17_lhvloose_nod0_L1EM15VHI";
1253 std::string triggerMixedEleIso(
"");
1255 for(
auto const&
item : electronTriggerSFMapMixedLepton){
1262 ATH_MSG_WARNING(
"(AsgElectronEfficiencyCorrectionTool_trig_mixLep_*) Your selected electron Iso WP ("
1264 <<
") does not have trigger SFs defined. Falling back to "
1265 << triggerMixedEleIso
1266 <<
" for SF calculations");
1268 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! ***");
1269 return StatusCode::FAILURE;
1272 ATH_MSG_VERBOSE (
"Selected WP: " <<
item.second <<
"_" << eleId <<
"_" << triggerMixedEleIso);
1274 toolName =
"AsgElectronEfficiencyCorrectionTool_trig_mixLep_" + (
item.first).substr(0,8) +
m_eleId;
1278 ATH_CHECK( t_sf->setProperty(
"IdKey", eleId) );
1279 ATH_CHECK( t_sf->setProperty(
"IsoKey", triggerMixedEleIso) );
1284 ATH_CHECK( t_sf->setProperty(
"OutputLevel", this->msg().level()) );
1287 #ifndef XAOD_STANDALONE
1293 toolName =
"AsgElectronEfficiencyCorrectionTool_trigEff_mixLep_" + (
item.first).substr(0,8) +
m_eleId;
1296 ATH_CHECK( t_eff->setProperty(
"TriggerKey",
"Eff_"+
item.second) );
1297 ATH_CHECK( t_eff->setProperty(
"IdKey", eleId) );
1298 ATH_CHECK( t_eff->setProperty(
"IsoKey", triggerMixedEleIso) );
1303 ATH_CHECK( t_eff->setProperty(
"OutputLevel", this->msg().level()) );
1306 #ifndef XAOD_STANDALONE
1314 else ATH_MSG_WARNING(
"*** THE ELECTRON TRIGGER SF MIXED AND SF DILEP ARE CURRENTY NOT SUPPORTED IN RUN3 ***");
1316 ATH_MSG_WARNING(
"*** THE ELECTRON CHARGE FLIP SF ARE CURRENTY NOT SUPPORTED ***");
1360 photonIso_forTrigSF =
"TightCaloOnly";
1362 photonIso_forTrigSF = TString(
m_photonIso_WP).ReplaceAll(
"FixedCut",
"").Data();
1374 std::map<std::string,std::string> diphotonTriggerSFMapAsymmetric {
1376 {
"g25_loose,g25_medium_L1EM20VH",
"DI_PH_2015_g25_loose_2016_g25_loose_2017_g25_medium_L1EM20VH_2018_g25_medium_L1EM20VH"},
1377 {
"g35_loose,g35_medium_L1EM20VH",
"DI_PH_2015_g35_loose_2016_g35_loose_2017_g35_medium_L1EM20VH_2018_g35_medium_L1EM20VH"},
1380 for(
auto const&
item : diphotonTriggerSFMapAsymmetric){
1382 toolName =
"AsgPhotonEfficiencyCorrectionTool_trigSF_asymm_diphoton_" + (
item.first).substr(0,9) + photonIso_forTrigSF;
1384 ATH_CHECK( ph_trigSF->setProperty(
"MapFilePath",
"PhotonEfficiencyCorrection/2015_2018/rel21.2/Summer2020_Rec_v1/map3.txt") );
1385 ATH_CHECK( ph_trigSF->setProperty(
"IsoKey", photonIso_forTrigSF) );
1386 ATH_CHECK( ph_trigSF->setProperty(
"TriggerKey",
item.second) );
1387 ATH_CHECK( ph_trigSF->setProperty(
"ForceDataType", 1) );
1388 ATH_CHECK( ph_trigSF->setProperty(
"OutputLevel", this->msg().level()) );
1391 #ifndef XAOD_STANDALONE
1397 toolName =
"AsgPhotonEfficiencyCorrectionTool_trigEff_asymm_diphoton_" + (
item.first).substr(0,9) + photonIso_forTrigSF;
1399 ATH_CHECK( ph_trigEff->setProperty(
"MapFilePath",
"PhotonEfficiencyCorrection/2015_2018/rel21.2/Summer2020_Rec_v1/map3.txt") );
1400 ATH_CHECK( ph_trigEff->setProperty(
"IsoKey", photonIso_forTrigSF) );
1401 ATH_CHECK( ph_trigEff->setProperty(
"TriggerKey",
"Eff_"+
item.second) );
1402 ATH_CHECK( ph_trigEff->setProperty(
"ForceDataType", 1) );
1403 ATH_CHECK( ph_trigEff->setProperty(
"OutputLevel", this->msg().level()) );
1406 #ifndef XAOD_STANDALONE
1462 ATH_MSG_WARNING(
"Forcing EgcalibTool to use calibrations for full simulation" );
1483 else if (
m_tauId ==
"rnn001")
inputfile =
"SUSYTools/tau_selection_rnn001.conf";
1484 else if (
m_tauId ==
"VeryLoose")
inputfile =
"SUSYTools/tau_selection_veryloose.conf";
1485 else if (
m_tauId ==
"Loose")
inputfile =
"SUSYTools/tau_selection_loose.conf";
1486 else if (
m_tauId ==
"Medium")
inputfile =
"SUSYTools/tau_selection_medium.conf";
1487 else if (
m_tauId ==
"Tight")
inputfile =
"SUSYTools/tau_selection_tight.conf";
1490 return StatusCode::FAILURE;
1496 return StatusCode::FAILURE;
1505 toolName =
"TauSelectionTool_" +
m_tauId;
1523 return StatusCode::FAILURE;
1538 toolName =
"TauEffTool_" +
m_tauId;
1542 std::vector<int> correction_types;
1545 ANA_MSG_DEBUG(
"Found JetIDWP in tau config file : " << jetIDWP );
1553 ATH_MSG_ERROR(
"Invalid Tau ID in tau config file " << jetIDWP);
1554 return StatusCode::FAILURE;
1557 correction_types.insert(correction_types.end(), {TauAnalysisTools::EfficiencyCorrectionType::SFRecoHadTau,
1558 TauAnalysisTools::EfficiencyCorrectionType::SFJetIDHadTau});
1562 ANA_MSG_DEBUG(
"Found EleIDWP in tau config file : " << eleIDWP );
1563 int ele_id_lvl = -1;
1568 ATH_MSG_INFO(
"No or invalid Ele OR in tau config file " << eleIDWP <<
" will not apply SFs for electro veto" );
1571 if (ele_id_lvl != -1 )
1572 correction_types.insert(correction_types.end(), {TauAnalysisTools::EfficiencyCorrectionType::SFEleIDHadTau,
1573 TauAnalysisTools::EfficiencyCorrectionType::SFEleIDElectron});
1596 return StatusCode::FAILURE;
1601 {
"HLT_tau25_medium1_tracktwo",
"HLT_tau25_medium1_tracktwo"},
1602 {
"HLT_tau35_medium1_tracktwo",
"HLT_tau35_medium1_tracktwo"},
1603 {
"HLT_tau50L1TAU12_medium1_tracktwo",
"HLT_tau50_medium1_tracktwo_L1TAU12"},
1604 {
"HLT_tau60_medium1_tracktwo",
"HLT_tau60_medium1_tracktwo"},
1605 {
"HLT_tau80L1TAU60_medium1_tracktwo",
"HLT_tau80_medium1_tracktwo_L1TAU60"},
1606 {
"HLT_tau125_medium1_tracktwo",
"HLT_tau125_medium1_tracktwo"},
1607 {
"HLT_tau160_medium1_tracktwo",
"HLT_tau160_medium1_tracktwo"},
1608 {
"HLT_tau160L1TAU100_medium1_tracktwo",
"HLT_tau160_medium1_tracktwo_L1TAU100"},
1610 {
"HLT_tau25_medium1_tracktwoEF",
"HLT_tau25_medium1_tracktwoEF"},
1611 {
"HLT_tau35L1TAU12IM_medium1_tracktwoEF",
"HLT_tau35_medium1_tracktwoEF_L1TAU12IM"},
1612 {
"HLT_tau35_medium1_tracktwoEF",
"HLT_tau35_medium1_tracktwoEF"},
1613 {
"HLT_tau60_medium1_tracktwoEF",
"HLT_tau60_medium1_tracktwoEF"},
1614 {
"HLT_tau80L1TAU60_medium1_tracktwoEF",
"HLT_tau80_medium1_tracktwoEF_L1TAU60"},
1615 {
"HLT_tau160L1TAU100_medium1_tracktwoEF",
"HLT_tau160_medium1_tracktwoEF_L1TAU100"},
1617 {
"HLT_tau25_medium1_tracktwoEF_OR_mediumRNN_tracktwoMVA",
"HLT_tau25_medium1_tracktwoEF,HLT_tau25_mediumRNN_tracktwoMVA"},
1618 {
"HLT_tau35L1TAU12IM_medium1_tracktwoEF_OR_mediumRNN_tracktwoMVA",
"HLT_tau35_medium1_tracktwoEF_L1TAU12IM,HLT_tau35_mediumRNN_tracktwoMVA_L1TAU12IM"},
1619 {
"HLT_tau35_medium1_tracktwoEF_OR_mediumRNN_tracktwoMVA",
"HLT_tau35_medium1_tracktwoEF,HLT_tau35_mediumRNN_tracktwoMVA"},
1620 {
"HLT_tau60_medium1_tracktwoEF_OR_mediumRNN_tracktwoMVA",
"HLT_tau60_medium1_tracktwoEF,HLT_tau60_mediumRNN_tracktwoMVA"},
1621 {
"HLT_tau80L1TAU60_medium1_tracktwoEF_OR_mediumRNN_tracktwoMVA",
"HLT_tau80_medium1_tracktwoEF_L1TAU60,HLT_tau80_mediumRNN_tracktwoMVA_L1TAU60"},
1622 {
"HLT_tau160L1TAU100_medium1_tracktwoEF_OR_mediumRNN_tracktwoMVA",
"HLT_tau160_medium1_tracktwoEF_L1TAU100,HLT_tau160_mediumRNN_tracktwoMVA_L1TAU100"}
1626 toolName =
"TauTrigEffTool_" +
m_tauId +
"_" + trigger.first;
1628 ATH_CHECK( tau_trigSF->setProperty(
"EfficiencyCorrectionTypes", std::vector<int>({TauAnalysisTools::SFTriggerHadTau})) );
1629 ATH_CHECK( tau_trigSF->setProperty(
"TriggerName", trigger.first) );
1630 ATH_CHECK( tau_trigSF->setProperty(
"JetIDLevel", iTauID) );
1632 ATH_CHECK( tau_trigSF->setProperty(
"OutputLevel", this->msg().level()) );
1673 std::string jetcollBTag =
jetcoll;
1674 if (
jetcoll ==
"AntiKt4LCTopoJets") {
1675 ATH_MSG_WARNING(
" *** HACK *** Treating LCTopoJets jets as EMTopo -- use at your own risk!");
1676 jetcollBTag =
"AntiKt4EMTopoJets";
1682 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"));
1686 if (jetcollBTag.find(
"AntiKt4EMTopoJets") == std::string::npos && jetcollBTag.find(
"AntiKt4EMPFlowJets")==std::string::npos) {
1687 ATH_MSG_WARNING(
"** Only AntiKt4EMTopoJets and AntiKt4EMPFlowJets are supported with FTAG scale factors!");
1688 return StatusCode::FAILURE;
1705 if (
jetcoll !=
"AntiKt4EMTopoJets" &&
jetcoll !=
"AntiKt4EMPFlowJets") {
1706 ATH_MSG_WARNING(
"** Only AntiKt4EMTopoJets and AntiKt4EMPFlowJets are supported with FTAG scale factors!");
1707 return StatusCode::FAILURE;
1710 toolName =
"BTagSelOR_" + jetcollBTag +
m_orBtagWP;
1723 const std::string& BTagColl_TrkJet = trkjetcoll;
1727 ATH_MSG_INFO(
"TrackJet collection set to None: disabling btagging for TrackJets.");
1731 if (trkjetcoll.find(
"AntiKt2PV0TrackJets")==std::string::npos && trkjetcoll.find(
"AntiKtVR30Rmax4Rmin02TrackJets")==std::string::npos) {
1732 ATH_MSG_WARNING(
"** Only AntiKt2PV0TrackJets and AntiKtVR30Rmax4Rmin02TrackJets are supported with FTAG scale factors!");
1733 return StatusCode::FAILURE;
1752 std::string MCshowerID;
1754 ATH_MSG_ERROR(
"Error! m_showerType=-1, which is an error case for FTAG MC/MC SFs." );
1755 return StatusCode::FAILURE;
1759 MCshowerID=
"default";
1769 ATH_MSG_WARNING(
"Unknown ShowerID detected! Using default FTAG MC-MC SFs (Powheg+Pythia8). Please check if these are applicable for this sample!");
1773 MCshowerID=
"default";
1777 ATH_MSG_WARNING(
"Unknown ShowerID detected! Using default FTAG MC-MC SFs (Powheg+Pythia8). Please check if these are applicable for this sample!");
1782 MCshowerID=
"default";
1791 ATH_MSG_WARNING(
"Unknown Sherpa version detected! Using FTAG MC-MC SFs for Sherpa 2.2.11-2.2.16. Please check if these are applicable for this sample!");
1792 MCshowerID =
"700660";
1795 ATH_MSG_WARNING(
"Unknown ShowerID detected! Using default FTAG MC-MC SFs (Powheg+Pythia8). Please check if these are applicable for this sample!");
1799 MCshowerID=
"default";
1806 ATH_MSG_WARNING(
"Unknown Sherpa version detected! Using FTAG MC-MC SFs for Sherpa 2.2.11-2.2.16. Please check if these are applicable for this sample!");
1807 MCshowerID =
"700660";
1810 ATH_MSG_WARNING(
"Unknown ShowerID detected! Using default FTAG MC-MC SFs (Powheg+Pythia8). Please check if these are applicable for this sample!");
1814 ATH_MSG_WARNING(
"Unknown b-tagger detected! Only DL1dv01 and GN2v01 are supported. Falling back to default FTAG MC-MC SFs (Powheg+Pythia8). Please check if these are applicable for this sample!");
1815 MCshowerID=
"default";
1820 if (
jetcoll !=
"AntiKt4EMTopoJets" &&
jetcoll !=
"AntiKt4EMPFlowJets") {
1821 ATH_MSG_WARNING(
"** Only AntiKt4EMTopoJets and AntiKt4EMPFlowJets are supported with FTAG scale factors!");
1822 return StatusCode::FAILURE;
1847 if (trkjetcoll.find(
"AntiKt2PV0TrackJets")==std::string::npos && trkjetcoll.find(
"AntiKtVR30Rmax4Rmin02TrackJets")==std::string::npos) {
1848 ATH_MSG_WARNING(
"** Only AntiKt2PV0TrackJets and AntiKtVR30Rmax4Rmin02TrackJets are supported with FTAG scale factors!");
1849 return StatusCode::FAILURE;
1852 toolName =
"BTagSF_" + trkjetcoll;
1908 ATH_MSG_ERROR(
"Can only have CST *or* TST configured for MET maker. Please unset either METDoCaloSyst or METDoTrkSyst in your config file" );
1909 return StatusCode::FAILURE;
1934 #ifndef XAOD_STANDALONE // Athena and AthAnalysis; need to take into account that MuonCalibTool is private tool
1939 if(jetname ==
"AntiKt4EMTopo" || jetname ==
"AntiKt4EMPFlow"){
1942 ATH_MSG_WARNING(
"Object-based METSignificance recommendations only exist for EMTopo and PFlow, falling back to AntiKt4EMTopo");
1953 if (IdBaselineInt == 4)
1957 #else // AnalysisBase; can just pass the muon calib tool configured above
1962 if(jetname ==
"AntiKt4EMTopo" || jetname ==
"AntiKt4EMPFlow"){
1965 ATH_MSG_WARNING(
"Object-based METSignificance recommendations only exist for EMTopo and PFlow, falling back to AntiKt4EMTopo");
1991 #ifndef XAOD_STANDALONE // Athena and AthAnalysis
1994 #else // AnalysisBase
2038 std::string no2e17(
"");
2048 ATH_MSG_DEBUG(
"TrigGlobalEfficiencyCorrectionTool/TrigGlobal_diLep: no2e17 trigger string: " << no2e17 );
2050 std::map<std::string,std::string> triggers_diLep;
2054 triggers_diLep[
"326834-328393"] = no2e17;
2073 std::string no2e17(
"");
2083 ATH_MSG_DEBUG(
"TrigGlobalEfficiencyCorrectionTool/TrigGlobal_multiLep: no2e17 trigger string: " << no2e17 );
2085 std::map<std::string,std::string> triggers_multiLep;
2089 triggers_multiLep[
"326834-328393"] = no2e17;
2189 #ifndef XAOD_ANALYSIS
2206 std::string toolName =
"ORTool" +
suffix;
2207 ATH_MSG_INFO(
"SUSYTools: Autoconfiguring " << toolName);
2350 return StatusCode::SUCCESS;