ATLAS Offline Software
JetOriginCorrectionTool.h
Go to the documentation of this file.
1 // JetOriginCorrectionTool.h -*- C++ -*-
2 
3 /*
4  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef JetMomentTools_JetOriginCorrectionTool_H
8 #define JetMomentTools_JetOriginCorrectionTool_H
9 
25 
26 #include "AsgTools/AsgTool.h"
32 #include "xAODJet/JetContainer.h"
34 
36  virtual public IJetDecorator {
38 
39 public:
40 
42  JetOriginCorrectionTool(const std::string& myname);
43 
46  StatusCode decorate(const xAOD::JetContainer& jet) const override;
47  virtual StatusCode initialize() override;
48 
49  protected:
50 
51  Gaudi::Property<std::string> m_correctionName{this, "OriginCorrectedName", "JetOriginConstitScaleMomentum", "Origin corrected name"};
52  Gaudi::Property<std::string> m_jetContainerName{this, "JetContainer", "", "SG key for the input jet container"};
53  Gaudi::Property<bool> m_onlyAssignPV{this, "OnlyAssignPV", false, "Only write out PV information"};
54  Gaudi::Property<bool> m_forceEMScale{this, "ForceEMScale", false, "Force apply origin correction at EM scale"};
55 
56 private:
57 
58  SG::ReadHandleKey<xAOD::VertexContainer> m_vertexContainer_key{this, "VertexContainer", "PrimaryVertices", "Primary vertex container name"};
59  SG::ReadHandleKey<xAOD::EventInfo> m_eventInfo_key{this, "EventInfoName", "EventInfo", "Event info name"};
60 
61  Gaudi::Property<std::string> m_scaleMomentumName{this, "jetScaleMomentName", "JetOriginConstitScaleMomentum", "SG key for JetScaleMomentum components"};
62  SG::WriteDecorHandleKey<xAOD::JetContainer> m_scaleMomentumPtKey{this, "JetScaleMomentumPtName", "pt", "SG suffix for output JetScaleMomentum (pt) decorator"};
63  SG::WriteDecorHandleKey<xAOD::JetContainer> m_scaleMomentumPhiKey{this, "JetScaleMomentumPhiName", "phi", "SG suffix for output JetScaleMomentum (phi) decorator"};
64  SG::WriteDecorHandleKey<xAOD::JetContainer> m_scaleMomentumEtaKey{this, "JetScaleMomentumEtaName", "eta", "SG suffix for output JetScaleMomentum (eta) decorator"};
65  SG::WriteDecorHandleKey<xAOD::JetContainer> m_scaleMomentumMKey{this, "JetScaleMomentumMName", "m", "SG suffix for output JetScaleMomentum (mass) decorator"};
66  SG::WriteDecorHandleKey<xAOD::JetContainer> m_originVertexKey{this, "OriginVertexName", "OriginVertex", "SG key for output OriginVertex decorator"};
67 };
68 
69 #endif
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition: StoreGate/StoreGate/WriteDecorHandleKey.h:89
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
PropertyWrapper.h
JetOriginCorrectionTool::m_jetContainerName
Gaudi::Property< std::string > m_jetContainerName
Definition: JetOriginCorrectionTool.h:52
JetOriginCorrectionTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: JetOriginCorrectionTool.cxx:25
JetOriginCorrectionTool
Definition: JetOriginCorrectionTool.h:36
JetOriginCorrectionTool::m_correctionName
Gaudi::Property< std::string > m_correctionName
Definition: JetOriginCorrectionTool.h:51
IJetDecorator
Interface for adding a decoration to a jet container.
Definition: IJetDecorator.h:21
JetOriginCorrectionTool::m_scaleMomentumEtaKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_scaleMomentumEtaKey
Definition: JetOriginCorrectionTool.h:64
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
IJetDecorator.h
JetOriginCorrectionTool::JetOriginCorrectionTool
JetOriginCorrectionTool(const std::string &myname)
Constructor from tool name.
Definition: JetOriginCorrectionTool.cxx:17
JetOriginCorrectionTool::m_originVertexKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_originVertexKey
Definition: JetOriginCorrectionTool.h:66
JetOriginCorrectionTool::m_eventInfo_key
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo_key
Definition: JetOriginCorrectionTool.h:59
JetOriginCorrectionTool::m_scaleMomentumName
Gaudi::Property< std::string > m_scaleMomentumName
Definition: JetOriginCorrectionTool.h:61
JetOriginCorrectionTool::m_scaleMomentumPhiKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_scaleMomentumPhiKey
Definition: JetOriginCorrectionTool.h:63
JetOriginCorrectionTool::m_vertexContainer_key
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexContainer_key
Definition: JetOriginCorrectionTool.h:58
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
JetOriginCorrectionTool::m_onlyAssignPV
Gaudi::Property< bool > m_onlyAssignPV
Definition: JetOriginCorrectionTool.h:53
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
EventInfo.h
WriteDecorHandleKey.h
JetOriginCorrectionTool::decorate
StatusCode decorate(const xAOD::JetContainer &jet) const override
Inherited method to modify a jet container.
Definition: JetOriginCorrectionTool.cxx:50
VertexContainer.h
JetContainer.h
JetOriginCorrectionTool::m_scaleMomentumPtKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_scaleMomentumPtKey
Definition: JetOriginCorrectionTool.h:62
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
JetOriginCorrectionTool::m_scaleMomentumMKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_scaleMomentumMKey
Definition: JetOriginCorrectionTool.h:65
AsgTool.h
JetOriginCorrectionTool::m_forceEMScale
Gaudi::Property< bool > m_forceEMScale
Definition: JetOriginCorrectionTool.h:54