ATLAS Offline Software
Classes | Public Member Functions | Public Attributes | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
CP::EgammaCalibrationAndSmearingTool Class Referenceabstract

#include <EgammaCalibrationAndSmearingTool.h>

Inheritance diagram for CP::EgammaCalibrationAndSmearingTool:
Collaboration diagram for CP::EgammaCalibrationAndSmearingTool:

Classes

struct  AbsEtaCaloPredicate
 
struct  Accessors
 
struct  DoubleOrAbsEtaCaloPredicate
 
struct  EtaCaloPredicate
 
struct  SysInfo
 

Public Member Functions

virtual double getEnergy (xAOD::Egamma *, const xAOD::EventInfo *)
 
virtual double getElectronMomentum (const xAOD::Electron *, const xAOD::EventInfo *)
 
double getResolution (const xAOD::Egamma &particle, bool withCT=true) const override
 
double intermodule_correction (double Ecl, double phi, double eta) const
 
double correction_phi_unif (double eta, double phi) const
 
void callSingleEvent (columnar::MutableEgammaRange egammas, columnar::EventInfoId event) const
 
void callEvents (columnar::EventContextRange events) const override
 
virtual void print () const =0
 Print the state of the tool. More...
 
virtual StatusCode sysInitialize ()
 Function initialising the tool in the correct way in Athena. More...
 
virtual void print () const
 Print the state of the tool. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Public Attributes

Gaudi::Property< bool > m_onlyElectrons {this, "onlyElectrons", false, "the tool will only be applied to electrons"}
 
Gaudi::Property< bool > m_onlyPhotons {this, "onlyPhotons", false, "the tool will only be applied to photons"}
 
std::unique_ptr< Accessorsm_accessors
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

enum  ResolutionDecorrelation { ResolutionDecorrelation::FULL, ResolutionDecorrelation::ONENP }
 
typedef unsigned int RandomNumber
 
typedef std::function< int(const EgammaCalibrationAndSmearingTool &, columnar::EgammaId, columnar::EventInfoId)> IdFunction
 
typedef std::function< bool(const EgammaCalibrationAndSmearingTool &, columnar::EgammaId)> EgammaPredicate
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

 EgammaCalibrationAndSmearingTool (const std::string &name)
 
 ~EgammaCalibrationAndSmearingTool ()
 
StatusCode initialize () override
 
virtual CP::CorrectionCode applyCorrection (xAOD::Egamma &) const override
 
CP::CorrectionCode applyCorrection (columnar::MutableEgammaId input, columnar::EventInfoId event_info) const
 
void setPt (columnar::MutableEgammaId input, double energy) const
 
virtual CP::CorrectionCode correctedCopy (const xAOD::Electron &, xAOD::Electron *&) const override
 
virtual CP::CorrectionCode correctedCopy (const xAOD::Photon &, xAOD::Photon *&) const override
 
double getEnergy (const xAOD::Photon &) const
 
double getEnergy (const xAOD::Electron &) const
 
virtual CP::SystematicSet affectingSystematics () const override
 the list of all systematics this tool can be affected by More...
 
virtual bool isAffectedBySystematic (const CP::SystematicVariation &systematic) const override
 Declare the interface that this class provides. More...
 
virtual CP::SystematicSet recommendedSystematics () const override
 the list of all systematics this tool recommends to use More...
 
virtual StatusCode applySystematicVariation (const CP::SystematicSet &systConfig) override
 effects: configure this tool for the given list of systematic variations. More...
 
virtual void setRandomSeedFunction (const IdFunction &&function)
 
const IdFunction getRandomSeedFunction () const
 
virtual double resolution (double energy, double cl_eta, double cl_etaCalo, PATCore::ParticleType::Type ptype=PATCore::ParticleType::Electron, bool withCT=false) const override
 
void setupSystematics ()
 
const EgammaPredicate EtaCaloPredicateFactory (double eta_min, double eta_max) const
 
const EgammaPredicate AbsEtaCaloPredicateFactory (double eta_min, double eta_max) const
 
const EgammaPredicate AbsEtaCaloPredicateFactory (std::pair< double, double > edges) const
 
const std::vector< EgammaPredicateAbsEtaCaloPredicatesFactory (const std::vector< std::pair< double, double >> &edges) const
 
const std::vector< EgammaPredicateAbsEtaCaloPredicatesFactory (const std::vector< double > &edges) const
 
const EgammaPredicate DoubleOrAbsEtaCaloPredicateFactory (double eta1_min, double eta1_max, double eta2_min, double eta2_max) const
 
PATCore::ParticleType::Type xAOD2ptype (columnar::EgammaId particle) const
 
egEnergyCorr::Scale::Variation oldtool_scale_flag_this_event (columnar::EgammaId p, columnar::EventInfoId event_info) const
 
egEnergyCorr::Resolution::Variation oldtool_resolution_flag_this_event (columnar::EgammaId p, columnar::EventInfoId event_info) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

std::string m_ESModel
 
std::string m_decorrelation_model_name
 
std::string m_decorrelation_model_scale_name
 
std::string m_decorrelation_model_resolution_name
 
ScaleDecorrelation m_decorrelation_model_scale = ScaleDecorrelation::FULL
 
ResolutionDecorrelation m_decorrelation_model_resolution
 
egEnergyCorr::ESModel m_TESModel
 
int m_doScaleCorrection
 
int m_doSmearing
 
double m_varSF
 
std::string m_ResolutionType
 
egEnergyCorr::Resolution::resolutionType m_TResolutionType
 
int m_useFastSim
 
int m_use_AFII
 
PATCore::ParticleDataType::DataType m_simulation
 
int m_useIntermoduleCorrection
 
int m_usePhiUniformCorrection
 
int m_useCaloDistPhiUnifCorrection
 
int m_useGainCorrection
 
int m_doADCLinearityCorrection
 
int m_doLeakageCorrection
 
bool m_use_ep_combination
 
int m_use_mva_calibration
 
bool m_use_full_statistical_error
 
int m_use_temp_correction201215
 
int m_use_uA2MeV_2015_first2weeks_correction
 
bool m_use_mapping_correction
 
int m_user_random_run_number
 
int m_useGainInterpolation
 
int m_useLayerCorrection
 
int m_usePSCorrection
 
int m_useS12Correction
 
int m_useSaccCorrection
 
bool m_decorateEmva
 
std::unique_ptr< TH2 > m_caloDistPhiUnifCorr
 
Gaudi::Property< bool > m_fixForMissingCells
 
Gaudi::Property< bool > m_doFwdCalib
 
Gaudi::Property< std::string > m_pVtxKey
 
ServiceHandle< IegammaMVASvcm_MVACalibSvc
 
std::unique_ptr< egGain::GainUncertaintym_gain_tool_run2
 
std::shared_ptr< LinearityADCm_ADCLinearity_tool
 
egGain::GainToolm_gain_tool = nullptr
 
egammaLayerRecalibToolm_layer_recalibration_tool = nullptr
 
std::string m_layer_recalibration_tune
 
std::unique_ptr< AtlasRoot::egammaEnergyCorrectionToolm_rootTool
 
std::string m_MVAfolder
 
std::map< CP::SystematicVariation, SysInfom_syst_description
 
std::map< CP::SystematicVariation, egEnergyCorr::Resolution::Variationm_syst_description_resolution
 
egEnergyCorr::Scale::Variation m_currentScaleVariation_MC
 
egEnergyCorr::Scale::Variation m_currentScaleVariation_data
 
egEnergyCorr::Resolution::Variation m_currentResolutionVariation_MC
 
egEnergyCorr::Resolution::Variation m_currentResolutionVariation_data
 
EgammaPredicate m_currentScalePredicate
 
IdFunction m_set_seed_function
 
MetaStore_t m_inputMetaStore
 Object accessing the input metadata store. More...
 
MetaStore_t m_outputMetaStore
 Object accessing the output metadata store. More...
 
bool m_beginInputFileCalled
 Flag helping to discover when the tool misses the opening of the first input file. More...
 
bool m_useIncidents
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Static Private Attributes

static const int AUTO = 2
 
static const unsigned int m_Run2Run3runNumberTransition = 400000
 

Callback functions helping in metadata reading/writing

void setUseIncidents (const bool flag)
 
virtual void handle (const Incident &inc)
 Function receiving incidents from IncidentSvc/TEvent. More...
 
virtual StatusCode beginInputFile ()
 Function called when a new input file is opened. More...
 
virtual StatusCode endInputFile ()
 Function called when the currently open input file got completely processed. More...
 
virtual StatusCode beginEvent ()
 Function called when a new events is loaded. More...
 
virtual StatusCode metaDataStop ()
 Function called when the tool should write out its metadata. More...
 

Detailed Description

Definition at line 182 of file EgammaCalibrationAndSmearingTool.h.

Member Typedef Documentation

◆ EgammaPredicate

Definition at line 204 of file EgammaCalibrationAndSmearingTool.h.

◆ IdFunction

Definition at line 203 of file EgammaCalibrationAndSmearingTool.h.

◆ MetaStore_t

Type of the metadata store object in Athena.

Definition at line 66 of file AsgMetadataTool.h.

◆ MetaStorePtr_t

Type of the metadata store pointer in standalone mode.

Definition at line 68 of file AsgMetadataTool.h.

◆ RandomNumber

Definition at line 200 of file EgammaCalibrationAndSmearingTool.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ ResolutionDecorrelation

Enumerator
FULL 
ONENP 

Definition at line 197 of file EgammaCalibrationAndSmearingTool.h.

197 { FULL, ONENP };

Constructor & Destructor Documentation

◆ EgammaCalibrationAndSmearingTool()

CP::EgammaCalibrationAndSmearingTool::EgammaCalibrationAndSmearingTool ( const std::string &  name)
private

Definition at line 288 of file EgammaCalibrationAndSmearingTool.cxx.

301  const Accessors& acc = *tool.m_accessors;
302  // avoid 0 as result, see
303  // https://root.cern.ch/root/html/TRandom3.html#TRandom3:SetSeed
304  auto cluster = acc.caloClusterAcc(egamma)[0].value();
305  return 1 + static_cast<RandomNumber>(
306  std::abs(acc.clusterPhiAcc(cluster)) * 1E6 +
307  std::abs(acc.clusterEtaAcc(cluster)) * 1E3 +
308  acc.eventNumberAcc(ei));
309  }),
310  m_accessors(std::make_unique<Accessors>(*this)) {
311 
312  declareProperty("ESModel", m_ESModel = "");
313  declareProperty("decorrelationModel", m_decorrelation_model_name = "");
314  declareProperty("decorrelationModelScale",
316  declareProperty("decorrelationModelResolution",
318  declareProperty("ResolutionType", m_ResolutionType = "SigmaEff90");
319  declareProperty("varSF", m_varSF = 1.0);
320  declareProperty("doScaleCorrection", m_doScaleCorrection = AUTO);
321  declareProperty("doSmearing", m_doSmearing = AUTO);
322  declareProperty("useLayerCorrection", m_useLayerCorrection = AUTO);
323  declareProperty("usePSCorrection", m_usePSCorrection = AUTO);
324  declareProperty("useS12Correction", m_useS12Correction = AUTO);
325  declareProperty("useSaccCorrection", m_useSaccCorrection = AUTO);
326  declareProperty("useIntermoduleCorrection",
328  declareProperty("usePhiUniformCorrection", m_usePhiUniformCorrection = AUTO);
329  declareProperty("useCaloDistPhiUnifCorrection",
331  declareProperty("useGainCorrection", m_useGainCorrection = AUTO);
332  declareProperty("useGainInterpolation", m_useGainInterpolation = AUTO);
333  declareProperty("doADCLinearityCorrection",
335  declareProperty("doLeakageCorrection", m_doLeakageCorrection = AUTO);
336  declareProperty("MVAfolder", m_MVAfolder = "");
337  declareProperty("layerRecalibrationTune", m_layer_recalibration_tune = "");
338  declareProperty("useEPCombination", m_use_ep_combination = false);
339  declareProperty("useMVACalibration", m_use_mva_calibration = AUTO);
340  declareProperty("use_full_statistical_error",
342  declareProperty("use_temp_correction201215",
344  declareProperty("use_uA2MeV_2015_first2weeks_correction",
346  declareProperty("randomRunNumber", m_user_random_run_number = 0);
347  // this is the user input, it is never changed by the tool. The tool uses
348  // m_simulation.
349  declareProperty("useFastSim", m_useFastSim = -1,
350  "This should be explicitly set by the user depending on the "
351  "data type (int)0=full sim, (int)1=fast sim");
353  "useAFII", m_use_AFII = -1,
354  "This is now deprecated. Kept for explicit error message for now");
355  declareProperty("decorateEmva", m_decorateEmva = false, "whether to decorate the eMVA value");
356 }

◆ ~EgammaCalibrationAndSmearingTool()

CP::EgammaCalibrationAndSmearingTool::~EgammaCalibrationAndSmearingTool ( )
private

Definition at line 358 of file EgammaCalibrationAndSmearingTool.cxx.

358  {
359  ATH_MSG_DEBUG("destructor");
361  delete m_gain_tool;
362 }

Member Function Documentation

◆ AbsEtaCaloPredicateFactory() [1/2]

const EgammaPredicate CP::EgammaCalibrationAndSmearingTool::AbsEtaCaloPredicateFactory ( double  eta_min,
double  eta_max 
) const
inlineprivate

Definition at line 340 of file EgammaCalibrationAndSmearingTool.h.

341  {
342  /*return [eta_min, eta_max](const xAOD::Egamma& p) {
343  const double aeta = std::abs(xAOD::get_eta_calo(*p.caloCluster()));
344  return (aeta >= eta_min and aeta < eta_max); };*/
345  return AbsEtaCaloPredicate(eta_min, eta_max);
346  }

◆ AbsEtaCaloPredicateFactory() [2/2]

const EgammaPredicate CP::EgammaCalibrationAndSmearingTool::AbsEtaCaloPredicateFactory ( std::pair< double, double >  edges) const
inlineprivate

Definition at line 348 of file EgammaCalibrationAndSmearingTool.h.

349  {
350  return AbsEtaCaloPredicateFactory(edges.first, edges.second);
351  }

◆ AbsEtaCaloPredicatesFactory() [1/2]

const std::vector<EgammaPredicate> CP::EgammaCalibrationAndSmearingTool::AbsEtaCaloPredicatesFactory ( const std::vector< double > &  edges) const
inlineprivate

Definition at line 363 of file EgammaCalibrationAndSmearingTool.h.

364  {
365  std::vector<EgammaPredicate> result;
366  result.reserve(edges.size() - 1);
367  auto it2 = edges.begin();
368  auto it = it2++;
369  for (; it2 != edges.end(); ++it, ++it2) {
370  result.push_back(AbsEtaCaloPredicateFactory(*it, *it2));
371  }
372  return result;
373  }

◆ AbsEtaCaloPredicatesFactory() [2/2]

const std::vector<EgammaPredicate> CP::EgammaCalibrationAndSmearingTool::AbsEtaCaloPredicatesFactory ( const std::vector< std::pair< double, double >> &  edges) const
inlineprivate

Definition at line 353 of file EgammaCalibrationAndSmearingTool.h.

354  {
355  std::vector<EgammaPredicate> result;
356  result.reserve(edges.size());
357  for (const auto& it : edges) {
358  result.push_back(AbsEtaCaloPredicateFactory(it.first, it.second));
359  }
360  return result;
361  }

◆ affectingSystematics()

CP::SystematicSet CP::EgammaCalibrationAndSmearingTool::affectingSystematics ( ) const
overrideprivatevirtual

the list of all systematics this tool can be affected by

Implements CP::IReentrantSystematicsTool.

Definition at line 1289 of file EgammaCalibrationAndSmearingTool.cxx.

1290  {
1291  CP::SystematicSet affecting_systematics;
1292  for (const auto& it : m_syst_description) {
1293  affecting_systematics.insert(it.first);
1294  }
1295  for (const auto& it : m_syst_description_resolution) {
1296  affecting_systematics.insert(it.first);
1297  }
1298 
1299  return affecting_systematics;
1300 }

◆ applyCorrection() [1/2]

CP::CorrectionCode CP::EgammaCalibrationAndSmearingTool::applyCorrection ( columnar::MutableEgammaId  input,
columnar::EventInfoId  event_info 
) const
private

Definition at line 987 of file EgammaCalibrationAndSmearingTool.cxx.

988  {
989  const Accessors& acc = *m_accessors;
990 
991  // only used in simulation (for the smearing)
992  RandomNumber seed = m_set_seed_function(*this, input, event_info);
993 
994  columnar::ClusterId inputCluster = acc.caloClusterAcc (input)[0].value();
995 
996  if (m_layer_recalibration_tool && acc.authorAcc (input) !=
998  ATH_MSG_DEBUG("applying energy recalibration before E0|E1|E2|E3 = "
999  << acc.energyBEAcc (inputCluster, 0) << "|"
1000  << acc.energyBEAcc (inputCluster, 1) << "|"
1001  << acc.energyBEAcc (inputCluster, 2) << "|"
1002  << acc.energyBEAcc (inputCluster, 3));
1003  // for now just go back to the xAOD object to access the subtool
1004  const CP::CorrectionCode status_layer_recalibration = m_layer_recalibration_tool->applyCorrection(input.getXAODObject(), event_info.getXAODObject());
1005  if (status_layer_recalibration == CP::CorrectionCode::Error) { return CP::CorrectionCode::Error; }
1006  ATH_MSG_DEBUG("eta|phi = " << acc.etaAcc (input) << "|" << acc.phiAcc (input));
1007  if (status_layer_recalibration == CP::CorrectionCode::Ok) {
1008  ATH_MSG_DEBUG("decoration E0|E1|E2|E3 = "
1009  << acc.Es0Acc(inputCluster) << "|"
1010  << acc.Es1Acc(inputCluster) << "|"
1011  << acc.Es2Acc(inputCluster) << "|"
1012  << acc.Es3Acc(inputCluster) << "|");
1013  if (acc.Es2Acc(inputCluster) == 0 and acc.Es1Acc(inputCluster) == 0 and
1014  acc.Es3Acc(inputCluster) == 0 and acc.Es0Acc(inputCluster) == 0 and
1015  (std::abs(acc.etaAcc (input)) < 1.37 or (std::abs(acc.etaAcc (input)) > 1.55 and std::abs(acc.etaAcc (input)) < 2.47)))
1016  {
1017  ATH_MSG_WARNING("all layer energies are zero");
1018  }
1019  }
1020  }
1021 
1022  double energy = acc.eAcc (input);
1023  // apply MVA calibration
1024  if (!m_MVACalibSvc.empty()) {
1026  if (acc.authorAcc (input) ==
1028  const xAOD::VertexContainer* pVtxCont = nullptr;
1029  if (evtStore()->retrieve(pVtxCont, m_pVtxKey).isFailure()) {
1030  ATH_MSG_ERROR("No primary vertex container " << m_pVtxKey << " could be retrieved");
1032  }
1033  unsigned int npv(0);
1034  for (const auto *vtx : *pVtxCont) {
1035  if (vtx->vertexType() == xAOD::VxType::PriVtx ||
1036  vtx->vertexType() == xAOD::VxType::PileUp) { ++npv; }
1037  }
1038  gei.nPV = npv;
1039  gei.acmu = acc.actIntPerXingAcc(event_info);
1040  ATH_MSG_DEBUG("Retrieved nPV = " << gei.nPV << " and mu = " << gei.acmu);
1041  }
1042  if (acc.authorAcc (input) !=
1044  if (m_MVACalibSvc->getEnergy(inputCluster.getXAODObject(), input.getXAODObject(), energy, gei)
1045  .isFailure()) {
1046  ATH_MSG_ERROR("Failure in MVACalib service");
1048  }
1049  ATH_MSG_DEBUG("energy after MVA calibration = " << std::format("{:.2f}", energy));
1050  }
1051  }
1052  if (m_decorateEmva)
1053  {
1054  acc.decEmva(input) = energy;
1055  }
1056 
1057  // For the time being, it is just the MVA calib
1058  if (acc.authorAcc (input) ==
1060  setPt(input, energy);
1061  return CP::CorrectionCode::Ok;
1062  }
1063 
1065  // Crack calibation correction for es2011c (calibration hits calibration)
1066  const auto ptype = xAOD2ptype(input);
1067  const double etaden =
1069  ? static_cast<const xAOD::Electron&>(input.getXAODObject()).trackParticle()->eta()
1070  : acc.clusterEtaAcc(inputCluster);
1071  energy *= m_rootTool->applyMCCalibration(acc.clusterEtaAcc(inputCluster),
1072  energy / cosh(etaden), ptype);
1073  ATH_MSG_DEBUG("energy after crack calibration es2011c = "
1074  << std::format("{:.2f}", energy));
1075  }
1076 
1077  /*
1078  * Here we check for each event the kind of data DATA vs FullSim
1079  * The m_simulation flavour has already been configured
1080  */
1082  (acc.eventTypeAcc(event_info,xAOD::EventInfo::IS_SIMULATION))
1083  ? m_simulation
1085 
1086  unsigned int runNumber_for_tool = 0;
1087 
1088  // apply uniformity corrections to data
1090  // Get run number
1091  runNumber_for_tool = acc.runNumberAcc(event_info);
1092  // Get etaCalo, phiCalo
1093  const auto cl_eta = acc.clusterEtaAcc(inputCluster);
1094  double etaCalo = 0, phiCalo = 0;
1096  etaCalo = acc.etaCaloAcc(inputCluster, acc.authorAcc(input), false);
1098  phiCalo =
1099  acc.phiCaloAcc(inputCluster, acc.authorAcc(input), false);
1100  }
1101  }
1102 
1103  // Intermodule
1105  energy =
1106  intermodule_correction(energy, acc.clusterPhiAcc(inputCluster), cl_eta);
1107  ATH_MSG_DEBUG("energy after intermodule correction = "
1108  << std::format("{:.2f}", energy));
1109  }
1110 
1111  // Calo distortion
1116  double etaC = acc.clusterEtaAcc(inputCluster);
1117  double phiC = acc.clusterPhiAcc(inputCluster);
1118  int ieta = m_caloDistPhiUnifCorr->GetXaxis()->FindBin(etaC);
1119  ieta = ieta == 0 ? 1
1120  : (ieta > m_caloDistPhiUnifCorr->GetNbinsX()
1121  ? m_caloDistPhiUnifCorr->GetNbinsX()
1122  : ieta);
1123  int iphi = m_caloDistPhiUnifCorr->GetYaxis()->FindBin(phiC);
1124  iphi = iphi == 0 ? 1
1125  : (iphi > m_caloDistPhiUnifCorr->GetNbinsY()
1126  ? m_caloDistPhiUnifCorr->GetNbinsY()
1127  : iphi);
1128  energy *= m_caloDistPhiUnifCorr->GetBinContent(ieta, iphi);
1129  ATH_MSG_DEBUG(
1130  "energy after phi uniformity correction (for calo distortion) = "
1131  << std::format("{:.2f}", energy));
1132  }
1133 
1134  // Phi
1136  energy *= correction_phi_unif(etaCalo, phiCalo);
1137  ATH_MSG_DEBUG("energy after uniformity correction = "
1138  << std::format("{:.2f}", energy));
1139  }
1140 
1141  // ADC
1142  if (m_ADCLinearity_tool) {
1143  double et = energy / std::cosh(cl_eta);
1144  double corr =
1145  m_ADCLinearity_tool->getCorr(etaCalo, et, xAOD2ptype(input));
1146  energy *= corr;
1147  ATH_MSG_DEBUG("energy after ADC linearity correction = "
1148  << std::format("{:.2f}", energy));
1149  }
1150 
1151  // Gain
1152  if (m_gain_tool) {
1153  const auto es2 = acc.Es2Acc.isAvailable(inputCluster)
1154  ? acc.Es2Acc(inputCluster)
1155  : acc.energyBEAcc (inputCluster,2);
1156  if (!(std::abs(cl_eta) < 1.52 and std::abs(cl_eta) > 1.37) and
1157  std::abs(cl_eta) < 2.4)
1159  cl_eta, energy / GeV, es2 / GeV,
1160  xAOD2ptype(input)); // cl_eta ok, TODO: check corrected E2
1161  } else if (m_gain_tool_run2) {
1162  double et = energy / std::cosh(cl_eta);
1163  double corr = m_gain_tool_run2->getUncertainty(etaCalo, et,
1164  xAOD2ptype(input), true);
1165  energy /= (1 + corr);
1166  }
1167  ATH_MSG_DEBUG("energy after gain correction = " << std::format("{:.2f}", energy));
1168  } else {
1169  if (m_user_random_run_number == 0) {
1170  if (acc.randomrunnumber_getter.isAvailable(event_info)) {
1171  runNumber_for_tool = acc.randomrunnumber_getter(event_info);
1172  } else {
1173  ATH_MSG_ERROR(
1174  "Pileup tool not run before using "
1175  "ElectronPhotonFourMomentumCorrection! Assuming it is 2016. If you "
1176  "want to force a specific period set the property randomRunNumber "
1177  "of the tool, e.g. in the job option: "
1178  "tool.randomRunNumber = 123456 or "
1179  "tool.randomRunNumber = "
1180  "EgammaCalibrationAndSmearingToolRunNumbersExample.run_2016");
1181  runNumber_for_tool = EgammaCalibPeriodRunNumbersExample::run_2016;
1182  }
1183  } else {
1184  runNumber_for_tool = m_user_random_run_number;
1185  }
1186  }
1187 
1188  const double eraw = ((acc.Es0Acc.isAvailable(inputCluster)
1189  ? acc.Es0Acc(inputCluster)
1190  : acc.energyBEAcc(inputCluster,0)) +
1191  (acc.Es1Acc.isAvailable(inputCluster)
1192  ? acc.Es1Acc(inputCluster)
1193  : acc.energyBEAcc(inputCluster,1)) +
1194  (acc.Es2Acc.isAvailable(inputCluster)
1195  ? acc.Es2Acc(inputCluster)
1196  : acc.energyBEAcc(inputCluster,2)) +
1197  (acc.Es3Acc.isAvailable(inputCluster)
1198  ? acc.Es3Acc(inputCluster)
1199  : acc.energyBEAcc(inputCluster,3)));
1200 
1201 
1203  ATH_MSG_DEBUG("is fast");
1205  ATH_MSG_DEBUG("is full");
1207  ATH_MSG_DEBUG("is data");
1208 
1209  // apply scale factors or systematics
1210  energy = m_rootTool->getCorrectedEnergy(
1211  runNumber_for_tool, dataType, xAOD2ptype(input),
1212  inputCluster(acc.clusterEtaAcc),
1213  inputCluster(acc.clusterEtaBEAcc,2),
1214  acc.etaCaloAcc(inputCluster, acc.authorAcc (input), false), energy,
1215  acc.Es2Acc.isAvailable(inputCluster)
1216  ? acc.Es2Acc(inputCluster)
1217  : inputCluster(acc.energyBEAcc,2),
1218  eraw, seed, oldtool_scale_flag_this_event(input, event_info),
1220  m_varSF);
1221 
1222  ATH_MSG_DEBUG("energy after scale/systematic correction = " << std::format("{:.2f}", energy));
1223 
1224  // TODO: this check should be done before systematics variations
1225  setPt(input, energy);
1226  return CP::CorrectionCode::Ok;
1227 }

◆ applyCorrection() [2/2]

CP::CorrectionCode CP::EgammaCalibrationAndSmearingTool::applyCorrection ( xAOD::Egamma input) const
overrideprivatevirtual

Implements CP::IEgammaCalibrationAndSmearingTool.

Definition at line 932 of file EgammaCalibrationAndSmearingTool.cxx.

933  {
934  // Retrieve the event information:
935  const xAOD::EventInfo* event_info = nullptr;
936  if (evtStore()->retrieve(event_info, "EventInfo").isFailure()) {
937  ATH_MSG_ERROR("No EventInfo object could be retrieved");
939  }
940  return applyCorrection(input, *event_info);
941 }

◆ applySystematicVariation()

StatusCode CP::EgammaCalibrationAndSmearingTool::applySystematicVariation ( const CP::SystematicSet systConfig)
overrideprivatevirtual

effects: configure this tool for the given list of systematic variations.

any requested systematics that are not affecting this tool will be silently ignored (unless they cause other errors). failures: systematic unknown failures: requesting multiple variations on the same systematic (e.g. up & down) failures: requesting an unsupported variation on an otherwise supported systematic (e.g. a 2 sigma variation and the tool only supports 1 sigma variations) failures: unsupported combination of supported systematic failures: other tool specific errors

Implements CP::ISystematicsTool.

Definition at line 2140 of file EgammaCalibrationAndSmearingTool.cxx.

2141  {
2142 
2143  // set the nominal one (no systematics)
2153 
2154  if (systConfig.empty())
2155  return StatusCode::SUCCESS;
2156 
2157  // the following code allows only ONE systematic variation at a time (1 for
2158  // scale, 1 for resolution)
2159 
2160  bool first_scale = true;
2161  bool first_resolution = true;
2162  for (const auto& it : systConfig) {
2163  const auto found_scale = m_syst_description.find(it);
2164  if (found_scale != m_syst_description.end()) {
2165  if (not first_scale) {
2166  ATH_MSG_ERROR("multiple scale variations not supported");
2167  throw std::runtime_error("multiple scale variations not supported");
2168  }
2169  first_scale = false;
2170  m_currentScaleVariation_MC = found_scale->second.effect;
2171  m_currentScalePredicate = found_scale->second.predicate;
2172  }
2173 
2174  const auto found_resolution = m_syst_description_resolution.find(it);
2175  if (found_resolution != m_syst_description_resolution.end()) {
2176  if (not first_resolution) {
2177  ATH_MSG_ERROR("multiple resolution variations not supported");
2178  throw std::runtime_error(
2179  "multiple resolution variations not supported");
2180  }
2181  first_resolution = false;
2182  m_currentResolutionVariation_MC = found_resolution->second;
2183  }
2184  }
2185 
2186  return StatusCode::SUCCESS;
2187 }

◆ beginEvent()

StatusCode asg::AsgMetadataTool::beginEvent ( )
protectedvirtualinherited

Function called when a new events is loaded.

Dummy implementation that can be overridden by the derived tool.

Reimplemented in AsgElectronEfficiencyCorrectionTool, TrigConf::xAODConfigTool, TauAnalysisTools::TauSelectionTool, TauAnalysisTools::DiTauSelectionTool, TauAnalysisTools::CommonSmearingTool, TauAnalysisTools::DiTauEfficiencyCorrectionsTool, Trig::TrigDecisionTool, TauAnalysisTools::TauEfficiencyCorrectionsTool, Trig::TrigConfBunchCrossingTool, xAODMaker::TriggerMenuMetaDataTool, and Trig::xAODBunchCrossingTool.

Definition at line 201 of file AsgMetadataTool.cxx.

201  {
202 
203  // Return gracefully:
204  return StatusCode::SUCCESS;
205  }

◆ beginInputFile()

StatusCode asg::AsgMetadataTool::beginInputFile ( )
protectedvirtualinherited

Function called when a new input file is opened.

Dummy implementation that can be overridden by the derived tool.

Reimplemented in AsgElectronEfficiencyCorrectionTool, TrigConf::xAODConfigTool, PMGTools::PMGTruthWeightTool, BookkeeperTool, BookkeeperDumperTool, Trig::TrigDecisionTool, xAODMaker::TriggerMenuMetaDataTool, xAODMaker::TruthMetaDataTool, Trig::xAODBunchCrossingTool, TauAnalysisTools::TauEfficiencyCorrectionsTool, and TauAnalysisTools::TauSmearingTool.

Definition at line 185 of file AsgMetadataTool.cxx.

185  {
186 
187  // Return gracefully:
188  return StatusCode::SUCCESS;
189  }

◆ callEvents()

void CP::EgammaCalibrationAndSmearingTool::callEvents ( columnar::EventContextRange  events) const
override

Definition at line 2551 of file EgammaCalibrationAndSmearingTool.cxx.

2553 {
2554  const Accessors& acc = *m_accessors;
2555  for (auto event : events) {
2556  auto eventInfo = acc.m_eventHandle(event);
2557  callSingleEvent (acc.m_egammaHandle(event), eventInfo);
2558  }
2559 }

◆ callSingleEvent()

void CP::EgammaCalibrationAndSmearingTool::callSingleEvent ( columnar::MutableEgammaRange  egammas,
columnar::EventInfoId  event 
) const

Definition at line 2542 of file EgammaCalibrationAndSmearingTool.cxx.

2544 {
2545  for (auto egamma : egammas) {
2547  throw std::runtime_error ("EgammaCalibrationAndSmearingTool::callEvents: apply failed");
2548  }
2549 }

◆ correctedCopy() [1/2]

CP::CorrectionCode CP::EgammaCalibrationAndSmearingTool::correctedCopy ( const xAOD::Electron input,
xAOD::Electron *&  output 
) const
overrideprivatevirtual

Implements CP::IEgammaCalibrationAndSmearingTool.

Definition at line 943 of file EgammaCalibrationAndSmearingTool.cxx.

944  {
945  // A sanity check:
946  if (output)
948  "Non-null pointer received. "
949  "There's a possible memory leak!");
950 
951  output = new xAOD::Electron();
952  output->makePrivateStore(input);
953  return applyCorrection(*output);
954 }

◆ correctedCopy() [2/2]

CP::CorrectionCode CP::EgammaCalibrationAndSmearingTool::correctedCopy ( const xAOD::Photon input,
xAOD::Photon *&  output 
) const
overrideprivatevirtual

Implements CP::IEgammaCalibrationAndSmearingTool.

Definition at line 956 of file EgammaCalibrationAndSmearingTool.cxx.

957  {
958  // A sanity check:
959  if (output)
961  "Non-null pointer received. "
962  "There's a possible memory leak!");
963 
964  output = new xAOD::Photon();
965  output->makePrivateStore(input);
966  return applyCorrection(*output);
967 }

◆ correction_phi_unif()

double CP::EgammaCalibrationAndSmearingTool::correction_phi_unif ( double  eta,
double  phi 
) const

Definition at line 2378 of file EgammaCalibrationAndSmearingTool.cxx.

2379  {
2380  constexpr double PI = M_PI;
2381  double Fcorr = 1.0;
2382 
2384  // wrong mapping HV -> sectors in run1
2385  if (eta < -0.4 && eta > -0.6) {
2386  if (phi < (14 * PI / 32.) && phi > (13 * PI / 32.)) {
2387  Fcorr += 0.035;
2388  } else if (phi < (13 * PI / 32.) && phi > (12 * PI / 32.)) {
2389  Fcorr -= 0.035;
2390  }
2391  }
2392  }
2393 
2406 
2407  if (eta < 0.2 && eta > 0.) {
2408  if (phi < (-7 * 2 * PI / 32.) && phi > (-8 * 2 * PI / 32.)) {
2409  Fcorr = 1.016314;
2410  }
2411  }
2412 
2413  else if (eta < 0.6 && eta > 0.4) {
2414  if (phi < 0 && phi > (-2 * PI / 32.)) {
2415  Fcorr = 1.041591;
2416  } else if (phi < (-4 * 2 * PI / 32.) && phi > (-5 * 2 * PI / 32.)) {
2417  Fcorr = 1.067346;
2418  }
2419  }
2420 
2421  else if (eta < 0.8 && eta > 0.6) {
2422  if (phi < (7 * 2 * PI / 32.) && phi > (6 * 2 * PI / 32.)) {
2423  Fcorr = 1.027980;
2424  }
2425  }
2426 
2427  else if (eta < 1.4 && eta > 1.2) {
2428  if (phi < (-9 * 2 * PI / 32.) && phi > (-10 * 2 * PI / 32.)) {
2429  Fcorr = 1.020299;
2430  } else if (phi < (-11 * 2 * PI / 32.) && phi > (-12 * 2 * PI / 32.)) {
2431  Fcorr = 1.051426;
2432  }
2433  }
2434 
2435  else if (eta < 2.3 && eta > 2.1) {
2436  if (phi < (-12 * 2 * PI / 32.) && phi > (-13 * 2 * PI / 32.)) {
2437  Fcorr = 1.071695;
2438  }
2439  }
2440 
2441  else if (eta < 0. && eta > -0.2) {
2442  if (phi < (-12 * 2 * PI / 32.) && phi > (-13 * 2 * PI / 32.)) {
2443  Fcorr = 1.008227;
2444  } else if (phi < (-8 * 2 * PI / 32.) && phi > (-9 * 2 * PI / 32.)) {
2445  Fcorr = 1.013929;
2446  }
2447  }
2448 
2449  else if (eta < -0.2 && eta > -0.4) {
2450  if (phi < (-9 * 2 * PI / 32.) && phi > (-10 * 2 * PI / 32.)) {
2451  Fcorr = 1.015749;
2452  }
2453  }
2454 
2455  else if (eta < -1.2 && eta > -1.4) {
2456  if (phi < (-6 * 2 * PI / 32.) && phi > (-7 * 2 * PI / 32.)) {
2457  Fcorr = 1.064954;
2458  }
2459  }
2460 
2461  else if (eta < -1.6 && eta > -1.8) {
2462  if (phi < (9 * 2 * PI / 32.) && phi > (8 * 2 * PI / 32.)) {
2463  Fcorr = 1.027448;
2464  }
2465  }
2466 
2467  else if (eta < -2.3 && eta > -2.5) {
2468  if (phi < (-8 * 2 * PI / 32.) && phi > (-9 * 2 * PI / 32.)) {
2469  Fcorr = 1.025882;
2470  } else if (phi < (5 * 2 * PI / 32.) && phi > (4 * 2 * PI / 32.)) {
2471  Fcorr = 1.036616;
2472  } else if (phi < (9 * 2 * PI / 32.) && phi > (8 * 2 * PI / 32.)) {
2473  Fcorr = 1.053838;
2474  } else if (phi < (10 * 2 * PI / 32.) && phi > (9 * 2 * PI / 32.)) {
2475  Fcorr = 1.026856;
2476  } else if (phi < (11 * 2 * PI / 32.) && phi > (10 * 2 * PI / 32.)) {
2477  Fcorr = 0.994382;
2478  }
2479  }
2480 
2481  } // es2017_summer_improved end
2482 
2483  else {
2484  if (eta < 0.6 && eta > 0.4) {
2485  if (phi < 0 && phi > (-2 * PI / 32.)) {
2486  Fcorr = 1.028;
2487  } else if (phi < (-4 * 2 * PI / 32.) && phi > (-5 * 2 * PI / 32.)) {
2488  Fcorr = 1.044;
2489  }
2490  }
2491 
2492  else if (eta < 0.8 && eta > 0.6) {
2493  if (phi < (7 * 2 * PI / 32.) && phi > (6 * 2 * PI / 32.)) {
2494  Fcorr = 1.022;
2495  }
2496  }
2497 
2498  else if (eta < 1.4 && eta > 1.2) {
2499  if (phi < (-11 * 2 * PI / 32.) && phi > (-12 * 2 * PI / 32.)) {
2500  Fcorr = 1.038;
2501  }
2502  }
2503 
2504  else if (eta < 2.0 && eta > 1.9) {
2505  if (phi < (10 * 2 * PI / 32.) && phi > (9 * 2 * PI / 32.)) {
2506  Fcorr = 1.029;
2507  }
2508  }
2509 
2510  else if (eta < -1.2 && eta > -1.4) {
2511  if (phi < (-4 * 2 * PI / 32.) && phi > (-5 * 2 * PI / 32.)) {
2512  Fcorr = 1.048;
2513  } else if (phi < (-6 * 2 * PI / 32.) && phi > (-7 * 2 * PI / 32.)) {
2514  Fcorr = 1.048;
2515  }
2516  }
2517 
2518  else if (eta < -1.6 && eta > -1.8) {
2519  if (phi < (9 * 2 * PI / 32.) && phi > (8 * 2 * PI / 32.)) {
2520  Fcorr = 1.024;
2521  }
2522  }
2523 
2524  else if (eta < -2.3 && eta > -2.5) {
2525  if (phi < (-8 * 2 * PI / 32.) && phi > (-9 * 2 * PI / 32.)) {
2526  Fcorr = 1.037;
2527  } else if (phi < (5 * 2 * PI / 32.) && phi > (4 * 2 * PI / 32.)) {
2528  Fcorr = 1.031;
2529  } else if (phi < (9 * 2 * PI / 32.) && phi > (8 * 2 * PI / 32.)) {
2530  Fcorr = 1.040;
2531  } else if (phi < (10 * 2 * PI / 32.) && phi > (9 * 2 * PI / 32.)) {
2532  Fcorr = 1.030;
2533  } else if (phi < (11 * 2 * PI / 32.) && phi > (10 * 2 * PI / 32.)) {
2534  Fcorr = 1.020;
2535  }
2536  }
2537  }
2538 
2539  return Fcorr;
2540 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ DoubleOrAbsEtaCaloPredicateFactory()

const EgammaPredicate CP::EgammaCalibrationAndSmearingTool::DoubleOrAbsEtaCaloPredicateFactory ( double  eta1_min,
double  eta1_max,
double  eta2_min,
double  eta2_max 
) const
inlineprivate

Definition at line 395 of file EgammaCalibrationAndSmearingTool.h.

397  {
398  return DoubleOrAbsEtaCaloPredicate(eta1_min, eta1_max, eta2_min, eta2_max);
399  }

◆ endInputFile()

StatusCode asg::AsgMetadataTool::endInputFile ( )
protectedvirtualinherited

Function called when the currently open input file got completely processed.

Dummy implementation that can be overridden by the derived tool.

Reimplemented in BookkeeperTool, BookkeeperDumperTool, xAODMaker::TriggerMenuMetaDataTool, and xAODMaker::TruthMetaDataTool.

Definition at line 193 of file AsgMetadataTool.cxx.

193  {
194 
195  // Return gracefully:
196  return StatusCode::SUCCESS;
197  }

◆ EtaCaloPredicateFactory()

const EgammaPredicate CP::EgammaCalibrationAndSmearingTool::EtaCaloPredicateFactory ( double  eta_min,
double  eta_max 
) const
inlineprivate

Definition at line 319 of file EgammaCalibrationAndSmearingTool.h.

320  {
321  return EtaCaloPredicate(eta_min, eta_max);
322  }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ getElectronMomentum()

double CP::EgammaCalibrationAndSmearingTool::getElectronMomentum ( const xAOD::Electron el,
const xAOD::EventInfo event_info 
)
virtual

Definition at line 1265 of file EgammaCalibrationAndSmearingTool.cxx.

1266  {
1269  ? m_simulation
1271 
1272  const xAOD::TrackParticle* eTrack = el->trackParticle();
1273 
1274  // track momentum and eta
1275  const float el_tracketa = eTrack->eta();
1276  const float el_trackmomentum = eTrack->pt() * cosh(el->eta());
1277 
1278  return m_rootTool->getCorrectedMomentum(
1279  dataType, PATCore::ParticleType::Electron, el_trackmomentum, el_tracketa,
1280  oldtool_scale_flag_this_event(*el, *event_info), m_varSF);
1281 }

◆ getEnergy() [1/3]

double CP::EgammaCalibrationAndSmearingTool::getEnergy ( const xAOD::Electron input) const
private

Definition at line 978 of file EgammaCalibrationAndSmearingTool.cxx.

979  {
980  xAOD::Electron* new_particle = nullptr;
981  ANA_CHECK_THROW(correctedCopy(input, new_particle));
982  const double e = new_particle->e();
983  delete new_particle;
984  return e;
985 }

◆ getEnergy() [2/3]

double CP::EgammaCalibrationAndSmearingTool::getEnergy ( const xAOD::Photon input) const
private

Definition at line 969 of file EgammaCalibrationAndSmearingTool.cxx.

970  {
971  xAOD::Photon* new_particle = nullptr;
972  ANA_CHECK_THROW(correctedCopy(input, new_particle));
973  const double e = new_particle->e();
974  delete new_particle;
975  return e;
976 }

◆ getEnergy() [3/3]

double CP::EgammaCalibrationAndSmearingTool::getEnergy ( xAOD::Egamma p,
const xAOD::EventInfo event_info 
)
virtual

Definition at line 1237 of file EgammaCalibrationAndSmearingTool.cxx.

1238  {
1239  ANA_CHECK_THROW(applyCorrection(*p, *event_info));
1240  ATH_MSG_DEBUG("returning " << p->e());
1241  return p->e();
1242 }

◆ getKey()

SG::sgkey_t asg::AsgTool::getKey ( const void *  ptr) const
inherited

Get the (hashed) key of an object that is in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getName
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The hashed key of the object in the store. If not found, an invalid (zero) key.

Definition at line 119 of file AsgTool.cxx.

119  {
120 
121 #ifdef XAOD_STANDALONE
122  // In case we use @c xAOD::TEvent, we have a direct function call
123  // for this.
124  return evtStore()->event()->getKey( ptr );
125 #else
126  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127  return ( proxy == nullptr ? 0 : proxy->sgkey() );
128 #endif // XAOD_STANDALONE
129  }

◆ getName()

const std::string & asg::AsgTool::getName ( const void *  ptr) const
inherited

Get the name of an object that is / should be in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the std::string name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getKey
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The string name of the object in the store. If not found, an empty string.

Definition at line 106 of file AsgTool.cxx.

106  {
107 
108 #ifdef XAOD_STANDALONE
109  // In case we use @c xAOD::TEvent, we have a direct function call
110  // for this.
111  return evtStore()->event()->getName( ptr );
112 #else
113  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
114  static const std::string dummy = "";
115  return ( proxy == nullptr ? dummy : proxy->name() );
116 #endif // XAOD_STANDALONE
117  }

◆ getProperty()

template<class T >
const T* asg::AsgTool::getProperty ( const std::string &  name) const
inherited

Get one of the tool's properties.

◆ getRandomSeedFunction()

const IdFunction CP::EgammaCalibrationAndSmearingTool::getRandomSeedFunction ( ) const
inlineprivate

Definition at line 240 of file EgammaCalibrationAndSmearingTool.h.

240 { return m_set_seed_function; }

◆ getResolution()

double CP::EgammaCalibrationAndSmearingTool::getResolution ( const xAOD::Egamma particle,
bool  withCT = true 
) const
overridevirtual

Implements CP::IEgammaCalibrationAndSmearingTool.

Definition at line 914 of file EgammaCalibrationAndSmearingTool.cxx.

915  {
916  const auto ptype = xAOD2ptype(particle);
917  const auto cl_etaCalo =
918  xAOD::get_eta_calo(*particle.caloCluster(), particle.author());
919 
920  return m_rootTool->resolution(particle.e(), particle.caloCluster()->eta(),
921  cl_etaCalo, ptype, withCT,
922  false); // TODO: always for full simulation
923 }

◆ handle()

void asg::AsgMetadataTool::handle ( const Incident &  inc)
protectedvirtualinherited

Function receiving incidents from IncidentSvc/TEvent.

Reimplemented in Trig::TrigDecisionTool.

Definition at line 135 of file AsgMetadataTool.cxx.

135  {
136 
137  // Tell the user what's happening:
138  ATH_MSG_VERBOSE( "Callback received with incident: " << inc.type() );
139 
140  // Call the appropriate member function:
141  if( inc.type() == IncidentType::BeginInputFile ) {
142  m_beginInputFileCalled = true;
143  if( beginInputFile().isFailure() ) {
144  ATH_MSG_FATAL( "Failed to call beginInputFile()" );
145  throw std::runtime_error( "Couldn't call beginInputFile()" );
146  }
147  } else if( inc.type() == IncidentType::EndInputFile ) {
148  if( endInputFile().isFailure() ) {
149  ATH_MSG_FATAL( "Failed to call endInputFile()" );
150  throw std::runtime_error( "Couldn't call endInputFile()" );
151  }
152  } else if( inc.type() == IncidentType::BeginEvent ) {
153  // If the tool didn't catch the begin input file incident for the
154  // first input file of the job, then call the appropriate function
155  // now.
156  if( ! m_beginInputFileCalled ) {
157  m_beginInputFileCalled = true;
158  if( beginInputFile().isFailure() ) {
159  ATH_MSG_FATAL( "Failed to call beginInputFile()" );
160  throw std::runtime_error( "Couldn't call beginInputFile()" );
161  }
162  }
163  if( beginEvent().isFailure() ) {
164  ATH_MSG_FATAL( "Failed to call beginEvent()" );
165  throw std::runtime_error( "Couldn't call beginEvent()" );
166  }
167 
168  #ifdef XAOD_STANDALONE
169  } else if( inc.type() == IncidentType::MetaDataStop ) {
170  if( metaDataStop().isFailure() ) {
171  ATH_MSG_FATAL( "Failed to call metaDataStop()" );
172  throw std::runtime_error( "Couldn't call metaDataStop()" );
173  }
174 
175  #endif // XAOD_STANDALONE
176  } else {
177  ATH_MSG_WARNING( "Unknown incident type received in AsgMetaDataTool: " << inc.type() );
178  }
179 
180  return;
181  }

◆ initialize()

StatusCode CP::EgammaCalibrationAndSmearingTool::initialize ( )
overrideprivatevirtual

Implements CP::IEgammaCalibrationAndSmearingTool.

Definition at line 364 of file EgammaCalibrationAndSmearingTool.cxx.

364  {
365  ATH_MSG_INFO("Initialization");
366 
367  if (m_ESModel == "es2015XX") {
368  ATH_MSG_ERROR("es2015XX is deprecated. Use es2015PRE");
369  }
370 
371  if (m_ESModel == "es2010") {
373  } // legacy
374  else if (m_ESModel == "es2011c") {
376  } // mc11c : faulty G4; old geometry
377  else if (m_ESModel == "es2011d") {
379  } // mc11d : corrected G4; new geometry == final Run1 scheme
380  else if (m_ESModel == "es2012a") {
382  } // mc12a : "crude" G4 fix; old geometry
383  else if (m_ESModel == "es2012c") {
385  } // mc12c : corrected G4; new geometry == final Run1 scheme
386  else if (m_ESModel == "es2012XX") {
388  } else if (m_ESModel == "es2015PRE") {
390  } else if (m_ESModel == "es2015PRE_res_improved") {
392  } else if (m_ESModel == "es2015cPRE") {
394  } else if (m_ESModel == "es2015cPRE_res_improved") {
396  } else if (m_ESModel == "es2015c_summer") {
398  } else if (m_ESModel == "es2016PRE") {
400  } else if (m_ESModel == "es2016data_mc15c") {
402  } else if (m_ESModel == "es2016data_mc15c_summer") {
404  } else if (m_ESModel == "es2016data_mc15c_summer_improved") {
406  } else if (m_ESModel == "es2016data_mc15c_final") {
408  } else if (m_ESModel == "es2015_5TeV") {
410  } else if (m_ESModel == "es2017_R21_PRE") {
412  } else if (m_ESModel == "es2017_R21_v0") {
414  } else if (m_ESModel == "es2017_R21_v1") {
416  } else if (m_ESModel == "es2017_R21_ofc0_v1") {
418  } else if (m_ESModel == "es2018_R21_v0") {
420  } else if (m_ESModel == "es2018_R21_v1") {
422  } else if (m_ESModel == "es2022_R22_PRE") {
424  } else if (m_ESModel == "es2023_R22_Run2_v0") {
426  } else if (m_ESModel == "es2023_R22_Run2_v1") {
428  } else if (m_ESModel == "es2024_Run3_ofc0_v0") {
430  } else if (m_ESModel == "es2024_Run3_v0") {
432  } else if (m_ESModel.empty()) {
433  ATH_MSG_ERROR("you must set ESModel property");
434  return StatusCode::FAILURE;
435  } else {
436  ATH_MSG_ERROR("Cannot understand model " << m_ESModel);
437  return StatusCode::FAILURE;
438  }
439 
440  if (m_ResolutionType == "Gaussian") {
442  } else if (m_ResolutionType == "SigmaEff80") {
444  } else if (m_ResolutionType == "SigmaEff90") {
446  } else {
447  ATH_MSG_ERROR("Cannot understand resolution " << m_ResolutionType);
448  return StatusCode::FAILURE;
449  }
450 
451  if (m_use_AFII != -1) {
453  "Property useAFII is deprecated. It is now replaced with useFastSim, "
454  "which should be explicitly configured");
455  return StatusCode::FAILURE;
456  }
457 
458  if (m_useFastSim == 1) {
460  } else if (m_useFastSim == 0) {
462  } else {
463  ATH_MSG_ERROR("Property useFastSim should be explicitly configured");
464  return StatusCode::FAILURE;
465  }
466 
470  "Sample is FastSim but no AF3 calibration is supported with "
471  "MC23 pre-recommendations (es2022_R22_PRE and es2024_Run3_ofc0_v0). "
472  "Please swtich to Run3 consolidated recommendations (es2024_Run3_v0), "
473  "or get in touch with the EGamma CP group in case you are using this");
474  return StatusCode::FAILURE;
475  }
476 
477  // configure decorrelation model, translate string property to internal class
478  // enum
479  /* S R SR
480  0. 0 0 0 WARNING Full, Full (this is the default without configuration)
481  1. 0 0 1 SR
482  2. 0 1 0 FATAL
483  3. 0 1 1 WARNING SR then R
484  4. 1 0 0 FATAL
485  5. 1 0 1 WARNING SR then S
486  6. 1 1 0 S, R
487  7. 1 1 1 FATAL
488  */
489  if (m_decorrelation_model_name.empty() and
492  // case 0
493  ATH_MSG_WARNING("no decorrelation model specified, assuming full model");
496  m_decorrelation_model_name = "FULL_v1";
497  } else if (not m_decorrelation_model_name.empty() and
498  not m_decorrelation_model_scale_name.empty() and
500  // case 7
501  ATH_MSG_FATAL("too many flags for the decorrelation model");
502  return StatusCode::FAILURE;
503  } else {
504  // set scale decorrelation model
505  if (not m_decorrelation_model_scale_name.empty()) { // case 4, 5, 6, (7)
506  if (not m_decorrelation_model_name.empty()) {
508  "flag decorrelation model ignored for scale decorrelation model");
509  } // case 5
510  if (m_decorrelation_model_scale_name == "1NP_v1")
511  m_decorrelation_model_scale = ScaleDecorrelation::ONENP;
512  else if (m_decorrelation_model_scale_name == "FULL_ETACORRELATED_v1")
513  m_decorrelation_model_scale = ScaleDecorrelation::FULL_ETA_CORRELATED;
514  else if (m_decorrelation_model_scale_name == "1NPCOR_PLUS_UNCOR")
515  m_decorrelation_model_scale = ScaleDecorrelation::ONENP_PLUS_UNCONR;
516  else if (m_decorrelation_model_scale_name == "FULL_v1")
518  else {
519  ATH_MSG_FATAL("cannot understand the scale decorrelation model '"
520  << m_decorrelation_model_scale_name << "'(typo?)");
521  return StatusCode::FAILURE;
522  }
523  } else if (not m_decorrelation_model_name.empty()) { // case 1, 3
524  if (m_decorrelation_model_name == "1NP_v1")
525  m_decorrelation_model_scale = ScaleDecorrelation::ONENP;
526  else if (m_decorrelation_model_name == "FULL_ETACORRELATED_v1")
527  m_decorrelation_model_scale = ScaleDecorrelation::FULL_ETA_CORRELATED;
528  else if (m_decorrelation_model_name == "1NPCOR_PLUS_UNCOR")
529  m_decorrelation_model_scale = ScaleDecorrelation::ONENP_PLUS_UNCONR;
530  else if (m_decorrelation_model_name == "FULL_v1")
532  else {
533  ATH_MSG_FATAL("cannot understand the decorrelation model '"
534  << m_decorrelation_model_name << "'(typo?)");
535  return StatusCode::FAILURE;
536  }
537  } else { // case 2, (7)
539  "not information how to initialize the scale decorrelation model");
540  return StatusCode::FAILURE;
541  }
542 
543  // set resolution decorralation model
545  .empty()) { // case 2, 3, 6, (7)
546  if (not m_decorrelation_model_name.empty()) {
548  "flag decorrelation model ignored for resolution decorrelation "
549  "model");
550  } // case 3
553  else if (m_decorrelation_model_resolution_name == "FULL_v1")
555  else {
556  ATH_MSG_FATAL("cannot understand the resolution decorrelation model '"
557  << m_decorrelation_model_resolution_name << "'(typo?)");
558  return StatusCode::FAILURE;
559  }
560  } else if (not m_decorrelation_model_name.empty()) { // case 1, 5
561  if (m_decorrelation_model_name == "1NP_v1")
563  else if (m_decorrelation_model_name == "FULL_ETACORRELATED_v1")
565  else if (m_decorrelation_model_name == "1NPCOR_PLUS_UNCOR")
567  else if (m_decorrelation_model_name == "FULL_v1")
569  else {
570  ATH_MSG_FATAL("cannot understand the decorrelation model '"
571  << m_decorrelation_model_name << "'(typo?)");
572  return StatusCode::FAILURE;
573  }
574  }
575  }
576 
577  // create correction tool
578  ATH_MSG_DEBUG("creating internal correction tool");
579  m_rootTool = std::make_unique<AtlasRoot::egammaEnergyCorrectionTool>();
580  if (!m_rootTool) {
581  ATH_MSG_ERROR("Cannot initialize underlying tool");
582  return StatusCode::FAILURE;
583  }
584  m_rootTool->setESModel(m_TESModel);
585 
591  "Using linear interpolation in the gain tool (uncertainties only)");
593  m_rootTool->setApplyL2GainInterpolation();
594  }
595  m_rootTool->msg().setLevel(this->msg().level());
596  m_rootTool->initialize();
597 
598  // configure MVA calibration
599  if (m_use_mva_calibration != 0) {
600  ATH_MSG_DEBUG("creating MVA calibration tool (if needed)");
601  if (m_MVAfolder.empty()) { // automatically configure MVA tool
603  }
604 
605  if (not m_MVAfolder.empty()) {
606 
607  // electron MVA tool
608  asg::AsgToolConfig config_mva_electron(
609  "egammaMVACalibTool/tool_mva_electron");
610  config_mva_electron.setPropertyFromString("folder", m_MVAfolder);
611  ATH_CHECK(config_mva_electron.setProperty("use_layer_corrected", true));
612  ATH_CHECK(config_mva_electron.setProperty(
613  "ParticleType", xAOD::EgammaParameters::electron));
614 
615  // unconverted photon MVA tool
616  asg::AsgToolConfig config_mva_unconverted(
617  "egammaMVACalibTool/tool_mva_unconverted");
618  config_mva_unconverted.setPropertyFromString("folder", m_MVAfolder);
619  ATH_CHECK(
620  config_mva_unconverted.setProperty("use_layer_corrected", true));
621  ATH_CHECK(config_mva_unconverted.setProperty(
623  ATH_CHECK(config_mva_unconverted.setProperty("OutputLevel",
624  this->msg().level()));
625 
626  // converted photon MVA tool
627  asg::AsgToolConfig config_mva_converted(
628  "egammaMVACalibTool/tool_mva_converted");
629  config_mva_converted.setPropertyFromString("folder", m_MVAfolder);
630  ATH_CHECK(config_mva_converted.setProperty("use_layer_corrected", true));
631  ATH_CHECK(config_mva_converted.setProperty(
632  "ParticleType", xAOD::EgammaParameters::convertedPhoton));
633  ATH_CHECK(config_mva_converted.setProperty("OutputLevel",
634  this->msg().level()));
635 
636  // initialize the ServiceHandler egammaMVASvc
637  // make the name unique
638  std::ostringstream mva_service_name;
639  mva_service_name << "egammaMVASvc/service_mva_egamma_id"
640  << (void const*)this;
641  asg::AsgServiceConfig config_mva_service(mva_service_name.str());
642  ATH_CHECK(config_mva_service.addPrivateTool("ElectronTool",
643  config_mva_electron));
644  ATH_CHECK(config_mva_service.addPrivateTool("UnconvertedPhotonTool",
645  config_mva_unconverted));
646  ATH_CHECK(config_mva_service.addPrivateTool("ConvertedPhotonTool",
647  config_mva_converted));
648  // fwd electron MVA tool
649  if (m_doFwdCalib) {
650  asg::AsgToolConfig config_mva_fwdelectron(
651  "egammaMVACalibTool/tool_mva_fwdelectron");
652  config_mva_fwdelectron.setPropertyFromString("folder", m_MVAfolder);
653  ATH_CHECK(config_mva_fwdelectron.setProperty(
655  ATH_CHECK(config_mva_fwdelectron.setProperty("ShiftType", 0));
656  ATH_CHECK(config_mva_fwdelectron.setProperty("OutputLevel", this->msg().level()));
657  ATH_CHECK(config_mva_service.addPrivateTool("FwdElectronTool",
658  config_mva_fwdelectron));
659  }
660  config_mva_service.setPropertyFromString("folder", m_MVAfolder);
661  ATH_CHECK(
662  config_mva_service.setProperty("OutputLevel", this->msg().level()));
663  ATH_CHECK(config_mva_service.makeService(m_MVACalibSvc));
664  } else {
665  m_use_mva_calibration = false;
666  }
667  }
668 
669  // configure layer recalibration tool
670  // For now: layer recalibration not applied to PRE release 21 (using run 1
671  // based calibration applied at reco level)
672  // for following R21 recommendations, need to apply the run2/run1 layer
673  // calibration ratio
674  if (m_ESModel == "es2017_R21_PRE") {
675  ATH_MSG_INFO("Layer recalibration already applied at cell level");
676  m_useLayerCorrection = false;
677  } else if (!m_useLayerCorrection) {
678  ATH_MSG_INFO("Layer corrections disabled!");
679  } else {
680  ATH_MSG_DEBUG("initializing layer recalibration tool (if needed)");
682  .empty()) { // automatically configure layer recalibration tool
685  .release();
687  ATH_MSG_INFO("not using layer recalibration");
688  }
689  } else {
692  }
694  m_layer_recalibration_tool->msg().setLevel(this->msg().level());
696  if (!m_usePSCorrection) {
697  ATH_MSG_INFO("PS corrections disabled!");
699  }
700  if (!m_useS12Correction) {
701  ATH_MSG_INFO("S12 corrections disabled!");
703  }
704  if (!m_useSaccCorrection) {
705  ATH_MSG_INFO("Sacc corrections disabled!");
707  }
708  }
709  }
710 
712  m_rootTool->use_temp_correction201215(m_use_temp_correction201215);
714  m_rootTool->use_uA2MeV_2015_first2weeks_correction(
716  if (not m_use_full_statistical_error and
718  m_rootTool->useStatErrorScaling(true);
719  }
720 
721  if (m_use_ep_combination) {
722  ATH_MSG_ERROR("ep combination not supported yet");
723  throw std::runtime_error("ep combination not supported yet");
724  }
725 
728  }
731  }
733 
734  if (m_useGainCorrection == AUTO) {
739  }
740  else {
741  ATH_MSG_DEBUG("initializing gain tool");
744  }
745  }
746  else if (m_useGainCorrection == 1) {
752  "cannot instantiate gain tool for this model (you can only disable "
753  "the gain tool, but not enable it)");
754  }
755  else {
756  ATH_MSG_INFO(
757  "initializing gain tool for run2 final precision recommendations");
759  "Gain corrections required but Zee scales are derived without Gain, "
760  "will cause inconsistency!");
761  std::string gain_tool_run_2_filename = PathResolverFindCalibFile(
762  "ElectronPhotonFourMomentumCorrection/v29/"
763  "gain_uncertainty_specialRun.root");
764  m_gain_tool_run2 = std::make_unique<egGain::GainUncertainty>(
765  gain_tool_run_2_filename, false, "GainCorrection",
767  m_gain_tool_run2->msg().setLevel(this->msg().level());
768  }
769  }
770 
774  // ADC non linearity correction
777  std::string adcLinearityCorr_filename = PathResolverFindCalibFile(
778  "ElectronPhotonFourMomentumCorrection/v25/linearity_ADC.root");
779  m_ADCLinearity_tool = std::make_shared<LinearityADC>(adcLinearityCorr_filename);
780  m_ADCLinearity_tool->msg().setLevel(this->msg().level());
781  m_rootTool->setADCTool(m_ADCLinearity_tool);
782  } else {
784  m_ESModel + " recommendations use ADC corrections for scale "
785  "derivation. Disabling the ADCLinearity flag will create "
786  "inconsistency!");
787  }
788 
791  m_rootTool->setApplyLeakageCorrection(true);
792  }
793 
794  // Calo distortion phi unif correction
798  std::string phiUnifCorrfileName = PathResolverFindCalibFile(
799  "ElectronPhotonFourMomentumCorrection/v33/"
800  "egammaEnergyCorrectionData.root");
801  std::unique_ptr<TFile> fCorr(
802  TFile::Open(phiUnifCorrfileName.c_str(), "READ"));
803  m_caloDistPhiUnifCorr.reset(
804  dynamic_cast<TH2*>(fCorr->Get("CaloDistortionPhiUniformityCorrection/"
805  "es2023_R22_Run2_v0/h2DcorrPhiUnif")));
806  m_caloDistPhiUnifCorr->SetDirectory(nullptr);
807  } else {
809  m_ESModel + " recommendations use CaloDistPhiUnif for scale "
810  "derivation. Disabling the CaloDistPhiUnif flag will create "
811  "inconsistency!");
812  }
813  }
814 
815  // No scale correction for release 21 ==> obsolete
816  /*if (m_ESModel == "es2017_R21_PRE"){
817  m_doScaleCorrection = 0;
818  }
819  */
820 
821  ATH_MSG_INFO("ESModel: " << m_ESModel);
822  ATH_MSG_INFO("ResolutionType: " << m_ResolutionType);
823  ATH_MSG_INFO("decorrelation Model: " << m_decorrelation_model_name);
824  ATH_MSG_DEBUG("layer correction = " << m_useLayerCorrection);
825  ATH_MSG_DEBUG("PS correction = " << m_usePSCorrection);
826  ATH_MSG_DEBUG("S12 correction = " << m_useS12Correction);
827  ATH_MSG_DEBUG("Sacc correction = " << m_useSaccCorrection);
828  ATH_MSG_DEBUG("intermodule correction = " << m_useIntermoduleCorrection);
829  ATH_MSG_DEBUG("phi uniformity correction = " << m_usePhiUniformCorrection);
830  ATH_MSG_DEBUG("distorted calo phi uniformity correction = "
832  ATH_MSG_DEBUG("gain correction = " << m_useGainCorrection);
833  ATH_MSG_DEBUG("ADC non-linearity correction = " << m_doADCLinearityCorrection);
834  ATH_MSG_DEBUG("leakage correction for photons = " << m_doLeakageCorrection);
835  ATH_MSG_DEBUG("smearing = " << m_doSmearing);
836  ATH_MSG_DEBUG("insitu scales = " << m_doScaleCorrection);
837  ATH_MSG_DEBUG("ep combination = " << m_use_ep_combination);
838  ATH_MSG_DEBUG("use MVA calibration = " << m_use_mva_calibration);
840  "use temperature correction 2015 = " << m_use_temp_correction201215);
841  ATH_MSG_DEBUG("use uA2MeV correction 2015 1/2 week = "
843 
845 
847  .ignore(); // this set the flags for the internal tool without
848  // systematics
850  if (registry.registerSystematics(*this) != StatusCode::SUCCESS)
851  return StatusCode::FAILURE;
852 
853  if (m_onlyElectrons.value() && m_onlyPhotons.value()) {
854  ATH_MSG_ERROR("Cannot select both onlyElectrons and onlyPhotons");
855  return StatusCode::FAILURE;
856  }
857  if (m_onlyElectrons.value()) {
859  resetAccessor (m_accessors->electronTrackAcc, *this, "trackParticleLinks");
860  }
861  }
862  if (m_onlyPhotons.value()) {
863  resetAccessor (m_accessors->photonVertexAcc, *this, "vertexLinks");
864  }
865  if (m_decorateEmva)
866  resetAccessor (m_accessors->decEmva, *this, "E_mva_only");
867 
868  ANA_CHECK (initializeColumns ());
869 
870  return StatusCode::SUCCESS;
871 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ inputMetaStore()

AsgMetadataTool::MetaStorePtr_t asg::AsgMetadataTool::inputMetaStore ( ) const
inherited

Accessor for the input metadata store.

Definition at line 93 of file AsgMetadataTool.cxx.

93  {
94 
95 #ifdef XAOD_STANDALONE
96  return &m_inputMetaStore;
97 #else // XAOD_STANDALONE
98  return m_inputMetaStore;
99 #endif // XAOD_STANDALONE
100  }

◆ intermodule_correction()

double CP::EgammaCalibrationAndSmearingTool::intermodule_correction ( double  Ecl,
double  phi,
double  eta 
) const

Definition at line 2189 of file EgammaCalibrationAndSmearingTool.cxx.

2190  {
2191 
2192  // Intermodule Widening Correction: E_corr = E / (a' - b' * ((1 / (1 +
2193  // exp((phi_mod - 2 * pi / 32) * c))) * (1 / (1 + exp((phi_mod - 2 * pi / 32)
2194  // * (d)))))) (phi_min, phi_max) : [a' = a / a, b' = b / a, c, d]
2195 
2196  double Ecl_corr = 0.;
2197  int DivInt = 0;
2198  double pi = M_PI;
2199 
2212 
2213  double phi_mod = 0;
2214  if (phi < 0)
2215  phi_mod = fmod(phi, 2 * pi / 16.) + pi / 8.;
2216  else
2217  phi_mod = fmod(phi, 2 * pi / 16.);
2218 
2219  // The correction concerns only the barrel
2220  if (std::abs(eta) <= 1.37) {
2221 
2222  if (phi < (-7 * pi / 8) && phi > (-1 * pi))
2223  Ecl_corr =
2224  Ecl /
2225  (1 - 0.1086 *
2226  ((1 / (1 + exp((phi_mod - 2 * pi / 32.) * 175.2759))) *
2227  (1 / (1 + exp((phi_mod - 2 * pi / 32.) * (-189.3612))))));
2228  if (phi < (-6 * pi / 8) && phi > (-7 * pi / 8))
2229  Ecl_corr =
2230  Ecl /
2231  (1 - 0.0596 *
2232  ((1 / (1 + exp((phi_mod - 2 * pi / 32.) * 170.8305))) *
2233  (1 / (1 + exp((phi_mod - 2 * pi / 32.) * (-233.3782))))));
2234  if (phi < (-5 * pi / 8) && phi > (-6 * pi / 8))
2235  Ecl_corr =
2236  Ecl /
2237  (1 - 0.0596 *
2238  ((1 / (1 + exp((phi_mod - 2 * pi / 32.) * 147.1451))) *
2239  (1 / (1 + exp((phi_mod - 2 * pi / 32.) * (-139.3386))))));
2240  if (phi < (-4 * pi / 8) && phi > (-5 * pi / 8))
2241  Ecl_corr =
2242  Ecl /
2243  (1 - 0.0583 *
2244  ((1 / (1 + exp((phi_mod - 2 * pi / 32.) * 168.4644))) *
2245  (1 / (1 + exp((phi_mod - 2 * pi / 32.) * (-246.2897))))));
2246  if (phi < (-3 * pi / 8) && phi > (-4 * pi / 8))
2247  Ecl_corr =
2248  Ecl /
2249  (1 - 0.0530 *
2250  ((1 / (1 + exp((phi_mod - 2 * pi / 32.) * 177.6703))) *
2251  (1 / (1 + exp((phi_mod - 2 * pi / 32.) * (-198.3227))))));
2252  if (phi < (-2 * pi / 8) && phi > (-3 * pi / 8))
2253  Ecl_corr =
2254  Ecl /
2255  (1 - 0.0672 *
2256  ((1 / (1 + exp((phi_mod - 2 * pi / 32.) * 145.0693))) *
2257  (1 / (1 + exp((phi_mod - 2 * pi / 32.) * (-242.1771))))));
2258  if (phi < (-1 * pi / 8) && phi > (-2 * pi / 8))
2259  Ecl_corr =
2260  Ecl /
2261  (1 - 0.0871 *
2262  ((1 / (1 + exp((phi_mod - 2 * pi / 32.) * 132.3303))) *
2263  (1 / (1 + exp((phi_mod - 2 * pi / 32.) * (-166.1833))))));
2264  if (phi < (0 * pi / 8) && phi > (-1 * pi / 8))
2265  Ecl_corr =
2266  Ecl /
2267  (1 - 0.0948 *
2268  ((1 / (1 + exp((phi_mod - 2 * pi / 32.) * 127.6780))) *
2269  (1 / (1 + exp((phi_mod - 2 * pi / 32.) * (-150.0700))))));
2270  if (phi < (1 * pi / 8) && phi > (0 * pi / 8))
2271  Ecl_corr =
2272  Ecl /
2273  (1 - 0.1166 *
2274  ((1 / (1 + exp((phi_mod - 2 * pi / 32.) * 172.0679))) *
2275  (1 / (1 + exp((phi_mod - 2 * pi / 32.) * (-235.3293))))));
2276  if (phi < (2 * pi / 8) && phi > (1 * pi / 8))
2277  Ecl_corr =
2278  Ecl /
2279  (1 - 0.1172 *
2280  ((1 / (1 + exp((phi_mod - 2 * pi / 32.) * 190.3524))) *
2281  (1 / (1 + exp((phi_mod - 2 * pi / 32.) * (-198.9400))))));
2282  if (phi < (3 * pi / 8) && phi > (2 * pi / 8))
2283  Ecl_corr =
2284  Ecl /
2285  (1 - 0.1292 *
2286  ((1 / (1 + exp((phi_mod - 2 * pi / 32.) * 158.0540))) *
2287  (1 / (1 + exp((phi_mod - 2 * pi / 32.) * (-165.3893))))));
2288  if (phi < (4 * pi / 8) && phi > (3 * pi / 8))
2289  Ecl_corr =
2290  Ecl /
2291  (1 - 0.1557 *
2292  ((1 / (1 + exp((phi_mod - 2 * pi / 32.) * 162.2793))) *
2293  (1 / (1 + exp((phi_mod - 2 * pi / 32.) * (-133.5131))))));
2294  if (phi < (5 * pi / 8) && phi > (4 * pi / 8))
2295  Ecl_corr =
2296  Ecl /
2297  (1 - 0.1659 *
2298  ((1 / (1 + exp((phi_mod - 2 * pi / 32.) * 180.5270))) *
2299  (1 / (1 + exp((phi_mod - 2 * pi / 32.) * (-168.5074))))));
2300  if (phi < (6 * pi / 8) && phi > (5 * pi / 8))
2301  Ecl_corr =
2302  Ecl /
2303  (1 - 0.1123 *
2304  ((1 / (1 + exp((phi_mod - 2 * pi / 32.) * 128.2277))) *
2305  (1 / (1 + exp((phi_mod - 2 * pi / 32.) * (-154.4455))))));
2306  if (phi < (7 * pi / 8) && phi > (6 * pi / 8))
2307  Ecl_corr =
2308  Ecl /
2309  (1 - 0.1394 *
2310  ((1 / (1 + exp((phi_mod - 2 * pi / 32.) * 192.1216))) *
2311  (1 / (1 + exp((phi_mod - 2 * pi / 32.) * (-198.0727))))));
2312  if (phi < (8 * pi / 8) && phi > (7 * pi / 8))
2313  Ecl_corr =
2314  Ecl /
2315  (1 - 0.1001 *
2316  ((1 / (1 + exp((phi_mod - 2 * pi / 32.) * 199.1735))) *
2317  (1 / (1 + exp((phi_mod - 2 * pi / 32.) * (-176.4056))))));
2318  }
2319 
2320  // No correction for the EC
2321  else {
2322  Ecl_corr = Ecl;
2323  }
2324 
2325  }
2326 
2327  else {
2328 
2329  // Definitions of module folding into four quarters (top, left, bottom and
2330  // right)
2331 
2332  DivInt = (int)(phi / ((2 * pi) / 16.));
2333  double phi_mod = phi - DivInt * (2 * pi / 16.);
2334 
2335  // Centring on the intermodule --> phi_mod will now be in [0,0.4]
2336  if (phi_mod < 0)
2337  phi_mod += pi / 8.;
2338 
2339  // The correction concerns only the barrel
2340  if (std::abs(eta) <= 1.4) {
2341 
2342  // Top quarter
2343  if (phi < (3 * pi) / 4. && phi >= pi / 4.) {
2344  Ecl_corr =
2345  Ecl / (1 - 0.131 * ((1 / (1 + exp((phi_mod - 0.2) * 199.08))) *
2346  (1 / (1 + exp((phi_mod - 0.2) * (-130.36))))));
2347  }
2348 
2349  // Right quarter
2350  if (phi < pi / 4. && phi >= -pi / 4.) {
2351  Ecl_corr =
2352  Ecl / (1 - 0.0879 * ((1 / (1 + exp((phi_mod - 0.2) * 221.01))) *
2353  (1 / (1 + exp((phi_mod - 0.2) * (-149.51))))));
2354  }
2355  // Bottom quarter
2356  if (phi < -pi / 4. && phi >= (-3 * pi) / 4.) {
2357  Ecl_corr =
2358  Ecl / (1 - 0.0605 * ((1 / (1 + exp((phi_mod - 0.2) * 281.37))) *
2359  (1 / (1 + exp((phi_mod - 0.2) * (-170.29))))));
2360  }
2361  // Left quarter
2362  if ((phi < (-3 * pi) / 4.) || (phi >= (3 * pi) / 4.)) {
2363  Ecl_corr =
2364  Ecl / (1 - 0.102 * ((1 / (1 + exp((phi_mod - 0.2) * 235.37))) *
2365  (1 / (1 + exp((phi_mod - 0.2) * (-219.04))))));
2366  }
2367  }
2368 
2369  // No correction for the EC
2370  else {
2371  Ecl_corr = Ecl;
2372  }
2373  }
2374 
2375  return Ecl_corr;
2376 }

◆ isAffectedBySystematic()

bool CP::EgammaCalibrationAndSmearingTool::isAffectedBySystematic ( const CP::SystematicVariation systematic) const
overrideprivatevirtual

Declare the interface that this class provides.

returns: whether this tool is affected by the given systematics

Implements CP::ISystematicsTool.

Definition at line 1283 of file EgammaCalibrationAndSmearingTool.cxx.

1284  {
1286  return sys.find(systematic) != sys.end();
1287 }

◆ metaDataStop()

StatusCode asg::AsgMetadataTool::metaDataStop ( )
protectedvirtualinherited

Function called when the tool should write out its metadata.

Dummy implementation that can be overridden by the derived tool.

Reimplemented in BookkeeperTool, BookkeeperDumperTool, xAODMaker::TriggerMenuMetaDataTool, and xAODMaker::TruthMetaDataTool.

Definition at line 209 of file AsgMetadataTool.cxx.

209  {
210 
211  // Return gracefully:
212  return StatusCode::SUCCESS;
213  }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msg_level_name()

const std::string & asg::AsgTool::msg_level_name ( ) const
inherited

A deprecated function for getting the message level's name.

Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:

MSG::name( msg().level() )

This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.

Returns
The string name of the current minimum message level that's printed

Definition at line 101 of file AsgTool.cxx.

101  {
102 
103  return MSG::name( msg().level() );
104  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ oldtool_resolution_flag_this_event()

egEnergyCorr::Resolution::Variation CP::EgammaCalibrationAndSmearingTool::oldtool_resolution_flag_this_event ( columnar::EgammaId  p,
columnar::EventInfoId  event_info 
) const
inlineprivate

Definition at line 1257 of file EgammaCalibrationAndSmearingTool.cxx.

1258  {
1259  const Accessors& acc = *m_accessors;
1260  return acc.eventTypeAcc (event_info, xAOD::EventInfo::IS_SIMULATION)
1263 }

◆ oldtool_scale_flag_this_event()

egEnergyCorr::Scale::Variation CP::EgammaCalibrationAndSmearingTool::oldtool_scale_flag_this_event ( columnar::EgammaId  p,
columnar::EventInfoId  event_info 
) const
inlineprivate

Definition at line 1245 of file EgammaCalibrationAndSmearingTool.cxx.

1246  {
1247  const Accessors& acc = *m_accessors;
1248  if (!acc.eventTypeAcc (event_info, xAOD::EventInfo::IS_SIMULATION))
1250  if (m_currentScalePredicate(*this,p))
1252  else
1254 }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ outputMetaStore()

AsgMetadataTool::MetaStorePtr_t asg::AsgMetadataTool::outputMetaStore ( ) const
inherited

Accessor for the output metadata store.

Definition at line 102 of file AsgMetadataTool.cxx.

102  {
103 
104 #ifdef XAOD_STANDALONE
105  return &m_outputMetaStore;
106 #else // XAOD_STANDALONE
107  return m_outputMetaStore;
108 #endif // XAOD_STANDALONE
109  }

◆ print() [1/2]

void asg::AsgTool::print ( ) const
virtualinherited

◆ print() [2/2]

virtual void asg::IAsgTool::print ( ) const
pure virtualinherited

◆ recommendedSystematics()

CP::SystematicSet CP::EgammaCalibrationAndSmearingTool::recommendedSystematics ( ) const
overrideprivatevirtual

the list of all systematics this tool recommends to use

Implements CP::IReentrantSystematicsTool.

Definition at line 2135 of file EgammaCalibrationAndSmearingTool.cxx.

2136  {
2137  return affectingSystematics();
2138 }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ resolution()

double CP::EgammaCalibrationAndSmearingTool::resolution ( double  energy,
double  cl_eta,
double  cl_etaCalo,
PATCore::ParticleType::Type  ptype = PATCore::ParticleType::Electron,
bool  withCT = false 
) const
overrideprivatevirtual

Implements CP::IEgammaCalibrationAndSmearingTool.

Definition at line 925 of file EgammaCalibrationAndSmearingTool.cxx.

927  {
928  return m_rootTool->resolution(energy, cl_eta, cl_etaCalo, ptype, withCT,
929  false);
930 }

◆ setPt()

void CP::EgammaCalibrationAndSmearingTool::setPt ( columnar::MutableEgammaId  input,
double  energy 
) const
private

Definition at line 1229 of file EgammaCalibrationAndSmearingTool.cxx.

1229  {
1230  const double new_energy2 = energy * energy;
1231  const double m2 = m_accessors->mAcc (input) * m_accessors->mAcc (input);
1232  const double p2 = new_energy2 > m2 ? new_energy2 - m2 : 0.;
1233  m_accessors->ptOutDec (input) = sqrt(p2) / cosh(m_accessors->etaAcc (input));
1234  ATH_MSG_DEBUG("after setting pt, energy = " << m_accessors->eAcc (input));
1235 }

◆ setRandomSeedFunction()

virtual void CP::EgammaCalibrationAndSmearingTool::setRandomSeedFunction ( const IdFunction &&  function)
inlineprivatevirtual

Definition at line 237 of file EgammaCalibrationAndSmearingTool.h.

237  {
238  m_set_seed_function = function;
239  }

◆ setupSystematics()

void CP::EgammaCalibrationAndSmearingTool::setupSystematics ( )
private

Definition at line 1302 of file EgammaCalibrationAndSmearingTool.cxx.

1302  {
1303  const EgammaPredicate always = [](const EgammaCalibrationAndSmearingTool&, columnar::EgammaId) { return true; };
1304 
1305  // Try to simplify a bit for the ones that are fully correlate in eta,
1306  // whatever the model and that are not included in the macros including
1307  // - ADC non linearity
1308  // - L2Gain
1309  // - Leakage
1310  // - Conversion related
1311  // - TopoCluster threshold
1312  // - AF2
1313  // - PS_BARREL_B12
1314  // - S12EXTRALASTETABINRUN2
1315  // - ZEESTAT
1316  // - Run3 pre OFC + EXTRA
1317  if (m_decorrelation_model_scale == ScaleDecorrelation::FULL_ETA_CORRELATED ||
1319  // Electron leakage, ADCLin, convReco only in final run2 recommendations
1323  // systematic related to ADC non linearity correction. Before 2022, there
1324  // was not correction, nor related systematic
1326  m_syst_description[CP::SystematicVariation("EG_SCALE_ADCLIN", +1)] =
1327  SysInfo{always, egEnergyCorr::Scale::ADCLinUp};
1328  m_syst_description[CP::SystematicVariation("EG_SCALE_ADCLIN", -1)] =
1329  SysInfo{always, egEnergyCorr::Scale::ADCLinDown};
1330  }
1331  // Gain splitted uncertainty
1332  m_syst_description[CP::SystematicVariation("EG_SCALE_L2MEDIUMGAIN", +1)] =
1333  SysInfo{always, egEnergyCorr::Scale::L2MediumGainUp};
1334  m_syst_description[CP::SystematicVariation("EG_SCALE_L2MEDIUMGAIN", -1)] =
1335  SysInfo{always, egEnergyCorr::Scale::L2MediumGainDown};
1336  m_syst_description[CP::SystematicVariation("EG_SCALE_L2LOWGAIN", +1)] =
1337  SysInfo{always, egEnergyCorr::Scale::L2LowGainUp};
1338  m_syst_description[CP::SystematicVariation("EG_SCALE_L2LOWGAIN", -1)] =
1339  SysInfo{always, egEnergyCorr::Scale::L2LowGainDown};
1340 
1341  // Electron leakage
1342  m_syst_description[CP::SystematicVariation("EG_SCALE_LEAKAGEELEC", +1)] =
1343  SysInfo{always, egEnergyCorr::Scale::LeakageElecUp};
1344  m_syst_description[CP::SystematicVariation("EG_SCALE_LEAKAGEELEC", -1)] =
1345  SysInfo{always, egEnergyCorr::Scale::LeakageElecDown};
1346 
1347  // Conversion related
1348  m_syst_description[CP::SystematicVariation("PH_SCALE_CONVRECO", +1)] =
1349  SysInfo{always, egEnergyCorr::Scale::ConvRecoUp};
1350  m_syst_description[CP::SystematicVariation("PH_SCALE_CONVRECO", -1)] =
1351  SysInfo{always, egEnergyCorr::Scale::ConvRecoDown};
1352  }
1353  // The equivalent of convReco (convefficiency and convfakerate) for other
1354  // models
1355  else {
1356  m_syst_description[CP::SystematicVariation("PH_SCALE_CONVEFFICIENCY",
1357  +1)] =
1358  SysInfo{always, egEnergyCorr::Scale::ConvEfficiencyUp};
1359  m_syst_description[CP::SystematicVariation("PH_SCALE_CONVEFFICIENCY",
1360  -1)] =
1361  SysInfo{always, egEnergyCorr::Scale::ConvEfficiencyDown};
1362  m_syst_description[CP::SystematicVariation("PH_SCALE_CONVFAKERATE", +1)] =
1363  SysInfo{always, egEnergyCorr::Scale::ConvFakeRateUp};
1364  m_syst_description[CP::SystematicVariation("PH_SCALE_CONVFAKERATE", -1)] =
1365  SysInfo{always, egEnergyCorr::Scale::ConvFakeRateDown};
1366  }
1367 
1368  // additional systematics for R22 OFC and MC21 pre and bulk
1370  m_syst_description[CP::SystematicVariation("EG_SCALE_OFC", +1)] =
1371  SysInfo{always, egEnergyCorr::Scale::OFCUp};
1372  m_syst_description[CP::SystematicVariation("EG_SCALE_OFC", -1)] =
1373  SysInfo{always, egEnergyCorr::Scale::OFCDown};
1374 
1375  m_syst_description[CP::SystematicVariation("EG_SCALE_EXTRARUN3PRE", +1)] =
1376  SysInfo{always, egEnergyCorr::Scale::EXTRARUN3PREUp};
1377  m_syst_description[CP::SystematicVariation("EG_SCALE_EXTRARUN3PRE", -1)] =
1378  SysInfo{always, egEnergyCorr::Scale::EXTRARUN3PREDown};
1379  }
1380 
1391 
1392  // topo clustr threshold systematics aded to release 21 recommendations
1393  m_syst_description[CP::SystematicVariation("EG_SCALE_TOPOCLUSTER_THRES",
1394  +1)] =
1395  SysInfo{always, egEnergyCorr::Scale::topoClusterThresUp};
1396  m_syst_description[CP::SystematicVariation("EG_SCALE_TOPOCLUSTER_THRES",
1397  -1)] =
1399 
1400  // AF3 for run3 models: es2022_R22_PRE and esmodel >= es2023_R22_Run2_v1
1401  // although we prevent AF for es2022_R22_PRE and es2024_Run3_ofc0_v0
1402  // AF3 are still technically added in the tool
1403  // but normally uncertainty will be 0
1405  m_syst_description[CP::SystematicVariation("EG_SCALE_AF3", +1)] =
1406  SysInfo{always, egEnergyCorr::Scale::afUp};
1407  m_syst_description[CP::SystematicVariation("EG_SCALE_AF3", -1)] =
1408  SysInfo{always, egEnergyCorr::Scale::afDown};
1409  }
1410  else {
1411  // and extra AF2 systematics for release 21 recommendations - Moriond 2018
1412  // - pending proper AF2 to FullSim correction with release 21
1413  m_syst_description[CP::SystematicVariation("EG_SCALE_AF2", +1)] =
1414  SysInfo{always, egEnergyCorr::Scale::afUp};
1415  m_syst_description[CP::SystematicVariation("EG_SCALE_AF2", -1)] =
1416  SysInfo{always, egEnergyCorr::Scale::afDown};
1417  }
1418  }
1419 
1420  // PS correlated barrel uncertainty
1429  m_syst_description[CP::SystematicVariation("EG_SCALE_PS_BARREL_B12",
1430  +1)] =
1431  SysInfo{always, egEnergyCorr::Scale::PSb12Up};
1432  m_syst_description[CP::SystematicVariation("EG_SCALE_PS_BARREL_B12",
1433  -1)] =
1434  SysInfo{always, egEnergyCorr::Scale::PSb12Down};
1435  }
1436 
1437  // additional systematic for S12 last eta bin run2
1443  "EG_SCALE_S12EXTRALASTETABINRUN2", +1)] =
1446  "EG_SCALE_S12EXTRALASTETABINRUN2", -1)] =
1448  }
1449 
1450  // Zee stat, if for FULL we do not ask for m_use_full_statistical_error
1452  ScaleDecorrelation::FULL_ETA_CORRELATED or
1454  // return 1 variation only, fully correlated in eta, equal to the correct
1455  // value but scaled by sqrt(number of bins) the scaling is done by the old
1456  // tool
1457  m_syst_description[CP::SystematicVariation("EG_SCALE_ZEESTAT", +1)] =
1458  SysInfo{always, egEnergyCorr::Scale::ZeeStatUp};
1459  m_syst_description[CP::SystematicVariation("EG_SCALE_ZEESTAT", -1)] =
1460  SysInfo{always, egEnergyCorr::Scale::ZeeStatDown};
1461  }
1462  }
1463  if (m_decorrelation_model_scale == ScaleDecorrelation::ONENP) {
1464  // TODO: independet implementation of ALL UP looping on all the variations
1465  m_syst_description[CP::SystematicVariation("EG_SCALE_ALL", +1)] =
1466  SysInfo{always, egEnergyCorr::Scale::AllUp};
1467  m_syst_description[CP::SystematicVariation("EG_SCALE_ALL", -1)] =
1468  SysInfo{always, egEnergyCorr::Scale::AllDown};
1469 
1470  // to be consistent with other schemes, we add
1471  // extra AF systematics in addition to the 1NP
1478  m_syst_description[CP::SystematicVariation("EG_SCALE_AF2", +1)] =
1479  SysInfo{always, egEnergyCorr::Scale::afUp};
1480  m_syst_description[CP::SystematicVariation("EG_SCALE_AF2", -1)] =
1481  SysInfo{always, egEnergyCorr::Scale::afDown};
1482  }
1484  m_syst_description[CP::SystematicVariation("EG_SCALE_AF3", +1)] =
1485  SysInfo{always, egEnergyCorr::Scale::afUp};
1486  m_syst_description[CP::SystematicVariation("EG_SCALE_AF3", -1)] =
1487  SysInfo{always, egEnergyCorr::Scale::afDown};
1488  }
1489  }
1490  else if (m_decorrelation_model_scale ==
1491  ScaleDecorrelation::FULL_ETA_CORRELATED) {
1492 // all the physical effects separately, considered as fully correlated in eta
1494 #define SYSMACRO(name, fullcorrelated, decorrelation, flagup, flagdown) \
1495  m_syst_description[CP::SystematicVariation(#name, +1)] = \
1496  SysInfo{always, flagup}; \
1497  m_syst_description[CP::SystematicVariation(#name, -1)] = \
1498  SysInfo{always, flagdown};
1499 #include "ElectronPhotonFourMomentumCorrection/systematics_es2024_Run3_v0.def"
1500 #undef SYSMACRO
1501  }
1502  else {
1503 // common systematics for all the esmodels
1504 #define SYSMACRO(name, fullcorrelated, decorrelation, flagup, flagdown) \
1505  m_syst_description[CP::SystematicVariation(#name, +1)] = \
1506  SysInfo{always, flagup}; \
1507  m_syst_description[CP::SystematicVariation(#name, -1)] = \
1508  SysInfo{always, flagdown};
1509 #include "ElectronPhotonFourMomentumCorrection/systematics_S12_2022.def"
1510 #undef SYSMACRO
1511  }
1512 
1516  m_syst_description[CP::SystematicVariation("EG_SCALE_LARCALIB", +1)] =
1517  SysInfo{always, egEnergyCorr::Scale::LArCalibUp};
1518  m_syst_description[CP::SystematicVariation("EG_SCALE_LARCALIB", -1)] =
1519  SysInfo{always, egEnergyCorr::Scale::LArCalibDown};
1520  m_syst_description[CP::SystematicVariation("EG_SCALE_L2GAIN", +1)] =
1521  SysInfo{always, egEnergyCorr::Scale::L2GainUp};
1522  m_syst_description[CP::SystematicVariation("EG_SCALE_L2GAIN", -1)] =
1523  SysInfo{always, egEnergyCorr::Scale::L2GainDown};
1524  }
1525 
1526  // additional systematics for S12 run2
1537  "EG_SCALE_LARCALIB_EXTRA2015PRE", +1)] =
1540  "EG_SCALE_LARCALIB_EXTRA2015PRE", -1)] =
1542  }
1543 
1544  // additional systematics for temperature run1->run2
1551  "EG_SCALE_LARTEMPERATURE_EXTRA2015PRE", +1)] =
1554  "EG_SCALE_LARTEMPERATURE_EXTRA2015PRE", -1)] =
1556  }
1557 
1558  // additional systematic for temperature 2015->2016
1561  "EG_SCALE_LARTEMPERATURE_EXTRA2016PRE", +1)] =
1564  "EG_SCALE_LARTEMPERATURE_EXTRA2016PRE", -1)] =
1566  }
1567 
1568  // additional systematic for PP0 region
1584  m_syst_description[CP::SystematicVariation("EG_SCALE_MATPP0", +1)] =
1585  SysInfo{always, egEnergyCorr::Scale::MatPP0Up};
1586  m_syst_description[CP::SystematicVariation("EG_SCALE_MATPP0", -1)] =
1587  SysInfo{always, egEnergyCorr::Scale::MatPP0Down};
1588  }
1589 
1590  // systematic related to wtots1
1606  m_syst_description[CP::SystematicVariation("EG_SCALE_WTOTS1", +1)] =
1607  SysInfo{always, egEnergyCorr::Scale::Wtots1Up};
1608  m_syst_description[CP::SystematicVariation("EG_SCALE_WTOTS1", -1)] =
1609  SysInfo{always, egEnergyCorr::Scale::Wtots1Down};
1610  }
1611 
1612  // systematic for the scintillators
1631  // scintillator systematics
1632  m_syst_description[CP::SystematicVariation("EG_SCALE_E4SCINTILLATOR",
1633  +1)] =
1634  SysInfo{always, egEnergyCorr::Scale::E4ScintillatorUp};
1635  m_syst_description[CP::SystematicVariation("EG_SCALE_E4SCINTILLATOR",
1636  -1)] =
1637  SysInfo{always, egEnergyCorr::Scale::E4ScintillatorDown};
1638  }
1639 
1640  } else if (m_decorrelation_model_scale ==
1641  ScaleDecorrelation::ONENP_PLUS_UNCONR) {
1642 // qsum of all variations correlated 8/13 TeV + uncorrelated (additional
1643 // systematics for 2015PRE or 2016) all the physical effects separately,
1644 // considered as fully correlated in eta
1645 // TODO: fix for es2017
1646 #define SYSMACRO(name, fullcorrelated, decorrelation, flagup, flagdown) \
1647  m_syst_description[CP::SystematicVariation(#name, +1)] = \
1648  SysInfo{always, flagup}; \
1649  m_syst_description[CP::SystematicVariation(#name, -1)] = \
1650  SysInfo{always, flagdown};
1651 #include "ElectronPhotonFourMomentumCorrection/systematics_1NPCOR_PLUS_UNCOR.def"
1652 #undef SYSMACRO
1653 
1654  // additional systematic for S12 last eta bin run2 - not needed anymore for
1655  // last 20.7 model since it is part of bin per bin E1/E2 uncertainty in root
1656  // file
1661  "EG_SCALE_S12EXTRALASTETABINRUN2", +1)] =
1664  "EG_SCALE_S12EXTRALASTETABINRUN2", -1)] =
1666  }
1667 
1669  using pairvector = std::vector<std::pair<double, double>>;
1670  const pairvector decorrelation_bins_BE = {{0., 1.45}, {1.52, 2.5}};
1671  const std::vector<double> decorrelation_edges_TWELVE = {
1672  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};
1673  std::vector<double> decorrelation_edges_MODULE = {
1674  0., 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.37, 1.52, 1.8};
1675  const std::vector<double> decorrelation_edges_MATERIAL = {0.0, 1.1, 1.5,
1676  2.1, 2.5};
1677  std::vector<double> decorrelation_edges_S12_EXTRARUN3 = {
1678  0., 0.8, 1.5, 2.5};
1679 
1680  std::vector<double> decorrelation_edges_S12;
1681  // for es2018_R21_v1 : 4 eta bins for muon E1/E2 uncertainty correlation
1683  decorrelation_edges_S12.resize(5);
1684  decorrelation_edges_S12 = {0., 1.35, 1.5, 2.4, 2.5};
1688  decorrelation_edges_S12.resize(8);
1689  decorrelation_edges_S12 = {0., 0.6, 1.0, 1.35, 1.5, 1.8, 2.4, 2.5};
1690  //
1691  // PS scale from muons, so "crack" is a bit different
1692  decorrelation_edges_MODULE[7] = 1.4;
1693  decorrelation_edges_MODULE[8] = 1.5;
1694  }
1695  // for previous run 2 muon calibration with 20.7, 5 eta bins for E1/E2
1696  // uncertainty correlation
1697  else {
1698  decorrelation_edges_S12.resize(6);
1699  decorrelation_edges_S12 = {0., 0.6, 1.4, 1.5, 2.4, 2.5};
1700  }
1701 
1713 #define SYSMACRO(name, fullcorrelated, decorrelation, flagup, flagdown) \
1714  if (bool(fullcorrelated)) { \
1715  m_syst_description[CP::SystematicVariation(#name, +1)] = \
1716  SysInfo{always, flagup}; \
1717  m_syst_description[CP::SystematicVariation(#name, -1)] = \
1718  SysInfo{always, flagdown}; \
1719  } else { \
1720  int i = 0; \
1721  for (const auto& p : AbsEtaCaloPredicatesFactory(decorrelation)) { \
1722  m_syst_description[CP::SystematicVariation( \
1723  #name "__ETABIN" + std::to_string(i), +1)] = SysInfo{p, flagup}; \
1724  m_syst_description[CP::SystematicVariation( \
1725  #name "__ETABIN" + std::to_string(i), -1)] = SysInfo{p, flagdown}; \
1726  i += 1; \
1727  } \
1728  }
1729 #include "ElectronPhotonFourMomentumCorrection/systematics.def"
1730 #undef SYSMACRO
1733 #define SYSMACRO(name, fullcorrelated, decorrelation, flagup, flagdown) \
1734  if (bool(fullcorrelated)) { \
1735  m_syst_description[CP::SystematicVariation(#name, +1)] = \
1736  SysInfo{always, flagup}; \
1737  m_syst_description[CP::SystematicVariation(#name, -1)] = \
1738  SysInfo{always, flagdown}; \
1739  } else { \
1740  int i = 0; \
1741  for (const auto& p : AbsEtaCaloPredicatesFactory(decorrelation)) { \
1742  m_syst_description[CP::SystematicVariation( \
1743  #name "__ETABIN" + std::to_string(i), +1)] = SysInfo{p, flagup}; \
1744  m_syst_description[CP::SystematicVariation( \
1745  #name "__ETABIN" + std::to_string(i), -1)] = SysInfo{p, flagdown}; \
1746  i += 1; \
1747  } \
1748  }
1749 #include "ElectronPhotonFourMomentumCorrection/systematics_S12_2022.def"
1750 #undef SYSMACRO
1751  } else if (m_TESModel == egEnergyCorr::es2024_Run3_v0) {
1752 #define SYSMACRO(name, fullcorrelated, decorrelation, flagup, flagdown) \
1753  if (bool(fullcorrelated)) { \
1754  m_syst_description[CP::SystematicVariation(#name, +1)] = \
1755  SysInfo{always, flagup}; \
1756  m_syst_description[CP::SystematicVariation(#name, -1)] = \
1757  SysInfo{always, flagdown}; \
1758  } else { \
1759  int i = 0; \
1760  for (const auto& p : AbsEtaCaloPredicatesFactory(decorrelation)) { \
1761  m_syst_description[CP::SystematicVariation( \
1762  #name "__ETABIN" + std::to_string(i), +1)] = SysInfo{p, flagup}; \
1763  m_syst_description[CP::SystematicVariation( \
1764  #name "__ETABIN" + std::to_string(i), -1)] = SysInfo{p, flagdown}; \
1765  i += 1; \
1766  } \
1767  }
1768 #include "ElectronPhotonFourMomentumCorrection/systematics_es2024_Run3_v0.def"
1769 #undef SYSMACRO
1770  } else {
1771 #define SYSMACRO(name, fullcorrelated, decorrelation, flagup, flagdown) \
1772  if (bool(fullcorrelated)) { \
1773  m_syst_description[CP::SystematicVariation(#name, +1)] = \
1774  SysInfo{always, flagup}; \
1775  m_syst_description[CP::SystematicVariation(#name, -1)] = \
1776  SysInfo{always, flagdown}; \
1777  } else { \
1778  int i = 0; \
1779  for (const auto& p : AbsEtaCaloPredicatesFactory(decorrelation)) { \
1780  m_syst_description[CP::SystematicVariation( \
1781  #name "__ETABIN" + std::to_string(i), +1)] = SysInfo{p, flagup}; \
1782  m_syst_description[CP::SystematicVariation( \
1783  #name "__ETABIN" + std::to_string(i), -1)] = SysInfo{p, flagdown}; \
1784  i += 1; \
1785  } \
1786  }
1787 #include "ElectronPhotonFourMomentumCorrection/systematics_S12.def"
1788 #undef SYSMACRO
1789  } // else
1790 
1792  // statistical error, decorrelate in *all* the bins
1793  int i = 0;
1794  const TAxis& axis_statistical_error(m_rootTool->get_ZeeStat_eta_axis());
1795  for (int ibin = 1; ibin <= axis_statistical_error.GetNbins(); ++ibin) {
1796  auto p = EtaCaloPredicateFactory(
1797  axis_statistical_error.GetBinLowEdge(ibin),
1798  axis_statistical_error.GetBinLowEdge(ibin + 1));
1800  "EG_SCALE_ZEESTAT__ETABIN" + std::to_string(i), +1)] =
1803  "EG_SCALE_ZEESTAT__ETABIN" + std::to_string(i), -1)] =
1805  ++i;
1806  }
1807  }
1808 
1809  // additional systematics for S12 run2
1820  "EG_SCALE_LARCALIB_EXTRA2015PRE__ETABIN0", +1)] =
1821  SysInfo{AbsEtaCaloPredicateFactory({0, 1.45}),
1824  "EG_SCALE_LARCALIB_EXTRA2015PRE__ETABIN0", -1)] =
1825  SysInfo{AbsEtaCaloPredicateFactory({0, 1.45}),
1828  "EG_SCALE_LARCALIB_EXTRA2015PRE__ETABIN1", +1)] =
1829  SysInfo{AbsEtaCaloPredicateFactory({1.45, 2.47}),
1832  "EG_SCALE_LARCALIB_EXTRA2015PRE__ETABIN1", -1)] =
1833  SysInfo{AbsEtaCaloPredicateFactory({1.45, 2.47}),
1836  "EG_SCALE_LARCALIB_EXTRA2015PRE__ETABIN2", +1)] =
1837  SysInfo{AbsEtaCaloPredicateFactory({2.47, 3.2}),
1840  "EG_SCALE_LARCALIB_EXTRA2015PRE__ETABIN2", -1)] =
1841  SysInfo{AbsEtaCaloPredicateFactory({2.47, 3.2}),
1843  }
1844 
1845  // additional systematics for temperature run1->run2
1852  "EG_SCALE_LARTEMPERATURE_EXTRA2015PRE__ETABIN0", +1)] =
1853  SysInfo{AbsEtaCaloPredicateFactory(decorrelation_bins_BE[0]),
1856  "EG_SCALE_LARTEMPERATURE_EXTRA2015PRE__ETABIN0", -1)] =
1857  SysInfo{AbsEtaCaloPredicateFactory(decorrelation_bins_BE[0]),
1860  "EG_SCALE_LARTEMPERATURE_EXTRA2015PRE__ETABIN1", +1)] =
1861  SysInfo{AbsEtaCaloPredicateFactory(decorrelation_bins_BE[1]),
1864  "EG_SCALE_LARTEMPERATURE_EXTRA2015PRE__ETABIN1", -1)] =
1865  SysInfo{AbsEtaCaloPredicateFactory(decorrelation_bins_BE[1]),
1867  }
1868 
1869  // additional systematic for temperature 2015->2016
1872  "EG_SCALE_LARTEMPERATURE_EXTRA2016PRE__ETABIN0", +1)] =
1873  SysInfo{AbsEtaCaloPredicateFactory(decorrelation_bins_BE[0]),
1876  "EG_SCALE_LARTEMPERATURE_EXTRA2016PRE__ETABIN1", +1)] =
1877  SysInfo{AbsEtaCaloPredicateFactory(decorrelation_bins_BE[1]),
1880  "EG_SCALE_LARTEMPERATURE_EXTRA2016PRE__ETABIN0", -1)] =
1881  SysInfo{AbsEtaCaloPredicateFactory(decorrelation_bins_BE[0]),
1884  "EG_SCALE_LARTEMPERATURE_EXTRA2016PRE__ETABIN1", -1)] =
1885  SysInfo{AbsEtaCaloPredicateFactory(decorrelation_bins_BE[1]),
1887  }
1888 
1889  // additional systematic for PP0 region
1905  m_syst_description[CP::SystematicVariation("EG_SCALE_MATPP0__ETABIN0",
1906  +1)] = SysInfo{
1908  m_syst_description[CP::SystematicVariation("EG_SCALE_MATPP0__ETABIN1",
1909  +1)] = SysInfo{
1911  m_syst_description[CP::SystematicVariation("EG_SCALE_MATPP0__ETABIN0",
1912  -1)] = SysInfo{
1914  m_syst_description[CP::SystematicVariation("EG_SCALE_MATPP0__ETABIN1",
1915  -1)] =
1916  SysInfo{AbsEtaCaloPredicateFactory(1.5, 2.5),
1918  }
1919 
1920  // systematic related to wtots1
1933  m_syst_description[CP::SystematicVariation("EG_SCALE_WTOTS1", +1)] =
1934  SysInfo{always, egEnergyCorr::Scale::Wtots1Up};
1935  m_syst_description[CP::SystematicVariation("EG_SCALE_WTOTS1", -1)] =
1936  SysInfo{always, egEnergyCorr::Scale::Wtots1Down};
1937  }
1938 
1939  // systematic related to wtots1, decorrelate eta bin [1.52,1.82] from rest
1943  m_syst_description[CP::SystematicVariation("EG_SCALE_WTOTS1__ETABIN0",
1944  +1)] =
1945  SysInfo{DoubleOrAbsEtaCaloPredicate(0, 1.52, 1.82, 2.47),
1947  m_syst_description[CP::SystematicVariation("EG_SCALE_WTOTS1__ETABIN0",
1948  -1)] =
1949  SysInfo{DoubleOrAbsEtaCaloPredicate(0, 1.52, 1.82, 2.47),
1951  m_syst_description[CP::SystematicVariation("EG_SCALE_WTOTS1__ETABIN1",
1952  +1)] =
1953  SysInfo{AbsEtaCaloPredicateFactory({1.52, 1.82}),
1955  m_syst_description[CP::SystematicVariation("EG_SCALE_WTOTS1__ETABIN1",
1956  -1)] =
1957  SysInfo{AbsEtaCaloPredicateFactory({1.52, 1.82}),
1959  }
1960 
1961  // systematic for the scintillators
1981  "EG_SCALE_E4SCINTILLATOR__ETABIN0", +1)] =
1982  SysInfo{AbsEtaCaloPredicateFactory(1.4, 1.46),
1985  "EG_SCALE_E4SCINTILLATOR__ETABIN1", +1)] =
1986  SysInfo{AbsEtaCaloPredicateFactory(1.46, 1.52),
1989  "EG_SCALE_E4SCINTILLATOR__ETABIN2", +1)] =
1990  SysInfo{AbsEtaCaloPredicateFactory(1.52, 1.6),
1993  "EG_SCALE_E4SCINTILLATOR__ETABIN0", -1)] =
1994  SysInfo{AbsEtaCaloPredicateFactory(1.4, 1.46),
1997  "EG_SCALE_E4SCINTILLATOR__ETABIN1", -1)] =
1998  SysInfo{AbsEtaCaloPredicateFactory(1.46, 1.52),
2001  "EG_SCALE_E4SCINTILLATOR__ETABIN2", -1)] =
2002  SysInfo{AbsEtaCaloPredicateFactory(1.52, 1.6),
2004  if (m_TESModel == egEnergyCorr::es2024_Run3_v0) { // extended E4 in Run 3
2006  "EG_SCALE_E4SCINTILLATOR__ETABIN3", +1)] =
2007  SysInfo{AbsEtaCaloPredicateFactory(1.6, 1.72),
2010  "EG_SCALE_E4SCINTILLATOR__ETABIN3", -1)] =
2011  SysInfo{AbsEtaCaloPredicateFactory(1.6, 1.72),
2013  }
2014  }
2015  } else {
2016  ATH_MSG_FATAL("scale decorrelation model invalid");
2017  }
2018 
2019  // resolution systematics
2021  // ALL will not include AF2/AF3 systematic
2022  // individual AF NP is always provided
2023  // linghua.guo@cern.ch 2025-04-23
2025  "EG_RESOLUTION_ALL", +1)] = egEnergyCorr::Resolution::AllUp;
2027  "EG_RESOLUTION_ALL", -1)] = egEnergyCorr::Resolution::AllDown;
2028  } else if (m_decorrelation_model_resolution ==
2031  "EG_RESOLUTION_ZSMEARING", +1)] = egEnergyCorr::Resolution::ZSmearingUp;
2033  "EG_RESOLUTION_ZSMEARING", -1)] =
2036  "EG_RESOLUTION_SAMPLINGTERM", +1)] =
2039  "EG_RESOLUTION_SAMPLINGTERM", -1)] =
2042  "EG_RESOLUTION_MATERIALID", +1)] =
2045  "EG_RESOLUTION_MATERIALID", -1)] =
2048  "EG_RESOLUTION_MATERIALCALO", +1)] =
2051  "EG_RESOLUTION_MATERIALCALO", -1)] =
2054  "EG_RESOLUTION_MATERIALGAP", +1)] =
2057  "EG_RESOLUTION_MATERIALGAP", -1)] =
2060  "EG_RESOLUTION_MATERIALCRYO", +1)] =
2063  "EG_RESOLUTION_MATERIALCRYO", -1)] =
2066  "EG_RESOLUTION_PILEUP", +1)] = egEnergyCorr::Resolution::PileUpUp;
2068  "EG_RESOLUTION_PILEUP", -1)] = egEnergyCorr::Resolution::PileUpDown;
2085  "EG_RESOLUTION_MATERIALIBL", +1)] =
2088  "EG_RESOLUTION_MATERIALIBL", -1)] =
2091  "EG_RESOLUTION_MATERIALPP0", +1)] =
2094  "EG_RESOLUTION_MATERIALPP0", -1)] =
2096 
2097  if (m_TESModel == egEnergyCorr::es2022_R22_PRE) { // exta sys. for Run-3
2098  // pre-recommendations
2100  "EG_RESOLUTION_OFC", +1)] = egEnergyCorr::Resolution::OFCUp;
2102  "EG_RESOLUTION_OFC", -1)] = egEnergyCorr::Resolution::OFCDown;
2103  }
2104  }
2105  } else {
2106  ATH_MSG_FATAL("resolution decorrelation model invalid");
2107  }
2108 
2109  // Always use individual AF2/AF3 systematics for resolution
2115  "EG_RESOLUTION_AF2", +1)] = egEnergyCorr::Resolution::afUp;
2117  "EG_RESOLUTION_AF2", -1)] = egEnergyCorr::Resolution::afDown;
2118  }
2121  "EG_RESOLUTION_AF3", +1)] = egEnergyCorr::Resolution::afUp;
2123  "EG_RESOLUTION_AF3", -1)] = egEnergyCorr::Resolution::afDown;
2124  }
2125 
2126  // ep combination systematics
2127  if (m_use_ep_combination) {
2128  m_syst_description[CP::SystematicVariation("EL_SCALE_MOMENTUM", +1)] =
2129  SysInfo{always, egEnergyCorr::Scale::MomentumUp};
2130  m_syst_description[CP::SystematicVariation("EL_SCALE_MOMENTUM", -1)] =
2131  SysInfo{always, egEnergyCorr::Scale::MomentumDown};
2132  }
2133 }

◆ setUseIncidents()

void asg::AsgMetadataTool::setUseIncidents ( const bool  flag)
inlineprotectedinherited

Definition at line 132 of file AsgMetadataTool.h.

133  {
135  }

◆ sysInitialize()

StatusCode asg::AsgMetadataTool::sysInitialize ( )
virtualinherited

Function initialising the tool in the correct way in Athena.

This function is used to set up the callbacks from IncidentSvc in Athena at the right time during initialisation, without the user having to do anything special in his/her code.

Reimplemented from AthCommonDataStore< AthCommonMsg< AlgTool > >.

Definition at line 115 of file AsgMetadataTool.cxx.

115  {
116 
117 #ifndef XAOD_STANDALONE
118  if (m_useIncidents) {
119  // Connect to the IncidentSvc:
120  ServiceHandle< IIncidentSvc > incSvc( "IncidentSvc", name() );
121  ATH_CHECK( incSvc.retrieve() );
122 
123  // Set up the right callbacks: don't rethrow exceptions, any failure and we should end
124  incSvc->addListener( this, IncidentType::BeginEvent, 0, false );
125  }
126  // Let the base class do its thing:
127  ATH_CHECK( AlgTool::sysInitialize() );
128 
129 #endif // not XAOD_STANDALONE
130 
131  // Return gracefully:
132  return StatusCode::SUCCESS;
133  }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

◆ xAOD2ptype()

PATCore::ParticleType::Type CP::EgammaCalibrationAndSmearingTool::xAOD2ptype ( columnar::EgammaId  particle) const
private

Definition at line 874 of file EgammaCalibrationAndSmearingTool.cxx.

875 {
876  const Accessors& acc = *m_accessors;
877 
878  // this is departing from the logic below, as we are now requiring the
879  // user to specify at configuration time whether we run on electrons
880  // or photons. this is necessary to configure the columns we need
881  // correctly.
882  if (m_onlyElectrons.value())
883  {
885  }
886  if (m_onlyPhotons.value())
887  {
888  if (acc.photonVertexAcc(particle).size() > 0)
889  {
891  }
892  else
893  {
895  }
896  }
897 
898  // this is the old logic and should not be visited in columnar mode
899  // (disabled by turning on onlyElectrons or onlyPhotons)
900  auto ptype = PATCore::ParticleType::Electron;
901  //no ForwardElectron ptype: consider them as Electron
903  else if (xAOD::EgammaHelpers::isPhoton(&particle.getXAODObject())) {
906  }
907  else {
908  ATH_MSG_ERROR("particle is not electron of photon");
909  throw std::runtime_error("particle is not electron or photon");
910  }
911  return ptype;
912 }

Member Data Documentation

◆ AUTO

const int CP::EgammaCalibrationAndSmearingTool::AUTO = 2
staticprivate

Definition at line 198 of file EgammaCalibrationAndSmearingTool.h.

◆ m_accessors

std::unique_ptr<Accessors> CP::EgammaCalibrationAndSmearingTool::m_accessors

Definition at line 487 of file EgammaCalibrationAndSmearingTool.h.

◆ m_ADCLinearity_tool

std::shared_ptr<LinearityADC> CP::EgammaCalibrationAndSmearingTool::m_ADCLinearity_tool
private

Definition at line 416 of file EgammaCalibrationAndSmearingTool.h.

◆ m_beginInputFileCalled

bool asg::AsgMetadataTool::m_beginInputFileCalled
privateinherited

Flag helping to discover when the tool misses the opening of the first input file.

Definition at line 126 of file AsgMetadataTool.h.

◆ m_caloDistPhiUnifCorr

std::unique_ptr<TH2> CP::EgammaCalibrationAndSmearingTool::m_caloDistPhiUnifCorr
private

Definition at line 290 of file EgammaCalibrationAndSmearingTool.h.

◆ m_currentResolutionVariation_data

egEnergyCorr::Resolution::Variation CP::EgammaCalibrationAndSmearingTool::m_currentResolutionVariation_data
private

Definition at line 438 of file EgammaCalibrationAndSmearingTool.h.

◆ m_currentResolutionVariation_MC

egEnergyCorr::Resolution::Variation CP::EgammaCalibrationAndSmearingTool::m_currentResolutionVariation_MC
private

Definition at line 437 of file EgammaCalibrationAndSmearingTool.h.

◆ m_currentScalePredicate

EgammaPredicate CP::EgammaCalibrationAndSmearingTool::m_currentScalePredicate
private

Definition at line 440 of file EgammaCalibrationAndSmearingTool.h.

◆ m_currentScaleVariation_data

egEnergyCorr::Scale::Variation CP::EgammaCalibrationAndSmearingTool::m_currentScaleVariation_data
private

Definition at line 436 of file EgammaCalibrationAndSmearingTool.h.

◆ m_currentScaleVariation_MC

egEnergyCorr::Scale::Variation CP::EgammaCalibrationAndSmearingTool::m_currentScaleVariation_MC
private

Definition at line 435 of file EgammaCalibrationAndSmearingTool.h.

◆ m_decorateEmva

bool CP::EgammaCalibrationAndSmearingTool::m_decorateEmva
private

Definition at line 286 of file EgammaCalibrationAndSmearingTool.h.

◆ m_decorrelation_model_name

std::string CP::EgammaCalibrationAndSmearingTool::m_decorrelation_model_name
private

Definition at line 251 of file EgammaCalibrationAndSmearingTool.h.

◆ m_decorrelation_model_resolution

ResolutionDecorrelation CP::EgammaCalibrationAndSmearingTool::m_decorrelation_model_resolution
private
Initial value:

Definition at line 255 of file EgammaCalibrationAndSmearingTool.h.

◆ m_decorrelation_model_resolution_name

std::string CP::EgammaCalibrationAndSmearingTool::m_decorrelation_model_resolution_name
private

Definition at line 253 of file EgammaCalibrationAndSmearingTool.h.

◆ m_decorrelation_model_scale

ScaleDecorrelation CP::EgammaCalibrationAndSmearingTool::m_decorrelation_model_scale = ScaleDecorrelation::FULL
private

Definition at line 254 of file EgammaCalibrationAndSmearingTool.h.

◆ m_decorrelation_model_scale_name

std::string CP::EgammaCalibrationAndSmearingTool::m_decorrelation_model_scale_name
private

Definition at line 252 of file EgammaCalibrationAndSmearingTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doADCLinearityCorrection

int CP::EgammaCalibrationAndSmearingTool::m_doADCLinearityCorrection
private

Definition at line 272 of file EgammaCalibrationAndSmearingTool.h.

◆ m_doFwdCalib

Gaudi::Property<bool> CP::EgammaCalibrationAndSmearingTool::m_doFwdCalib
private
Initial value:
{
this, "DoFwdElectronCalibration", false,
"MVA calibration of the forward electron"}

Definition at line 296 of file EgammaCalibrationAndSmearingTool.h.

◆ m_doLeakageCorrection

int CP::EgammaCalibrationAndSmearingTool::m_doLeakageCorrection
private

Definition at line 273 of file EgammaCalibrationAndSmearingTool.h.

◆ m_doScaleCorrection

int CP::EgammaCalibrationAndSmearingTool::m_doScaleCorrection
private

Definition at line 258 of file EgammaCalibrationAndSmearingTool.h.

◆ m_doSmearing

int CP::EgammaCalibrationAndSmearingTool::m_doSmearing
private

Definition at line 259 of file EgammaCalibrationAndSmearingTool.h.

◆ m_ESModel

std::string CP::EgammaCalibrationAndSmearingTool::m_ESModel
private

Definition at line 250 of file EgammaCalibrationAndSmearingTool.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_fixForMissingCells

Gaudi::Property<bool> CP::EgammaCalibrationAndSmearingTool::m_fixForMissingCells
private
Initial value:
{
this, "FixForMissingCells", true,
"AOD fix for cell recovery in core egamma cluster"}

Definition at line 292 of file EgammaCalibrationAndSmearingTool.h.

◆ m_gain_tool

egGain::GainTool* CP::EgammaCalibrationAndSmearingTool::m_gain_tool = nullptr
private

Definition at line 417 of file EgammaCalibrationAndSmearingTool.h.

◆ m_gain_tool_run2

std::unique_ptr<egGain::GainUncertainty> CP::EgammaCalibrationAndSmearingTool::m_gain_tool_run2
private

Definition at line 415 of file EgammaCalibrationAndSmearingTool.h.

◆ m_inputMetaStore

MetaStore_t asg::AsgMetadataTool::m_inputMetaStore
privateinherited

Object accessing the input metadata store.

Definition at line 119 of file AsgMetadataTool.h.

◆ m_layer_recalibration_tool

egammaLayerRecalibTool* CP::EgammaCalibrationAndSmearingTool::m_layer_recalibration_tool = nullptr
private

Definition at line 418 of file EgammaCalibrationAndSmearingTool.h.

◆ m_layer_recalibration_tune

std::string CP::EgammaCalibrationAndSmearingTool::m_layer_recalibration_tune
private

Definition at line 419 of file EgammaCalibrationAndSmearingTool.h.

◆ m_MVACalibSvc

ServiceHandle<IegammaMVASvc> CP::EgammaCalibrationAndSmearingTool::m_MVACalibSvc
private
Initial value:
{this, "MVACalibSvc", "",
"calibration service"}

Definition at line 413 of file EgammaCalibrationAndSmearingTool.h.

◆ m_MVAfolder

std::string CP::EgammaCalibrationAndSmearingTool::m_MVAfolder
private

Definition at line 423 of file EgammaCalibrationAndSmearingTool.h.

◆ m_onlyElectrons

Gaudi::Property<bool> CP::EgammaCalibrationAndSmearingTool::m_onlyElectrons {this, "onlyElectrons", false, "the tool will only be applied to electrons"}

Definition at line 451 of file EgammaCalibrationAndSmearingTool.h.

◆ m_onlyPhotons

Gaudi::Property<bool> CP::EgammaCalibrationAndSmearingTool::m_onlyPhotons {this, "onlyPhotons", false, "the tool will only be applied to photons"}

Definition at line 452 of file EgammaCalibrationAndSmearingTool.h.

◆ m_outputMetaStore

MetaStore_t asg::AsgMetadataTool::m_outputMetaStore
privateinherited

Object accessing the output metadata store.

Definition at line 121 of file AsgMetadataTool.h.

◆ m_pVtxKey

Gaudi::Property<std::string> CP::EgammaCalibrationAndSmearingTool::m_pVtxKey
private
Initial value:
{
this, "PrimaryVerticesKey", "PrimaryVertices",
"Name of the primary vertex container"}

Definition at line 300 of file EgammaCalibrationAndSmearingTool.h.

◆ m_ResolutionType

std::string CP::EgammaCalibrationAndSmearingTool::m_ResolutionType
private

Definition at line 261 of file EgammaCalibrationAndSmearingTool.h.

◆ m_rootTool

std::unique_ptr<AtlasRoot::egammaEnergyCorrectionTool> CP::EgammaCalibrationAndSmearingTool::m_rootTool
private

Definition at line 422 of file EgammaCalibrationAndSmearingTool.h.

◆ m_Run2Run3runNumberTransition

const unsigned int CP::EgammaCalibrationAndSmearingTool::m_Run2Run3runNumberTransition = 400000
staticprivate

Definition at line 248 of file EgammaCalibrationAndSmearingTool.h.

◆ m_set_seed_function

IdFunction CP::EgammaCalibrationAndSmearingTool::m_set_seed_function
private

Definition at line 442 of file EgammaCalibrationAndSmearingTool.h.

◆ m_simulation

PATCore::ParticleDataType::DataType CP::EgammaCalibrationAndSmearingTool::m_simulation
private
Initial value:

Definition at line 265 of file EgammaCalibrationAndSmearingTool.h.

◆ m_syst_description

std::map<CP::SystematicVariation, SysInfo> CP::EgammaCalibrationAndSmearingTool::m_syst_description
private

Definition at line 430 of file EgammaCalibrationAndSmearingTool.h.

◆ m_syst_description_resolution

std::map<CP::SystematicVariation, egEnergyCorr::Resolution::Variation> CP::EgammaCalibrationAndSmearingTool::m_syst_description_resolution
private

Definition at line 432 of file EgammaCalibrationAndSmearingTool.h.

◆ m_TESModel

egEnergyCorr::ESModel CP::EgammaCalibrationAndSmearingTool::m_TESModel
private

Definition at line 257 of file EgammaCalibrationAndSmearingTool.h.

◆ m_TResolutionType

egEnergyCorr::Resolution::resolutionType CP::EgammaCalibrationAndSmearingTool::m_TResolutionType
private

Definition at line 262 of file EgammaCalibrationAndSmearingTool.h.

◆ m_use_AFII

int CP::EgammaCalibrationAndSmearingTool::m_use_AFII
private

Definition at line 264 of file EgammaCalibrationAndSmearingTool.h.

◆ m_use_ep_combination

bool CP::EgammaCalibrationAndSmearingTool::m_use_ep_combination
private

Definition at line 274 of file EgammaCalibrationAndSmearingTool.h.

◆ m_use_full_statistical_error

bool CP::EgammaCalibrationAndSmearingTool::m_use_full_statistical_error
private

Definition at line 276 of file EgammaCalibrationAndSmearingTool.h.

◆ m_use_mapping_correction

bool CP::EgammaCalibrationAndSmearingTool::m_use_mapping_correction
private

Definition at line 279 of file EgammaCalibrationAndSmearingTool.h.

◆ m_use_mva_calibration

int CP::EgammaCalibrationAndSmearingTool::m_use_mva_calibration
private

Definition at line 275 of file EgammaCalibrationAndSmearingTool.h.

◆ m_use_temp_correction201215

int CP::EgammaCalibrationAndSmearingTool::m_use_temp_correction201215
private

Definition at line 277 of file EgammaCalibrationAndSmearingTool.h.

◆ m_use_uA2MeV_2015_first2weeks_correction

int CP::EgammaCalibrationAndSmearingTool::m_use_uA2MeV_2015_first2weeks_correction
private

Definition at line 278 of file EgammaCalibrationAndSmearingTool.h.

◆ m_useCaloDistPhiUnifCorrection

int CP::EgammaCalibrationAndSmearingTool::m_useCaloDistPhiUnifCorrection
private

Definition at line 270 of file EgammaCalibrationAndSmearingTool.h.

◆ m_useFastSim

int CP::EgammaCalibrationAndSmearingTool::m_useFastSim
private

Definition at line 263 of file EgammaCalibrationAndSmearingTool.h.

◆ m_useGainCorrection

int CP::EgammaCalibrationAndSmearingTool::m_useGainCorrection
private

Definition at line 271 of file EgammaCalibrationAndSmearingTool.h.

◆ m_useGainInterpolation

int CP::EgammaCalibrationAndSmearingTool::m_useGainInterpolation
private

Definition at line 281 of file EgammaCalibrationAndSmearingTool.h.

◆ m_useIncidents

bool asg::AsgMetadataTool::m_useIncidents
privateinherited

Definition at line 128 of file AsgMetadataTool.h.

◆ m_useIntermoduleCorrection

int CP::EgammaCalibrationAndSmearingTool::m_useIntermoduleCorrection
private

Definition at line 268 of file EgammaCalibrationAndSmearingTool.h.

◆ m_useLayerCorrection

int CP::EgammaCalibrationAndSmearingTool::m_useLayerCorrection
private

Definition at line 282 of file EgammaCalibrationAndSmearingTool.h.

◆ m_usePhiUniformCorrection

int CP::EgammaCalibrationAndSmearingTool::m_usePhiUniformCorrection
private

Definition at line 269 of file EgammaCalibrationAndSmearingTool.h.

◆ m_usePSCorrection

int CP::EgammaCalibrationAndSmearingTool::m_usePSCorrection
private

Definition at line 283 of file EgammaCalibrationAndSmearingTool.h.

◆ m_user_random_run_number

int CP::EgammaCalibrationAndSmearingTool::m_user_random_run_number
private

Definition at line 280 of file EgammaCalibrationAndSmearingTool.h.

◆ m_useS12Correction

int CP::EgammaCalibrationAndSmearingTool::m_useS12Correction
private

Definition at line 284 of file EgammaCalibrationAndSmearingTool.h.

◆ m_useSaccCorrection

int CP::EgammaCalibrationAndSmearingTool::m_useSaccCorrection
private

Definition at line 285 of file EgammaCalibrationAndSmearingTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_varSF

double CP::EgammaCalibrationAndSmearingTool::m_varSF
private

Definition at line 260 of file EgammaCalibrationAndSmearingTool.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
CP::EgammaCalibrationAndSmearingTool::m_useFastSim
int m_useFastSim
Definition: EgammaCalibrationAndSmearingTool.h:263
xAOD::TrackParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TrackParticle_v1.cxx:75
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
CP::EgammaCalibrationAndSmearingTool::EgammaPredicate
std::function< bool(const EgammaCalibrationAndSmearingTool &, columnar::EgammaId)> EgammaPredicate
Definition: EgammaCalibrationAndSmearingTool.h:204
egEnergyCorr::Resolution::MaterialPP0Up
@ MaterialPP0Up
Definition: egammaEnergyCorrectionTool.h:93
egEnergyCorr::es2024_Run3_v0
@ es2024_Run3_v0
Definition: egammaEnergyCorrectionTool.h:343
egEnergyCorr::Scale::OFCDown
@ OFCDown
Definition: egammaEnergyCorrectionTool.h:266
CP::EgammaCalibrationAndSmearingTool::m_doADCLinearityCorrection
int m_doADCLinearityCorrection
Definition: EgammaCalibrationAndSmearingTool.h:272
PATCore::ParticleType::UnconvertedPhoton
@ UnconvertedPhoton
Definition: PATCoreEnums.h:38
CP::EgammaCalibrationAndSmearingTool::oldtool_resolution_flag_this_event
egEnergyCorr::Resolution::Variation oldtool_resolution_flag_this_event(columnar::EgammaId p, columnar::EventInfoId event_info) const
Definition: EgammaCalibrationAndSmearingTool.cxx:1257
et
Extra patterns decribing particle interation process.
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:299
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:79
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
asg::AsgMetadataTool::beginEvent
virtual StatusCode beginEvent()
Function called when a new events is loaded.
Definition: AsgMetadataTool.cxx:201
get_generator_info.result
result
Definition: get_generator_info.py:21
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:407
egEnergyCorr::es2011d
@ es2011d
Definition: egammaEnergyCorrectionTool.h:301
CP::EgammaCalibrationAndSmearingTool::affectingSystematics
virtual CP::SystematicSet affectingSystematics() const override
the list of all systematics this tool can be affected by
Definition: EgammaCalibrationAndSmearingTool.cxx:1289
egEnergyCorr::Scale::OFCUp
@ OFCUp
Definition: egammaEnergyCorrectionTool.h:265
CP::EgammaCalibrationAndSmearingTool::m_ResolutionType
std::string m_ResolutionType
Definition: EgammaCalibrationAndSmearingTool.h:261
egammaMVACalib::GlobalEventInfo::nPV
int nPV
Definition: GlobalEventInfo.h:10
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
vtune_athena.format
format
Definition: vtune_athena.py:14
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
CP::EgammaCalibrationAndSmearingTool::EgammaCalibrationAndSmearingTool
EgammaCalibrationAndSmearingTool(const std::string &name)
Definition: EgammaCalibrationAndSmearingTool.cxx:288
correlationModel::FULL
@ FULL
Definition: AsgElectronEfficiencyCorrectionTool.cxx:49
egEnergyCorr::Scale::afUp
@ afUp
Definition: egammaEnergyCorrectionTool.h:245
egEnergyCorr::Scale::LArTemperature2016PreUp
@ LArTemperature2016PreUp
Definition: egammaEnergyCorrectionTool.h:171
CP::EgammaCalibrationAndSmearingTool::m_use_ep_combination
bool m_use_ep_combination
Definition: EgammaCalibrationAndSmearingTool.h:274
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
egammaMVACalib::GlobalEventInfo::acmu
float acmu
Definition: GlobalEventInfo.h:11
CP::EgammaCalibrationAndSmearingTool::m_caloDistPhiUnifCorr
std::unique_ptr< TH2 > m_caloDistPhiUnifCorr
Definition: EgammaCalibrationAndSmearingTool.h:290
egEnergyCorr::Scale::ConvFakeRateDown
@ ConvFakeRateDown
Definition: egammaEnergyCorrectionTool.h:255
egEnergyCorr::Resolution::ZSmearingUp
@ ZSmearingUp
Definition: egammaEnergyCorrectionTool.h:70
egEnergyCorr::Scale::AllDown
@ AllDown
Definition: egammaEnergyCorrectionTool.h:283
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:79
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
CP::EgammaCalibrationAndSmearingTool::m_currentScaleVariation_data
egEnergyCorr::Scale::Variation m_currentScaleVariation_data
Definition: EgammaCalibrationAndSmearingTool.h:436
egEnergyCorr::es2017_R21_v1
@ es2017_R21_v1
Definition: egammaEnergyCorrectionTool.h:330
egEnergyCorr::Scale::LeakageElecUp
@ LeakageElecUp
Definition: egammaEnergyCorrectionTool.h:197
CP::EgammaCalibrationAndSmearingTool::m_useSaccCorrection
int m_useSaccCorrection
Definition: EgammaCalibrationAndSmearingTool.h:285
TRT::Track::event
@ event
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:74
CP::EgammaCalibrationAndSmearingTool::ResolutionDecorrelation::ONENP
@ ONENP
CP::EgammaCalibrationAndSmearingTool::correctedCopy
virtual CP::CorrectionCode correctedCopy(const xAOD::Electron &, xAOD::Electron *&) const override
Definition: EgammaCalibrationAndSmearingTool.cxx:943
CP::EgammaCalibrationAndSmearingTool::m_decorrelation_model_name
std::string m_decorrelation_model_name
Definition: EgammaCalibrationAndSmearingTool.h:251
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:196
egEnergyCorr::es2015PRE_res_improved
@ es2015PRE_res_improved
Definition: egammaEnergyCorrectionTool.h:314
CP::EgammaCalibrationAndSmearingTool::m_currentScalePredicate
EgammaPredicate m_currentScalePredicate
Definition: EgammaCalibrationAndSmearingTool.h:440
CP::SystematicSet
Class to wrap a set of SystematicVariations.
Definition: SystematicSet.h:31
M_PI
#define M_PI
Definition: ActiveFraction.h:11
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
egEnergyCorr::Scale::Nominal
@ Nominal
Definition: egammaEnergyCorrectionTool.h:132
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
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:417
CP::EgammaCalibrationAndSmearingTool::m_doScaleCorrection
int m_doScaleCorrection
Definition: EgammaCalibrationAndSmearingTool.h:258
egEnergyCorr::Scale::EXTRARUN3PREDown
@ EXTRARUN3PREDown
Definition: egammaEnergyCorrectionTool.h:270
egEnergyCorr::Scale::L2LowGainDown
@ L2LowGainDown
Definition: egammaEnergyCorrectionTool.h:230
CP::EgammaCalibrationAndSmearingTool::m_doLeakageCorrection
int m_doLeakageCorrection
Definition: EgammaCalibrationAndSmearingTool.h:273
athena.value
value
Definition: athena.py:124
egEnergyCorr::Scale::ZeeStatUp
@ ZeeStatUp
Definition: egammaEnergyCorrectionTool.h:144
PI
const float PI
Definition: test_isolaitonTool.cxx:61
CP::EgammaCalibrationAndSmearingTool::m_simulation
PATCore::ParticleDataType::DataType m_simulation
Definition: EgammaCalibrationAndSmearingTool.h:265
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
CP::egammaMVAToolFolder
std::string egammaMVAToolFolder(egEnergyCorr::ESModel model)
Definition: EgammaCalibrationAndSmearingTool.cxx:86
egammaLayerRecalibTool::disable_S12Corrections
void disable_S12Corrections()
Definition: egammaLayerRecalibTool.h:325
asg::AsgMetadataTool::m_beginInputFileCalled
bool m_beginInputFileCalled
Flag helping to discover when the tool misses the opening of the first input file.
Definition: AsgMetadataTool.h:126
egammaLayerRecalibTool::applyCorrection
CP::CorrectionCode applyCorrection(xAOD::Egamma &, const xAOD::EventInfo &event_info) const
Definition: egammaLayerRecalibTool.cxx:1010
asg::AsgMetadataTool::endInputFile
virtual StatusCode endInputFile()
Function called when the currently open input file got completely processed.
Definition: AsgMetadataTool.cxx:193
egEnergyCorr::Resolution::afDown
@ afDown
Definition: egammaEnergyCorrectionTool.h:98
CP::EgammaCalibrationAndSmearingTool::m_use_mva_calibration
int m_use_mva_calibration
Definition: EgammaCalibrationAndSmearingTool.h:275
egEnergyCorr::Scale::Wtots1Up
@ Wtots1Up
Definition: egammaEnergyCorrectionTool.h:237
CP::EgammaCalibrationAndSmearingTool::RandomNumber
unsigned int RandomNumber
Definition: EgammaCalibrationAndSmearingTool.h:200
asg::AsgMetadataTool::m_outputMetaStore
MetaStore_t m_outputMetaStore
Object accessing the output metadata store.
Definition: AsgMetadataTool.h:121
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
CP::EgammaCalibrationAndSmearingTool::m_use_temp_correction201215
int m_use_temp_correction201215
Definition: EgammaCalibrationAndSmearingTool.h:277
xAOD::EgammaParameters::AuthorFwdElectron
const uint16_t AuthorFwdElectron
Electron reconstructed by the Forward cluster-based algorithm.
Definition: EgammaDefs.h:30
CP::EgammaCalibrationAndSmearingTool::xAOD2ptype
PATCore::ParticleType::Type xAOD2ptype(columnar::EgammaId particle) const
Definition: EgammaCalibrationAndSmearingTool.cxx:874
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
CP::SystematicVariation
Definition: SystematicVariation.h:47
CP::EgammaCalibrationAndSmearingTool::m_useGainCorrection
int m_useGainCorrection
Definition: EgammaCalibrationAndSmearingTool.h:271
MuonR4::to_string
std::string to_string(const SectorProjector proj)
Definition: MsTrackSeeder.cxx:66
egEnergyCorr::es2023_R22_Run2_v1
@ es2023_R22_Run2_v1
Definition: egammaEnergyCorrectionTool.h:340
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:252
xAOD::EventInfo_v1::IS_SIMULATION
@ IS_SIMULATION
true: simulation, false: data
Definition: EventInfo_v1.h:151
egEnergyCorr::Resolution::PileUpUp
@ PileUpUp
Definition: egammaEnergyCorrectionTool.h:88
PATCore::ParticleDataType::Data
@ Data
Definition: PATCoreEnums.h:22
python.DataFormatRates.events
events
Definition: DataFormatRates.py:105
CP::SystematicRegistry::registerSystematics
StatusCode registerSystematics(const IReentrantSystematicsTool &tool)
effects: register all the systematics from the tool
Definition: SystematicRegistry.cxx:45
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
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:328
egamma
Definition: egamma.h:58
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
egEnergyCorr::Scale::LeakageElecDown
@ LeakageElecDown
Definition: egammaEnergyCorrectionTool.h:198
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
egEnergyCorr::Scale::L2LowGainUp
@ L2LowGainUp
Definition: egammaEnergyCorrectionTool.h:229
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:276
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:315
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
CP::EgammaCalibrationAndSmearingTool::m_usePhiUniformCorrection
int m_usePhiUniformCorrection
Definition: EgammaCalibrationAndSmearingTool.h:269
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_onlyElectrons
Gaudi::Property< bool > m_onlyElectrons
Definition: EgammaCalibrationAndSmearingTool.h:451
CP::EgammaCalibrationAndSmearingTool::m_decorrelation_model_resolution
ResolutionDecorrelation m_decorrelation_model_resolution
Definition: EgammaCalibrationAndSmearingTool.h:255
TRTCalib_cfilter.p2
p2
Definition: TRTCalib_cfilter.py:131
CP::EgammaCalibrationAndSmearingTool::m_user_random_run_number
int m_user_random_run_number
Definition: EgammaCalibrationAndSmearingTool.h:280
CP::EgammaCalibrationAndSmearingTool::m_useIntermoduleCorrection
int m_useIntermoduleCorrection
Definition: EgammaCalibrationAndSmearingTool.h:268
egEnergyCorr::Scale::AllUp
@ AllUp
Definition: egammaEnergyCorrectionTool.h:282
CP::EgammaCalibrationAndSmearingTool::m_currentResolutionVariation_MC
egEnergyCorr::Resolution::Variation m_currentResolutionVariation_MC
Definition: EgammaCalibrationAndSmearingTool.h:437
CP::CorrectionCode::Error
@ Error
Some error happened during the object correction.
Definition: CorrectionCode.h:36
egEnergyCorr::Resolution::ZSmearingDown
@ ZSmearingDown
Definition: egammaEnergyCorrectionTool.h:69
CP::EgammaCalibrationAndSmearingTool::m_MVACalibSvc
ServiceHandle< IegammaMVASvc > m_MVACalibSvc
Definition: EgammaCalibrationAndSmearingTool.h:413
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
egEnergyCorr::Scale::LArCalibUp
@ LArCalibUp
Definition: egammaEnergyCorrectionTool.h:155
egEnergyCorr::Resolution::MaterialPP0Down
@ MaterialPP0Down
Definition: egammaEnergyCorrectionTool.h:94
egEnergyCorr::es2010
@ es2010
Definition: egammaEnergyCorrectionTool.h:297
CP::EgammaCalibrationAndSmearingTool::m_currentScaleVariation_MC
egEnergyCorr::Scale::Variation m_currentScaleVariation_MC
Definition: EgammaCalibrationAndSmearingTool.h:435
CP::EgammaCalibrationAndSmearingTool::m_ESModel
std::string m_ESModel
Definition: EgammaCalibrationAndSmearingTool.h:250
xAOD::EgammaHelpers::isConvertedPhoton
bool isConvertedPhoton(const xAOD::Egamma *eg, bool excludeTRT=false)
is the object a converted photon
Definition: EgammaxAODHelpers.cxx:25
AthCommonDataStore
Definition: AthCommonDataStore.h:52
Generate_dsid_ranseed.seed
seed
Definition: Generate_dsid_ranseed.py:10
CP::EgammaCalibrationAndSmearingTool::m_decorateEmva
bool m_decorateEmva
Definition: EgammaCalibrationAndSmearingTool.h:286
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
egEnergyCorr::Resolution::MaterialCryoUp
@ MaterialCryoUp
Definition: egammaEnergyCorrectionTool.h:84
egEnergyCorr::es2017_R21_PRE
@ es2017_R21_PRE
Definition: egammaEnergyCorrectionTool.h:326
CP::EgammaCalibrationAndSmearingTool::AbsEtaCaloPredicateFactory
const EgammaPredicate AbsEtaCaloPredicateFactory(double eta_min, double eta_max) const
Definition: EgammaCalibrationAndSmearingTool.h:340
egEnergyCorr::es2015cPRE_res_improved
@ es2015cPRE_res_improved
Definition: egammaEnergyCorrectionTool.h:316
lumiFormat.i
int i
Definition: lumiFormat.py:85
egEnergyCorr::Scale::topoClusterThresUp
@ topoClusterThresUp
Definition: egammaEnergyCorrectionTool.h:207
egEnergyCorr::Scale::ConvEfficiencyDown
@ ConvEfficiencyDown
Definition: egammaEnergyCorrectionTool.h:253
CP::EgammaCalibrationAndSmearingTool::oldtool_scale_flag_this_event
egEnergyCorr::Scale::Variation oldtool_scale_flag_this_event(columnar::EgammaId p, columnar::EventInfoId event_info) const
Definition: EgammaCalibrationAndSmearingTool.cxx:1245
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:2140
CP::EgammaCalibrationAndSmearingTool::m_currentResolutionVariation_data
egEnergyCorr::Resolution::Variation m_currentResolutionVariation_data
Definition: EgammaCalibrationAndSmearingTool.h:438
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
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:257
egEnergyCorr::Resolution::afUp
@ afUp
Definition: egammaEnergyCorrectionTool.h:97
egEnergyCorr::Scale::MomentumDown
@ MomentumDown
Definition: egammaEnergyCorrectionTool.h:138
asg::AsgMetadataTool::beginInputFile
virtual StatusCode beginInputFile()
Function called when a new input file is opened.
Definition: AsgMetadataTool.cxx:185
egEnergyCorr::Scale::ConvRecoUp
@ ConvRecoUp
Definition: egammaEnergyCorrectionTool.h:261
master.flag
bool flag
Definition: master.py:29
egEnergyCorr::Resolution::Nominal
@ Nominal
Definition: egammaEnergyCorrectionTool.h:62
xAOD::VxType::PriVtx
@ PriVtx
Primary vertex.
Definition: TrackingPrimitives.h:572
CP::EgammaCalibrationAndSmearingTool::m_varSF
double m_varSF
Definition: EgammaCalibrationAndSmearingTool.h:260
CalibDbCompareRT.dummy
dummy
Definition: CalibDbCompareRT.py:59
asg::AsgMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AsgMessaging.cxx:49
egEnergyCorr::es2012a
@ es2012a
Definition: egammaEnergyCorrectionTool.h:305
CP::EgammaCalibrationAndSmearingTool::m_useGainInterpolation
int m_useGainInterpolation
Definition: EgammaCalibrationAndSmearingTool.h:281
egammaLayerRecalibTool::disable_PSCorrections
void disable_PSCorrections()
Definition: egammaLayerRecalibTool.h:324
asg::AsgMetadataTool::metaDataStop
virtual StatusCode metaDataStop()
Function called when the tool should write out its metadata.
Definition: AsgMetadataTool.cxx:209
egEnergyCorr::es2017_summer
@ es2017_summer
Definition: egammaEnergyCorrectionTool.h:320
AthenaPoolTestRead.acc
acc
Definition: AthenaPoolTestRead.py:16
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
egEnergyCorr::es2015c_summer
@ es2015c_summer
Definition: egammaEnergyCorrectionTool.h:317
MSG::name
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition: MsgLevel.cxx:19
python.getProblemFolderFromLogs.el
dictionary el
Definition: getProblemFolderFromLogs.py:48
CP::EgammaCalibrationAndSmearingTool::m_usePSCorrection
int m_usePSCorrection
Definition: EgammaCalibrationAndSmearingTool.h:283
CP::EgammaCalibrationAndSmearingTool::m_doFwdCalib
Gaudi::Property< bool > m_doFwdCalib
Definition: EgammaCalibrationAndSmearingTool.h:296
egEnergyCorr::Scale::L2MediumGainUp
@ L2MediumGainUp
Definition: egammaEnergyCorrectionTool.h:227
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
CP::EgammaCalibrationAndSmearingTool::m_use_mapping_correction
bool m_use_mapping_correction
Definition: EgammaCalibrationAndSmearingTool.h:279
egEnergyCorr::Scale::None
@ None
Definition: egammaEnergyCorrectionTool.h:129
CP::EgammaCalibrationAndSmearingTool::EtaCaloPredicateFactory
const EgammaPredicate EtaCaloPredicateFactory(double eta_min, double eta_max) const
Definition: EgammaCalibrationAndSmearingTool.h:319
egEnergyCorr::Resolution::MaterialCryoDown
@ MaterialCryoDown
Definition: egammaEnergyCorrectionTool.h:83
DataVector
Derived DataVector<T>.
Definition: DataVector.h:795
egEnergyCorr::UNDEFINED
@ UNDEFINED
Definition: egammaEnergyCorrectionTool.h:344
CP::EgammaCalibrationAndSmearingTool::m_ADCLinearity_tool
std::shared_ptr< LinearityADC > m_ADCLinearity_tool
Definition: EgammaCalibrationAndSmearingTool.h:416
CP::EgammaCalibrationAndSmearingTool::m_TResolutionType
egEnergyCorr::Resolution::resolutionType m_TResolutionType
Definition: EgammaCalibrationAndSmearingTool.h:262
CP::EgammaCalibrationAndSmearingTool::m_gain_tool_run2
std::unique_ptr< egGain::GainUncertainty > m_gain_tool_run2
Definition: EgammaCalibrationAndSmearingTool.h:415
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
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:2378
CP::GeV
const double GeV
Definition: EgammaCalibrationAndSmearingTool.cxx:43
CP::EgammaCalibrationAndSmearingTool::m_doSmearing
int m_doSmearing
Definition: EgammaCalibrationAndSmearingTool.h:259
CP::EgammaCalibrationAndSmearingTool::ResolutionDecorrelation::FULL
@ FULL
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
CP::EgammaCalibrationAndSmearingTool::AUTO
static const int AUTO
Definition: EgammaCalibrationAndSmearingTool.h:198
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
egEnergyCorr::Resolution::None
@ None
Definition: egammaEnergyCorrectionTool.h:59
merge.output
output
Definition: merge.py:16
CP::EgammaCalibrationAndSmearingTool::m_use_AFII
int m_use_AFII
Definition: EgammaCalibrationAndSmearingTool.h:264
CP::EgammaCalibrationAndSmearingTool::m_rootTool
std::unique_ptr< AtlasRoot::egammaEnergyCorrectionTool > m_rootTool
Definition: EgammaCalibrationAndSmearingTool.h:422
egEnergyCorr::Resolution::PileUpDown
@ PileUpDown
Definition: egammaEnergyCorrectionTool.h:87
egEnergyCorr::Scale::E4ScintillatorUp
@ E4ScintillatorUp
Definition: egammaEnergyCorrectionTool.h:179
columnar::ObjectId
a class representing a single object (electron, muons, etc.)
Definition: ContainerId.h:178
CP::EgammaCalibrationAndSmearingTool::setupSystematics
void setupSystematics()
Definition: EgammaCalibrationAndSmearingTool.cxx:1302
xAOD::VxType::PileUp
@ PileUp
Pile-up vertex.
Definition: TrackingPrimitives.h:574
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
asg::AsgMetadataTool::m_inputMetaStore
MetaStore_t m_inputMetaStore
Object accessing the input metadata store.
Definition: AsgMetadataTool.h:119
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:87
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
egEnergyCorr::Resolution::MaterialIBLUp
@ MaterialIBLUp
Definition: egammaEnergyCorrectionTool.h:91
egEnergyCorr::es2016PRE
@ es2016PRE
Definition: egammaEnergyCorrectionTool.h:318
egEnergyCorr::es2017_summer_final
@ es2017_summer_final
Definition: egammaEnergyCorrectionTool.h:322
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:452
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:423
CP::is_after_run1
bool is_after_run1(egEnergyCorr::ESModel model)
Definition: EgammaCalibrationAndSmearingTool.cxx:244
egEnergyCorr::Scale::MatPP0Up
@ MatPP0Up
Definition: egammaEnergyCorrectionTool.h:241
egEnergyCorr::es2012XX
@ es2012XX
Definition: egammaEnergyCorrectionTool.h:312
egEnergyCorr::Scale::ADCLinDown
@ ADCLinDown
Definition: egammaEnergyCorrectionTool.h:194
CP::EgammaCalibrationAndSmearingTool::m_onlyPhotons
Gaudi::Property< bool > m_onlyPhotons
Definition: EgammaCalibrationAndSmearingTool.h:452
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:339
egEnergyCorr::es2012c
@ es2012c
Definition: egammaEnergyCorrectionTool.h:307
egEnergyCorr::Resolution::OFCDown
@ OFCDown
Definition: egammaEnergyCorrectionTool.h:102
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:430
egEnergyCorr::es2017
@ es2017
Definition: egammaEnergyCorrectionTool.h:319
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:335
PathResolverFindCalibFile
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Definition: PathResolver.cxx:321
CP::EgammaCalibrationAndSmearingTool::intermodule_correction
double intermodule_correction(double Ecl, double phi, double eta) const
Definition: EgammaCalibrationAndSmearingTool.cxx:2189
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:442
egEnergyCorr::Scale::PSb12Up
@ PSb12Up
Definition: egammaEnergyCorrectionTool.h:189
egammaLayerRecalibTool
Definition: egammaLayerRecalibTool.h:283
egEnergyCorr::Scale::E4ScintillatorDown
@ E4ScintillatorDown
Definition: egammaEnergyCorrectionTool.h:180
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:282
egEnergyCorr::Scale::ConvFakeRateUp
@ ConvFakeRateUp
Definition: egammaEnergyCorrectionTool.h:254
a
TList * a
Definition: liststreamerinfos.cxx:10
columnar::empty
bool empty() const noexcept
Definition: ObjectRange.h:167
egEnergyCorr::Resolution::MaterialIDUp
@ MaterialIDUp
Definition: egammaEnergyCorrectionTool.h:78
egEnergyCorr::Scale::Wtots1Down
@ Wtots1Down
Definition: egammaEnergyCorrectionTool.h:238
h
python.CaloAddPedShiftConfig.int
int
Definition: CaloAddPedShiftConfig.py:45
egEnergyCorr::es2017_summer_improved
@ es2017_summer_improved
Definition: egammaEnergyCorrectionTool.h:321
xAOD::Photon_v1
Definition: Photon_v1.h:37
asg::AsgMetadataTool
Base class for dual-use tools that provide file metadata access.
Definition: AsgMetadataTool.h:48
trigbs_mixBSevents.input
input
Definition: trigbs_mixBSevents.py:56
egammaMVACalib::GlobalEventInfo
A structure holding some global event information.
Definition: GlobalEventInfo.h:9
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
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:341
egEnergyCorr::Resolution::MaterialCaloUp
@ MaterialCaloUp
Definition: egammaEnergyCorrectionTool.h:80
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:418
CP::CorrectionCode
Return value from object correction CP tools.
Definition: CorrectionCode.h:31
xAOD::EgammaParameters::electron
@ electron
Definition: EgammaEnums.h:18
CP::use_phi_uniform_correction
bool use_phi_uniform_correction(egEnergyCorr::ESModel model)
Definition: EgammaCalibrationAndSmearingTool.cxx:240
xAOD::get_eta_calo
float get_eta_calo(const xAOD::CaloCluster &cluster, int author, bool do_throw=false)
Definition: EgammaCalibrationAndSmearingTool.h:73
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:253
egEnergyCorr::Scale::L2MediumGainDown
@ L2MediumGainDown
Definition: egammaEnergyCorrectionTool.h:228
egEnergyCorr::Resolution::MaterialGapDown
@ MaterialGapDown
Definition: egammaEnergyCorrectionTool.h:81
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
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:332
egEnergyCorr::Scale::EXTRARUN3PREUp
@ EXTRARUN3PREUp
Definition: egammaEnergyCorrectionTool.h:269
CP::gainToolFactory
std::unique_ptr< egGain::GainTool > gainToolFactory(egEnergyCorr::ESModel model)
Definition: EgammaCalibrationAndSmearingTool.cxx:45
egEnergyCorr::Scale::LArTemperature2016PreDown
@ LArTemperature2016PreDown
Definition: egammaEnergyCorrectionTool.h:172
egEnergyCorr::es2022_R22_PRE
@ es2022_R22_PRE
Definition: egammaEnergyCorrectionTool.h:338
xAOD::Egamma_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: Egamma_v1.cxx:70
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
CP::EgammaCalibrationAndSmearingTool::setPt
void setPt(columnar::MutableEgammaId input, double energy) const
Definition: EgammaCalibrationAndSmearingTool.cxx:1229
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:44
egammaLayerRecalibTool::fixForMissingCells
void fixForMissingCells(bool fix=true)
Definition: egammaLayerRecalibTool.h:322
CP::EgammaCalibrationAndSmearingTool::callSingleEvent
void callSingleEvent(columnar::MutableEgammaRange egammas, columnar::EventInfoId event) const
Definition: EgammaCalibrationAndSmearingTool.cxx:2543
CP::EgammaCalibrationAndSmearingTool::m_pVtxKey
Gaudi::Property< std::string > m_pVtxKey
Definition: EgammaCalibrationAndSmearingTool.h:300
CP::egammaLayerRecalibToolFactory
std::unique_ptr< egammaLayerRecalibTool > egammaLayerRecalibToolFactory(egEnergyCorr::ESModel model, int enableSacc)
Definition: EgammaCalibrationAndSmearingTool.cxx:140
egammaLayerRecalibTool::disable_SaccCorrections
void disable_SaccCorrections()
Definition: egammaLayerRecalibTool.h:326
columnar::resetAccessor
void resetAccessor(AccessorTemplate< CI, CT, CAM, CM > &accessor, ColumnarTool< CM > &columnBase, const std::string &name, ColumnInfo &&info={})
reset a column accessor to point to a new column
Definition: ColumnAccessor.h:252
CP::EgammaCalibrationAndSmearingTool::applyCorrection
virtual CP::CorrectionCode applyCorrection(xAOD::Egamma &) const override
Definition: EgammaCalibrationAndSmearingTool.cxx:932
columnar::EgammaId
ObjectId< ContainerId::egamma > EgammaId
Definition: EgammaDef.h:50
SG::DataProxy
Definition: DataProxy.h:45
xAOD::bool
setBGCode setTAP setLVL2ErrorBits bool
Definition: TrigDecision_v1.cxx:60
python.SystemOfUnits.m2
float m2
Definition: SystemOfUnits.py:107
CP::EgammaCalibrationAndSmearingTool::m_syst_description_resolution
std::map< CP::SystematicVariation, egEnergyCorr::Resolution::Variation > m_syst_description_resolution
Definition: EgammaCalibrationAndSmearingTool.h:432
egEnergyCorr::es2015_5TeV
@ es2015_5TeV
Definition: egammaEnergyCorrectionTool.h:324
egEnergyCorr::Resolution::AllUp
@ AllUp
Definition: egammaEnergyCorrectionTool.h:66
egEnergyCorr::Resolution::MaterialCaloDown
@ MaterialCaloDown
Definition: egammaEnergyCorrectionTool.h:79
egEnergyCorr::Scale::S12ExtraLastEtaBinRun2Up
@ S12ExtraLastEtaBinRun2Up
Definition: egammaEnergyCorrectionTool.h:211
CP::EgammaCalibrationAndSmearingTool::m_decorrelation_model_scale
ScaleDecorrelation m_decorrelation_model_scale
Definition: EgammaCalibrationAndSmearingTool.h:254
egEnergyCorr::es2018_R21_v0
@ es2018_R21_v0
Definition: egammaEnergyCorrectionTool.h:334
CP::EgammaCalibrationAndSmearingTool::m_useS12Correction
int m_useS12Correction
Definition: EgammaCalibrationAndSmearingTool.h:284
egEnergyCorr::es2015PRE
@ es2015PRE
Definition: egammaEnergyCorrectionTool.h:313
CP::EgammaCalibrationAndSmearingTool::m_layer_recalibration_tune
std::string m_layer_recalibration_tune
Definition: EgammaCalibrationAndSmearingTool.h:419
CP::EgammaCalibrationAndSmearingTool::m_useCaloDistPhiUnifCorrection
int m_useCaloDistPhiUnifCorrection
Definition: EgammaCalibrationAndSmearingTool.h:270
fitman.k
k
Definition: fitman.py:528
xAOD::EventInfo_v1::eventType
bool eventType(EventType type) const
Check for one particular bitmask value.
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:278
egEnergyCorr::Scale::topoClusterThresDown
@ topoClusterThresDown
Definition: egammaEnergyCorrectionTool.h:208
CP::EgammaCalibrationAndSmearingTool::m_fixForMissingCells
Gaudi::Property< bool > m_fixForMissingCells
Definition: EgammaCalibrationAndSmearingTool.h:292
ServiceHandle< IIncidentSvc >
egEnergyCorr::Resolution::MaterialIBLDown
@ MaterialIBLDown
Definition: egammaEnergyCorrectionTool.h:92
asg::AsgMetadataTool::m_useIncidents
bool m_useIncidents
Definition: AsgMetadataTool.h:128
xAOD::EgammaParameters::unconvertedPhoton
@ unconvertedPhoton
Definition: EgammaEnums.h:19
egEnergyCorr::Resolution::AllDown
@ AllDown
Definition: egammaEnergyCorrectionTool.h:65
CP::EgammaCalibrationAndSmearingTool::m_accessors
std::unique_ptr< Accessors > m_accessors
Definition: EgammaCalibrationAndSmearingTool.h:487