]>
Commit | Line | Data |
---|---|---|
66d04b38 | 1 | void Config() |
2 | { | |
3 | // 7-DEC-2000 09:00 | |
4 | // Switch on Transition Radiation simulation. 6/12/00 18:00 | |
5 | // iZDC=1 7/12/00 09:00 | |
6 | // ThetaRange is (0., 180.). It was (0.28,179.72) 7/12/00 09:00 | |
7 | ||
8 | // Set Random Number seed | |
9 | // gRandom->SetSeed(12345); | |
10 | ||
11 | new AliGeant3("C++ Interface to Geant3"); | |
12 | ||
13 | if (!gSystem->Getenv("CONFIG_FILE")) | |
14 | { | |
15 | TFile *rootfile = new TFile("galice.root", "recreate"); | |
16 | ||
17 | rootfile->SetCompressionLevel(2); | |
18 | } | |
19 | ||
20 | TGeant3 *geant3 = (TGeant3 *) gMC; | |
21 | ||
22 | // | |
23 | // Set External decayer | |
24 | AliDecayer *decayer = new AliDecayerPythia(); | |
25 | ||
26 | decayer->SetForceDecay(kAll); | |
27 | decayer->Init(); | |
28 | gMC->SetExternalDecayer(decayer); | |
29 | // | |
30 | // | |
31 | //======================================================================= | |
32 | // ******* GEANT STEERING parameters FOR ALICE SIMULATION ******* | |
33 | geant3->SetTRIG(1); //Number of events to be processed | |
34 | geant3->SetSWIT(4, 10); | |
35 | geant3->SetDEBU(0, 0, 1); | |
36 | //geant3->SetSWIT(2,2); | |
37 | geant3->SetDCAY(1); | |
38 | geant3->SetPAIR(1); | |
39 | geant3->SetCOMP(1); | |
40 | geant3->SetPHOT(1); | |
41 | geant3->SetPFIS(0); | |
42 | geant3->SetDRAY(0); | |
43 | geant3->SetANNI(1); | |
44 | geant3->SetBREM(1); | |
45 | geant3->SetMUNU(1); | |
46 | geant3->SetCKOV(1); | |
47 | geant3->SetHADR(1); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3) | |
48 | geant3->SetLOSS(2); | |
49 | geant3->SetMULS(1); | |
50 | geant3->SetRAYL(1); | |
51 | geant3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0) | |
52 | geant3->SetABAN(0); //Restore 3.16 behaviour for abandoned tracks | |
53 | geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2) | |
54 | geant3->SetERAN(5.e-7); | |
55 | ||
56 | Float_t cut = 1.e-3; // 1MeV cut by default | |
57 | Float_t tofmax = 1.e10; | |
58 | ||
59 | // GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX | |
60 | geant3->SetCUTS(cut, cut, cut, cut, cut, cut, cut, cut, cut, cut, | |
61 | tofmax); | |
62 | // | |
63 | //======================================================================= | |
64 | // ************* STEERING parameters FOR ALICE SIMULATION ************** | |
65 | // --- Specify event type to be tracked through the ALICE setup | |
66 | // --- All positions are in cm, angles in degrees, and P and E in GeV | |
67 | if (gSystem->Getenv("CONFIG_NPARTICLES")) | |
68 | { | |
69 | int nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES")); | |
70 | } else | |
71 | { | |
72 | int nParticles = 10000; | |
73 | } | |
66d04b38 | 74 | |
75 | /*********************************************************************************/ | |
76 | /*********************************************************************************/ | |
77 | /***************** G E N E R A T O R S *********************************/ | |
78 | ||
79 | /** C O C K T A I L W I T H A F T E R B U R N E R S A F T E R W A R D S **/ | |
80 | /***************** (WRAPPER GENERATOR) *********************************/ | |
81 | ||
82 | ||
83 | ||
99f4b63d | 84 | AliGenCocktailAfterBurner* gener = new AliGenCocktailAfterBurner(); |
66d04b38 | 85 | gener->SetPhiRange(0, 360); |
99f4b63d | 86 | gener->SetThetaRange(40., 140.); |
66d04b38 | 87 | gener->SetOrigin(0, 0, 0); //vertex position |
88 | gener->SetSigma(0, 0, 0); //Sigma in (X,Y,Z) (cm) on IP position | |
89 | ||
90 | /***************** HIJING PARAMETRIZATION ********************************/ | |
91 | ||
99f4b63d | 92 | //AliGenHIJINGpara *g2 = new AliGenHIJINGpara(5); |
93 | //g2->SetMomentumRange(0, 999); | |
66d04b38 | 94 | |
95 | /***************** G E N B O X ***********************************/ | |
96 | ||
99f4b63d | 97 | // AliGenBox *g1 = new AliGenBox(5); |
98 | // g1->SetMomentumRange(0, 3); | |
66d04b38 | 99 | // g1->SetOrigin(0,0,0); //vertex position |
100 | // g1->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position | |
101 | // g1->SetPart(310); //K0short(310), Lambda(3122) | |
102 | ||
103 | ||
104 | /***************** M E V S I M ********************************/ | |
66d04b38 | 105 | |
106 | AliMevSimConfig *c = new AliMevSimConfig(1); | |
107 | c->SetRectPlane(1); // reaction plane control, model 4 | |
99f4b63d | 108 | c->SetGrid(80,80); |
109 | ||
66d04b38 | 110 | AliGenMevSim *g3 = new AliGenMevSim(c); |
99f4b63d | 111 | g3->SetPtRange(0.001, 3); |
112 | g3->SetMomentumRange(0.1, 3); | |
113 | ||
66d04b38 | 114 | g3->SetTrackingFlag(1); |
115 | g3->SetOrigin(0.0, 0.0, 0.0); | |
116 | g3->SetSigma(0.0, 0.0, 0.0); | |
99f4b63d | 117 | //g3->SetEtaCutRange(-4,4); |
66d04b38 | 118 | |
99f4b63d | 119 | AliMevSimParticle *piPlus = new AliMevSimParticle(kPiPlus, 3000, 3, 0.2, 0.01, 3, 0.1, 0.0, 0.0); |
120 | AliMevSimParticle *piMinus = new AliMevSimParticle(kPiMinus, 3000, 3, 0.2, 0.01, 3, 0.1, 0.0, 0.0); | |
66d04b38 | 121 | //AliMevSimParticle *KPlus = new AliMevSimParticle(kKPlus, 10, 0, 0.25, 0.0, 2, 0.15, 0.0, 0.0 ); |
122 | //AliMevSimParticle *KMinus = new AliMevSimParticle(kKMinus, 10, 0, 0.25, 0.0, 2, 0.15, 0.0, 0.0 ); | |
123 | //AliMevSimParticle *protonPlus = new AliMevSimParticle(kProton, 3, 0, 0.4, 0.0, 2, 0.15, 0.0, 0.0); | |
124 | //AliMevSimParticle *protonMinus = new AliMevSimParticle(kProtonBar, 2, 0, 0.4, 0.0, 2, 0.15, 0.0, 0.0); | |
125 | ||
66d04b38 | 126 | g3->AddParticleType(piPlus); |
127 | g3->AddParticleType(piMinus); | |
128 | //g3->AddParticleType(KPlus); | |
129 | //g3->AddParticleType(KMinus); | |
130 | //g3->AddParticleType(protonPlus); | |
131 | //g3->AddParticleType(protonMinus); | |
132 | ||
99f4b63d | 133 | |
66d04b38 | 134 | /***************** H B T P R O C E S S O R ********************************/ |
135 | ||
136 | AliGenHBTprocessor *hbtp = new AliGenHBTprocessor(); | |
137 | hbtp->SetRefControl(2); | |
138 | hbtp->SetSwitch1D(1); | |
139 | hbtp->SetSwitch3D(1); | |
140 | hbtp->SetSwitchCoulomb(0); | |
141 | hbtp->SetSwitchCoherence(0); | |
142 | hbtp->SetSwitchFermiBose(1); | |
99f4b63d | 143 | hbtp->SetDeltap(0.1); |
66d04b38 | 144 | hbtp->SetDelChi(0.1); |
99f4b63d | 145 | hbtp->SetLambda(0.5); |
146 | hbtp->SetQ0(8.0); | |
147 | hbtp->SetR0(8.0); | |
148 | hbtp->SetRParallel(8.0); | |
149 | hbtp->SetR1d(8.0); | |
150 | hbtp->SetRSide(8.0); | |
151 | hbtp->SetRLong(8.0); | |
152 | hbtp->SetROut(8.0); | |
66d04b38 | 153 | hbtp->SetPtRange(0.1,0.98); |
154 | hbtp->SetPIDs(211,-211); //pi+ pi- | |
155 | hbtp->SetSwitchType(3); // fit both the like and unlike pair correl | |
156 | ||
157 | /***********************************************************************************/ | |
158 | ||
99f4b63d | 159 | // gener->AddGenerator(g2,"HIJING PARAMETRIZATION",1); |
66d04b38 | 160 | // gener->AddGenerator(g1,"BOX (K0short)",1); |
161 | gener->AddGenerator(g3,"MEVSIM",1); | |
162 | ||
163 | gener->AddAfterBurner(hbtp,"HBT PROCESSOR",1); | |
164 | ||
165 | gener->Init(); | |
166 | // | |
167 | // Activate this line if you want the vertex smearing to happen | |
168 | // track by track | |
169 | // | |
170 | //gener->SetVertexSmear(perTrack); | |
171 | ||
172 | gAlice->SetField(-999, 2); //Specify maximum magnetic field in Tesla (neg. ==> default field) | |
99f4b63d | 173 | // gAlice->SetField(-999, 2, 2.); //Specify maximum magnetic field in Tesla (neg. ==> default field) |
174 | //Last number indicates the scale factor | |
66d04b38 | 175 | |
176 | Int_t iABSO = 1; | |
177 | Int_t iCASTOR = 0; | |
178 | Int_t iDIPO = 1; | |
179 | Int_t iFMD = 0; | |
180 | Int_t iFRAME = 1; | |
181 | Int_t iHALL = 1; | |
182 | Int_t iITS = 1; | |
183 | Int_t iMAG = 1; | |
184 | Int_t iMUON = 0; | |
185 | Int_t iPHOS = 0; | |
186 | Int_t iPIPE = 1; | |
187 | Int_t iPMD = 0; | |
188 | Int_t iRICH = 0; | |
189 | Int_t iSHIL = 1; | |
190 | Int_t iSTART = 0; | |
191 | Int_t iTOF = 0; | |
192 | Int_t iTPC = 1; | |
193 | Int_t iTRD = 0; | |
194 | Int_t iZDC = 0; | |
195 | ||
196 | //=================== Alice BODY parameters ============================= | |
197 | AliBODY *BODY = new AliBODY("BODY", "Alice envelop"); | |
198 | ||
199 | ||
200 | if (iMAG) | |
201 | { | |
202 | //=================== MAG parameters ============================ | |
203 | // --- Start with Magnet since detector layouts may be depending --- | |
204 | // --- on the selected Magnet dimensions --- | |
205 | AliMAG *MAG = new AliMAG("MAG", "Magnet"); | |
206 | } | |
207 | ||
208 | ||
209 | if (iABSO) | |
210 | { | |
211 | //=================== ABSO parameters ============================ | |
212 | AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber"); | |
213 | } | |
214 | ||
215 | if (iDIPO) | |
216 | { | |
217 | //=================== DIPO parameters ============================ | |
218 | ||
219 | AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2"); | |
220 | } | |
221 | ||
222 | if (iHALL) | |
223 | { | |
224 | //=================== HALL parameters ============================ | |
225 | ||
226 | AliHALL *HALL = new AliHALL("HALL", "Alice Hall"); | |
227 | } | |
228 | ||
229 | ||
230 | if (iFRAME) | |
231 | { | |
232 | //=================== FRAME parameters ============================ | |
233 | ||
234 | AliFRAME *FRAME = new AliFRAMEv2("FRAME", "Space Frame"); | |
235 | ||
236 | } | |
237 | ||
238 | if (iSHIL) | |
239 | { | |
240 | //=================== SHIL parameters ============================ | |
241 | ||
242 | AliSHIL *SHIL = new AliSHILv0("SHIL", "Shielding"); | |
243 | } | |
244 | ||
245 | ||
246 | if (iPIPE) | |
247 | { | |
248 | //=================== PIPE parameters ============================ | |
249 | ||
250 | AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe"); | |
251 | } | |
252 | ||
253 | if(iITS) { | |
254 | ||
255 | //=================== ITS parameters ============================ | |
256 | // | |
257 | // As the innermost detector in ALICE, the Inner Tracking System "impacts" on | |
258 | // almost all other detectors. This involves the fact that the ITS geometry | |
259 | // still has several options to be followed in parallel in order to determine | |
260 | // the best set-up which minimizes the induced background. All the geometries | |
261 | // available to date are described in the following. Read carefully the comments | |
262 | // and use the default version (the only one uncommented) unless you are making | |
263 | // comparisons and you know what you are doing. In this case just uncomment the | |
264 | // ITS geometry you want to use and run Aliroot. | |
265 | // | |
266 | // Detailed geometries: | |
267 | // | |
268 | // | |
269 | //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services"); | |
270 | // | |
271 | //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services"); | |
272 | // | |
273 | AliITSvPPRasymm *ITS = new AliITSvPPRasymm("ITS","New ITS PPR detailed version with asymmetric services"); | |
274 | ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer | |
275 | ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer | |
99f4b63d | 276 | // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer |
277 | ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300] | |
278 | ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300] | |
279 | ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300] | |
280 | ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300] | |
66d04b38 | 281 | ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out |
282 | ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon | |
283 | // | |
284 | //AliITSvPPRsymm *ITS = new AliITSvPPRsymm("ITS","New ITS PPR detailed version with symmetric services"); | |
285 | //ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer | |
286 | //ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer | |
287 | //ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRsymm2.det"); // don't touch this parameter if you're not an ITS developer | |
288 | //ITS->SetThicknessDet1(300.); // detector thickness on layer 1 must be in the range [100,300] | |
289 | //ITS->SetThicknessDet2(300.); // detector thickness on layer 2 must be in the range [100,300] | |
290 | //ITS->SetThicknessChip1(300.); // chip thickness on layer 1 must be in the range [150,300] | |
291 | //ITS->SetThicknessChip2(300.); // chip thickness on layer 2 must be in the range [150,300] | |
292 | //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out | |
293 | //ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon | |
294 | // | |
295 | // | |
296 | // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful | |
297 | // for reconstruction !): | |
298 | // | |
299 | // | |
300 | //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services"); | |
301 | //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out | |
302 | //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon | |
303 | // | |
304 | //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services"); | |
305 | //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out | |
306 | //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon | |
307 | // | |
308 | // | |
309 | // | |
310 | // Geant3 <-> EUCLID conversion | |
311 | // ============================ | |
312 | // | |
313 | // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and | |
314 | // media to two ASCII files (called by default ITSgeometry.euc and | |
315 | // ITSgeometry.tme) in a format understandable to the CAD system EUCLID. | |
316 | // The default (=0) means that you dont want to use this facility. | |
317 | // | |
318 | ITS->SetEUCLID(0); | |
319 | } | |
320 | ||
321 | ||
322 | if (iTPC) | |
323 | { | |
324 | //============================ TPC parameters ================================ | |
325 | // --- This allows the user to specify sectors for the SLOW (TPC geometry 2) | |
326 | // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper) | |
327 | // --- sectors are specified, any value other than that requires at least one | |
328 | // --- sector (lower or upper)to be specified! | |
329 | // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0) | |
330 | // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0) | |
331 | // --- SecLows - number of lower sectors specified (up to 6) | |
332 | // --- SecUps - number of upper sectors specified (up to 12) | |
333 | // --- Sens - sensitive strips for the Slow Simulator !!! | |
334 | // --- This does NOT work if all S or L-sectors are specified, i.e. | |
335 | // --- if SecAL or SecAU < 0 | |
336 | // | |
337 | // | |
338 | //----------------------------------------------------------------------------- | |
339 | ||
340 | // gROOT->LoadMacro("SetTPCParam.C"); | |
341 | // AliTPCParam *param = SetTPCParam(); | |
342 | AliTPC *TPC = new AliTPCv2("TPC", "Default"); | |
343 | ||
344 | // All sectors included | |
345 | TPC->SetSecAL(-1); | |
346 | TPC->SetSecAU(-1); | |
347 | ||
348 | } | |
349 | ||
350 | if (iTOF) | |
351 | { | |
352 | //=================== TOF parameters ============================ | |
353 | AliTOF *TOF = new AliTOFv2("TOF", "normal TOF"); | |
354 | } | |
355 | ||
356 | if (iRICH) | |
357 | { | |
358 | //=================== RICH parameters =========================== | |
359 | AliRICH *RICH = new AliRICHv1("RICH", "normal RICH"); | |
360 | ||
361 | } | |
362 | ||
363 | ||
364 | if (iZDC) | |
365 | { | |
366 | //=================== ZDC parameters ============================ | |
367 | ||
368 | AliZDC *ZDC = new AliZDCv1("ZDC", "normal ZDC"); | |
369 | } | |
370 | ||
371 | if (iCASTOR) | |
372 | { | |
373 | //=================== CASTOR parameters ============================ | |
374 | ||
375 | AliCASTOR *CASTOR = new AliCASTORv1("CASTOR", "normal CASTOR"); | |
376 | } | |
377 | ||
378 | if (iTRD) | |
379 | { | |
380 | //=================== TRD parameters ============================ | |
381 | ||
382 | AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator"); | |
383 | ||
384 | // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2) | |
385 | TRD->SetGasMix(1); | |
386 | ||
387 | // With hole in front of PHOS | |
388 | TRD->SetPHOShole(); | |
389 | // With hole in front of RICH | |
390 | TRD->SetRICHhole(); | |
391 | // Switch on TR | |
392 | AliTRDsim *TRDsim = TRD->CreateTR(); | |
393 | } | |
394 | ||
395 | if (iFMD) | |
396 | { | |
397 | //=================== FMD parameters ============================ | |
398 | ||
399 | AliFMD *FMD = new AliFMDv1("FMD", "normal FMD"); | |
400 | } | |
401 | ||
402 | if (iMUON) | |
403 | { | |
404 | //=================== MUON parameters =========================== | |
405 | ||
406 | AliMUON *MUON = new AliMUONv1("MUON", "default"); | |
407 | } | |
408 | //=================== PHOS parameters =========================== | |
409 | ||
410 | if (iPHOS) | |
411 | { | |
412 | AliPHOS *PHOS = new AliPHOSv1("PHOS", "GPS2"); | |
413 | } | |
414 | ||
415 | ||
416 | if (iPMD) | |
417 | { | |
418 | //=================== PMD parameters ============================ | |
419 | ||
420 | AliPMD *PMD = new AliPMDv1("PMD", "normal PMD"); | |
421 | ||
422 | PMD->SetPAR(1., 1., 0.8, 0.02); | |
423 | PMD->SetIN(6., 18., -580., 27., 27.); | |
424 | PMD->SetGEO(0.0, 0.2, 4.); | |
425 | PMD->SetPadSize(0.8, 1.0, 1.0, 1.5); | |
426 | ||
427 | } | |
428 | ||
429 | if (iSTART) | |
430 | { | |
431 | //=================== START parameters ============================ | |
432 | AliSTART *START = new AliSTARTv1("START", "START Detector"); | |
433 | } | |
434 | ||
435 | ||
436 | } |