Skip to content

ISFTruthIncident / ISF_Fatras - Improve robustness + fix warnings

The changes in this merge request should finally fix the many warnings seen when running simulation using ISF_Fatras. There are two main sets of changes:

  1. ISFTruthIncident: Add methods to properly update ISFParticles after the Truth Incident has been registered with the TruthSvc. The ISFTruthIncident::updateHepMCTruthParticle() method was changed to only update the ISF::TruthBinding of the ISFParticle in question. This is because a valid (GenParticle::)id value and hence a valid HepMcParticleLink can only be obtained after a new GenParticle has been added to the GenEvent - this occurs within the TruthSvc, not within the ISFTruthIncident. Instead ISFTruthIncident::updateParentAfterIncidentProperties() and ISFTruthIncident::updateChildParticleProperties() can be called to sync up the ISFParticle properties after the call to TruthSvc::registerTruthIncident(). These handle all cases except the case where the parent particle survives the interaction, but is not recorded to the GenEvent (for a follow-up MR).
  2. Updates to ISF_Fatras classes (+ FastCaloSimV2Tool). All ISFParticles for secondaries created by Fatras should not have barcode/id/truthBinding/particleLink set initially. These should be set by the calls to TruthSvc::registerTruthIncident(), ISFTruthIncident::updateParentAfterIncidentProperties() and ISFTruthIncident::updateChildParticleProperties(). These calls should all be made before any particles are passed back to the ParticleBroker. No TruthBinding for secondaries should be set directly by the ISF_Fatras code. (NB For the special case of particles being returned to the ParticleBroker having not interacted, then the returned ISFParticle should have the same barcode/id/truthBinding/particleLink as the initial ISFParticle - this has to be set manually in the McMaterialEffectsUpdator code.

(Note to review shifters - it's probably best to review this with whitespace changes switched off. The ISF_Fatras classes need a larger clean-up, but that is beyond the scope of this merge request.)

Edited by John Derek Chapman

Merge request reports