ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
TauID
TauAnalysisTools
TauAnalysisTools
CommonSmearingTool.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef TAUANALYSISTOOLS_COMMONSMEARINGTOOL_H
6
#define TAUANALYSISTOOLS_COMMONSMEARINGTOOL_H
7
8
/*
9
author: Dirk Duschinger
10
mail: dirk.duschinger@cern.ch
11
documentation in: ../README.rst
12
*/
13
14
// Framework include(s):
15
#include "
AsgTools/AsgMetadataTool.h
"
16
#include "
AsgTools/AnaToolHandle.h
"
17
#include "
AsgTools/PropertyWrapper.h
"
18
19
// EDM include(s):
20
#include "
xAODTau/TauJet.h
"
21
#include "
xAODTruth/TruthParticle.h
"
22
#include "
PATInterfaces/CorrectionCode.h
"
23
24
// Local include(s):
25
#include "
TauAnalysisTools/Enums.h
"
26
#include "
TauAnalysisTools/ITauSmearingTool.h
"
27
#include "
TauAnalysisTools/ITauResolutionTool.h
"
28
#include "
TauAnalysisTools/HelperFunctions.h
"
29
30
#include <map>
31
#include "TH1.h"
32
33
class
TFile;
34
35
namespace
ADD_CMODE(TauAnalysisTools)
36
{
37
38
class
CommonSmearingTool
39
:
public
virtual
ITauSmearingTool
40
,
public
asg::AsgMetadataTool
41
{
43
ASG_TOOL_CLASS
( CommonSmearingTool, TauAnalysisTools::ITauSmearingTool )
44
45
public
:
46
47
CommonSmearingTool(
const
std::string& sName);
48
49
~CommonSmearingTool();
50
51
virtual
StatusCode
initialize
();
52
53
// CommonSmearingTool pure virtual public functionality
54
//__________________________________________________________________________
55
57
virtual
CP::CorrectionCode
applyCorrection(
xAOD::TauJet
& xTau )
const
;
58
60
virtual
CP::CorrectionCode
correctedCopy(
const
xAOD::TauJet
& xTau,
61
xAOD::TauJet
*& xTauCopy)
const
;
62
64
virtual
bool
isAffectedBySystematic(
const
CP::SystematicVariation
& systematic )
const
;
65
67
virtual
CP::SystematicSet
affectingSystematics()
const
;
68
70
virtual
CP::SystematicSet
recommendedSystematics()
const
;
71
74
virtual
StatusCode applySystematicVariation (
const
CP::SystematicSet
& sSystematicSet);
75
76
protected
:
77
78
std::string ConvertProngToString(
const
int
iProngness)
const
;
79
80
std::map<std::string, TH1*> m_mSF;
81
std::unordered_map < CP::SystematicSet, std::string > m_mSystematicSets;
82
const
CP::SystematicSet
* m_sSystematicSet;
83
std::map<std::string, int> m_mSystematics;
84
std::map<std::string, std::string> m_mSystematicsHistNames;
85
86
// std::function<double> m_fX;
87
double (*m_fX)(
const
xAOD::TauJet
& xTau);
88
double (*m_fY)(
const
xAOD::TauJet
& xTau);
89
90
template
<
class
T>
91
void
ReadInputs(TFile* fFile, std::map<std::string, T>& mMap);
92
93
virtual
CP::CorrectionCode
getValue(
const
std::string& sHistName,
94
const
xAOD::TauJet
& xTau,
95
double
& dEfficiencyScaleFactor)
const
;
96
97
void
generateSystematicSets();
98
99
Gaudi::Property<std::string> m_sInputFilePath{
this
,
"InputFilePath"
,
""
};
100
Gaudi::Property<bool> m_bSkipTruthMatchCheck{
this
,
"SkipTruthMatchCheck"
,
false
};
101
Gaudi::Property<bool> m_bApplyFading{
this
,
"ApplyFading"
,
true
};
102
Gaudi::Property<bool> m_bMVATESQualityCheck{
this
,
"MVATESQualityCheck"
,
true
};
103
Gaudi::Property<bool> m_bApplyInsituCorrection{
this
,
"ApplyInsituCorrection"
,
true
};
104
105
bool
m_bIsData;
106
bool
m_bIsConfigured;
107
108
asg::AnaToolHandle<TauAnalysisTools::ITauResolutionTool> m_tauResolutionTool;
109
110
TauAnalysisTools::TruthMatchedParticleType
m_eCheckTruth;
111
CP::SystematicSet m_sAffectingSystematics;
112
CP::SystematicSet m_sRecommendedSystematics;
113
114
private
:
115
116
CxxUtils::CachedValue<bool> m_bIsTESCompatibilityCheckAvailable;
117
118
// Execute at each event
119
virtual
StatusCode
beginEvent();
120
121
};
122
}
// namespace ADD_CMODE(TauAnalysisTools)
123
124
#endif
// TAUANALYSISTOOLS_COMMONSMEARINGTOOL_H
AnaToolHandle.h
AsgMetadataTool.h
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition
AsgToolMacros.h:68
CorrectionCode.h
TruthParticle.h
ITauResolutionTool.h
ITauSmearingTool.h
Enums.h
HelperFunctions.h
PropertyWrapper.h
TauJet.h
CP::CorrectionCode
Return value from object correction CP tools.
Definition
CorrectionCode.h:31
CP::SystematicSet
Class to wrap a set of SystematicVariations.
Definition
SystematicSet.h:31
CP::SystematicVariation
Definition
SystematicVariation.h:47
asg::AsgMetadataTool
Base class for dual-use tools that provide file metadata access.
Definition
AsgMetadataTool.h:48
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TauAnalysisTools::TruthMatchedParticleType
TruthMatchedParticleType
Definition
PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/Enums.h:107
xAOD::TauJet
TauJet_v3 TauJet
Definition of the current "tau version".
Definition
TauJet.h:17
initialize
void initialize()
Definition
run_EoverP.cxx:894
Generated on
for ATLAS Offline Software by
1.17.0