ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigMonitoring
TrigIDR4Monitoring
src
TrackViewMatchingTool.cxx
Go to the documentation of this file.
1
9
10
#include "
TrackViewMatchingTool.h
"
11
#include "
TBestMatch.h
"
12
#include "
OfflineTruthMatcher.h
"
13
16
// #include "MsgMacros.h"
17
18
template
<
typename
T,
typename
R>
19
IDTPM2::TMatchingTool<T,R>::TMatchingTool
(
const
std::string&
type
,
20
const
std::string& name,
21
const
IInterface* parent )
22
:
AthAlgTool
(
type
, name, parent )
23
{ }
24
25
26
template
<
typename
T,
typename
R>
27
StatusCode
IDTPM2::TMatchingTool<T,R>::initialize
() {
28
29
// MY_MSG_DEBUG << "TMatchingTool: type=" << m_matcherType << endmsg;
30
31
if
(
m_matcherType
==
"DeltaR"
)
m_matcher
= std::make_unique<TDeltaRMatcher<T,R>>(
"DeltaRMatcher"
,
require_set
(
m_dr
) );
32
else
if
(
m_matcherType
==
"DeltaPhi"
)
m_matcher
= std::make_unique<TDeltaPhiMatcher<T,R>>(
"DeltaPhiMatcher"
,
require_set
(
m_dphi
) );
33
else
if
(
m_matcherType
==
"Sigma"
)
m_matcher
= std::make_unique<TSigmaMatcher<T,R>>(
"SigmaMatcher"
,
require_set
(
m_dsigma
) );
34
else
if
(
m_matcherType
==
"SecondBestpT"
)
m_matcher
= std::make_unique<TSecondBestpTMatcher<T,R>>(
"SecondBestpTMatcher"
,
require_set
(
m_dpt
) );
35
else
if
(
m_matcherType
==
"OfflineTruth"
)
m_matcher
= std::make_unique<TOfflineTruthMatcher<T,R>>(
"OfflineTruthMatcher"
,
require_set
(
m_prob
) );
36
else
if
(
m_matcherType
==
"DeltaRZ"
)
m_matcher
= std::make_unique<TDeltaRZMatcher<T,R>>(
"DeltaRZMatcher"
,
require_set
(
m_deta
),
require_set
(
m_dphi
),
require_set
(
m_dzed
) );
37
else
if
(
m_matcherType
==
"DeltaRZSinTheta"
)
m_matcher
= std::make_unique<TDeltaRZSinThetaMatcher<T,R>>(
"DeltaRZSinThetaMatcher"
,
require_set
(
m_deta
),
require_set
(
m_dphi
),
require_set
(
m_dzed
) );
38
else
if
(
m_matcherType
==
"Default"
) {
39
float
dr = 0.01;
40
if
(
m_dr
.isset() ) dr =
m_dr
;
41
m_matcher
= std::make_unique<TDeltaRMatcher<T,R>>(
"DeltaRMatcher"
, dr );
42
}
43
else
{
44
// MY_MSG_FATAL << "Unknown matcher type: " << m_matcherType << endmsg;
45
return
StatusCode::FAILURE;
46
}
47
48
return
StatusCode::SUCCESS;
49
}
50
51
52
template
<
typename
T,
typename
R>
53
std::unique_ptr<TIDA::Associator<T,R> >
54
IDTPM2::TMatchingTool<T,R>::clone
()
const
{
return
m_matcher
->uclone(); }
55
56
template
<
typename
T,
typename
R>
57
std::unique_ptr<TIDA::Associator<T,R>>
58
IDTPM2::TMatchingTool<T,R>::uclone
()
const
{
return
m_matcher
->uclone(); }
59
60
62
template
class
IDTPM2::TMatchingTool<const TrackView>
;
require_set
const T & require_set(const T &t)
Definition
ConfiguredValueUtils.h:71
OfflineTruthMatcher.h
TBestMatch.h
TrackViewMatchingTool.h
Templated Athena tool that creates and owns a single TIDA::Associator matcher.
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
IDTPM2::TMatchingTool
Definition
TrackViewMatchingTool.h:32
IDTPM2::TMatchingTool::m_dpt
ConfiguredValueProperty< float > m_dpt
Definition
TrackViewMatchingTool.h:61
IDTPM2::TMatchingTool::m_dzed
ConfiguredValueProperty< float > m_dzed
Definition
TrackViewMatchingTool.h:60
IDTPM2::TMatchingTool::m_matcherType
Gaudi::Property< std::string > m_matcherType
Definition
TrackViewMatchingTool.h:52
IDTPM2::TMatchingTool::m_prob
ConfiguredValueProperty< float > m_prob
Definition
TrackViewMatchingTool.h:63
IDTPM2::TMatchingTool::TMatchingTool
TMatchingTool(const std::string &type, const std::string &name, const IInterface *parent)
in a different merge request, so can uncomment later, once it is in the release to avoid a conflict
Definition
TrackViewMatchingTool.cxx:19
IDTPM2::TMatchingTool::m_dr
ConfiguredValueProperty< float > m_dr
NB: not all these parameters need to be set, only the appropriate ones for the requested matcher.
Definition
TrackViewMatchingTool.h:57
IDTPM2::TMatchingTool::m_deta
ConfiguredValueProperty< float > m_deta
Definition
TrackViewMatchingTool.h:58
IDTPM2::TMatchingTool::m_dsigma
ConfiguredValueProperty< float > m_dsigma
Definition
TrackViewMatchingTool.h:62
IDTPM2::TMatchingTool::initialize
virtual StatusCode initialize() override
Definition
TrackViewMatchingTool.cxx:27
IDTPM2::TMatchingTool::m_dphi
ConfiguredValueProperty< float > m_dphi
Definition
TrackViewMatchingTool.h:59
IDTPM2::TMatchingTool::clone
std::unique_ptr< TIDA::Associator< T, R > > clone() const
Return a fresh clone of the template matcher.
Definition
TrackViewMatchingTool.cxx:54
IDTPM2::TMatchingTool::m_matcher
std::unique_ptr< TIDA::Associator< T, R > > m_matcher
Definition
TrackViewMatchingTool.h:65
IDTPM2::TMatchingTool::uclone
std::unique_ptr< TIDA::Associator< T, R > > uclone() const
Definition
TrackViewMatchingTool.cxx:58
type
Generated on
for ATLAS Offline Software by
1.17.0