Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
EgammaCalibrationAndSmearingTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 
8 #include <algorithm>
9 #include <format>
10 #include <memory>
11 #include <string>
12 #include <utility>
13 
18 #include "xAODEgamma/Egamma.h"
19 #include "xAODEgamma/EgammaDefs.h"
24 #include "xAODTracking/Vertex.h"
25 
26 #ifndef ROOTCORE
28 #endif
29 
30 // internal (old) tool
31 #include <cmath>
32 
39 
40 namespace CP {
41 
42 const double GeV = 1000.;
43 
44 std::unique_ptr<egGain::GainTool> gainToolFactory(egEnergyCorr::ESModel model) {
45  switch (model) {
58  const std::string gain_filename1 = PathResolverFindCalibFile(
59  "ElectronPhotonFourMomentumCorrection/v8/FunctionsTO.root");
60  const std::string gain_filename2 = PathResolverFindCalibFile(
61  "ElectronPhotonFourMomentumCorrection/v8/FunctionsG_all.root");
62  return std::make_unique<egGain::GainTool>(gain_filename1, gain_filename2);
63  }
78  return nullptr;
79  default:
80  return nullptr;
81  }
82 }
83 
85  std::string folder;
86  switch (model) {
90  folder = "egammaMVACalib/v1";
91  break;
93  folder = "egammaMVACalib/v1";
94  break;
99  folder = "egammaMVACalib/offline/v3";
100  break;
103  folder = "egammaMVACalib/offline/v3_E4crack_bis";
104  break;
112  folder = "egammaMVACalib/offline/v4.0";
113  break;
122  folder = "egammaMVACalib/offline/v7";
123  break;
126  folder = "egammaMVACalib/offline/v9";
127  break;
128  default:
129  folder = "";
130  }
131 
132  return folder;
133 }
134 
135 std::unique_ptr<egammaLayerRecalibTool> egammaLayerRecalibToolFactory(
136  egEnergyCorr::ESModel model, int enableSacc) {
137  std::string tune = "";
138  switch (model) {
142  tune = "2011_alt_with_layer2";
143  break;
156  tune = "2012_alt_with_layer2";
157  break;
160  tune = "es2017_20.7_improved";
161  break;
163  tune = "es2017_20.7_final";
164  break;
171  tune = "es2017_21.0_v0";
172  break;
174  tune = "es2018_21.0_v0";
175  break;
177  tune = "es2022_22.0_Precision";
178  break;
180  tune = "es2022_22.0_Precision_v1";
181  break;
182  default:
183  return nullptr;
184  }
185  return std::make_unique<egammaLayerRecalibTool>(tune, enableSacc);
186 }
187 
189  switch (model) {
196  return false;
223  return true;
224  case egEnergyCorr::UNDEFINED: // TODO: find better logic
225  return false;
226  }
227  assert(false);
228  return false;
229 }
230 
232  return use_intermodule_correction(model); // they are equal
233 }
234 
236  switch (model) {
246  return false;
270  return true;
271  case egEnergyCorr::UNDEFINED: // TODO: find better logic
272  return false;
273  }
274  assert(false);
275  return false;
276 }
277 
279  const std::string& name)
280  : asg::AsgMetadataTool(name),
281  m_TESModel(egEnergyCorr::UNDEFINED),
282  m_TResolutionType(egEnergyCorr::Resolution::SigmaEff90),
283  m_use_mapping_correction(false),
284  m_currentScaleVariation_MC(egEnergyCorr::Scale::None),
285  m_currentScaleVariation_data(egEnergyCorr::Scale::Nominal),
286  m_currentResolutionVariation_MC(egEnergyCorr::Resolution::Nominal),
287  m_currentResolutionVariation_data(egEnergyCorr::Resolution::None),
288  m_set_seed_function([](const EgammaCalibrationAndSmearingTool&,
290  const xAOD::EventInfo& ei) {
291  // avoid 0 as result, see
292  // https://root.cern.ch/root/html/TRandom3.html#TRandom3:SetSeed
293  return 1 + static_cast<RandomNumber>(
294  std::abs(egamma.caloCluster()->phi()) * 1E6 +
295  std::abs(egamma.caloCluster()->eta()) * 1E3 +
296  ei.eventNumber());
297  }) {
298 
299  declareProperty("ESModel", m_ESModel = "");
300  declareProperty("decorrelationModel", m_decorrelation_model_name = "");
301  declareProperty("decorrelationModelScale",
302  m_decorrelation_model_scale_name = "");
303  declareProperty("decorrelationModelResolution",
304  m_decorrelation_model_resolution_name = "");
305  declareProperty("ResolutionType", m_ResolutionType = "SigmaEff90");
306  declareProperty("varSF", m_varSF = 1.0);
307  declareProperty("doScaleCorrection", m_doScaleCorrection = AUTO);
308  declareProperty("doSmearing", m_doSmearing = AUTO);
309  declareProperty("useLayerCorrection", m_useLayerCorrection = AUTO);
310  declareProperty("usePSCorrection", m_usePSCorrection = AUTO);
311  declareProperty("useS12Correction", m_useS12Correction = AUTO);
312  declareProperty("useSaccCorrection", m_useSaccCorrection = AUTO);
313  declareProperty("useIntermoduleCorrection",
314  m_useIntermoduleCorrection = AUTO);
315  declareProperty("usePhiUniformCorrection", m_usePhiUniformCorrection = AUTO);
316  declareProperty("useCaloDistPhiUnifCorrection",
317  m_useCaloDistPhiUnifCorrection = AUTO);
318  declareProperty("useGainCorrection", m_useGainCorrection = AUTO);
319  declareProperty("useGainInterpolation", m_useGainInterpolation = AUTO);
320  declareProperty("doADCLinearityCorrection",
321  m_doADCLinearityCorrection = AUTO);
322  declareProperty("doLeakageCorrection", m_doLeakageCorrection = AUTO);
323  declareProperty("MVAfolder", m_MVAfolder = "");
324  declareProperty("layerRecalibrationTune", m_layer_recalibration_tune = "");
325  declareProperty("useEPCombination", m_use_ep_combination = false);
326  declareProperty("useMVACalibration", m_use_mva_calibration = AUTO);
327  declareProperty("use_full_statistical_error",
328  m_use_full_statistical_error = false);
329  declareProperty("use_temp_correction201215",
330  m_use_temp_correction201215 = AUTO);
331  declareProperty("use_uA2MeV_2015_first2weeks_correction",
332  m_use_uA2MeV_2015_first2weeks_correction = AUTO);
333  declareProperty("randomRunNumber", m_user_random_run_number = 0);
334  // this is the user input, it is never changed by the tool. The tool uses
335  // m_simulation.
336  declareProperty("useFastSim", m_useFastSim = -1,
337  "This should be explicitly set by the user depending on the "
338  "data type (int)0=full sim, (int)1=fast sim");
339  declareProperty(
340  "useAFII", m_use_AFII = -1,
341  "This is now deprecated. Kept for explicit error message for now");
342  declareProperty("decorateEmva", m_decorateEmva = false, "whether to decorate the eMVA value");
343 }
344 
346  ATH_MSG_DEBUG("destructor");
348  delete m_gain_tool;
349 }
350 
352  ATH_MSG_INFO("Initialization");
353 
354  if (m_ESModel == "es2015XX") {
355  ATH_MSG_ERROR("es2015XX is deprecated. Use es2015PRE");
356  }
357 
358  if (m_ESModel == "es2010") {
360  } // legacy
361  else if (m_ESModel == "es2011c") {
363  } // mc11c : faulty G4; old geometry
364  else if (m_ESModel == "es2011d") {
366  } // mc11d : corrected G4; new geometry == final Run1 scheme
367  else if (m_ESModel == "es2012a") {
369  } // mc12a : "crude" G4 fix; old geometry
370  else if (m_ESModel == "es2012c") {
372  } // mc12c : corrected G4; new geometry == final Run1 scheme
373  else if (m_ESModel == "es2012XX") {
375  } else if (m_ESModel == "es2015PRE") {
377  } else if (m_ESModel == "es2015PRE_res_improved") {
379  } else if (m_ESModel == "es2015cPRE") {
381  } else if (m_ESModel == "es2015cPRE_res_improved") {
383  } else if (m_ESModel == "es2015c_summer") {
385  } else if (m_ESModel == "es2016PRE") {
387  } else if (m_ESModel == "es2016data_mc15c") {
389  } else if (m_ESModel == "es2016data_mc15c_summer") {
391  } else if (m_ESModel == "es2016data_mc15c_summer_improved") {
393  } else if (m_ESModel == "es2016data_mc15c_final") {
395  } else if (m_ESModel == "es2015_5TeV") {
397  } else if (m_ESModel == "es2017_R21_PRE") {
399  } else if (m_ESModel == "es2017_R21_v0") {
401  } else if (m_ESModel == "es2017_R21_v1") {
403  } else if (m_ESModel == "es2017_R21_ofc0_v1") {
405  } else if (m_ESModel == "es2018_R21_v0") {
407  } else if (m_ESModel == "es2018_R21_v1") {
409  } else if (m_ESModel == "es2022_R22_PRE") {
411  } else if (m_ESModel == "es2023_R22_Run2_v0") {
413  } else if (m_ESModel == "es2023_R22_Run2_v1") {
415  } else if (m_ESModel == "es2024_Run3_ofc0_v0") {
417  } else if (m_ESModel.empty()) {
418  ATH_MSG_ERROR("you must set ESModel property");
419  return StatusCode::FAILURE;
420  } else {
421  ATH_MSG_ERROR("Cannot understand model " << m_ESModel);
422  return StatusCode::FAILURE;
423  }
424 
425  if (m_ResolutionType == "Gaussian") {
427  } else if (m_ResolutionType == "SigmaEff80") {
429  } else if (m_ResolutionType == "SigmaEff90") {
431  } else {
432  ATH_MSG_ERROR("Cannot understand resolution " << m_ResolutionType);
433  return StatusCode::FAILURE;
434  }
435 
436  if (m_use_AFII != -1) {
438  "Property useAFII is deprecated. It is now replaced with useFastSim, "
439  "which should be explicitly configured");
440  return StatusCode::FAILURE;
441  }
442 
443  if (m_useFastSim == 1) {
445  } else if (m_useFastSim == 0) {
447  } else {
448  ATH_MSG_ERROR("Property useFastSim should be explicitly configured");
449  return StatusCode::FAILURE;
450  }
451 
455  "Sample is FastSim but no AF3 calibration is available yet with "
456  "MC23 recommendations. Please get in touch with the EGamma "
457  "CP group in case you are using this");
458  return StatusCode::FAILURE;
459  }
460 
461  // configure decorrelation model, translate string property to internal class
462  // enum
463  /* S R SR
464  0. 0 0 0 WARNING Full, Full (this is the default without configuration)
465  1. 0 0 1 SR
466  2. 0 1 0 FATAL
467  3. 0 1 1 WARNING SR then R
468  4. 1 0 0 FATAL
469  5. 1 0 1 WARNING SR then S
470  6. 1 1 0 S, R
471  7. 1 1 1 FATAL
472  */
473  if (m_decorrelation_model_name.empty() and
476  // case 0
477  ATH_MSG_WARNING("no decorrelation model specified, assuming full model");
480  m_decorrelation_model_name = "FULL_v1";
481  } else if (not m_decorrelation_model_name.empty() and
482  not m_decorrelation_model_scale_name.empty() and
484  // case 7
485  ATH_MSG_FATAL("too many flags for the decorrelation model");
486  return StatusCode::FAILURE;
487  } else {
488  // set scale decorrelation model
489  if (not m_decorrelation_model_scale_name.empty()) { // case 4, 5, 6, (7)
490  if (not m_decorrelation_model_name.empty()) {
492  "flag decorrelation model ignored for scale decorrelation model");
493  } // case 5
494  if (m_decorrelation_model_scale_name == "1NP_v1")
495  m_decorrelation_model_scale = ScaleDecorrelation::ONENP;
496  else if (m_decorrelation_model_scale_name == "FULL_ETACORRELATED_v1")
497  m_decorrelation_model_scale = ScaleDecorrelation::FULL_ETA_CORRELATED;
498  else if (m_decorrelation_model_scale_name == "1NPCOR_PLUS_UNCOR")
499  m_decorrelation_model_scale = ScaleDecorrelation::ONENP_PLUS_UNCONR;
500  else if (m_decorrelation_model_scale_name == "FULL_v1")
502  else {
503  ATH_MSG_FATAL("cannot understand the scale decorrelation model '"
504  << m_decorrelation_model_scale_name << "'(typo?)");
505  return StatusCode::FAILURE;
506  }
507  } else if (not m_decorrelation_model_name.empty()) { // case 1, 3
508  if (m_decorrelation_model_name == "1NP_v1")
509  m_decorrelation_model_scale = ScaleDecorrelation::ONENP;
510  else if (m_decorrelation_model_name == "FULL_ETACORRELATED_v1")
511  m_decorrelation_model_scale = ScaleDecorrelation::FULL_ETA_CORRELATED;
512  else if (m_decorrelation_model_name == "1NPCOR_PLUS_UNCOR")
513  m_decorrelation_model_scale = ScaleDecorrelation::ONENP_PLUS_UNCONR;
514  else if (m_decorrelation_model_name == "FULL_v1")
516  else {
517  ATH_MSG_FATAL("cannot understand the decorrelation model '"
518  << m_decorrelation_model_name << "'(typo?)");
519  return StatusCode::FAILURE;
520  }
521  } else { // case 2, (7)
523  "not information how to initialize the scale decorrelation model");
524  return StatusCode::FAILURE;
525  }
526 
527  // set resolution decorralation model
529  .empty()) { // case 2, 3, 6, (7)
530  if (not m_decorrelation_model_name.empty()) {
532  "flag decorrelation model ignored for resolution decorrelation "
533  "model");
534  } // case 3
537  else if (m_decorrelation_model_resolution_name == "FULL_v1")
539  else {
540  ATH_MSG_FATAL("cannot understand the resolution decorrelation model '"
541  << m_decorrelation_model_resolution_name << "'(typo?)");
542  return StatusCode::FAILURE;
543  }
544  } else if (not m_decorrelation_model_name.empty()) { // case 1, 5
545  if (m_decorrelation_model_name == "1NP_v1")
547  else if (m_decorrelation_model_name == "FULL_ETACORRELATED_v1")
549  else if (m_decorrelation_model_name == "1NPCOR_PLUS_UNCOR")
551  else if (m_decorrelation_model_name == "FULL_v1")
553  else {
554  ATH_MSG_FATAL("cannot understand the decorrelation model '"
555  << m_decorrelation_model_name << "'(typo?)");
556  return StatusCode::FAILURE;
557  }
558  }
559  }
560 
561  // create correction tool
562  ATH_MSG_DEBUG("creating internal correction tool");
563  m_rootTool = std::make_unique<AtlasRoot::egammaEnergyCorrectionTool>();
564  if (!m_rootTool) {
565  ATH_MSG_ERROR("Cannot initialize underlying tool");
566  return StatusCode::FAILURE;
567  }
568  m_rootTool->setESModel(m_TESModel);
569 
573  "Using linear interpolation in the gain tool (uncertainties only)");
575  m_rootTool->setApplyL2GainInterpolation();
576  }
577  m_rootTool->msg().setLevel(this->msg().level());
578  m_rootTool->initialize();
579 
580  // configure MVA calibration
581  if (m_use_mva_calibration != 0) {
582  ATH_MSG_DEBUG("creating MVA calibration tool (if needed)");
583  if (m_MVAfolder.empty()) { // automatically configure MVA tool
585  }
586 
587  if (not m_MVAfolder.empty()) {
588 
589  // electron MVA tool
590  asg::AsgToolConfig config_mva_electron(
591  "egammaMVACalibTool/tool_mva_electron");
592  config_mva_electron.setPropertyFromString("folder", m_MVAfolder);
593  ATH_CHECK(config_mva_electron.setProperty("use_layer_corrected", true));
594  ;
595  ATH_CHECK(config_mva_electron.setProperty(
596  "ParticleType", xAOD::EgammaParameters::electron));
597 
598  // unconverted photon MVA tool
599  asg::AsgToolConfig config_mva_unconverted(
600  "egammaMVACalibTool/tool_mva_unconverted");
601  config_mva_unconverted.setPropertyFromString("folder", m_MVAfolder);
602  ATH_CHECK(
603  config_mva_unconverted.setProperty("use_layer_corrected", true));
604  ATH_CHECK(config_mva_unconverted.setProperty(
606 
607  // converted photon MVA tool
608  asg::AsgToolConfig config_mva_converted(
609  "egammaMVACalibTool/tool_mva_converted");
610  config_mva_converted.setPropertyFromString("folder", m_MVAfolder);
611  ATH_CHECK(config_mva_converted.setProperty("use_layer_corrected", true));
612  ATH_CHECK(config_mva_converted.setProperty(
613  "ParticleType", xAOD::EgammaParameters::convertedPhoton));
614 
615  // initialize the ServiceHandler egammaMVASvc
616  // make the name unique
617  std::ostringstream mva_service_name;
618  mva_service_name << "egammaMVASvc/service_mva_egamma_id"
619  << (void const*)this;
620  asg::AsgServiceConfig config_mva_service(mva_service_name.str());
621  ATH_CHECK(config_mva_service.addPrivateTool("ElectronTool",
622  config_mva_electron));
623  ATH_CHECK(config_mva_service.addPrivateTool("UnconvertedPhotonTool",
624  config_mva_unconverted));
625  ATH_CHECK(config_mva_service.addPrivateTool("ConvertedPhotonTool",
626  config_mva_converted));
627  config_mva_service.setPropertyFromString("folder", m_MVAfolder);
628  ATH_CHECK(
629  config_mva_service.setProperty("OutputLevel", this->msg().level()));
630  ATH_CHECK(config_mva_service.makeService(m_MVACalibSvc));
631  } else {
632  m_use_mva_calibration = false;
633  }
634  }
635 
636  // configure layer recalibration tool
637  // For now: layer recalibration not applied to PRE release 21 (using run 1
638  // based calibration applied at reco level)
639  // for following R21 recommendations, need to apply the run2/run1 layer
640  // calibration ratio
641  if (m_ESModel == "es2017_R21_PRE") {
642  ATH_MSG_INFO("Layer recalibration already applied at cell level");
643  m_useLayerCorrection = false;
644  } else if (!m_useLayerCorrection) {
645  ATH_MSG_INFO("Layer corrections disabled!");
646  } else {
647  ATH_MSG_DEBUG("initializing layer recalibration tool (if needed)");
649  .empty()) { // automatically configure layer recalibration tool
652  .release();
654  ATH_MSG_INFO("not using layer recalibration");
655  }
656  } else {
659  }
661  m_layer_recalibration_tool->msg().setLevel(this->msg().level());
663  if (!m_usePSCorrection) {
664  ATH_MSG_INFO("PS corrections disabled!");
666  }
667  if (!m_useS12Correction) {
668  ATH_MSG_INFO("S12 corrections disabled!");
670  }
671  if (!m_useSaccCorrection) {
672  ATH_MSG_INFO("Sacc corrections disabled!");
674  }
675  }
676  }
677 
679  m_rootTool->use_temp_correction201215(m_use_temp_correction201215);
681  m_rootTool->use_uA2MeV_2015_first2weeks_correction(
683  if (not m_use_full_statistical_error and
685  m_rootTool->useStatErrorScaling(true);
686  }
687 
688  if (m_use_ep_combination) {
689  ATH_MSG_ERROR("ep combination not supported yet");
690  throw std::runtime_error("ep combination not supported yet");
691  }
692 
695  }
698  }
700 
701  if (m_useGainCorrection == AUTO) {
705  }
706  else {
707  ATH_MSG_DEBUG("initializing gain tool");
710  }
711  }
712  else if (m_useGainCorrection == 1) {
717  "cannot instantiate gain tool for this model (you can only disable "
718  "the gain tool, but not enable it)");
719  } else {
720  ATH_MSG_INFO(
721  "initializing gain tool for run2 final precision recommendations");
723  "Gain corrections required but Zee scales are derived without Gain, "
724  "will cause inconsistency!");
725  std::string gain_tool_run_2_filename = PathResolverFindCalibFile(
726  "ElectronPhotonFourMomentumCorrection/v29/"
727  "gain_uncertainty_specialRun.root");
729  gain_tool_run_2_filename, false, "GainCorrection",
731  m_gain_tool_run2->msg().setLevel(this->msg().level());
732  }
733  }
734 
737  // ADC non linearity correction
740  std::string adcLinearityCorr_filename = PathResolverFindCalibFile(
741  "ElectronPhotonFourMomentumCorrection/v25/linearity_ADC.root");
742  m_ADCLinearity_tool.reset(new LinearityADC(adcLinearityCorr_filename));
743  m_ADCLinearity_tool->msg().setLevel(this->msg().level());
744  m_rootTool->setADCTool(m_ADCLinearity_tool);
745  } else {
747  m_ESModel + " recommendations use ADC corrections for scale "
748  "derivation. Disabling the ADCLinearity flag will create "
749  "inconsistency!");
750  }
751 
754  m_rootTool->setApplyLeakageCorrection(true);
755  }
756 
757  // Calo distortion phi unif correction
761  std::string phiUnifCorrfileName = PathResolverFindCalibFile(
762  "ElectronPhotonFourMomentumCorrection/v33/"
763  "egammaEnergyCorrectionData.root");
764  std::unique_ptr<TFile> fCorr(
765  TFile::Open(phiUnifCorrfileName.c_str(), "READ"));
766  m_caloDistPhiUnifCorr.reset(
767  dynamic_cast<TH2*>(fCorr->Get("CaloDistortionPhiUniformityCorrection/"
768  "es2023_R22_Run2_v0/h2DcorrPhiUnif")));
769  m_caloDistPhiUnifCorr->SetDirectory(nullptr);
770  } else {
772  m_ESModel + " recommendations use CaloDistPhiUnif for scale "
773  "derivation. Disabling the CaloDistPhiUnif flag will create "
774  "inconsistency!");
775  }
776  }
777 
778  // No scale correction for release 21 ==> obsolete
779  /*if (m_ESModel == "es2017_R21_PRE"){
780  m_doScaleCorrection = 0;
781  }
782  */
783 
784  ATH_MSG_INFO("ESModel: " << m_ESModel);
785  ATH_MSG_INFO("ResolutionType: " << m_ResolutionType);
786  ATH_MSG_INFO("decorrelation Model: " << m_decorrelation_model_name);
787  ATH_MSG_DEBUG("layer correction = " << m_useLayerCorrection);
788  ATH_MSG_DEBUG("PS correction = " << m_usePSCorrection);
789  ATH_MSG_DEBUG("S12 correction = " << m_useS12Correction);
790  ATH_MSG_DEBUG("Sacc correction = " << m_useSaccCorrection);
791  ATH_MSG_DEBUG("intermodule correction = " << m_useIntermoduleCorrection);
792  ATH_MSG_DEBUG("phi uniformity correction = " << m_usePhiUniformCorrection);
793  ATH_MSG_DEBUG("distorted calo phi uniformity correction = "
795  ATH_MSG_DEBUG("gain correction = " << m_useGainCorrection);
796  ATH_MSG_DEBUG("ADC non-linearity correction = " << m_doADCLinearityCorrection);
797  ATH_MSG_DEBUG("leakage correction for photons = " << m_doLeakageCorrection);
798  ATH_MSG_DEBUG("smearing = " << m_doSmearing);
799  ATH_MSG_DEBUG("insitu scales = " << m_doScaleCorrection);
800  ATH_MSG_DEBUG("ep combination = " << m_use_ep_combination);
801  ATH_MSG_DEBUG("use MVA calibration = " << m_use_mva_calibration);
803  "use temperature correction 2015 = " << m_use_temp_correction201215);
804  ATH_MSG_DEBUG("use uA2MeV correction 2015 1/2 week = "
806 
808 
810  .ignore(); // this set the flags for the internal tool without
811  // systematics
813  if (registry.registerSystematics(*this) != StatusCode::SUCCESS)
814  return StatusCode::FAILURE;
815 
816  return StatusCode::SUCCESS;
817 }
818 
820  const xAOD::Egamma& particle) const {
821  auto ptype = PATCore::ParticleType::Electron;
822  // no ForwardElectron ptype: consider them as Electron
823  if (xAOD::EgammaHelpers::isElectron(&particle) ||
824  particle.author() == xAOD::EgammaParameters::AuthorFwdElectron) {
826  } else if (xAOD::EgammaHelpers::isPhoton(&particle)) {
829  } else {
831  }
832  } else {
833  ATH_MSG_ERROR("particle is not electron of photon");
834  throw std::runtime_error("particle is not electron or photon");
835  }
836  return ptype;
837 }
838 
840  const xAOD::Egamma& particle, bool withCT) const {
841  const auto ptype = xAOD2ptype(particle);
842  const auto cl_etaCalo =
843  xAOD::get_eta_calo(*particle.caloCluster(), particle.author());
844 
845  return m_rootTool->resolution(particle.e(), particle.caloCluster()->eta(),
846  cl_etaCalo, ptype, withCT,
847  false); // TODO: always for full simulation
848 }
849 
851  double energy, double cl_eta, double cl_etaCalo,
852  PATCore::ParticleType::Type ptype, bool withCT) const {
853  return m_rootTool->resolution(energy, cl_eta, cl_etaCalo, ptype, withCT,
854  false);
855 }
856 
858  xAOD::Egamma& input) const {
859  // Retrieve the event information:
860  const xAOD::EventInfo* event_info = nullptr;
861  if (evtStore()->retrieve(event_info, "EventInfo").isFailure()) {
862  ATH_MSG_ERROR("No EventInfo object could be retrieved");
864  }
865  return applyCorrection(input, *event_info);
866 }
867 
869  const xAOD::Electron& input, xAOD::Electron*& output) const {
870  // A sanity check:
871  if (output)
873  "Non-null pointer received. "
874  "There's a possible memory leak!");
875 
876  output = new xAOD::Electron();
877  output->makePrivateStore(input);
878  return applyCorrection(*output);
879 }
880 
882  const xAOD::Photon& input, xAOD::Photon*& output) const {
883  // A sanity check:
884  if (output)
886  "Non-null pointer received. "
887  "There's a possible memory leak!");
888 
889  output = new xAOD::Photon();
890  output->makePrivateStore(input);
891  return applyCorrection(*output);
892 }
893 
895  const xAOD::Photon& input) const {
896  xAOD::Photon* new_particle = nullptr;
897  ANA_CHECK_THROW(correctedCopy(input, new_particle));
898  const double e = new_particle->e();
899  delete new_particle;
900  return e;
901 }
902 
904  const xAOD::Electron& input) const {
905  xAOD::Electron* new_particle = nullptr;
906  ANA_CHECK_THROW(correctedCopy(input, new_particle));
907  const double e = new_particle->e();
908  delete new_particle;
909  return e;
910 }
911 
913  xAOD::Egamma& input, const xAOD::EventInfo& event_info) const {
914 
915  // only used in simulation (for the smearing)
916  RandomNumber seed = m_set_seed_function(*this, input, event_info);
917 
918  static const SG::ConstAccessor<double> Es0Acc("correctedcl_Es0");
919  static const SG::ConstAccessor<double> Es1Acc("correctedcl_Es1");
920  static const SG::ConstAccessor<double> Es2Acc("correctedcl_Es2");
921  static const SG::ConstAccessor<double> Es3Acc("correctedcl_Es3");
922 
924  ATH_MSG_DEBUG("applying energy recalibration before E0|E1|E2|E3 = "
925  << input.caloCluster()->energyBE(0) << "|"
926  << input.caloCluster()->energyBE(1) << "|"
927  << input.caloCluster()->energyBE(2) << "|"
928  << input.caloCluster()->energyBE(3));
929  const CP::CorrectionCode status_layer_recalibration =
930  m_layer_recalibration_tool->applyCorrection(input, event_info);
931  if (status_layer_recalibration == CP::CorrectionCode::Error) {
933  }
934  ATH_MSG_DEBUG("eta|phi = " << input.eta() << "|" << input.phi());
935  if (status_layer_recalibration == CP::CorrectionCode::Ok) {
936  ATH_MSG_DEBUG("decoration E0|E1|E2|E3 = "
937  << Es0Acc(*input.caloCluster()) << "|"
938  << Es1Acc(*input.caloCluster()) << "|"
939  << Es2Acc(*input.caloCluster()) << "|"
940  << Es3Acc(*input.caloCluster()) << "|");
941  if (Es2Acc(*input.caloCluster()) == 0 and
942  Es1Acc(*input.caloCluster()) == 0 and
943  Es3Acc(*input.caloCluster()) == 0 and
944  Es0Acc(*input.caloCluster()) == 0 and
945  (std::abs(input.eta()) < 1.37 or
946  (std::abs(input.eta()) > 1.55 and std::abs(input.eta()) < 2.47))) {
947  ATH_MSG_WARNING("all layer energies are zero");
948  }
949  }
950  }
951 
952  double energy = 0.;
953  // apply MVA calibration
954  if (!m_MVACalibSvc.empty()) {
955  if (input.author() !=
956  xAOD::EgammaParameters::AuthorFwdElectron) { // do not apply MVA
957  // calibration to fwd
958  // electrons
959  m_MVACalibSvc->getEnergy(*input.caloCluster(), input, energy)
960  .ignore(); // TODO check StatusCode
961  } else {
962  energy = input.e();
963  }
964  ATH_MSG_DEBUG("energy after MVA calibration = " << std::format("{:.2f}", energy));
965  } else {
966  energy = input.e();
967  }
968  if (m_decorateEmva)
969  {
970  static const SG::AuxElement::Decorator<float> decEmva("E_mva_only");
971  decEmva(input) = energy;
972  }
973 
975  // Crack calibation correction for es2011c (calibration hits calibration)
976  const auto ptype = xAOD2ptype(input);
977  const double etaden =
979  ? static_cast<xAOD::Electron&>(input).trackParticle()->eta()
980  : input.caloCluster()->eta();
981  energy *= m_rootTool->applyMCCalibration(input.caloCluster()->eta(),
982  energy / cosh(etaden), ptype);
983  ATH_MSG_DEBUG("energy after crack calibration es2011c = "
984  << std::format("{:.2f}", energy));
985  }
986 
987  /*
988  * Here we check for each event the kind of data DATA vs FullSim
989  * The m_simulation flavour has already been configured
990  */
993  ? m_simulation
995 
996  unsigned int runNumber_for_tool = 0;
997 
998  // apply uniformity corrections to data
1000  // Get run number
1001  runNumber_for_tool = event_info.runNumber();
1002  // Get etaCalo, phiCalo
1003  const auto cl_eta = input.caloCluster()->eta();
1004  double etaCalo = 0, phiCalo = 0;
1006  etaCalo = xAOD::get_eta_calo(*input.caloCluster(), input.author(), false);
1008  phiCalo =
1009  xAOD::get_phi_calo(*input.caloCluster(), input.author(), false);
1010  }
1011  }
1012 
1013  // Intermodule
1015  energy =
1016  intermodule_correction(energy, input.caloCluster()->phi(), cl_eta);
1017  ATH_MSG_DEBUG("energy after intermodule correction = "
1018  << std::format("{:.2f}", energy));
1019  }
1020 
1021  // Calo distortion
1024  double etaC = input.caloCluster()->eta();
1025  double phiC = input.caloCluster()->phi();
1026  int ieta = m_caloDistPhiUnifCorr->GetXaxis()->FindBin(etaC);
1027  ieta = ieta == 0 ? 1
1028  : (ieta > m_caloDistPhiUnifCorr->GetNbinsX()
1029  ? m_caloDistPhiUnifCorr->GetNbinsX()
1030  : ieta);
1031  int iphi = m_caloDistPhiUnifCorr->GetYaxis()->FindBin(phiC);
1032  iphi = iphi == 0 ? 1
1033  : (iphi > m_caloDistPhiUnifCorr->GetNbinsY()
1034  ? m_caloDistPhiUnifCorr->GetNbinsY()
1035  : iphi);
1036  energy *= m_caloDistPhiUnifCorr->GetBinContent(ieta, iphi);
1037  ATH_MSG_DEBUG(
1038  "energy after phi uniformity correction (for calo distortion) = "
1039  << std::format("{:.2f}", energy));
1040  }
1041 
1042  // Phi
1044  energy *= correction_phi_unif(etaCalo, phiCalo);
1045  ATH_MSG_DEBUG("energy after uniformity correction = "
1046  << std::format("{:.2f}", energy));
1047  }
1048 
1049  // ADC
1050  if (m_ADCLinearity_tool) {
1051  double et = energy / std::cosh(cl_eta);
1052  double corr =
1053  m_ADCLinearity_tool->getCorr(etaCalo, et, xAOD2ptype(input));
1054  energy *= corr;
1055  ATH_MSG_DEBUG("energy after ADC linearity correction = "
1056  << std::format("{:.2f}", energy));
1057  }
1058 
1059  // Gain
1060  if (m_gain_tool) {
1061  const auto es2 = Es2Acc.isAvailable(*input.caloCluster())
1062  ? Es2Acc(*input.caloCluster())
1063  : input.caloCluster()->energyBE(2);
1064  if (!(std::abs(cl_eta) < 1.52 and std::abs(cl_eta) > 1.37) and
1065  std::abs(cl_eta) < 2.4)
1067  cl_eta, energy / GeV, es2 / GeV,
1068  xAOD2ptype(input)); // cl_eta ok, TODO: check corrected E2
1069  } else if (m_gain_tool_run2) {
1070  double et = energy / std::cosh(cl_eta);
1071  double corr = m_gain_tool_run2->getUncertainty(etaCalo, et,
1072  xAOD2ptype(input), true);
1073  energy /= (1 + corr);
1074  }
1075  ATH_MSG_DEBUG("energy after gain correction = " << std::format("{:.2f}", energy));
1076  } else {
1077  if (m_user_random_run_number == 0) {
1079  randomrunnumber_getter("RandomRunNumber");
1080  if (randomrunnumber_getter.isAvailable(event_info)) {
1081  runNumber_for_tool = randomrunnumber_getter(event_info);
1082  } else {
1083  ATH_MSG_ERROR(
1084  "Pileup tool not run before using "
1085  "ElectronPhotonFourMomentumCorrection! Assuming it is 2016. If you "
1086  "want to force a specific period set the property randomRunNumber "
1087  "of the tool, e.g. in the job option: "
1088  "tool.randomRunNumber = 123456 or "
1089  "tool.randomRunNumber = "
1090  "EgammaCalibrationAndSmearingToolRunNumbersExample.run_2016");
1091  runNumber_for_tool = EgammaCalibPeriodRunNumbersExample::run_2016;
1092  }
1093  } else {
1094  runNumber_for_tool = m_user_random_run_number;
1095  }
1096  }
1097 
1098  const double eraw = ((Es0Acc.isAvailable(*input.caloCluster())
1099  ? Es0Acc(*input.caloCluster())
1100  : input.caloCluster()->energyBE(0)) +
1101  (Es1Acc.isAvailable(*input.caloCluster())
1102  ? Es1Acc(*input.caloCluster())
1103  : input.caloCluster()->energyBE(1)) +
1104  (Es2Acc.isAvailable(*input.caloCluster())
1105  ? Es2Acc(*input.caloCluster())
1106  : input.caloCluster()->energyBE(2)) +
1107  (Es3Acc.isAvailable(*input.caloCluster())
1108  ? Es3Acc(*input.caloCluster())
1109  : input.caloCluster()->energyBE(3)));
1110 
1111 
1113  ATH_MSG_DEBUG("is fast");
1115  ATH_MSG_DEBUG("is full");
1117  ATH_MSG_DEBUG("is data");
1118 
1119  // apply scale factors or systematics
1120  energy = m_rootTool->getCorrectedEnergy(
1121  runNumber_for_tool, dataType, xAOD2ptype(input),
1122  input.caloCluster()->eta(),
1123  input.caloCluster()->etaBE(2),
1124  xAOD::get_eta_calo(*input.caloCluster(), input.author(), false), energy,
1125  Es2Acc.isAvailable(*input.caloCluster())
1126  ? Es2Acc(*input.caloCluster())
1127  : input.caloCluster()->energyBE(2),
1128  eraw, seed, oldtool_scale_flag_this_event(input, event_info),
1130  m_varSF);
1131 
1132  ATH_MSG_DEBUG("energy after scale/systematic correction = " << std::format("{:.2f}", energy));
1133 
1134  // TODO: this check should be done before systematics variations
1135  const double new_energy2 = energy * energy;
1136  const double m2 = input.m() * input.m();
1137  const double p2 = new_energy2 > m2 ? new_energy2 - m2 : 0.;
1138  input.setPt(sqrt(p2) / cosh(input.eta()));
1139  ATH_MSG_DEBUG("after setting pt, energy = " << input.e());
1140  return CP::CorrectionCode::Ok;
1141 }
1142 
1144  xAOD::Egamma* p, const xAOD::EventInfo* event_info) {
1145  ANA_CHECK_THROW(applyCorrection(*p, *event_info));
1146  ATH_MSG_DEBUG("returning " << p->e());
1147  return p->e();
1148 }
1149 
1152  const xAOD::Egamma& p, const xAOD::EventInfo& event_info) const {
1153  if (!event_info.eventType(xAOD::EventInfo::IS_SIMULATION))
1157  else
1159 }
1160 
1163  const xAOD::Egamma&, const xAOD::EventInfo& event_info) const {
1164  return event_info.eventType(xAOD::EventInfo::IS_SIMULATION)
1167 }
1168 
1170  const xAOD::Electron* el, const xAOD::EventInfo* event_info) {
1173  ? m_simulation
1175 
1176  const xAOD::TrackParticle* eTrack = el->trackParticle();
1177 
1178  // track momentum and eta
1179  const float el_tracketa = eTrack->eta();
1180  const float el_trackmomentum = eTrack->pt() * cosh(el->eta());
1181 
1182  return m_rootTool->getCorrectedMomentum(
1183  dataType, PATCore::ParticleType::Electron, el_trackmomentum, el_tracketa,
1184  oldtool_scale_flag_this_event(*el, *event_info), m_varSF);
1185 }
1186 
1188  const CP::SystematicVariation& systematic) const {
1190  return sys.find(systematic) != sys.end();
1191 }
1192 
1194  const {
1195  CP::SystematicSet affecting_systematics;
1196  for (const auto& it : m_syst_description) {
1197  affecting_systematics.insert(it.first);
1198  }
1199  for (const auto& it : m_syst_description_resolution) {
1200  affecting_systematics.insert(it.first);
1201  }
1202 
1203  return affecting_systematics;
1204 }
1205 
1207  const EgammaPredicate always = [](const xAOD::Egamma&) { return true; };
1208 
1209  // Try to simplify a bit for the ones that are fully correlate in eta,
1210  // whatever the model and that are not included in the macros including
1211  // - ADC non linearity
1212  // - L2Gain
1213  // - Leakage
1214  // - Conversion related
1215  // - TopoCluster threshold
1216  // - AF2
1217  // - PS_BARREL_B12
1218  // - S12EXTRALASTETABINRUN2
1219  // - ZEESTAT
1220  // - Run3 pre OFC + EXTRA
1221  if (m_decorrelation_model_scale == ScaleDecorrelation::FULL_ETA_CORRELATED ||
1223  // Electron leakage, ADCLin, convReco only in final run2 recommendations
1226  // systematic related to ADC non linearity correction. Before 2022, there
1227  // was not correction, nor related systematic
1229  m_syst_description[CP::SystematicVariation("EG_SCALE_ADCLIN", +1)] =
1231  m_syst_description[CP::SystematicVariation("EG_SCALE_ADCLIN", -1)] =
1233  }
1234  // Gain splitted uncertainty
1235  m_syst_description[CP::SystematicVariation("EG_SCALE_L2MEDIUMGAIN", +1)] =
1237  m_syst_description[CP::SystematicVariation("EG_SCALE_L2MEDIUMGAIN", -1)] =
1239  m_syst_description[CP::SystematicVariation("EG_SCALE_L2LOWGAIN", +1)] =
1241  m_syst_description[CP::SystematicVariation("EG_SCALE_L2LOWGAIN", -1)] =
1243 
1244  // Electron leakage
1245  m_syst_description[CP::SystematicVariation("EG_SCALE_LEAKAGEELEC", +1)] =
1247  m_syst_description[CP::SystematicVariation("EG_SCALE_LEAKAGEELEC", -1)] =
1249 
1250  // Conversion related
1251  m_syst_description[CP::SystematicVariation("PH_SCALE_CONVRECO", +1)] =
1253  m_syst_description[CP::SystematicVariation("PH_SCALE_CONVRECO", -1)] =
1255  }
1256  // The equivalent of convReco (convefficiency and convfakerate) for other
1257  // models
1258  else {
1259  m_syst_description[CP::SystematicVariation("PH_SCALE_CONVEFFICIENCY",
1260  +1)] =
1262  m_syst_description[CP::SystematicVariation("PH_SCALE_CONVEFFICIENCY",
1263  -1)] =
1265  m_syst_description[CP::SystematicVariation("PH_SCALE_CONVFAKERATE", +1)] =
1267  m_syst_description[CP::SystematicVariation("PH_SCALE_CONVFAKERATE", -1)] =
1269  }
1270 
1271  // additional systematics for R22 OFC and MC21 pre and bulk
1273  m_syst_description[CP::SystematicVariation("EG_SCALE_OFC", +1)] =
1275  m_syst_description[CP::SystematicVariation("EG_SCALE_OFC", -1)] =
1277 
1278  m_syst_description[CP::SystematicVariation("EG_SCALE_EXTRARUN3PRE", +1)] =
1280  m_syst_description[CP::SystematicVariation("EG_SCALE_EXTRARUN3PRE", -1)] =
1282  }
1283 
1293 
1294  // topo clustr threshold systematics aded to release 21 recommendations
1295  m_syst_description[CP::SystematicVariation("EG_SCALE_TOPOCLUSTER_THRES",
1296  +1)] =
1298  m_syst_description[CP::SystematicVariation("EG_SCALE_TOPOCLUSTER_THRES",
1299  -1)] =
1301 
1302  // AF3 for run3 models: es2022_R22_PRE and esmodel >= es2023_R22_Run2_v1
1304  m_syst_description[CP::SystematicVariation("EG_SCALE_AF3", +1)] =
1306  m_syst_description[CP::SystematicVariation("EG_SCALE_AF3", -1)] =
1308  }
1309  else {
1310  // and extra AF2 systematics for release 21 recommendations - Moriond 2018
1311  // - pending proper AF2 to FullSim correction with release 21
1312  m_syst_description[CP::SystematicVariation("EG_SCALE_AF2", +1)] =
1314  m_syst_description[CP::SystematicVariation("EG_SCALE_AF2", -1)] =
1316  }
1317  }
1318 
1319  // PS correlated barrel uncertainty
1328  m_syst_description[CP::SystematicVariation("EG_SCALE_PS_BARREL_B12",
1329  +1)] =
1331  m_syst_description[CP::SystematicVariation("EG_SCALE_PS_BARREL_B12",
1332  -1)] =
1334  }
1335 
1336  // additional systematic for S12 last eta bin run2
1342  "EG_SCALE_S12EXTRALASTETABINRUN2", +1)] =
1345  "EG_SCALE_S12EXTRALASTETABINRUN2", -1)] =
1347  }
1348 
1349  // Zee stat, if for FULL we do not ask for m_use_full_statistical_error
1351  ScaleDecorrelation::FULL_ETA_CORRELATED or
1353  // return 1 variation only, fully correlated in eta, equal to the correct
1354  // value but scaled by sqrt(number of bins) the scaling is done by the old
1355  // tool
1356  m_syst_description[CP::SystematicVariation("EG_SCALE_ZEESTAT", +1)] =
1358  m_syst_description[CP::SystematicVariation("EG_SCALE_ZEESTAT", -1)] =
1360  }
1361  }
1362  if (m_decorrelation_model_scale == ScaleDecorrelation::ONENP) {
1363  // TODO: independet implementation of ALL UP looping on all the variations
1364  m_syst_description[CP::SystematicVariation("EG_SCALE_ALL", +1)] =
1366  m_syst_description[CP::SystematicVariation("EG_SCALE_ALL", -1)] =
1368 
1370  // extra AF2 systematics in addition to the 1NP
1377  m_syst_description[CP::SystematicVariation("EG_SCALE_AF2", +1)] =
1379  m_syst_description[CP::SystematicVariation("EG_SCALE_AF2", -1)] =
1381  }
1383  m_syst_description[CP::SystematicVariation("EG_SCALE_AF3", +1)] =
1385  m_syst_description[CP::SystematicVariation("EG_SCALE_AF3", -1)] =
1387  }
1388  }
1389  }
1390  else if (m_decorrelation_model_scale ==
1391  ScaleDecorrelation::FULL_ETA_CORRELATED) {
1392 // all the physical effects separately, considered as fully correlated in eta
1393 
1394 // common systematics for all the esmodels
1395 #define SYSMACRO(name, fullcorrelated, decorrelation, flagup, flagdown) \
1396  m_syst_description[CP::SystematicVariation(#name, +1)] = \
1397  SysInfo{always, flagup}; \
1398  m_syst_description[CP::SystematicVariation(#name, -1)] = \
1399  SysInfo{always, flagdown};
1400 #include "ElectronPhotonFourMomentumCorrection/systematics_S12_2022.def"
1401 #undef SYSMACRO
1402 
1405  m_syst_description[CP::SystematicVariation("EG_SCALE_LARCALIB", +1)] =
1407  m_syst_description[CP::SystematicVariation("EG_SCALE_LARCALIB", -1)] =
1409  m_syst_description[CP::SystematicVariation("EG_SCALE_L2GAIN", +1)] =
1411  m_syst_description[CP::SystematicVariation("EG_SCALE_L2GAIN", -1)] =
1413  }
1414 
1415  // additional systematics for S12 run2
1426  "EG_SCALE_LARCALIB_EXTRA2015PRE", +1)] =
1429  "EG_SCALE_LARCALIB_EXTRA2015PRE", -1)] =
1431  }
1432 
1433  // additional systematics for temperature run1->run2
1440  "EG_SCALE_LARTEMPERATURE_EXTRA2015PRE", +1)] =
1443  "EG_SCALE_LARTEMPERATURE_EXTRA2015PRE", -1)] =
1445  }
1446 
1447  // additional systematic for temperature 2015->2016
1450  "EG_SCALE_LARTEMPERATURE_EXTRA2016PRE", +1)] =
1453  "EG_SCALE_LARTEMPERATURE_EXTRA2016PRE", -1)] =
1455  }
1456 
1457  // additional systematic for PP0 region
1472  m_syst_description[CP::SystematicVariation("EG_SCALE_MATPP0", +1)] =
1474  m_syst_description[CP::SystematicVariation("EG_SCALE_MATPP0", -1)] =
1476  }
1477 
1478  // systematic related to wtots1
1493  m_syst_description[CP::SystematicVariation("EG_SCALE_WTOTS1", +1)] =
1495  m_syst_description[CP::SystematicVariation("EG_SCALE_WTOTS1", -1)] =
1497  }
1498 
1499  // systematic for the scintillators
1517  // scintillator systematics
1518  m_syst_description[CP::SystematicVariation("EG_SCALE_E4SCINTILLATOR",
1519  +1)] =
1521  m_syst_description[CP::SystematicVariation("EG_SCALE_E4SCINTILLATOR",
1522  -1)] =
1524  }
1525 
1526  } else if (m_decorrelation_model_scale ==
1527  ScaleDecorrelation::ONENP_PLUS_UNCONR) {
1528 // qsum of all variations correlated 8/13 TeV + uncorrelated (additional
1529 // systematics for 2015PRE or 2016) all the physical effects separately,
1530 // considered as fully correlated in eta
1531 // TODO: fix for es2017
1532 #define SYSMACRO(name, fullcorrelated, decorrelation, flagup, flagdown) \
1533  m_syst_description[CP::SystematicVariation(#name, +1)] = \
1534  SysInfo{always, flagup}; \
1535  m_syst_description[CP::SystematicVariation(#name, -1)] = \
1536  SysInfo{always, flagdown};
1537 #include "ElectronPhotonFourMomentumCorrection/systematics_1NPCOR_PLUS_UNCOR.def"
1538 #undef SYSMACRO
1539 
1540  // additional systematic for S12 last eta bin run2 - not needed anymore for
1541  // last 20.7 model since it is part of bin per bin E1/E2 uncertainty in root
1542  // file
1547  "EG_SCALE_S12EXTRALASTETABINRUN2", +1)] =
1550  "EG_SCALE_S12EXTRALASTETABINRUN2", -1)] =
1552  }
1553 
1555  using pairvector = std::vector<std::pair<double, double>>;
1556  const pairvector decorrelation_bins_BE = {{0., 1.45}, {1.52, 2.5}};
1557  const std::vector<double> decorrelation_edges_TWELVE = {
1558  0., 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4};
1559  std::vector<double> decorrelation_edges_MODULE = {
1560  0., 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.37, 1.52, 1.8};
1561  const std::vector<double> decorrelation_edges_MATERIAL = {0.0, 1.1, 1.5,
1562  2.1, 2.5};
1563 
1564  std::vector<double> decorrelation_edges_S12;
1565  // for es2018_R21_v1 : 4 eta bins for muon E1/E2 uncertainty correlation
1567  decorrelation_edges_S12.resize(5);
1568  decorrelation_edges_S12 = {0., 1.35, 1.5, 2.4, 2.5};
1571  decorrelation_edges_S12.resize(8);
1572  decorrelation_edges_S12 = {0., 0.6, 1.0, 1.35, 1.5, 1.8, 2.4, 2.5};
1573  //
1574  // PS scale from muons, so "crack" is a bit different
1575  decorrelation_edges_MODULE[7] = 1.4;
1576  decorrelation_edges_MODULE[8] = 1.5;
1577  }
1578  // for previous run 2 muon calibration with 20.7, 5 eta bins for E1/E2
1579  // uncertainty correlation
1580  else {
1581  decorrelation_edges_S12.resize(6);
1582  decorrelation_edges_S12 = {0., 0.6, 1.4, 1.5, 2.4, 2.5};
1583  }
1584 
1595 #define SYSMACRO(name, fullcorrelated, decorrelation, flagup, flagdown) \
1596  if (bool(fullcorrelated)) { \
1597  m_syst_description[CP::SystematicVariation(#name, +1)] = \
1598  SysInfo{always, flagup}; \
1599  m_syst_description[CP::SystematicVariation(#name, -1)] = \
1600  SysInfo{always, flagdown}; \
1601  } else { \
1602  int i = 0; \
1603  for (const auto& p : AbsEtaCaloPredicatesFactory(decorrelation)) { \
1604  m_syst_description[CP::SystematicVariation( \
1605  #name "__ETABIN" + std::to_string(i), +1)] = SysInfo{p, flagup}; \
1606  m_syst_description[CP::SystematicVariation( \
1607  #name "__ETABIN" + std::to_string(i), -1)] = SysInfo{p, flagdown}; \
1608  i += 1; \
1609  } \
1610  }
1611 #include "ElectronPhotonFourMomentumCorrection/systematics.def"
1612 #undef SYSMACRO
1615 #define SYSMACRO(name, fullcorrelated, decorrelation, flagup, flagdown) \
1616  if (bool(fullcorrelated)) { \
1617  m_syst_description[CP::SystematicVariation(#name, +1)] = \
1618  SysInfo{always, flagup}; \
1619  m_syst_description[CP::SystematicVariation(#name, -1)] = \
1620  SysInfo{always, flagdown}; \
1621  } else { \
1622  int i = 0; \
1623  for (const auto& p : AbsEtaCaloPredicatesFactory(decorrelation)) { \
1624  m_syst_description[CP::SystematicVariation( \
1625  #name "__ETABIN" + std::to_string(i), +1)] = SysInfo{p, flagup}; \
1626  m_syst_description[CP::SystematicVariation( \
1627  #name "__ETABIN" + std::to_string(i), -1)] = SysInfo{p, flagdown}; \
1628  i += 1; \
1629  } \
1630  }
1631 #include "ElectronPhotonFourMomentumCorrection/systematics_S12_2022.def"
1632 #undef SYSMACRO
1633  } else {
1634 #define SYSMACRO(name, fullcorrelated, decorrelation, flagup, flagdown) \
1635  if (bool(fullcorrelated)) { \
1636  m_syst_description[CP::SystematicVariation(#name, +1)] = \
1637  SysInfo{always, flagup}; \
1638  m_syst_description[CP::SystematicVariation(#name, -1)] = \
1639  SysInfo{always, flagdown}; \
1640  } else { \
1641  int i = 0; \
1642  for (const auto& p : AbsEtaCaloPredicatesFactory(decorrelation)) { \
1643  m_syst_description[CP::SystematicVariation( \
1644  #name "__ETABIN" + std::to_string(i), +1)] = SysInfo{p, flagup}; \
1645  m_syst_description[CP::SystematicVariation( \
1646  #name "__ETABIN" + std::to_string(i), -1)] = SysInfo{p, flagdown}; \
1647  i += 1; \
1648  } \
1649  }
1650 #include "ElectronPhotonFourMomentumCorrection/systematics_S12.def"
1651 #undef SYSMACRO
1652  } // else
1653 
1655  // statistical error, decorrelate in *all* the bins
1656  int i = 0;
1657  const TAxis& axis_statistical_error(m_rootTool->get_ZeeStat_eta_axis());
1658  for (int ibin = 1; ibin <= axis_statistical_error.GetNbins(); ++ibin) {
1659  auto p = EtaCaloPredicateFactory(
1660  axis_statistical_error.GetBinLowEdge(ibin),
1661  axis_statistical_error.GetBinLowEdge(ibin + 1));
1663  "EG_SCALE_ZEESTAT__ETABIN" + std::to_string(i), +1)] =
1666  "EG_SCALE_ZEESTAT__ETABIN" + std::to_string(i), -1)] =
1668  ++i;
1669  }
1670  }
1671 
1672  // additional systematics for S12 run2
1683  "EG_SCALE_LARCALIB_EXTRA2015PRE__ETABIN0", +1)] =
1687  "EG_SCALE_LARCALIB_EXTRA2015PRE__ETABIN0", -1)] =
1691  "EG_SCALE_LARCALIB_EXTRA2015PRE__ETABIN1", +1)] =
1692  SysInfo{AbsEtaCaloPredicateFactory({1.45, 2.47}),
1695  "EG_SCALE_LARCALIB_EXTRA2015PRE__ETABIN1", -1)] =
1696  SysInfo{AbsEtaCaloPredicateFactory({1.45, 2.47}),
1699  "EG_SCALE_LARCALIB_EXTRA2015PRE__ETABIN2", +1)] =
1700  SysInfo{AbsEtaCaloPredicateFactory({2.47, 3.2}),
1703  "EG_SCALE_LARCALIB_EXTRA2015PRE__ETABIN2", -1)] =
1704  SysInfo{AbsEtaCaloPredicateFactory({2.47, 3.2}),
1706  }
1707 
1708  // additional systematics for temperature run1->run2
1715  "EG_SCALE_LARTEMPERATURE_EXTRA2015PRE__ETABIN0", +1)] =
1716  SysInfo{AbsEtaCaloPredicateFactory(decorrelation_bins_BE[0]),
1719  "EG_SCALE_LARTEMPERATURE_EXTRA2015PRE__ETABIN0", -1)] =
1720  SysInfo{AbsEtaCaloPredicateFactory(decorrelation_bins_BE[0]),
1723  "EG_SCALE_LARTEMPERATURE_EXTRA2015PRE__ETABIN1", +1)] =
1724  SysInfo{AbsEtaCaloPredicateFactory(decorrelation_bins_BE[1]),
1727  "EG_SCALE_LARTEMPERATURE_EXTRA2015PRE__ETABIN1", -1)] =
1728  SysInfo{AbsEtaCaloPredicateFactory(decorrelation_bins_BE[1]),
1730  }
1731 
1732  // additional systematic for temperature 2015->2016
1735  "EG_SCALE_LARTEMPERATURE_EXTRA2016PRE__ETABIN0", +1)] =
1736  SysInfo{AbsEtaCaloPredicateFactory(decorrelation_bins_BE[0]),
1739  "EG_SCALE_LARTEMPERATURE_EXTRA2016PRE__ETABIN1", +1)] =
1740  SysInfo{AbsEtaCaloPredicateFactory(decorrelation_bins_BE[1]),
1743  "EG_SCALE_LARTEMPERATURE_EXTRA2016PRE__ETABIN0", -1)] =
1744  SysInfo{AbsEtaCaloPredicateFactory(decorrelation_bins_BE[0]),
1747  "EG_SCALE_LARTEMPERATURE_EXTRA2016PRE__ETABIN1", -1)] =
1748  SysInfo{AbsEtaCaloPredicateFactory(decorrelation_bins_BE[1]),
1750  }
1751 
1752  // additional systematic for PP0 region
1767  m_syst_description[CP::SystematicVariation("EG_SCALE_MATPP0__ETABIN0",
1768  +1)] = SysInfo{
1770  m_syst_description[CP::SystematicVariation("EG_SCALE_MATPP0__ETABIN1",
1771  +1)] = SysInfo{
1773  m_syst_description[CP::SystematicVariation("EG_SCALE_MATPP0__ETABIN0",
1774  -1)] = SysInfo{
1776  m_syst_description[CP::SystematicVariation("EG_SCALE_MATPP0__ETABIN1",
1777  -1)] =
1780  }
1781 
1782  // systematic related to wtots1
1795  m_syst_description[CP::SystematicVariation("EG_SCALE_WTOTS1", +1)] =
1797  m_syst_description[CP::SystematicVariation("EG_SCALE_WTOTS1", -1)] =
1799  }
1800 
1801  // systematic related to wtots1, decorrelate eta bin [1.52,1.82] from rest
1804  m_syst_description[CP::SystematicVariation("EG_SCALE_WTOTS1__ETABIN0",
1805  +1)] =
1806  SysInfo{DoubleOrAbsEtaCaloPredicate(0, 1.52, 1.82, 2.47),
1808  m_syst_description[CP::SystematicVariation("EG_SCALE_WTOTS1__ETABIN0",
1809  -1)] =
1810  SysInfo{DoubleOrAbsEtaCaloPredicate(0, 1.52, 1.82, 2.47),
1812  m_syst_description[CP::SystematicVariation("EG_SCALE_WTOTS1__ETABIN1",
1813  +1)] =
1814  SysInfo{AbsEtaCaloPredicateFactory({1.52, 1.82}),
1816  m_syst_description[CP::SystematicVariation("EG_SCALE_WTOTS1__ETABIN1",
1817  -1)] =
1818  SysInfo{AbsEtaCaloPredicateFactory({1.52, 1.82}),
1820  }
1821 
1822  // systematic for the scintillators
1841  "EG_SCALE_E4SCINTILLATOR__ETABIN0", +1)] =
1845  "EG_SCALE_E4SCINTILLATOR__ETABIN1", +1)] =
1846  SysInfo{AbsEtaCaloPredicateFactory(1.46, 1.52),
1849  "EG_SCALE_E4SCINTILLATOR__ETABIN2", +1)] =
1853  "EG_SCALE_E4SCINTILLATOR__ETABIN0", -1)] =
1857  "EG_SCALE_E4SCINTILLATOR__ETABIN1", -1)] =
1858  SysInfo{AbsEtaCaloPredicateFactory(1.46, 1.52),
1861  "EG_SCALE_E4SCINTILLATOR__ETABIN2", -1)] =
1864  }
1865  } else {
1866  ATH_MSG_FATAL("scale decorrelation model invalid");
1867  }
1868 
1869  // resolution systematics
1872  "EG_RESOLUTION_ALL", +1)] = egEnergyCorr::Resolution::AllUp;
1874  "EG_RESOLUTION_ALL", -1)] = egEnergyCorr::Resolution::AllDown;
1875  } else if (m_decorrelation_model_resolution ==
1878  "EG_RESOLUTION_ZSMEARING", +1)] = egEnergyCorr::Resolution::ZSmearingUp;
1880  "EG_RESOLUTION_ZSMEARING", -1)] =
1883  "EG_RESOLUTION_SAMPLINGTERM", +1)] =
1886  "EG_RESOLUTION_SAMPLINGTERM", -1)] =
1889  "EG_RESOLUTION_MATERIALID", +1)] =
1892  "EG_RESOLUTION_MATERIALID", -1)] =
1895  "EG_RESOLUTION_MATERIALCALO", +1)] =
1898  "EG_RESOLUTION_MATERIALCALO", -1)] =
1901  "EG_RESOLUTION_MATERIALGAP", +1)] =
1904  "EG_RESOLUTION_MATERIALGAP", -1)] =
1907  "EG_RESOLUTION_MATERIALCRYO", +1)] =
1910  "EG_RESOLUTION_MATERIALCRYO", -1)] =
1913  "EG_RESOLUTION_PILEUP", +1)] = egEnergyCorr::Resolution::PileUpUp;
1915  "EG_RESOLUTION_PILEUP", -1)] = egEnergyCorr::Resolution::PileUpDown;
1931  "EG_RESOLUTION_MATERIALIBL", +1)] =
1934  "EG_RESOLUTION_MATERIALIBL", -1)] =
1937  "EG_RESOLUTION_MATERIALPP0", +1)] =
1940  "EG_RESOLUTION_MATERIALPP0", -1)] =
1942 
1948  "EG_RESOLUTION_AF2", +1)] = egEnergyCorr::Resolution::afUp;
1950  "EG_RESOLUTION_AF2", -1)] = egEnergyCorr::Resolution::afDown;
1951  }
1954  "EG_RESOLUTION_AF3", +1)] = egEnergyCorr::Resolution::afUp;
1956  "EG_RESOLUTION_AF3", -1)] = egEnergyCorr::Resolution::afDown;
1957  }
1958 
1959  if (m_TESModel == egEnergyCorr::es2022_R22_PRE) { // exta sys. for Run-3
1960  // pre-recommendations
1962  "EG_RESOLUTION_OFC", +1)] = egEnergyCorr::Resolution::OFCUp;
1964  "EG_RESOLUTION_OFC", -1)] = egEnergyCorr::Resolution::OFCDown;
1965  }
1966  }
1967  } else {
1968  ATH_MSG_FATAL("resolution decorrelation model invalid");
1969  }
1970 
1971  // ep combination systematics
1972  if (m_use_ep_combination) {
1973  m_syst_description[CP::SystematicVariation("EL_SCALE_MOMENTUM", +1)] =
1975  m_syst_description[CP::SystematicVariation("EL_SCALE_MOMENTUM", -1)] =
1977  }
1978 }
1979 
1981  const {
1982  return affectingSystematics();
1983 }
1984 
1986  const CP::SystematicSet& systConfig) {
1987 
1988  // set the nominal one (no systematics)
1997  m_currentScalePredicate = [](const xAOD::Egamma&) { return true; };
1998 
1999  if (systConfig.empty())
2000  return StatusCode::SUCCESS;
2001 
2002  // the following code allows only ONE systematic variation at a time (1 for
2003  // scale, 1 for resolution)
2004 
2005  bool first_scale = true;
2006  bool first_resolution = true;
2007  for (const auto& it : systConfig) {
2008  const auto found_scale = m_syst_description.find(it);
2009  if (found_scale != m_syst_description.end()) {
2010  if (not first_scale) {
2011  ATH_MSG_ERROR("multiple scale variations not supported");
2012  throw std::runtime_error("multiple scale variations not supported");
2013  }
2014  first_scale = false;
2015  m_currentScaleVariation_MC = found_scale->second.effect;
2016  m_currentScalePredicate = found_scale->second.predicate;
2017  }
2018 
2019  const auto found_resolution = m_syst_description_resolution.find(it);
2020  if (found_resolution != m_syst_description_resolution.end()) {
2021  if (not first_resolution) {
2022  ATH_MSG_ERROR("multiple resolution variations not supported");
2023  throw std::runtime_error(
2024  "multiple resolution variations not supported");
2025  }
2026  first_resolution = false;
2027  m_currentResolutionVariation_MC = found_resolution->second;
2028  }
2029  }
2030 
2031  return StatusCode::SUCCESS;
2032 }
2033 
2035  double Ecl, double phi, double eta) const {
2036 
2037  // Intermodule Widening Correction: E_corr = E / (a' - b' * ((1 / (1 +
2038  // exp((phi_mod - 2 * pi / 32) * c))) * (1 / (1 + exp((phi_mod - 2 * pi / 32)
2039  // * (d)))))) (phi_min, phi_max) : [a' = a / a, b' = b / a, c, d]
2040 
2041  double Ecl_corr = 0.;
2042  int DivInt = 0;
2043  double pi = M_PI;
2044 
2056 
2057  double phi_mod = 0;
2058  if (phi < 0)
2059  phi_mod = fmod(phi, 2 * pi / 16.) + pi / 8.;
2060  else
2061  phi_mod = fmod(phi, 2 * pi / 16.);
2062 
2063  // The correction concerns only the barrel
2064  if (std::abs(eta) <= 1.37) {
2065 
2066  if (phi < (-7 * pi / 8) && phi > (-1 * pi))
2067  Ecl_corr =
2068  Ecl /
2069  (1 - 0.1086 *
2070  ((1 / (1 + exp((phi_mod - 2 * pi / 32.) * 175.2759))) *
2071  (1 / (1 + exp((phi_mod - 2 * pi / 32.) * (-189.3612))))));
2072  if (phi < (-6 * pi / 8) && phi > (-7 * pi / 8))
2073  Ecl_corr =
2074  Ecl /
2075  (1 - 0.0596 *
2076  ((1 / (1 + exp((phi_mod - 2 * pi / 32.) * 170.8305))) *
2077  (1 / (1 + exp((phi_mod - 2 * pi / 32.) * (-233.3782))))));
2078  if (phi < (-5 * pi / 8) && phi > (-6 * pi / 8))
2079  Ecl_corr =
2080  Ecl /
2081  (1 - 0.0596 *
2082  ((1 / (1 + exp((phi_mod - 2 * pi / 32.) * 147.1451))) *
2083  (1 / (1 + exp((phi_mod - 2 * pi / 32.) * (-139.3386))))));
2084  if (phi < (-4 * pi / 8) && phi > (-5 * pi / 8))
2085  Ecl_corr =
2086  Ecl /
2087  (1 - 0.0583 *
2088  ((1 / (1 + exp((phi_mod - 2 * pi / 32.) * 168.4644))) *
2089  (1 / (1 + exp((phi_mod - 2 * pi / 32.) * (-246.2897))))));
2090  if (phi < (-3 * pi / 8) && phi > (-4 * pi / 8))
2091  Ecl_corr =
2092  Ecl /
2093  (1 - 0.0530 *
2094  ((1 / (1 + exp((phi_mod - 2 * pi / 32.) * 177.6703))) *
2095  (1 / (1 + exp((phi_mod - 2 * pi / 32.) * (-198.3227))))));
2096  if (phi < (-2 * pi / 8) && phi > (-3 * pi / 8))
2097  Ecl_corr =
2098  Ecl /
2099  (1 - 0.0672 *
2100  ((1 / (1 + exp((phi_mod - 2 * pi / 32.) * 145.0693))) *
2101  (1 / (1 + exp((phi_mod - 2 * pi / 32.) * (-242.1771))))));
2102  if (phi < (-1 * pi / 8) && phi > (-2 * pi / 8))
2103  Ecl_corr =
2104  Ecl /
2105  (1 - 0.0871 *
2106  ((1 / (1 + exp((phi_mod - 2 * pi / 32.) * 132.3303))) *
2107  (1 / (1 + exp((phi_mod - 2 * pi / 32.) * (-166.1833))))));
2108  if (phi < (0 * pi / 8) && phi > (-1 * pi / 8))
2109  Ecl_corr =
2110  Ecl /
2111  (1 - 0.0948 *
2112  ((1 / (1 + exp((phi_mod - 2 * pi / 32.) * 127.6780))) *
2113  (1 / (1 + exp((phi_mod - 2 * pi / 32.) * (-150.0700))))));
2114  if (phi < (1 * pi / 8) && phi > (0 * pi / 8))
2115  Ecl_corr =
2116  Ecl /
2117  (1 - 0.1166 *
2118  ((1 / (1 + exp((phi_mod - 2 * pi / 32.) * 172.0679))) *
2119  (1 / (1 + exp((phi_mod - 2 * pi / 32.) * (-235.3293))))));
2120  if (phi < (2 * pi / 8) && phi > (1 * pi / 8))
2121  Ecl_corr =
2122  Ecl /
2123  (1 - 0.1172 *
2124  ((1 / (1 + exp((phi_mod - 2 * pi / 32.) * 190.3524))) *
2125  (1 / (1 + exp((phi_mod - 2 * pi / 32.) * (-198.9400))))));
2126  if (phi < (3 * pi / 8) && phi > (2 * pi / 8))
2127  Ecl_corr =
2128  Ecl /
2129  (1 - 0.1292 *
2130  ((1 / (1 + exp((phi_mod - 2 * pi / 32.) * 158.0540))) *
2131  (1 / (1 + exp((phi_mod - 2 * pi / 32.) * (-165.3893))))));
2132  if (phi < (4 * pi / 8) && phi > (3 * pi / 8))
2133  Ecl_corr =
2134  Ecl /
2135  (1 - 0.1557 *
2136  ((1 / (1 + exp((phi_mod - 2 * pi / 32.) * 162.2793))) *
2137  (1 / (1 + exp((phi_mod - 2 * pi / 32.) * (-133.5131))))));
2138  if (phi < (5 * pi / 8) && phi > (4 * pi / 8))
2139  Ecl_corr =
2140  Ecl /
2141  (1 - 0.1659 *
2142  ((1 / (1 + exp((phi_mod - 2 * pi / 32.) * 180.5270))) *
2143  (1 / (1 + exp((phi_mod - 2 * pi / 32.) * (-168.5074))))));
2144  if (phi < (6 * pi / 8) && phi > (5 * pi / 8))
2145  Ecl_corr =
2146  Ecl /
2147  (1 - 0.1123 *
2148  ((1 / (1 + exp((phi_mod - 2 * pi / 32.) * 128.2277))) *
2149  (1 / (1 + exp((phi_mod - 2 * pi / 32.) * (-154.4455))))));
2150  if (phi < (7 * pi / 8) && phi > (6 * pi / 8))
2151  Ecl_corr =
2152  Ecl /
2153  (1 - 0.1394 *
2154  ((1 / (1 + exp((phi_mod - 2 * pi / 32.) * 192.1216))) *
2155  (1 / (1 + exp((phi_mod - 2 * pi / 32.) * (-198.0727))))));
2156  if (phi < (8 * pi / 8) && phi > (7 * pi / 8))
2157  Ecl_corr =
2158  Ecl /
2159  (1 - 0.1001 *
2160  ((1 / (1 + exp((phi_mod - 2 * pi / 32.) * 199.1735))) *
2161  (1 / (1 + exp((phi_mod - 2 * pi / 32.) * (-176.4056))))));
2162  }
2163 
2164  // No correction for the EC
2165  else {
2166  Ecl_corr = Ecl;
2167  }
2168 
2169  }
2170 
2171  else {
2172 
2173  // Definitions of module folding into four quarters (top, left, bottom and
2174  // right)
2175 
2176  DivInt = (int)(phi / ((2 * pi) / 16.));
2177  double phi_mod = phi - DivInt * (2 * pi / 16.);
2178 
2179  // Centring on the intermodule --> phi_mod will now be in [0,0.4]
2180  if (phi_mod < 0)
2181  phi_mod += pi / 8.;
2182 
2183  // The correction concerns only the barrel
2184  if (std::abs(eta) <= 1.4) {
2185 
2186  // Top quarter
2187  if (phi < (3 * pi) / 4. && phi >= pi / 4.) {
2188  Ecl_corr =
2189  Ecl / (1 - 0.131 * ((1 / (1 + exp((phi_mod - 0.2) * 199.08))) *
2190  (1 / (1 + exp((phi_mod - 0.2) * (-130.36))))));
2191  }
2192 
2193  // Right quarter
2194  if (phi < pi / 4. && phi >= -pi / 4.) {
2195  Ecl_corr =
2196  Ecl / (1 - 0.0879 * ((1 / (1 + exp((phi_mod - 0.2) * 221.01))) *
2197  (1 / (1 + exp((phi_mod - 0.2) * (-149.51))))));
2198  }
2199  // Bottom quarter
2200  if (phi < -pi / 4. && phi >= (-3 * pi) / 4.) {
2201  Ecl_corr =
2202  Ecl / (1 - 0.0605 * ((1 / (1 + exp((phi_mod - 0.2) * 281.37))) *
2203  (1 / (1 + exp((phi_mod - 0.2) * (-170.29))))));
2204  }
2205  // Left quarter
2206  if ((phi < (-3 * pi) / 4.) || (phi >= (3 * pi) / 4.)) {
2207  Ecl_corr =
2208  Ecl / (1 - 0.102 * ((1 / (1 + exp((phi_mod - 0.2) * 235.37))) *
2209  (1 / (1 + exp((phi_mod - 0.2) * (-219.04))))));
2210  }
2211  }
2212 
2213  // No correction for the EC
2214  else {
2215  Ecl_corr = Ecl;
2216  }
2217  }
2218 
2219  return Ecl_corr;
2220 }
2221 
2223  double phi) const {
2224  constexpr double PI = M_PI;
2225  double Fcorr = 1.0;
2226 
2228  // wrong mapping HV -> sectors in run1
2229  if (eta < -0.4 && eta > -0.6) {
2230  if (phi < (14 * PI / 32.) && phi > (13 * PI / 32.)) {
2231  Fcorr += 0.035;
2232  } else if (phi < (13 * PI / 32.) && phi > (12 * PI / 32.)) {
2233  Fcorr -= 0.035;
2234  }
2235  }
2236  }
2237 
2249 
2250  if (eta < 0.2 && eta > 0.) {
2251  if (phi < (-7 * 2 * PI / 32.) && phi > (-8 * 2 * PI / 32.)) {
2252  Fcorr = 1.016314;
2253  }
2254  }
2255 
2256  else if (eta < 0.6 && eta > 0.4) {
2257  if (phi < 0 && phi > (-2 * PI / 32.)) {
2258  Fcorr = 1.041591;
2259  } else if (phi < (-4 * 2 * PI / 32.) && phi > (-5 * 2 * PI / 32.)) {
2260  Fcorr = 1.067346;
2261  }
2262  }
2263 
2264  else if (eta < 0.8 && eta > 0.6) {
2265  if (phi < (7 * 2 * PI / 32.) && phi > (6 * 2 * PI / 32.)) {
2266  Fcorr = 1.027980;
2267  }
2268  }
2269 
2270  else if (eta < 1.4 && eta > 1.2) {
2271  if (phi < (-9 * 2 * PI / 32.) && phi > (-10 * 2 * PI / 32.)) {
2272  Fcorr = 1.020299;
2273  } else if (phi < (-11 * 2 * PI / 32.) && phi > (-12 * 2 * PI / 32.)) {
2274  Fcorr = 1.051426;
2275  }
2276  }
2277 
2278  else if (eta < 2.3 && eta > 2.1) {
2279  if (phi < (-12 * 2 * PI / 32.) && phi > (-13 * 2 * PI / 32.)) {
2280  Fcorr = 1.071695;
2281  }
2282  }
2283 
2284  else if (eta < 0. && eta > -0.2) {
2285  if (phi < (-12 * 2 * PI / 32.) && phi > (-13 * 2 * PI / 32.)) {
2286  Fcorr = 1.008227;
2287  } else if (phi < (-8 * 2 * PI / 32.) && phi > (-9 * 2 * PI / 32.)) {
2288  Fcorr = 1.013929;
2289  }
2290  }
2291 
2292  else if (eta < -0.2 && eta > -0.4) {
2293  if (phi < (-9 * 2 * PI / 32.) && phi > (-10 * 2 * PI / 32.)) {
2294  Fcorr = 1.015749;
2295  }
2296  }
2297 
2298  else if (eta < -1.2 && eta > -1.4) {
2299  if (phi < (-6 * 2 * PI / 32.) && phi > (-7 * 2 * PI / 32.)) {
2300  Fcorr = 1.064954;
2301  }
2302  }
2303 
2304  else if (eta < -1.6 && eta > -1.8) {
2305  if (phi < (9 * 2 * PI / 32.) && phi > (8 * 2 * PI / 32.)) {
2306  Fcorr = 1.027448;
2307  }
2308  }
2309 
2310  else if (eta < -2.3 && eta > -2.5) {
2311  if (phi < (-8 * 2 * PI / 32.) && phi > (-9 * 2 * PI / 32.)) {
2312  Fcorr = 1.025882;
2313  } else if (phi < (5 * 2 * PI / 32.) && phi > (4 * 2 * PI / 32.)) {
2314  Fcorr = 1.036616;
2315  } else if (phi < (9 * 2 * PI / 32.) && phi > (8 * 2 * PI / 32.)) {
2316  Fcorr = 1.053838;
2317  } else if (phi < (10 * 2 * PI / 32.) && phi > (9 * 2 * PI / 32.)) {
2318  Fcorr = 1.026856;
2319  } else if (phi < (11 * 2 * PI / 32.) && phi > (10 * 2 * PI / 32.)) {
2320  Fcorr = 0.994382;
2321  }
2322  }
2323 
2324  } // es2017_summer_improved end
2325 
2326  else {
2327  if (eta < 0.6 && eta > 0.4) {
2328  if (phi < 0 && phi > (-2 * PI / 32.)) {
2329  Fcorr = 1.028;
2330  } else if (phi < (-4 * 2 * PI / 32.) && phi > (-5 * 2 * PI / 32.)) {
2331  Fcorr = 1.044;
2332  }
2333  }
2334 
2335  else if (eta < 0.8 && eta > 0.6) {
2336  if (phi < (7 * 2 * PI / 32.) && phi > (6 * 2 * PI / 32.)) {
2337  Fcorr = 1.022;
2338  }
2339  }
2340 
2341  else if (eta < 1.4 && eta > 1.2) {
2342  if (phi < (-11 * 2 * PI / 32.) && phi > (-12 * 2 * PI / 32.)) {
2343  Fcorr = 1.038;
2344  }
2345  }
2346 
2347  else if (eta < 2.0 && eta > 1.9) {
2348  if (phi < (10 * 2 * PI / 32.) && phi > (9 * 2 * PI / 32.)) {
2349  Fcorr = 1.029;
2350  }
2351  }
2352 
2353  else if (eta < -1.2 && eta > -1.4) {
2354  if (phi < (-4 * 2 * PI / 32.) && phi > (-5 * 2 * PI / 32.)) {
2355  Fcorr = 1.048;
2356  } else if (phi < (-6 * 2 * PI / 32.) && phi > (-7 * 2 * PI / 32.)) {
2357  Fcorr = 1.048;
2358  }
2359  }
2360 
2361  else if (eta < -1.6 && eta > -1.8) {
2362  if (phi < (9 * 2 * PI / 32.) && phi > (8 * 2 * PI / 32.)) {
2363  Fcorr = 1.024;
2364  }
2365  }
2366 
2367  else if (eta < -2.3 && eta > -2.5) {
2368  if (phi < (-8 * 2 * PI / 32.) && phi > (-9 * 2 * PI / 32.)) {
2369  Fcorr = 1.037;
2370  } else if (phi < (5 * 2 * PI / 32.) && phi > (4 * 2 * PI / 32.)) {
2371  Fcorr = 1.031;
2372  } else if (phi < (9 * 2 * PI / 32.) && phi > (8 * 2 * PI / 32.)) {
2373  Fcorr = 1.040;
2374  } else if (phi < (10 * 2 * PI / 32.) && phi > (9 * 2 * PI / 32.)) {
2375  Fcorr = 1.030;
2376  } else if (phi < (11 * 2 * PI / 32.) && phi > (10 * 2 * PI / 32.)) {
2377  Fcorr = 1.020;
2378  }
2379  }
2380  }
2381 
2382  return Fcorr;
2383 }
2384 
2385 } // namespace CP
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
python.Dso.registry
registry
Definition: Control/AthenaServices/python/Dso.py:159
CP::EgammaCalibrationAndSmearingTool::m_useFastSim
int m_useFastSim
Definition: EgammaCalibrationAndSmearingTool.h:170
xAOD::TrackParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TrackParticle_v1.cxx:73
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
egEnergyCorr::Resolution::MaterialPP0Up
@ MaterialPP0Up
Definition: egammaEnergyCorrectionTool.h:93
egEnergyCorr::Scale::OFCDown
@ OFCDown
Definition: egammaEnergyCorrectionTool.h:266
CP::EgammaCalibrationAndSmearingTool::m_doADCLinearityCorrection
int m_doADCLinearityCorrection
Definition: EgammaCalibrationAndSmearingTool.h:179
PATCore::ParticleType::UnconvertedPhoton
@ UnconvertedPhoton
Definition: PATCoreEnums.h:38
et
Extra patterns decribing particle interation process.
CP::EgammaCalibrationAndSmearingTool::getElectronMomentum
virtual double getElectronMomentum(const xAOD::Electron *, const xAOD::EventInfo *)
Definition: EgammaCalibrationAndSmearingTool.cxx:1169
egEnergyCorr::Resolution::SamplingTermUp
@ SamplingTermUp
Definition: egammaEnergyCorrectionTool.h:74
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
egEnergyCorr::es2011c
@ es2011c
Definition: egammaEnergyCorrectionTool.h:289
egEnergyCorr::Scale::LArCalibExtra2015PreDown
@ LArCalibExtra2015PreDown
Definition: egammaEnergyCorrectionTool.h:166
xAOD::Electron
Electron_v1 Electron
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Electron.h:17
xAOD::EgammaParameters::convertedPhoton
@ convertedPhoton
Definition: EgammaEnums.h:20
CP::EgammaCalibrationAndSmearingTool::isAffectedBySystematic
virtual bool isAffectedBySystematic(const CP::SystematicVariation &systematic) const override
Declare the interface that this class provides.
Definition: EgammaCalibrationAndSmearingTool.cxx:1187
python.SystemOfUnits.m2
int m2
Definition: SystemOfUnits.py:92
egEnergyCorr::es2011d
@ es2011d
Definition: egammaEnergyCorrectionTool.h:291
CP::EgammaCalibrationAndSmearingTool::affectingSystematics
virtual CP::SystematicSet affectingSystematics() const override
the list of all systematics this tool can be affected by
Definition: EgammaCalibrationAndSmearingTool.cxx:1193
egEnergyCorr::Scale::OFCUp
@ OFCUp
Definition: egammaEnergyCorrectionTool.h:265
CP::EgammaCalibrationAndSmearingTool::m_ResolutionType
std::string m_ResolutionType
Definition: EgammaCalibrationAndSmearingTool.h:168
vtune_athena.format
format
Definition: vtune_athena.py:14
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
PATCore::ParticleType::Type
Type
Definition: PATCoreEnums.h:35
CP::EgammaCalibrationAndSmearingTool::EgammaCalibrationAndSmearingTool
EgammaCalibrationAndSmearingTool(const std::string &name)
Definition: EgammaCalibrationAndSmearingTool.cxx:278
correlationModel::FULL
@ FULL
Definition: AsgElectronEfficiencyCorrectionTool.cxx:49
egEnergyCorr::Scale::afUp
@ afUp
Definition: egammaEnergyCorrectionTool.h:245
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
egEnergyCorr::Scale::LArTemperature2016PreUp
@ LArTemperature2016PreUp
Definition: egammaEnergyCorrectionTool.h:171
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:1980
CP::EgammaCalibrationAndSmearingTool::m_caloDistPhiUnifCorr
std::unique_ptr< TH2 > m_caloDistPhiUnifCorr
Definition: EgammaCalibrationAndSmearingTool.h:197
egEnergyCorr::Scale::ConvFakeRateDown
@ ConvFakeRateDown
Definition: egammaEnergyCorrectionTool.h:255
egEnergyCorr::Resolution::ZSmearingUp
@ ZSmearingUp
Definition: egammaEnergyCorrectionTool.h:70
egEnergyCorr::Scale::AllDown
@ AllDown
Definition: egammaEnergyCorrectionTool.h:273
Egamma
Definition: ClusMomentumPlots.cxx:11
CP::EgammaCalibrationAndSmearingTool::getResolution
double getResolution(const xAOD::Egamma &particle, bool withCT=true) const override
Definition: EgammaCalibrationAndSmearingTool.cxx:839
xAOD::Egamma_v1::e
virtual double e() const override final
The total energy of the particle.
Definition: Egamma_v1.cxx:90
xAOD::TrackParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TrackParticle_v1.cxx:77
NNPDF30NNLO.tune
tune
Definition: GeneratorFilters/share/common/NNPDF30NNLO.py:1
egEnergyCorr::Scale::L2GainDown
@ L2GainDown
Definition: egammaEnergyCorrectionTool.h:226
egEnergyCorr::Resolution::SigmaEff90
@ SigmaEff90
Definition: egammaEnergyCorrectionTool.h:116
CP::SystematicSet::empty
bool empty() const
returns: whether the set is empty
Definition: SystematicSet.h:67
egEnergyCorr::Scale::LArTemperature2015PreDown
@ LArTemperature2015PreDown
Definition: egammaEnergyCorrectionTool.h:168
PATCore::ParticleDataType::Fast
@ Fast
Definition: PATCoreEnums.h:22
egEnergyCorr::es2012cMedium
@ es2012cMedium
Definition: egammaEnergyCorrectionTool.h:298
CP::EgammaCalibrationAndSmearingTool::m_currentScaleVariation_data
egEnergyCorr::Scale::Variation m_currentScaleVariation_data
Definition: EgammaCalibrationAndSmearingTool.h:332
egEnergyCorr::es2017_R21_v1
@ es2017_R21_v1
Definition: egammaEnergyCorrectionTool.h:320
egEnergyCorr::Scale::LeakageElecUp
@ LeakageElecUp
Definition: egammaEnergyCorrectionTool.h:197
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:868
CP::EgammaCalibrationAndSmearingTool::m_decorrelation_model_name
std::string m_decorrelation_model_name
Definition: EgammaCalibrationAndSmearingTool.h:158
egEnergyCorr::Scale::MatPP0Down
@ MatPP0Down
Definition: egammaEnergyCorrectionTool.h:242
skel.it
it
Definition: skel.GENtoEVGEN.py:407
CP::use_intermodule_correction
bool use_intermodule_correction(egEnergyCorr::ESModel model)
Definition: EgammaCalibrationAndSmearingTool.cxx:188
egEnergyCorr::es2015PRE_res_improved
@ es2015PRE_res_improved
Definition: egammaEnergyCorrectionTool.h:304
asg
Definition: DataHandleTestTool.h:28
CP::EgammaCalibrationAndSmearingTool::m_currentScalePredicate
EgammaPredicate m_currentScalePredicate
Definition: EgammaCalibrationAndSmearingTool.h:336
CP::SystematicSet
Class to wrap a set of SystematicVariations.
Definition: SystematicSet.h:31
M_PI
#define M_PI
Definition: ActiveFraction.h:11
egammaEnergyCorrectionTool.h
egEnergyCorr::Scale::Nominal
@ Nominal
Definition: egammaEnergyCorrectionTool.h:132
downloadSingle.dataType
string dataType
Definition: downloadSingle.py:18
egEnergyCorr::Resolution::Gaussian
@ Gaussian
Definition: egammaEnergyCorrectionTool.h:112
CP::EgammaCalibrationAndSmearingTool::m_gain_tool
egGain::GainTool * m_gain_tool
Definition: EgammaCalibrationAndSmearingTool.h:313
CP::EgammaCalibrationAndSmearingTool::m_doScaleCorrection
int m_doScaleCorrection
Definition: EgammaCalibrationAndSmearingTool.h:165
egEnergyCorr::Scale::EXTRARUN3PREDown
@ EXTRARUN3PREDown
Definition: egammaEnergyCorrectionTool.h:270
egEnergyCorr::Scale::L2LowGainDown
@ L2LowGainDown
Definition: egammaEnergyCorrectionTool.h:229
CP::EgammaCalibrationAndSmearingTool::m_doLeakageCorrection
int m_doLeakageCorrection
Definition: EgammaCalibrationAndSmearingTool.h:180
CP::EgammaCalibrationAndSmearingTool::~EgammaCalibrationAndSmearingTool
~EgammaCalibrationAndSmearingTool()
Definition: EgammaCalibrationAndSmearingTool.cxx:345
egEnergyCorr::Scale::ZeeStatUp
@ ZeeStatUp
Definition: egammaEnergyCorrectionTool.h:144
PI
const float PI
Definition: test_isolaitonTool.cxx:61
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
egEnergyCorr::es2011dMedium
@ es2011dMedium
Definition: egammaEnergyCorrectionTool.h:292
CP::EgammaCalibrationAndSmearingTool::m_simulation
PATCore::ParticleDataType::DataType m_simulation
Definition: EgammaCalibrationAndSmearingTool.h:172
xAOD::Egamma_v1
Definition: Egamma_v1.h:56
CP::egammaMVAToolFolder
std::string egammaMVAToolFolder(egEnergyCorr::ESModel model)
Definition: EgammaCalibrationAndSmearingTool.cxx:84
egammaLayerRecalibTool::disable_S12Corrections
void disable_S12Corrections()
Definition: egammaLayerRecalibTool.h:359
SG::ConstAccessor< double >
egammaLayerRecalibTool::applyCorrection
CP::CorrectionCode applyCorrection(xAOD::Egamma &, const xAOD::EventInfo &event_info) const
Definition: egammaLayerRecalibTool.cxx:979
egEnergyCorr::Resolution::afDown
@ afDown
Definition: egammaEnergyCorrectionTool.h:98
CP::EgammaCalibrationAndSmearingTool::m_use_mva_calibration
int m_use_mva_calibration
Definition: EgammaCalibrationAndSmearingTool.h:182
egEnergyCorr::Scale::Wtots1Up
@ Wtots1Up
Definition: egammaEnergyCorrectionTool.h:237
CP::EgammaCalibrationAndSmearingTool::RandomNumber
unsigned int RandomNumber
Definition: EgammaCalibrationAndSmearingTool.h:107
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:894
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
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
CP::SystematicVariation
Definition: SystematicVariation.h:47
CP::EgammaCalibrationAndSmearingTool::m_useGainCorrection
int m_useGainCorrection
Definition: EgammaCalibrationAndSmearingTool.h:178
egEnergyCorr::es2023_R22_Run2_v1
@ es2023_R22_Run2_v1
Definition: egammaEnergyCorrectionTool.h:330
egEnergyCorr::Scale::ConvRecoDown
@ ConvRecoDown
Definition: egammaEnergyCorrectionTool.h:262
drawFromPickle.exp
exp
Definition: drawFromPickle.py:36
CP::EgammaCalibrationAndSmearingTool::m_decorrelation_model_scale_name
std::string m_decorrelation_model_scale_name
Definition: EgammaCalibrationAndSmearingTool.h:159
xAOD::EventInfo_v1::IS_SIMULATION
@ IS_SIMULATION
true: simulation, false: data
Definition: EventInfo_v1.h:151
egEnergyCorr::Resolution::PileUpUp
@ PileUpUp
Definition: egammaEnergyCorrectionTool.h:88
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:49
PATCore::ParticleDataType::Data
@ Data
Definition: PATCoreEnums.h:22
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
xAOD::EventInfo_v1::runNumber
uint32_t runNumber() const
The current event's run number.
pi
#define pi
Definition: TileMuonFitter.cxx:65
egEnergyCorr::Scale::L2GainUp
@ L2GainUp
Definition: egammaEnergyCorrectionTool.h:225
PATCore::ParticleDataType::DataType
DataType
Definition: PATCoreEnums.h:22
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
egEnergyCorr::Resolution::MaterialGapUp
@ MaterialGapUp
Definition: egammaEnergyCorrectionTool.h:82
egEnergyCorr::es2017_R21_v0
@ es2017_R21_v0
Definition: egammaEnergyCorrectionTool.h:318
egamma
Definition: egamma.h:58
egEnergyCorr::Scale::LeakageElecDown
@ LeakageElecDown
Definition: egammaEnergyCorrectionTool.h:198
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
egEnergyCorr::Scale::L2LowGainUp
@ L2LowGainUp
Definition: egammaEnergyCorrectionTool.h:230
ANA_CHECK_THROW
#define ANA_CHECK_THROW(EXP)
check whether the given expression was successful, throwing an exception on failure
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:339
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:1151
egEnergyCorr::Scale::MomentumUp
@ MomentumUp
Definition: egammaEnergyCorrectionTool.h:137
PATCore::ParticleDataType::Full
@ Full
Definition: PATCoreEnums.h:22
PATCore::ParticleType::ConvertedPhoton
@ ConvertedPhoton
Definition: PATCoreEnums.h:39
egEnergyCorr::es2015cPRE
@ es2015cPRE
Definition: egammaEnergyCorrectionTool.h:305
Egamma.h
CP::EgammaCalibrationAndSmearingTool::m_usePhiUniformCorrection
int m_usePhiUniformCorrection
Definition: EgammaCalibrationAndSmearingTool.h:176
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
egEnergyCorr::Scale::LArTemperature2015PreUp
@ LArTemperature2015PreUp
Definition: egammaEnergyCorrectionTool.h:167
CP::EgammaCalibrationAndSmearingTool::m_decorrelation_model_resolution
ResolutionDecorrelation m_decorrelation_model_resolution
Definition: EgammaCalibrationAndSmearingTool.h:162
TRTCalib_cfilter.p2
p2
Definition: TRTCalib_cfilter.py:131
egGain::GainUncertainty
Definition: GainUncertainty.h:17
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
egEnergyCorr::Scale::AllUp
@ AllUp
Definition: egammaEnergyCorrectionTool.h:272
CP::EgammaCalibrationAndSmearingTool::m_currentResolutionVariation_MC
egEnergyCorr::Resolution::Variation m_currentResolutionVariation_MC
Definition: EgammaCalibrationAndSmearingTool.h:333
CP::CorrectionCode::Error
@ Error
Some error happened during the object correction.
Definition: CorrectionCode.h:36
egEnergyCorr::Resolution::ZSmearingDown
@ ZSmearingDown
Definition: egammaEnergyCorrectionTool.h:69
EgammaxAODHelpers.h
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:309
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
egEnergyCorr::es2015_day0_3percent
@ es2015_day0_3percent
Definition: egammaEnergyCorrectionTool.h:301
egEnergyCorr::Scale::LArCalibUp
@ LArCalibUp
Definition: egammaEnergyCorrectionTool.h:155
egEnergyCorr::Resolution::MaterialPP0Down
@ MaterialPP0Down
Definition: egammaEnergyCorrectionTool.h:94
egEnergyCorr::es2010
@ es2010
Definition: egammaEnergyCorrectionTool.h:287
CP::EgammaCalibrationAndSmearingTool::m_currentScaleVariation_MC
egEnergyCorr::Scale::Variation m_currentScaleVariation_MC
Definition: EgammaCalibrationAndSmearingTool.h:331
CP::EgammaCalibrationAndSmearingTool::m_ESModel
std::string m_ESModel
Definition: EgammaCalibrationAndSmearingTool.h:157
xAOD::EgammaHelpers::isConvertedPhoton
bool isConvertedPhoton(const xAOD::Egamma *eg, bool excludeTRT=false)
is the object a converted photon
Definition: EgammaxAODHelpers.cxx:25
CP::EgammaCalibrationAndSmearingTool::m_decorateEmva
bool m_decorateEmva
Definition: EgammaCalibrationAndSmearingTool.h:193
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
asg::AsgToolConfig
an object that can create a AsgTool
Definition: AsgToolConfig.h:22
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
UNDEFINED
@ UNDEFINED
Definition: sTGCenumeration.h:18
egEnergyCorr::Resolution::MaterialCryoUp
@ MaterialCryoUp
Definition: egammaEnergyCorrectionTool.h:84
egEnergyCorr::es2017_R21_PRE
@ es2017_R21_PRE
Definition: egammaEnergyCorrectionTool.h:316
SG::Decorator
Helper class to provide type-safe access to aux data.
Definition: Decorator.h:59
CP::EgammaCalibrationAndSmearingTool::AbsEtaCaloPredicateFactory
const EgammaPredicate AbsEtaCaloPredicateFactory(double eta_min, double eta_max) const
Definition: EgammaCalibrationAndSmearingTool.h:237
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:850
egEnergyCorr::es2015cPRE_res_improved
@ es2015cPRE_res_improved
Definition: egammaEnergyCorrectionTool.h:306
lumiFormat.i
int i
Definition: lumiFormat.py:85
CaloCluster.h
egEnergyCorr::Scale::topoClusterThresUp
@ topoClusterThresUp
Definition: egammaEnergyCorrectionTool.h:207
egEnergyCorr::Scale::ConvEfficiencyDown
@ ConvEfficiencyDown
Definition: egammaEnergyCorrectionTool.h:253
SystematicRegistry.h
CP::EgammaCalibrationAndSmearingTool::initialize
StatusCode initialize() override
Definition: EgammaCalibrationAndSmearingTool.cxx:351
LinearityADC.h
GainUncertainty.h
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:1985
CP::EgammaCalibrationAndSmearingTool::m_currentResolutionVariation_data
egEnergyCorr::Resolution::Variation m_currentResolutionVariation_data
Definition: EgammaCalibrationAndSmearingTool.h:334
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
xAOD::EgammaHelpers::isElectron
bool isElectron(const xAOD::Egamma *eg)
is the object an electron (not Fwd)
Definition: EgammaxAODHelpers.cxx:12
CP::EgammaCalibrationAndSmearingTool::m_TESModel
egEnergyCorr::ESModel m_TESModel
Definition: EgammaCalibrationAndSmearingTool.h:164
LinearityADC
parameterization of correction for ADC non linearity
Definition: LinearityADC.h:25
python.LArMinBiasAlgConfig.int
int
Definition: LArMinBiasAlgConfig.py:59
egEnergyCorr::Resolution::afUp
@ afUp
Definition: egammaEnergyCorrectionTool.h:97
egEnergyCorr::Scale::MomentumDown
@ MomentumDown
Definition: egammaEnergyCorrectionTool.h:138
egEnergyCorr::Scale::ConvRecoUp
@ ConvRecoUp
Definition: egammaEnergyCorrectionTool.h:261
AsgToolConfig.h
egEnergyCorr::Resolution::Nominal
@ Nominal
Definition: egammaEnergyCorrectionTool.h:62
CP::EgammaCalibrationAndSmearingTool::m_varSF
double m_varSF
Definition: EgammaCalibrationAndSmearingTool.h:167
asg::AsgMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AsgMessaging.cxx:49
egEnergyCorr::es2012a
@ es2012a
Definition: egammaEnergyCorrectionTool.h:295
CP::EgammaCalibrationAndSmearingTool::m_useGainInterpolation
int m_useGainInterpolation
Definition: EgammaCalibrationAndSmearingTool.h:188
egammaLayerRecalibTool::disable_PSCorrections
void disable_PSCorrections()
Definition: egammaLayerRecalibTool.h:358
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
CP::EgammaCalibrationAndSmearingTool::SysInfo
Definition: EgammaCalibrationAndSmearingTool.h:321
egEnergyCorr::es2012cTight
@ es2012cTight
Definition: egammaEnergyCorrectionTool.h:299
ParticleImpl::phi
virtual double phi() const
phi in [-pi,pi[
Definition: ParticleImpl.h:524
egEnergyCorr::es2017_summer
@ es2017_summer
Definition: egammaEnergyCorrectionTool.h:310
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
egEnergyCorr::es2015c_summer
@ es2015c_summer
Definition: egammaEnergyCorrectionTool.h:307
egammaLayerRecalibTool.h
CP::EgammaCalibrationAndSmearingTool::m_usePSCorrection
int m_usePSCorrection
Definition: EgammaCalibrationAndSmearingTool.h:190
egEnergyCorr::Scale::L2MediumGainUp
@ L2MediumGainUp
Definition: egammaEnergyCorrectionTool.h:228
ParticleImpl::eta
virtual double eta() const
pseudo rapidity
Definition: ParticleImpl.h:514
CP::EgammaCalibrationAndSmearingTool::m_use_mapping_correction
bool m_use_mapping_correction
Definition: EgammaCalibrationAndSmearingTool.h:186
egEnergyCorr::Scale::None
@ None
Definition: egammaEnergyCorrectionTool.h:129
Scale
void Scale(TH1 *h, double d=1)
Definition: comparitor.cxx:79
CP::EgammaCalibrationAndSmearingTool::EtaCaloPredicateFactory
const EgammaPredicate EtaCaloPredicateFactory(double eta_min, double eta_max) const
Definition: EgammaCalibrationAndSmearingTool.h:217
egEnergyCorr::Resolution::MaterialCryoDown
@ MaterialCryoDown
Definition: egammaEnergyCorrectionTool.h:83
Vertex.h
egEnergyCorr::UNDEFINED
@ UNDEFINED
Definition: egammaEnergyCorrectionTool.h:334
GainTool.h
CP::EgammaCalibrationAndSmearingTool::m_ADCLinearity_tool
std::shared_ptr< LinearityADC > m_ADCLinearity_tool
Definition: EgammaCalibrationAndSmearingTool.h:312
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:311
egGain::GainTool::CorrectionGainTool
double CorrectionGainTool(double eta_input, double energy_input, double energy_layer2_input, PATCore::ParticleType::Type ptype=PATCore::ParticleType::Electron) const
Definition: GainTool.cxx:139
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:1162
egEnergyCorr::Scale::ZeeStatDown
@ ZeeStatDown
Definition: egammaEnergyCorrectionTool.h:145
CP::EgammaCalibrationAndSmearingTool::correction_phi_unif
double correction_phi_unif(double eta, double phi) const
Definition: EgammaCalibrationAndSmearingTool.cxx:2222
CP::EgammaCalibrationAndSmearingTool::m_doSmearing
int m_doSmearing
Definition: EgammaCalibrationAndSmearingTool.h:166
CP::GeV
const double GeV
Definition: EgammaCalibrationAndSmearingTool.cxx:42
CP::EgammaCalibrationAndSmearingTool::ResolutionDecorrelation::FULL
@ FULL
CP::EgammaCalibrationAndSmearingTool::AUTO
static const int AUTO
Definition: EgammaCalibrationAndSmearingTool.h:105
egEnergyCorr::Resolution::None
@ None
Definition: egammaEnergyCorrectionTool.h:59
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:318
egEnergyCorr::Resolution::PileUpDown
@ PileUpDown
Definition: egammaEnergyCorrectionTool.h:87
egEnergyCorr::Scale::E4ScintillatorUp
@ E4ScintillatorUp
Definition: egammaEnergyCorrectionTool.h:179
egEnergyCorr::Scale::Variation
Variation
Definition: egammaEnergyCorrectionTool.h:126
CP::EgammaCalibrationAndSmearingTool::setupSystematics
void setupSystematics()
Definition: EgammaCalibrationAndSmearingTool.cxx:1206
PathResolver.h
egEnergyCorr::Scale::LArCalibExtra2015PreUp
@ LArCalibExtra2015PreUp
Definition: egammaEnergyCorrectionTool.h:165
CP::SystematicSet::insert
void insert(const SystematicVariation &systematic)
description: insert a systematic into the set
Definition: SystematicSet.cxx:88
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
egEnergyCorr::Resolution::MaterialIBLUp
@ MaterialIBLUp
Definition: egammaEnergyCorrectionTool.h:91
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
egEnergyCorr::Resolution::Variation
Variation
Definition: egammaEnergyCorrectionTool.h:55
AsgServiceConfig.h
egEnergyCorr::es2016PRE
@ es2016PRE
Definition: egammaEnergyCorrectionTool.h:308
egEnergyCorr::es2017_summer_final
@ es2017_summer_final
Definition: egammaEnergyCorrectionTool.h:312
CP::EgammaCalibrationAndSmearingTool::xAOD2ptype
PATCore::ParticleType::Type xAOD2ptype(const xAOD::Egamma &particle) const
Definition: EgammaCalibrationAndSmearingTool.cxx:819
xAOD::get_phi_calo
float get_phi_calo(const xAOD::CaloCluster &cluster, int author, bool do_throw=false)
Definition: EgammaCalibrationAndSmearingTool.h:41
egEnergyCorr::Scale::ADCLinUp
@ ADCLinUp
Definition: egammaEnergyCorrectionTool.h:193
asg::AsgServiceConfig
an object that can create a AsgService
Definition: AsgServiceConfig.h:25
egEnergyCorr::Resolution::OFCUp
@ OFCUp
Definition: egammaEnergyCorrectionTool.h:101
CP::EgammaCalibrationAndSmearingTool::m_MVAfolder
std::string m_MVAfolder
Definition: EgammaCalibrationAndSmearingTool.h:319
CP::is_after_run1
bool is_after_run1(egEnergyCorr::ESModel model)
Definition: EgammaCalibrationAndSmearingTool.cxx:235
egEnergyCorr::Scale::MatPP0Up
@ MatPP0Up
Definition: egammaEnergyCorrectionTool.h:241
egEnergyCorr::es2012XX
@ es2012XX
Definition: egammaEnergyCorrectionTool.h:302
egEnergyCorr::Scale::ADCLinDown
@ ADCLinDown
Definition: egammaEnergyCorrectionTool.h:194
xAOD::Electron_v1
Definition: Electron_v1.h:34
egEnergyCorr::Scale::S12ExtraLastEtaBinRun2Down
@ S12ExtraLastEtaBinRun2Down
Definition: egammaEnergyCorrectionTool.h:212
egEnergyCorr::es2023_R22_Run2_v0
@ es2023_R22_Run2_v0
Definition: egammaEnergyCorrectionTool.h:329
egEnergyCorr::es2012c
@ es2012c
Definition: egammaEnergyCorrectionTool.h:297
egEnergyCorr::Resolution::OFCDown
@ OFCDown
Definition: egammaEnergyCorrectionTool.h:102
EventInfo.h
egEnergyCorr::Scale::PSb12Down
@ PSb12Down
Definition: egammaEnergyCorrectionTool.h:190
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:326
egEnergyCorr::es2017
@ es2017
Definition: egammaEnergyCorrectionTool.h:309
xAOD::Photon
Photon_v1 Photon
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Photon.h:17
egEnergyCorr::es2018_R21_v1
@ es2018_R21_v1
Definition: egammaEnergyCorrectionTool.h:325
PathResolverFindCalibFile
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Definition: PathResolver.cxx:431
AthAnalysisHelper.h
CP::EgammaCalibrationAndSmearingTool::intermodule_correction
double intermodule_correction(double Ecl, double phi, double eta) const
Definition: EgammaCalibrationAndSmearingTool.cxx:2034
TrackParticle.h
egEnergyCorr::Resolution::SigmaEff80
@ SigmaEff80
Definition: egammaEnergyCorrectionTool.h:114
egEnergyCorr::Scale::ConvEfficiencyUp
@ ConvEfficiencyUp
Definition: egammaEnergyCorrectionTool.h:252
CP::EgammaCalibrationAndSmearingTool::m_set_seed_function
IdFunction m_set_seed_function
Definition: EgammaCalibrationAndSmearingTool.h:338
egEnergyCorr::Scale::PSb12Up
@ PSb12Up
Definition: egammaEnergyCorrectionTool.h:189
CP::EgammaCalibrationAndSmearingTool
Definition: EgammaCalibrationAndSmearingTool.h:91
egammaLayerRecalibTool
Definition: egammaLayerRecalibTool.h:317
egEnergyCorr::Scale::E4ScintillatorDown
@ E4ScintillatorDown
Definition: egammaEnergyCorrectionTool.h:180
CP::EgammaCalibrationAndSmearingTool::DoubleOrAbsEtaCaloPredicate
Definition: EgammaCalibrationAndSmearingTool.h:272
CP::CorrectionCode::Ok
@ Ok
The correction was done successfully.
Definition: CorrectionCode.h:38
egEnergyCorr::Resolution::MaterialIDDown
@ MaterialIDDown
Definition: egammaEnergyCorrectionTool.h:77
CP::EgammaCalibrationAndSmearingTool::m_useLayerCorrection
int m_useLayerCorrection
Definition: EgammaCalibrationAndSmearingTool.h:189
egEnergyCorr::Scale::ConvFakeRateUp
@ ConvFakeRateUp
Definition: egammaEnergyCorrectionTool.h:254
egEnergyCorr::Resolution::MaterialIDUp
@ MaterialIDUp
Definition: egammaEnergyCorrectionTool.h:78
egEnergyCorr::Scale::Wtots1Down
@ Wtots1Down
Definition: egammaEnergyCorrectionTool.h:238
egEnergyCorr::es2017_summer_improved
@ es2017_summer_improved
Definition: egammaEnergyCorrectionTool.h:311
xAOD::Photon_v1
Definition: Photon_v1.h:37
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
CP::SystematicRegistry
This module implements the central registry for handling systematic uncertainties with CP tools.
Definition: SystematicRegistry.h:25
correlationModel::model
model
Definition: AsgElectronEfficiencyCorrectionTool.cxx:46
egEnergyCorr::es2011dTight
@ es2011dTight
Definition: egammaEnergyCorrectionTool.h:293
xAOD::EgammaHelpers::isPhoton
bool isPhoton(const xAOD::Egamma *eg)
is the object a photon
Definition: EgammaxAODHelpers.cxx:21
egEnergyCorr::es2024_Run3_ofc0_v0
@ es2024_Run3_ofc0_v0
Definition: egammaEnergyCorrectionTool.h:331
egEnergyCorr::Resolution::MaterialCaloUp
@ MaterialCaloUp
Definition: egammaEnergyCorrectionTool.h:80
asg::AsgComponentConfig::setProperty
StatusCode setProperty(const std::string &name, const T &value)
set the given property
egEnergyCorr::Resolution::SamplingTermDown
@ SamplingTermDown
Definition: egammaEnergyCorrectionTool.h:73
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
CP::EgammaCalibrationAndSmearingTool::m_layer_recalibration_tool
egammaLayerRecalibTool * m_layer_recalibration_tool
Definition: EgammaCalibrationAndSmearingTool.h:314
CP::CorrectionCode
Return value from object correction CP tools.
Definition: CorrectionCode.h:31
EgammaDefs.h
xAOD::EgammaParameters::electron
@ electron
Definition: EgammaEnums.h:18
asg::AsgComponentConfig::setPropertyFromString
void setPropertyFromString(const std::string &name, const std::string &value)
set a given property from a string value
Definition: AsgComponentConfig.cxx:133
CP::use_phi_uniform_correction
bool use_phi_uniform_correction(egEnergyCorr::ESModel model)
Definition: EgammaCalibrationAndSmearingTool.cxx:231
xAOD::get_eta_calo
float get_eta_calo(const xAOD::CaloCluster &cluster, int author, bool do_throw=false)
Definition: EgammaCalibrationAndSmearingTool.h:64
egEnergyCorr::Scale::afDown
@ afDown
Definition: egammaEnergyCorrectionTool.h:246
CP::EgammaCalibrationAndSmearingTool::m_decorrelation_model_resolution_name
std::string m_decorrelation_model_resolution_name
Definition: EgammaCalibrationAndSmearingTool.h:160
egEnergyCorr::Scale::L2MediumGainDown
@ L2MediumGainDown
Definition: egammaEnergyCorrectionTool.h:227
egEnergyCorr::Resolution::MaterialGapDown
@ MaterialGapDown
Definition: egammaEnergyCorrectionTool.h:81
EgammaCalibPeriodRunNumbersExample::run_2016
const int run_2016
Definition: Interfaces/EgammaAnalysisInterfaces/EgammaAnalysisInterfaces/IEgammaCalibrationAndSmearingTool.h:21
egEnergyCorr::es2017_R21_ofc0_v1
@ es2017_R21_ofc0_v1
Definition: egammaEnergyCorrectionTool.h:322
CaloCondBlobAlgs_fillNoiseFromASCII.folder
folder
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:56
egEnergyCorr::Scale::EXTRARUN3PREUp
@ EXTRARUN3PREUp
Definition: egammaEnergyCorrectionTool.h:269
CP::gainToolFactory
std::unique_ptr< egGain::GainTool > gainToolFactory(egEnergyCorr::ESModel model)
Definition: EgammaCalibrationAndSmearingTool.cxx:44
SG::ConstAccessor::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
egEnergyCorr::Scale::LArTemperature2016PreDown
@ LArTemperature2016PreDown
Definition: egammaEnergyCorrectionTool.h:172
egEnergyCorr::es2022_R22_PRE
@ es2022_R22_PRE
Definition: egammaEnergyCorrectionTool.h:328
xAOD::Egamma_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: Egamma_v1.cxx:70
egEnergyCorr::Scale::LArCalibDown
@ LArCalibDown
Definition: egammaEnergyCorrectionTool.h:156
PATCore::ParticleType::Electron
@ Electron
Definition: PATCoreEnums.h:40
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
egammaLayerRecalibTool::fixForMissingCells
void fixForMissingCells(bool fix=true)
Definition: egammaLayerRecalibTool.h:356
ConstAccessor.h
Helper class to provide constant type-safe access to aux data.
CP::egammaLayerRecalibToolFactory
std::unique_ptr< egammaLayerRecalibTool > egammaLayerRecalibToolFactory(egEnergyCorr::ESModel model, int enableSacc)
Definition: EgammaCalibrationAndSmearingTool.cxx:135
egammaLayerRecalibTool::disable_SaccCorrections
void disable_SaccCorrections()
Definition: egammaLayerRecalibTool.h:360
CP::EgammaCalibrationAndSmearingTool::applyCorrection
virtual CP::CorrectionCode applyCorrection(xAOD::Egamma &) const override
Definition: EgammaCalibrationAndSmearingTool.cxx:857
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:328
EgammaCalibrationAndSmearingTool.h
egEnergyCorr::es2015_5TeV
@ es2015_5TeV
Definition: egammaEnergyCorrectionTool.h:314
egEnergyCorr::Resolution::AllUp
@ AllUp
Definition: egammaEnergyCorrectionTool.h:66
egEnergyCorr::Resolution::MaterialCaloDown
@ MaterialCaloDown
Definition: egammaEnergyCorrectionTool.h:79
egEnergyCorr::Scale::S12ExtraLastEtaBinRun2Up
@ S12ExtraLastEtaBinRun2Up
Definition: egammaEnergyCorrectionTool.h:211
TrackingPrimitives.h
CP::EgammaCalibrationAndSmearingTool::m_decorrelation_model_scale
ScaleDecorrelation m_decorrelation_model_scale
Definition: EgammaCalibrationAndSmearingTool.h:161
egEnergyCorr::es2018_R21_v0
@ es2018_R21_v0
Definition: egammaEnergyCorrectionTool.h:324
CP::EgammaCalibrationAndSmearingTool::m_useS12Correction
int m_useS12Correction
Definition: EgammaCalibrationAndSmearingTool.h:191
egEnergyCorr::es2015PRE
@ es2015PRE
Definition: egammaEnergyCorrectionTool.h:303
CP::EgammaCalibrationAndSmearingTool::m_layer_recalibration_tune
std::string m_layer_recalibration_tune
Definition: EgammaCalibrationAndSmearingTool.h:315
CP::EgammaCalibrationAndSmearingTool::m_useCaloDistPhiUnifCorrection
int m_useCaloDistPhiUnifCorrection
Definition: EgammaCalibrationAndSmearingTool.h:177
xAOD::EventInfo_v1::eventType
bool eventType(EventType type) const
Check for one particular bitmask value.
egEnergyCorr
Definition: egammaEnergyCorrectionTool.h:44
CP::SystematicRegistry::getInstance
static SystematicRegistry & getInstance()
Get the singleton instance of the registry for the curren thread.
Definition: SystematicRegistry.cxx:25
CP::EgammaCalibrationAndSmearingTool::m_use_uA2MeV_2015_first2weeks_correction
int m_use_uA2MeV_2015_first2weeks_correction
Definition: EgammaCalibrationAndSmearingTool.h:185
egEnergyCorr::Scale::topoClusterThresDown
@ topoClusterThresDown
Definition: egammaEnergyCorrectionTool.h:208
CP::EgammaCalibrationAndSmearingTool::m_fixForMissingCells
Gaudi::Property< bool > m_fixForMissingCells
Definition: EgammaCalibrationAndSmearingTool.h:199
egEnergyCorr::Resolution::MaterialIBLDown
@ MaterialIBLDown
Definition: egammaEnergyCorrectionTool.h:92
xAOD::EgammaParameters::unconvertedPhoton
@ unconvertedPhoton
Definition: EgammaEnums.h:19
egEnergyCorr::Resolution::AllDown
@ AllDown
Definition: egammaEnergyCorrectionTool.h:65