Skip to content
Snippets Groups Projects
Commit 57d6f7df authored by guofangyi@ihep.ac.cn's avatar guofangyi@ihep.ac.cn
Browse files

Resolve "MCParticle in simulation"

parent e62507e0
No related branches found
No related tags found
No related merge requests found
......@@ -81,6 +81,14 @@ Edm4hepWriterAnaElemTool::BeginOfEventAction(const G4Event* anEvent) {
newparticle.setMomentumAtEndpoint(mcGenParticle.getMomentumAtEndpoint());
newparticle.setSpin (mcGenParticle.getSpin());
newparticle.setColorFlow (mcGenParticle.getColorFlow());
// Add parent-daughter relation
for(auto imc = 0; imc<mcGenParticle.parents_size(); imc++){
newparticle.addToParents(mcGenParticle.getParents(imc));
}
for(auto imc = 0; imc<mcGenParticle.daughters_size(); imc++){
newparticle.addToDaughters(mcGenParticle.getDaughters(imc));
}
}
msg() << "mcCol size (original) : " << mcCol->size() << endmsg;
......
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