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 TrackAssociatorclone () override
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 29 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 30 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 66 of file TIDAAssociator.h.

◆ clone()

virtual TrackAssociator * Associator_TruthMatcher::clone ( )
inlineoverridevirtual

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

Definition at line 52 of file Associator_TruthMatch.h.

◆ distance()

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

Definition at line 81 of file Associator_TruthMatch.h.

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

◆ 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 57 of file Associator_TruthMatch.h.

58 {
59
60 //std::cout<<"refTracks.size() "<<refTracks.size()<<" \t testTracks.size() "<<testTracks.size()<<std::endl;
61
62 for (unsigned int i = 0; i < refTracks.size(); i++) {
63
64 // std::cout<<refTracks[i]->author() <<std::endl;
65
66 for (unsigned int j = 0; j < testTracks.size(); j++) {
67
68
69 if ( distance( refTracks[i], testTracks[j] ) < 1. ) {
70 // std::cout<<"MATCHED"<<std::endl;
71 mmatched.insert( map_type::value_type(refTracks[i],testTracks[j]));
72 mrevmatched.insert( map_type::value_type(testTracks[j],refTracks[i]));
73 }
74 }
75 }
76
77 return;
78 }
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 62 of file TIDAAssociator.h.

62{ return mmatched; }

◆ matched() [2/2]

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

Definition at line 48 of file TIDAAssociator.h.

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

◆ revmatched() [1/2]

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

Definition at line 63 of file TIDAAssociator.h.

63{ return mrevmatched; }

◆ revmatched() [2/2]

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

Definition at line 55 of file TIDAAssociator.h.

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

◆ size()

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

Definition at line 69 of file TIDAAssociator.h.

69{ 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 54 of file Associator_TruthMatch.h.

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

Member Data Documentation

◆ mmatched

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

Definition at line 76 of file TIDAAssociator.h.

◆ mname

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

Definition at line 74 of file TIDAAssociator.h.

◆ mrevmatched

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

Definition at line 77 of file TIDAAssociator.h.


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