24 const std::string&
name ) :
37 return StatusCode::SUCCESS;
46 const std::string& chainRoIName,
47 const std::string& roiStr )
const
55 " was already done. Skipping" );
56 return StatusCode::SUCCESS;
68 return StatusCode::SUCCESS;
75 const std::vector< const xAOD::TrackParticle* >& vTest,
76 const std::vector< const xAOD::TrackParticle* >& vRef,
79 ATH_MSG_DEBUG(
"Doing EFtrack matching through truthParticleLink" );
83 bool firstMatch =
true;
88 *track_particle_test, m_truthProbCut.value() );
91 if( not truth_particle_test ) {
99 " is linked to truth with pT = " <<
pT( *truth_particle_test ) <<
" and prob = " << prob_test );
103 float prob_ref = -99.;
114 if( not truth_particle_tmp ) {
121 ATH_MSG_DEBUG(
"Reference track with pT = " <<
pT( *track_particle_tmp ) <<
122 " is linked to truth with pT = " <<
pT( *truth_particle_tmp ) <<
" and prob = " << prob_tmp );
124 if( truth_particle_tmp != truth_particle_test )
continue;
126 ATH_MSG_DEBUG(
"Test track with pT = " <<
pT( *track_particle_test ) <<
127 " matches with reference track with pT = " <<
pT( *track_particle_tmp ) );
131 if( prob_tmp > prob_ref ) {
132 if( not firstMatch )
ATH_MSG_DEBUG(
"Found better match. Updating." );
134 track_particle_ref = track_particle_tmp;
140 if( not track_particle_ref ) {
141 ATH_MSG_DEBUG(
"No match found for test track with pT = " <<
pT( *track_particle_test ) );
143 ATH_MSG_DEBUG(
"Found best match: test track with pT = " <<
pT( *track_particle_test ) <<
144 " matches with reference track with pT = " <<
pT( *track_particle_ref ) );
147 float dist = 1 - prob_test * prob_ref;
148 ATH_CHECK( matches.
update( *track_particle_test, *track_particle_ref, dist ) );
155 return StatusCode::SUCCESS;