]>
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> | |
9bb2665f | 9 | #include <TPDGCode.h> |
48c42d52 | 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" | |
96fb3353 | 25 | #include "STRUCT/AliABSOv3.h" |
26 | #include "STRUCT/AliDIPOv3.h" | |
27 | #include "STRUCT/AliHALLv3.h" | |
48c42d52 | 28 | #include "STRUCT/AliFRAMEv2.h" |
96fb3353 | 29 | #include "STRUCT/AliSHILv3.h" |
30 | #include "STRUCT/AliPIPEv3.h" | |
99887042 | 31 | #include "ITS/AliITSv11Hybrid.h" |
48c42d52 | 32 | #include "TPC/AliTPCv2.h" |
0d7ef405 | 33 | #include "TOF/AliTOFv6T0.h" |
99887042 | 34 | #include "HMPID/AliHMPIDv3.h" |
9d07603a | 35 | #include "ZDC/AliZDCv3.h" |
48c42d52 | 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" | |
ababa197 | 41 | #include "T0/AliT0v1.h" |
4920e63e | 42 | #include "EMCAL/AliEMCALv2.h" |
b384f8a4 | 43 | #include "ACORDE/AliACORDEv1.h" |
48c42d52 | 44 | #endif |
45 | ||
66d04b38 | 46 | void Config() |
47 | { | |
66d04b38 | 48 | // Set Random Number seed |
49 | // gRandom->SetSeed(12345); | |
50 | ||
2f03a4ed | 51 | // libraries required by geant321 |
52 | #if defined(__CINT__) | |
53 | gSystem->Load("libgeant321"); | |
54 | #endif | |
55 | ||
b0470150 | 56 | new TGeant3TGeo("C++ Interface to Geant3"); |
66d04b38 | 57 | |
458041af | 58 | if(!AliCDBManager::Instance()->IsDefaultStorageSet()){ |
162637e4 | 59 | AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB"); |
458041af | 60 | AliCDBManager::Instance()->SetRun(0); |
61 | } | |
62 | ||
48c42d52 | 63 | cout<<"Config.C: Creating Run Loader ..."<<endl; |
f5a857b2 | 64 | AliRunLoader* rl = AliRunLoader::Open("galice.root",AliConfig::GetDefaultEventFolderName(), |
88cb7938 | 65 | "recreate"); |
48c42d52 | 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); | |
458041af | 74 | // gAlice->SetGeometryFromFile("geometry.root"); |
75 | // gAlice->SetGeometryFromCDB(); | |
66d04b38 | 76 | |
6521ae06 | 77 | // Set the trigger configuration |
78 | gAlice->SetTriggerDescriptor("Pb-Pb"); | |
79 | cout<<"Trigger configuration is set to Pb-Pb"<<endl; | |
80 | ||
66d04b38 | 81 | // |
82 | // Set External decayer | |
83 | AliDecayer *decayer = new AliDecayerPythia(); | |
84 | ||
85 | decayer->SetForceDecay(kAll); | |
86 | decayer->Init(); | |
87 | gMC->SetExternalDecayer(decayer); | |
88 | // | |
66d04b38 | 89 | //======================================================================= |
6a3df6c9 | 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); | |
66d04b38 | 110 | |
111 | Float_t cut = 1.e-3; // 1MeV cut by default | |
112 | Float_t tofmax = 1.e10; | |
113 | ||
6a3df6c9 | 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 | ||
66d04b38 | 127 | if (gSystem->Getenv("CONFIG_NPARTICLES")) |
128 | { | |
129 | int nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES")); | |
130 | } else | |
131 | { | |
132 | int nParticles = 10000; | |
133 | } | |
66d04b38 | 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 | ||
99f4b63d | 144 | AliGenCocktailAfterBurner* gener = new AliGenCocktailAfterBurner(); |
66d04b38 | 145 | gener->SetPhiRange(0, 360); |
99f4b63d | 146 | gener->SetThetaRange(40., 140.); |
66d04b38 | 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 | ||
99f4b63d | 152 | //AliGenHIJINGpara *g2 = new AliGenHIJINGpara(5); |
153 | //g2->SetMomentumRange(0, 999); | |
66d04b38 | 154 | |
155 | /***************** G E N B O X ***********************************/ | |
156 | ||
99f4b63d | 157 | // AliGenBox *g1 = new AliGenBox(5); |
158 | // g1->SetMomentumRange(0, 3); | |
66d04b38 | 159 | // g1->SetOrigin(0,0,0); //vertex position |
160 | // g1->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position | |
9bb2665f | 161 | // g1->SetPart(kK0Short); //K0short(310), Lambda(3122) |
66d04b38 | 162 | |
163 | ||
164 | /***************** M E V S I M ********************************/ | |
66d04b38 | 165 | |
166 | AliMevSimConfig *c = new AliMevSimConfig(1); | |
167 | c->SetRectPlane(1); // reaction plane control, model 4 | |
99f4b63d | 168 | c->SetGrid(80,80); |
169 | ||
66d04b38 | 170 | AliGenMevSim *g3 = new AliGenMevSim(c); |
99f4b63d | 171 | g3->SetPtRange(0.001, 3); |
172 | g3->SetMomentumRange(0.1, 3); | |
173 | ||
66d04b38 | 174 | g3->SetTrackingFlag(1); |
175 | g3->SetOrigin(0.0, 0.0, 0.0); | |
176 | g3->SetSigma(0.0, 0.0, 0.0); | |
99f4b63d | 177 | //g3->SetEtaCutRange(-4,4); |
66d04b38 | 178 | |
88cb7938 | 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); | |
66d04b38 | 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 | ||
66d04b38 | 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 | ||
99f4b63d | 193 | |
66d04b38 | 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); | |
88cb7938 | 200 | hbtp->SetSwitchCoulomb(1); |
66d04b38 | 201 | hbtp->SetSwitchCoherence(0); |
88cb7938 | 202 | hbtp->SetSwitchFermiBose(-1); |
99f4b63d | 203 | hbtp->SetDeltap(0.1); |
66d04b38 | 204 | hbtp->SetDelChi(0.1); |
99f4b63d | 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); | |
66d04b38 | 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 | |
88cb7938 | 216 | hbtp->SetMaxIterations(300); |
66d04b38 | 217 | /***********************************************************************************/ |
218 | ||
99f4b63d | 219 | // gener->AddGenerator(g2,"HIJING PARAMETRIZATION",1); |
66d04b38 | 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) | |
99f4b63d | 233 | // gAlice->SetField(-999, 2, 2.); //Specify maximum magnetic field in Tesla (neg. ==> default field) |
234 | //Last number indicates the scale factor | |
66d04b38 | 235 | |
236 | Int_t iABSO = 1; | |
b384f8a4 | 237 | Int_t iACORDE = 0; |
66d04b38 | 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; | |
de1857bb | 248 | Int_t iHMPID = 0; |
66d04b38 | 249 | Int_t iSHIL = 1; |
ababa197 | 250 | Int_t iT0 = 0; |
66d04b38 | 251 | Int_t iTOF = 0; |
252 | Int_t iTPC = 1; | |
253 | Int_t iTRD = 0; | |
254 | Int_t iZDC = 0; | |
9757d28c | 255 | Int_t iEMCAL = 0; |
66d04b38 | 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 ============================ | |
96fb3353 | 273 | AliABSO *ABSO = new AliABSOv3("ABSO", "Muon Absorber"); |
66d04b38 | 274 | } |
275 | ||
276 | if (iDIPO) | |
277 | { | |
278 | //=================== DIPO parameters ============================ | |
279 | ||
96fb3353 | 280 | AliDIPO *DIPO = new AliDIPOv3("DIPO", "Dipole version 3"); |
66d04b38 | 281 | } |
282 | ||
283 | if (iHALL) | |
284 | { | |
285 | //=================== HALL parameters ============================ | |
286 | ||
96fb3353 | 287 | AliHALL *HALL = new AliHALLv3("HALL", "Alice Hall"); |
66d04b38 | 288 | } |
289 | ||
290 | ||
291 | if (iFRAME) | |
292 | { | |
293 | //=================== FRAME parameters ============================ | |
294 | ||
295 | AliFRAME *FRAME = new AliFRAMEv2("FRAME", "Space Frame"); | |
bab433b3 | 296 | FRAME->SetHoles(1); |
66d04b38 | 297 | } |
298 | ||
299 | if (iSHIL) | |
300 | { | |
301 | //=================== SHIL parameters ============================ | |
302 | ||
96fb3353 | 303 | AliSHIL *SHIL = new AliSHILv3("SHIL", "Shielding"); |
66d04b38 | 304 | } |
305 | ||
306 | ||
307 | if (iPIPE) | |
308 | { | |
309 | //=================== PIPE parameters ============================ | |
310 | ||
96fb3353 | 311 | AliPIPE *PIPE = new AliPIPEv3("PIPE", "Beam Pipe"); |
66d04b38 | 312 | } |
313 | ||
e89fa83b | 314 | if (iITS) |
315 | { | |
316 | //=================== ITS parameters ============================ | |
66d04b38 | 317 | |
99887042 | 318 | AliITS *ITS = new AliITSv11Hybrid("ITS","ITS v11Hybrid"); |
e89fa83b | 319 | } |
66d04b38 | 320 | |
321 | ||
322 | if (iTPC) | |
323 | { | |
26ca4b4a | 324 | //============================ TPC parameters =================== |
66d04b38 | 325 | AliTPC *TPC = new AliTPCv2("TPC", "Default"); |
66d04b38 | 326 | } |
327 | ||
328 | if (iTOF) | |
329 | { | |
330 | //=================== TOF parameters ============================ | |
0d7ef405 | 331 | AliTOF *TOF = new AliTOFv6T0("TOF", "normal TOF"); |
66d04b38 | 332 | } |
333 | ||
de1857bb | 334 | if (iHMPID) |
66d04b38 | 335 | { |
de1857bb | 336 | //=================== HMPID parameters =========================== |
99887042 | 337 | AliHMPID *HMPID = new AliHMPIDv3("HMPID", "normal HMPID"); |
66d04b38 | 338 | |
339 | } | |
340 | ||
341 | ||
342 | if (iZDC) | |
343 | { | |
344 | //=================== ZDC parameters ============================ | |
345 | ||
9d07603a | 346 | AliZDC *ZDC = new AliZDCv3("ZDC", "normal ZDC"); |
66d04b38 | 347 | } |
348 | ||
b384f8a4 | 349 | if (iACORDE) |
66d04b38 | 350 | { |
b384f8a4 | 351 | //=================== ACORDE parameters ============================ |
66d04b38 | 352 | |
b384f8a4 | 353 | AliACORDE *ACORDE = new AliACORDEv1("ACORDE", "normal ACORDE"); |
66d04b38 | 354 | } |
355 | ||
356 | if (iTRD) | |
357 | { | |
358 | //=================== TRD parameters ============================ | |
359 | ||
360 | AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator"); | |
66d04b38 | 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 | } | |
de1857bb | 396 | if (iEMCAL && !iHMPID) |
9757d28c | 397 | { |
398 | //=================== EMCAL parameters ============================ | |
8224b11d | 399 | AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "EMCAL_COMPLETE"); |
9757d28c | 400 | } |
66d04b38 | 401 | |
ababa197 | 402 | if (iT0) |
66d04b38 | 403 | { |
ababa197 | 404 | //=================== T0 parameters ============================ |
405 | AliT0 *T0 = new AliT0v1("T0", "T0 Detector"); | |
66d04b38 | 406 | } |
407 | ||
408 | ||
409 | } |