ATLAS Offline Software
EGElectronLikelihoodToolWrapper.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // Author: Giovanni Marchiori (giovanni.marchiori@cern.ch)
6 // Note: while EGSelectionToolWrapper permits to only store the boolean
7 // accept and the isEM-like mask (works for both isEM and likelihood selectors),
8 // this tool (EGElectronLikelihoodToolWrapper) allows also to store
9 // the double TResult output (i.e. the value of the likelihood or the ECIDS BDT)
10 // if StoreTResult is set to true. Otherwise one can simply use the other tool.
11 
12 #ifndef DERIVATIONFRAMEWORK_EGELECTRONLIKELIHOODTOOLWRAPPER_H
13 #define DERIVATIONFRAMEWORK_EGELECTRONLIKELIHOODTOOLWRAPPER_H
15 //
16 #include "StoreGate/ReadHandle.h"
21 //
22 #include "AsgTools/IAsgTool.h"
26 #include "GaudiKernel/ToolHandle.h"
28 //
29 #include <string>
30 
31 namespace DerivationFramework {
32 
33  class EGElectronLikelihoodToolWrapper : public extends<AthAlgTool, IAugmentationTool>
34  {
35  public:
36 
37  using base_class::base_class;
38 
39  virtual StatusCode initialize() override final;
40  virtual StatusCode addBranches(const EventContext& ctx) const override final;
41 
42  private:
43  ToolHandle<IAsgElectronLikelihoodTool> m_tool{
44  this,
45  "EGammaElectronLikelihoodTool",
46  "",
47  "Electron Likelihood Selector"
48  };
49  ToolHandle<IElectronPhotonShowerShapeFudgeTool>
50  m_fudgeMCTool{ this, "EGammaFudgeMCTool", "", "Fudging tool" };
51 
53  "ContainerName",
54  "",
55  "Input" };
56 
57  // Write decoration handle keys
59  m_decoratorPass{ this, "decoratorPass", m_ContainerName, "", "" };
61  m_decoratorIsEM{ this, "decoratorIsEM", m_ContainerName, "", "" };
63  m_decoratorResult{ this, "decoratorResult", m_ContainerName, "", "" };
65  m_decoratorMultipleOutputs{this, "decoratorMultipleOutputs", m_ContainerName, {}, ""};
66  Gaudi::Property<std::string> m_cut{this, "CutType", ""};
67  Gaudi::Property<bool> m_storeTResult{this, "StoreTResult", false};
68  Gaudi::Property<bool> m_storeMultipleOutputs{this, "StoreMultipleOutputs", false};
69  };
70 }
71 
72 #endif // DERIVATIONFRAMEWORK_EGELECTRONLIKELIHOODTOOLWRAPPER_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition: StoreGate/StoreGate/WriteDecorHandleKey.h:89
DerivationFramework::EGElectronLikelihoodToolWrapper::m_fudgeMCTool
ToolHandle< IElectronPhotonShowerShapeFudgeTool > m_fudgeMCTool
Definition: EGElectronLikelihoodToolWrapper.h:50
IAugmentationTool.h
DerivationFramework::EGElectronLikelihoodToolWrapper::m_decoratorIsEM
SG::WriteDecorHandleKey< xAOD::EgammaContainer > m_decoratorIsEM
Definition: EGElectronLikelihoodToolWrapper.h:61
DerivationFramework::EGElectronLikelihoodToolWrapper::m_storeTResult
Gaudi::Property< bool > m_storeTResult
Definition: EGElectronLikelihoodToolWrapper.h:67
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:45
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
DerivationFramework::EGElectronLikelihoodToolWrapper::addBranches
virtual StatusCode addBranches(const EventContext &ctx) const override final
Definition: EGElectronLikelihoodToolWrapper.cxx:41
EgammaContainer.h
IElectronPhotonShowerShapeFudgeTool.h
IAsgElectronLikelihoodTool.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
DerivationFramework::EGElectronLikelihoodToolWrapper::m_decoratorPass
SG::WriteDecorHandleKey< xAOD::EgammaContainer > m_decoratorPass
Definition: EGElectronLikelihoodToolWrapper.h:59
AthAlgTool.h
WriteDecorHandle.h
Handle class for adding a decoration to an object.
DerivationFramework::EGElectronLikelihoodToolWrapper::initialize
virtual StatusCode initialize() override final
Definition: EGElectronLikelihoodToolWrapper.cxx:20
DerivationFramework
THE reconstruction tool.
Definition: ParticleSortingAlg.h:24
DerivationFramework::EGElectronLikelihoodToolWrapper::m_ContainerName
SG::ReadHandleKey< xAOD::EgammaContainer > m_ContainerName
Definition: EGElectronLikelihoodToolWrapper.h:52
IAsgTool.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
DerivationFramework::EGElectronLikelihoodToolWrapper::m_decoratorResult
SG::WriteDecorHandleKey< xAOD::EgammaContainer > m_decoratorResult
Definition: EGElectronLikelihoodToolWrapper.h:63
DerivationFramework::EGElectronLikelihoodToolWrapper::m_tool
ToolHandle< IAsgElectronLikelihoodTool > m_tool
Definition: EGElectronLikelihoodToolWrapper.h:43
DerivationFramework::EGElectronLikelihoodToolWrapper
Definition: EGElectronLikelihoodToolWrapper.h:34
DerivationFramework::EGElectronLikelihoodToolWrapper::m_decoratorMultipleOutputs
SG::WriteDecorHandleKeyArray< xAOD::EgammaContainer, float > m_decoratorMultipleOutputs
Definition: EGElectronLikelihoodToolWrapper.h:65
DerivationFramework::EGElectronLikelihoodToolWrapper::m_cut
Gaudi::Property< std::string > m_cut
Definition: EGElectronLikelihoodToolWrapper.h:66
WriteDecorHandleKeyArray.h
DerivationFramework::EGElectronLikelihoodToolWrapper::m_storeMultipleOutputs
Gaudi::Property< bool > m_storeMultipleOutputs
Definition: EGElectronLikelihoodToolWrapper.h:68
ReadHandle.h
Handle class for reading from StoreGate.