31 #include "HepMCG4Interface.hh"
59 -> GetNavigatorForTracking();
62 G4VSolid* solid= world-> GetLogicalVolume()-> GetSolid();
63 EInside qinside= solid-> Inside(pos);
65 if( qinside !=
kInside)
return false;
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();
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();
111 g4vtx-> SetPrimary(g4prim);
113 g4event-> AddPrimaryVertex(g4vtx);
120 HepMC::GenEvent* aevent=
new HepMC::GenEvent();
133 G4cout <<
"HepMCInterface: no generated particles. run terminated..."