36 ATH_MSG_INFO(
"Initializing TauEfficiencyCorrectionsTool" );
41 ATH_MSG_WARNING(
"Truth match check will be skipped. This is ONLY FOR TESTING PURPOSE!");
46 ATH_MSG_ERROR(
"Could not retrieve any EfficiencyCorrectionType");
47 return StatusCode::FAILURE;
54 return StatusCode::FAILURE;
60 ATH_CHECK((**it).setProperty(
"OutputLevel", this->msg().level()));
69 return StatusCode::FAILURE;
74 return StatusCode::SUCCESS;
79 return StatusCode::SUCCESS;
98 return StatusCode::SUCCESS;
109 return StatusCode::SUCCESS;
115 ATH_MSG_DEBUG(
"TauEfficiencyCorrectionsTool with name " << name() <<
" is configured as follows:" );
117 ATH_MSG_DEBUG(
" EfficiencyCorrectionTypes " << iEfficiencyCorrectionType );
136 double& eff,
unsigned int )
150 double dToolEff = 1.;
153 return tmpCorrectionCode;
172 return tmpCorrectionCode;
182 if ((**it)->isAffectedBySystematic(systematic))
193 sAffectingSystematics.
insert((**it)->affectingSystematics());
194 return sAffectingSystematics;
203 sRecommendedSystematics.
insert((**it)->recommendedSystematics());
204 return sRecommendedSystematics;
211 if ((**it)->applySystematicVariation(sSystematicSet) == StatusCode::FAILURE)
212 return StatusCode::FAILURE;
213 return StatusCode::SUCCESS;
219 std::string sDirectory =
"TauAnalysisTools/" + std::string(
sSharedFilesVersion) +
"/EfficiencyCorrections/";
231 return StatusCode::FAILURE;
245 if (sJetIDWP.empty()) {
246 ATH_MSG_WARNING(
"Could not find valid ID working point. Skip ID efficiency corrections.");
255 ATH_CHECK(tTool->setProperty(
"WP", sJetIDWP));
260 m_sVarName =
"TauScaleFactorReconstructionHadTau";
277 return StatusCode::FAILURE;
288 ATH_CHECK(tTool->setProperty(
"UseTauSubstructure",
false));
295 ATH_MSG_WARNING(
"No fast-sim recommendation for tau electron veto, using full sim");
307 return StatusCode::FAILURE;
317 return StatusCode::FAILURE;
323 return StatusCode::FAILURE;
332 return StatusCode::FAILURE;
345 ATH_CHECK(tTool->setProperty(
"UseTauSubstructure",
false));
350 ATH_MSG_ERROR(
"Property \"Trigger\" was not set, please provide a trigger name.");
351 return StatusCode::FAILURE;
356 if (
m_sTriggerName.value().find(
"mediumRNN_tracktwoMVA") != std::string::npos) {
360 ATH_MSG_ERROR(
"Trigger " <<
m_sTriggerName <<
" is not supported for " <<
m_sCampaign <<
" campaign. Please fix \"TriggerName\" property. In case of doubt please consult with TauTrigger coordinators");
361 return StatusCode::FAILURE;
364 if (
m_sTriggerName.value().find(
"mediumRNN_tracktwoMVA") != std::string::npos) {
368 ATH_MSG_ERROR(
"Trigger " <<
m_sTriggerName <<
" is not supported for " <<
m_sCampaign <<
" campaign. Please fix \"TriggerName\" property. In case of doubt please consult with TauTrigger coordinators");
369 return StatusCode::FAILURE;
372 if (
m_sTriggerName.value().find(
"tracktwoEF") != std::string::npos) {
379 }
else if (
m_sTriggerName.value().find(
"tracktwo") != std::string::npos) {
383 }
else if (
m_sTriggerName.value().find(
"tau125") != std::string::npos) {
386 }
else if (
m_sTriggerName.value().find(
"tau60") != std::string::npos) {
393 ATH_MSG_ERROR(
"Trigger " <<
m_sTriggerName <<
" is not supported. Please fix \"TriggerName\" property. If this is correct, then please contact the tau trigger coordinators");
394 return StatusCode::FAILURE;
397 ATH_MSG_ERROR(
"SFs are not available for " <<
m_sCampaign <<
" campaign. If the config is correct, then please contact the tau trigger coordinators");
398 return StatusCode::FAILURE;
409 ATH_CHECK(tTool->setProperty(
"DoTauTrig",
true));
412 ATH_MSG_WARNING(
"unsupported EfficiencyCorrectionsType with enum " << iEfficiencyCorrectionType);
416 return StatusCode::SUCCESS;
426 std::string simType(
"");
429 if(result) std::transform(simType.begin(), simType.end(), simType.begin(), ::toupper);
431 if( simType.find(
"ATLFAST3") != std::string::npos && !
m_useFastSim){
432 ATH_MSG_WARNING(
"Input file is AF3 sample but you are _not_ using AF3 corrections and uncertainties, you should set \"useFastSim\" to \"true\"");
433 }
else if (simType.find(
"FULLG4")!=std::string::npos &&
m_useFastSim){
434 ATH_MSG_WARNING(
"Input file is full simulation but you are using AF3 corrections and uncertainties, you should set \"useFastSim\" to \"false\"");
438 return StatusCode::SUCCESS;
449 ATH_MSG_WARNING(
"Efficiency corrections for JETIDRNNVERYLOOSE working point are not supported.");
452 return "jetrnnsigloose";
454 return "jetrnnsigmedium";
456 return "jetrnnsigtight";
458 ATH_MSG_WARNING(
"Efficiency corrections for JETIDGNTAUVERYLOOSE working point are not supported.");
461 return "jetgntausigloose";
463 return "jetgntausigmedium";
465 return "jetgntausigtight";
477 return "eleRNNTight";
479 return "eleRNNMedium";
481 return "eleRNNLoose";
508 std::string sMeasurement =
"_comb_";
511 sMeasurement =
"_Ztt_";
513 sMeasurement =
"_ttbar_";
530 return StatusCode::FAILURE;
535 ANA_MSG_ERROR(
"Failed to find the RandomRunNumber decoration. Call the apply() method from the PileupReweightingTool beforehand to get period dependent SFs.");
536 return StatusCode::FAILURE;
544 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
static const char *const sSharedFilesVersion
Version of the calibration files.
ServiceHandle< StoreGateSvc > & evtStore()
Return value from object correction CP tools.
@ Ok
The correction was done successfully.
This module implements the central registry for handling systematic uncertainties with CP tools.
static SystematicRegistry & getInstance()
Get the singleton instance of the registry for the curren thread.
StatusCode registerSystematics(const IReentrantSystematicsTool &tool)
effects: register all the systematics from the tool
Class to wrap a set of SystematicVariations.
void insert(const SystematicVariation &systematic)
description: insert a systematic into the set
Helper class to provide constant type-safe access to aux data.
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
bool eventType(EventType type) const
Check for one particular bitmask value.
@ IS_SIMULATION
true: simulation, false: data
bool contains(const std::string &s, const std::string ®x)
does a string contain the substring
EventInfo_v1 EventInfo
Definition of the latest event info version.
TauJet_v3 TauJet
Definition of the current "tau version".
FileMetaData_v1 FileMetaData
Declare the latest version of the class.