|
[Rivet-svn] rivet: protect against null genParticleRivet Mercurial rivet at projects.hepforge.orgSat Nov 25 13:15:02 GMT 2017
details: https://rivet.hepforge.org/hg/rivet/rev/fe2ecab7f4b0 branches: changeset: 6157:fe2ecab7f4b0 user: Jon Butterworth <j.butterworth at cern.ch> date: Sat Nov 25 13:07:26 2017 +0000 description: protect against null genParticle diffs (10 lines): --- a/analyses/pluginATLAS/ATLAS_2014_I1306615.cc Sat Nov 25 10:18:46 2017 +0000 +++ b/analyses/pluginATLAS/ATLAS_2014_I1306615.cc Sat Nov 25 13:07:26 2017 +0000 @@ -371,6 +371,7 @@ // Trace event record to see if particle came from a hadron (or a tau from a hadron decay) // Based on fromDecay() function bool fromHadronDecay(const Particle& p ) { + if (p.genParticle() == NULL) return false; const GenVertex* prodVtx = p.genParticle()->production_vertex(); if (prodVtx == NULL) return false; foreach (const GenParticle* ancestor, particles(prodVtx, HepMC::ancestors)) {
More information about the Rivet-svn mailing list |