ATLAS Offline Software
EgammaCalibrationAndSmearingTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef EGAMMA_CALIB_TOOL_H_
6 #define EGAMMA_CALIB_TOOL_H_
7 
8 #include <array>
9 #include <functional>
10 #include <map>
11 #include <memory>
12 #include <string>
13 
17 #include "AsgTools/AsgTool.h"
26 #include "xAODEgamma/Egamma.h"
27 #include "xAODEgamma/Electron.h"
28 #include "xAODEgamma/Photon.h"
30 
31 // Forward declarations
33 namespace egGain {
34 class GainTool;
35 class GainUncertainty;
36 } // namespace egGain
37 class LinearityADC;
38 class TH2;
39 
40 namespace xAOD {
41 inline float get_phi_calo(const xAOD::CaloCluster& cluster, int author,
42  bool do_throw = false) {
43  static const SG::ConstAccessor<float> phiCaloAcc("phiCalo");
44  double phi_calo;
46  phi_calo = cluster.phi();
48  phi_calo)) {
49  } else if (phiCaloAcc.isAvailable(cluster)) {
50  phi_calo = phiCaloAcc(cluster);
51  } else {
52  asg::AsgMessaging msg("get_phi_calo");
53  msg.msg(MSG::ERROR) << "phiCalo not available as auxilliary variable"
54  << endmsg;
55  if (do_throw) {
56  throw std::runtime_error("phiCalo not available as auxilliary variable");
57  }
58  msg.msg(MSG::WARNING) << "using phi as phiCalo" << endmsg;
59  phi_calo = cluster.phi();
60  }
61  return phi_calo;
62 }
63 
64 inline float get_eta_calo(const xAOD::CaloCluster& cluster, int author,
65  bool do_throw = false) {
66  double eta_calo;
67  static const SG::ConstAccessor<float> etaCaloAcc("etaCalo");
69  eta_calo = cluster.eta();
71  eta_calo)) {
72  } else if (etaCaloAcc.isAvailable(cluster)) {
73  eta_calo = etaCaloAcc(cluster);
74  } else {
75  asg::AsgMessaging msg("get_eta_calo");
76  msg.msg(MSG::ERROR) << "etaCalo not available as auxilliary variable"
77  << endmsg;
78  if (do_throw) {
79  throw std::runtime_error("etaCalo not available as auxilliary variable");
80  }
81  msg.msg(MSG::WARNING) << "using eta as etaCalo" << endmsg;
82  }
83  return eta_calo;
84 }
85 } // namespace xAOD
86 
87 namespace CP {
88 
90  : virtual public IEgammaCalibrationAndSmearingTool,
91  public asg::AsgMetadataTool {
92  // Create a proper constructor for Athena
96 
97  public:
98  enum class ScaleDecorrelation {
99  FULL,
100  ONENP,
101  FULL_ETA_CORRELATED,
102  ONENP_PLUS_UNCONR
103  };
105  static const int AUTO = 2; // this is used as a third state for boolean
106  // properties (true/false/automatic)
107  typedef unsigned int RandomNumber;
108  typedef std::function<int(const EgammaCalibrationAndSmearingTool&,
109  const xAOD::Egamma&, const xAOD::EventInfo&)>
111  typedef std::function<bool(const xAOD::Egamma&)> EgammaPredicate;
112 
113  EgammaCalibrationAndSmearingTool(const std::string& name);
115 
116  StatusCode initialize() override;
117 
118  // Apply the correction on a modifyable egamma object
119  virtual CP::CorrectionCode applyCorrection(xAOD::Egamma&) const override;
121  xAOD::Egamma& input, const xAOD::EventInfo& event_info) const;
122 
123  // Create a corrected copy from a constant egamma object
124  // virtual CP::CorrectionCode correctedCopy(const xAOD::Egamma&,
125  // xAOD::Egamma*&);
127  xAOD::Electron*&) const override;
129  xAOD::Photon*&) const override;
130  double getEnergy(const xAOD::Photon&) const; // for python usage
131  double getEnergy(const xAOD::Electron&) const; // for python usage
132 
133  // systematics
134  // Which systematics have an effect on the tool's behaviour?
135  virtual CP::SystematicSet affectingSystematics() const override;
136  // Is the tool affected by a specific systematic?
137  virtual bool isAffectedBySystematic(
138  const CP::SystematicVariation& systematic) const override;
139  // Systematics to be used for physics analysis
140  virtual CP::SystematicSet recommendedSystematics() const override;
141  // Use specific systematic
143  const CP::SystematicSet& systConfig) override;
144  virtual void setRandomSeedFunction(const IdFunction&& function) {
145  m_set_seed_function = function;
146  }
148 
149  virtual double resolution(
150  double energy, double cl_eta, double cl_etaCalo,
152  bool withCT = false) const override;
153 
154  private:
155  static const unsigned int m_Run2Run3runNumberTransition = 400000;
156 
157  std::string m_ESModel;
167  double m_varSF;
168  std::string m_ResolutionType;
174  // flags duplicated from the underlying ROOT tool
193 
194  // 2D histrogram (eta,phi) for a correction to cope with calo distortion
195  // (sagging)
196  std::unique_ptr<TH2> m_caloDistPhiUnifCorr;
197 
198  Gaudi::Property<bool> m_fixForMissingCells{
199  this, "FixForMissingCells", true,
200  "AOD fix for cell recovery in core egamma cluster"};
201 
202  void setupSystematics();
203 
204  // if using eta not abs_eta
206  {
207  EtaCaloPredicate(double eta_min, double eta_max) : m_eta_min(eta_min), m_eta_max(eta_max) {}
208  bool operator()(const xAOD::Egamma& p) {
209  const double eta = xAOD::get_eta_calo(*p.caloCluster(),p.author());
210  return (eta >= m_eta_min and eta < m_eta_max);
211  }
212  private:
214  };
215 
216  const EgammaPredicate EtaCaloPredicateFactory(double eta_min, double eta_max) const
217  {
218  return EtaCaloPredicate(eta_min, eta_max);
219  }
220 
221  // this is needed (instead of a simpler lambda since a clang bug, see
222  // https://its.cern.ch/jira/browse/ATLASG-688)
224  AbsEtaCaloPredicate(double eta_min, double eta_max)
225  : m_eta_min(eta_min), m_eta_max(eta_max) {}
226  bool operator()(const xAOD::Egamma& p) {
227  const double aeta =
228  std::abs(xAOD::get_eta_calo(*p.caloCluster(), p.author()));
229  return (aeta >= m_eta_min and aeta < m_eta_max);
230  }
231 
232  private:
234  };
235 
237  double eta_max) const {
238  /*return [eta_min, eta_max](const xAOD::Egamma& p) {
239  const double aeta = std::abs(xAOD::get_eta_calo(*p.caloCluster()));
240  return (aeta >= eta_min and aeta < eta_max); };*/
241  return AbsEtaCaloPredicate(eta_min, eta_max);
242  }
243 
245  std::pair<double, double> edges) const {
246  return AbsEtaCaloPredicateFactory(edges.first, edges.second);
247  }
248 
249  const std::vector<EgammaPredicate> AbsEtaCaloPredicatesFactory(
250  const std::vector<std::pair<double, double>>& edges) const {
251  std::vector<EgammaPredicate> result;
252  result.reserve(edges.size());
253  for (const auto& it : edges) {
254  result.push_back(AbsEtaCaloPredicateFactory(it.first, it.second));
255  }
256  return result;
257  }
258 
259  const std::vector<EgammaPredicate> AbsEtaCaloPredicatesFactory(
260  const std::vector<double>& edges) const {
261  std::vector<EgammaPredicate> result;
262  result.reserve(edges.size() - 1);
263  auto it2 = edges.begin();
264  auto it = it2++;
265  for (; it2 != edges.end(); ++it, ++it2) {
266  result.push_back(AbsEtaCaloPredicateFactory(*it, *it2));
267  }
268  return result;
269  }
270 
272  DoubleOrAbsEtaCaloPredicate(double eta1_min, double eta1_max,
273  double eta2_min, double eta2_max)
274  : m_eta1_min(eta1_min),
275  m_eta1_max(eta1_max),
276  m_eta2_min(eta2_min),
277  m_eta2_max(eta2_max) {}
278 
279  bool operator()(const xAOD::Egamma& p) {
280  const double aeta =
281  std::abs(xAOD::get_eta_calo(*p.caloCluster(), p.author()));
282  return ((aeta >= m_eta1_min and aeta < m_eta1_max) or
283  (aeta >= m_eta2_min and aeta < m_eta2_max));
284  }
285 
286  private:
288  };
289 
291  double eta1_min, double eta1_max, double eta2_min,
292  double eta2_max) const {
293  return DoubleOrAbsEtaCaloPredicate(eta1_min, eta1_max, eta2_min, eta2_max);
294  }
295 
297 
298  public:
299  virtual double getEnergy(xAOD::Egamma*, const xAOD::EventInfo*);
300  virtual double getElectronMomentum(const xAOD::Electron*,
301  const xAOD::EventInfo*);
302  double getResolution(const xAOD::Egamma& particle,
303  bool withCT = true) const override;
304  double intermodule_correction(double Ecl, double phi, double eta) const;
305  double correction_phi_unif(double eta, double phi) const;
306 
307  private:
309  "calibration service"};
310  std::unique_ptr<egGain::GainUncertainty> m_gain_tool_run2;
311  std::shared_ptr<LinearityADC> m_ADCLinearity_tool;
315 
316  // A pointer to the underlying ROOT tool
317  std::unique_ptr<AtlasRoot::egammaEnergyCorrectionTool> m_rootTool;
318  std::string m_MVAfolder;
319 
320  struct SysInfo {
323  };
324 
325  std::map<CP::SystematicVariation, SysInfo> m_syst_description;
326  std::map<CP::SystematicVariation, egEnergyCorr::Resolution::Variation>
328 
329  // These are modified by the ISystematicsTool methods
334 
336 
338 
340  const xAOD::Egamma& p, const xAOD::EventInfo& event_info) const;
342  const xAOD::Egamma& p, const xAOD::EventInfo& event_info) const;
343 };
344 
345 } // namespace CP
346 #endif
xAOD::CaloCluster_v1::phi
virtual double phi() const
The azimuthal angle ( ) of the particle.
Definition: CaloCluster_v1.cxx:256
CP::EgammaCalibrationAndSmearingTool::m_useFastSim
int m_useFastSim
Definition: EgammaCalibrationAndSmearingTool.h:170
CP::EgammaCalibrationAndSmearingTool::DoubleOrAbsEtaCaloPredicate::DoubleOrAbsEtaCaloPredicate
DoubleOrAbsEtaCaloPredicate(double eta1_min, double eta1_max, double eta2_min, double eta2_max)
Definition: EgammaCalibrationAndSmearingTool.h:272
CP::EgammaCalibrationAndSmearingTool::EtaCaloPredicate::operator()
bool operator()(const xAOD::Egamma &p)
Definition: EgammaCalibrationAndSmearingTool.h:208
CP::EgammaCalibrationAndSmearingTool::m_doADCLinearityCorrection
int m_doADCLinearityCorrection
Definition: EgammaCalibrationAndSmearingTool.h:179
CP::EgammaCalibrationAndSmearingTool::EtaCaloPredicate
Definition: EgammaCalibrationAndSmearingTool.h:206
CP::EgammaCalibrationAndSmearingTool::getElectronMomentum
virtual double getElectronMomentum(const xAOD::Electron *, const xAOD::EventInfo *)
Definition: EgammaCalibrationAndSmearingTool.cxx:1140
PropertyWrapper.h
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
CP::EgammaCalibrationAndSmearingTool::DoubleOrAbsEtaCaloPredicateFactory
const EgammaPredicate DoubleOrAbsEtaCaloPredicateFactory(double eta1_min, double eta1_max, double eta2_min, double eta2_max) const
Definition: EgammaCalibrationAndSmearingTool.h:290
get_generator_info.result
result
Definition: get_generator_info.py:21
CP::EgammaCalibrationAndSmearingTool::isAffectedBySystematic
virtual bool isAffectedBySystematic(const CP::SystematicVariation &systematic) const override
Declare the interface that this class provides.
Definition: EgammaCalibrationAndSmearingTool.cxx:1158
CP::EgammaCalibrationAndSmearingTool::affectingSystematics
virtual CP::SystematicSet affectingSystematics() const override
the list of all systematics this tool can be affected by
Definition: EgammaCalibrationAndSmearingTool.cxx:1164
CP::EgammaCalibrationAndSmearingTool::m_ResolutionType
std::string m_ResolutionType
Definition: EgammaCalibrationAndSmearingTool.h:168
CP::EgammaCalibrationAndSmearingTool::AbsEtaCaloPredicate::m_eta_min
float m_eta_min
Definition: EgammaCalibrationAndSmearingTool.h:233
PATCore::ParticleType::Type
Type
Definition: PATCoreEnums.h:35
CP::EgammaCalibrationAndSmearingTool::EgammaCalibrationAndSmearingTool
EgammaCalibrationAndSmearingTool(const std::string &name)
Definition: EgammaCalibrationAndSmearingTool.cxx:266
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
correlationModel::FULL
@ FULL
Definition: AsgElectronEfficiencyCorrectionTool.cxx:49
CP::EgammaCalibrationAndSmearingTool::AbsEtaCaloPredicate::operator()
bool operator()(const xAOD::Egamma &p)
Definition: EgammaCalibrationAndSmearingTool.h:226
CP::EgammaCalibrationAndSmearingTool::m_use_ep_combination
bool m_use_ep_combination
Definition: EgammaCalibrationAndSmearingTool.h:181
CP::EgammaCalibrationAndSmearingTool::recommendedSystematics
virtual CP::SystematicSet recommendedSystematics() const override
the list of all systematics this tool recommends to use
Definition: EgammaCalibrationAndSmearingTool.cxx:1903
CP::EgammaCalibrationAndSmearingTool::m_caloDistPhiUnifCorr
std::unique_ptr< TH2 > m_caloDistPhiUnifCorr
Definition: EgammaCalibrationAndSmearingTool.h:196
CP::EgammaCalibrationAndSmearingTool::getResolution
double getResolution(const xAOD::Egamma &particle, bool withCT=true) const override
Definition: EgammaCalibrationAndSmearingTool.cxx:815
CP::EgammaCalibrationAndSmearingTool::DoubleOrAbsEtaCaloPredicate::operator()
bool operator()(const xAOD::Egamma &p)
Definition: EgammaCalibrationAndSmearingTool.h:279
CP::EgammaCalibrationAndSmearingTool::m_currentScaleVariation_data
egEnergyCorr::Scale::Variation m_currentScaleVariation_data
Definition: EgammaCalibrationAndSmearingTool.h:331
CP::EgammaCalibrationAndSmearingTool::AbsEtaCaloPredicate
Definition: EgammaCalibrationAndSmearingTool.h:223
CP::EgammaCalibrationAndSmearingTool::m_useSaccCorrection
int m_useSaccCorrection
Definition: EgammaCalibrationAndSmearingTool.h:192
CP::EgammaCalibrationAndSmearingTool::ResolutionDecorrelation::ONENP
@ ONENP
CP::EgammaCalibrationAndSmearingTool::correctedCopy
virtual CP::CorrectionCode correctedCopy(const xAOD::Electron &, xAOD::Electron *&) const override
Definition: EgammaCalibrationAndSmearingTool.cxx:844
CP::EgammaCalibrationAndSmearingTool::m_decorrelation_model_name
std::string m_decorrelation_model_name
Definition: EgammaCalibrationAndSmearingTool.h:158
SystematicSet.h
skel.it
it
Definition: skel.GENtoEVGEN.py:396
CP::EgammaCalibrationAndSmearingTool::m_currentScalePredicate
EgammaPredicate m_currentScalePredicate
Definition: EgammaCalibrationAndSmearingTool.h:335
CP::SystematicSet
Class to wrap a set of SystematicVariations.
Definition: SystematicSet.h:31
egammaEnergyCorrectionTool.h
egGain::GainTool
Definition: GainTool.h:18
CP::EgammaCalibrationAndSmearingTool::m_gain_tool
egGain::GainTool * m_gain_tool
Definition: EgammaCalibrationAndSmearingTool.h:312
CP::EgammaCalibrationAndSmearingTool::m_doScaleCorrection
int m_doScaleCorrection
Definition: EgammaCalibrationAndSmearingTool.h:165
CP::EgammaCalibrationAndSmearingTool::ResolutionDecorrelation
ResolutionDecorrelation
Definition: EgammaCalibrationAndSmearingTool.h:104
CP::EgammaCalibrationAndSmearingTool::m_doLeakageCorrection
int m_doLeakageCorrection
Definition: EgammaCalibrationAndSmearingTool.h:180
CP::EgammaCalibrationAndSmearingTool::~EgammaCalibrationAndSmearingTool
~EgammaCalibrationAndSmearingTool()
Definition: EgammaCalibrationAndSmearingTool.cxx:332
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
CP::EgammaCalibrationAndSmearingTool::m_simulation
PATCore::ParticleDataType::DataType m_simulation
Definition: EgammaCalibrationAndSmearingTool.h:172
xAOD::Egamma_v1
Definition: Egamma_v1.h:56
CP::EgammaCalibrationAndSmearingTool::DoubleOrAbsEtaCaloPredicate::m_eta1_max
float m_eta1_max
Definition: EgammaCalibrationAndSmearingTool.h:287
SG::ConstAccessor< float >
CP::EgammaCalibrationAndSmearingTool::m_use_mva_calibration
int m_use_mva_calibration
Definition: EgammaCalibrationAndSmearingTool.h:182
CP::EgammaCalibrationAndSmearingTool::RandomNumber
unsigned int RandomNumber
Definition: EgammaCalibrationAndSmearingTool.h:107
egGain
Definition: EgammaCalibrationAndSmearingTool.h:33
CP::EgammaCalibrationAndSmearingTool::m_use_temp_correction201215
int m_use_temp_correction201215
Definition: EgammaCalibrationAndSmearingTool.h:184
CP::EgammaCalibrationAndSmearingTool::getEnergy
double getEnergy(const xAOD::Photon &) const
Definition: EgammaCalibrationAndSmearingTool.cxx:870
xAOD::EgammaParameters::AuthorFwdElectron
const uint16_t AuthorFwdElectron
Electron reconstructed by the Forward cluster-based algorithm.
Definition: EgammaDefs.h:30
egEnergyCorr::ESModel
ESModel
Definition: egammaEnergyCorrectionTool.h:285
CP::SystematicVariation
Definition: SystematicVariation.h:47
CP::EgammaCalibrationAndSmearingTool::m_useGainCorrection
int m_useGainCorrection
Definition: EgammaCalibrationAndSmearingTool.h:178
CP::EgammaCalibrationAndSmearingTool::m_decorrelation_model_scale_name
std::string m_decorrelation_model_scale_name
Definition: EgammaCalibrationAndSmearingTool.h:159
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
ISystematicsTool.h
PATCore::ParticleDataType::DataType
DataType
Definition: PATCoreEnums.h:22
CP::EgammaCalibrationAndSmearingTool::setRandomSeedFunction
virtual void setRandomSeedFunction(const IdFunction &&function)
Definition: EgammaCalibrationAndSmearingTool.h:144
CP::EgammaCalibrationAndSmearingTool::m_use_full_statistical_error
bool m_use_full_statistical_error
Definition: EgammaCalibrationAndSmearingTool.h:183
CP::EgammaCalibrationAndSmearingTool::oldtool_scale_flag_this_event
egEnergyCorr::Scale::Variation oldtool_scale_flag_this_event(const xAOD::Egamma &p, const xAOD::EventInfo &event_info) const
Definition: EgammaCalibrationAndSmearingTool.cxx:1122
PATCore::ParticleDataType::Full
@ Full
Definition: PATCoreEnums.h:22
AsgMessaging.h
Egamma.h
CP::EgammaCalibrationAndSmearingTool::m_usePhiUniformCorrection
int m_usePhiUniformCorrection
Definition: EgammaCalibrationAndSmearingTool.h:176
CP::EgammaCalibrationAndSmearingTool::m_decorrelation_model_resolution
ResolutionDecorrelation m_decorrelation_model_resolution
Definition: EgammaCalibrationAndSmearingTool.h:162
egGain::GainUncertainty
Definition: GainUncertainty.h:17
IEgammaCalibrationAndSmearingTool.h
CP::EgammaCalibrationAndSmearingTool::m_user_random_run_number
int m_user_random_run_number
Definition: EgammaCalibrationAndSmearingTool.h:187
CP::EgammaCalibrationAndSmearingTool::m_useIntermoduleCorrection
int m_useIntermoduleCorrection
Definition: EgammaCalibrationAndSmearingTool.h:175
CP::EgammaCalibrationAndSmearingTool::m_Run2Run3runNumberTransition
static const unsigned int m_Run2Run3runNumberTransition
Definition: EgammaCalibrationAndSmearingTool.h:155
CP::EgammaCalibrationAndSmearingTool::m_currentResolutionVariation_MC
egEnergyCorr::Resolution::Variation m_currentResolutionVariation_MC
Definition: EgammaCalibrationAndSmearingTool.h:332
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
CP::EgammaCalibrationAndSmearingTool::EgammaPredicate
std::function< bool(const xAOD::Egamma &)> EgammaPredicate
Definition: EgammaCalibrationAndSmearingTool.h:111
CP::EgammaCalibrationAndSmearingTool::m_MVACalibSvc
ServiceHandle< IegammaMVASvc > m_MVACalibSvc
Definition: EgammaCalibrationAndSmearingTool.h:308
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
CP::EgammaCalibrationAndSmearingTool::m_currentScaleVariation_MC
egEnergyCorr::Scale::Variation m_currentScaleVariation_MC
Definition: EgammaCalibrationAndSmearingTool.h:330
CP::EgammaCalibrationAndSmearingTool::m_ESModel
std::string m_ESModel
Definition: EgammaCalibrationAndSmearingTool.h:157
CP::EgammaCalibrationAndSmearingTool::AbsEtaCaloPredicatesFactory
const std::vector< EgammaPredicate > AbsEtaCaloPredicatesFactory(const std::vector< double > &edges) const
Definition: EgammaCalibrationAndSmearingTool.h:259
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
CP::EgammaCalibrationAndSmearingTool::AbsEtaCaloPredicateFactory
const EgammaPredicate AbsEtaCaloPredicateFactory(double eta_min, double eta_max) const
Definition: EgammaCalibrationAndSmearingTool.h:236
CP::EgammaCalibrationAndSmearingTool::resolution
virtual double resolution(double energy, double cl_eta, double cl_etaCalo, PATCore::ParticleType::Type ptype=PATCore::ParticleType::Electron, bool withCT=false) const override
Definition: EgammaCalibrationAndSmearingTool.cxx:826
IegammaMVASvc.h
xAOD::CaloCluster_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition: CaloCluster_v1.cxx:251
CaloCluster.h
CP::EgammaCalibrationAndSmearingTool::initialize
StatusCode initialize() override
Definition: EgammaCalibrationAndSmearingTool.cxx:338
CP::EgammaCalibrationAndSmearingTool::EtaCaloPredicate::EtaCaloPredicate
EtaCaloPredicate(double eta_min, double eta_max)
Definition: EgammaCalibrationAndSmearingTool.h:207
CP::EgammaCalibrationAndSmearingTool::DoubleOrAbsEtaCaloPredicate::m_eta2_max
float m_eta2_max
Definition: EgammaCalibrationAndSmearingTool.h:287
Photon.h
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CP::EgammaCalibrationAndSmearingTool::applySystematicVariation
virtual StatusCode applySystematicVariation(const CP::SystematicSet &systConfig) override
effects: configure this tool for the given list of systematic variations.
Definition: EgammaCalibrationAndSmearingTool.cxx:1908
CP::EgammaCalibrationAndSmearingTool::m_currentResolutionVariation_data
egEnergyCorr::Resolution::Variation m_currentResolutionVariation_data
Definition: EgammaCalibrationAndSmearingTool.h:333
CP::EgammaCalibrationAndSmearingTool::m_TESModel
egEnergyCorr::ESModel m_TESModel
Definition: EgammaCalibrationAndSmearingTool.h:164
LinearityADC
parameterization of correction for ADC non linearity
Definition: LinearityADC.h:25
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
CP::EgammaCalibrationAndSmearingTool::m_varSF
double m_varSF
Definition: EgammaCalibrationAndSmearingTool.h:167
CP::EgammaCalibrationAndSmearingTool::SysInfo::predicate
EgammaPredicate predicate
Definition: EgammaCalibrationAndSmearingTool.h:321
CP::EgammaCalibrationAndSmearingTool::m_useGainInterpolation
int m_useGainInterpolation
Definition: EgammaCalibrationAndSmearingTool.h:188
CP::EgammaCalibrationAndSmearingTool::SysInfo
Definition: EgammaCalibrationAndSmearingTool.h:320
xAOD::CaloCluster_v1::retrieveMoment
bool retrieveMoment(MomentType type, double &value) const
Retrieve individual moment.
Definition: CaloCluster_v1.cxx:738
CP::EgammaCalibrationAndSmearingTool::m_usePSCorrection
int m_usePSCorrection
Definition: EgammaCalibrationAndSmearingTool.h:190
CP::EgammaCalibrationAndSmearingTool::AbsEtaCaloPredicateFactory
const EgammaPredicate AbsEtaCaloPredicateFactory(std::pair< double, double > edges) const
Definition: EgammaCalibrationAndSmearingTool.h:244
CP::EgammaCalibrationAndSmearingTool::AbsEtaCaloPredicate::m_eta_max
float m_eta_max
Definition: EgammaCalibrationAndSmearingTool.h:233
CP::EgammaCalibrationAndSmearingTool::m_use_mapping_correction
bool m_use_mapping_correction
Definition: EgammaCalibrationAndSmearingTool.h:186
CP::EgammaCalibrationAndSmearingTool::EtaCaloPredicateFactory
const EgammaPredicate EtaCaloPredicateFactory(double eta_min, double eta_max) const
Definition: EgammaCalibrationAndSmearingTool.h:216
CP::EgammaCalibrationAndSmearingTool::m_ADCLinearity_tool
std::shared_ptr< LinearityADC > m_ADCLinearity_tool
Definition: EgammaCalibrationAndSmearingTool.h:311
CP::EgammaCalibrationAndSmearingTool::m_TResolutionType
egEnergyCorr::Resolution::resolutionType m_TResolutionType
Definition: EgammaCalibrationAndSmearingTool.h:169
CP::EgammaCalibrationAndSmearingTool::m_gain_tool_run2
std::unique_ptr< egGain::GainUncertainty > m_gain_tool_run2
Definition: EgammaCalibrationAndSmearingTool.h:310
CP::EgammaCalibrationAndSmearingTool::oldtool_resolution_flag_this_event
egEnergyCorr::Resolution::Variation oldtool_resolution_flag_this_event(const xAOD::Egamma &p, const xAOD::EventInfo &event_info) const
Definition: EgammaCalibrationAndSmearingTool.cxx:1133
CP::EgammaCalibrationAndSmearingTool::correction_phi_unif
double correction_phi_unif(double eta, double phi) const
Definition: EgammaCalibrationAndSmearingTool.cxx:2143
CP::EgammaCalibrationAndSmearingTool::m_doSmearing
int m_doSmearing
Definition: EgammaCalibrationAndSmearingTool.h:166
CP::EgammaCalibrationAndSmearingTool::ResolutionDecorrelation::FULL
@ FULL
CP::EgammaCalibrationAndSmearingTool::AUTO
static const int AUTO
Definition: EgammaCalibrationAndSmearingTool.h:105
CP::EgammaCalibrationAndSmearingTool::AbsEtaCaloPredicate::AbsEtaCaloPredicate
AbsEtaCaloPredicate(double eta_min, double eta_max)
Definition: EgammaCalibrationAndSmearingTool.h:224
CP::EgammaCalibrationAndSmearingTool::m_use_AFII
int m_use_AFII
Definition: EgammaCalibrationAndSmearingTool.h:171
CP::EgammaCalibrationAndSmearingTool::m_rootTool
std::unique_ptr< AtlasRoot::egammaEnergyCorrectionTool > m_rootTool
Definition: EgammaCalibrationAndSmearingTool.h:317
CP::EgammaCalibrationAndSmearingTool::SysInfo::effect
egEnergyCorr::Scale::Variation effect
Definition: EgammaCalibrationAndSmearingTool.h:322
egEnergyCorr::Scale::Variation
Variation
Definition: egammaEnergyCorrectionTool.h:126
CP::EgammaCalibrationAndSmearingTool::setupSystematics
void setupSystematics()
Definition: EgammaCalibrationAndSmearingTool.cxx:1177
CP::IEgammaCalibrationAndSmearingTool
Definition: Interfaces/EgammaAnalysisInterfaces/EgammaAnalysisInterfaces/IEgammaCalibrationAndSmearingTool.h:29
CP::EgammaCalibrationAndSmearingTool::getRandomSeedFunction
const IdFunction getRandomSeedFunction() const
Definition: EgammaCalibrationAndSmearingTool.h:147
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
asg::AsgMessaging
Class mimicking the AthMessaging class from the offline software.
Definition: AsgMessaging.h:40
egEnergyCorr::Resolution::Variation
Variation
Definition: egammaEnergyCorrectionTool.h:55
CP::EgammaCalibrationAndSmearingTool::DoubleOrAbsEtaCaloPredicate::m_eta2_min
float m_eta2_min
Definition: EgammaCalibrationAndSmearingTool.h:287
ServiceHandle.h
CP::EgammaCalibrationAndSmearingTool::xAOD2ptype
PATCore::ParticleType::Type xAOD2ptype(const xAOD::Egamma &particle) const
Definition: EgammaCalibrationAndSmearingTool.cxx:795
xAOD::get_phi_calo
float get_phi_calo(const xAOD::CaloCluster &cluster, int author, bool do_throw=false)
Definition: EgammaCalibrationAndSmearingTool.h:41
CP::EgammaCalibrationAndSmearingTool::DoubleOrAbsEtaCaloPredicate::m_eta1_min
float m_eta1_min
Definition: EgammaCalibrationAndSmearingTool.h:287
CP::EgammaCalibrationAndSmearingTool::m_MVAfolder
std::string m_MVAfolder
Definition: EgammaCalibrationAndSmearingTool.h:318
xAOD::Electron_v1
Definition: Electron_v1.h:34
xAOD::CaloCluster_v1::PHICALOFRAME
@ PHICALOFRAME
Phi in the calo frame (for egamma)
Definition: CaloCluster_v1.h:188
EventInfo.h
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
CP::EgammaCalibrationAndSmearingTool::m_syst_description
std::map< CP::SystematicVariation, SysInfo > m_syst_description
Definition: EgammaCalibrationAndSmearingTool.h:325
CP::EgammaCalibrationAndSmearingTool::intermodule_correction
double intermodule_correction(double Ecl, double phi, double eta) const
Definition: EgammaCalibrationAndSmearingTool.cxx:1957
CP::ISystematicsTool
Interface for all CP tools supporting systematic variations.
Definition: ISystematicsTool.h:32
CP::EgammaCalibrationAndSmearingTool::m_set_seed_function
IdFunction m_set_seed_function
Definition: EgammaCalibrationAndSmearingTool.h:337
CP::EgammaCalibrationAndSmearingTool
Definition: EgammaCalibrationAndSmearingTool.h:91
egammaLayerRecalibTool
Definition: egammaLayerRecalibTool.h:317
CP::EgammaCalibrationAndSmearingTool::DoubleOrAbsEtaCaloPredicate
Definition: EgammaCalibrationAndSmearingTool.h:271
CP::EgammaCalibrationAndSmearingTool::m_useLayerCorrection
int m_useLayerCorrection
Definition: EgammaCalibrationAndSmearingTool.h:189
xAOD::Photon_v1
Definition: Photon_v1.h:37
asg::AsgMetadataTool
Base class for dual-use tools that provide file metadata access.
Definition: AsgMetadataTool.h:48
CP::EgammaCalibrationAndSmearingTool::EtaCaloPredicate::m_eta_min
float m_eta_min
Definition: EgammaCalibrationAndSmearingTool.h:213
CaloCondBlobAlgs_fillNoiseFromASCII.author
string author
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:26
AsgMetadataTool.h
ASG_TOOL_CLASS3
#define ASG_TOOL_CLASS3(CLASSNAME, INT1, INT2, INT3)
Definition: AsgToolMacros.h:85
CP::EgammaCalibrationAndSmearingTool::m_layer_recalibration_tool
egammaLayerRecalibTool * m_layer_recalibration_tool
Definition: EgammaCalibrationAndSmearingTool.h:313
CP::CorrectionCode
Return value from object correction CP tools.
Definition: CorrectionCode.h:31
CP::IReentrantSystematicsTool
interface for all CP tools supporting systematic variations within a reentrant algorithm
Definition: IReentrantSystematicsTool.h:58
xAOD::get_eta_calo
float get_eta_calo(const xAOD::CaloCluster &cluster, int author, bool do_throw=false)
Definition: EgammaCalibrationAndSmearingTool.h:64
CP::EgammaCalibrationAndSmearingTool::m_decorrelation_model_resolution_name
std::string m_decorrelation_model_resolution_name
Definition: EgammaCalibrationAndSmearingTool.h:160
SG::ConstAccessor::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
egEnergyCorr::Resolution::resolutionType
resolutionType
Definition: egammaEnergyCorrectionTool.h:110
PATCore::ParticleType::Electron
@ Electron
Definition: PATCoreEnums.h:40
Electron.h
ConstAccessor.h
Helper class to provide constant type-safe access to aux data.
CP::EgammaCalibrationAndSmearingTool::applyCorrection
virtual CP::CorrectionCode applyCorrection(xAOD::Egamma &) const override
Definition: EgammaCalibrationAndSmearingTool.cxx:833
AsgTool.h
xAOD::CaloCluster_v1::ETACALOFRAME
@ ETACALOFRAME
Eta in the calo frame (for egamma)
Definition: CaloCluster_v1.h:187
CP::EgammaCalibrationAndSmearingTool::EtaCaloPredicate::m_eta_max
float m_eta_max
Definition: EgammaCalibrationAndSmearingTool.h:213
CP::EgammaCalibrationAndSmearingTool::IdFunction
std::function< int(const EgammaCalibrationAndSmearingTool &, const xAOD::Egamma &, const xAOD::EventInfo &)> IdFunction
Definition: EgammaCalibrationAndSmearingTool.h:110
xAOD::bool
setBGCode setTAP setLVL2ErrorBits bool
Definition: TrigDecision_v1.cxx:60
CP::EgammaCalibrationAndSmearingTool::m_syst_description_resolution
std::map< CP::SystematicVariation, egEnergyCorr::Resolution::Variation > m_syst_description_resolution
Definition: EgammaCalibrationAndSmearingTool.h:327
CP::EgammaCalibrationAndSmearingTool::AbsEtaCaloPredicatesFactory
const std::vector< EgammaPredicate > AbsEtaCaloPredicatesFactory(const std::vector< std::pair< double, double >> &edges) const
Definition: EgammaCalibrationAndSmearingTool.h:249
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
CP::EgammaCalibrationAndSmearingTool::m_decorrelation_model_scale
ScaleDecorrelation m_decorrelation_model_scale
Definition: EgammaCalibrationAndSmearingTool.h:161
CP::EgammaCalibrationAndSmearingTool::m_useS12Correction
int m_useS12Correction
Definition: EgammaCalibrationAndSmearingTool.h:191
CP::EgammaCalibrationAndSmearingTool::m_layer_recalibration_tune
std::string m_layer_recalibration_tune
Definition: EgammaCalibrationAndSmearingTool.h:314
CP::EgammaCalibrationAndSmearingTool::m_useCaloDistPhiUnifCorrection
int m_useCaloDistPhiUnifCorrection
Definition: EgammaCalibrationAndSmearingTool.h:177
CP::EgammaCalibrationAndSmearingTool::m_use_uA2MeV_2015_first2weeks_correction
int m_use_uA2MeV_2015_first2weeks_correction
Definition: EgammaCalibrationAndSmearingTool.h:185
CP::EgammaCalibrationAndSmearingTool::m_fixForMissingCells
Gaudi::Property< bool > m_fixForMissingCells
Definition: EgammaCalibrationAndSmearingTool.h:198
ServiceHandle< IegammaMVASvc >