Skip to content
Snippets Groups Projects

ISFTruthIncident / ISF_Fatras - Improve robustness + fix warnings

Merged John Derek Chapman requested to merge jchapman/athena:FixISFTruthIncident_main into main
All threads resolved!
1 file
+ 17
11
Compare changes
  • Side-by-side
  • Inline
@@ -239,17 +239,23 @@ void iFatras::G4ParticleDecayHelper::handleDecayParticles(const ISF::ISFParticle
decayProduct->setNextGeoID( particle.nextGeoID() );
}//loop over all decay products
// register TruthIncident
ISF::ISFTruthIncident truth( const_cast<ISF::ISFParticle&>(particle),
decayProducts,
process,
particle.nextGeoID(), // inherits from the parent
ISF::fKillsPrimary );
m_truthRecordSvc->registerTruthIncident( truth);
// At this point we need to update the properties of the
// ISFParticles produced in the interaction
truth.updateChildParticleProperties();
auto* truthBinding = particle.getTruthBinding(); // TEMPORARY
HepMC::ConstGenParticlePtr hepTruthParticle = truthBinding ? truthBinding->getTruthParticle() : nullptr; // TEMPORARY
if (hepTruthParticle && hepTruthParticle->end_vertex()) { // TEMPORARY
ATH_MSG_WARNING("G4ParticleDecayHelper::handleDecayParticles(): Parent particle found with an end vertex attached. This should not happen!");
}
else {
// register TruthIncident
ISF::ISFTruthIncident truth( const_cast<ISF::ISFParticle&>(particle),
decayProducts,
process,
particle.nextGeoID(), // inherits from the parent
ISF::fKillsPrimary );
m_truthRecordSvc->registerTruthIncident( truth);
// At this point we need to update the properties of the
// ISFParticles produced in the interaction
truth.updateChildParticleProperties();
}
// simulate the tracks of the daughter particles ------- run over decay products
for (ISF::ISFParticle *decayProduct : decayProducts) {
// feed it the particle broker with parent information
Loading