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 virtual BestMatcher<TIDA::Vertex>* clone() override { return new VertexMatcher(*this); }
33
34 virtual std::unique_ptr<VertexAssociator> uclone() const override { return std::make_unique<VertexMatcher>(*this); }
35
36 virtual double distance( const TIDA::Vertex* v0, const TIDA::Vertex* v1 ) const override {
37 double d = (v0->z()-v1->z());
38 return d*d;
39
41 // if ( v0->dz() && v1->dz() ) return d*d/( v0->dz()*v0->dz() + v1->dz()*v1->dz() );
42 // else return d*d;
43 };
44
45};
46
47inline std::ostream& operator<<( std::ostream& s, const VertexMatcher& /* _v */ ) {
48 return s;
49}
50
51
52#endif // VERTEXMATCHER_H
53
54
55
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
virtual BestMatcher< TIDA::Vertex > * clone() override
Test for xAOD.