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;
82 return StatusCode::SUCCESS;
101 return StatusCode::SUCCESS;
112 return StatusCode::SUCCESS;
118 ATH_MSG_DEBUG(
"TauEfficiencyCorrectionsTool with name " << name() <<
" is configured as follows:" );
120 ATH_MSG_DEBUG(
" EfficiencyCorrectionTypes " << iEfficiencyCorrectionType );
139 double& eff,
unsigned int )
153 double dToolEff = 1.;
156 return tmpCorrectionCode;
175 return tmpCorrectionCode;
185 if ((**it)->isAffectedBySystematic(systematic))
196 sAffectingSystematics.
insert((**it)->affectingSystematics());
197 return sAffectingSystematics;
206 sRecommendedSystematics.
insert((**it)->recommendedSystematics());
207 return sRecommendedSystematics;
214 if ((**it)->applySystematicVariation(sSystematicSet) == StatusCode::FAILURE)
215 return StatusCode::FAILURE;
216 return StatusCode::SUCCESS;
222 std::string sDirectory =
"TauAnalysisTools/" + std::string(
sSharedFilesVersion) +
"/EfficiencyCorrections/";
229 ATH_MSG_WARNING(
"No fast-sim recommendation for Tau RNN, using full sim");
241 if (sJetIDWP.empty()) {
242 ATH_MSG_WARNING(
"Could not find valid ID working point. Skip ID efficiency corrections.");
251 ATH_CHECK(tTool->setProperty(
"WP", sJetIDWP));
256 m_sVarName =
"TauScaleFactorReconstructionHadTau";
273 return StatusCode::FAILURE;
284 ATH_CHECK(tTool->setProperty(
"UseTauSubstructure",
false));
291 ATH_MSG_WARNING(
"No fast-sim recommendation for tau electron veto, using full sim");
302 return StatusCode::FAILURE;
312 return StatusCode::FAILURE;
324 ATH_CHECK(tTool->setProperty(
"UseTauSubstructure",
false));
329 ATH_MSG_ERROR(
"Property \"Trigger\" was not set, please provide a trigger name.");
330 return StatusCode::FAILURE;
335 if (
m_sTriggerName.value().find(
"mediumRNN_tracktwoMVA") != std::string::npos) {
339 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");
340 return StatusCode::FAILURE;
343 if (
m_sTriggerName.value().find(
"mediumRNN_tracktwoMVA") != std::string::npos) {
347 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");
348 return StatusCode::FAILURE;
351 if (
m_sTriggerName.value().find(
"tracktwoEF") != std::string::npos) {
358 }
else if (
m_sTriggerName.value().find(
"tracktwo") != std::string::npos) {
362 }
else if (
m_sTriggerName.value().find(
"tau125") != std::string::npos) {
365 }
else if (
m_sTriggerName.value().find(
"tau60") != std::string::npos) {
372 ATH_MSG_ERROR(
"Trigger " <<
m_sTriggerName <<
" is not supported. Please fix \"TriggerName\" property. If this is correct, then please contact the tau trigger coordinators");
373 return StatusCode::FAILURE;
376 ATH_MSG_ERROR(
"SFs are not available for " <<
m_sCampaign <<
" campaign. If the config is correct, then please contact the tau trigger coordinators");
377 return StatusCode::FAILURE;
388 ATH_CHECK(tTool->setProperty(
"DoTauTrig",
true));
391 ATH_MSG_WARNING(
"unsupported EfficiencyCorrectionsType with enum " << iEfficiencyCorrectionType);
395 return StatusCode::SUCCESS;
405 std::string simType(
"");
408 if(
result) std::transform(simType.begin(), simType.end(), simType.begin(), ::toupper);
410 if( simType.find(
"ATLFAST3") != std::string::npos && !
m_useFastSim){
411 ATH_MSG_WARNING(
"Input file is AF3 sample but you are _not_ using AF3 corrections and uncertainties, you should set \"useFastSim\" to \"true\"");
412 }
else if (simType.find(
"FULLG4")!=std::string::npos &&
m_useFastSim){
413 ATH_MSG_WARNING(
"Input file is full simulation but you are using AF3 corrections and uncertainties, you should set \"useFastSim\" to \"false\"");
417 return StatusCode::SUCCESS;
428 ATH_MSG_WARNING(
"Efficiency corrections for JETIDRNNVERYLOOSE working point are not supported.");
431 return "jetrnnsigloose";
433 return "jetrnnsigmedium";
435 return "jetrnnsigtight";
447 return "eleRNNTight";
449 return "eleRNNMedium";
451 return "eleRNNLoose";
478 std::string sMeasurement =
"_comb_";
481 sMeasurement =
"_Ztt_";
483 sMeasurement =
"_ttbar_";
500 return StatusCode::FAILURE;
505 ANA_MSG_ERROR(
"Failed to find the RandomRunNumber decoration. Call the apply() method from the PileupReweightingTool beforehand to get period dependent SFs.");
506 return StatusCode::FAILURE;
514 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.