ATLAS Offline Software
Loading...
Searching...
No Matches
TauEfficiencyCorrectionsTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5// EDM include(s):
8
9// Local include(s):
13
14namespace TauAnalysisTools
15{
16
17//______________________________________________________________________________
19 : asg::AsgMetadataTool( sName )
21 , m_bIsData(false)
22 , m_bIsConfigured(false)
23 , m_iRunNumber(0)
24{}
25
26//______________________________________________________________________________
32
33//______________________________________________________________________________
35{
36 ATH_MSG_INFO( "Initializing TauEfficiencyCorrectionsTool" );
37
39
41 ATH_MSG_WARNING("Truth match check will be skipped. This is ONLY FOR TESTING PURPOSE!");
42
43 // check efficiency correction type
45 {
46 ATH_MSG_ERROR("Could not retrieve any EfficiencyCorrectionType");
47 return StatusCode::FAILURE;
48 }
49
50 if(m_sRecommendationTag == "2025-prerec") {
52 } else {
53 ATH_MSG_ERROR("Unknown RecommendationTag " << m_sRecommendationTag);
54 return StatusCode::FAILURE;
55 }
56
57 // for (auto tCommonEfficiencyTool : m_vCommonEfficiencyTools)
58 for (auto it = m_vCommonEfficiencyTools.begin(); it != m_vCommonEfficiencyTools.end(); it++)
59 {
60 ATH_CHECK((**it).setProperty("OutputLevel", this->msg().level()));
61 ATH_CHECK((**it).initialize());
62 }
63
64 // Add the affecting systematics to the global registry
66 if (!registry.registerSystematics(*this))
67 {
68 ATH_MSG_ERROR ("Unable to register the systematics");
69 return StatusCode::FAILURE;
70 }
71
73
74 return StatusCode::SUCCESS;
75}
76
78{
79 return StatusCode::SUCCESS;
80}
81
83{
84 if (!m_bIsConfigured)
85 {
86 const xAOD::EventInfo* xEventInfo = nullptr;
87 ATH_CHECK(evtStore()->retrieve(xEventInfo,"EventInfo"));
89 m_bIsConfigured = true;
90 }
91
92 if (!m_firstEvent){
94 m_firstEvent = true;
95
96 }
97 if (m_bIsData)
98 return StatusCode::SUCCESS;
99
100 const xAOD::EventInfo* xEventInfo = nullptr;
101 ATH_CHECK(evtStore()->retrieve(xEventInfo, "EventInfo"));
102
104 {
105 // Reset the number at the beginning of event
106 m_iRunNumber = 0;
107 }
108
109 return StatusCode::SUCCESS;
110}
111
112//______________________________________________________________________________
114{
115 ATH_MSG_DEBUG( "TauEfficiencyCorrectionsTool with name " << name() << " is configured as follows:" );
116 for (auto iEfficiencyCorrectionType : m_vEfficiencyCorrectionTypes) {
117 ATH_MSG_DEBUG( " EfficiencyCorrectionTypes " << iEfficiencyCorrectionType );
118 }
119 ATH_MSG_DEBUG( " InputFilePathRecoHadTau " << m_sInputFilePathRecoHadTau );
120 ATH_MSG_DEBUG( " InputFilePathEleIDHadTau " << m_sInputFilePathEleIDHadTau );
121 ATH_MSG_DEBUG( " InputFilePathEleIDElectron " << m_sInputFilePathEleIDElectron );
122 ATH_MSG_DEBUG( " InputFilePathJetIDHadTau " << m_sInputFilePathJetIDHadTau );
123 ATH_MSG_DEBUG( " InputFilePathDecayModeHadTau " << m_sInputFilePathDecayModeHadTau );
124 ATH_MSG_DEBUG( " InputFilePathTriggerHadTau " << m_sInputFilePathTriggerHadTau );
125 ATH_MSG_DEBUG( " RecommendationTag " << m_sRecommendationTag );
126 ATH_MSG_DEBUG( " TriggerName " << m_sTriggerName );
127 ATH_MSG_DEBUG( " UseTauSubstructure " << m_bUseTauSubstructure );
128 ATH_MSG_DEBUG( " JetIDLevel " << m_iJetIDLevel );
129 ATH_MSG_DEBUG( " EleIDLevel " << m_iEleIDLevel );
130 ATH_MSG_DEBUG( " Campaign " << m_sCampaign );
131 ATH_MSG_DEBUG( " useFastSim " << m_useFastSim);
132}
133
134//______________________________________________________________________________
136 double& eff, unsigned int /*iRunNumber*/)
137{
138 eff = 1.;
139
140 if (m_bIsData)
142
145
146 for (auto it = m_vCommonEfficiencyTools.begin(); it != m_vCommonEfficiencyTools.end(); it++)
147 {
148 if ( !(**it)->isSupportedRunNumber(m_iRunNumber) )
149 continue;
150 double dToolEff = 1.;
151 CP::CorrectionCode tmpCorrectionCode = (**it)->getEfficiencyScaleFactor(xTau, dToolEff, m_iRunNumber);
152 if (tmpCorrectionCode != CP::CorrectionCode::Ok)
153 return tmpCorrectionCode;
154 eff *= dToolEff;
155 }
157}
158
159//______________________________________________________________________________
161{
162 if (m_bIsData)
164
167
168 for (auto it = m_vCommonEfficiencyTools.begin(); it != m_vCommonEfficiencyTools.end(); it++)
169 {
170 CP::CorrectionCode tmpCorrectionCode = (**it)->applyEfficiencyScaleFactor(xTau, m_iRunNumber);
171 if (tmpCorrectionCode != CP::CorrectionCode::Ok)
172 return tmpCorrectionCode;
173 }
175}
176
178//______________________________________________________________________________
180{
181 for (auto it = m_vCommonEfficiencyTools.begin(); it != m_vCommonEfficiencyTools.end(); it++)
182 if ((**it)->isAffectedBySystematic(systematic))
183 return true;
184 return false;
185}
186
188//______________________________________________________________________________
190{
191 CP::SystematicSet sAffectingSystematics;
192 for (auto it = m_vCommonEfficiencyTools.begin(); it != m_vCommonEfficiencyTools.end(); it++)
193 sAffectingSystematics.insert((**it)->affectingSystematics());
194 return sAffectingSystematics;
195}
196
198//______________________________________________________________________________
200{
201 CP::SystematicSet sRecommendedSystematics;
202 for (auto it = m_vCommonEfficiencyTools.begin(); it != m_vCommonEfficiencyTools.end(); it++)
203 sRecommendedSystematics.insert((**it)->recommendedSystematics());
204 return sRecommendedSystematics;
205}
206
207//______________________________________________________________________________
209{
210 for (auto it = m_vCommonEfficiencyTools.begin(); it != m_vCommonEfficiencyTools.end(); it++)
211 if ((**it)->applySystematicVariation(sSystematicSet) == StatusCode::FAILURE)
212 return StatusCode::FAILURE;
213 return StatusCode::SUCCESS;
214}
215
216//=================================PRIVATE-PART=================================
218{
219 std::string sDirectory = "TauAnalysisTools/" + std::string(sSharedFilesVersion) + "/EfficiencyCorrections/";
220 for (auto iEfficiencyCorrectionType : m_vEfficiencyCorrectionTypes){
221
222 if (iEfficiencyCorrectionType == SFJetIDHadTau)
223 {
224 if (m_sInputFilePathJetIDHadTau.empty()) {
225 if(m_sCampaign=="mc23"){
226 m_sInputFilePathJetIDHadTau = m_useFastSim ? sDirectory + "RNNID_TrueHadTau_mc23_v2_incl_AF3.root" : sDirectory + "RNNID_TrueHadTau_mc23_v2.root";
227 } else if (m_sCampaign=="mc20"){
228 m_sInputFilePathJetIDHadTau = m_useFastSim ? sDirectory + "RNNID_TrueHadTau_mc20_v1_incl_AF3.root" : sDirectory + "RNNID_TrueHadTau_mc20_v1.root";
229 }
230 }
231 m_sVarName = "TauScaleFactorJetIDHadTau";
232
233 std::string sJetIDWP = ConvertJetIDToString(m_iJetIDLevel);
234 if (sJetIDWP.empty()) {
235 ATH_MSG_WARNING("Could not find valid ID working point. Skip ID efficiency corrections.");
236 continue;
237 }
238
239 asg::AnaToolHandle<ITauEfficiencyCorrectionsTool>* tTool = new asg::AnaToolHandle<ITauEfficiencyCorrectionsTool>("TauAnalysisTools::CommonEfficiencyTool/JetIDHadTauTool", this);
240 m_vCommonEfficiencyTools.push_back(tTool);
241 ATH_CHECK(tTool->setProperty("InputFilePath", m_sInputFilePathJetIDHadTau));
242 ATH_CHECK(tTool->setProperty("VarName", m_sVarName));
243 ATH_CHECK(tTool->setProperty("SkipTruthMatchCheck", m_bSkipTruthMatchCheck));
244 ATH_CHECK(tTool->setProperty("WP", sJetIDWP));
245 }
246 else if (iEfficiencyCorrectionType == SFRecoHadTau)
247 {
248 if (m_sInputFilePathRecoHadTau.empty()) m_sInputFilePathRecoHadTau = sDirectory + "Reco_TrueHadTau_2026_v0.root";
249 m_sVarName = "TauScaleFactorReconstructionHadTau";
250
251 asg::AnaToolHandle<ITauEfficiencyCorrectionsTool>* tTool = new asg::AnaToolHandle<ITauEfficiencyCorrectionsTool>("TauAnalysisTools::CommonEfficiencyTool/RecoHadTauTool", this);
252 m_vCommonEfficiencyTools.push_back(tTool);
253 ATH_CHECK(tTool->setProperty("InputFilePath", m_sInputFilePathRecoHadTau));
254 ATH_CHECK(tTool->setProperty("VarName", m_sVarName));
255 ATH_CHECK(tTool->setProperty("SkipTruthMatchCheck", m_bSkipTruthMatchCheck));
256 }
257 else if (iEfficiencyCorrectionType == SFEleIDHadTau)
258 {
259 if (m_sInputFilePathEleIDHadTau.empty()) {
260 if( m_iEleIDLevel == static_cast<int>(ELEIDRNNLOOSE)){
261 m_sInputFilePathEleIDHadTau = sDirectory + "EleRNN_TrueHadTau_2026_eRNNLoose.root";
262 } else if( m_iEleIDLevel == static_cast<int>(ELEIDRNNMEDIUM)){
263 m_sInputFilePathEleIDHadTau = sDirectory + "EleRNN_TrueHadTau_2026_eRNNMedium.root";
264 } else {
265 ATH_MSG_ERROR("SFEleIDHadTau correction not supported for EleIDLevel="<<m_iEleIDLevel);
266 return StatusCode::FAILURE;
267 }
268 }
269 m_sVarName = "TauScaleFactorEleIDHadTau";
270
271 asg::AnaToolHandle<ITauEfficiencyCorrectionsTool>* tTool = new asg::AnaToolHandle<ITauEfficiencyCorrectionsTool>("TauAnalysisTools::CommonEfficiencyTool/EleIDHadTauTool", this);
272 m_vCommonEfficiencyTools.push_back(tTool);
273 ATH_CHECK(tTool->setProperty("InputFilePath", m_sInputFilePathEleIDHadTau));
274 ATH_CHECK(tTool->setProperty("VarName", m_sVarName));
275 ATH_CHECK(tTool->setProperty("SkipTruthMatchCheck", m_bSkipTruthMatchCheck));
276 ATH_CHECK(tTool->setProperty("WP", ConvertEleIDToString(m_iEleIDLevel)));
277 ATH_CHECK(tTool->setProperty("UseTauSubstructure", false));
278 }
279 else if (iEfficiencyCorrectionType == SFEleIDElectron)
280 {
281 // the path must be updated once RNN eVeto SFs are available
282 if (m_sInputFilePathEleIDElectron.empty()) {
283 if(m_useFastSim) {
284 ATH_MSG_WARNING("No fast-sim recommendation for tau electron veto, using full sim");
285 }
286
287 if(m_sCampaign=="mc23"){
288 if( m_iJetIDLevel == static_cast<int>(JETIDRNNLOOSE)){
289 m_sInputFilePathEleIDElectron = sDirectory + "EleRNN_TrueElectron_2022_looseRNNTauID_1p.root";
290 } else if( m_iJetIDLevel == static_cast<int>(JETIDRNNMEDIUM)){
291 m_sInputFilePathEleIDElectron = sDirectory + "EleRNN_TrueElectron_2022_mediumRNNTauID_1p.root";
292 }
293 else {
294 ATH_MSG_ERROR("SFEleIDElectron correction not supported for JetIDLevel="<<m_iJetIDLevel);
295 return StatusCode::FAILURE;
296 }
297 } else if(m_sCampaign=="mc20"){
298 if( m_iJetIDLevel == static_cast<int>(JETIDRNNLOOSE)){
299 m_sInputFilePathEleIDElectron = sDirectory + "EleRNN_TrueElectron_Run2_looseRNNTauID_1p.root";
300 } else if( m_iJetIDLevel == static_cast<int>(JETIDRNNMEDIUM)){
301 m_sInputFilePathEleIDElectron = sDirectory + "EleRNN_TrueElectron_Run2_mediumRNNTauID_1p_v1.root";
302 }
303 else {
304 ATH_MSG_ERROR("SFEleIDElectron correction not supported for JetIDLevel="<<m_iJetIDLevel);
305 return StatusCode::FAILURE;
306 }
307 }
308 }
309 m_sVarName = "TauScaleFactorEleIDElectron";
310
311 asg::AnaToolHandle<ITauEfficiencyCorrectionsTool>* tTool = new asg::AnaToolHandle<ITauEfficiencyCorrectionsTool>("TauAnalysisTools::CommonEfficiencyTool/EleIDElectronTool", this);
312 m_vCommonEfficiencyTools.push_back(tTool);
313 ATH_CHECK(tTool->setProperty("InputFilePath", m_sInputFilePathEleIDElectron));
314 ATH_CHECK(tTool->setProperty("VarName", m_sVarName));
315 ATH_CHECK(tTool->setProperty("SkipTruthMatchCheck", m_bSkipTruthMatchCheck));
316 ATH_CHECK(tTool->setProperty("WP", ConvertEleIDToString(m_iEleIDLevel)));
317 ATH_CHECK(tTool->setProperty("UseTauSubstructure", false));
318
319 } else if (iEfficiencyCorrectionType == SFTriggerHadTau){
320
321 if (m_sTriggerName.empty()) {
322 ATH_MSG_ERROR("Property \"Trigger\" was not set, please provide a trigger name.");
323 return StatusCode::FAILURE;
324 }
325 if (m_sInputFilePathTriggerHadTau.empty()) {
326 // Determine the input file name from the given trigger name.
327 if(m_sCampaign=="mc23a"){
328 if (m_sTriggerName.value().find("mediumRNN_tracktwoMVA") != std::string::npos) {
329 m_sInputFilePathTriggerHadTau = sDirectory+"Trigger/RNN/Trigger_TrueHadTau_data2022"+GetTriggerSFMeasurementString()+m_sTriggerName+".root";
330 }
331 else {
332 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");
333 return StatusCode::FAILURE;
334 }
335 } else if(m_sCampaign=="mc23d"){
336 if (m_sTriggerName.value().find("mediumRNN_tracktwoMVA") != std::string::npos) {
337 m_sInputFilePathTriggerHadTau = sDirectory+"Trigger/RNN/Trigger_TrueHadTau_data2023"+GetTriggerSFMeasurementString()+m_sTriggerName+".root";
338 }
339 else {
340 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");
341 return StatusCode::FAILURE;
342 }
343 } else if(m_sCampaign=="mc20"){
344 if (m_sTriggerName.value().find("tracktwoEF") != std::string::npos) {
345 // check explicitly tau160 as the root file for this trigger was renamed
346 if (m_sTriggerName.value().find("tau160") != std::string::npos) {
347 m_sInputFilePathTriggerHadTau = sDirectory+"Trigger/RNN_R22/Trigger_TrueHadTau_data2018_comb_HLT_tau160L1TAU100_medium1_tracktwoEF_v1.root";
348 } else {
349 m_sInputFilePathTriggerHadTau = sDirectory+"Trigger/RNN_R22/Trigger_TrueHadTau_data2018"+GetTriggerSFMeasurementString()+m_sTriggerName+".root";
350 }
351 } else if (m_sTriggerName.value().find("tracktwo") != std::string::npos) {
352 // check explicitly tau160 as the root file for this trigger was renamed
353 if (m_sTriggerName.value().find("tau160") != std::string::npos) {
354 m_sInputFilePathTriggerHadTau = sDirectory+"Trigger/RNN_R22/Trigger_TrueHadTau_data161718_comb_HLT_tau160_medium1_tracktwo_v1.root";
355 } else if (m_sTriggerName.value().find("tau125") != std::string::npos) {
356 // fall back to R21 recommendations for tau125 as currently SFs are not available for this trigger
357 m_sInputFilePathTriggerHadTau = sDirectory+"Trigger/RNN/Trigger_TrueHadTau_2019-summer_data161718_comb_HLT_tau125_medium1_tracktwo.root";
358 } else if (m_sTriggerName.value().find("tau60") != std::string::npos) {
359 // SFs for tau60 are only for partial period
360 m_sInputFilePathTriggerHadTau = sDirectory+"Trigger/RNN_R22/Trigger_TrueHadTau_data1718"+GetTriggerSFMeasurementString()+m_sTriggerName+".root";
361 } else {
362 m_sInputFilePathTriggerHadTau = sDirectory+"Trigger/RNN_R22/Trigger_TrueHadTau_data161718"+GetTriggerSFMeasurementString()+m_sTriggerName+".root";
363 }
364 } else {
365 ATH_MSG_ERROR("Trigger " << m_sTriggerName << " is not supported. Please fix \"TriggerName\" property. If this is correct, then please contact the tau trigger coordinators");
366 return StatusCode::FAILURE;
367 }
368 } else {
369 ATH_MSG_ERROR("SFs are not available for " << m_sCampaign << " campaign. If the config is correct, then please contact the tau trigger coordinators");
370 return StatusCode::FAILURE;
371 }
372 }
373 m_sVarName = "TauScaleFactorTriggerHadTau";
374
375 asg::AnaToolHandle<ITauEfficiencyCorrectionsTool>* tTool = new asg::AnaToolHandle<ITauEfficiencyCorrectionsTool>("TauAnalysisTools::CommonEfficiencyTool/TriggerHadTauTool", this);
376 m_vCommonEfficiencyTools.push_back(tTool);
377 ATH_CHECK(tTool->setProperty("InputFilePath", m_sInputFilePathTriggerHadTau));
378 ATH_CHECK(tTool->setProperty("VarName", m_sVarName));
379 ATH_CHECK(tTool->setProperty("SkipTruthMatchCheck", m_bSkipTruthMatchCheck));
380 ATH_CHECK(tTool->setProperty("WP", ConvertTriggerIDToString(m_iJetIDLevel)));
381 ATH_CHECK(tTool->setProperty("DoTauTrig", true));
382 }
383 else {
384 ATH_MSG_WARNING("unsupported EfficiencyCorrectionsType with enum " << iEfficiencyCorrectionType);
385 }
386 }
387
388 return StatusCode::SUCCESS;
389}
390
391// auto detection of simulation flavour, used to cross check configuration of tool
392//______________________________________________________________________________
394{
395 if (inputMetaStore()->contains<xAOD::FileMetaData>("FileMetaData")) {
396 const xAOD::FileMetaData* fmd = nullptr;
397 ATH_CHECK( inputMetaStore()->retrieve( fmd, "FileMetaData" ) );
398 std::string simType("");
399 bool result = fmd->value( xAOD::FileMetaData::simFlavour , simType );
400 // if no result -> no simFlavor metadata, so must be data
401 if(result) std::transform(simType.begin(), simType.end(), simType.begin(), ::toupper);
402
403 if( simType.find("ATLFAST3") != std::string::npos && !m_useFastSim){
404 ATH_MSG_WARNING("Input file is AF3 sample but you are _not_ using AF3 corrections and uncertainties, you should set \"useFastSim\" to \"true\"");
405 } else if (simType.find("FULLG4")!=std::string::npos && m_useFastSim){
406 ATH_MSG_WARNING("Input file is full simulation but you are using AF3 corrections and uncertainties, you should set \"useFastSim\" to \"false\"");
407 }
408 }
409
410 return StatusCode::SUCCESS;
411}
412
413//______________________________________________________________________________
414std::string TauEfficiencyCorrectionsTool::ConvertJetIDToString(const int iLevel) const
415{
416 switch(iLevel)
417 {
418 case JETIDNONE:
419 return "none";
420 case JETIDRNNVERYLOOSE:
421 ATH_MSG_WARNING("Efficiency corrections for JETIDRNNVERYLOOSE working point are not supported.");
422 return "";
423 case JETIDRNNLOOSE:
424 return "jetrnnsigloose";
425 case JETIDRNNMEDIUM:
426 return "jetrnnsigmedium";
427 case JETIDRNNTIGHT:
428 return "jetrnnsigtight";
429 default:
430 ATH_MSG_WARNING("No valid JetID level passed.");
431 return "";
432 }
433}
434
435std::string TauEfficiencyCorrectionsTool::ConvertEleIDToString(const int iLevel) const
436{
437 switch(iLevel)
438 {
439 case ELEIDRNNTIGHT:
440 return "eleRNNTight";
441 case ELEIDRNNMEDIUM:
442 return "eleRNNMedium";
443 case ELEIDRNNLOOSE:
444 return "eleRNNLoose";
445 default:
446 ATH_MSG_WARNING("No valid EleID level passed.");
447 return "";
448 }
449}
450
451//______________________________________________________________________________
453{
454 switch(iLevel)
455 {
456 case JETIDRNNLOOSE:
457 return "loose";
458 case JETIDRNNMEDIUM:
459 return "medium";
460 case JETIDRNNTIGHT:
461 return "tight";
462 default:
463 ATH_MSG_WARNING("No valid TriggerID level passed.");
464 return "";
465 }
466}
467
468//______________________________________________________________________________
470{
471 std::string sMeasurement = "_comb_";
472
473 if (m_sTriggerSFMeasurement == "Ztautau")
474 sMeasurement = "_Ztt_";
475 else if (m_sTriggerSFMeasurement == "ttbar")
476 sMeasurement = "_ttbar_";
477 else if (m_sTriggerSFMeasurement != "combined")
478 ATH_MSG_WARNING("Trigger scale factor measurement \'" << m_sTriggerSFMeasurement << "\' is not supported. \'combined\' is used instead.");
479
480 return sMeasurement;
481}
482
484{
485 // read the random run rumber from the EventInfo
487 {
488 static const SG::ConstAccessor<unsigned int> acc_rnd("RandomRunNumber");
489 const xAOD::EventInfo* eventInfo = nullptr;
490 if (!evtStore()->contains<xAOD::EventInfo>("EventInfo") || !evtStore()->retrieve(eventInfo, "EventInfo").isSuccess())
491 {
492 ANA_MSG_ERROR("Could not retrieve EventInfo");
493 return StatusCode::FAILURE;
494 }
495
496 if (!acc_rnd.isAvailable(*eventInfo))
497 {
498 ANA_MSG_ERROR("Failed to find the RandomRunNumber decoration. Call the apply() method from the PileupReweightingTool beforehand to get period dependent SFs.");
499 return StatusCode::FAILURE;
500 }
501
502 m_iRunNumber = acc_rnd(*eventInfo);
503
504 ANA_MSG_VERBOSE("Read RandomRunNumber as " << m_iRunNumber);
505 }
506
507 return StatusCode::SUCCESS;
508}
509
510} // namespace TauAnalysisTools
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
#define ANA_MSG_ERROR(xmsg)
Macro printing error messages.
#define ANA_MSG_VERBOSE(xmsg)
Macro printing verbose messages.
#define ANA_CHECK(EXP)
check whether the given expression was successful
#define ANA_CHECK_SET_TYPE(TYPE)
set the type for ANA_CHECK to report failures
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.
virtual StatusCode initialize()
Function initialising the tool.
virtual bool isAffectedBySystematic(const CP::SystematicVariation &systematic) const
returns: whether this tool is affected by the given systematics
virtual void printConfig() const
Print tool configuration.
virtual CP::SystematicSet affectingSystematics() const
returns: the list of all systematics this tool can be affected by
TauEfficiencyCorrectionsTool(const std::string &sName)
Create a proper constructor for Athena.
virtual StatusCode beginInputFile()
Function called when a new input file is opened.
virtual CP::SystematicSet recommendedSystematics() const
returns: the list of all systematics this tool recommends to use
Gaudi::Property< std::vector< int > > m_vecEfficiencyCorrectionTypes
virtual CP::CorrectionCode getEfficiencyScaleFactor(const xAOD::TauJet &xTau, double &eff, unsigned int iRunNumber=0)
Get the tau efficiency scale factor.
StatusCode beginEvent()
Function called when a new events is loaded.
std::vector< asg::AnaToolHandle< ITauEfficiencyCorrectionsTool > * > m_vCommonEfficiencyTools
virtual CP::CorrectionCode applyEfficiencyScaleFactor(const xAOD::TauJet &xTau, unsigned int iRunNumber=0)
Decorate the tau with its efficiency scale factor.
virtual StatusCode applySystematicVariation(const CP::SystematicSet &systConfig)
effects: configure this tool for the given list of systematic variations.
a modified tool handle that allows its owner to configure new tools from the C++ side
AsgMetadataTool(const std::string &name)
Normal ASG tool constructor with a name.
MetaStorePtr_t inputMetaStore() const
Accessor for the input metadata store.
bool eventType(EventType type) const
Check for one particular bitmask value.
@ IS_SIMULATION
true: simulation, false: data
@ simFlavour
Fast or Full sim [string].
bool value(MetaDataType type, std::string &val) const
Get a pre-defined string value out of the object.
bool contains(const std::string &s, const std::string &regx)
does a string contain the substring
Definition hcg.cxx:116
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.