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