]> git.uio.no Git - u/mrichter/AliRoot.git/blame - AliGeant4/AliRunConfiguration.cxx
Field conversion factor added.
[u/mrichter/AliRoot.git] / AliGeant4 / AliRunConfiguration.cxx
CommitLineData
676fb573 1// $Id$
2// Category: run
3//
a1c3ca7a 4// Author: I. Hrivnacova
5//
6// Class AliRunConfiguration
7// -------------------------
676fb573 8// See the class description in the header file.
9
10#include "AliRunConfiguration.h"
11#include "AliRunMessenger.h"
676fb573 12#include "AliDetConstruction.h"
b9d0a01d 13#include "TG4SDConstruction.h"
676fb573 14#include "AliPrimaryGeneratorAction.h"
b9d0a01d 15#include "TG4RunAction.h"
16#include "TG4EventAction.h"
17#include "TG4TrackingAction.h"
18#include "TG4SteppingAction.h"
19#include "TG4SpecialStackingAction.h"
8778e0b6 20#include "AliFiles.h"
676fb573 21
deaf888c 22#include "TG4ModularPhysicsList.h"
676fb573 23
b9d0a01d 24ClassImp(AliRunConfiguration)
25
ecb85139 26Bool_t AliRunConfiguration::fgIsHoles = true;
27
b9a13d8f 28//_____________________________________________________________________________
29AliRunConfiguration::AliRunConfiguration()
30 : TG4VRunConfiguration()
31{
676fb573 32//
676fb573 33 CreateUserConfiguration();
b9a13d8f 34
35 fRunMessenger = new AliRunMessenger();
36 fFiles = new AliFiles();
676fb573 37}
38
b9a13d8f 39//_____________________________________________________________________________
676fb573 40AliRunConfiguration::AliRunConfiguration(const AliRunConfiguration& right)
41 : TG4VRunConfiguration(right)
42{
43 // TG4VRunConfiguration is protected from copying
44}
45
b9a13d8f 46//_____________________________________________________________________________
676fb573 47AliRunConfiguration::~AliRunConfiguration() {
48//
49 delete fRunMessenger;
8778e0b6 50 delete fFiles;
676fb573 51
52 // all user action data members are deleted
53 // in G4RunManager::~G4RunManager()
54}
55
56// operators
57
b9a13d8f 58//_____________________________________________________________________________
676fb573 59AliRunConfiguration&
60AliRunConfiguration::operator=(const AliRunConfiguration& right)
61{
62 // check assignement to self
63 if (this == &right) return *this;
64
65 // base class assignement
66 // TG4VRunConfiguration is protected from assigning
67 TG4VRunConfiguration::operator=(right);
68
69 return *this;
70}
71
72// protected methods
73
b9a13d8f 74//_____________________________________________________________________________
676fb573 75void AliRunConfiguration::CreateUserConfiguration()
76{
77// Creates the mandatory Geant4 classes and
78// the other user action classes.
79// ---
80
b9d0a01d 81 G4cout << "AliRunConfiguration::CreateUserConfiguration()" << G4endl;
82
676fb573 83 // create mandatory Geant4 classes
84 fDetectorConstruction = new AliDetConstruction();
b9d0a01d 85 fSDConstruction = new TG4SDConstruction();
deaf888c 86 fPhysicsList = new TG4ModularPhysicsList();
676fb573 87 fPrimaryGenerator = new AliPrimaryGeneratorAction();
88
89 // create the other user action classes
b9d0a01d 90 fRunAction = new TG4RunAction();
91 fEventAction = new TG4EventAction();
92 fTrackingAction = new TG4TrackingAction();
93 fSteppingAction = new TG4SteppingAction();
94 fStackingAction = new TG4SpecialStackingAction();
676fb573 95}
8778e0b6 96
97// public methods
98
b9a13d8f 99//_____________________________________________________________________________
8778e0b6 100void AliRunConfiguration::SetConfigName(const char* name)
101{
102// Sets the configuration macro name
103// ---
104 fFiles->SetMacroName(name);
105}
106
b9a13d8f 107//_____________________________________________________________________________
8778e0b6 108void AliRunConfiguration::SetG3CallsName(const char* name)
109{
110// Sets the configuration macro name
111// ---
112 fFiles->SetG3CallsName(name);
113}
114