EDepSimCreateRunManager.cc
Go to the documentation of this file.
8 
10 
11 // The default physics list.
12 #include "EDepSimPhysicsList.hh"
13 
14 G4RunManager* EDepSim::CreateRunManager(G4String physicsList) {
15  // Set the mandatory initialization classes
16 
17  // Construct the default run manager
18  G4RunManager* runManager = new G4RunManager;
19 
20  // Construct the detector construction class.
23  runManager->SetUserInitialization(theDetector);
24 
25  // Add the physics list first. This is a G4 requirement!
26  runManager->SetUserInitialization(new EDepSim::PhysicsList(physicsList));
27 
28  // Set the other mandatory user action class
29  runManager->SetUserAction(new EDepSim::UserPrimaryGeneratorAction);
30  runManager->SetUserAction(new EDepSim::UserRunAction);
31  runManager->SetUserAction(new EDepSim::UserEventAction);
32  runManager->SetUserAction(new EDepSim::UserStackingAction);
33  runManager->SetUserAction(new EDepSim::UserTrackingAction);
34 
35  return runManager;
36 }
G4RunManager * CreateRunManager(G4String physicsList)