73 for(HepMC::GenEvent::vertex_const_iterator vitr= hepmcevt->vertices_begin();
74 vitr != hepmcevt->vertices_end(); ++vitr ) {
78 for (HepMC::GenVertex::particle_iterator
79 pitr= (*vitr)->particles_begin(HepMC::children);
80 pitr != (*vitr)->particles_end(HepMC::children); ++pitr) {
82 if (!(*pitr)->end_vertex() && (*pitr)->status()==1) {
90 HepMC::FourVector pos= (*vitr)->
position();
91 G4LorentzVector xvtx(pos.x(), pos.y(), pos.z(), pos.t());
99 for (HepMC::GenVertex::particle_iterator
100 vpitr= (*vitr)->particles_begin(HepMC::children);
101 vpitr != (*vitr)->particles_end(HepMC::children); ++vpitr) {
103 if( (*vpitr)->status() != 1 )
continue;
105 G4int pdgcode= (*vpitr)-> pdg_id();
106 pos= (*vpitr)-> momentum();
107 G4LorentzVector p(pos.px(), pos.py(), pos.pz(), pos.e());
111 g4vtx-> SetPrimary(g4prim);
113 g4event-> AddPrimaryVertex(g4vtx);