]>
Commit | Line | Data |
---|---|---|
1 | static Int_t eventsPerRun = 100; | |
2 | enum PprGeo_t | |
3 | { | |
4 | kHoles, kNoHoles | |
5 | }; | |
6 | static PprGeo_t geo = kHoles; | |
7 | ||
8 | void Config() | |
9 | { | |
10 | // 7-DEC-2000 09:00 | |
11 | // Switch on Transition Radiation simulation. 6/12/00 18:00 | |
12 | // iZDC=1 7/12/00 09:00 | |
13 | // ThetaRange is (0., 180.). It was (0.28,179.72) 7/12/00 09:00 | |
14 | // Theta range given through pseudorapidity limits 22/6/2001 | |
15 | ||
16 | // Set Random Number seed | |
17 | gRandom->SetSeed(123456); | |
18 | ||
19 | ||
20 | // libraries required by geant321 | |
21 | gSystem->Load("libgeant321"); | |
22 | ||
23 | new TGeant3("C++ Interface to Geant3"); | |
24 | ||
25 | if (!gSystem->Getenv("CONFIG_FILE")) | |
26 | { | |
27 | TFile *rootfile = new TFile("galice.root", "recreate"); | |
28 | ||
29 | rootfile->SetCompressionLevel(2); | |
30 | } | |
31 | ||
32 | TGeant3 *geant3 = (TGeant3 *) gMC; | |
33 | AliIonPDGCodes *PDGcodes = new AliIonPDGCodes(); | |
34 | PDGcodes->AddParticlesToPdgDataBase(); | |
35 | geant3->DefineIons(); | |
36 | ||
37 | // | |
38 | // Set External decayer | |
39 | TVirtualMCDecayer *decayer = new AliDecayerPythia(); | |
40 | ||
41 | decayer->SetForceDecay(kAll); | |
42 | decayer->Init(); | |
43 | gMC->SetExternalDecayer(decayer); | |
44 | // | |
45 | // | |
46 | //======================================================================= | |
47 | // ******* GEANT STEERING parameters FOR ALICE SIMULATION ******* | |
48 | geant3->SetTRIG(1); //Number of events to be processed | |
49 | geant3->SetSWIT(4, 10); | |
50 | geant3->SetDEBU(0, 0, 1); | |
51 | //geant3->SetSWIT(2,2); | |
52 | geant3->SetDCAY(1); | |
53 | geant3->SetPAIR(1); | |
54 | geant3->SetCOMP(1); | |
55 | geant3->SetPHOT(1); | |
56 | geant3->SetPFIS(0); | |
57 | geant3->SetDRAY(0); | |
58 | geant3->SetANNI(1); | |
59 | geant3->SetBREM(1); | |
60 | geant3->SetMUNU(1); | |
61 | geant3->SetCKOV(1); | |
62 | geant3->SetHADR(0); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3) | |
63 | geant3->SetLOSS(2); | |
64 | geant3->SetMULS(1); | |
65 | geant3->SetRAYL(1); | |
66 | geant3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0) | |
67 | geant3->SetABAN(0); //Restore 3.16 behaviour for abandoned tracks | |
68 | geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2) | |
69 | geant3->SetERAN(5.e-7); | |
70 | ||
71 | Float_t cut = 1.e-3; // 1MeV cut by default | |
72 | Float_t tofmax = 1.e10; | |
73 | ||
74 | // GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX | |
75 | geant3->SetCUTS(cut, cut, cut, cut, cut, cut, cut, cut, cut, cut, | |
76 | tofmax); | |
77 | // | |
78 | //======================================================================= | |
79 | // ************* STEERING parameters FOR ALICE SIMULATION ************** | |
80 | // --- Specify event type to be tracked through the ALICE setup | |
81 | // --- All positions are in cm, angles in degrees, and P and E in GeV | |
82 | // #### AliGenDPMjet generation ###################################### | |
83 | AliGenDPMjet *gener = new AliGenDPMjet(1); | |
84 | gener->SetBeamEnergy(2700.); | |
85 | gener->SetEnergyCMS(5400.); | |
86 | gener->SetProjectile(208,82); | |
87 | gener->SetTarget(208,82); | |
88 | gener->SetImpactParameterRange(12.,16.); | |
89 | gener->SetTrackingFlag(1); | |
90 | gener->Init(); | |
91 | // | |
92 | // Activate this line if you want the vertex smearing to happen | |
93 | // track by track | |
94 | // | |
95 | //gener->SetVertexSmear(perTrack); | |
96 | // Field (L3 0.4 T) | |
97 | AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., 1); | |
98 | rootfile->cd(); | |
99 | gAlice->SetField(field); | |
100 | ||
101 | ||
102 | Int_t iABSO = 1; | |
103 | Int_t iDIPO = 1; | |
104 | Int_t iFMD = 0; | |
105 | Int_t iFRAME = 0; | |
106 | Int_t iHALL = 0; | |
107 | Int_t iITS = 0; | |
108 | Int_t iMAG = 0; | |
109 | Int_t iMUON = 0; | |
110 | Int_t iPHOS = 0; | |
111 | Int_t iPIPE = 1; | |
112 | Int_t iPMD = 0; | |
113 | Int_t iRICH = 0; | |
114 | Int_t iSHIL = 1; | |
115 | Int_t iSTART = 0; | |
116 | Int_t iTOF = 0; | |
117 | Int_t iTPC = 0; | |
118 | Int_t iTRD = 0; | |
119 | Int_t iZDC = 1; | |
120 | Int_t iEMCAL = 0; | |
121 | Int_t iCRT = 0; | |
122 | Int_t iVZERO = 0; | |
123 | ||
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 AliABSOv0("ABSO", "Muon Absorber"); | |
140 | } | |
141 | ||
142 | if (iDIPO) | |
143 | { | |
144 | //=================== DIPO parameters ============================ | |
145 | ||
146 | AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2"); | |
147 | } | |
148 | ||
149 | if (iHALL) | |
150 | { | |
151 | //=================== HALL parameters ============================ | |
152 | ||
153 | AliHALL *HALL = new AliHALL("HALL", "Alice Hall"); | |
154 | } | |
155 | ||
156 | ||
157 | if (iFRAME) | |
158 | { | |
159 | //=================== FRAME parameters ============================ | |
160 | ||
161 | AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame"); | |
162 | if (geo == kHoles) { | |
163 | FRAME->SetHoles(1); | |
164 | } else { | |
165 | FRAME->SetHoles(0); | |
166 | } | |
167 | } | |
168 | ||
169 | if (iSHIL) | |
170 | { | |
171 | //=================== SHIL parameters ============================ | |
172 | ||
173 | AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding Version 2"); | |
174 | } | |
175 | ||
176 | ||
177 | if (iPIPE) | |
178 | { | |
179 | //=================== PIPE parameters ============================ | |
180 | ||
181 | AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe"); | |
182 | } | |
183 | ||
184 | if(iITS) { | |
185 | ||
186 | //=================== ITS parameters ============================ | |
187 | // | |
188 | // As the innermost detector in ALICE, the Inner Tracking System "impacts" on | |
189 | // almost all other detectors. This involves the fact that the ITS geometry | |
190 | // still has several options to be followed in parallel in order to determine | |
191 | // the best set-up which minimizes the induced background. All the geometries | |
192 | // available to date are described in the following. Read carefully the comments | |
193 | // and use the default version (the only one uncommented) unless you are making | |
194 | // comparisons and you know what you are doing. In this case just uncomment the | |
195 | // ITS geometry you want to use and run Aliroot. | |
196 | // | |
197 | // Detailed geometries: | |
198 | // | |
199 | // | |
200 | //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services"); | |
201 | // | |
202 | //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services"); | |
203 | // | |
204 | AliITSvPPRasymm *ITS = new AliITSvPPRasymm("ITS","New ITS PPR detailed version with asymmetric services"); | |
205 | ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer | |
206 | ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer | |
207 | // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer | |
208 | ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300] | |
209 | ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300] | |
210 | ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300] | |
211 | ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300] | |
212 | ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out | |
213 | ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon | |
214 | // | |
215 | //AliITSvPPRsymm *ITS = new AliITSvPPRsymm("ITS","New ITS PPR detailed version with symmetric services"); | |
216 | //ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer | |
217 | //ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer | |
218 | //ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRsymm2.det"); // don't touch this parameter if you're not an ITS developer | |
219 | //ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300] | |
220 | //ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300] | |
221 | //ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300] | |
222 | //ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300] | |
223 | //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out | |
224 | //ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon | |
225 | // | |
226 | // | |
227 | // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful | |
228 | // for reconstruction !): | |
229 | // | |
230 | // | |
231 | //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services"); | |
232 | //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out | |
233 | //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon | |
234 | // | |
235 | //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services"); | |
236 | //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out | |
237 | //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon | |
238 | // | |
239 | // | |
240 | // | |
241 | // Geant3 <-> EUCLID conversion | |
242 | // ============================ | |
243 | // | |
244 | // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and | |
245 | // media to two ASCII files (called by default ITSgeometry.euc and | |
246 | // ITSgeometry.tme) in a format understandable to the CAD system EUCLID. | |
247 | // The default (=0) means that you dont want to use this facility. | |
248 | // | |
249 | ITS->SetEUCLID(0); | |
250 | } | |
251 | ||
252 | if (iTPC) | |
253 | { | |
254 | //============================ TPC parameters ================================ | |
255 | // --- This allows the user to specify sectors for the SLOW (TPC geometry 2) | |
256 | // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper) | |
257 | // --- sectors are specified, any value other than that requires at least one | |
258 | // --- sector (lower or upper)to be specified! | |
259 | // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0) | |
260 | // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0) | |
261 | // --- SecLows - number of lower sectors specified (up to 6) | |
262 | // --- SecUps - number of upper sectors specified (up to 12) | |
263 | // --- Sens - sensitive strips for the Slow Simulator !!! | |
264 | // --- This does NOT work if all S or L-sectors are specified, i.e. | |
265 | // --- if SecAL or SecAU < 0 | |
266 | // | |
267 | // | |
268 | //----------------------------------------------------------------------------- | |
269 | ||
270 | // gROOT->LoadMacro("SetTPCParam.C"); | |
271 | // AliTPCParam *param = SetTPCParam(); | |
272 | AliTPC *TPC = new AliTPCv2("TPC", "Default"); | |
273 | ||
274 | // All sectors included | |
275 | TPC->SetSecAL(-1); | |
276 | TPC->SetSecAU(-1); | |
277 | ||
278 | } | |
279 | ||
280 | ||
281 | if (iTOF) { | |
282 | if (geo == kHoles) { | |
283 | //=================== TOF parameters ============================ | |
284 | AliTOF *TOF = new AliTOFv2FHoles("TOF", "TOF with Holes"); | |
285 | } else { | |
286 | AliTOF *TOF = new AliTOFv4T0("TOF", "normal TOF"); | |
287 | } | |
288 | } | |
289 | ||
290 | ||
291 | if (iRICH) | |
292 | { | |
293 | //=================== RICH parameters =========================== | |
294 | AliRICH *RICH = new AliRICHv3("RICH", "normal RICH"); | |
295 | ||
296 | } | |
297 | ||
298 | ||
299 | if (iZDC) | |
300 | { | |
301 | //=================== ZDC parameters ============================ | |
302 | ||
303 | AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC"); | |
304 | ZDC->NoShower(); | |
305 | } | |
306 | ||
307 | if (iTRD) | |
308 | { | |
309 | //=================== TRD parameters ============================ | |
310 | ||
311 | AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator"); | |
312 | ||
313 | // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2) | |
314 | TRD->SetGasMix(1); | |
315 | if (geo == kHoles) { | |
316 | // With hole in front of PHOS | |
317 | TRD->SetPHOShole(); | |
318 | // With hole in front of RICH | |
319 | TRD->SetRICHhole(); | |
320 | } | |
321 | // Switch on TR | |
322 | AliTRDsim *TRDsim = TRD->CreateTR(); | |
323 | } | |
324 | ||
325 | if (iFMD) | |
326 | { | |
327 | //=================== FMD parameters ============================ | |
328 | AliFMD *FMD = new AliFMDv1("FMD", "normal FMD"); | |
329 | FMD->SetRingsSi1(256); | |
330 | FMD->SetRingsSi2(128); | |
331 | FMD->SetSectorsSi1(20); | |
332 | FMD->SetSectorsSi2(40); | |
333 | } | |
334 | ||
335 | if (iMUON) | |
336 | { | |
337 | //=================== MUON parameters =========================== | |
338 | ||
339 | AliMUON *MUON = new AliMUONv1("MUON", "default"); | |
340 | } | |
341 | //=================== PHOS parameters =========================== | |
342 | ||
343 | if (iPHOS) | |
344 | { | |
345 | AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP"); | |
346 | } | |
347 | ||
348 | ||
349 | if (iPMD) | |
350 | { | |
351 | //=================== PMD parameters ============================ | |
352 | AliPMD *PMD = new AliPMDv1("PMD", "normal PMD"); | |
353 | } | |
354 | ||
355 | if (iSTART) | |
356 | { | |
357 | //=================== START parameters ============================ | |
358 | AliSTART *START = new AliSTARTv1("START", "START Detector"); | |
359 | } | |
360 | ||
361 | if (iEMCAL) | |
362 | { | |
363 | //=================== EMCAL parameters ============================ | |
364 | AliEMCAL *EMCAL = new AliEMCALv1("EMCAL", "G56_2_55_19_104_14"); | |
365 | } | |
366 | ||
367 | if (iCRT) | |
368 | { | |
369 | //=================== CRT parameters ============================ | |
370 | AliCRT *CRT = new AliCRTv0("CRT", "normal ACORDE"); | |
371 | } | |
372 | ||
373 | if (iVZERO) | |
374 | { | |
375 | //=================== CRT parameters ============================ | |
376 | AliVZERO *VZERO = new AliVZEROv2("VZERO", "normal VZERO"); | |
377 | } | |
378 | ||
379 | } | |
380 |