ATLAS Offline Software
JetManagerTool.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 #ifndef Jet_Manager_H
6 #define Jet_Manager_H
7 
9 
11 #include "AsgTools/AsgTool.h"
12 #include "AsgTools/ToolHandle.h"
16 
17 #include "xAODJet/JetAttributes.h"
18 #include "xAODJet/JetContainer.h"
23 
25 
26 #include "TLorentzVector.h"
27 #include <string>
28 #include <vector>
29 
30 namespace Trig {
31 
32  class JetManagerTool :
33  public asg::AsgTool {
35  public:
36  JetManagerTool(const std::string& name);
37  virtual ~JetManagerTool() = default;
38 
39  virtual StatusCode initialize() override;
40 
41  StatusCode retrieveByContainer(const EventContext& ctx,
42  EmulContext& emulCtx) const;
43 
44  const std::string& jetContainerName() const;
45  const std::string& bjetContainerName() const;
46 
47  const std::vector<TrigBtagEmulationJet>& getJets(const EmulContext& emulCtx) const;
48  const std::vector<TrigBtagEmulationJet>& getSortedPreselJets(const EmulContext& emulCtx) const;
49 
50  private:
51  // These are set in the initialize method given JetContainerName
52  SG::ReadHandleKey< xAOD::JetContainer > m_jetInputKey {this, "InputJets", "", "Input Jet Collection Key, retrieved from reconstructed jets"};
53  SG::ReadHandleKey< xAOD::JetContainer > m_bjetInputKey {this, "InputBJets", "", "Input b-Jet Collection Key, retrieved from reconstructed jets"};
54  SG::ReadHandleKey< xAOD::BTaggingContainer > m_btagInputKey {this, "InputBTag", "HLT_xAOD__BTaggingContainer_HLTBjetFex", "Run2 input b-tag Collection Key"};
55 
56  Gaudi::Property<std::string> m_btagging_link {this, "BTaggingLink", "btaggingLink"};
57  Gaudi::Property<std::string> m_jetcontainer {this, "JetContainerName", "", "Jet Container"};
58  Gaudi::Property<int> m_LHCPeriod {this, "LHCPeriod", 3, "LHC Period Run2 or Run3"};
59 
60  bool matchedSPLITjet(const xAOD::Jet*, const xAOD::Jet*) const;
61  };
62 
63  inline const std::string& JetManagerTool::jetContainerName() const { return m_jetInputKey.key(); }
64  inline const std::string& JetManagerTool::bjetContainerName() const { return m_bjetInputKey.key(); }
65 } // namespace
66 
67 #endif
Trig::JetManagerTool::m_btagging_link
Gaudi::Property< std::string > m_btagging_link
Definition: JetManagerTool.h:56
BTaggingUtilities.h
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
PropertyWrapper.h
Trig
The common trigger namespace for trigger analysis tools.
Definition: LArCellMonAlg.h:33
CurrentContext.h
Trig::JetManagerTool::m_bjetInputKey
SG::ReadHandleKey< xAOD::JetContainer > m_bjetInputKey
Definition: JetManagerTool.h:53
EmulContext.h
JetAttributes.h
Trig::JetManagerTool
Definition: JetManagerTool.h:33
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
SG::ReadHandleKey< xAOD::JetContainer >
Trig::JetManagerTool::~JetManagerTool
virtual ~JetManagerTool()=default
Trig::JetManagerTool::retrieveByContainer
StatusCode retrieveByContainer(const EventContext &ctx, EmulContext &emulCtx) const
Definition: JetManagerTool.cxx:32
AsgMessaging.h
BTaggingAuxContainer.h
Trig::JetManagerTool::m_LHCPeriod
Gaudi::Property< int > m_LHCPeriod
Definition: JetManagerTool.h:58
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.
ASG_TOOL_CLASS0
#define ASG_TOOL_CLASS0(CLASSNAME)
Definition: AsgToolMacros.h:62
Trig::JetManagerTool::m_btagInputKey
SG::ReadHandleKey< xAOD::BTaggingContainer > m_btagInputKey
Definition: JetManagerTool.h:54
Trig::EmulContext
Definition: EmulContext.h:16
Trig::JetManagerTool::JetManagerTool
JetManagerTool(const std::string &name)
Definition: JetManagerTool.cxx:12
Trig::JetManagerTool::jetContainerName
const std::string & jetContainerName() const
Definition: JetManagerTool.h:63
BTaggingContainer.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
TrigBtagEmulationJet.h
Trig::JetManagerTool::bjetContainerName
const std::string & bjetContainerName() const
Definition: JetManagerTool.h:64
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
Trig::JetManagerTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: JetManagerTool.cxx:16
JetContainer.h
Trig::JetManagerTool::m_jetInputKey
SG::ReadHandleKey< xAOD::JetContainer > m_jetInputKey
Definition: JetManagerTool.h:52
JetAuxContainer.h
Trig::JetManagerTool::getJets
const std::vector< TrigBtagEmulationJet > & getJets(const EmulContext &emulCtx) const
Definition: JetManagerTool.cxx:195
Trig::JetManagerTool::matchedSPLITjet
bool matchedSPLITjet(const xAOD::Jet *, const xAOD::Jet *) const
Definition: JetManagerTool.cxx:204
ToolHandle.h
AsgTool.h
Trig::JetManagerTool::m_jetcontainer
Gaudi::Property< std::string > m_jetcontainer
Definition: JetManagerTool.h:57
Trig::JetManagerTool::getSortedPreselJets
const std::vector< TrigBtagEmulationJet > & getSortedPreselJets(const EmulContext &emulCtx) const
Definition: JetManagerTool.cxx:199