ATLAS Offline Software
Loading...
Searching...
No Matches
TrigJetHypoTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIGJETHYPOTOOL_H
6#define TRIGJETHYPOTOOL_H
7/********************************************************************
8 *
9 * NAME: TrigJetHypoTool.h
10 * PACKAGE: Trigger/TrigHypothesis/TrigHLTJetHypo
11 *
12 *
13 *********************************************************************/
14
15
20
22
25
26#include <string>
27#include <vector>
28#include <atomic>
29#include <utility>//std::pair
30
32
33public:
34
35 TrigJetHypoTool(const std::string& type,
36 const std::string& name,
37 const IInterface* parent);
38
40 StatusCode initialize();
41 StatusCode finalize();
42
43 // typedef for passing jet - decision object assocation
44 using JetDecision = std::pair<const xAOD::Jet*,TrigCompositeUtils::Decision*>;
45
46 StatusCode
47 decide(const xAOD::JetContainer* jets,
48 const TrigCompositeUtils::DecisionIDContainer& previousDecisionIDs,
49 std::vector<JetDecision>& jetHypoInputs) const;
50
51 const HLT::Identifier& getID(std::size_t) const;
52 const std::vector<HLT::Identifier>& getIDs() const;
53
54 private:
55
56 // Identifies is used to keep track of which tool made which decision.
57 // The information is stored in the event store.
58 // There will be as many entries in the IDs vector as there are chain parts.
59 // Howver, the zeroth entry is calculated differently for one and multi
60 // chain part chains.
61
62 // single chainpart ID, claculated from name of Algorithm
63 // use this to determine whether the hypo should run.
65
66 //single and Multi chaionpart IDs
67 // if single chain part then single entry, same as m_desionId
68 // else one entry per chain part. the zeroth welement is calculated
69 // using m_decisionID and the chain part index = 0
70 // use these IDs to report participating jets "by leg"
71 std::vector<HLT::Identifier> m_decisionIDs{};
72
73 ToolHandle<ITrigJetHypoToolHelper> m_helper {
74 this, "helper_tool", {}, "Jet hypo helper AlgTool"};
75
76 Gaudi::Property<std::size_t> m_startLabelIndex { // no of chain parts + 1
77 this, "startLabelIndex", {0}, "start value for leg indices"};
78
79 Gaudi::Property<std::size_t> m_endLabelIndex { // no of chain parts + 1
80 this, "endLabelIndex", {0}, "end value for leg indices"};
81
82 Gaudi::Property<bool> m_visitDebug {
83 this, "visit_debug", false, "debug flag"};
84
85 Gaudi::Property<std::string> m_chainName {
86 this, "chain_name", {}, "chain name"};
87
88
89 mutable std::atomic<size_t> m_id = 0;
90
91 ToolHandle<GenericMonitoringTool> m_monTool{this,"MonTool","","Monitoring tool"};
92
93 StatusCode
95 const std::unique_ptr<ITrigJetHypoInfoCollector>&) const;
96
97 StatusCode
99 const std::vector<JetDecision>& jetHypoInputs) const;
100
101 StatusCode
102 reportLeg(const std::vector<const xAOD::Jet*>& jets,
103 const std::vector<JetDecision>& jetHypoInputs,
104 int legInd) const;
105
106 bool
107 inputJetParticipates(const std::vector<const xAOD::Jet*>& jets,
108 const JetDecision& pair) const;
109
110};
111#endif
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
StatusCode checkPassingJets(const xAODJetCollector &, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const
std::vector< HLT::Identifier > m_decisionIDs
StatusCode finalize()
std::atomic< size_t > m_id
TrigJetHypoTool(const std::string &type, const std::string &name, const IInterface *parent)
StatusCode reportLeg(const std::vector< const xAOD::Jet * > &jets, const std::vector< JetDecision > &jetHypoInputs, int legInd) const
std::pair< const xAOD::Jet *, TrigCompositeUtils::Decision * > JetDecision
ToolHandle< ITrigJetHypoToolHelper > m_helper
Gaudi::Property< std::size_t > m_endLabelIndex
Gaudi::Property< bool > m_visitDebug
const std::vector< HLT::Identifier > & getIDs() const
Gaudi::Property< std::string > m_chainName
ToolHandle< GenericMonitoringTool > m_monTool
const HLT::Identifier & getID(std::size_t) const
StatusCode initialize()
Gaudi::Property< std::size_t > m_startLabelIndex
HLT::Identifier m_decisionID
StatusCode decide(const xAOD::JetContainer *jets, const TrigCompositeUtils::DecisionIDContainer &previousDecisionIDs, std::vector< JetDecision > &jetHypoInputs) const
bool inputJetParticipates(const std::vector< const xAOD::Jet * > &jets, const JetDecision &pair) const
StatusCode reportPassingJets(const xAODJetCollector &, const std::vector< JetDecision > &jetHypoInputs) const
STL class.
std::set< DecisionID > DecisionIDContainer
JetContainer_v1 JetContainer
Definition of the current "jet container version".