ATLAS Offline Software
JetManagerTool.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef Jet_Manager_H
6 #define Jet_Manager_H
7 
10 
11 #include "GaudiKernel/ToolHandle.h"
13 
14 #include "xAODJet/JetAttributes.h"
15 #include "xAODJet/JetContainer.h"
20 
22 
23 #include "TLorentzVector.h"
24 #include <string>
25 #include <vector>
26 
27 namespace Trig {
28 
29  class JetManagerTool :
30  public AthAlgTool {
31  public:
32  JetManagerTool(const std::string& type,
33  const std::string& name,
34  const IInterface* parent);
35  virtual ~JetManagerTool() = default;
36 
37  virtual StatusCode initialize() override;
38 
39  StatusCode retrieveByContainer(const EventContext& ctx,
40  EmulContext& emulCtx) const;
41 
42  const std::string& jetContainerName() const;
43  const std::string& bjetContainerName() const;
44 
45  const std::vector<TrigBtagEmulationJet>& getJets(const EmulContext& emulCtx) const;
46  const std::vector<TrigBtagEmulationJet>& getSortedPreselJets(const EmulContext& emulCtx) const;
47 
48  private:
49  // These are set in the initialize method given JetContainerName
50  SG::ReadHandleKey< xAOD::JetContainer > m_jetInputKey {this, "InputJets", "", "Input Jet Collection Key, retrieved from reconstructed jets"};
51  SG::ReadHandleKey< xAOD::JetContainer > m_bjetInputKey {this, "InputBJets", "", "Input b-Jet Collection Key, retrieved from reconstructed jets"};
52 
53  Gaudi::Property<std::string> m_btagging_link {this, "BTaggingLink", "btaggingLink"};
54  Gaudi::Property<std::string> m_jetcontainer {this, "JetContainerName", "", "Jet Container"};
55  };
56 
57  inline const std::string& JetManagerTool::jetContainerName() const { return m_jetInputKey.key(); }
58  inline const std::string& JetManagerTool::bjetContainerName() const { return m_bjetInputKey.key(); }
59 } // namespace
60 
61 #endif
Trig::JetManagerTool::m_btagging_link
Gaudi::Property< std::string > m_btagging_link
Definition: JetManagerTool.h:53
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
BTaggingUtilities.h
Trig::JetManagerTool::JetManagerTool
JetManagerTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: JetManagerTool.cxx:11
Trig
The common trigger namespace for trigger analysis tools.
Definition: LArCellMonAlg.h:33
Trig::JetManagerTool::m_bjetInputKey
SG::ReadHandleKey< xAOD::JetContainer > m_bjetInputKey
Definition: JetManagerTool.h:51
EmulContext.h
JetAttributes.h
Trig::JetManagerTool
Definition: JetManagerTool.h:30
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
Trig::JetManagerTool::~JetManagerTool
virtual ~JetManagerTool()=default
Trig::JetManagerTool::retrieveByContainer
StatusCode retrieveByContainer(const EventContext &ctx, EmulContext &emulCtx) const
Definition: JetManagerTool.cxx:29
BTaggingAuxContainer.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Trig::EmulContext
Definition: EmulContext.h:16
Trig::JetManagerTool::jetContainerName
const std::string & jetContainerName() const
Definition: JetManagerTool.h:57
BTaggingContainer.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
TrigBtagEmulationJet.h
Trig::JetManagerTool::bjetContainerName
const std::string & bjetContainerName() const
Definition: JetManagerTool.h:58
Trig::JetManagerTool::initialize
virtual StatusCode initialize() override
Definition: JetManagerTool.cxx:17
JetContainer.h
Trig::JetManagerTool::m_jetInputKey
SG::ReadHandleKey< xAOD::JetContainer > m_jetInputKey
Definition: JetManagerTool.h:50
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
JetAuxContainer.h
Trig::JetManagerTool::getJets
const std::vector< TrigBtagEmulationJet > & getJets(const EmulContext &emulCtx) const
Definition: JetManagerTool.cxx:111
AthAlgTool
Definition: AthAlgTool.h:26
Trig::JetManagerTool::m_jetcontainer
Gaudi::Property< std::string > m_jetcontainer
Definition: JetManagerTool.h:54
Trig::JetManagerTool::getSortedPreselJets
const std::vector< TrigBtagEmulationJet > & getSortedPreselJets(const EmulContext &emulCtx) const
Definition: JetManagerTool.cxx:115