Skip to content
Snippets Groups Projects
Commit 76e5eb06 authored by Frank Gaede's avatar Frank Gaede Committed by Frank Gaede
Browse files

adapt LCIOEventReader for Pythia8 and Whizard2

 - add all parentless particles to outgoing vertex
parent 30a5c410
No related branches found
No related tags found
No related merge requests found
...@@ -149,11 +149,17 @@ LCIOEventReader::readParticles(int event_number, ...@@ -149,11 +149,17 @@ LCIOEventReader::readParticles(int event_number,
// haveVertex = true ; // haveVertex = true ;
// } // }
//fg: we simply add all particles without parents as outgoing to the main
// event vertex. This might include the incoming beam particles, e.g. in
// the case of lcio files written with Whizard2, which is slightly odd,
// however should be treated correctly in Geant4InputHandling.cpp.
// We no longer make an attempt to identify the incoming particles
// based on the generator status, as this varies widely with different
// generators.
if ( p->parents.size() == 0 ) { if ( p->parents.size() == 0 ) {
if ( status.isSet(G4PARTICLE_GEN_EMPTY) || status.isSet(G4PARTICLE_GEN_DOCUMENTATION) )
vtx->in.insert(p->id); // Beam particles and primary quarks etc vtx->out.insert(p->id); // Stuff, to be given to Geant4 together with daughters
else
vtx->out.insert(p->id); // Stuff, to be given to Geant4 together with daughters
} }
if ( mcp->isCreatedInSimulation() ) status.set(G4PARTICLE_SIM_CREATED); if ( mcp->isCreatedInSimulation() ) status.set(G4PARTICLE_SIM_CREATED);
......
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