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!");
893 toolName =
"EleSelLikelihood_" +
m_eleId;
895 if (
m_eleId.find(
"DNN") != std::string::npos) {
903 ATH_MSG_INFO(
"Overriding specified Ele.Id working point in favour of configuration file");
907 return StatusCode::FAILURE;
910 ATH_MSG_WARNING(
" ****************************************************************************");
912 ATH_MSG_WARNING(
" These may be used for loose electron CRs but no scale factors are provided.");
913 ATH_MSG_WARNING(
" ****************************************************************************");
935 ATH_MSG_INFO(
"Overriding specified EleBaseline.Id working point in favour of configuration file");
939 return StatusCode::FAILURE;
952 toolName =
"ElectronLRTOverlapRemovalTool";
969 return StatusCode::FAILURE;
983 return StatusCode::FAILURE;
1016 ATH_MSG_INFO(
"Running on Run2 samples; Using egamma SF tools from R21 map ");
1020 toolName =
"AsgElectronEfficiencyCorrectionTool_reco";
1031 std::string eleId = TString(
m_eleId).ReplaceAll(
"AndBLayer",
"BLayer").ReplaceAll(
"LLH",
"").Data();
1033 if (
m_eleId.find(
"DNN") != std::string::npos) {
1034 eleId = TString(eleId).ReplaceAll(
"DNNnoCF",
"").ReplaceAll(
"DNN",
"").ReplaceAll(
"Loose",
"LooseBLayer").Data();
1035 ATH_MSG_WARNING(
"Electron DNN ID working point " <<
m_eleId <<
" doesn't have SFs yet, fall back to " << eleId);
1039 toolName =
"AsgElectronEfficiencyCorrectionTool_id_" +
m_eleId;
1043 std::map<std::string,std::string> corrFNList;
1046 std::string
WP = WP_fname.substr(0,WP_fname.find(
":"));
1047 std::string
fname = WP_fname.substr(WP_fname.find(
":")+1);
1050 ATH_MSG_WARNING(
"Will use correction file rather than central map file." );
1055 std::string EleIso(
"");
1061 ATH_MSG_WARNING(
"(AsgElectronEfficiencyCorrectionTool_iso_*) Your selected electron Iso WP ("
1063 <<
") does not have iso SFs defined. Falling back to "
1065 <<
" for SF calculations");
1069 return StatusCode::FAILURE;
1072 toolName =
"AsgElectronEfficiencyCorrectionTool_iso_" +
m_eleId + EleIso;
1075 if ( (!
m_EG_corrFNList.empty()) && corrFNList.find(EleIso)!=corrFNList.end() ) {
1082 ATH_MSG_WARNING(
"(" << toolName <<
") Your electron Iso WP: " << EleIso<<
" is no longer supported. This will almost certainly cause a crash now.");
1094 if (!
isData() && ((EleIso.find(
"TightTrackOnly_VarRad")!=std::string::npos)||
1095 (EleIso.find(
"TightTrackOnly_FixedRad")!=std::string::npos)||
1096 (EleIso.find(
"Tight_VarRad")!=std::string::npos)||
1097 (EleIso.find(
"Loose_VarRad")!=std::string::npos))) {
1098 if (
isAtlfast())
ATH_MSG_WARNING(
"(AsgElectronEfficiencyCorrectionTool/"+toolName+
"). Your selected electron Iso WP (" + EleIso +
") don't have AFII SF. Falling back to FullSim");
1111 std::string EleIsohighPt(
"");
1117 ATH_MSG_WARNING(
"(AsgElectronEfficiencyCorrectionTool_iso_*) Your selected high-pT electron Iso WP ("
1119 <<
") does not have iso SFs defined. Falling back to "
1121 <<
" for SF calculations");
1125 return StatusCode::FAILURE;
1128 toolName =
"AsgElectronEfficiencyCorrectionTool_isoHigPt_" +
m_eleId + EleIsohighPt;
1131 if ( (!
m_EG_corrFNList.empty()) && corrFNList.find(EleIsohighPt)!=corrFNList.end() ) {
1139 ATH_MSG_WARNING(
"(" << toolName <<
") Your electron high-pt Iso WP: " << EleIsohighPt <<
" is no longer supported. This will almost certainly cause a crash now.");
1160 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);
1161 std::string triggerEleID =
m_isRun3? TString(eleId).ReplaceAll(
"LooseBLayer",
"Loose").Data() : eleId;
1167 bool pass_isRun3TrigSFFallback =
true;
1168 if (triggerEleID.find(
"Medium") != std::string::npos && triggerEleIso.find(
"Loose") != std::string::npos) {triggerEleID =
"Loose";}
1169 else if (triggerEleID.find(
"Medium") != std::string::npos && triggerEleIso.find(
"Tight") != std::string::npos) {triggerEleID =
"Tight"; triggerEleIso =
"Tight_VarRad";}
1170 else if (triggerEleID.find(
"Medium") != std::string::npos && triggerEleIso.find(
"HighPtCaloOnly") != std::string::npos) {triggerEleID =
"Tight"; triggerEleIso =
"Tight_VarRad";}
1171 else if (triggerEleID.find(
"Tight") != std::string::npos && triggerEleIso.find(
"Loose") != std::string::npos) {triggerEleID =
"Loose";}
1172 else if (triggerEleID.find(
"Tight") != std::string::npos && triggerEleIso.find(
"Tight") != std::string::npos) {triggerEleIso=
"Tight_VarRad";}
1173 else if (triggerEleID.find(
"Tight") != std::string::npos && triggerEleIso.find(
"HighPtCaloOnly") != std::string::npos) {triggerEleID =
"Tight"; triggerEleIso =
"Tight_VarRad";}
1174 else if (triggerEleID.find(
"Loose") != std::string::npos && triggerEleIso.find(
"Tight") != std::string::npos) {triggerEleID =
"Loose"; triggerEleIso =
"Loose_VarRad";}
1175 else if (triggerEleID.find(
"Loose") != std::string::npos && triggerEleIso.find(
"HighPtCaloOnly") != std::string::npos) {triggerEleID =
"Loose"; triggerEleIso =
"Loose_VarRad";}
1176 else {pass_isRun3TrigSFFallback=
false;}
1177 if(pass_isRun3TrigSFFallback){
1178 ATH_MSG_INFO(
" ************** This is only for testing/studying purpose! ************** ");
1179 ATH_MSG_INFO(
" ************** For official recommendation, please get in contact with the SUSY Bkg Forum ************** ");
1180 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' ");
1181 ATH_MSG_INFO(
"Only for single-lepton trigger scale factor, fall back to Electron ID: -> "<< triggerEleID <<
" with Isolation: " << triggerEleIso);
1193 ATH_MSG_WARNING(
"(AsgElectronEfficiencyCorrectionTool_trig_singleLep_*) Your selected electron Iso WP ("
1195 <<
") does not have trigger SFs defined. Falling back to "
1197 <<
" for SF calculations");
1201 return StatusCode::FAILURE;
1204 toolName =
"AsgElectronEfficiencyCorrectionTool_trig_singleLep_" + triggerEleID;
1220 toolName =
"AsgElectronEfficiencyCorrectionTool_trigEff_singleLep_" + triggerEleID;
1237 std::map<std::string,std::string> electronTriggerSFMapMixedLepton {
1239 {
"e24_lhmedium_L1EM20VH_OR_e60_lhmedium_OR_e120_lhloose,e26_lhtight_nod0_ivarloose_OR_e60_lhmedium_nod0_OR_e140_lhloose_nod0",
m_electronTriggerSFStringSingle},
1240 {
"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"},
1241 {
"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"},
1242 {
"e17_lhloose,e17_lhloose_nod0",
"MULTI_L_2015_e17_lhloose_2016_2018_e17_lhloose_nod0"},
1243 {
"e12_lhloose,e12_lhloose_nod0",
"MULTI_L_2015_e12_lhloose_2016_2018_e12_lhloose_nod0"},
1244 {
"e7_lhmedium,e7_lhmedium_nod0",
"MULTI_L_2015_e7_lhmedium_2016_2018_e7_lhmedium_nod0"},
1245 {
"e9_lhloose,e9_lhloose_nod0,e12_lhvloose_nod0_L1EM10VH",
"TRI_E_2015_e9_lhloose_2016_e9_lhloose_nod0_2017_2018_e12_lhvloose_nod0_L1EM10VH"}
1251 if (triglist_2017to2018.find(
"2e17_lhvloose_nod0_L12EM15VHI") != std::string::npos) {
1252 electronTriggerSFMapMixedLepton[
"e17_lhvloose_nod0_L1EM15VHI"] =
"DI_E_2015_e12_lhloose_L1EM10VH_2016_e17_lhvloose_nod0_2017_2018_e17_lhvloose_nod0_L1EM15VHI";
1255 std::string triggerMixedEleIso(
"");
1257 for(
auto const&
item : electronTriggerSFMapMixedLepton){
1264 ATH_MSG_WARNING(
"(AsgElectronEfficiencyCorrectionTool_trig_mixLep_*) Your selected electron Iso WP ("
1266 <<
") does not have trigger SFs defined. Falling back to "
1267 << triggerMixedEleIso
1268 <<
" for SF calculations");
1270 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! ***");
1271 return StatusCode::FAILURE;
1274 ATH_MSG_VERBOSE (
"Selected WP: " <<
item.second <<
"_" << eleId <<
"_" << triggerMixedEleIso);
1276 toolName =
"AsgElectronEfficiencyCorrectionTool_trig_mixLep_" + (
item.first).substr(0,8) +
m_eleId;
1280 ATH_CHECK( t_sf->setProperty(
"IdKey", eleId) );
1281 ATH_CHECK( t_sf->setProperty(
"IsoKey", triggerMixedEleIso) );
1286 ATH_CHECK( t_sf->setProperty(
"OutputLevel", this->msg().level()) );
1289 #ifndef XAOD_STANDALONE
1295 toolName =
"AsgElectronEfficiencyCorrectionTool_trigEff_mixLep_" + (
item.first).substr(0,8) +
m_eleId;
1298 ATH_CHECK( t_eff->setProperty(
"TriggerKey",
"Eff_"+
item.second) );
1299 ATH_CHECK( t_eff->setProperty(
"IdKey", eleId) );
1300 ATH_CHECK( t_eff->setProperty(
"IsoKey", triggerMixedEleIso) );
1305 ATH_CHECK( t_eff->setProperty(
"OutputLevel", this->msg().level()) );
1308 #ifndef XAOD_STANDALONE
1316 else ATH_MSG_WARNING(
"*** THE ELECTRON TRIGGER SF MIXED AND SF DILEP ARE CURRENTY NOT SUPPORTED IN RUN3 ***");
1318 ATH_MSG_WARNING(
"*** THE ELECTRON CHARGE FLIP SF ARE CURRENTY NOT SUPPORTED ***");
1362 photonIso_forTrigSF =
"TightCaloOnly";
1364 photonIso_forTrigSF = TString(
m_photonIso_WP).ReplaceAll(
"FixedCut",
"").Data();
1376 std::map<std::string,std::string> diphotonTriggerSFMapAsymmetric {
1378 {
"g25_loose,g25_medium_L1EM20VH",
"DI_PH_2015_g25_loose_2016_g25_loose_2017_g25_medium_L1EM20VH_2018_g25_medium_L1EM20VH"},
1379 {
"g35_loose,g35_medium_L1EM20VH",
"DI_PH_2015_g35_loose_2016_g35_loose_2017_g35_medium_L1EM20VH_2018_g35_medium_L1EM20VH"},
1382 for(
auto const&
item : diphotonTriggerSFMapAsymmetric){
1384 toolName =
"AsgPhotonEfficiencyCorrectionTool_trigSF_asymm_diphoton_" + (
item.first).substr(0,9) + photonIso_forTrigSF;
1386 ATH_CHECK( ph_trigSF->setProperty(
"MapFilePath",
"PhotonEfficiencyCorrection/2015_2018/rel21.2/Summer2020_Rec_v1/map3.txt") );
1387 ATH_CHECK( ph_trigSF->setProperty(
"IsoKey", photonIso_forTrigSF) );
1388 ATH_CHECK( ph_trigSF->setProperty(
"TriggerKey",
item.second) );
1389 ATH_CHECK( ph_trigSF->setProperty(
"ForceDataType", 1) );
1390 ATH_CHECK( ph_trigSF->setProperty(
"OutputLevel", this->msg().level()) );
1393 #ifndef XAOD_STANDALONE
1399 toolName =
"AsgPhotonEfficiencyCorrectionTool_trigEff_asymm_diphoton_" + (
item.first).substr(0,9) + photonIso_forTrigSF;
1401 ATH_CHECK( ph_trigEff->setProperty(
"MapFilePath",
"PhotonEfficiencyCorrection/2015_2018/rel21.2/Summer2020_Rec_v1/map3.txt") );
1402 ATH_CHECK( ph_trigEff->setProperty(
"IsoKey", photonIso_forTrigSF) );
1403 ATH_CHECK( ph_trigEff->setProperty(
"TriggerKey",
"Eff_"+
item.second) );
1404 ATH_CHECK( ph_trigEff->setProperty(
"ForceDataType", 1) );
1405 ATH_CHECK( ph_trigEff->setProperty(
"OutputLevel", this->msg().level()) );
1408 #ifndef XAOD_STANDALONE
1464 ATH_MSG_WARNING(
"Forcing EgcalibTool to use calibrations for full simulation" );
1485 else if (
m_tauId ==
"rnn001")
inputfile =
"SUSYTools/tau_selection_rnn001.conf";
1486 else if (
m_tauId ==
"VeryLoose")
inputfile =
"SUSYTools/tau_selection_veryloose.conf";
1487 else if (
m_tauId ==
"Loose")
inputfile =
"SUSYTools/tau_selection_loose.conf";
1488 else if (
m_tauId ==
"Medium")
inputfile =
"SUSYTools/tau_selection_medium.conf";
1489 else if (
m_tauId ==
"Tight")
inputfile =
"SUSYTools/tau_selection_tight.conf";
1492 return StatusCode::FAILURE;
1498 return StatusCode::FAILURE;
1507 toolName =
"TauSelectionTool_" +
m_tauId;
1525 return StatusCode::FAILURE;
1540 toolName =
"TauEffTool_" +
m_tauId;
1544 std::vector<int> correction_types;
1547 ANA_MSG_DEBUG(
"Found JetIDWP in tau config file : " << jetIDWP );
1555 ATH_MSG_ERROR(
"Invalid Tau ID in tau config file " << jetIDWP);
1556 return StatusCode::FAILURE;
1559 correction_types.insert(correction_types.end(), {TauAnalysisTools::EfficiencyCorrectionType::SFRecoHadTau,
1560 TauAnalysisTools::EfficiencyCorrectionType::SFJetIDHadTau});
1564 ANA_MSG_DEBUG(
"Found EleIDWP in tau config file : " << eleIDWP );
1565 int ele_id_lvl = -1;
1570 ATH_MSG_INFO(
"No or invalid Ele OR in tau config file " << eleIDWP <<
" will not apply SFs for electro veto" );
1573 if (ele_id_lvl != -1 )
1574 correction_types.insert(correction_types.end(), {TauAnalysisTools::EfficiencyCorrectionType::SFEleIDHadTau,
1575 TauAnalysisTools::EfficiencyCorrectionType::SFEleIDElectron});
1598 return StatusCode::FAILURE;
1603 {
"HLT_tau25_medium1_tracktwo",
"HLT_tau25_medium1_tracktwo"},
1604 {
"HLT_tau35_medium1_tracktwo",
"HLT_tau35_medium1_tracktwo"},
1605 {
"HLT_tau50L1TAU12_medium1_tracktwo",
"HLT_tau50_medium1_tracktwo_L1TAU12"},
1606 {
"HLT_tau60_medium1_tracktwo",
"HLT_tau60_medium1_tracktwo"},
1607 {
"HLT_tau80L1TAU60_medium1_tracktwo",
"HLT_tau80_medium1_tracktwo_L1TAU60"},
1608 {
"HLT_tau125_medium1_tracktwo",
"HLT_tau125_medium1_tracktwo"},
1609 {
"HLT_tau160_medium1_tracktwo",
"HLT_tau160_medium1_tracktwo"},
1610 {
"HLT_tau160L1TAU100_medium1_tracktwo",
"HLT_tau160_medium1_tracktwo_L1TAU100"},
1612 {
"HLT_tau25_medium1_tracktwoEF",
"HLT_tau25_medium1_tracktwoEF"},
1613 {
"HLT_tau35L1TAU12IM_medium1_tracktwoEF",
"HLT_tau35_medium1_tracktwoEF_L1TAU12IM"},
1614 {
"HLT_tau35_medium1_tracktwoEF",
"HLT_tau35_medium1_tracktwoEF"},
1615 {
"HLT_tau60_medium1_tracktwoEF",
"HLT_tau60_medium1_tracktwoEF"},
1616 {
"HLT_tau80L1TAU60_medium1_tracktwoEF",
"HLT_tau80_medium1_tracktwoEF_L1TAU60"},
1617 {
"HLT_tau160L1TAU100_medium1_tracktwoEF",
"HLT_tau160_medium1_tracktwoEF_L1TAU100"},
1619 {
"HLT_tau25_medium1_tracktwoEF_OR_mediumRNN_tracktwoMVA",
"HLT_tau25_medium1_tracktwoEF,HLT_tau25_mediumRNN_tracktwoMVA"},
1620 {
"HLT_tau35L1TAU12IM_medium1_tracktwoEF_OR_mediumRNN_tracktwoMVA",
"HLT_tau35_medium1_tracktwoEF_L1TAU12IM,HLT_tau35_mediumRNN_tracktwoMVA_L1TAU12IM"},
1621 {
"HLT_tau35_medium1_tracktwoEF_OR_mediumRNN_tracktwoMVA",
"HLT_tau35_medium1_tracktwoEF,HLT_tau35_mediumRNN_tracktwoMVA"},
1622 {
"HLT_tau60_medium1_tracktwoEF_OR_mediumRNN_tracktwoMVA",
"HLT_tau60_medium1_tracktwoEF,HLT_tau60_mediumRNN_tracktwoMVA"},
1623 {
"HLT_tau80L1TAU60_medium1_tracktwoEF_OR_mediumRNN_tracktwoMVA",
"HLT_tau80_medium1_tracktwoEF_L1TAU60,HLT_tau80_mediumRNN_tracktwoMVA_L1TAU60"},
1624 {
"HLT_tau160L1TAU100_medium1_tracktwoEF_OR_mediumRNN_tracktwoMVA",
"HLT_tau160_medium1_tracktwoEF_L1TAU100,HLT_tau160_mediumRNN_tracktwoMVA_L1TAU100"}
1628 toolName =
"TauTrigEffTool_" +
m_tauId +
"_" + trigger.first;
1630 ATH_CHECK( tau_trigSF->setProperty(
"EfficiencyCorrectionTypes", std::vector<int>({TauAnalysisTools::SFTriggerHadTau})) );
1631 ATH_CHECK( tau_trigSF->setProperty(
"TriggerName", trigger.first) );
1632 ATH_CHECK( tau_trigSF->setProperty(
"JetIDLevel", iTauID) );
1634 ATH_CHECK( tau_trigSF->setProperty(
"OutputLevel", this->msg().level()) );
1675 std::string jetcollBTag =
jetcoll;
1676 if (
jetcoll ==
"AntiKt4LCTopoJets") {
1677 ATH_MSG_WARNING(
" *** HACK *** Treating LCTopoJets jets as EMTopo -- use at your own risk!");
1678 jetcollBTag =
"AntiKt4EMTopoJets";
1684 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"));
1688 if (jetcollBTag.find(
"AntiKt4EMTopoJets") == std::string::npos && jetcollBTag.find(
"AntiKt4EMPFlowJets")==std::string::npos) {
1689 ATH_MSG_WARNING(
"** Only AntiKt4EMTopoJets and AntiKt4EMPFlowJets are supported with FTAG scale factors!");
1690 return StatusCode::FAILURE;
1707 if (
jetcoll !=
"AntiKt4EMTopoJets" &&
jetcoll !=
"AntiKt4EMPFlowJets") {
1708 ATH_MSG_WARNING(
"** Only AntiKt4EMTopoJets and AntiKt4EMPFlowJets are supported with FTAG scale factors!");
1709 return StatusCode::FAILURE;
1712 toolName =
"BTagSelOR_" + jetcollBTag +
m_orBtagWP;
1725 const std::string& BTagColl_TrkJet = trkjetcoll;
1729 ATH_MSG_INFO(
"TrackJet collection set to None: disabling btagging for TrackJets.");
1733 if (trkjetcoll.find(
"AntiKt2PV0TrackJets")==std::string::npos && trkjetcoll.find(
"AntiKtVR30Rmax4Rmin02TrackJets")==std::string::npos) {
1734 ATH_MSG_WARNING(
"** Only AntiKt2PV0TrackJets and AntiKtVR30Rmax4Rmin02TrackJets are supported with FTAG scale factors!");
1735 return StatusCode::FAILURE;
1754 std::string MCshowerID;
1756 ATH_MSG_ERROR(
"Error! m_showerType=-1, which is an error case for FTAG MC/MC SFs." );
1757 return StatusCode::FAILURE;
1761 MCshowerID=
"default";
1771 ATH_MSG_WARNING(
"Unknown ShowerID detected! Using default FTAG MC-MC SFs (Powheg+Pythia8). Please check if these are applicable for this sample!");
1775 MCshowerID=
"default";
1779 ATH_MSG_WARNING(
"Unknown ShowerID detected! Using default FTAG MC-MC SFs (Powheg+Pythia8). Please check if these are applicable for this sample!");
1784 MCshowerID=
"default";
1793 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!");
1794 MCshowerID =
"700660";
1797 ATH_MSG_WARNING(
"Unknown ShowerID detected! Using default FTAG MC-MC SFs (Powheg+Pythia8). Please check if these are applicable for this sample!");
1801 MCshowerID=
"default";
1808 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!");
1809 MCshowerID =
"700660";
1812 ATH_MSG_WARNING(
"Unknown ShowerID detected! Using default FTAG MC-MC SFs (Powheg+Pythia8). Please check if these are applicable for this sample!");
1816 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!");
1817 MCshowerID=
"default";
1822 if (
jetcoll !=
"AntiKt4EMTopoJets" &&
jetcoll !=
"AntiKt4EMPFlowJets") {
1823 ATH_MSG_WARNING(
"** Only AntiKt4EMTopoJets and AntiKt4EMPFlowJets are supported with FTAG scale factors!");
1824 return StatusCode::FAILURE;
1849 if (trkjetcoll.find(
"AntiKt2PV0TrackJets")==std::string::npos && trkjetcoll.find(
"AntiKtVR30Rmax4Rmin02TrackJets")==std::string::npos) {
1850 ATH_MSG_WARNING(
"** Only AntiKt2PV0TrackJets and AntiKtVR30Rmax4Rmin02TrackJets are supported with FTAG scale factors!");
1851 return StatusCode::FAILURE;
1854 toolName =
"BTagSF_" + trkjetcoll;
1910 ATH_MSG_ERROR(
"Can only have CST *or* TST configured for MET maker. Please unset either METDoCaloSyst or METDoTrkSyst in your config file" );
1911 return StatusCode::FAILURE;
1936 #ifndef XAOD_STANDALONE // Athena and AthAnalysis; need to take into account that MuonCalibTool is private tool
1941 if(jetname ==
"AntiKt4EMTopo" || jetname ==
"AntiKt4EMPFlow"){
1944 ATH_MSG_WARNING(
"Object-based METSignificance recommendations only exist for EMTopo and PFlow, falling back to AntiKt4EMTopo");
1955 if (IdBaselineInt == 4)
1959 #else // AnalysisBase; can just pass the muon calib tool configured above
1964 if(jetname ==
"AntiKt4EMTopo" || jetname ==
"AntiKt4EMPFlow"){
1967 ATH_MSG_WARNING(
"Object-based METSignificance recommendations only exist for EMTopo and PFlow, falling back to AntiKt4EMTopo");
1993 #ifndef XAOD_STANDALONE // Athena and AthAnalysis
1996 #else // AnalysisBase
2040 std::string no2e17(
"");
2050 ATH_MSG_DEBUG(
"TrigGlobalEfficiencyCorrectionTool/TrigGlobal_diLep: no2e17 trigger string: " << no2e17 );
2052 std::map<std::string,std::string> triggers_diLep;
2056 triggers_diLep[
"326834-328393"] = no2e17;
2075 std::string no2e17(
"");
2085 ATH_MSG_DEBUG(
"TrigGlobalEfficiencyCorrectionTool/TrigGlobal_multiLep: no2e17 trigger string: " << no2e17 );
2087 std::map<std::string,std::string> triggers_multiLep;
2091 triggers_multiLep[
"326834-328393"] = no2e17;
2191 #ifndef XAOD_ANALYSIS
2208 std::string toolName =
"ORTool" +
suffix;
2209 ATH_MSG_INFO(
"SUSYTools: Autoconfiguring " << toolName);
2352 return StatusCode::SUCCESS;