]>
Commit | Line | Data |
---|---|---|
ae6e6d18 | 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 | /* | |
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); | |
79 | // gener->SetThetaRange(0.28,179.72); | |
80 | gener->SetThetaRange(0., 180.); | |
81 | gener->SetOrigin(0, 0, 0); //vertex position | |
82 | gener->SetSigma(0, 0, 0); //Sigma in (X,Y,Z) (cm) on IP position | |
83 | */ | |
84 | ||
85 | //******************************************** | |
86 | // Example for Mb Production with Pythia * | |
87 | //******************************************** | |
88 | AliGenPythia *gener = new AliGenPythia(-1); | |
89 | gener->SetMomentumRange(0,999); | |
90 | gener->SetPhiRange(-180,180); | |
91 | gener->SetThetaRange(0., 180.); | |
92 | gener->SetYRange(-12,12); | |
93 | gener->SetPtRange(0,1000); | |
94 | gener->SetStrucFunc(kDO_Set_1); | |
95 | gener->SetProcess(kPyMb); | |
96 | gener->SetEnergyCMS(14000.); | |
97 | gener->Init(); | |
98 | ||
99 | // | |
100 | // Activate this line if you want the vertex smearing to happen | |
101 | // track by track | |
102 | // | |
103 | //gener->SetVertexSmear(perTrack); | |
104 | ||
105 | gAlice->SetField(-999, 2); //Specify maximum magnetic field in Tesla (neg. ==> default field) | |
106 | ||
107 | Int_t iABSO = 1; | |
108 | Int_t iCASTOR = 1; | |
109 | Int_t iDIPO = 1; | |
110 | Int_t iFMD = 1; | |
111 | Int_t iFRAME = 1; | |
112 | Int_t iHALL = 1; | |
113 | Int_t iITS = 1; | |
114 | Int_t iMAG = 1; | |
115 | Int_t iMUON = 1; | |
116 | Int_t iPHOS = 1; | |
117 | Int_t iPIPE = 1; | |
118 | Int_t iPMD = 1; | |
119 | Int_t iRICH = 1; | |
120 | Int_t iSHIL = 1; | |
121 | Int_t iSTART = 1; | |
122 | Int_t iTOF = 1; | |
123 | Int_t iTPC = 1; | |
124 | Int_t iTRD = 1; | |
125 | Int_t iZDC = 1; | |
126 | ||
127 | //=================== Alice BODY parameters ============================= | |
128 | AliBODY *BODY = new AliBODY("BODY", "Alice envelop"); | |
129 | ||
130 | ||
131 | if (iMAG) | |
132 | { | |
133 | //=================== MAG parameters ============================ | |
134 | // --- Start with Magnet since detector layouts may be depending --- | |
135 | // --- on the selected Magnet dimensions --- | |
136 | AliMAG *MAG = new AliMAG("MAG", "Magnet"); | |
137 | } | |
138 | ||
139 | ||
140 | if (iABSO) | |
141 | { | |
142 | //=================== ABSO parameters ============================ | |
143 | AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber"); | |
144 | } | |
145 | ||
146 | if (iDIPO) | |
147 | { | |
148 | //=================== DIPO parameters ============================ | |
149 | ||
150 | AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2"); | |
151 | } | |
152 | ||
153 | if (iHALL) | |
154 | { | |
155 | //=================== HALL parameters ============================ | |
156 | ||
157 | AliHALL *HALL = new AliHALL("HALL", "Alice Hall"); | |
158 | } | |
159 | ||
160 | ||
161 | if (iFRAME) | |
162 | { | |
163 | //=================== FRAME parameters ============================ | |
164 | ||
165 | AliFRAME *FRAME = new AliFRAMEv2("FRAME", "Space Frame"); | |
166 | ||
167 | } | |
168 | ||
169 | if (iSHIL) | |
170 | { | |
171 | //=================== SHIL parameters ============================ | |
172 | ||
173 | AliSHIL *SHIL = new AliSHILv0("SHIL", "Shielding"); | |
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(300.); // detector thickness on layer 1 must be in the range [100,300] | |
209 | ITS->SetThicknessDet2(300.); // detector thickness on layer 2 must be in the range [100,300] | |
210 | ITS->SetThicknessChip1(300.); // chip thickness on layer 1 must be in the range [150,300] | |
211 | ITS->SetThicknessChip2(300.); // chip thickness on layer 2 must be in the range [150,300] | |
212 | ITS->SetRails(1); // 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(300.); // detector thickness on layer 1 must be in the range [100,300] | |
220 | //ITS->SetThicknessDet2(300.); // detector thickness on layer 2 must be in the range [100,300] | |
221 | //ITS->SetThicknessChip1(300.); // chip thickness on layer 1 must be in the range [150,300] | |
222 | //ITS->SetThicknessChip2(300.); // chip thickness on layer 2 must be in the range [150,300] | |
223 | //ITS->SetRails(1); // 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(1); // 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(1); // 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 | ||
253 | if (iTPC) | |
254 | { | |
255 | //============================ TPC parameters ================================ | |
256 | // --- This allows the user to specify sectors for the SLOW (TPC geometry 2) | |
257 | // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper) | |
258 | // --- sectors are specified, any value other than that requires at least one | |
259 | // --- sector (lower or upper)to be specified! | |
260 | // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0) | |
261 | // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0) | |
262 | // --- SecLows - number of lower sectors specified (up to 6) | |
263 | // --- SecUps - number of upper sectors specified (up to 12) | |
264 | // --- Sens - sensitive strips for the Slow Simulator !!! | |
265 | // --- This does NOT work if all S or L-sectors are specified, i.e. | |
266 | // --- if SecAL or SecAU < 0 | |
267 | // | |
268 | // | |
269 | //----------------------------------------------------------------------------- | |
270 | ||
271 | // gROOT->LoadMacro("SetTPCParam.C"); | |
272 | // AliTPCParam *param = SetTPCParam(); | |
273 | AliTPC *TPC = new AliTPCv2("TPC", "Default"); | |
274 | ||
275 | // All sectors included | |
276 | TPC->SetSecAL(-1); | |
277 | TPC->SetSecAU(-1); | |
278 | ||
279 | } | |
280 | ||
281 | if (iTOF) | |
282 | { | |
283 | //=================== TOF parameters ============================ | |
284 | AliTOF *TOF = new AliTOFv2("TOF", "normal TOF"); | |
285 | } | |
286 | ||
287 | if (iRICH) | |
288 | { | |
289 | //=================== RICH parameters =========================== | |
290 | AliRICH *RICH = new AliRICHv1("RICH", "normal RICH"); | |
291 | ||
292 | } | |
293 | ||
294 | ||
295 | if (iZDC) | |
296 | { | |
297 | //=================== ZDC parameters ============================ | |
298 | ||
299 | AliZDC *ZDC = new AliZDCv1("ZDC", "normal ZDC"); | |
300 | } | |
301 | ||
302 | if (iCASTOR) | |
303 | { | |
304 | //=================== CASTOR parameters ============================ | |
305 | ||
306 | AliCASTOR *CASTOR = new AliCASTORv1("CASTOR", "normal CASTOR"); | |
307 | } | |
308 | ||
309 | if (iTRD) | |
310 | { | |
311 | //=================== TRD parameters ============================ | |
312 | ||
313 | AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator"); | |
314 | ||
315 | // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2) | |
316 | TRD->SetGasMix(1); | |
317 | ||
318 | // With hole in front of PHOS | |
319 | TRD->SetPHOShole(); | |
320 | // With hole in front of RICH | |
321 | TRD->SetRICHhole(); | |
322 | // Switch on TR | |
323 | AliTRDsim *TRDsim = TRD->CreateTR(); | |
324 | } | |
325 | ||
326 | if (iFMD) | |
327 | { | |
328 | //=================== FMD parameters ============================ | |
329 | ||
330 | AliFMD *FMD = new AliFMDv1("FMD", "normal FMD"); | |
331 | } | |
332 | ||
333 | if (iMUON) | |
334 | { | |
335 | //=================== MUON parameters =========================== | |
336 | ||
337 | AliMUON *MUON = new AliMUONv1("MUON", "default"); | |
338 | } | |
339 | //=================== PHOS parameters =========================== | |
340 | ||
341 | if (iPHOS) | |
342 | { | |
343 | AliPHOS *PHOS = new AliPHOSv1("PHOS", "GPS2"); | |
344 | } | |
345 | ||
346 | ||
347 | if (iPMD) | |
348 | { | |
349 | //=================== PMD parameters ============================ | |
350 | ||
351 | AliPMD *PMD = new AliPMDv1("PMD", "normal PMD"); | |
352 | ||
353 | PMD->SetPAR(1., 1., 0.8, 0.02); | |
354 | PMD->SetIN(6., 18., -580., 27., 27.); | |
355 | PMD->SetGEO(0.0, 0.2, 4.); | |
356 | PMD->SetPadSize(0.8, 1.0, 1.0, 1.5); | |
357 | ||
358 | } | |
359 | ||
360 | if (iSTART) | |
361 | { | |
362 | //=================== START parameters ============================ | |
363 | AliSTART *START = new AliSTARTv1("START", "START Detector"); | |
364 | } | |
365 | ||
366 | ||
367 | } |