ATLAS Offline Software
Loading...
Searching...
No Matches
ElectronChargeEfficiencyCorrectionTool.h File Reference
#include "AsgTools/AsgTool.h"
#include "EgammaAnalysisInterfaces/IAsgElectronEfficiencyCorrectionTool.h"
#include "PATInterfaces/ISystematicsTool.h"
#include "TH2.h"
#include "AthContainers/AuxElement.h"
#include "xAODEgamma/ElectronFwd.h"
#include "ColumnarMode/ColumnarMode.h"
#include <map>
#include <string>
#include <vector>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  xAOD
 ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.

Functions

namespace ADD_CMODE (CP)

Function Documentation

◆ ADD_CMODE()

namespace ADD_CMODE ( CP )

Standard constructor

Standard destructor

Gaudi Service Interface method implementations

Retrieve the Scale factor

Decorate the electron

Returns whether this tool is affected by the given systematics

Returns the list of all systematics this tool can be affected by

Returns the list of all systematics this tool recommends to use

returns: the currently applied systematics

print available/implemented correlation models

Get the charge flip rate rate given pt, eta, histogram

Force the data type to a given value

The Event info collection name

Histogram that holds the correction rates for Monte Carlo

The name of the input file that contains the histograms

The name of the folder defining the LH/iso working point

Lower limit of eta range where corrections are available; taken from histogram

Upper limit of eta range where corrections are available; taken from histogram

Lower limit of pt range where corrections are available; taken from histogram

Upper limit of pt range where corrections are available; taken from histogram

Factor for GeV <-> MeV switching

Currently applied systematics

Decorator

Definition at line 1 of file ElectronChargeEfficiencyCorrectionTool.h.

25 {
26
29 , public asg::AsgTool
30{
31 ASG_TOOL_CLASS(ElectronChargeEfficiencyCorrectionTool,
32 IAsgElectronEfficiencyCorrectionTool)
33
34public:
36 ElectronChargeEfficiencyCorrectionTool(const std::string& name);
37
39 virtual ~ElectronChargeEfficiencyCorrectionTool();
40
41public:
43 virtual StatusCode initialize() override final;
44
45
47 virtual CP::CorrectionCode getEfficiencyScaleFactor(
48 const xAOD::Electron& inputObject,
49 double& sf) const override final;
50
52 virtual CP::CorrectionCode applyEfficiencyScaleFactor(
53 const xAOD::Electron& inputObject) const override final;
54
56 virtual bool isAffectedBySystematic(
57 const CP::SystematicVariation& systematic) const override final;
58
60 virtual CP::SystematicSet affectingSystematics() const override final;
61
63 virtual CP::SystematicSet recommendedSystematics() const override final;
64
65 virtual StatusCode applySystematicVariation(const CP::SystematicSet& systConfig) override final;
66
67
69 virtual const CP::SystematicSet& appliedSystematics() const override final
70 {
71 return *m_appliedSystematics;
72 }
73
74 virtual int systUncorrVariationIndex(const xAOD::Electron&) const override final
75 {
77 "systUncorrVariationIndex is not implemented in "
78 "ElectronChargeEfficiencyCorrectionTool");
79 return -999;
80 }
81
82 virtual CP::CorrectionCode getEfficiencyScaleFactor(
83 const double, const double, const unsigned int,
84 double&) const override final{
86 "No toysimplemented in "
87 "ElectronChargeEfficiencyCorrectionTool");
89 }
90 //
91 virtual int getNumberOfToys() const override final
92 {
94 "No toysimplemented in "
95 "ElectronChargeEfficiencyCorrectionTool");
96 return -1;
97 };
99 virtual void printCorrelationModels() const override final
100 {
102 "ONLY A DEFAULT Correlation model available for now");
103 };
104
105
106private:
107 StatusCode registerSystematics();
109 float getChargeFlipRate(double eta,
110 double pt,
111 TH2* hrates,
112 double& flipRate) const;
113
115 int m_dataTypeOverwrite;
116 //
117 //
119 std::string m_eventInfoCollectionName;
120
122 std::map<std::string, std::vector<TH2*>>
123 m_SF_SS; // keys (e.g. RunNumber223333_319200_Nvtx0_10_Phi1.5_1.6) mapping
124 // to vector of SF histograms --> vector m_SF: 0=nominal, 1=stat,
125 // 2,3,4...n=syst
126 std::map<std::string, std::vector<TH2*>>
127 m_SF_OS; // keys (e.g. RunNumber223333_319200_Nvtx0_10_Phi1.5_1.6) mapping
128 // to vector of SF histograms --> vector m_SF: 0=nominal, 1=stat,
129 // 2,3,4...n=syst
130
131 // cuts // further variables to bin in
132 std::vector<unsigned int> m_RunNumbers;
133 bool m_useRandomRunNumber;
134 unsigned int m_defaultRandomRunNumber;
135
137 std::string m_filename;
138
140 std::string m_workingPoint;
141
144 double m_eta_lowlimit;
145
148 double m_eta_uplimit;
149
152 double m_pt_lowlimit;
153
156 double m_pt_uplimit;
157
159 float m_gevmev;
160
161 // Systematics
162 std::vector<std::string> m_systematics;
163
164 std::map<CP::SystematicSet, CP::SystematicSet> m_filtered_sys_sets;
165 // boost::unordered_map<CP::SystematicSet,EffiCollection*> m_sf_sets;
166 CP::SystematicSet m_mySysConf;
167 CP::SystematicSet m_affectingSys;
168
170 CP::SystematicSet* m_appliedSystematics;
171
173 std::string m_sf_decoration_name;
174 SG::Decorator<float>* m_sfDec;
175};
176
177} // End namespace ADD_CMODE(CP)
Scalar eta() const
pseudorapidity method
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_INFO(x,...)
@ Error
Some error happened during the object correction.
Apply the correction for the difference in electron charge mis-ID rates in MC/data.
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
::StatusCode StatusCode
StatusCode definition for legacy code.
SG::Decorator< T, ALLOC > Decorator
Helper class to provide type-safe access to aux data, specialized for JaggedVecElt.
Definition AuxElement.h:576
Electron_v1 Electron
Definition of the current "egamma version".
Definition Electron.h:17
void initialize()