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/PropertyWrapper.h
"
10
#include "
AsgTools/ToolHandle.h
"
11
#include "
TriggerMatchingTool/IMatchingTool.h
"
12
#include "
TriggerMatchingTool/IMatchScoringTool.h
"
13
#include "
TrigDecisionTool/TrigDecisionTool.h
"
14
#include "
CxxUtils/checker_macros.h
"
15
16
#include <mutex>
17
18
namespace
Trig
19
{
20
class
R3MatchingTool
:
public
asg::AsgTool
,
virtual
public
IMatchingTool
21
{
22
ASG_TOOL_CLASS
(
R3MatchingTool
,
IMatchingTool
)
23
public
:
24
using
multInfo_t
= std::vector<std::size_t>;
25
using
typeInfo_t
= std::vector<xAODType::ObjectType>;
26
using
chainInfo_t
= std::pair<multInfo_t, typeInfo_t>;
27
28
R3MatchingTool
(
const
std::string &name);
29
~R3MatchingTool
();
30
31
virtual
StatusCode
initialize
()
override
;
32
33
virtual
bool
match
(
34
const
std::vector<const xAOD::IParticle *> &recoObjects,
35
std::string_view chain,
36
double
matchThreshold,
37
bool
rerun)
const override
;
38
39
virtual
bool
match
(
40
const
xAOD::IParticle
&recoObject,
41
std::string_view chain,
42
double
matchThreshold,
43
bool
rerun)
const override
;
44
45
private
:
46
ToolHandle<TrigDecisionTool>
m_trigDecTool
;
47
ToolHandle<Trig::IMatchScoringTool>
m_scoreTool
{
48
this
,
"ScoringTool"
,
"Trig::DRScoringTool"
,
"Tool to score pairs of particles"
};
49
Gaudi::Property<bool>
m_includeSubfeatures
{
50
this
,
"IncludeSubfeatures"
,
false
,
51
"When true, also retrieve 'subfeature' links (lower-pT objects from Run2->Run3 conversion)"
};
52
bool
matchObjects
(
53
const
xAOD::IParticle
*reco,
54
const
ElementLink<xAOD::IParticleContainer>
&onlineLink,
55
xAODType::ObjectType
onlineType,
56
std::map<std::pair<uint32_t, uint32_t>,
bool
> &cache,
57
double
drThreshold)
const
;
58
59
60
61
// Keep a cache of the interpreted chain information
62
mutable
std::map<std::string, chainInfo_t> m_chainInfoCache
ATLAS_THREAD_SAFE
;
63
mutable
std::mutex m_chainInfoMutex
ATLAS_THREAD_SAFE
;
64
const
chainInfo_t
&
getChainInfo
(
const
std::string &chain)
const
;
65
66
67
// Internal functions
69
virtual
MatchingImplementation
*
impl
()
const override
{
return
nullptr
; }
70
71
};
//> end class R3MatchingTool
72
}
// namespace Trig
73
74
#endif
//> !TRIGGERMATCHINGTOOL_R3MATCHINGTOOL_H
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition
AsgToolMacros.h:68
AsgTool.h
IMatchScoringTool.h
IMatchingTool.h
PropertyWrapper.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:47
Trig::R3MatchingTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition
R3MatchingTool.cxx:27
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:161
Trig::R3MatchingTool::~R3MatchingTool
~R3MatchingTool()
Definition
R3MatchingTool.cxx:25
Trig::R3MatchingTool::ATLAS_THREAD_SAFE
std::map< std::string, chainInfo_t > m_chainInfoCache ATLAS_THREAD_SAFE
Definition
R3MatchingTool.h:62
Trig::R3MatchingTool::impl
virtual MatchingImplementation * impl() const override
Inherited from the interface but does nothing.
Definition
R3MatchingTool.h:69
Trig::R3MatchingTool::m_trigDecTool
ToolHandle< TrigDecisionTool > m_trigDecTool
Definition
R3MatchingTool.h:46
Trig::R3MatchingTool::getChainInfo
const chainInfo_t & getChainInfo(const std::string &chain) const
Definition
R3MatchingTool.cxx:203
Trig::R3MatchingTool::multInfo_t
std::vector< std::size_t > multInfo_t
Definition
R3MatchingTool.h:24
Trig::R3MatchingTool::R3MatchingTool
R3MatchingTool(const std::string &name)
Definition
R3MatchingTool.cxx:19
Trig::R3MatchingTool::typeInfo_t
std::vector< xAODType::ObjectType > typeInfo_t
Definition
R3MatchingTool.h:25
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:34
Trig::R3MatchingTool::m_includeSubfeatures
Gaudi::Property< bool > m_includeSubfeatures
Definition
R3MatchingTool.h:49
Trig::R3MatchingTool::chainInfo_t
std::pair< multInfo_t, typeInfo_t > chainInfo_t
Definition
R3MatchingTool.h:26
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