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

Merge branch '4-mcparticle-in-simulation' into 'master'

Resolve "MCParticle in simulation"

Closes #4

See merge request cepc/CEPCSW!22
parents e62507e0 57d6f7df
No related branches found
No related tags found
No related merge requests found
...@@ -81,6 +81,14 @@ Edm4hepWriterAnaElemTool::BeginOfEventAction(const G4Event* anEvent) { ...@@ -81,6 +81,14 @@ Edm4hepWriterAnaElemTool::BeginOfEventAction(const G4Event* anEvent) {
newparticle.setMomentumAtEndpoint(mcGenParticle.getMomentumAtEndpoint()); newparticle.setMomentumAtEndpoint(mcGenParticle.getMomentumAtEndpoint());
newparticle.setSpin (mcGenParticle.getSpin()); newparticle.setSpin (mcGenParticle.getSpin());
newparticle.setColorFlow (mcGenParticle.getColorFlow()); 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; 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