Skip to content
Snippets Groups Projects
Commit 9cbdc744 authored by lintao@ihep.ac.cn's avatar lintao@ihep.ac.cn
Browse files

WIP: when a hit is created by a secondary track, set this flag.

parent 5081e0d9
No related branches found
No related tags found
No related merge requests found
......@@ -207,6 +207,11 @@ Edm4hepWriterAnaElemTool::EndOfEventAction(const G4Event* anEvent) {
}
edm_trk_hit.setMCParticle(mcCol->at(pritrkid-1));
if (pritrkid != trackID) {
// If the track is a secondary, then the primary track id and current track id is different
edm_trk_hit.setProducedBySecondary(true);
}
}
dd4hep::sim::Geant4CalorimeterHit* cal_hit = dynamic_cast<dd4hep::sim::Geant4CalorimeterHit*>(h);
......
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