Skip to content
Snippets Groups Projects
Commit 1fae85cc authored by Wouter Deconinck's avatar Wouter Deconinck Committed by Andre Sailer
Browse files

edm4hep: don't add particle as parent to its daughters

Also, don't add particle as daughter to its parents.

This addresses an issue with fully duplicated entries in the parents and
daughters relations for MCParticles. After this bugfix, only a single
entry for each parents is entered in the parents relations, similar for
daughters. More demonstrated behavior in pull request comments.

BEGINRELEASENOTES
- edm4hep: don't add particle as parent to its daughters, and vice versa
ENDRELEASENOTES
parent 33a586b2
No related branches found
No related tags found
No related merge requests found
......@@ -354,7 +354,6 @@ void Geant4Output2EDM4hep::saveParticles(Geant4ParticleMap* particles) {
}
int iqdau = (*k).second;
auto qdau = (*mcpc)[iqdau];
qdau.addToParents(q);
q.addToDaughters(qdau);
}
......@@ -368,7 +367,6 @@ void Geant4Output2EDM4hep::saveParticles(Geant4ParticleMap* particles) {
int iqpar = (*k).second;
auto qpar = (*mcpc)[iqpar];
q.addToParents(qpar);
qpar.addToDaughters(q);
}
}
}
......
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