18 const std::string&
name,
19 ISvcLocator* pSvcLocator ) :
28 ATH_CHECK( m_offlineTrkParticlesName.initialize(
29 not m_offlineTrkParticlesName.key().empty() ) );
31 ATH_CHECK( m_tausName.initialize( not m_tausName.key().empty() ) );
35 *
this, m_offlineTrkParticlesName,
36 m_prefix.value(), m_decor_tau_names, m_decor_tau );
38 if( m_decor_tau.size() != NDecorations ) {
40 m_tauType.value() <<
" " <<
41 m_tauNprongs.value() <<
42 "prong decorations" );
43 return StatusCode::FAILURE;
46 return StatusCode::SUCCESS;
58 ATH_MSG_ERROR(
"Failed to retrieve track particles container" );
59 return StatusCode::FAILURE;
66 return StatusCode::FAILURE;
69 std::vector< IDTPM::OptionalDecoration<xAOD::TrackParticleContainer, ElementTauLink_t> >
72 if( tau_decor.empty() ) {
74 m_tauType.value() <<
" " <<
75 m_tauNprongs.value() <<
76 "prong decorations" );
77 return StatusCode::FAILURE;
85 return StatusCode::SUCCESS;
102 int NTauTracks = tau->nTracks();
103 if( m_tauNprongs.value() > 0 and NTauTracks != (
int)m_tauNprongs.value() )
continue;
106 std::vector< const xAOD::TrackParticle* > tauTracks;
107 for(
size_t iprong=0; iprong<(size_t)NTauTracks; iprong++ ) {
109 std::vector< ElementTrackLink_t > tracklink = tau->track( iprong )->trackLinks();
110 ATH_MSG_DEBUG(
"TauLinkVec size (" << m_tauNprongs.value() <<
111 "prong " << m_tauType.value() <<
"tau) = " << tracklink.size() );
114 for(
size_t ilink=0; ilink<tracklink.size() ; ilink++ ) {
115 if( tracklink.at(ilink).isValid() ) tauTracks.push_back( *(tracklink.at(ilink)) );
120 ATH_MSG_DEBUG(
"TauVec size (" << m_tauNprongs.value() <<
"prong " <<
121 m_tauType.value() <<
"tau) = " << tauTracks.size() );
131 if( tauTrack == &
track ) {
136 bool isTight(
false ), isMedium(
false );
137 bool isLoose(
false ), isVeryLoose(
false );
139 if( m_tauType.value() ==
"BDT" ) {
145 }
else if( m_tauType.value() ==
"RNN" ) {
153 return StatusCode::FAILURE;
157 if( isTight or isMedium or isLoose or isVeryLoose ) {
159 m_tauType.value() <<
" " <<
160 m_tauNprongs.value() <<
161 "prong (pt=" << tau->pt() <<
162 "). Decorating track." );
164 return StatusCode::SUCCESS;
193 return StatusCode::SUCCESS;