-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathActionInitialization.cc
61 lines (44 loc) · 1.58 KB
/
ActionInitialization.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// Geant4 Libraries
//
// Local Libraries
//
#include "ActionInitialization.hh"
#include "PrimaryGeneratorAction.hh"
#include "RunAction.hh"
#include "SteppingAction.hh"
#include "SteppingVerbose.hh"
#include "EventAction.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ActionInitialization::ActionInitialization()
: G4VUserActionInitialization()
{
G4cout << "...ActionInitialization..." << G4endl;
parCrk = new PrimarySpectrum();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ActionInitialization::~ActionInitialization()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ActionInitialization::BuildForMaster() const
{
RunAction* runAction = new RunAction;
SetUserAction(runAction);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ActionInitialization::Build() const
{
RunAction* runAction = new RunAction();
SetUserAction(runAction);
PrimaryGeneratorAction* primaryGenAction = new PrimaryGeneratorAction(parCrk);
SetUserAction(primaryGenAction);
EventAction* eventAction = new EventAction(runAction, primaryGenAction);
SetUserAction(eventAction);
SteppingAction* stepAction = new SteppingAction(eventAction);
SetUserAction(stepAction);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4VSteppingVerbose* ActionInitialization::InitializeSteppingVerbose() const
{
return new SteppingVerbose();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......