4 // Author: I. Hrivnacova
6 // Class AliRunConfiguration
7 // -------------------------
8 // See the class description in the header file.
10 #include "AliRunConfiguration.h"
11 #include "AliRunMessenger.h"
12 #include "AliDetConstruction.h"
13 #include "TG4SDConstruction.h"
14 #include "AliPrimaryGeneratorAction.h"
15 #include "TG4RunAction.h"
16 #include "TG4EventAction.h"
17 #include "TG4TrackingAction.h"
18 #include "TG4SteppingAction.h"
19 #include "TG4SpecialStackingAction.h"
22 #include "TG4ModularPhysicsList.h"
24 ClassImp(AliRunConfiguration)
26 Bool_t AliRunConfiguration::fgIsHoles = true;
28 //_____________________________________________________________________________
29 AliRunConfiguration::AliRunConfiguration()
30 : TG4VRunConfiguration()
33 CreateUserConfiguration();
35 fRunMessenger = new AliRunMessenger();
36 fFiles = new AliFiles();
39 //_____________________________________________________________________________
40 AliRunConfiguration::AliRunConfiguration(const AliRunConfiguration& right)
41 : TG4VRunConfiguration(right)
43 // TG4VRunConfiguration is protected from copying
46 //_____________________________________________________________________________
47 AliRunConfiguration::~AliRunConfiguration() {
52 // all user action data members are deleted
53 // in G4RunManager::~G4RunManager()
58 //_____________________________________________________________________________
60 AliRunConfiguration::operator=(const AliRunConfiguration& right)
62 // check assignement to self
63 if (this == &right) return *this;
65 // base class assignement
66 // TG4VRunConfiguration is protected from assigning
67 TG4VRunConfiguration::operator=(right);
74 //_____________________________________________________________________________
75 void AliRunConfiguration::CreateUserConfiguration()
77 // Creates the mandatory Geant4 classes and
78 // the other user action classes.
81 G4cout << "AliRunConfiguration::CreateUserConfiguration()" << G4endl;
83 // create mandatory Geant4 classes
84 fDetectorConstruction = new AliDetConstruction();
85 fSDConstruction = new TG4SDConstruction();
86 fPhysicsList = new TG4ModularPhysicsList();
87 fPrimaryGenerator = new AliPrimaryGeneratorAction();
89 // create the other user action classes
90 fRunAction = new TG4RunAction();
91 fEventAction = new TG4EventAction();
92 fTrackingAction = new TG4TrackingAction();
93 fSteppingAction = new TG4SteppingAction();
94 fStackingAction = new TG4SpecialStackingAction();
99 //_____________________________________________________________________________
100 void AliRunConfiguration::SetConfigName(const char* name)
102 // Sets the configuration macro name
104 fFiles->SetMacroName(name);
107 //_____________________________________________________________________________
108 void AliRunConfiguration::SetG3CallsName(const char* name)
110 // Sets the configuration macro name
112 fFiles->SetG3CallsName(name);