ATLAS Offline Software
Loading...
Searching...
No Matches
TrigJetHypoTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 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 <optional>
28
30
31public:
32
33 TrigJetHypoTool(const std::string& type,
34 const std::string& name,
35 const IInterface* parent);
36
38 StatusCode initialize();
39 StatusCode finalize();
40
41 // typedef for passing jet - decision object assocation
42 using JetDecision = std::pair<const xAOD::Jet*,TrigCompositeUtils::Decision*>;
43
44 StatusCode
45 decide(const xAOD::JetContainer* jets,
46 const TrigCompositeUtils::DecisionIDContainer& previousDecisionIDs,
47 std::vector<JetDecision>& jetHypoInputs) const;
48
49 const HLT::Identifier& getID(std::size_t) const;
50 const std::vector<HLT::Identifier>& getIDs() const;
51
52 private:
53
54 // Identifies is used to keep track of which tool made which decision.
55 // The information is stored in the event store.
56 // There will be as many entries in the IDs vector as there are chain parts.
57 // Howver, the zeroth entry is calculated differently for one and multi
58 // chain part chains.
59
60 // single chainpart ID, claculated from name of Algorithm
61 // use this to determine whether the hypo should run.
63
64 //single and Multi chaionpart IDs
65 // if single chain part then single entry, same as m_desionId
66 // else one entry per chain part. the zeroth welement is calculated
67 // using m_decisionID and the chain part index = 0
68 // use these IDs to report participating jets "by leg"
69 std::vector<HLT::Identifier> m_decisionIDs{};
70
71 ToolHandle<ITrigJetHypoToolHelper> m_helper {
72 this, "helper_tool", {}, "Jet hypo helper AlgTool"};
73
74 Gaudi::Property<std::size_t> m_startLabelIndex { // no of chain parts + 1
75 this, "startLabelIndex", {0}, "start value for leg indices"};
76
77 Gaudi::Property<std::size_t> m_endLabelIndex { // no of chain parts + 1
78 this, "endLabelIndex", {0}, "end value for leg indices"};
79
80 Gaudi::Property<bool> m_visitDebug {
81 this, "visit_debug", false, "debug flag"};
82
83 Gaudi::Property<std::string> m_chainName {
84 this, "chain_name", {}, "chain name"};
85
86
87 mutable std::atomic<size_t> m_id = 0;
88
89 ToolHandle<GenericMonitoringTool> m_monTool{this,"MonTool","","Monitoring tool"};
90
91 StatusCode
93 const std::unique_ptr<ITrigJetHypoInfoCollector>&) const;
94
95 StatusCode
97 const std::vector<JetDecision>& jetHypoInputs) const;
98
99 StatusCode
100 reportLeg(const std::vector<const xAOD::Jet*>& jets,
101 const std::vector<JetDecision>& jetHypoInputs,
102 int legInd) const;
103
104 bool
105 inputJetParticipates(const std::vector<const xAOD::Jet*>& jets,
106 const JetDecision& pair) const;
107
108};
109#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".