We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aca070f commit d223715Copy full SHA for d223715
Analysis/Core/include/AnalysisCore/RecoDecay.h
@@ -501,7 +501,12 @@ class RecoDecay
501
}
502
503
// Get the mass of the new particle and add it in the list.
504
- auto newMass = TDatabasePDG::Instance()->GetParticle(pdg)->Mass();
+ const TParticlePDG* particle = TDatabasePDG::Instance()->GetParticle(pdg);
505
+ if (!particle) { // Check that it's there
506
+ LOGF(fatal, "Cannot find particle mass for PDG code %i", pdg);
507
+ return 999.;
508
+ }
509
+ auto newMass = particle->Mass();
510
mListMass.push_back(std::make_tuple(pdg, newMass));
511
return newMass;
512
0 commit comments