]>
Commit | Line | Data |
---|---|---|
dde0a601 | 1 | // $Id: g4ConfigCommon.C 30849 2009-02-01 11:42:22Z fca $ |
2 | // | |
3 | // AliRoot Configuration for running aliroot with Monte Carlo. | |
4 | // ConfigCommon1() includes the common setting for all MCs | |
5 | // which has to be called before MC is instantiated. | |
6 | // Called from g4Config.C | |
7 | // | |
8 | // By I. Hrivnacova, IPN Orsay | |
9 | ||
10 | // Options | |
11 | static AliMagF::BMap_t smag = AliMagF::k5kG; | |
12 | static TString comment; | |
13 | ||
14 | // Functions | |
15 | void LoadPythia(); | |
16 | ||
17 | void ConfigCommon1(Bool_t setRootGeometry = kTRUE) | |
18 | { | |
19 | cout << "Running ConfigCommon1.C ... " << endl; | |
20 | ||
21 | //======================================================================= | |
22 | // Load Pythia libraries | |
23 | //======================================================================= | |
24 | ||
25 | LoadPythia(); | |
26 | ||
27 | //======================================================================= | |
28 | // ALICE steering object (AliRunLoader) | |
29 | //======================================================================= | |
30 | ||
31 | // Set Root geometry file | |
32 | if ( setRootGeometry ) { | |
33 | gAlice->SetRootGeometry(); | |
34 | gAlice->SetGeometryFromFile("geometry.root"); | |
35 | } | |
36 | ||
37 | AliRunLoader* rl | |
38 | = AliRunLoader::Open("galice.root", | |
39 | AliConfig::GetDefaultEventFolderName(), | |
40 | "recreate"); | |
41 | if ( ! rl ) { | |
42 | gAlice->Fatal("Config.C","Can not instatiate the Run Loader"); | |
43 | return; | |
44 | } | |
45 | rl->SetCompressionLevel(2); | |
46 | rl->SetNumberOfEventsPerFile(3); | |
47 | gAlice->SetRunLoader(rl); | |
48 | ||
49 | //======================================================================= | |
50 | // Trigger configuration | |
51 | //======================================================================= | |
52 | ||
28da60d3 | 53 | AliSimulation::Instance()->SetTriggerConfig("Pb-Pb"); |
dde0a601 | 54 | cout<<"Trigger configuration is set to Pb-Pb"<<endl; |
55 | ||
56 | // ============================= | |
57 | // Magnetic field | |
58 | // ============================= | |
59 | ||
60 | // Field (L3 0.4 T) | |
61 | if (smag == AliMagF::k2kG) { | |
62 | comment = comment.Append(" | L3 field 0.2 T"); | |
63 | } | |
64 | else if (smag == AliMagF::k5kG) { | |
65 | comment = comment.Append(" | L3 field 0.5 T"); | |
66 | } | |
67 | // OK | |
4642ac4b | 68 | AliMagF* field = new AliMagF("Maps","Maps", -1., -1., smag); |
dde0a601 | 69 | TGeoGlobalMagField::Instance()->SetField(field); |
70 | ||
71 | printf("\n \n Comment: %s \n \n", comment.Data()); | |
72 | ||
73 | // ============================= | |
74 | // Modules | |
75 | // ============================= | |
76 | ||
77 | rl->CdGAFile(); | |
78 | ||
79 | Int_t iABSO = 1; | |
80 | Int_t iDIPO = 1; | |
81 | Int_t iFMD = 1; | |
82 | Int_t iFRAME = 1; | |
83 | Int_t iHALL = 1; | |
84 | Int_t iITS = 1; | |
85 | Int_t iMAG = 1; | |
86 | Int_t iMUON = 1; | |
87 | Int_t iPHOS = 1; | |
88 | Int_t iPIPE = 1; | |
89 | Int_t iPMD = 1; | |
90 | Int_t iHMPID = 1; | |
91 | Int_t iSHIL = 1; | |
92 | Int_t iT0 = 1; | |
93 | Int_t iTOF = 1; | |
94 | Int_t iTPC = 1; | |
95 | Int_t iTRD = 1; | |
96 | Int_t iZDC = 1; | |
97 | Int_t iEMCAL = 1; | |
98 | Int_t iACORDE = 0; | |
99 | Int_t iVZERO = 1; | |
100 | /* | |
101 | Int_t iABSO = 0; | |
102 | Int_t iDIPO = 0; | |
103 | Int_t iFMD = 0; | |
104 | Int_t iFRAME = 0; | |
105 | Int_t iHALL = 0; | |
106 | Int_t iITS = 0; | |
107 | Int_t iMAG = 0; | |
108 | Int_t iMUON = 0; | |
109 | Int_t iPHOS = 0; | |
110 | Int_t iPIPE = 0; | |
111 | Int_t iPMD = 0; | |
112 | Int_t iHMPID = 0; | |
113 | Int_t iSHIL = 0; | |
114 | Int_t iT0 = 0; | |
115 | Int_t iTOF = 0; | |
116 | Int_t iTPC = 1; | |
117 | Int_t iTRD = 0; | |
118 | Int_t iZDC = 0; | |
119 | Int_t iEMCAL = 0; | |
120 | Int_t iACORDE = 0; | |
121 | Int_t iVZERO = 0; | |
122 | */ | |
123 | rl->CdGAFile(); | |
124 | //=================== Alice BODY parameters ============================= | |
125 | AliBODY *BODY = new AliBODY("BODY", "Alice envelop"); | |
126 | ||
127 | if (iMAG) | |
128 | { | |
129 | //=================== MAG parameters ============================ | |
130 | // --- Start with Magnet since detector layouts may be depending --- | |
131 | // --- on the selected Magnet dimensions --- | |
132 | AliMAG *MAG = new AliMAG("MAG", "Magnet"); | |
133 | } | |
134 | ||
135 | ||
136 | if (iABSO) | |
137 | { | |
138 | //=================== ABSO parameters ============================ | |
139 | AliABSO *ABSO = new AliABSOv3("ABSO", "Muon Absorber"); | |
140 | } | |
141 | ||
142 | if (iDIPO) | |
143 | { | |
144 | //=================== DIPO parameters ============================ | |
145 | ||
146 | AliDIPO *DIPO = new AliDIPOv3("DIPO", "Dipole version 3"); | |
147 | } | |
148 | ||
149 | if (iHALL) | |
150 | { | |
151 | //=================== HALL parameters ============================ | |
152 | ||
153 | AliHALL *HALL = new AliHALLv3("HALL", "Alice Hall"); | |
154 | } | |
155 | ||
156 | ||
157 | if (iFRAME) | |
158 | { | |
159 | //=================== FRAME parameters ============================ | |
160 | ||
161 | AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame"); | |
162 | FRAME->SetHoles(1); | |
163 | } | |
164 | ||
165 | if (iSHIL) | |
166 | { | |
167 | //=================== SHIL parameters ============================ | |
168 | ||
169 | AliSHIL *SHIL = new AliSHILv3("SHIL", "Shielding Version 3"); | |
170 | } | |
171 | ||
172 | ||
173 | if (iPIPE) | |
174 | { | |
175 | //=================== PIPE parameters ============================ | |
176 | ||
177 | AliPIPE *PIPE = new AliPIPEv3("PIPE", "Beam Pipe"); | |
178 | } | |
179 | ||
180 | if (iITS) | |
181 | { | |
182 | //=================== ITS parameters ============================ | |
183 | ||
3a5fcc75 | 184 | AliITS *ITS = new AliITSv11("ITS","ITS v11"); |
dde0a601 | 185 | } |
186 | ||
187 | if (iTPC) | |
188 | { | |
189 | //============================ TPC parameters =================== | |
190 | AliTPC *TPC = new AliTPCv2("TPC", "Default"); | |
191 | } | |
192 | ||
193 | ||
194 | if (iTOF) { | |
195 | //=================== TOF parameters ============================ | |
196 | AliTOF *TOF = new AliTOFv6T0("TOF", "normal TOF"); | |
197 | } | |
198 | ||
199 | ||
200 | if (iHMPID) | |
201 | { | |
202 | //=================== HMPID parameters =========================== | |
203 | AliHMPID *HMPID = new AliHMPIDv3("HMPID", "normal HMPID"); | |
204 | ||
205 | } | |
206 | ||
207 | ||
208 | if (iZDC) | |
209 | { | |
210 | //=================== ZDC parameters ============================ | |
211 | ||
212 | AliZDC *ZDC = new AliZDCv3("ZDC", "normal ZDC"); | |
213 | } | |
214 | ||
215 | if (iTRD) | |
216 | { | |
217 | //=================== TRD parameters ============================ | |
218 | ||
219 | AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator"); | |
220 | } | |
221 | ||
222 | if (iFMD) | |
223 | { | |
224 | //=================== FMD parameters ============================ | |
225 | AliFMD *FMD = new AliFMDv1("FMD", "normal FMD"); | |
226 | } | |
227 | ||
228 | if (iMUON) | |
229 | { | |
230 | //=================== MUON parameters =========================== | |
231 | // New MUONv1 version (geometry defined via builders) | |
232 | AliMUON *MUON = new AliMUONv1("MUON", "default"); | |
233 | } | |
234 | //=================== PHOS parameters =========================== | |
235 | ||
236 | if (iPHOS) | |
237 | { | |
238 | AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP"); | |
239 | } | |
240 | ||
241 | ||
242 | if (iPMD) | |
243 | { | |
244 | //=================== PMD parameters ============================ | |
245 | AliPMD *PMD = new AliPMDv1("PMD", "normal PMD"); | |
246 | } | |
247 | ||
248 | if (iT0) | |
249 | { | |
250 | //=================== T0 parameters ============================ | |
251 | AliT0 *T0 = new AliT0v1("T0", "T0 Detector"); | |
252 | } | |
253 | ||
254 | if (iEMCAL) | |
255 | { | |
256 | //=================== EMCAL parameters ============================ | |
257 | AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "EMCAL_COMPLETE"); | |
258 | } | |
259 | ||
260 | if (iACORDE) | |
261 | { | |
262 | //=================== ACORDE parameters ============================ | |
263 | AliACORDE *ACORDE = new AliACORDEv1("ACORDE", "normal ACORDE"); | |
264 | } | |
265 | ||
266 | if (iVZERO) | |
267 | { | |
268 | //=================== ACORDE parameters ============================ | |
269 | AliVZERO *VZERO = new AliVZEROv7("VZERO", "normal VZERO"); | |
270 | } | |
271 | ||
272 | AliLog::Message(AliLog::kInfo, "End of Config", "Config.C", "Config.C", "Config()"," Config.C", __LINE__); | |
273 | ||
274 | cout << "Running ConfigCommon1.C finished ... " << endl; | |
275 | } | |
276 | ||
277 | void LoadPythia() | |
278 | { | |
279 | // Load Pythia related libraries | |
280 | gSystem->Load("liblhapdf.so"); // Parton density functions | |
281 | gSystem->Load("libEGPythia6.so"); // TGenerator interface | |
282 | gSystem->Load("libpythia6.so"); // Pythia | |
283 | gSystem->Load("libAliPythia6.so"); // ALICE specific implementations | |
284 | } |