50 G4Event* anEvent =
new G4Event(i_event);
52 if(!userPrimaryGeneratorAction)
55 std::cout<<
"calling the hepmc interface"<<std::endl;
60 std::cout<<
"got the hepmcEvent"<<std::endl;
61 hepmcInterface->
HepMC2G4(hepmcEvent, anEvent);
62 delete hepmcInterface;
68 if(storeRandomNumberStatus) {
69 G4String fileN = randomNumberStatusDir +
"currentEvent.rndm";
70 CLHEP::HepRandom::saveEngineStatus(fileN);
72 userPrimaryGeneratorAction->GeneratePrimaries(anEvent);
79 G4cout<<G4endl<<
"primary particles of this event: "<<G4endl;
80 G4int n_vertex = anEvent->GetNumberOfPrimaryVertex();
81 for( G4int i=0; i<n_vertex; i++ )
83 G4cout<<
"vertex:"<<i<<G4endl;
84 G4PrimaryVertex* primaryVertex = anEvent->GetPrimaryVertex(i);
85 G4PrimaryParticle* primaryParticle = primaryVertex->GetPrimary();
87 while( primaryParticle != 0 )
89 G4int PDGcode = primaryParticle->GetPDGcode();
91 primaryParticle = primaryParticle->GetNext();