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

Debugging changes

parent fede7573
No related branches found
No related tags found
No related merge requests found
......@@ -290,17 +290,23 @@ void iFatras::PhotonConversionTool::recordChilds(double time,
children[ichild] = ch2;
}
// register TruthIncident
ISF::ISFTruthIncident truth( const_cast<ISF::ISFParticle&>(*parent),
children,
m_processCode,
parent->nextGeoID(),
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 = parent->getTruthBinding(); // TEMPORARY
HepMC::ConstGenParticlePtr hepTruthParticle = truthBinding ? truthBinding->getTruthParticle() : nullptr; // TEMPORARY
if (hepTruthParticle && hepTruthParticle->end_vertex()) { // TEMPORARY
ATH_MSG_WARNING("PhotonConversionTool::recordChilds(): Parent particle found with an end vertex attached. This should not happen!");
}
else {
// register TruthIncident
ISF::ISFTruthIncident truth( const_cast<ISF::ISFParticle&>(*parent),
children,
m_processCode,
parent->nextGeoID(),
ISF::fKillsPrimary );
m_truthRecordSvc->registerTruthIncident( truth);
// At this point we need to update the properties of the
// ISFParticles produced in the interaction
truth.updateChildParticleProperties();
}
// push onto ParticleStack
if (!children.empty() ) {
// FIXME Check this doesn't cause problems in the TruthSvc
......
......@@ -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
......
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