ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigAnalysis
TriggerMatchingTool
TriggerMatchingTool
MatchFromCompositeTool.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_MatchFromCompositeTool_H
6
#define TriggerMatchingTool_MatchFromCompositeTool_H
7
8
// Framework includes
9
#include "
AsgTools/AsgTool.h
"
10
#include "
AthContainers/AuxElement.h
"
11
#include "AthLinks/ElementLink.h"
12
#include "
xAODBase/IParticleContainer.h
"
13
#include "
xAODTrigger/TrigCompositeContainer.h
"
14
#include "
SGCore/sgkey_t.h
"
15
16
// Package includes
17
#include "
TriggerMatchingTool/IMatchingTool.h
"
18
19
20
namespace
Trig
{
26
class
MatchFromCompositeTool
final :
public
virtual
IMatchingTool
,
27
public
asg::AsgTool
28
{
29
ASG_TOOL_CLASS
(
MatchFromCompositeTool
,
IMatchingTool
)
30
public
:
32
MatchFromCompositeTool
(
const
std::string& name);
33
35
~MatchFromCompositeTool
()
override
;
36
38
StatusCode
initialize
()
override
;
39
50
bool
match
(
51
const
xAOD::IParticle
& recoObject,
52
std::string_view chain,
53
double
=0.1,
bool
=
false
)
const override
;
54
65
bool
match
(
66
const
std::vector<const xAOD::IParticle*>& recoObject,
67
std::string_view chain,
68
double
=0.1,
bool
=
false
)
const override
;
69
70
protected
:
72
template
<
typename
T>
73
using
constAcc_t
= SG::AuxElement::ConstAccessor<T>;
74
template
<
typename
T>
75
using
dec_t
= SG::AuxElement::Decorator<T>;
76
template
<
typename
T>
77
using
vecLink_t
= std::vector<ElementLink<T>>;
78
79
// Properties
81
bool
m_matchShallow
=
true
;
82
85
float
m_drThreshold
= -1;
86
88
std::string
m_inputPrefix
;
89
90
#ifdef XAOD_STANDALONE
92
bool
m_remapBrokenLinks =
false
;
93
95
std::vector<std::string> m_remapContainers{
96
"Electrons"
,
"Photons"
,
"Muons"
,
"TauJets"
};
98
std::vector<CLID> m_remapCLIDs{
99
1087532415, 1105575213, 1178459224, 1177172564};
100
#endif
101
102
// Internal functions
104
virtual
MatchingImplementation
*
impl
()
const override
{
return
nullptr
; }
105
112
bool
testCombination
(
113
const
vecLink_t<xAOD::IParticleContainer>
& onlineLinks,
114
const
std::vector<const xAOD::IParticle*>&
offline
)
const
;
115
117
bool
areTheSame
(
118
const
xAOD::IParticle
& lhs,
119
const
xAOD::IParticle
& rhs)
const
;
120
121
std::map<SG::sgkey_t, SG::sgkey_t>
m_keyRemap
;
122
};
//> end class MatchFromCompositeTool
123
}
//> end namespace Trig
124
125
#endif
//> TriggerMatchingTool_MatchFromCompositeTool_H
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition
AsgToolMacros.h:68
AsgTool.h
AuxElement.h
Base class for elements of a container that can have aux data.
IMatchingTool.h
TrigCompositeContainer.h
Trig::IMatchingTool
Definition
IMatchingTool.h:25
Trig::MatchFromCompositeTool::m_keyRemap
std::map< SG::sgkey_t, SG::sgkey_t > m_keyRemap
Definition
MatchFromCompositeTool.h:121
Trig::MatchFromCompositeTool::~MatchFromCompositeTool
~MatchFromCompositeTool() override
Default destructor.
Definition
MatchFromCompositeTool.cxx:44
Trig::MatchFromCompositeTool::match
bool match(const xAOD::IParticle &recoObject, std::string_view chain, double=0.1, bool=false) const override
Match a single object.
Definition
MatchFromCompositeTool.cxx:72
Trig::MatchFromCompositeTool::MatchFromCompositeTool
MatchFromCompositeTool(const std::string &name)
Standard constructor.
Definition
MatchFromCompositeTool.cxx:23
Trig::MatchFromCompositeTool::dec_t
SG::AuxElement::Decorator< T > dec_t
Definition
MatchFromCompositeTool.h:75
Trig::MatchFromCompositeTool::m_drThreshold
float m_drThreshold
If greater than 0 then will skip the above check and just check that DR between the two particles is ...
Definition
MatchFromCompositeTool.h:85
Trig::MatchFromCompositeTool::vecLink_t
std::vector< ElementLink< T > > vecLink_t
Definition
MatchFromCompositeTool.h:77
Trig::MatchFromCompositeTool::initialize
StatusCode initialize() override
Initialise the tool.
Definition
MatchFromCompositeTool.cxx:46
Trig::MatchFromCompositeTool::testCombination
bool testCombination(const vecLink_t< xAOD::IParticleContainer > &onlineLinks, const std::vector< const xAOD::IParticle * > &offline) const
Test a combination of offline objects against a combination of online objects.
Definition
MatchFromCompositeTool.cxx:107
Trig::MatchFromCompositeTool::constAcc_t
SG::AuxElement::ConstAccessor< T > constAcc_t
Helper typedefs for accessors/decorators, vectors of ele links.
Definition
MatchFromCompositeTool.h:73
Trig::MatchFromCompositeTool::areTheSame
bool areTheSame(const xAOD::IParticle &lhs, const xAOD::IParticle &rhs) const
Check if two particles are the same.
Definition
MatchFromCompositeTool.cxx:153
Trig::MatchFromCompositeTool::m_inputPrefix
std::string m_inputPrefix
The prefix to expect at the front of the trig composite container name.
Definition
MatchFromCompositeTool.h:88
Trig::MatchFromCompositeTool::m_matchShallow
bool m_matchShallow
Allow matching shallow copy to shallow copy.
Definition
MatchFromCompositeTool.h:81
Trig::MatchFromCompositeTool::impl
virtual MatchingImplementation * impl() const override
Inherited from the interface but does nothing.
Definition
MatchFromCompositeTool.h:104
Trig::MatchingImplementation
Definition
MatchingImplementation.h:33
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
offline
sgkey_t.h
IParticleContainer.h
Generated on
for ATLAS Offline Software by
1.17.0