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