Skip to content
Snippets Groups Projects
Commit d8740f02 authored by John Chapman's avatar John Chapman
Browse files

TruthUtils: Bugfix for get_particle_history function

parent 049243a0
No related branches found
No related tags found
No related merge requests found
Pipeline #11049676 passed
......@@ -167,7 +167,7 @@ namespace HepMC {
auto pv = p->production_vertex();
if (pv) {
for (auto pa: pv->particles_in()) {
if (pa->pdg_id() != p->pdg_id()) continue;
if (!pa || pa->pdg_id() != p->pdg_id()) continue;
out.push_front(uniqueID(p));
get_particle_history(pa, out, -1);
break;
......@@ -180,7 +180,7 @@ namespace HepMC {
auto pv = p->end_vertex();
if (pv) {
for (auto pa: pv->particles_out()) {
if (pa->pdg_id() != p->pdg_id()) continue;
if (!pa || pa->pdg_id() != p->pdg_id()) continue;
out.push_back(uniqueID(p));
get_particle_history(pa, out, 1);
break;
......
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