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

#include <IsolationCorrectionTool.h>

Inheritance diagram for CP::IsolationCorrectionTool:
Collaboration diagram for CP::IsolationCorrectionTool:

Public Member Functions

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 > &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
 

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

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

virtual ASG_TOOL_CLASS3(IsolationCorrectionTool, IIsolationCorrectionTool, CP::ISystematicsTool, CP::IReentrantSystematicsTool) public ~IsolationCorrectionTool ()
 
virtual StatusCode initialize () override final
 
virtual CP::CorrectionCode applyCorrection (xAOD::Egamma &) override final
 
virtual CP::CorrectionCode CorrectLeakage (xAOD::Egamma &) override final
 
virtual CP::CorrectionCode correctedCopy (const xAOD::Egamma &, xAOD::Egamma *&) override final
 
virtual CP::SystematicSet affectingSystematics () const override final
 the list of all systematics this tool can be affected by More...
 
virtual bool isAffectedBySystematic (const CP::SystematicVariation &systematic) const override final
 Declare the interface that this class provides. More...
 
virtual CP::SystematicSet recommendedSystematics () const override final
 the list of all systematics this tool recommends to use More...
 
virtual StatusCode applySystematicVariation (const CP::SystematicSet &systConfig) override final
 effects: configure this tool for the given list of systematic variations. More...
 
virtual float GetPtCorrectedIsolation (const xAOD::Egamma &, xAOD::Iso::IsolationType) override
 
virtual float GetPtCorrection (const xAOD::Egamma &, xAOD::Iso::IsolationType) const override final
 
virtual float GetDDCorrection (const xAOD::Egamma &, xAOD::Iso::IsolationType) override final
 
void Print ()
 
float GetEtaPointing (const xAOD::Egamma *input)
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

SG::ReadHandleKey< xAOD::EventInfom_eventInfoKey
 
SG::ReadHandleKey< xAOD::EventShapem_centralEventShapeKey
 
SG::ReadHandleKey< xAOD::EventShapem_forwardEventShapeKey
 
std::string m_corr_file
 
std::string m_corr_ddshift_file
 
std::string m_corr_ddsmearing_file
 
IsolationCorrectionm_isol_corr
 
std::string m_tool_ver_str
 
std::string m_corr_etaEDParPU_file
 
std::string m_corr_etaEDPar_mc_corr_file
 
std::map< xAOD::Iso::IsolationType, std::unique_ptr< TGraph > > m_map_isotype_zetaPU
 
std::map< xAOD::Iso::IsolationType, std::unique_ptr< TGraph > > m_map_isotype_zeta_mc_corr
 
std::string m_ddVersion
 
bool m_apply_SC_leak_corr
 
bool m_apply_etaEDParPU_corr
 
bool m_apply_etaEDParPU_mc_corr
 
bool m_is_mc
 
bool m_AFII_corr
 
bool m_apply_dd {}
 
bool m_apply_ddDefault
 
bool m_correct_etcone
 
bool m_trouble_categories
 
bool m_useLogLogFit
 
bool m_forcePartType
 
CP::SystematicVariation m_systDDonoff
 
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
 

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 24 of file IsolationCorrectionTool.h.

Member Typedef Documentation

◆ 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.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ ~IsolationCorrectionTool()

CP::IsolationCorrectionTool::~IsolationCorrectionTool ( )
privatevirtual

Definition at line 390 of file IsolationCorrectionTool.cxx.

390  {
391  delete m_isol_corr;
392  }

Member Function Documentation

◆ affectingSystematics()

CP::SystematicSet CP::IsolationCorrectionTool::affectingSystematics ( ) const
finaloverrideprivatevirtual

the list of all systematics this tool can be affected by

Implements CP::IIsolationCorrectionTool.

Definition at line 377 of file IsolationCorrectionTool.cxx.

377  {
379  return result;
380  }

◆ applyCorrection()

CP::CorrectionCode CP::IsolationCorrectionTool::applyCorrection ( xAOD::Egamma eg)
finaloverrideprivatevirtual

Implements CP::IIsolationCorrectionTool.

Definition at line 209 of file IsolationCorrectionTool.cxx.

209  {
210 
211  static const SG::AuxElement::Accessor<float> decDDcor20("topoetcone20_DDcorr");
212  static const SG::AuxElement::Accessor<float> decDDcor40("topoetcone40_DDcorr");
213 
214  float SCsub = 0;
216  float topoetconecoreConeEnergyCorrection = 0;
217  if(!eg.isolationCaloCorrection(topoetconecoreConeEnergyCorrection, xAOD::Iso::topoetcone, xAOD::Iso::coreCone, xAOD::Iso::coreEnergy)){
218  ATH_MSG_WARNING("Could not find SC based core");
219  }
220  float core57cells = 0.;
222  ATH_MSG_WARNING("Could not find core57cells to apply SC based core correction");
223  }
224  ATH_MSG_VERBOSE("Old core correction value: " << core57cells);
225  ATH_MSG_VERBOSE("SC based core correction value: " << topoetconecoreConeEnergyCorrection);
226  SCsub = - topoetconecoreConeEnergyCorrection + core57cells;
227  }
228 
229  float centralDensity = 0.;
230  float forwardDensity = 0.;
234  const xAOD::EventShape* evtShapeCentral = shapeCentral.ptr();
235  const xAOD::EventShape* evtShapeForward = shapeForward.ptr();
236  centralDensity = evtShapeCentral->getDensity(xAOD::EventShape::Density);
237  forwardDensity = evtShapeForward->getDensity(xAOD::EventShape::Density);
238  }
239 
240  static const std::vector<xAOD::Iso::IsolationType> topoisolation_types = {xAOD::Iso::topoetcone20,
243  for (auto type : topoisolation_types) {
244  float oldleak = 0.;
245  if (!eg.isolationCaloCorrection(oldleak, type, xAOD::Iso::ptCorrection)) {
246  ATH_MSG_DEBUG("leakage correction not stored for isolation type " << xAOD::Iso::toCString(type) << ". Nothing done");
247  continue;
248  }
249  float oldiso = 0;
250  bool gotIso = eg.isolationValue(oldiso,type);
251  if (!gotIso) continue;
252 
253  // Use the Random Run Number from the Event Info to check which year's DD-Corrections to use
254  // If the RandomRunNo can't be obtained, then default to what is set by either the default choice or by the AuxData check
255  unsigned int theRunNumber = 0 ;
257  const xAOD::EventInfo* eventInfo = evtInfo.ptr();
258  if (eventInfo) {
259  static const SG::AuxElement::Accessor<unsigned int> randomrunnumber("RandomRunNumber");
260  if (randomrunnumber.isAvailable(*eventInfo)){
261  theRunNumber = randomrunnumber(*(eventInfo)) ;
262  }
263  } else{
264  ATH_MSG_WARNING("Could not retrieve EventInfo object");
265  }
266  if (theRunNumber >= 320000)
267  m_ddVersion = "2017" ; // RunNo found, and is in 2017 range
268  else if (theRunNumber > 0)
269  m_ddVersion = "2015_2016" ; // RunNo found, but less than 2017 range
270  // otherwise, stick with default (m_ddVersion is already assigned)
271 
272  // Don't use DD Corrections for AFII if not rel21 ? (I do not know what was done for rel20.7 !!!)
273  if (m_tool_ver_str != "REL21" && m_AFII_corr) m_apply_dd = false;
274 
275  float iso = oldiso;
276  float newleak = 0.;
278  ATH_MSG_VERBOSE("Iso before SC correction: " << iso);
279  iso += (SCsub + oldleak);
280  ATH_MSG_VERBOSE("Iso after SC correction: " << iso);
281  }
282  else {
283  newleak = this->GetPtCorrection(eg,type);
284  iso += (oldleak - newleak);
285  }
286  float ddcorr = 0;
287 
288  // this correction is derived purly from data, but can also be applied to mc
290  float abseta = fabs(eg.caloCluster()->etaBE(2));
291  float densityOldCorrection = 0.;
292  if(abseta <= 1.5){
293  densityOldCorrection = centralDensity;
294  }
295  else{
296  densityOldCorrection = forwardDensity;
297  }
298  float dR = xAOD::Iso::coneSize(type);
299  static const float a_core = 5*7*0.025*TMath::Pi()/128;
300  float area = TMath::Pi()*dR*dR-a_core;
301  float oldpu_corr = densityOldCorrection*area;
302  float newpu_corr = m_map_isotype_zetaPU[type]->Eval(abseta)*centralDensity*area;
303  float pu_mc_corr = 0.;
305  pu_mc_corr += m_map_isotype_zeta_mc_corr[type]->Eval(abseta)*centralDensity*area;
306  }
307  iso = iso + oldpu_corr - newpu_corr + pu_mc_corr;
308  ATH_MSG_VERBOSE("Applying parametrized pileup correction to " << eg.type() << " with |eta|="<< abseta);
309  ATH_MSG_VERBOSE("Old parametrized pileup correction for "<<xAOD::Iso::toCString(type)<< ": "<<oldpu_corr);
310  ATH_MSG_VERBOSE("New parametrized pileup correction for "<<xAOD::Iso::toCString(type)<< ": "<<newpu_corr);
311  ATH_MSG_VERBOSE("Parametrized mc correction for "<<xAOD::Iso::toCString(type)<< ": "<<pu_mc_corr);
312  ATH_MSG_VERBOSE("Isolation after new correction for "<<xAOD::Iso::toCString(type)<< ": "<<iso);
313  ATH_MSG_VERBOSE("Isolation after old correction for "<<xAOD::Iso::toCString(type)<< ": "<<iso+newpu_corr-oldpu_corr-pu_mc_corr);
314  eg.setIsolationCaloCorrection(newpu_corr, type, xAOD::Iso::pileupCorrection);
315  }
316 
318  ddcorr = this->GetDDCorrection(eg,type);
320  decDDcor20(eg) = ddcorr;
321  else if (type == xAOD::Iso::topoetcone40)
322  decDDcor40(eg) = ddcorr;
323  iso += ddcorr;
324  }
325  bool setIso = eg.setIsolationValue(iso,type);
326  setIso = (setIso && eg.setIsolationCaloCorrection(newleak-ddcorr,type,xAOD::Iso::ptCorrection));
327  ATH_MSG_VERBOSE("oldeak = " << oldleak << " ddcor = " << ddcorr << " leak param = " << newleak
328  << " stored correction " << eg.isolationCaloCorrection(type,xAOD::Iso::ptCorrection));
329 
330  if (!setIso) {
331  ATH_MSG_WARNING("Can't correct leakage for " << xAOD::Iso::toCString(type));
333  }
334  }
335  return CP::CorrectionCode::Ok;
336  }

◆ applySystematicVariation()

StatusCode CP::IsolationCorrectionTool::applySystematicVariation ( const CP::SystematicSet systConfig)
finaloverrideprivatevirtual

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::IIsolationCorrectionTool.

Definition at line 386 of file IsolationCorrectionTool.cxx.

386  {
387  return StatusCode::SUCCESS;
388  }

◆ 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 196 of file AsgMetadataTool.cxx.

196  {
197 
198  // Return gracefully:
199  return StatusCode::SUCCESS;
200  }

◆ 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, xAODMaker::FileMetaDataTool, BookkeeperDumperTool, Trig::TrigDecisionTool, xAODMaker::TriggerMenuMetaDataTool, xAODMaker::TruthMetaDataTool, Trig::xAODBunchCrossingTool, TauAnalysisTools::TauEfficiencyCorrectionsTool, and TauAnalysisTools::TauSmearingTool.

Definition at line 180 of file AsgMetadataTool.cxx.

180  {
181 
182  // Return gracefully:
183  return StatusCode::SUCCESS;
184  }

◆ correctedCopy()

CP::CorrectionCode CP::IsolationCorrectionTool::correctedCopy ( const xAOD::Egamma input,
xAOD::Egamma *&  output 
)
finaloverrideprivatevirtual

Implements CP::IIsolationCorrectionTool.

Definition at line 350 of file IsolationCorrectionTool.cxx.

350  {
351  // A sanity check:
352  if( output ) ATH_MSG_WARNING( "Non-null pointer received. There's a possible memory leak!" );
353 
354  if ( input.type() == xAOD::Type::Electron ) {
355  output = new xAOD::Electron();
356  output->makePrivateStore( static_cast<const xAOD::Electron&>(input) );
357  return applyCorrection( *output );
358  }
359  else if ( input.type() == xAOD::Type::Photon ) {
360  output = new xAOD::Photon();
361  output->makePrivateStore( static_cast<const xAOD::Photon&>(input) );
362  return applyCorrection( *output );
363  }
364  else {
365  ATH_MSG_WARNING("Didn't get an electron or photon");
367  }
368 
369  }

◆ CorrectLeakage()

CP::CorrectionCode CP::IsolationCorrectionTool::CorrectLeakage ( xAOD::Egamma eg)
finaloverrideprivatevirtual

Implements CP::IIsolationCorrectionTool.

Definition at line 167 of file IsolationCorrectionTool.cxx.

167  {
168 
169  static const std::vector<xAOD::Iso::IsolationType> topoisolation_types = {xAOD::Iso::topoetcone20,
171 
172  for (auto type : topoisolation_types) {
173  float oldleak = 0.;
174  if (eg.isolationCaloCorrection(oldleak, type, xAOD::Iso::ptCorrection)) {
175  ATH_MSG_DEBUG("leakage correction not stored for isolation type " << xAOD::Iso::toCString(type) << ". Nothing done.");
176  continue;
177  }
178  float newleak = this->GetPtCorrection(eg,type);
179  float iso = 0;
180  if (!eg.isolationValue(iso,type)) {
181  ATH_MSG_WARNING("Isolation variable " << xAOD::Iso::toCString(type) << " not stored. Nothing done.");
182  continue;
183  }
184  iso += (oldleak-newleak);
185  bool setIso = eg.setIsolationValue(iso,type);
186  setIso = (setIso && eg.setIsolationCaloCorrection(newleak,type,xAOD::Iso::ptCorrection));
187  if (!setIso) {
188  ATH_MSG_WARNING("Can't correct leakage for " << xAOD::Iso::toCString(type));
190  }
191  }
192 
193  if (m_correct_etcone){
194  // this is supposed to correct an uncorrected etcone
195  static const std::vector<xAOD::Iso::IsolationType> isolation_types = {xAOD::Iso::etcone20,
198 
199  ATH_MSG_VERBOSE( "Correcting etconeXX isolation..." );
200  for(auto type : topoisolation_types){
201  float Etcone_value_corr = m_isol_corr->GetPtCorrectedIsolation(eg,type);
202  eg.setIsolationValue(Etcone_value_corr,type);
203  }
204  }
205 
206  return CP::CorrectionCode::Ok;
207  }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  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 > &  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 > &  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 > &  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 > &  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; }

◆ 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, xAODMaker::FileMetaDataTool, BookkeeperDumperTool, xAODMaker::TriggerMenuMetaDataTool, and xAODMaker::TruthMetaDataTool.

Definition at line 188 of file AsgMetadataTool.cxx.

188  {
189 
190  // Return gracefully:
191  return StatusCode::SUCCESS;
192  }

◆ 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

◆ GetDDCorrection()

float CP::IsolationCorrectionTool::GetDDCorrection ( const xAOD::Egamma input,
xAOD::Iso::IsolationType  isol 
)
finaloverrideprivatevirtual

Implements CP::IIsolationCorrectionTool.

Definition at line 346 of file IsolationCorrectionTool.cxx.

346  {
348  }

◆ GetEtaPointing()

float CP::IsolationCorrectionTool::GetEtaPointing ( const xAOD::Egamma input)
inlineprivate

Definition at line 71 of file IsolationCorrectionTool.h.

72  {
74  };

◆ 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.

◆ GetPtCorrectedIsolation()

float CP::IsolationCorrectionTool::GetPtCorrectedIsolation ( const xAOD::Egamma input,
xAOD::Iso::IsolationType  isol 
)
overrideprivatevirtual

Implements CP::IIsolationCorrectionTool.

Definition at line 338 of file IsolationCorrectionTool.cxx.

338  {
340  }

◆ GetPtCorrection()

float CP::IsolationCorrectionTool::GetPtCorrection ( const xAOD::Egamma input,
xAOD::Iso::IsolationType  isol 
) const
finaloverrideprivatevirtual

Implements CP::IIsolationCorrectionTool.

Definition at line 342 of file IsolationCorrectionTool.cxx.

342  {
343  return m_isol_corr->GetPtCorrection(input, isol);
344  }

◆ handle()

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

Function receiving incidents from IncidentSvc/TEvent.

Reimplemented in Trig::TrigDecisionTool.

Definition at line 130 of file AsgMetadataTool.cxx.

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

◆ initialize()

StatusCode CP::IsolationCorrectionTool::initialize ( )
finaloverrideprivatevirtual

Implements CP::IIsolationCorrectionTool.

Definition at line 46 of file IsolationCorrectionTool.cxx.

46  {
47  ATH_MSG_INFO( "in initialize of " << name() << "..." );
48 
49  //ReadHandles
53 
54  //
55  m_isol_corr->msg().setLevel(this->msg().level());
56  //
57  // Resolve the paths to the input files
58  std::vector < std::string > corrFileNameList;
59  corrFileNameList.push_back(m_corr_file);
60  corrFileNameList.push_back(m_corr_ddshift_file);
61  corrFileNameList.push_back(m_corr_ddsmearing_file);
62 
63  for ( unsigned int i=0; i<corrFileNameList.size(); ++i ){
64 
65  //First try the PathResolver
66  std::string filename = PathResolverFindCalibFile( corrFileNameList.at(i) );
67  if (filename.empty()){
68  ATH_MSG_ERROR ( "Could NOT resolve file name " << corrFileNameList.at(i) );
69  return StatusCode::FAILURE ;
70  } else{
71  ATH_MSG_INFO(" Path found = "<<filename);
72  }
73  corrFileNameList.at(i) = filename;
74  }
75  //
76 
78 
79  if (m_tool_ver_str == "REL22") tool_ver = CP::IsolationCorrection::REL22;
80  else if (m_tool_ver_str == "REL21") tool_ver = CP::IsolationCorrection::REL21;
81  else if (m_tool_ver_str == "REL20_2") tool_ver = CP::IsolationCorrection::REL20_2;
82  else if (m_tool_ver_str == "REL17_2") tool_ver = CP::IsolationCorrection::REL17_2;
83  else {
84  ATH_MSG_WARNING("Tool version not recognized: "<<m_tool_ver_str<<"\nAllowed versions: REL22, REL21, REL20_2, REL17_2");
85  return StatusCode::FAILURE;
86  }
87 
88  if(TString(corrFileNameList[0]).Contains("isolation_ptcorrections_rel17_2.root") && m_tool_ver_str != "REL17_2"){
89  ATH_MSG_WARNING("The specified correction file is not for "<<m_tool_ver_str<<" please use proper correction file");
90  return StatusCode::FAILURE;
91  }
92 
93  if (TString(corrFileNameList[0]).Contains("isolation_ptcorrections_rel20_2.root") && !( m_tool_ver_str == "REL20_2" || m_tool_ver_str == "REL21" ) ){
94  ATH_MSG_WARNING("The specified correction file is not for "<<m_tool_ver_str<<" please use proper correction file");
95  return StatusCode::FAILURE;
96  }
97  if (TString(corrFileNameList[0]).Contains("isolation_ptcorrections_rel22_") && m_tool_ver_str != "REL22" ){
98  ATH_MSG_WARNING("The specified correction file is not for "<<m_tool_ver_str<<" please use proper correction file");
99  return StatusCode::FAILURE;
100  }
101 
103  m_isol_corr->SetToolVer(tool_ver);
107 
108  // Note that systematics in Rel 21 are NOT done with the DD-Corr ON/OFF method!
109  if (m_apply_ddDefault) {
110  if (m_ddVersion == "2015" || m_ddVersion == "2015_2016" || m_ddVersion == "2017") {
111  //if not REL21, register ourselves with the systematic registry!
112  if (m_tool_ver_str!="REL21") {
114  if( registry.registerSystematics( *this ) != StatusCode::SUCCESS ) return StatusCode::FAILURE;
115  }
116  m_apply_dd = true;
117  } else {
118  ATH_MSG_WARNING("Unknown data driven correction");
119  m_apply_dd = false;
120  }
121  } else{
122  m_apply_dd = false;
123  }
124 
125  // Don't use DD Corrections for AFII if not rel21 (I do not know what was done in rel20.7 !)
126  if (m_tool_ver_str != "REL21" && m_AFII_corr) m_apply_dd = false;
127 
130 
133  if (filename.empty()){
134  ATH_MSG_ERROR ( "Could NOT resolve file name " << m_corr_etaEDParPU_file );
135  return StatusCode::FAILURE ;
136  }
137  ATH_MSG_INFO(" Path found = "<<filename);
138  std::unique_ptr<TFile> f(TFile::Open(filename.c_str(), "READ"));
139 
140  m_map_isotype_zetaPU[xAOD::Iso::topoetcone20] = std::unique_ptr<TGraph>((TGraph*)f->Get("topoetcone20"));
141  m_map_isotype_zetaPU[xAOD::Iso::topoetcone30] = std::unique_ptr<TGraph>((TGraph*)f->Get("topoetcone30"));
142  m_map_isotype_zetaPU[xAOD::Iso::topoetcone40] = std::unique_ptr<TGraph>((TGraph*)f->Get("topoetcone40"));
143  f->Close();
144 
147  if (filename.empty()){
148  ATH_MSG_ERROR ( "Could NOT resolve file name " << m_corr_etaEDPar_mc_corr_file );
149  return StatusCode::FAILURE ;
150  }
151  ATH_MSG_INFO(" Path found = "<<filename);
152  std::unique_ptr<TFile> f_corr(TFile::Open(filename.c_str(), "READ"));
153 
154  m_map_isotype_zeta_mc_corr[xAOD::Iso::topoetcone20] = std::unique_ptr<TGraph>((TGraph*)f_corr->Get("topoetcone20"));
155  m_map_isotype_zeta_mc_corr[xAOD::Iso::topoetcone30] = std::unique_ptr<TGraph>((TGraph*)f_corr->Get("topoetcone30"));
156  m_map_isotype_zeta_mc_corr[xAOD::Iso::topoetcone40] = std::unique_ptr<TGraph>((TGraph*)f_corr->Get("topoetcone40"));
157  f_corr->Close();
158  }
159  }
160 
161  return m_isol_corr->initialize();
162  }

◆ 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 88 of file AsgMetadataTool.cxx.

88  {
89 
90 #ifdef XAOD_STANDALONE
91  return &m_inputMetaStore;
92 #else // XAOD_STANDALONE
93  return m_inputMetaStore;
94 #endif // XAOD_STANDALONE
95  }

◆ isAffectedBySystematic()

bool CP::IsolationCorrectionTool::isAffectedBySystematic ( const CP::SystematicVariation systematic) const
finaloverrideprivatevirtual

Declare the interface that this class provides.

returns: whether this tool is affected by the given systematics

Implements CP::IIsolationCorrectionTool.

Definition at line 372 of file IsolationCorrectionTool.cxx.

372  {
374  return sys.find( systematic ) != sys.end();
375  }

◆ 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 xAODMaker::FileMetaDataTool, BookkeeperTool, BookkeeperDumperTool, xAODMaker::TriggerMenuMetaDataTool, and xAODMaker::TruthMetaDataTool.

Definition at line 204 of file AsgMetadataTool.cxx.

204  {
205 
206  // Return gracefully:
207  return StatusCode::SUCCESS;
208  }

◆ 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  }

◆ 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 97 of file AsgMetadataTool.cxx.

97  {
98 
99 #ifdef XAOD_STANDALONE
100  return &m_outputMetaStore;
101 #else // XAOD_STANDALONE
102  return m_outputMetaStore;
103 #endif // XAOD_STANDALONE
104  }

◆ Print()

void CP::IsolationCorrectionTool::Print ( )
inlineprivate

Definition at line 68 of file IsolationCorrectionTool.h.

68 { m_isol_corr->Print(); };

◆ print() [1/2]

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

◆ print() [2/2]

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

◆ recommendedSystematics()

CP::SystematicSet CP::IsolationCorrectionTool::recommendedSystematics ( ) const
finaloverrideprivatevirtual

the list of all systematics this tool recommends to use

Implements CP::IIsolationCorrectionTool.

Definition at line 382 of file IsolationCorrectionTool.cxx.

382  {
383  return affectingSystematics();
384  }

◆ 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  }

◆ 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 110 of file AsgMetadataTool.cxx.

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

◆ 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  }

Member Data Documentation

◆ m_AFII_corr

bool CP::IsolationCorrectionTool::m_AFII_corr
private

Definition at line 111 of file IsolationCorrectionTool.h.

◆ m_apply_dd

bool CP::IsolationCorrectionTool::m_apply_dd {}
private

Definition at line 112 of file IsolationCorrectionTool.h.

◆ m_apply_ddDefault

bool CP::IsolationCorrectionTool::m_apply_ddDefault
private

Definition at line 112 of file IsolationCorrectionTool.h.

◆ m_apply_etaEDParPU_corr

bool CP::IsolationCorrectionTool::m_apply_etaEDParPU_corr
private

Definition at line 108 of file IsolationCorrectionTool.h.

◆ m_apply_etaEDParPU_mc_corr

bool CP::IsolationCorrectionTool::m_apply_etaEDParPU_mc_corr
private

Definition at line 109 of file IsolationCorrectionTool.h.

◆ m_apply_SC_leak_corr

bool CP::IsolationCorrectionTool::m_apply_SC_leak_corr
private

Definition at line 107 of file IsolationCorrectionTool.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_centralEventShapeKey

SG::ReadHandleKey<xAOD::EventShape> CP::IsolationCorrectionTool::m_centralEventShapeKey
private
Initial value:
{
this,
"CentralEventShapeKey",
"TopoClusterIsoCentralEventShape",
""
}

Definition at line 80 of file IsolationCorrectionTool.h.

◆ m_corr_ddshift_file

std::string CP::IsolationCorrectionTool::m_corr_ddshift_file
private

Definition at line 95 of file IsolationCorrectionTool.h.

◆ m_corr_ddsmearing_file

std::string CP::IsolationCorrectionTool::m_corr_ddsmearing_file
private

Definition at line 96 of file IsolationCorrectionTool.h.

◆ m_corr_etaEDPar_mc_corr_file

std::string CP::IsolationCorrectionTool::m_corr_etaEDPar_mc_corr_file
private

Definition at line 101 of file IsolationCorrectionTool.h.

◆ m_corr_etaEDParPU_file

std::string CP::IsolationCorrectionTool::m_corr_etaEDParPU_file
private

Definition at line 100 of file IsolationCorrectionTool.h.

◆ m_corr_file

std::string CP::IsolationCorrectionTool::m_corr_file
private

Definition at line 94 of file IsolationCorrectionTool.h.

◆ m_correct_etcone

bool CP::IsolationCorrectionTool::m_correct_etcone
private

Definition at line 113 of file IsolationCorrectionTool.h.

◆ m_ddVersion

std::string CP::IsolationCorrectionTool::m_ddVersion
private

Definition at line 106 of file IsolationCorrectionTool.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_eventInfoKey

SG::ReadHandleKey<xAOD::EventInfo> CP::IsolationCorrectionTool::m_eventInfoKey
private
Initial value:
{ this,
"EventInfoKey",
"EventInfo",
"" }

Definition at line 76 of file IsolationCorrectionTool.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_forcePartType

bool CP::IsolationCorrectionTool::m_forcePartType
private

Definition at line 116 of file IsolationCorrectionTool.h.

◆ m_forwardEventShapeKey

SG::ReadHandleKey<xAOD::EventShape> CP::IsolationCorrectionTool::m_forwardEventShapeKey
private
Initial value:
{
this,
"ForwardEventShape",
"TopoClusterIsoForwardEventShape",
""
}

Definition at line 87 of file IsolationCorrectionTool.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_is_mc

bool CP::IsolationCorrectionTool::m_is_mc
private

Definition at line 110 of file IsolationCorrectionTool.h.

◆ m_isol_corr

IsolationCorrection* CP::IsolationCorrectionTool::m_isol_corr
private

Definition at line 97 of file IsolationCorrectionTool.h.

◆ m_map_isotype_zeta_mc_corr

std::map<xAOD::Iso::IsolationType, std::unique_ptr<TGraph> > CP::IsolationCorrectionTool::m_map_isotype_zeta_mc_corr
private

Definition at line 105 of file IsolationCorrectionTool.h.

◆ m_map_isotype_zetaPU

std::map<xAOD::Iso::IsolationType, std::unique_ptr<TGraph> > CP::IsolationCorrectionTool::m_map_isotype_zetaPU
private

Definition at line 103 of file IsolationCorrectionTool.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_systDDonoff

CP::SystematicVariation CP::IsolationCorrectionTool::m_systDDonoff
private

Definition at line 119 of file IsolationCorrectionTool.h.

◆ m_tool_ver_str

std::string CP::IsolationCorrectionTool::m_tool_ver_str
private

Definition at line 98 of file IsolationCorrectionTool.h.

◆ m_trouble_categories

bool CP::IsolationCorrectionTool::m_trouble_categories
private

Definition at line 114 of file IsolationCorrectionTool.h.

◆ m_useIncidents

bool asg::AsgMetadataTool::m_useIncidents
privateinherited

Definition at line 128 of file AsgMetadataTool.h.

◆ m_useLogLogFit

bool CP::IsolationCorrectionTool::m_useLogLogFit
private

Definition at line 115 of file IsolationCorrectionTool.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.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:
CP::IsolationCorrection::SetToolVer
void SetToolVer(CP::IsolationCorrection::Version)
Definition: IsolationCorrection.cxx:78
xAOD::EventShape_v1::getDensity
bool getDensity(EventDensityID id, double &v) const
Get a density variable from the object.
Definition: EventShape_v1.cxx:135
python.Dso.registry
registry
Definition: Control/AthenaServices/python/Dso.py:159
xAOD::Iso::topoetcone
@ topoetcone
Topo-cluster ET-sum.
Definition: IsolationFlavour.h:25
CP::IsolationCorrectionTool::GetDDCorrection
virtual float GetDDCorrection(const xAOD::Egamma &, xAOD::Iso::IsolationType) override final
Definition: IsolationCorrectionTool.cxx:346
CP::IsolationCorrectionTool::m_tool_ver_str
std::string m_tool_ver_str
Definition: IsolationCorrectionTool.h:98
CP::IsolationCorrectionTool::affectingSystematics
virtual CP::SystematicSet affectingSystematics() const override final
the list of all systematics this tool can be affected by
Definition: IsolationCorrectionTool.cxx:377
CP::IsolationCorrectionTool::m_centralEventShapeKey
SG::ReadHandleKey< xAOD::EventShape > m_centralEventShapeKey
Definition: IsolationCorrectionTool.h:80
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
CP::IsolationCorrection::REL20_2
@ REL20_2
Definition: PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/IsolationCorrections/IsolationCorrection.h:33
xAOD::Iso::topoetcone20
@ topoetcone20
Topo-cluster ET-sum.
Definition: IsolationType.h:48
xAOD::Electron
Electron_v1 Electron
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Electron.h:17
asg::AsgMetadataTool::beginEvent
virtual StatusCode beginEvent()
Function called when a new events is loaded.
Definition: AsgMetadataTool.cxx:196
get_generator_info.result
result
Definition: get_generator_info.py:21
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
CP::IsolationCorrection::SetTroubleCategories
void SetTroubleCategories(bool trouble_categories)
Definition: IsolationCorrection.cxx:412
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
xAOD::Iso::coreEnergy
@ coreEnergy
energy stored for this correction
Definition: Event/xAOD/xAODPrimitives/xAODPrimitives/IsolationCorrection.h:93
ParticleTest.eg
eg
Definition: ParticleTest.py:29
CP::IsolationCorrectionTool::m_forwardEventShapeKey
SG::ReadHandleKey< xAOD::EventShape > m_forwardEventShapeKey
Definition: IsolationCorrectionTool.h:87
xAOD::Iso::ptCorrection
@ ptCorrection
egamma ptcorrection
Definition: Event/xAOD/xAODPrimitives/xAODPrimitives/IsolationCorrection.h:32
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
CP::IsolationCorrectionTool::m_corr_ddsmearing_file
std::string m_corr_ddsmearing_file
Definition: IsolationCorrectionTool.h:96
CP::IsolationCorrection::Print
void Print()
Definition: IsolationCorrection.cxx:1342
CP::IsolationCorrectionTool::m_apply_SC_leak_corr
bool m_apply_SC_leak_corr
Definition: IsolationCorrectionTool.h:107
CP::IsolationCorrectionTool::m_is_mc
bool m_is_mc
Definition: IsolationCorrectionTool.h:110
CP::IsolationCorrectionTool::m_map_isotype_zeta_mc_corr
std::map< xAOD::Iso::IsolationType, std::unique_ptr< TGraph > > m_map_isotype_zeta_mc_corr
Definition: IsolationCorrectionTool.h:105
CP::SystematicSet
Class to wrap a set of SystematicVariations.
Definition: SystematicSet.h:31
CP::IsolationCorrectionTool::applyCorrection
virtual CP::CorrectionCode applyCorrection(xAOD::Egamma &) override final
Definition: IsolationCorrectionTool.cxx:209
CP::IsolationCorrectionTool::m_apply_etaEDParPU_corr
bool m_apply_etaEDParPU_corr
Definition: IsolationCorrectionTool.h:108
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
xAOD::Iso::etcone40
@ etcone40
Definition: IsolationType.h:34
xAOD::Iso::topoetcone30
@ topoetcone30
Definition: IsolationType.h:49
CP::IsolationCorrectionTool::m_corr_file
std::string m_corr_file
Definition: IsolationCorrectionTool.h:94
CP::IsolationCorrection::GetPtCorrection
float GetPtCorrection(const xAOD::Egamma &, const xAOD::Iso::IsolationType) const
Definition: IsolationCorrection.cxx:90
xAOD::Iso::etcone30
@ etcone30
Definition: IsolationType.h:33
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
CP::IsolationCorrectionTool::m_apply_etaEDParPU_mc_corr
bool m_apply_etaEDParPU_mc_corr
Definition: IsolationCorrectionTool.h:109
asg::AsgMetadataTool::endInputFile
virtual StatusCode endInputFile()
Function called when the currently open input file got completely processed.
Definition: AsgMetadataTool.cxx:188
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
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
CP::IsolationCorrectionTool::m_corr_ddshift_file
std::string m_corr_ddshift_file
Definition: IsolationCorrectionTool.h:95
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
CP::IsolationCorrection::initialize
StatusCode initialize()
Definition: IsolationCorrection.cxx:68
CP::IsolationCorrectionTool::m_corr_etaEDPar_mc_corr_file
std::string m_corr_etaEDPar_mc_corr_file
Definition: IsolationCorrectionTool.h:101
CP::IsolationCorrection::SetCorrectionFile
void SetCorrectionFile(const std::string &corr_file, const std::string &corr_ddshift_file, const std::string &corr_ddsmearing_file)
Definition: IsolationCorrection.cxx:59
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
CP::IsolationCorrection::GetDDCorrection
float GetDDCorrection(const xAOD::Egamma &, const xAOD::Iso::IsolationType, const std::string &year)
Definition: IsolationCorrection.cxx:315
xAOD::EventShape_v1::Density
@ Density
Definition: EventShape_v1.h:47
CP::IsolationCorrectionTool::m_trouble_categories
bool m_trouble_categories
Definition: IsolationCorrectionTool.h:114
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
xAOD::Iso::core57cells
@ core57cells
core 5x7 cells
Definition: Event/xAOD/xAODPrimitives/xAODPrimitives/IsolationCorrection.h:26
CP::CorrectionCode::Error
@ Error
Some error happened during the object correction.
Definition: CorrectionCode.h:36
CP::IsolationCorrection::Version
Version
Definition: PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/IsolationCorrections/IsolationCorrection.h:33
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
CP::IsolationCorrectionTool::m_forcePartType
bool m_forcePartType
Definition: IsolationCorrectionTool.h:116
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
lumiFormat.i
int i
Definition: lumiFormat.py:85
xAOD::Iso::etcone20
@ etcone20
Calorimeter isolation.
Definition: IsolationType.h:32
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
CP::IsolationCorrection::GetPtCorrectedIsolation
float GetPtCorrectedIsolation(const xAOD::Egamma &, const xAOD::Iso::IsolationType) const
Definition: IsolationCorrection.cxx:83
asg::AsgMetadataTool::beginInputFile
virtual StatusCode beginInputFile()
Function called when a new input file is opened.
Definition: AsgMetadataTool.cxx:180
master.flag
bool flag
Definition: master.py:29
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
asg::AsgMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AsgMessaging.cxx:49
asg::AsgMetadataTool::metaDataStop
virtual StatusCode metaDataStop()
Function called when the tool should write out its metadata.
Definition: AsgMetadataTool.cxx:204
CP::IsolationCorrection::REL22
@ REL22
Definition: PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/IsolationCorrections/IsolationCorrection.h:33
python.xAODType.dummy
dummy
Definition: xAODType.py:4
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MSG::name
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition: MsgLevel.cxx:19
hist_file_dump.f
f
Definition: hist_file_dump.py:135
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
CP::IsolationCorrectionTool::m_eventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition: IsolationCorrectionTool.h:76
CP::IsolationCorrection::REL21
@ REL21
Definition: PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/IsolationCorrections/IsolationCorrection.h:33
xAOD::EventShape_v1
Data class for event shapes.
Definition: EventShape_v1.h:28
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
merge.output
output
Definition: merge.py:17
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
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
CP::IsolationCorrectionTool::m_map_isotype_zetaPU
std::map< xAOD::Iso::IsolationType, std::unique_ptr< TGraph > > m_map_isotype_zetaPU
Definition: IsolationCorrectionTool.h:103
xAOD::Iso::coreCone
@ coreCone
core energy (in dR<0.1).
Definition: Event/xAOD/xAODPrimitives/xAODPrimitives/IsolationCorrection.h:29
xAOD::Electron_v1
Definition: Electron_v1.h:34
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
xAOD::Photon
Photon_v1 Photon
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Photon.h:17
PathResolverFindCalibFile
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Definition: PathResolver.cxx:431
CP::IsolationCorrectionTool::m_ddVersion
std::string m_ddVersion
Definition: IsolationCorrectionTool.h:106
CP::IsolationCorrectionTool::m_corr_etaEDParPU_file
std::string m_corr_etaEDParPU_file
Definition: IsolationCorrectionTool.h:100
CP::CorrectionCode::Ok
@ Ok
The correction was done successfully.
Definition: CorrectionCode.h:38
a
TList * a
Definition: liststreamerinfos.cxx:10
h
CP::IsolationCorrection::ForcePartType
void ForcePartType(bool b)
Definition: PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/IsolationCorrections/IsolationCorrection.h:50
xAOD::Photon_v1
Definition: Photon_v1.h:37
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
CP::SystematicRegistry
This module implements the central registry for handling systematic uncertainties with CP tools.
Definition: SystematicRegistry.h:25
CP::IsolationCorrectionTool::GetPtCorrection
virtual float GetPtCorrection(const xAOD::Egamma &, xAOD::Iso::IsolationType) const override final
Definition: IsolationCorrectionTool.cxx:342
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
CP::IsolationCorrectionTool::m_isol_corr
IsolationCorrection * m_isol_corr
Definition: IsolationCorrectionTool.h:97
CP::IsolationCorrectionTool::m_useLogLogFit
bool m_useLogLogFit
Definition: IsolationCorrectionTool.h:115
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
CP::IsolationCorrectionTool::m_apply_dd
bool m_apply_dd
Definition: IsolationCorrectionTool.h:112
CP::IsolationCorrection::GetEtaPointing
float GetEtaPointing(const xAOD::Egamma *)
Definition: IsolationCorrection.cxx:372
CaloCellTimeCorrFiller.filename
filename
Definition: CaloCellTimeCorrFiller.py:24
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
CP::IsolationCorrection::REL17_2
@ REL17_2
Definition: PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/IsolationCorrections/IsolationCorrection.h:33
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
CP::IsolationCorrectionTool::m_AFII_corr
bool m_AFII_corr
Definition: IsolationCorrectionTool.h:111
CP::IsolationCorrectionTool::m_correct_etcone
bool m_correct_etcone
Definition: IsolationCorrectionTool.h:113
xAOD::Iso::topoetcone40
@ topoetcone40
Definition: IsolationType.h:50
area
double area(double R)
Definition: ConvertStaveServices.cxx:42
SG::DataProxy
Definition: DataProxy.h:45
CP::IsolationCorrection::FitType
void FitType(bool b)
Definition: PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/IsolationCorrections/IsolationCorrection.h:49
CP::IsolationCorrection::SetAFII
void SetAFII(bool AFII_corr)
Definition: IsolationCorrection.cxx:397
xAOD::Iso::coneSize
float coneSize(IsolationConeSize type)
convert Isolation Size into cone size
Definition: IsolationHelpers.h:27
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
CP::IsolationCorrectionTool::m_apply_ddDefault
bool m_apply_ddDefault
Definition: IsolationCorrectionTool.h:112
fitman.k
k
Definition: fitman.py:528
CP::IsolationCorrection::SetDataMC
void SetDataMC(bool is_mc)
Definition: IsolationCorrection.cxx:392
xAOD::Iso::pileupCorrection
@ pileupCorrection
fully corrected
Definition: Event/xAOD/xAODPrimitives/xAODPrimitives/IsolationCorrection.h:35
CP::SystematicRegistry::getInstance
static SystematicRegistry & getInstance()
Get the singleton instance of the registry for the curren thread.
Definition: SystematicRegistry.cxx:25
ServiceHandle< IIncidentSvc >
asg::AsgMetadataTool::m_useIncidents
bool m_useIncidents
Definition: AsgMetadataTool.h:128