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