#include <G4SvcRunManager.h>
Definition at line 15 of file G4SvcRunManager.h.
◆ G4SvcRunManager()
G4SvcRunManager::G4SvcRunManager |
( |
| ) |
|
◆ ~G4SvcRunManager()
G4SvcRunManager::~G4SvcRunManager |
( |
| ) |
|
|
virtual |
◆ GenerateEvent()
G4Event * G4SvcRunManager::GenerateEvent |
( |
G4int |
i_event | ) |
|
Definition at line 48 of file G4SvcRunManager.cpp.
49{
50 G4Event* anEvent = new G4Event(i_event);
51
52 if(!userPrimaryGeneratorAction)
53 {
54 if(m_logLevel<=4)
55 std::cout<<"calling the hepmc interface"<<std::endl;
59 if(m_logLevel<=4)
60 std::cout<<"got the hepmcEvent"<<std::endl;
61 hepmcInterface->
HepMC2G4(hepmcEvent, anEvent);
62 delete hepmcInterface;
63 if(m_logLevel<=4)
65
66 }
67 else{
68 if(storeRandomNumberStatus) {
69 G4String fileN = randomNumberStatusDir + "currentEvent.rndm";
70 CLHEP::HepRandom::saveEngineStatus(fileN);
71 }
72 userPrimaryGeneratorAction->GeneratePrimaries(anEvent);
73 }
74 return anEvent;
75}
HepMC::GenEvent * GenerateHepMCEvent()
void HepMC2G4(HepMC::GenEvent *hepmcevt, G4Event *g4event)
void SetLogLevel(G4int level)
void PrintPrimary(G4Event *anEvent)
Referenced by SimulateEvent().
◆ PrintPrimary()
void G4SvcRunManager::PrintPrimary |
( |
G4Event * |
anEvent | ) |
|
Definition at line 77 of file G4SvcRunManager.cpp.
78{
79 G4cout<<G4endl<<"primary particles of this event: "<<G4endl;
80 G4int n_vertex = anEvent->GetNumberOfPrimaryVertex();
81 for( G4int i=0; i<n_vertex; i++ )
82 {
83 G4cout<<"vertex:"<<i<<G4endl;
84 G4PrimaryVertex* primaryVertex = anEvent->GetPrimaryVertex(i);
85 G4PrimaryParticle* primaryParticle = primaryVertex->GetPrimary();
86 G4cout<<"PDGCode:";
87 while( primaryParticle != 0 )
88 {
89 G4int PDGcode = primaryParticle->GetPDGcode();
90 G4cout<<PDGcode<<" ";
91 primaryParticle = primaryParticle->GetNext();
92 }
93 G4cout<<G4endl;
94 }
95 G4cout<<G4endl;
96}
Referenced by GenerateEvent().
◆ SimulateEvent()
void G4SvcRunManager::SimulateEvent |
( |
int |
i | ) |
|
Definition at line 97 of file G4SvcRunManager.cpp.
98{
99
100
102 eventManager->ProcessOneEvent(currentEvent);
103 AnalyzeEvent(currentEvent);
104
105 StackPreviousEvent(currentEvent);
106 currentEvent = 0;
107 if(m_logLevel<=4)
108 std::cout<<"SimulateEvent : done simulating one event "<<std::endl<<std::endl;
109}
G4Event * GenerateEvent(G4int i_event)
Referenced by G4Svc::SimulateEvents().
◆ G4Svc
The documentation for this class was generated from the following files: