ATLAS Offline Software
EGElectronLikelihoodToolWrapper.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // EGLikelihoodToolWrapper.h, (c) ATLAS Detector software
8 // Author: Giovanni Marchiori (giovanni.marchiori@cern.ch)
9 // Note: while EGSelectionToolWrapper permits to only store the boolean
10 // accept and the isEM-like mask (works for both isEM and likelihood selectors),
11 // this tool (EGElectronLikelihoodToolWrapper) allows also to store
12 // the double TResult output (i.e. the value of the likelihood or the ECIDS BDT)
13 // if StoreTResult is set to true. Otherwise one can simply use the other tool.
14 
15 #ifndef DERIVATIONFRAMEWORK_EGELECTRONLIKELIHOODTOOLWRAPPER_H
16 #define DERIVATIONFRAMEWORK_EGELECTRONLIKELIHOODTOOLWRAPPER_H
18 //
19 #include "StoreGate/ReadHandle.h"
24 //
25 #include "AsgTools/IAsgTool.h"
29 #include "GaudiKernel/ToolHandle.h"
31 //
32 #include <string>
33 
34 namespace DerivationFramework {
35 
37  : public AthAlgTool
38  , public IAugmentationTool
39 {
40 public:
41  EGElectronLikelihoodToolWrapper(const std::string& t,
42  const std::string& n,
43  const IInterface* p);
44 
45  virtual StatusCode initialize() override final;
46  virtual StatusCode addBranches() const override final;
47 
48 private:
49  ToolHandle<IAsgElectronLikelihoodTool> m_tool{
50  this,
51  "EGammaElectronLikelihoodTool",
52  "",
53  "Electron Likelihood Selector"
54  };
55  ToolHandle<IElectronPhotonShowerShapeFudgeTool>
56  m_fudgeMCTool{ this, "EGammaFudgeMCTool", "", "Fudging tool" };
57 
59  "ContainerName",
60  "",
61  "Input" };
62 
63  // Write decoration handle keys
65  m_decoratorPass{ this, "decoratorPass", "", "" };
67  m_decoratorIsEM{ this, "decoratorIsEM", "", "" };
69  m_decoratorResult{ this, "decoratorResult", "", "" };
71  m_decoratorMultipleOutputs{this, "decoratorMultipleOutputs", {}, ""};
72  std::string m_cut;
73  std::string m_sgName;
75  std::vector<std::string> m_sgMultipleNames;
77 };
78 }
79 
80 #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:56
DerivationFramework::EGElectronLikelihoodToolWrapper::m_sgName
std::string m_sgName
Definition: EGElectronLikelihoodToolWrapper.h:73
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
IAugmentationTool.h
DerivationFramework::EGElectronLikelihoodToolWrapper::m_decoratorIsEM
SG::WriteDecorHandleKey< xAOD::EgammaContainer > m_decoratorIsEM
Definition: EGElectronLikelihoodToolWrapper.h:67
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
DerivationFramework::IAugmentationTool
Definition: IAugmentationTool.h:24
DerivationFramework::EGElectronLikelihoodToolWrapper::EGElectronLikelihoodToolWrapper
EGElectronLikelihoodToolWrapper(const std::string &t, const std::string &n, const IInterface *p)
Definition: EGElectronLikelihoodToolWrapper.cxx:22
DerivationFramework::EGElectronLikelihoodToolWrapper::addBranches
virtual StatusCode addBranches() const override final
Pass the thinning service
Definition: EGElectronLikelihoodToolWrapper.cxx:78
EgammaContainer.h
IElectronPhotonShowerShapeFudgeTool.h
IAsgElectronLikelihoodTool.h
beamspotman.n
n
Definition: beamspotman.py:731
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:65
AthAlgTool.h
WriteDecorHandle.h
Handle class for adding a decoration to an object.
DerivationFramework::EGElectronLikelihoodToolWrapper::m_storeTResult
bool m_storeTResult
Definition: EGElectronLikelihoodToolWrapper.h:74
DerivationFramework::EGElectronLikelihoodToolWrapper::initialize
virtual StatusCode initialize() override final
Definition: EGElectronLikelihoodToolWrapper.cxx:42
DerivationFramework::EGElectronLikelihoodToolWrapper::m_storeMultipleOutputs
bool m_storeMultipleOutputs
Definition: EGElectronLikelihoodToolWrapper.h:76
DerivationFramework::EGElectronLikelihoodToolWrapper::m_cut
std::string m_cut
Definition: EGElectronLikelihoodToolWrapper.h:72
DerivationFramework
THE reconstruction tool.
Definition: ParticleSortingAlg.h:24
DerivationFramework::EGElectronLikelihoodToolWrapper::m_ContainerName
SG::ReadHandleKey< xAOD::EgammaContainer > m_ContainerName
Definition: EGElectronLikelihoodToolWrapper.h:58
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:69
DerivationFramework::EGElectronLikelihoodToolWrapper::m_tool
ToolHandle< IAsgElectronLikelihoodTool > m_tool
Definition: EGElectronLikelihoodToolWrapper.h:49
DerivationFramework::EGElectronLikelihoodToolWrapper
Definition: EGElectronLikelihoodToolWrapper.h:39
DerivationFramework::EGElectronLikelihoodToolWrapper::m_decoratorMultipleOutputs
SG::WriteDecorHandleKeyArray< xAOD::EgammaContainer, float > m_decoratorMultipleOutputs
Definition: EGElectronLikelihoodToolWrapper.h:71
WriteDecorHandleKeyArray.h
DerivationFramework::EGElectronLikelihoodToolWrapper::m_sgMultipleNames
std::vector< std::string > m_sgMultipleNames
Definition: EGElectronLikelihoodToolWrapper.h:75
ReadHandle.h
Handle class for reading from StoreGate.
AthAlgTool
Definition: AthAlgTool.h:26