Commit b6cd7cc0 authored by Johannes Elmsheuser's avatar Johannes Elmsheuser
Browse files

Merge branch 'master_PJT_NullptrCheck' into 'master'

Adding nullptr checks for ParticleJetTools

See merge request atlas/athena!47121
parents bc58cb9b 38c38b15
......@@ -32,6 +32,7 @@ namespace {
if (!f(tp)) return false;
if (!tp->hasDecayVtx()) return false;
for (unsigned int i = 0; i < tp->decayVtx()->nOutgoingParticles(); ++i) {
if (tp->decayVtx()->outgoingParticle(i)==nullptr) continue;
if (f(tp->decayVtx()->outgoingParticle(i))) return false;
}
return true;
......@@ -42,6 +43,7 @@ namespace {
if (!f(tp)) return false;
if (!tp->hasProdVtx()) return false;
for (unsigned int i = 0; i < tp->prodVtx()->nIncomingParticles(); ++i) {
if (tp->prodVtx()->incomingParticle(i)==nullptr) continue;
if (f(tp->prodVtx()->incomingParticle(i))) return false;
}
return true;
......@@ -51,6 +53,9 @@ namespace {
bool CopyFlavorLabelTruthParticles::classify(const xAOD::TruthParticle* tp) const {
// Cut on particle type
if (tp == nullptr){
return false;
}
if (m_ptype == "BHadronsFinal") {
//ATH_MSG_DEBUG("Selecting in BHadronsFinal mode");
return isFinalWith(tp, isBHadron);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment