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