]> git.uio.no Git - u/mrichter/AliRoot.git/blame - AliGeant4/macro/g4libs.C
update for changes in Config.C
[u/mrichter/AliRoot.git] / AliGeant4 / macro / g4libs.C
CommitLineData
a776d963 1// $Id$
2
0f507a31 3#include <iostream.h>
4
5static Bool_t isGeant4 = false;
6static Bool_t isSteer = false;
7static Bool_t isDetector = false;
8
9void g4libs()
3f2bac14 10{
11 // g4libs_global();
12 g4libs_granular();
13}
14
15void g4libs_global()
0f507a31 16{
17// Loads G4 global libraries,
18// external packages: CLHEP, graphics drivers, .. used by G4
19// and Alice G4 libraries: AliGeant4, TGeant4
20// ---
21 if (!isGeant4) {
22
23 // CLHEP
24 gSystem->Load("$(CLHEP_BASE_DIR)/lib/libCLHEP");
25
26 // Geant4
27 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4global");
28 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4graphics_reps");
29 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4intercoms");
30 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4materials");
31 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4geometry");
32 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4particles");
33 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4track");
34 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4processes");
35 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4tracking");
36 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4digits+hits");
37 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4event");
38 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4readout");
39 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4run");
40 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG3toG4");
41
42 // Geant4 interfaces
43 //gSystem->Load("/usr/X11R6/lib/libXt");
44 //gSystem->Load("/usr/local/lib/libXm");
45 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4UIcommon");
46 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4UIbasic");
47 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4UIGAG");
48
49 // Geant4 visualization
50 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4vis_management");
51 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4modeling");
52 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4FR");
53 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4OpenGL");
54 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4VRML");
55
56 // TGeant4, AliGeant4
57 gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libTGeant4");
58 gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libAliGeant4");
59
60 isGeant4 = true;
61 cout << "Geant4 global libraries have been loaded." << endl;
62 }
63}
64
65void g4libs_granular()
66{
67// Loads G4 granular libraries,
68// external packages: CLHEP, graphics drivers, .. used by G4
69// and Alice G4 libraries: AliGeant4, TGeant4
70// ---
71 if (!isGeant4) {
72
73 // CLHEP
74 gSystem->Load("$(CLHEP_BASE_DIR)/lib/libCLHEP");
75
76 // G4 categories
77
78 // global
79 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4globman");
80 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4hepnumerics");
81
82 // graphics_reps
83 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4graphics_reps");
84
85 // intercoms
86 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4intercoms");
87
88 // materials
89 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4materials");
90
91 // geometry
92 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4magneticfield");
93 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4volumes");
94 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4geometrymng");
95 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4geomBoolean");
96 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4csg");
97 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4step");
e687d511 98 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4brep");
99 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4specsolids");
0f507a31 100 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4stepinterface");
101
102 // particles
103 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4partman");
104 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4bosons");
105 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4baryons");
106 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4ions");
107 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4mesons");
108 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4leptons");
109 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4shortlived");
110
111 // track
112 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4track");
113
114 // processes
115 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4procman");
116 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4parameterisation");
117 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4decay");
118 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4emutils");
119 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4emstandard");
120 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4emlowenergy");
121 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4muons");
122 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4xrays");
123 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4hadronic_xsect");
124 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4hadronic_mgt");
125 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4hadronic_proc");
0f507a31 126 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4hadronic_util");
127 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4hadronic_man_gen");
e687d511 128 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4hadronic_util_gen");
0f507a31 129 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4hadronic_string_common");
130 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4hadronic_diffstring");
131 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4hadronic_stringfrag");
132 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4hadronic_HE_gen");
133 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4hadronic_kinetic");
134 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4hadronic_preequ");
135 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4hadronic_qgstring");
0f507a31 136 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4hadronic_HE");
137 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4hadronic_LE");
e687d511 138 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4hadronic_deex");
139 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4hadronic_stop");
0f507a31 140 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4hadronic_neu");
e687d511 141 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4hadronic_iso");
0f507a31 142 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4optical");
143 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4photolepton_hadron");
144 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4transportation");
145
146 // tracking
147 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4tracking");
148
149 // digits+hits
150 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4hits");
151 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4digits");
152 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4detector");
153
154 // event
155 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4event");
156
157 // readout
158 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4readout");
159
160 // run
161 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4run");
162
163 // g3tog4
164 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG3toG4");
165
166 // interfaces
167 //gSystem->Load("/usr/X11R6/lib/libXt");
168 //gSystem->Load("/usr/local/lib/libXm");
169 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4UIcommon");
170 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4UIbasic");
171 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4UIGAG");
172
173 // visualisation
0f507a31 174 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4modeling");
e687d511 175 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4vis_management");
0f507a31 176 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4FR");
177 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4OpenGL");
178 gSystem->Load("$(G4INSTALL)/lib/$(G4SYSTEM)/libG4VRML");
179
180 // TGeant4, AliGeant4
181 gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libTGeant4");
182 gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libAliGeant4");
183
184 isGeant4 = true;
185 cout << "Geant4 granular libraries have been loaded." << endl;
186 }
187}
188
189void steerlibs() {
190// Loads AliRoot steer libraries
191// ---
192 if (!isSteer) {
193
194 gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libSTEER");
3ba49ff6 195 gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libdummypythia6");
196 gSystem->Load("$(ROOTSYS)/lib/libEGPythia6");
0f507a31 197 gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libEVGEN");
198
199 isSteer = true;
200 cout << "AliRoot steer libraries have been loaded." << endl;
201 }
202}
203
204void detlibs() {
205// Load AliRoot modules libraries
206// ---
207 if (!isDetector) {
208
209 gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libminicern");
210 // minicern required by MUON
211 gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libSTRUCT");
212 gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libFMD");
213 gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libMUON");
214 gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libPHOS");
215 gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libPMD");
216 gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libRICH");
217 gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libTOF");
218 gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libTPC");
219 gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libTRD");
bca51bd5 220 gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libZDC");
434eb071 221 #gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libITS");
0f507a31 222 gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libCASTOR");
223 gSystem->Load("$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)/libSTART");
224
225 isDetector = true;
226 cout << "AliRoot detectors libraries have been loaded." << endl;
227 }
228}