Skip to content
Snippets Groups Projects
Commit 2eebb614 authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

Merge branch 'gmarchio-main-20250523-FixFlavourTaggingCrash' into 'main'

Fix crash in derivations arising from flavour tagging decoration code

See merge request atlas/athena!71633
parents af66f994 9b623844
No related branches found
No related tags found
No related merge requests found
......@@ -32,20 +32,21 @@ namespace FlavorTagDiscriminants {
}
bool is_bc_hadron(const xAOD::TruthParticle* truth_particle, int flavour) {
if( truth_particle == nullptr ) { return false; }
if( flavour == 5 && truth_particle->isBottomHadron() ) { return true; }
if( flavour == 4 && truth_particle->isCharmHadron() ) { return true; }
return false;
}
bool is_weakly_decaying_hadron(const xAOD::TruthParticle* truth_particle, int flavour) {
if (!is_bc_hadron(truth_particle, flavour)) return false;
if (!truth_particle->hasDecayVtx() ) return false;
if (!truth_particle->hasDecayVtx() ) return false;
for ( const auto out_part: truth_particle->decayVtx()->particles_out()) {
if ( is_bc_hadron(out_part, flavour) ) return false;
}
}
return true;
}
bool is_weakly_decaying_hadron(const xAOD::TruthParticle* truth_particle) {
return is_weakly_decaying_hadron(truth_particle, 5) || is_weakly_decaying_hadron(truth_particle, 4);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment