ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigAnalysis
TrigInDetAnalysisUtils
TrigInDetAnalysisUtils
Associator_TruthMatch.h
Go to the documentation of this file.
1
/* emacs: this is -*- c++ -*- */
10
11
12
#ifndef TIDAUTILS_ASSOCIATOR_TRUTHMATCH_H
13
#define TIDAUTILS_ASSOCIATOR_TRUTHMATCH_H
14
15
#include <set>
16
#include <map>
17
18
19
#include "
TrigInDetAnalysis/TrackAssociator.h
"
20
#include "
TrigInDetAnalysisUtils/Associator_BestMatch.h
"
21
#include "
TrigInDetAnalysis/Track.h
"
22
23
24
25
#if 0
26
class
Associator_TruthMatcher
:
public
Associator_BestMatcher
{
27
28
public
:
29
Associator_TruthMatcher
() :
30
Associator_MatcherBase(
"Truth"
)
31
{ }
32
33
virtual
double
distance
( TIDA::Track* refTrack, TIDA::Track* testTrack ) {
34
if
(testTrack->
match_barcode
() == -1)
return
1;
35
else
if
(testTrack->
match_barcode
() == refTrack->
barcode
())
return
0;
36
else
return
1;
37
}
38
39
};
40
#endif
41
42
43
// class Associator_TruthMatcher : public Associator_MatcherBase{
44
class
Associator_TruthMatcher
:
public
TrackAssociator
{
45
46
public
:
47
48
Associator_TruthMatcher
() :
TrackAssociator
(
"Truth"
) { }
49
50
virtual
~Associator_TruthMatcher
() { }
51
52
53
virtual
std::unique_ptr<TrackAssociator>
uclone
()
const override
{
return
std::make_unique<Associator_TruthMatcher>(*
this
); }
54
55
//Fill reference tracks in matching step
56
virtual
void
match
(
const
std::vector<TIDA::Track*>& refTracks,
57
const
std::vector<TIDA::Track*>& testTracks)
override
{
58
59
//std::cout<<"refTracks.size() "<<refTracks.size()<<" \t testTracks.size() "<<testTracks.size()<<std::endl;
60
61
for
(
unsigned
int
i = 0; i < refTracks.size(); i++) {
62
63
// std::cout<<refTracks[i]->author() <<std::endl;
64
65
for
(
unsigned
int
j = 0; j < testTracks.size(); j++) {
66
67
68
if
(
distance
( refTracks[i], testTracks[j] ) < 1. ) {
69
// std::cout<<"MATCHED"<<std::endl;
70
mmatched
.insert( map_type::value_type(refTracks[i],testTracks[j]));
71
mrevmatched
.insert( map_type::value_type(testTracks[j],refTracks[i]));
72
}
73
}
74
}
75
76
return
;
77
}
78
79
80
virtual
double
distance
(
TIDA::Track
* refTrack,
TIDA::Track
* testTrack ) {
81
if
(testTrack->
match_barcode
() == -1)
return
1;
82
else
if
(testTrack->
match_barcode
() == refTrack->
barcode
())
return
0;
83
else
return
1;
84
}
85
86
private
:
87
88
// double md;
89
90
};
91
92
93
#endif
// TIDAUTILS_ASSOCIATOR_TRUTHMATCH_H
94
Associator_BestMatch.h
Erkcan's track matchers.
Associator_BestMatcher
BestMatcher< TIDA::Track > Associator_BestMatcher
Definition
Associator_BestMatch.h:29
TrackAssociator.h
TrackAssociator
TIDA::Associator< TIDA::Track > TrackAssociator
Definition
TrackAssociator.h:26
Track.h
Associator_TruthMatcher
Definition
Associator_TruthMatch.h:44
Associator_TruthMatcher::distance
virtual double distance(TIDA::Track *refTrack, TIDA::Track *testTrack)
Definition
Associator_TruthMatch.h:80
Associator_TruthMatcher::uclone
virtual std::unique_ptr< TrackAssociator > uclone() const override
Definition
Associator_TruthMatch.h:53
Associator_TruthMatcher::match
virtual void match(const std::vector< TIDA::Track * > &refTracks, const std::vector< TIDA::Track * > &testTracks) override
Definition
Associator_TruthMatch.h:56
Associator_TruthMatcher::~Associator_TruthMatcher
virtual ~Associator_TruthMatcher()
Definition
Associator_TruthMatch.h:50
Associator_TruthMatcher::Associator_TruthMatcher
Associator_TruthMatcher()
Definition
Associator_TruthMatch.h:48
TIDA::Associator< TIDA::Track >::mmatched
map_type mmatched
Definition
TIDAAssociator.h:75
TIDA::Associator< TIDA::Track >::mrevmatched
rmap_type mrevmatched
Definition
TIDAAssociator.h:76
TIDA::Track
Definition
Trigger/TrigAnalysis/TrigInDetAnalysis/TrigInDetAnalysis/Track.h:26
TIDA::Track::barcode
int barcode() const
Definition
Trigger/TrigAnalysis/TrigInDetAnalysis/TrigInDetAnalysis/Track.h:85
TIDA::Track::match_barcode
int match_barcode() const
Definition
Trigger/TrigAnalysis/TrigInDetAnalysis/TrigInDetAnalysis/Track.h:86
Generated on
for ATLAS Offline Software by
1.17.0