ATLAS Offline Software
Loading...
Searching...
No Matches
VertexMatcher.h
Go to the documentation of this file.
1/* emacs: this is -*- c++ -*- */
10
11
12#ifndef VERTEXMATCHER_H
13#define VERTEXMATCHER_H
14
15#include <iostream>
16
18
20
22
23
24class VertexMatcher : public BestMatcher<TIDA::Vertex> {
25
26public:
27
28 VertexMatcher( const std::string& s, double d=3 ) : BestMatcher<TIDA::Vertex>( s, d*d ) { }
29
31
32
33 virtual std::unique_ptr<VertexAssociator> uclone() const override { return std::make_unique<VertexMatcher>(*this); }
34
35 virtual double distance( const TIDA::Vertex* v0, const TIDA::Vertex* v1 ) const override {
36 double d = (v0->z()-v1->z());
37 return d*d;
38
40 // if ( v0->dz() && v1->dz() ) return d*d/( v0->dz()*v0->dz() + v1->dz()*v1->dz() );
41 // else return d*d;
42 };
43
44};
45
46inline std::ostream& operator<<( std::ostream& s, const VertexMatcher& /* _v */ ) {
47 return s;
48}
49
50
51#endif // VERTEXMATCHER_H
52
53
54
truely generic template class of a best matching algorithm based on an efficient implementation of th...
boost::graph_traits< boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS > >::vertex_descriptor Vertex
TIDA::Associator< TIDA::Vertex > VertexAssociator
std::ostream & operator<<(std::ostream &s, const VertexMatcher &)
BestMatcher(const std::string &name, double d)
Definition BestMatcher.h:61
double z() const
Definition TIDAVertex.h:53
VertexMatcher(const std::string &s, double d=3)
virtual std::unique_ptr< VertexAssociator > uclone() const override
virtual double distance(const TIDA::Vertex *v0, const TIDA::Vertex *v1) const override
Test for xAOD.