85 if (!tauJetsReadHandle.
isValid()) {
86 ATH_MSG_ERROR (
"Could not retrieve TauJetContainer with key " << tauJetsReadHandle.
key());
87 return StatusCode::FAILURE;
94 bool found_truth_taus =
false;
99 if(!truthTauJetsReadHandle.
isValid()) {
101 found_truth_taus =
false;
103 truth_taus = truthTauJetsReadHandle.
cptr();
104 found_truth_taus =
true;
108 std::vector<const xAOD::TruthParticle*> vec_truth_taus;
109 std::vector<const xAOD::TauJet*> vec_reco_taus;
121 for (
auto tau : *
taus) {
123 if ( !
static_cast<bool>(
m_primTauSel->accept(*tau)) )
continue;
124 bool nominal =
static_cast<bool>(
m_nomiTauSel->accept(*tau));
139 int recProng = tau->nTracks();
140 if ( recProng == 1 ) {
150 else if ( recProng == 3 ) {
170 ATH_MSG_DEBUG(
"Tau is truth-matched and not with a quark or a jet");
171 if ( trueTau->isTau() ) {
173 if( (
bool) isHadronicTau(*trueTau) ) {
191 if(found_truth_taus){
192 vec_reco_taus.push_back(tau);
195 if ( recProng == 1 ) {
207 else if ( recProng == 3 ) {
226 }
else if(trueTau->isElectron()) {
240 ATH_MSG_DEBUG(
"Tau is matched to a jet or Tau is unmatched - consider it as fake");
254 if ( recProng == 1 ) {
264 if ( recProng == 3 ) {
278 if(found_truth_taus){
279 for (
auto truth_tau : *truth_taus) {
280 vec_truth_taus.push_back(truth_tau);
289 return StatusCode::SUCCESS;