]>
Commit | Line | Data |
---|---|---|
1 | // One can use the configuration macro in compiled mode by | |
2 | // root [0] gSystem->Load("libgeant321"); | |
3 | // root [0] gSystem->SetIncludePath("-I$ROOTSYS/include -I$ALICE_ROOT/include\ | |
4 | // -I$ALICE_ROOT -I$ALICE/geant3/TGeant3"); | |
5 | // root [0] .x grun.C(1,"ConfigHBT.C++") | |
6 | ||
7 | #if !defined(__CINT__) || defined(__MAKECINT__) | |
8 | #include <Riostream.h> | |
9 | #include <TPDGCode.h> | |
10 | #include <TRandom.h> | |
11 | #include <TSystem.h> | |
12 | #include <TVirtualMC.h> | |
13 | #include <TGeant3.h> | |
14 | #include "STEER/AliRunLoader.h" | |
15 | #include "STEER/AliRun.h" | |
16 | #include "STEER/AliConfig.h" | |
17 | #include "PYTHIA6/AliDecayerPythia.h" | |
18 | #include "EVGEN/AliGenCocktailAfterBurner.h" | |
19 | #include "TMEVSIM/AliMevSimConfig.h" | |
20 | #include "TMEVSIM/AliMevSimParticle.h" | |
21 | #include "TMEVSIM/AliGenMevSim.h" | |
22 | #include "THbtp/AliGenHBTprocessor.h" | |
23 | #include "STRUCT/AliBODY.h" | |
24 | #include "STRUCT/AliMAG.h" | |
25 | #include "STRUCT/AliABSOv3.h" | |
26 | #include "STRUCT/AliDIPOv3.h" | |
27 | #include "STRUCT/AliHALLv3.h" | |
28 | #include "STRUCT/AliFRAMEv2.h" | |
29 | #include "STRUCT/AliSHILv3.h" | |
30 | #include "STRUCT/AliPIPEv3.h" | |
31 | #include "ITS/AliITSv11Hybrid.h" | |
32 | #include "TPC/AliTPCv2.h" | |
33 | #include "TOF/AliTOFv6T0.h" | |
34 | #include "HMPID/AliHMPIDv3.h" | |
35 | #include "ZDC/AliZDCv3.h" | |
36 | #include "TRD/AliTRDv1.h" | |
37 | #include "FMD/AliFMDv1.h" | |
38 | #include "MUON/AliMUONv1.h" | |
39 | #include "PHOS/AliPHOSv1.h" | |
40 | #include "PMD/AliPMDv1.h" | |
41 | #include "T0/AliT0v1.h" | |
42 | #include "EMCAL/AliEMCALv2.h" | |
43 | #include "ACORDE/AliACORDEv1.h" | |
44 | #endif | |
45 | ||
46 | void Config() | |
47 | { | |
48 | // Set Random Number seed | |
49 | // gRandom->SetSeed(12345); | |
50 | ||
51 | // libraries required by geant321 | |
52 | #if defined(__CINT__) | |
53 | gSystem->Load("libgeant321"); | |
54 | #endif | |
55 | ||
56 | new TGeant3TGeo("C++ Interface to Geant3"); | |
57 | ||
58 | if(!AliCDBManager::Instance()->IsDefaultStorageSet()){ | |
59 | AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB"); | |
60 | AliCDBManager::Instance()->SetRun(0); | |
61 | } | |
62 | ||
63 | cout<<"Config.C: Creating Run Loader ..."<<endl; | |
64 | AliRunLoader* rl = AliRunLoader::Open("galice.root",AliConfig::GetDefaultEventFolderName(), | |
65 | "recreate"); | |
66 | if (rl == 0x0) | |
67 | { | |
68 | gAlice->Fatal("Config.C","Can not instatiate the Run Loader"); | |
69 | return; | |
70 | } | |
71 | rl->SetCompressionLevel(2); | |
72 | rl->SetNumberOfEventsPerFile(6); | |
73 | gAlice->SetRunLoader(rl); | |
74 | // gAlice->SetGeometryFromFile("geometry.root"); | |
75 | // gAlice->SetGeometryFromCDB(); | |
76 | ||
77 | // Set the trigger configuration | |
78 | gAlice->SetTriggerDescriptor("Pb-Pb"); | |
79 | cout<<"Trigger configuration is set to Pb-Pb"<<endl; | |
80 | ||
81 | // | |
82 | // Set External decayer | |
83 | AliDecayer *decayer = new AliDecayerPythia(); | |
84 | ||
85 | decayer->SetForceDecay(kAll); | |
86 | decayer->Init(); | |
87 | gMC->SetExternalDecayer(decayer); | |
88 | // | |
89 | //======================================================================= | |
90 | // ************* STEERING parameters FOR ALICE SIMULATION ************** | |
91 | // --- Specify event type to be tracked through the ALICE setup | |
92 | // --- All positions are in cm, angles in degrees, and P and E in GeV | |
93 | ||
94 | ||
95 | ||
96 | gMC->SetProcess("DCAY",1); | |
97 | gMC->SetProcess("PAIR",1); | |
98 | gMC->SetProcess("COMP",1); | |
99 | gMC->SetProcess("PHOT",1); | |
100 | gMC->SetProcess("PFIS",0); | |
101 | gMC->SetProcess("DRAY",0); | |
102 | gMC->SetProcess("ANNI",1); | |
103 | gMC->SetProcess("BREM",1); | |
104 | gMC->SetProcess("MUNU",1); | |
105 | gMC->SetProcess("CKOV",1); | |
106 | gMC->SetProcess("HADR",1); | |
107 | gMC->SetProcess("LOSS",2); | |
108 | gMC->SetProcess("MULS",1); | |
109 | gMC->SetProcess("RAYL",1); | |
110 | ||
111 | Float_t cut = 1.e-3; // 1MeV cut by default | |
112 | Float_t tofmax = 1.e10; | |
113 | ||
114 | gMC->SetCut("CUTGAM", cut); | |
115 | gMC->SetCut("CUTELE", cut); | |
116 | gMC->SetCut("CUTNEU", cut); | |
117 | gMC->SetCut("CUTHAD", cut); | |
118 | gMC->SetCut("CUTMUO", cut); | |
119 | gMC->SetCut("BCUTE", cut); | |
120 | gMC->SetCut("BCUTM", cut); | |
121 | gMC->SetCut("DCUTE", cut); | |
122 | gMC->SetCut("DCUTM", cut); | |
123 | gMC->SetCut("PPCUTM", cut); | |
124 | gMC->SetCut("TOFMAX", tofmax); | |
125 | ||
126 | ||
127 | if (gSystem->Getenv("CONFIG_NPARTICLES")) | |
128 | { | |
129 | int nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES")); | |
130 | } else | |
131 | { | |
132 | int nParticles = 10000; | |
133 | } | |
134 | ||
135 | /*********************************************************************************/ | |
136 | /*********************************************************************************/ | |
137 | /***************** G E N E R A T O R S *********************************/ | |
138 | ||
139 | /** 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 **/ | |
140 | /***************** (WRAPPER GENERATOR) *********************************/ | |
141 | ||
142 | ||
143 | ||
144 | AliGenCocktailAfterBurner* gener = new AliGenCocktailAfterBurner(); | |
145 | gener->SetPhiRange(0, 360); | |
146 | gener->SetThetaRange(40., 140.); | |
147 | gener->SetOrigin(0, 0, 0); //vertex position | |
148 | gener->SetSigma(0, 0, 0); //Sigma in (X,Y,Z) (cm) on IP position | |
149 | ||
150 | /***************** HIJING PARAMETRIZATION ********************************/ | |
151 | ||
152 | //AliGenHIJINGpara *g2 = new AliGenHIJINGpara(5); | |
153 | //g2->SetMomentumRange(0, 999); | |
154 | ||
155 | /***************** G E N B O X ***********************************/ | |
156 | ||
157 | // AliGenBox *g1 = new AliGenBox(5); | |
158 | // g1->SetMomentumRange(0, 3); | |
159 | // g1->SetOrigin(0,0,0); //vertex position | |
160 | // g1->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position | |
161 | // g1->SetPart(kK0Short); //K0short(310), Lambda(3122) | |
162 | ||
163 | ||
164 | /***************** M E V S I M ********************************/ | |
165 | ||
166 | AliMevSimConfig *c = new AliMevSimConfig(1); | |
167 | c->SetRectPlane(1); // reaction plane control, model 4 | |
168 | c->SetGrid(80,80); | |
169 | ||
170 | AliGenMevSim *g3 = new AliGenMevSim(c); | |
171 | g3->SetPtRange(0.001, 3); | |
172 | g3->SetMomentumRange(0.1, 3); | |
173 | ||
174 | g3->SetTrackingFlag(1); | |
175 | g3->SetOrigin(0.0, 0.0, 0.0); | |
176 | g3->SetSigma(0.0, 0.0, 0.0); | |
177 | //g3->SetEtaCutRange(-4,4); | |
178 | ||
179 | AliMevSimParticle *piPlus = new AliMevSimParticle(kPiPlus, 100, 3, 0.2, 0.01, 3, 0.1, 0.0, 0.0); | |
180 | AliMevSimParticle *piMinus = new AliMevSimParticle(kPiMinus, 100, 3, 0.2, 0.01, 3, 0.1, 0.0, 0.0); | |
181 | //AliMevSimParticle *KPlus = new AliMevSimParticle(kKPlus, 10, 0, 0.25, 0.0, 2, 0.15, 0.0, 0.0 ); | |
182 | //AliMevSimParticle *KMinus = new AliMevSimParticle(kKMinus, 10, 0, 0.25, 0.0, 2, 0.15, 0.0, 0.0 ); | |
183 | //AliMevSimParticle *protonPlus = new AliMevSimParticle(kProton, 3, 0, 0.4, 0.0, 2, 0.15, 0.0, 0.0); | |
184 | //AliMevSimParticle *protonMinus = new AliMevSimParticle(kProtonBar, 2, 0, 0.4, 0.0, 2, 0.15, 0.0, 0.0); | |
185 | ||
186 | g3->AddParticleType(piPlus); | |
187 | g3->AddParticleType(piMinus); | |
188 | //g3->AddParticleType(KPlus); | |
189 | //g3->AddParticleType(KMinus); | |
190 | //g3->AddParticleType(protonPlus); | |
191 | //g3->AddParticleType(protonMinus); | |
192 | ||
193 | ||
194 | /***************** H B T P R O C E S S O R ********************************/ | |
195 | ||
196 | AliGenHBTprocessor *hbtp = new AliGenHBTprocessor(); | |
197 | hbtp->SetRefControl(2); | |
198 | hbtp->SetSwitch1D(1); | |
199 | hbtp->SetSwitch3D(1); | |
200 | hbtp->SetSwitchCoulomb(1); | |
201 | hbtp->SetSwitchCoherence(0); | |
202 | hbtp->SetSwitchFermiBose(-1); | |
203 | hbtp->SetDeltap(0.1); | |
204 | hbtp->SetDelChi(0.1); | |
205 | hbtp->SetLambda(0.5); | |
206 | hbtp->SetQ0(8.0); | |
207 | hbtp->SetR0(8.0); | |
208 | hbtp->SetRParallel(8.0); | |
209 | hbtp->SetR1d(8.0); | |
210 | hbtp->SetRSide(8.0); | |
211 | hbtp->SetRLong(8.0); | |
212 | hbtp->SetROut(8.0); | |
213 | hbtp->SetPtRange(0.1,0.98); | |
214 | hbtp->SetPIDs(211,-211); //pi+ pi- | |
215 | hbtp->SetSwitchType(3); // fit both the like and unlike pair correl | |
216 | hbtp->SetMaxIterations(300); | |
217 | /***********************************************************************************/ | |
218 | ||
219 | // gener->AddGenerator(g2,"HIJING PARAMETRIZATION",1); | |
220 | // gener->AddGenerator(g1,"BOX (K0short)",1); | |
221 | gener->AddGenerator(g3,"MEVSIM",1); | |
222 | ||
223 | gener->AddAfterBurner(hbtp,"HBT PROCESSOR",1); | |
224 | ||
225 | gener->Init(); | |
226 | // | |
227 | // Activate this line if you want the vertex smearing to happen | |
228 | // track by track | |
229 | // | |
230 | //gener->SetVertexSmear(perTrack); | |
231 | ||
232 | gAlice->SetField(-999, 2); //Specify maximum magnetic field in Tesla (neg. ==> default field) | |
233 | // gAlice->SetField(-999, 2, 2.); //Specify maximum magnetic field in Tesla (neg. ==> default field) | |
234 | //Last number indicates the scale factor | |
235 | ||
236 | Int_t iABSO = 1; | |
237 | Int_t iACORDE = 0; | |
238 | Int_t iDIPO = 1; | |
239 | Int_t iFMD = 0; | |
240 | Int_t iFRAME = 1; | |
241 | Int_t iHALL = 1; | |
242 | Int_t iITS = 1; | |
243 | Int_t iMAG = 1; | |
244 | Int_t iMUON = 0; | |
245 | Int_t iPHOS = 0; | |
246 | Int_t iPIPE = 1; | |
247 | Int_t iPMD = 0; | |
248 | Int_t iHMPID = 0; | |
249 | Int_t iSHIL = 1; | |
250 | Int_t iT0 = 0; | |
251 | Int_t iTOF = 0; | |
252 | Int_t iTPC = 1; | |
253 | Int_t iTRD = 0; | |
254 | Int_t iZDC = 0; | |
255 | Int_t iEMCAL = 0; | |
256 | ||
257 | //=================== Alice BODY parameters ============================= | |
258 | AliBODY *BODY = new AliBODY("BODY", "Alice envelop"); | |
259 | ||
260 | ||
261 | if (iMAG) | |
262 | { | |
263 | //=================== MAG parameters ============================ | |
264 | // --- Start with Magnet since detector layouts may be depending --- | |
265 | // --- on the selected Magnet dimensions --- | |
266 | AliMAG *MAG = new AliMAG("MAG", "Magnet"); | |
267 | } | |
268 | ||
269 | ||
270 | if (iABSO) | |
271 | { | |
272 | //=================== ABSO parameters ============================ | |
273 | AliABSO *ABSO = new AliABSOv3("ABSO", "Muon Absorber"); | |
274 | } | |
275 | ||
276 | if (iDIPO) | |
277 | { | |
278 | //=================== DIPO parameters ============================ | |
279 | ||
280 | AliDIPO *DIPO = new AliDIPOv3("DIPO", "Dipole version 3"); | |
281 | } | |
282 | ||
283 | if (iHALL) | |
284 | { | |
285 | //=================== HALL parameters ============================ | |
286 | ||
287 | AliHALL *HALL = new AliHALLv3("HALL", "Alice Hall"); | |
288 | } | |
289 | ||
290 | ||
291 | if (iFRAME) | |
292 | { | |
293 | //=================== FRAME parameters ============================ | |
294 | ||
295 | AliFRAME *FRAME = new AliFRAMEv2("FRAME", "Space Frame"); | |
296 | FRAME->SetHoles(1); | |
297 | } | |
298 | ||
299 | if (iSHIL) | |
300 | { | |
301 | //=================== SHIL parameters ============================ | |
302 | ||
303 | AliSHIL *SHIL = new AliSHILv3("SHIL", "Shielding"); | |
304 | } | |
305 | ||
306 | ||
307 | if (iPIPE) | |
308 | { | |
309 | //=================== PIPE parameters ============================ | |
310 | ||
311 | AliPIPE *PIPE = new AliPIPEv3("PIPE", "Beam Pipe"); | |
312 | } | |
313 | ||
314 | if (iITS) | |
315 | { | |
316 | //=================== ITS parameters ============================ | |
317 | ||
318 | AliITS *ITS = new AliITSv11Hybrid("ITS","ITS v11Hybrid"); | |
319 | } | |
320 | ||
321 | ||
322 | if (iTPC) | |
323 | { | |
324 | //============================ TPC parameters =================== | |
325 | AliTPC *TPC = new AliTPCv2("TPC", "Default"); | |
326 | } | |
327 | ||
328 | if (iTOF) | |
329 | { | |
330 | //=================== TOF parameters ============================ | |
331 | AliTOF *TOF = new AliTOFv6T0("TOF", "normal TOF"); | |
332 | } | |
333 | ||
334 | if (iHMPID) | |
335 | { | |
336 | //=================== HMPID parameters =========================== | |
337 | AliHMPID *HMPID = new AliHMPIDv3("HMPID", "normal HMPID"); | |
338 | ||
339 | } | |
340 | ||
341 | ||
342 | if (iZDC) | |
343 | { | |
344 | //=================== ZDC parameters ============================ | |
345 | ||
346 | AliZDC *ZDC = new AliZDCv3("ZDC", "normal ZDC"); | |
347 | } | |
348 | ||
349 | if (iACORDE) | |
350 | { | |
351 | //=================== ACORDE parameters ============================ | |
352 | ||
353 | AliACORDE *ACORDE = new AliACORDEv1("ACORDE", "normal ACORDE"); | |
354 | } | |
355 | ||
356 | if (iTRD) | |
357 | { | |
358 | //=================== TRD parameters ============================ | |
359 | ||
360 | AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator"); | |
361 | } | |
362 | ||
363 | if (iFMD) | |
364 | { | |
365 | //=================== FMD parameters ============================ | |
366 | ||
367 | AliFMD *FMD = new AliFMDv1("FMD", "normal FMD"); | |
368 | } | |
369 | ||
370 | if (iMUON) | |
371 | { | |
372 | //=================== MUON parameters =========================== | |
373 | ||
374 | AliMUON *MUON = new AliMUONv1("MUON", "default"); | |
375 | } | |
376 | //=================== PHOS parameters =========================== | |
377 | ||
378 | if (iPHOS) | |
379 | { | |
380 | AliPHOS *PHOS = new AliPHOSv1("PHOS", "GPS2"); | |
381 | } | |
382 | ||
383 | ||
384 | if (iPMD) | |
385 | { | |
386 | //=================== PMD parameters ============================ | |
387 | ||
388 | AliPMD *PMD = new AliPMDv1("PMD", "normal PMD"); | |
389 | ||
390 | PMD->SetPAR(1., 1., 0.8, 0.02); | |
391 | PMD->SetIN(6., 18., -580., 27., 27.); | |
392 | PMD->SetGEO(0.0, 0.2, 4.); | |
393 | PMD->SetPadSize(0.8, 1.0, 1.0, 1.5); | |
394 | ||
395 | } | |
396 | if (iEMCAL && !iHMPID) | |
397 | { | |
398 | //=================== EMCAL parameters ============================ | |
399 | AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "EMCAL_COMPLETE"); | |
400 | } | |
401 | ||
402 | if (iT0) | |
403 | { | |
404 | //=================== T0 parameters ============================ | |
405 | AliT0 *T0 = new AliT0v1("T0", "T0 Detector"); | |
406 | } | |
407 | ||
408 | ||
409 | } |