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