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
21
22class VertexMatcher : public BestMatcher<TIDA::Vertex> {
23
24public:
25
26 VertexMatcher( const std::string& s, double d=3 ) : BestMatcher<TIDA::Vertex>( s, d*d ) { }
27
29
30 virtual BestMatcher<TIDA::Vertex>* clone() override { return new VertexMatcher(*this); }
31
32 virtual double distance( const TIDA::Vertex* v0, const TIDA::Vertex* v1 ) const override {
33 double d = (v0->z()-v1->z());
34 return d*d;
35
37 // if ( v0->dz() && v1->dz() ) return d*d/( v0->dz()*v0->dz() + v1->dz()*v1->dz() );
38 // else return d*d;
39 };
40
41};
42
43inline std::ostream& operator<<( std::ostream& s, const VertexMatcher& /* _v */ ) {
44 return s;
45}
46
47
48#endif // VERTEXMATCHER_H
49
50
51
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
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 double distance(const TIDA::Vertex *v0, const TIDA::Vertex *v1) const override
virtual BestMatcher< TIDA::Vertex > * clone() override
Test for xAOD.