ATLAS Offline Software
Trigger
TrigAnalysis
TrigInDetAnalysisUtils
TrigInDetAnalysisUtils
VertexNewMatcher.h
Go to the documentation of this file.
1
/* emacs: this is -*- c++ -*- */
11
#ifndef VERTEXNEWMATCHER_H
12
#define VERTEXNEWMATCHER_H
13
14
#include <iostream>
15
16
#include "
TrigInDetAnalysisUtils/BestMatcher.h
"
17
#include "
TrigInDetAnalysisUtils/Associator_BestMatch.h
"
18
19
#include "
TrigInDetAnalysis/TIDAVertex.h
"
20
21
22
class
VertexNewMatcher
:
public
BestMatcher
<TIDA::Vertex> {
23
24
public
:
25
26
VertexNewMatcher
(
const
std::string&
s
,
double
d
=0.5 ) :
BestMatcher
<
TIDA
::
Vertex
>(
s
,
d
*
d
) { }
27
28
~VertexNewMatcher
() { }
29
30
BestMatcher<TIDA::Vertex>
*
clone
()
override
{
return
new
VertexNewMatcher
(*
this
); }
31
32
virtual
double
distance
(
const
TIDA::Vertex
*
v0
,
const
TIDA::Vertex
* v1 )
const override
{
33
34
// vectors of pointers to tracks belonging to ref and test vertices
35
const
std::vector<TIDA::Track*>& refTracks=
v0
->tracks();
36
const
std::vector<TIDA::Track*>& testTracks = v1->
tracks
();
37
38
// match offline to trigger tracks using delta R
39
Associator_DeltaRMatcher
track_matcher(
"track_matcher"
, 0.05 );
40
track_matcher.
match
( refTracks, testTracks );
41
42
double
n_matches = (
double
)track_matcher.
size
();
43
double
eff
= n_matches/refTracks.size();
44
45
// 1-eff as BestMatcher uses lower than threshold, squared as BestMatcher takes d*d
46
return
(1-
eff
)*(1-
eff
);
47
};
48
49
};
50
51
inline
std::ostream&
operator<<
( std::ostream&
s
,
const
VertexNewMatcher
&
/* _v */
) {
52
return
s
;
53
}
54
55
#endif // VERTEXNEWMATCHER_H
56
57
58
VertexNewMatcher::distance
virtual double distance(const TIDA::Vertex *v0, const TIDA::Vertex *v1) const override
Definition:
VertexNewMatcher.h:32
TIDA
Test for xAOD.
Definition:
Filter_AcceptAll.h:22
operator<<
std::ostream & operator<<(std::ostream &s, const VertexNewMatcher &)
Definition:
VertexNewMatcher.h:51
python.SystemOfUnits.s
int s
Definition:
SystemOfUnits.py:131
xAOD::Vertex
Vertex_v1 Vertex
Define the latest version of the vertex class.
Definition:
Event/xAOD/xAODTracking/xAODTracking/Vertex.h:16
hist_file_dump.d
d
Definition:
hist_file_dump.py:137
TIDAVertex.h
BestMatcher::match
virtual void match(const std::vector< T * > &ref, const std::vector< S * > &test)
Definition:
BestMatcher.h:68
Associator_BestMatch.h
Associator_DeltaRMatcher
Definition:
Associator_BestMatch.h:33
VertexNewMatcher
Definition:
VertexNewMatcher.h:22
parseMapping.v0
def v0
Definition:
parseMapping.py:149
VertexNewMatcher::~VertexNewMatcher
~VertexNewMatcher()
Definition:
VertexNewMatcher.h:28
BestMatcher.h
xAOD::double
double
Definition:
CompositeParticle_v1.cxx:159
TIDA::Vertex
Definition:
TIDAVertex.h:23
BestMatcher
Definition:
BestMatcher.h:29
VertexNewMatcher::VertexNewMatcher
VertexNewMatcher(const std::string &s, double d=0.5)
Definition:
VertexNewMatcher.h:26
TIDA::Vertex::tracks
const std::vector< TIDA::Track * > & tracks() const
Definition:
TIDAVertex.h:67
VertexNewMatcher::clone
BestMatcher< TIDA::Vertex > * clone() override
Definition:
VertexNewMatcher.h:30
dqt_zlumi_alleff_HIST.eff
int eff
Definition:
dqt_zlumi_alleff_HIST.py:113
TIDA::Associator::size
unsigned size() const
Definition:
TIDAAssociator.h:66
Generated on Tue Jul 2 2024 21:32:20 for ATLAS Offline Software by
1.8.18