ATLAS Offline Software
Loading...
Searching...
No Matches
Associator_TruthMatcher Class Reference

#include <Associator_TruthMatch.h>

Inheritance diagram for Associator_TruthMatcher:
Collaboration diagram for Associator_TruthMatcher:

Public Types

typedef std::map< const TIDA::Track *, const TIDA::Track * > map_type
typedef std::map< const TIDA::Track *, const TIDA::Track * > rmap_type

Public Member Functions

 Associator_TruthMatcher ()
virtual ~Associator_TruthMatcher ()
virtual std::unique_ptr< TrackAssociatoruclone () const override
virtual void match (const std::vector< TIDA::Track * > &refTracks, const std::vector< TIDA::Track * > &testTracks) override
virtual double distance (TIDA::Track *refTrack, TIDA::Track *testTrack)
virtual const TIDA::Trackmatched (TIDA::Track *t) const
const map_typematched () const
virtual const TIDA::Trackrevmatched (TIDA::Track *t) const
const rmap_typerevmatched () const
void clear ()
unsigned size () const

Protected Attributes

std::string mname
map_type mmatched
rmap_type mrevmatched

Detailed Description

Definition at line 44 of file Associator_TruthMatch.h.

Member Typedef Documentation

◆ map_type

typedef std::map<const TIDA::Track*, const TIDA::Track*> TIDA::Associator< TIDA::Track, TIDA::Track >::map_type
inherited

Definition at line 30 of file TIDAAssociator.h.

◆ rmap_type

typedef std::map<const TIDA::Track*, const TIDA::Track*> TIDA::Associator< TIDA::Track, TIDA::Track >::rmap_type
inherited

Definition at line 31 of file TIDAAssociator.h.

Constructor & Destructor Documentation

◆ Associator_TruthMatcher()

Associator_TruthMatcher::Associator_TruthMatcher ( )
inline

Definition at line 48 of file Associator_TruthMatch.h.

48: TrackAssociator("Truth") { }
TIDA::Associator< TIDA::Track > TrackAssociator

◆ ~Associator_TruthMatcher()

virtual Associator_TruthMatcher::~Associator_TruthMatcher ( )
inlinevirtual

Definition at line 50 of file Associator_TruthMatch.h.

50{ }

Member Function Documentation

◆ clear()

void TIDA::Associator< TIDA::Track, TIDA::Track >::clear ( )
inlineinherited

Definition at line 65 of file TIDAAssociator.h.

◆ distance()

virtual double Associator_TruthMatcher::distance ( TIDA::Track * refTrack,
TIDA::Track * testTrack )
inlinevirtual

Definition at line 80 of file Associator_TruthMatch.h.

80 {
81 if (testTrack->match_barcode() == -1) return 1;
82 else if (testTrack->match_barcode() == refTrack->barcode()) return 0;
83 else return 1;
84 }

◆ match()

virtual void Associator_TruthMatcher::match ( const std::vector< TIDA::Track * > & refTracks,
const std::vector< TIDA::Track * > & testTracks )
inlineoverridevirtual

Implements TIDA::Associator< TIDA::Track >.

Definition at line 56 of file Associator_TruthMatch.h.

57 {
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 }
virtual double distance(TIDA::Track *refTrack, TIDA::Track *testTrack)
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)

◆ matched() [1/2]

const map_type & TIDA::Associator< TIDA::Track, TIDA::Track >::matched ( ) const
inlineinherited

Definition at line 61 of file TIDAAssociator.h.

61{ return mmatched; }

◆ matched() [2/2]

virtual const TIDA::Track * TIDA::Associator< TIDA::Track, TIDA::Track >::matched ( TIDA::Track * t) const
inlinevirtualinherited

Definition at line 47 of file TIDAAssociator.h.

47 {
48 typename map_type::const_iterator titr = mmatched.find(t);
49 if ( titr != mmatched.end() ) return titr->second;
50 else return 0;
51 }

◆ revmatched() [1/2]

const rmap_type & TIDA::Associator< TIDA::Track, TIDA::Track >::revmatched ( ) const
inlineinherited

Definition at line 62 of file TIDAAssociator.h.

62{ return mrevmatched; }

◆ revmatched() [2/2]

virtual const TIDA::Track * TIDA::Associator< TIDA::Track, TIDA::Track >::revmatched ( TIDA::Track * t) const
inlinevirtualinherited

Definition at line 54 of file TIDAAssociator.h.

54 {
56 if ( titr != mrevmatched.end() ) return titr->second;
57 else return 0;
58 }

◆ size()

unsigned TIDA::Associator< TIDA::Track, TIDA::Track >::size ( ) const
inlineinherited

Definition at line 68 of file TIDAAssociator.h.

68{ return mmatched.size(); }
unsigned size() const

◆ uclone()

virtual std::unique_ptr< TrackAssociator > Associator_TruthMatcher::uclone ( ) const
inlineoverridevirtual

Implements TIDA::Associator< TIDA::Track >.

Definition at line 53 of file Associator_TruthMatch.h.

53{ return std::make_unique<Associator_TruthMatcher>(*this); }

Member Data Documentation

◆ mmatched

map_type TIDA::Associator< TIDA::Track, TIDA::Track >::mmatched
protectedinherited

Definition at line 75 of file TIDAAssociator.h.

◆ mname

std::string TIDA::Associator< TIDA::Track, TIDA::Track >::mname
protectedinherited

Definition at line 73 of file TIDAAssociator.h.

◆ mrevmatched

rmap_type TIDA::Associator< TIDA::Track, TIDA::Track >::mrevmatched
protectedinherited

Definition at line 76 of file TIDAAssociator.h.


The documentation for this class was generated from the following file: