ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigAnalysis
TriggerMatchingTool
TriggerMatchingTool
R3MatchingTool.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 TRIGGERMATCHINGTOOL_R3MATCHINGTOOL_H
6
#define TRIGGERMATCHINGTOOL_R3MATCHINGTOOL_H
7
8
#include "
AsgTools/AsgTool.h
"
9
#include "
AsgTools/ToolHandle.h
"
10
#include "
TriggerMatchingTool/IMatchingTool.h
"
11
#include "
TriggerMatchingTool/IMatchScoringTool.h
"
12
#include "
TrigDecisionTool/TrigDecisionTool.h
"
13
#include "
CxxUtils/checker_macros.h
"
14
15
#include <mutex>
16
17
namespace
Trig
18
{
19
class
R3MatchingTool
:
public
asg::AsgTool
,
virtual
public
IMatchingTool
20
{
21
ASG_TOOL_CLASS
(
R3MatchingTool
,
IMatchingTool
)
22
public
:
23
using
multInfo_t
= std::vector<std::size_t>;
24
using
typeInfo_t
= std::vector<xAODType::ObjectType>;
25
using
chainInfo_t
= std::pair<multInfo_t, typeInfo_t>;
26
27
R3MatchingTool
(
const
std::string &name);
28
~R3MatchingTool
();
29
30
virtual
StatusCode
initialize
()
override
;
31
32
virtual
bool
match
(
33
const
std::vector<const xAOD::IParticle *> &recoObjects,
34
std::string_view chain,
35
double
matchThreshold,
36
bool
rerun)
const override
;
37
38
virtual
bool
match
(
39
const
xAOD::IParticle
&recoObject,
40
std::string_view chain,
41
double
matchThreshold,
42
bool
rerun)
const override
;
43
44
private
:
45
ToolHandle<TrigDecisionTool>
m_trigDecTool
;
46
ToolHandle<Trig::IMatchScoringTool>
m_scoreTool
{
47
this
,
"ScoringTool"
,
"Trig::DRScoringTool"
,
"Tool to score pairs of particles"
};
48
bool
matchObjects
(
49
const
xAOD::IParticle
*reco,
50
const
ElementLink<xAOD::IParticleContainer>
&onlineLink,
51
xAODType::ObjectType
onlineType,
52
std::map<std::pair<uint32_t, uint32_t>,
bool
> &cache,
53
double
drThreshold)
const
;
54
55
56
57
// Keep a cache of the interpreted chain information
58
mutable
std::map<std::string, chainInfo_t> m_chainInfoCache
ATLAS_THREAD_SAFE
;
59
mutable
std::mutex m_chainInfoMutex
ATLAS_THREAD_SAFE
;
60
const
chainInfo_t
&
getChainInfo
(
const
std::string &chain)
const
;
61
62
63
// Internal functions
65
virtual
MatchingImplementation
*
impl
()
const override
{
return
nullptr
; }
66
67
};
//> end class R3MatchingTool
68
}
// namespace Trig
69
70
#endif
//> !TRIGGERMATCHINGTOOL_R3MATCHINGTOOL_H
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition
AsgToolMacros.h:68
AsgTool.h
IMatchScoringTool.h
IMatchingTool.h
ToolHandle.h
TrigDecisionTool.h
checker_macros.h
Define macros for attributes used to control the static checker.
ElementLink
ElementLink implementation for ROOT usage.
Definition
A/AthLinks/ElementLink.h:40
Trig::IMatchingTool
Definition
IMatchingTool.h:25
Trig::MatchingImplementation
Definition
MatchingImplementation.h:33
Trig::R3MatchingTool::m_scoreTool
ToolHandle< Trig::IMatchScoringTool > m_scoreTool
Definition
R3MatchingTool.h:46
Trig::R3MatchingTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition
R3MatchingTool.cxx:24
Trig::R3MatchingTool::matchObjects
bool matchObjects(const xAOD::IParticle *reco, const ElementLink< xAOD::IParticleContainer > &onlineLink, xAODType::ObjectType onlineType, std::map< std::pair< uint32_t, uint32_t >, bool > &cache, double drThreshold) const
Definition
R3MatchingTool.cxx:137
Trig::R3MatchingTool::~R3MatchingTool
~R3MatchingTool()
Definition
R3MatchingTool.cxx:22
Trig::R3MatchingTool::ATLAS_THREAD_SAFE
std::map< std::string, chainInfo_t > m_chainInfoCache ATLAS_THREAD_SAFE
Definition
R3MatchingTool.h:58
Trig::R3MatchingTool::impl
virtual MatchingImplementation * impl() const override
Inherited from the interface but does nothing.
Definition
R3MatchingTool.h:65
Trig::R3MatchingTool::m_trigDecTool
ToolHandle< TrigDecisionTool > m_trigDecTool
Definition
R3MatchingTool.h:45
Trig::R3MatchingTool::getChainInfo
const chainInfo_t & getChainInfo(const std::string &chain) const
Definition
R3MatchingTool.cxx:179
Trig::R3MatchingTool::multInfo_t
std::vector< std::size_t > multInfo_t
Definition
R3MatchingTool.h:23
Trig::R3MatchingTool::R3MatchingTool
R3MatchingTool(const std::string &name)
Definition
R3MatchingTool.cxx:16
Trig::R3MatchingTool::typeInfo_t
std::vector< xAODType::ObjectType > typeInfo_t
Definition
R3MatchingTool.h:24
Trig::R3MatchingTool::match
virtual bool match(const std::vector< const xAOD::IParticle * > &recoObjects, std::string_view chain, double matchThreshold, bool rerun) const override
multi-object trigger matching
Definition
R3MatchingTool.cxx:31
Trig::R3MatchingTool::chainInfo_t
std::pair< multInfo_t, typeInfo_t > chainInfo_t
Definition
R3MatchingTool.h:25
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition
AsgTool.h:47
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition
Event/xAOD/xAODBase/xAODBase/IParticle.h:41
Trig
The common trigger namespace for trigger analysis tools.
Definition
LArCellMonAlg.h:33
xAODType::ObjectType
ObjectType
Type of objects that have a representation in the xAOD EDM.
Definition
ObjectType.h:32
Generated on
for ATLAS Offline Software by
1.17.0