Replace the PHOS version from IHEP to Run1 and fix the compilation, when possibletest...
[u/mrichter/AliRoot.git] / test / testdEdx / Config.C
CommitLineData
253e70f4 1//Configuration of simulation
2
3enum PprRun_t
4{
9e75bcab 5 test50, testdEdx,
253e70f4 6 kParam_8000, kParam_4000, kParam_2000,
7 kHijing_cent1, kHijing_cent2,
8 kHijing_per1, kHijing_per2, kHijing_per3, kHijing_per4, kHijing_per5,
9 kHijing_jj25, kHijing_jj50, kHijing_jj75, kHijing_jj100, kHijing_jj200,
10 kHijing_gj25, kHijing_gj50, kHijing_gj75, kHijing_gj100, kHijing_gj200,
11 kHijing_pA, kPythia6,
12 kPythia6Jets20_24, kPythia6Jets24_29, kPythia6Jets29_35,
13 kPythia6Jets35_42, kPythia6Jets42_50, kPythia6Jets50_60,
14 kPythia6Jets60_72, kPythia6Jets72_86, kPythia6Jets86_104,
15 kPythia6Jets104_125, kPythia6Jets125_150, kPythia6Jets150_180,
16 kD0PbPb5500, kCharmSemiElPbPb5500, kBeautySemiElPbPb5500,
17 kCocktailTRD, kPyJJ, kPyGJ,
18 kMuonCocktailCent1, kMuonCocktailPer1, kMuonCocktailPer4,
19 kMuonCocktailCent1HighPt, kMuonCocktailPer1HighPt, kMuonCocktailPer4HighPt,
20 kMuonCocktailCent1Single, kMuonCocktailPer1Single, kMuonCocktailPer4Single,
21 kFlow_2_2000, kFlow_10_2000, kFlow_6_2000, kFlow_6_5000,
22 kHIJINGplus, kRunMax
23};
24
25const char* pprRunName[] = {
9e75bcab 26 "test50", "testdEdx",
253e70f4 27 "kParam_8000", "kParam_4000", "kParam_2000",
28 "kHijing_cent1", "kHijing_cent2",
29 "kHijing_per1", "kHijing_per2", "kHijing_per3", "kHijing_per4",
30 "kHijing_per5",
31 "kHijing_jj25", "kHijing_jj50", "kHijing_jj75", "kHijing_jj100",
32 "kHijing_jj200",
33 "kHijing_gj25", "kHijing_gj50", "kHijing_gj75", "kHijing_gj100",
34 "kHijing_gj200", "kHijing_pA", "kPythia6",
35 "kPythia6Jets20_24", "kPythia6Jets24_29", "kPythia6Jets29_35",
36 "kPythia6Jets35_42", "kPythia6Jets42_50", "kPythia6Jets50_60",
37 "kPythia6Jets60_72", "kPythia6Jets72_86", "kPythia6Jets86_104",
38 "kPythia6Jets104_125", "kPythia6Jets125_150", "kPythia6Jets150_180",
39 "kD0PbPb5500", "kCharmSemiElPbPb5500", "kBeautySemiElPbPb5500",
40 "kCocktailTRD", "kPyJJ", "kPyGJ",
41 "kMuonCocktailCent1", "kMuonCocktailPer1", "kMuonCocktailPer4",
42 "kMuonCocktailCent1HighPt", "kMuonCocktailPer1HighPt", "kMuonCocktailPer4HighPt",
43 "kMuonCocktailCent1Single", "kMuonCocktailPer1Single", "kMuonCocktailPer4Single",
44 "kFlow_2_2000", "kFlow_10_2000", "kFlow_6_2000", "kFlow_6_5000", "kHIJINGplus"
45};
46
47enum PprRad_t
48{
49 kGluonRadiation, kNoGluonRadiation
50};
51
52enum PprTrigConf_t
53{
54 kDefaultPPTrig, kDefaultPbPbTrig
55};
56
57const char * pprTrigConfName[] = {
58 "p-p","Pb-Pb"
59};
60
61// This part for configuration
62
63//static PprRun_t srun = kPythia6;
9e75bcab 64static PprRun_t srun = testdEdx;
253e70f4 65static PprRad_t srad = kGluonRadiation;
66static AliMagF::BMap_t smag = AliMagF::k5kG;
fab83bb9 67static Int_t sseed = 0; //Set 0 to use the current time
253e70f4 68static PprTrigConf_t strig = kDefaultPPTrig; // default pp trigger configuration
69
70// Comment line
71static TString comment;
72
73// Functions
74Float_t EtaToTheta(Float_t arg);
75AliGenerator* GeneratorFactory(PprRun_t srun);
76AliGenHijing* HijingStandard();
77AliGenGeVSim* GeVSimStandard(Float_t, Float_t);
78void ProcessEnvironmentVars();
79
80void Config()
81{
82 // ThetaRange is (0., 180.). It was (0.28,179.72) 7/12/00 09:00
83 // Theta range given through pseudorapidity limits 22/6/2001
84
85 // Get settings from environment variables
86 ProcessEnvironmentVars();
87
88 // Set Random Number seed
89 gRandom->SetSeed(sseed);
90 cout<<"Seed for random number generation= "<<gRandom->GetSeed()<<endl;
91
92
93 // libraries required by geant321 and Pythia: loaded in sim.C
94
95 new TGeant3TGeo("C++ Interface to Geant3");
96
97 // Output every 100 tracks
98
99 TVirtualMC * vmc = TVirtualMC::GetMC();
100
101 ((TGeant3*)vmc)->SetSWIT(4,100);
102
103 AliRunLoader* rl=0x0;
104
105 AliLog::Message(AliLog::kInfo, "Creating Run Loader", "", "", "Config()"," ConfigPPR.C", __LINE__);
106
107 rl = AliRunLoader::Open("galice.root",
108 AliConfig::GetDefaultEventFolderName(),
109 "recreate");
110 if (rl == 0x0)
111 {
112 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
113 return;
114 }
115 rl->SetCompressionLevel(2);
116 rl->SetNumberOfEventsPerFile(100);
117 gAlice->SetRunLoader(rl);
118
119 // Set the trigger configuration
120 AliSimulation::Instance()->SetTriggerConfig(pprTrigConfName[strig]);
121 cout<<"Trigger configuration is set to "<<pprTrigConfName[strig]<<endl;
122
123 //
124 // Set External decayer
125 AliDecayer *decayer = new AliDecayerPythia();
126
127
128 switch (srun) {
129 case kD0PbPb5500:
130 decayer->SetForceDecay(kHadronicD);
131 break;
132 case kCharmSemiElPbPb5500:
133 decayer->SetForceDecay(kSemiElectronic);
134 break;
135 case kBeautySemiElPbPb5500:
136 decayer->SetForceDecay(kSemiElectronic);
137 break;
138 default:
139 decayer->SetForceDecay(kAll);
140 break;
141 }
142 decayer->Init();
143 vmc->SetExternalDecayer(decayer);
144 //
145 //
146 //=======================================================================
147 //
148 //=======================================================================
149 // ************* STEERING parameters FOR ALICE SIMULATION **************
150 // --- Specify event type to be tracked through the ALICE setup
151 // --- All positions are in cm, angles in degrees, and P and E in GeV
152
153 vmc->SetProcess("DCAY",1);
154 vmc->SetProcess("PAIR",1);
155 vmc->SetProcess("COMP",1);
156 vmc->SetProcess("PHOT",1);
157 vmc->SetProcess("PFIS",0);
158 vmc->SetProcess("DRAY",0);
159 vmc->SetProcess("ANNI",1);
160 vmc->SetProcess("BREM",1);
161 vmc->SetProcess("MUNU",1);
162 vmc->SetProcess("CKOV",1);
163 vmc->SetProcess("HADR",1);
164 vmc->SetProcess("LOSS",2);
165 vmc->SetProcess("MULS",1);
166 vmc->SetProcess("RAYL",1);
167
168 Float_t cut = 1.e-3; // 1MeV cut by default
169 Float_t tofmax = 1.e10;
170
171 vmc->SetCut("CUTGAM", cut);
172 vmc->SetCut("CUTELE", cut);
173 vmc->SetCut("CUTNEU", cut);
174 vmc->SetCut("CUTHAD", cut);
175 vmc->SetCut("CUTMUO", cut);
176 vmc->SetCut("BCUTE", cut);
177 vmc->SetCut("BCUTM", cut);
178 vmc->SetCut("DCUTE", cut);
179 vmc->SetCut("DCUTM", cut);
180 vmc->SetCut("PPCUTM", cut);
181 vmc->SetCut("TOFMAX", tofmax);
182
183 // Generator Configuration
184 AliGenerator* gener = GeneratorFactory(srun);
185 gener->SetOrigin(0, 0, 0); // vertex position
186 gener->SetSigma(0, 0, 5.3); // Sigma in (X,Y,Z) (cm) on IP position
187 gener->SetCutVertexZ(1.); // Truncate at 1 sigma
188 gener->SetVertexSmear(kPerEvent);
189 gener->SetTrackingFlag(1);
190 gener->Init();
191
192 if (smag == AliMagF::k2kG) {
193 comment = comment.Append(" | L3 field 0.2 T");
194 } else if (smag == AliMagF::k5kG) {
195 comment = comment.Append(" | L3 field 0.5 T");
196 }
197
198
199 if (srad == kGluonRadiation)
200 {
201 comment = comment.Append(" | Gluon Radiation On");
202
203 } else {
204 comment = comment.Append(" | Gluon Radiation Off");
205 }
206
207 printf("\n \n Comment: %s \n \n", comment.Data());
208
209
210// Field
211 TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", -1., -1., smag));
212
213 rl->CdGAFile();
214//
215 Int_t iABSO = 1;
216 Int_t iDIPO = 1;
217 Int_t iFMD = 1;
218 Int_t iFRAME = 1;
219 Int_t iHALL = 1;
220 Int_t iITS = 1;
221 Int_t iMAG = 1;
222 Int_t iMUON = 1;
223 Int_t iPHOS = 1;
224 Int_t iPIPE = 1;
225 Int_t iPMD = 1;
226 Int_t iHMPID = 1;
227 Int_t iSHIL = 1;
228 Int_t iT0 = 1;
229 Int_t iTOF = 1;
230 Int_t iTPC = 1;
231 Int_t iTRD = 1;
232 Int_t iZDC = 1;
233 Int_t iEMCAL = 1;
234 Int_t iVZERO = 1;
235 Int_t iACORDE = 1;
236 Int_t iAD = 0;
237
238 //=================== Alice BODY parameters =============================
239 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
240
241
242 if (iMAG)
243 {
244 //=================== MAG parameters ============================
245 // --- Start with Magnet since detector layouts may be depending ---
246 // --- on the selected Magnet dimensions ---
247 AliMAG *MAG = new AliMAG("MAG", "Magnet");
248 }
249
250
251 if (iABSO)
252 {
253 //=================== ABSO parameters ============================
254 AliABSO *ABSO = new AliABSOv3("ABSO", "Muon Absorber");
255 }
256
257 if (iDIPO)
258 {
259 //=================== DIPO parameters ============================
260
261 AliDIPO *DIPO = new AliDIPOv3("DIPO", "Dipole version 3");
262 }
263
264 if (iHALL)
265 {
266 //=================== HALL parameters ============================
267
268 AliHALL *HALL = new AliHALLv3("HALL", "Alice Hall");
269 }
270
271
272 if (iFRAME)
273 {
274 //=================== FRAME parameters ============================
275
276 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
277 FRAME->SetHoles(1);
278 }
279
280 if (iSHIL)
281 {
282 //=================== SHIL parameters ============================
283
284 AliSHIL *SHIL = new AliSHILv3("SHIL", "Shielding Version 3");
285 }
286
287
288 if (iPIPE)
289 {
290 //=================== PIPE parameters ============================
291
292 AliPIPE *PIPE = new AliPIPEv3("PIPE", "Beam Pipe");
293 }
294
295 if (iITS)
296 {
297 //=================== ITS parameters ============================
298
299 AliITS *ITS = new AliITSv11("ITS","ITS v11");
300 }
301
302 if (iTPC)
303 {
304 //============================ TPC parameters =====================
305 AliTPC *TPC = new AliTPCv2("TPC", "Default");
306 }
307
308
309 if (iTOF) {
310 //=================== TOF parameters ============================
311 AliTOF *TOF = new AliTOFv6T0("TOF", "normal TOF");
312 }
313
314
315 if (iHMPID)
316 {
317 //=================== HMPID parameters ===========================
318 AliHMPID *HMPID = new AliHMPIDv3("HMPID", "normal HMPID");
319
320 }
321
322
323 if (iZDC)
324 {
325 //=================== ZDC parameters ============================
326
327 AliZDC *ZDC = new AliZDCv4("ZDC", "normal ZDC");
328 }
329
330 if (iTRD)
331 {
332 //=================== TRD parameters ============================
333
334 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
335 }
336
337 if (iFMD)
338 {
339 //=================== FMD parameters ============================
340 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
341 }
342
343 if (iMUON)
344 {
345 //=================== MUON parameters ===========================
346 // New MUONv1 version (geometry defined via builders)
347 AliMUON *MUON = new AliMUONv1("MUON", "default");
348 }
349 //=================== PHOS parameters ===========================
350
351 if (iPHOS)
352 {
5889a25e 353 AliPHOS *PHOS = new AliPHOSv1("PHOS", "Run1");
253e70f4 354 }
355
356
357 if (iPMD)
358 {
359 //=================== PMD parameters ============================
360 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
361 }
362
363 if (iT0)
364 {
365 //=================== T0 parameters ============================
366 AliT0 *T0 = new AliT0v1("T0", "T0 Detector");
367 }
368
369 if (iEMCAL)
370 {
371 //=================== EMCAL parameters ============================
372 AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "EMCAL_COMPLETEV1");
373 }
374
375 if (iACORDE)
376 {
377 //=================== ACORDE parameters ============================
378 AliACORDE *ACORDE = new AliACORDEv1("ACORDE", "normal ACORDE");
379 }
380
381 if (iVZERO)
382 {
383 //=================== VZERO parameters ============================
384 AliVZERO *VZERO = new AliVZEROv7("VZERO", "normal VZERO");
385 }
386
387 if (iAD)
388 {
389 //=================== AD parameters ============================
390 AliAD *AD = new AliADv1("AD", "normal AD test");
391 AD->SetADAToInstalled(kTRUE);
392 AD->SetADCToInstalled(kTRUE);
393 }
394
395
396}
397
398Float_t EtaToTheta(Float_t arg){
399 return (180./TMath::Pi())*2.*atan(exp(-arg));
400}
401
402
403
404AliGenerator* GeneratorFactory(PprRun_t srun) {
405 Int_t isw = 3;
406 if (srad == kNoGluonRadiation) isw = 0;
407
408
409 AliGenerator * gGener = 0x0;
410 switch (srun) {
411 case test50:
412 {
413 comment = comment.Append(":HIJINGparam test 50 particles");
414 AliGenHIJINGpara *gener = new AliGenHIJINGpara(50);
415 gener->SetMomentumRange(0, 999999.);
416 gener->SetPhiRange(0., 360.);
417 // Set pseudorapidity range from -8 to 8.
418 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
419 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
420 gener->SetThetaRange(thmin,thmax);
421 gGener=gener;
422 }
423 break;
9e75bcab 424 case testdEdx:
425 {
426 // generator for the dEdx simulation study
427 gSystem->Getenv("TestdEdxNTracks");
428 Int_t ntracks =50;
a9660700 429 AliGenCocktail *generCocktail = new AliGenCocktail();
9e75bcab 430 if (gSystem->Getenv("TestdEdxNTracks")) ntracks= atoi(gSystem->Getenv("TestdEdxNTracks"));
431 comment = comment.Append(":HIJINGparam test N particles");
a9660700 432 generCocktail->SetMomentumRange(0, 999999.);
433 generCocktail->SetPhiRange(0., 360.);
434
9e75bcab 435 // Set pseudorapidity range from -8 to 8.
436 Float_t thmin = EtaToTheta(2); // theta min. <---> eta max
437 Float_t thmax = EtaToTheta(-2); // theta max. <---> eta min
a9660700 438 generCocktail->SetThetaRange(thmin,thmax);
439 //
440 AliGenHIJINGpara *generHijing = new AliGenHIJINGpara(ntracks);
441 generHijing->SetThetaRange(thmin,thmax);
442 generCocktail->AddGenerator(generHijing,"Hijing param", 1);
443 AliGenBox *generEl = new AliGenBox(0.2*ntracks);
444 generEl->SetThetaRange(thmin,thmax);
445 generEl->SetMomentumRange(0.2,1.);
446 generEl->SetPart(kElectron);
447 generCocktail->AddGenerator(generEl,"GENBOX Electrons for the dEdx study",1);
448 gGener=generCocktail;
9e75bcab 449 }
450 break;
451
253e70f4 452 case kParam_8000:
453 {
454 comment = comment.Append(":HIJINGparam N=8000");
455 AliGenHIJINGpara *gener = new AliGenHIJINGpara(86030);
456 gener->SetMomentumRange(0, 999999.);
457 gener->SetPhiRange(0., 360.);
458 // Set pseudorapidity range from -8 to 8.
459 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
460 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
461 gener->SetThetaRange(thmin,thmax);
462 gGener=gener;
463 }
464 break;
465 case kParam_4000:
466 {
467 comment = comment.Append("HIJINGparam N=4000");
468 AliGenHIJINGpara *gener = new AliGenHIJINGpara(43015);
469 gener->SetMomentumRange(0, 999999.);
470 gener->SetPhiRange(0., 360.);
471 // Set pseudorapidity range from -8 to 8.
472 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
473 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
474 gener->SetThetaRange(thmin,thmax);
475 gGener=gener;
476 }
477 break;
478 case kParam_2000:
479 {
480 comment = comment.Append("HIJINGparam N=2000");
481 AliGenHIJINGpara *gener = new AliGenHIJINGpara(21507);
482 gener->SetMomentumRange(0, 999999.);
483 gener->SetPhiRange(0., 360.);
484 // Set pseudorapidity range from -8 to 8.
485 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
486 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
487 gener->SetThetaRange(thmin,thmax);
488 gGener=gener;
489 }
490 break;
491//
492// Hijing Central
493//
494 case kHijing_cent1:
495 {
496 comment = comment.Append("HIJING cent1");
497 AliGenHijing *gener = HijingStandard();
498// impact parameter range
499 gener->SetImpactParameterRange(0., 5.);
500 gGener=gener;
501 }
502 break;
503 case kHijing_cent2:
504 {
505 comment = comment.Append("HIJING cent2");
506 AliGenHijing *gener = HijingStandard();
507// impact parameter range
508 gener->SetImpactParameterRange(0., 2.);
509 gGener=gener;
510 }
511 break;
512//
513// Hijing Peripheral
514//
515 case kHijing_per1:
516 {
517 comment = comment.Append("HIJING per1");
518 AliGenHijing *gener = HijingStandard();
519// impact parameter range
520 gener->SetImpactParameterRange(5., 8.6);
521 gGener=gener;
522 }
523 break;
524 case kHijing_per2:
525 {
526 comment = comment.Append("HIJING per2");
527 AliGenHijing *gener = HijingStandard();
528// impact parameter range
529 gener->SetImpactParameterRange(8.6, 11.2);
530 gGener=gener;
531 }
532 break;
533 case kHijing_per3:
534 {
535 comment = comment.Append("HIJING per3");
536 AliGenHijing *gener = HijingStandard();
537// impact parameter range
538 gener->SetImpactParameterRange(11.2, 13.2);
539 gGener=gener;
540 }
541 break;
542 case kHijing_per4:
543 {
544 comment = comment.Append("HIJING per4");
545 AliGenHijing *gener = HijingStandard();
546// impact parameter range
547 gener->SetImpactParameterRange(13.2, 15.);
548 gGener=gener;
549 }
550 break;
551 case kHijing_per5:
552 {
553 comment = comment.Append("HIJING per5");
554 AliGenHijing *gener = HijingStandard();
555// impact parameter range
556 gener->SetImpactParameterRange(15., 100.);
557 gGener=gener;
558 }
559 break;
560//
561// Jet-Jet
562//
563 case kHijing_jj25:
564 {
565 comment = comment.Append("HIJING Jet 25 GeV");
566 AliGenHijing *gener = HijingStandard();
567// impact parameter range
568 gener->SetImpactParameterRange(0., 5.);
569 // trigger
570 gener->SetTrigger(1);
571 gener->SetPtJet(25.);
572 gener->SetRadiation(isw);
573 gener->SetSimpleJets(!isw);
574 gener->SetJetEtaRange(-0.3,0.3);
575 gener->SetJetPhiRange(75., 165.);
576 gGener=gener;
577 }
578 break;
579
580 case kHijing_jj50:
581 {
582 comment = comment.Append("HIJING Jet 50 GeV");
583 AliGenHijing *gener = HijingStandard();
584// impact parameter range
585 gener->SetImpactParameterRange(0., 5.);
586 // trigger
587 gener->SetTrigger(1);
588 gener->SetPtJet(50.);
589 gener->SetRadiation(isw);
590 gener->SetSimpleJets(!isw);
591 gener->SetJetEtaRange(-0.3,0.3);
592 gener->SetJetPhiRange(75., 165.);
593 gGener=gener;
594 }
595 break;
596
597 case kHijing_jj75:
598 {
599 comment = comment.Append("HIJING Jet 75 GeV");
600 AliGenHijing *gener = HijingStandard();
601// impact parameter range
602 gener->SetImpactParameterRange(0., 5.);
603 // trigger
604 gener->SetTrigger(1);
605 gener->SetPtJet(75.);
606 gener->SetRadiation(isw);
607 gener->SetSimpleJets(!isw);
608 gener->SetJetEtaRange(-0.3,0.3);
609 gener->SetJetPhiRange(75., 165.);
610 gGener=gener;
611 }
612 break;
613
614 case kHijing_jj100:
615 {
616 comment = comment.Append("HIJING Jet 100 GeV");
617 AliGenHijing *gener = HijingStandard();
618// impact parameter range
619 gener->SetImpactParameterRange(0., 5.);
620 // trigger
621 gener->SetTrigger(1);
622 gener->SetPtJet(100.);
623 gener->SetRadiation(isw);
624 gener->SetSimpleJets(!isw);
625 gener->SetJetEtaRange(-0.3,0.3);
626 gener->SetJetPhiRange(75., 165.);
627 gGener=gener;
628 }
629 break;
630
631 case kHijing_jj200:
632 {
633 comment = comment.Append("HIJING Jet 200 GeV");
634 AliGenHijing *gener = HijingStandard();
635// impact parameter range
636 gener->SetImpactParameterRange(0., 5.);
637 // trigger
638 gener->SetTrigger(1);
639 gener->SetPtJet(200.);
640 gener->SetRadiation(isw);
641 gener->SetSimpleJets(!isw);
642 gener->SetJetEtaRange(-0.3,0.3);
643 gener->SetJetPhiRange(75., 165.);
644 gGener=gener;
645 }
646 break;
647//
648// Gamma-Jet
649//
650 case kHijing_gj25:
651 {
652 comment = comment.Append("HIJING Gamma 25 GeV");
653 AliGenHijing *gener = HijingStandard();
654// impact parameter range
655 gener->SetImpactParameterRange(0., 5.);
656 // trigger
657 gener->SetTrigger(2);
658 gener->SetPtJet(25.);
659 gener->SetRadiation(isw);
660 gener->SetSimpleJets(!isw);
661 gener->SetJetEtaRange(-0.12, 0.12);
662 gener->SetJetPhiRange(220., 320.);
663 gGener=gener;
664 }
665 break;
666
667 case kHijing_gj50:
668 {
669 comment = comment.Append("HIJING Gamma 50 GeV");
670 AliGenHijing *gener = HijingStandard();
671// impact parameter range
672 gener->SetImpactParameterRange(0., 5.);
673 // trigger
674 gener->SetTrigger(2);
675 gener->SetPtJet(50.);
676 gener->SetRadiation(isw);
677 gener->SetSimpleJets(!isw);
678 gener->SetJetEtaRange(-0.12, 0.12);
679 gener->SetJetPhiRange(220., 320.);
680 gGener=gener;
681 }
682 break;
683
684 case kHijing_gj75:
685 {
686 comment = comment.Append("HIJING Gamma 75 GeV");
687 AliGenHijing *gener = HijingStandard();
688// impact parameter range
689 gener->SetImpactParameterRange(0., 5.);
690 // trigger
691 gener->SetTrigger(2);
692 gener->SetPtJet(75.);
693 gener->SetRadiation(isw);
694 gener->SetSimpleJets(!isw);
695 gener->SetJetEtaRange(-0.12, 0.12);
696 gener->SetJetPhiRange(220., 320.);
697 gGener=gener;
698 }
699 break;
700
701 case kHijing_gj100:
702 {
703 comment = comment.Append("HIJING Gamma 100 GeV");
704 AliGenHijing *gener = HijingStandard();
705// impact parameter range
706 gener->SetImpactParameterRange(0., 5.);
707 // trigger
708 gener->SetTrigger(2);
709 gener->SetPtJet(100.);
710 gener->SetRadiation(isw);
711 gener->SetSimpleJets(!isw);
712 gener->SetJetEtaRange(-0.12, 0.12);
713 gener->SetJetPhiRange(220., 320.);
714 gGener=gener;
715 }
716 break;
717
718 case kHijing_gj200:
719 {
720 comment = comment.Append("HIJING Gamma 200 GeV");
721 AliGenHijing *gener = HijingStandard();
722// impact parameter range
723 gener->SetImpactParameterRange(0., 5.);
724 // trigger
725 gener->SetTrigger(2);
726 gener->SetPtJet(200.);
727 gener->SetRadiation(isw);
728 gener->SetSimpleJets(!isw);
729 gener->SetJetEtaRange(-0.12, 0.12);
730 gener->SetJetPhiRange(220., 320.);
731 gGener=gener;
732 }
733 break;
734 case kHijing_pA:
735 {
736 comment = comment.Append("HIJING pA");
737
738 AliGenCocktail *gener = new AliGenCocktail();
739
740 AliGenHijing *hijing = new AliGenHijing(-1);
741// centre of mass energy
742 hijing->SetEnergyCMS(TMath::Sqrt(82./208.) * 14000.);
743// impact parameter range
744 hijing->SetImpactParameterRange(0., 15.);
745// reference frame
746 hijing->SetReferenceFrame("CMS");
747 hijing->SetBoostLHC(1);
748// projectile
749 hijing->SetProjectile("P", 1, 1);
750 hijing->SetTarget ("A", 208, 82);
751// tell hijing to keep the full parent child chain
752 hijing->KeepFullEvent();
753// enable jet quenching
754 hijing->SetJetQuenching(0);
755// enable shadowing
756 hijing->SetShadowing(1);
757// Don't track spectators
758 hijing->SetSpectators(0);
759// kinematic selection
760 hijing->SetSelectAll(0);
761//
762 AliGenSlowNucleons* gray = new AliGenSlowNucleons(1);
763 AliSlowNucleonModel* model = new AliSlowNucleonModelExp();
764 gray->SetSlowNucleonModel(model);
765 gray->SetDebug(1);
766 gener->AddGenerator(hijing,"Hijing pPb", 1);
767 gener->AddGenerator(gray, "Gray Particles",1);
768 gGener=gener;
769 }
770 break;
771 case kPythia6:
772 {
773 comment = comment.Append(":Pythia p-p @ 14 TeV");
774 AliGenPythia *gener = new AliGenPythia(-1);
775 gener->SetMomentumRange(0,999999);
776 gener->SetThetaRange(0., 180.);
777 gener->SetYRange(-12,12);
778 gener->SetPtRange(0,1000);
779 gener->SetProcess(kPyMb);
780 gener->SetEnergyCMS(14000.);
781 gener->SetProjectile("p", 1, 1) ;
782 gener->SetTarget("p", 1, 1) ;
783 gGener=gener;
784 }
785 break;
786 case kPythia6Jets20_24:
787 {
788 comment = comment.Append(":Pythia jets 20-24 GeV @ 5.5 TeV");
789 AliGenPythia * gener = new AliGenPythia(-1);
790 gener->SetEnergyCMS(5500.);// Centre of mass energy
791 gener->SetProcess(kPyJets);// Process type
792 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
793 gener->SetJetPhiRange(0., 360.);
794 gener->SetJetEtRange(10., 1000.);
795 gener->SetGluonRadiation(1,1);
796 // gener->SetPtKick(0.);
797 // Structure function
798 gener->SetStrucFunc(kCTEQ4L);
799 gener->SetPtHard(20., 24.);// Pt transfer of the hard scattering
800 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
801 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
802 gener->SetProjectile("p", 1, 1) ;
803 gener->SetTarget("p", 1, 1) ;
804 gGener=gener;
805 }
806 break;
807 case kPythia6Jets24_29:
808 {
809 comment = comment.Append(":Pythia jets 24-29 GeV @ 5.5 TeV");
810 AliGenPythia * gener = new AliGenPythia(-1);
811 gener->SetEnergyCMS(5500.);// Centre of mass energy
812 gener->SetProcess(kPyJets);// Process type
813 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
814 gener->SetJetPhiRange(0., 360.);
815 gener->SetJetEtRange(10., 1000.);
816 gener->SetGluonRadiation(1,1);
817 // gener->SetPtKick(0.);
818 // Structure function
819 gener->SetStrucFunc(kCTEQ4L);
820 gener->SetPtHard(24., 29.);// Pt transfer of the hard scattering
821 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
822 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
823 gener->SetProjectile("p", 1, 1) ;
824 gener->SetTarget("p", 1, 1) ;
825 gGener=gener;
826 }
827 break;
828 case kPythia6Jets29_35:
829 {
830 comment = comment.Append(":Pythia jets 29-35 GeV @ 5.5 TeV");
831 AliGenPythia * gener = new AliGenPythia(-1);
832 gener->SetEnergyCMS(5500.);// Centre of mass energy
833 gener->SetProcess(kPyJets);// Process type
834 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
835 gener->SetJetPhiRange(0., 360.);
836 gener->SetJetEtRange(10., 1000.);
837 gener->SetGluonRadiation(1,1);
838 // gener->SetPtKick(0.);
839 // Structure function
840 gener->SetStrucFunc(kCTEQ4L);
841 gener->SetPtHard(29., 35.);// Pt transfer of the hard scattering
842 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
843 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
844 gener->SetProjectile("p", 1, 1) ;
845 gener->SetTarget("p", 1, 1) ;
846 gGener=gener;
847 }
848 break;
849 case kPythia6Jets35_42:
850 {
851 comment = comment.Append(":Pythia jets 35-42 GeV @ 5.5 TeV");
852 AliGenPythia * gener = new AliGenPythia(-1);
853 gener->SetEnergyCMS(5500.);// Centre of mass energy
854 gener->SetProcess(kPyJets);// Process type
855 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
856 gener->SetJetPhiRange(0., 360.);
857 gener->SetJetEtRange(10., 1000.);
858 gener->SetGluonRadiation(1,1);
859 // gener->SetPtKick(0.);
860 // Structure function
861 gener->SetStrucFunc(kCTEQ4L);
862 gener->SetPtHard(35., 42.);// Pt transfer of the hard scattering
863 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
864 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
865 gener->SetProjectile("p", 1, 1) ;
866 gener->SetTarget("p", 1, 1) ;
867 gGener=gener;
868 }
869 break;
870 case kPythia6Jets42_50:
871 {
872 comment = comment.Append(":Pythia jets 42-50 GeV @ 5.5 TeV");
873 AliGenPythia * gener = new AliGenPythia(-1);
874 gener->SetEnergyCMS(5500.);// Centre of mass energy
875 gener->SetProcess(kPyJets);// Process type
876 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
877 gener->SetJetPhiRange(0., 360.);
878 gener->SetJetEtRange(10., 1000.);
879 gener->SetGluonRadiation(1,1);
880 // gener->SetPtKick(0.);
881 // Structure function
882 gener->SetStrucFunc(kCTEQ4L);
883 gener->SetPtHard(42., 50.);// Pt transfer of the hard scattering
884 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
885 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
886 gener->SetProjectile("p", 1, 1) ;
887 gener->SetTarget("p", 1, 1) ;
888 gGener=gener;
889 }
890 break;
891 case kPythia6Jets50_60:
892 {
893 comment = comment.Append(":Pythia jets 50-60 GeV @ 5.5 TeV");
894 AliGenPythia * gener = new AliGenPythia(-1);
895 gener->SetEnergyCMS(5500.);// Centre of mass energy
896 gener->SetProcess(kPyJets);// Process type
897 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
898 gener->SetJetPhiRange(0., 360.);
899 gener->SetJetEtRange(10., 1000.);
900 gener->SetGluonRadiation(1,1);
901 // gener->SetPtKick(0.);
902 // Structure function
903 gener->SetStrucFunc(kCTEQ4L);
904 gener->SetPtHard(50., 60.);// Pt transfer of the hard scattering
905 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
906 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
907 gGener=gener;
908 }
909 break;
910 case kPythia6Jets60_72:
911 {
912 comment = comment.Append(":Pythia jets 60-72 GeV @ 5.5 TeV");
913 AliGenPythia * gener = new AliGenPythia(-1);
914 gener->SetEnergyCMS(5500.);// Centre of mass energy
915 gener->SetProcess(kPyJets);// Process type
916 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
917 gener->SetJetPhiRange(0., 360.);
918 gener->SetJetEtRange(10., 1000.);
919 gener->SetGluonRadiation(1,1);
920 // gener->SetPtKick(0.);
921 // Structure function
922 gener->SetStrucFunc(kCTEQ4L);
923 gener->SetPtHard(60., 72.);// Pt transfer of the hard scattering
924 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
925 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
926 gener->SetProjectile("p", 1, 1) ;
927 gener->SetTarget("p", 1, 1) ;
928 gGener=gener;
929 }
930 break;
931 case kPythia6Jets72_86:
932 {
933 comment = comment.Append(":Pythia jets 72-86 GeV @ 5.5 TeV");
934 AliGenPythia * gener = new AliGenPythia(-1);
935 gener->SetEnergyCMS(5500.);// Centre of mass energy
936 gener->SetProcess(kPyJets);// Process type
937 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
938 gener->SetJetPhiRange(0., 360.);
939 gener->SetJetEtRange(10., 1000.);
940 gener->SetGluonRadiation(1,1);
941 // gener->SetPtKick(0.);
942 // Structure function
943 gener->SetStrucFunc(kCTEQ4L);
944 gener->SetPtHard(72., 86.);// Pt transfer of the hard scattering
945 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
946 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
947 gener->SetProjectile("p", 1, 1) ;
948 gener->SetTarget("p", 1, 1) ;
949 gGener=gener;
950 }
951 break;
952 case kPythia6Jets86_104:
953 {
954 comment = comment.Append(":Pythia jets 86-104 GeV @ 5.5 TeV");
955 AliGenPythia * gener = new AliGenPythia(-1);
956 gener->SetEnergyCMS(5500.);// Centre of mass energy
957 gener->SetProcess(kPyJets);// Process type
958 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
959 gener->SetJetPhiRange(0., 360.);
960 gener->SetJetEtRange(10., 1000.);
961 gener->SetGluonRadiation(1,1);
962 // gener->SetPtKick(0.);
963 // Structure function
964 gener->SetStrucFunc(kCTEQ4L);
965 gener->SetPtHard(86., 104.);// Pt transfer of the hard scattering
966 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
967 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
968 gener->SetProjectile("p", 1, 1) ;
969 gener->SetTarget("p", 1, 1) ;
970 gGener=gener;
971 }
972 break;
973 case kPythia6Jets104_125:
974 {
975 comment = comment.Append(":Pythia jets 105-125 GeV @ 5.5 TeV");
976 AliGenPythia * gener = new AliGenPythia(-1);
977 gener->SetEnergyCMS(5500.);// Centre of mass energy
978 gener->SetProcess(kPyJets);// Process type
979 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
980 gener->SetJetPhiRange(0., 360.);
981 gener->SetJetEtRange(10., 1000.);
982 gener->SetGluonRadiation(1,1);
983 // gener->SetPtKick(0.);
984 // Structure function
985 gener->SetStrucFunc(kCTEQ4L);
986 gener->SetPtHard(104., 125.);// Pt transfer of the hard scattering
987 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
988 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
989 gener->SetProjectile("p", 1, 1) ;
990 gener->SetTarget("p", 1, 1) ;
991 gGener=gener;
992 }
993 break;
994 case kPythia6Jets125_150:
995 {
996 comment = comment.Append(":Pythia jets 125-150 GeV @ 5.5 TeV");
997 AliGenPythia * gener = new AliGenPythia(-1);
998 gener->SetEnergyCMS(5500.);// Centre of mass energy
999 gener->SetProcess(kPyJets);// Process type
1000 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
1001 gener->SetJetPhiRange(0., 360.);
1002 gener->SetJetEtRange(10., 1000.);
1003 gener->SetGluonRadiation(1,1);
1004 // gener->SetPtKick(0.);
1005 // Structure function
1006 gener->SetStrucFunc(kCTEQ4L);
1007 gener->SetPtHard(125., 150.);// Pt transfer of the hard scattering
1008 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
1009 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
1010 gGener=gener;
1011 }
1012 break;
1013 case kPythia6Jets150_180:
1014 {
1015 comment = comment.Append(":Pythia jets 150-180 GeV @ 5.5 TeV");
1016 AliGenPythia * gener = new AliGenPythia(-1);
1017 gener->SetEnergyCMS(5500.);// Centre of mass energy
1018 gener->SetProcess(kPyJets);// Process type
1019 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
1020 gener->SetJetPhiRange(0., 360.);
1021 gener->SetJetEtRange(10., 1000.);
1022 gener->SetGluonRadiation(1,1);
1023 // gener->SetPtKick(0.);
1024 // Structure function
1025 gener->SetStrucFunc(kCTEQ4L);
1026 gener->SetPtHard(150., 180.);// Pt transfer of the hard scattering
1027 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
1028 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
1029 gener->SetProjectile("p", 1, 1) ;
1030 gener->SetTarget("p", 1, 1) ;
1031 gGener=gener;
1032 }
1033 break;
1034 case kD0PbPb5500:
1035 {
1036 comment = comment.Append(" D0 in Pb-Pb at 5.5 TeV");
1037 AliGenPythia * gener = new AliGenPythia(10);
1038 gener->SetProcess(kPyD0PbPbMNR);
1039 gener->SetStrucFunc(kCTEQ4L);
1040 gener->SetPtHard(2.1,-1.0);
1041 gener->SetEnergyCMS(5500.);
1042 gener->SetNuclei(208,208);
1043 gener->SetForceDecay(kHadronicD);
1044 gener->SetYRange(-2,2);
1045 gener->SetFeedDownHigherFamily(kFALSE);
1046 gener->SetStackFillOpt(AliGenPythia::kParentSelection);
1047 gener->SetCountMode(AliGenPythia::kCountParents);
1048 gener->SetProjectile("A", 208, 82) ;
1049 gener->SetTarget("A", 208, 82) ;
1050 gGener=gener;
1051 }
1052 break;
1053 case kCharmSemiElPbPb5500:
1054 {
1055 comment = comment.Append(" Charm in Pb-Pb at 5.5 TeV");
1056 AliGenPythia * gener = new AliGenPythia(10);
1057 gener->SetProcess(kPyCharmPbPbMNR);
1058 gener->SetStrucFunc(kCTEQ4L);
1059 gener->SetPtHard(2.1,-1.0);
1060 gener->SetEnergyCMS(5500.);
1061 gener->SetNuclei(208,208);
1062 gener->SetForceDecay(kSemiElectronic);
1063 gener->SetYRange(-2,2);
1064 gener->SetFeedDownHigherFamily(kFALSE);
1065 gener->SetCountMode(AliGenPythia::kCountParents);
1066 gener->SetProjectile("A", 208, 82) ;
1067 gener->SetTarget("A", 208, 82) ;
1068 gGener=gener;
1069 }
1070 break;
1071 case kBeautySemiElPbPb5500:
1072 {
1073 comment = comment.Append(" Beauty in Pb-Pb at 5.5 TeV");
1074 AliGenPythia *gener = new AliGenPythia(10);
1075 gener->SetProcess(kPyBeautyPbPbMNR);
1076 gener->SetStrucFunc(kCTEQ4L);
1077 gener->SetPtHard(2.75,-1.0);
1078 gener->SetEnergyCMS(5500.);
1079 gener->SetNuclei(208,208);
1080 gener->SetForceDecay(kSemiElectronic);
1081 gener->SetYRange(-2,2);
1082 gener->SetFeedDownHigherFamily(kFALSE);
1083 gener->SetCountMode(AliGenPythia::kCountParents);
1084 gener->SetProjectile("A", 208, 82) ;
1085 gener->SetTarget("A", 208, 82) ;
1086 gGener=gener;
1087 }
1088 break;
1089 case kCocktailTRD:
1090 {
1091 comment = comment.Append(" Cocktail for TRD at 5.5 TeV");
1092 AliGenCocktail *gener = new AliGenCocktail();
1093
1094 AliGenParam *phi = new AliGenParam(10,
1095 new AliGenMUONlib(),
1096 AliGenMUONlib::kPhi,
1097 "Vogt PbPb");
1098
1099 phi->SetPtRange(0, 100);
1100 phi->SetYRange(-1., +1.);
1101 phi->SetForceDecay(kDiElectron);
1102
1103 AliGenParam *omega = new AliGenParam(10,
1104 new AliGenMUONlib(),
1105 AliGenMUONlib::kOmega,
1106 "Vogt PbPb");
1107
1108 omega->SetPtRange(0, 100);
1109 omega->SetYRange(-1., +1.);
1110 omega->SetForceDecay(kDiElectron);
1111
1112 AliGenParam *jpsi = new AliGenParam(10,
1113 new AliGenMUONlib(),
1114 AliGenMUONlib::kJpsiFamily,
1115 "Vogt PbPb");
1116
1117 jpsi->SetPtRange(0, 100);
1118 jpsi->SetYRange(-1., +1.);
1119 jpsi->SetForceDecay(kDiElectron);
1120
1121 AliGenParam *ups = new AliGenParam(10,
1122 new AliGenMUONlib(),
1123 AliGenMUONlib::kUpsilonFamily,
1124 "Vogt PbPb");
1125 ups->SetPtRange(0, 100);
1126 ups->SetYRange(-1., +1.);
1127 ups->SetForceDecay(kDiElectron);
1128
1129 AliGenParam *charm = new AliGenParam(10,
1130 new AliGenMUONlib(),
1131 AliGenMUONlib::kCharm,
1132 "central");
1133 charm->SetPtRange(0, 100);
1134 charm->SetYRange(-1.5, +1.5);
1135 charm->SetForceDecay(kSemiElectronic);
1136
1137
1138 AliGenParam *beauty = new AliGenParam(10,
1139 new AliGenMUONlib(),
1140 AliGenMUONlib::kBeauty,
1141 "central");
1142 beauty->SetPtRange(0, 100);
1143 beauty->SetYRange(-1.5, +1.5);
1144 beauty->SetForceDecay(kSemiElectronic);
1145
1146 AliGenParam *beautyJ = new AliGenParam(10,
1147 new AliGenMUONlib(),
1148 AliGenMUONlib::kBeauty,
1149 "central");
1150 beautyJ->SetPtRange(0, 100);
1151 beautyJ->SetYRange(-1.5, +1.5);
1152 beautyJ->SetForceDecay(kBJpsiDiElectron);
1153
1154 gener->AddGenerator(phi,"Phi",1);
1155 gener->AddGenerator(omega,"Omega",1);
1156 gener->AddGenerator(jpsi,"J/psi",1);
1157 gener->AddGenerator(ups,"Upsilon",1);
1158 gener->AddGenerator(charm,"Charm",1);
1159 gener->AddGenerator(beauty,"Beauty",1);
1160 gener->AddGenerator(beautyJ,"J/Psi from Beauty",1);
1161 gener->SetProjectile("A", 208, 82) ;
1162 gener->SetTarget("A", 208, 82) ;
1163 gGener=gener;
1164 }
1165 break;
1166 case kPyJJ:
1167 {
1168 comment = comment.Append(" Jet-jet at 5.5 TeV");
1169 AliGenPythia *gener = new AliGenPythia(-1);
1170 gener->SetEnergyCMS(5500.);
1171 gener->SetProcess(kPyJets);
1172 Double_t ptHardMin=10.0, ptHardMax=-1.0;
1173 gener->SetPtHard(ptHardMin,ptHardMax);
1174 gener->SetYHard(-0.7,0.7);
1175 gener->SetJetEtaRange(-0.2,0.2);
1176 gener->SetEventListRange(0,1);
1177 gener->SetProjectile("p", 1, 1) ;
1178 gener->SetTarget("p", 1, 1) ;
1179 gGener=gener;
1180 }
1181 break;
1182 case kPyGJ:
1183 {
1184 comment = comment.Append(" Gamma-jet at 5.5 TeV");
1185 AliGenPythia *gener = new AliGenPythia(-1);
1186 gener->SetEnergyCMS(5500.);
1187 gener->SetProcess(kPyDirectGamma);
1188 Double_t ptHardMin=10.0, ptHardMax=-1.0;
1189 gener->SetPtHard(ptHardMin,ptHardMax);
1190 gener->SetYHard(-1.0,1.0);
1191 gener->SetGammaEtaRange(-0.13,0.13);
1192 gener->SetGammaPhiRange(210.,330.);
1193 gener->SetEventListRange(0,1);
1194 gener->SetProjectile("p", 1, 1) ;
1195 gener->SetTarget("p", 1, 1) ;
1196 gGener=gener;
1197 }
1198 break;
1199 case kMuonCocktailCent1:
1200 {
1201 comment = comment.Append(" Muon Cocktail Cent1");
1202 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1203 gener->SetPtRange(0.4,100.); // Transverse momentum range
1204 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1205 gener->SetYRange(-4.0,-2.4);
1206 gener->SetMuonPtCut(0.8);
1207 gener->SetMuonThetaCut(171.,178.);
1208 gener->SetMuonMultiplicity(2);
1209 gener->SetImpactParameterRange(0.,5.); //Centrality class Cent1 for PDC04
1210 gGener=gener;
1211 gener->SetProjectile("A", 208, 82) ;
1212 gener->SetTarget("A", 208, 82) ;
1213 }
1214 break;
1215 case kMuonCocktailPer1:
1216 {
1217 comment = comment.Append(" Muon Cocktail Per1");
1218 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1219 gener->SetPtRange(0.0,100.); // Transverse momentum range
1220 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1221 gener->SetYRange(-4.0,-2.4);
1222 gener->SetMuonPtCut(0.8);
1223 gener->SetMuonThetaCut(171.,178.);
1224 gener->SetMuonMultiplicity(2);
1225 gener->SetImpactParameterRange(5.,8.6);//Centrality class Per1 for PDC04
1226 gener->SetProjectile("A", 208, 82) ;
1227 gener->SetTarget("A", 208, 82) ;
1228 gGener=gener;
1229 }
1230 break;
1231 case kMuonCocktailPer4:
1232 {
1233 comment = comment.Append(" Muon Cocktail Per4");
1234 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1235 gener->SetPtRange(0.0,100.); // Transverse momentum range
1236 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1237 gener->SetYRange(-4.0,-2.4);
1238 gener->SetMuonPtCut(0.8);
1239 gener->SetMuonThetaCut(171.,178.);
1240 gener->SetMuonMultiplicity(2);
1241 gener->SetImpactParameterRange(13.2,15.0);//Centrality class Per4 for PDC04
1242 gener->SetProjectile("A", 208, 82) ;
1243 gener->SetTarget("A", 208, 82) ;
1244 gGener=gener;
1245 }
1246 break;
1247 case kMuonCocktailCent1HighPt:
1248 {
1249 comment = comment.Append(" Muon Cocktail HighPt Cent1");
1250 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1251 gener->SetPtRange(0.0,100.); // Transverse momentum range
1252 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1253 gener->SetYRange(-4.0,-2.4);
1254 gener->SetMuonPtCut(2.5);
1255 gener->SetMuonThetaCut(171.,178.);
1256 gener->SetMuonMultiplicity(2);
1257 gener->SetImpactParameterRange(0.,5.); //Centrality class Cent1 for PDC04
1258 gener->SetProjectile("A", 208, 82) ;
1259 gener->SetTarget("A", 208, 82) ;
1260 gGener=gener;
1261 }
1262 break;
1263 case kMuonCocktailPer1HighPt :
1264 {
1265 comment = comment.Append(" Muon Cocktail HighPt Per1");
1266 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1267 gener->SetPtRange(0.0,100.); // Transverse momentum range
1268 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1269 gener->SetYRange(-4.0,-2.4);
1270 gener->SetMuonPtCut(2.5);
1271 gener->SetMuonThetaCut(171.,178.);
1272 gener->SetMuonMultiplicity(2);
1273 gener->SetImpactParameterRange(5.,8.6);//Centrality class Per1 for PDC04
1274 gener->SetProjectile("A", 208, 82) ;
1275 gener->SetTarget("A", 208, 82) ;
1276 gGener=gener;
1277 }
1278 break;
1279 case kMuonCocktailPer4HighPt:
1280 {
1281 comment = comment.Append(" Muon Cocktail HighPt Per4");
1282 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1283 gener->SetPtRange(0.0,100.); // Transverse momentum range
1284 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1285 gener->SetYRange(-4.0,-2.4);
1286 gener->SetMuonPtCut(2.5);
1287 gener->SetMuonThetaCut(171.,178.);
1288 gener->SetMuonMultiplicity(2);
1289 gener->SetImpactParameterRange(13.2,15.0);//Centrality class Per4 for PDC04
1290 gener->SetProjectile("A", 208, 82) ;
1291 gener->SetTarget("A", 208, 82) ;
1292 gGener=gener;
1293 }
1294 break;
1295 case kMuonCocktailCent1Single:
1296 {
1297 comment = comment.Append(" Muon Cocktail Single Cent1");
1298 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1299 gener->SetPtRange(0.0,100.); // Transverse momentum range
1300 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1301 gener->SetYRange(-4.0,-2.4);
1302 gener->SetMuonPtCut(0.8);
1303 gener->SetMuonThetaCut(171.,178.);
1304 gener->SetMuonMultiplicity(1);
1305 gener->SetImpactParameterRange(0.,5.); //Centrality class Cent1 for PDC04
1306 gener->SetProjectile("A", 208, 82) ;
1307 gener->SetTarget("A", 208, 82) ;
1308 gGener=gener;
1309 }
1310 break;
1311 case kMuonCocktailPer1Single :
1312 {
1313 comment = comment.Append(" Muon Cocktail Single Per1");
1314 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1315 gener->SetPtRange(0.0,100.); // Transverse momentum range
1316 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1317 gener->SetYRange(-4.0,-2.4);
1318 gener->SetMuonPtCut(0.8);
1319 gener->SetMuonThetaCut(171.,178.);
1320 gener->SetMuonMultiplicity(1);
1321 gener->SetImpactParameterRange(5.,8.6);//Centrality class Per1 for PDC04
1322 gener->SetNumberOfParticipants(229.3);//Centrality class Per1 for PDC04
1323 gener->SetProjectile("A", 208, 82) ;
1324 gener->SetTarget("A", 208, 82) ;
1325 gGener=gener;
1326 }
1327 break;
1328 case kMuonCocktailPer4Single:
1329 {
1330 comment = comment.Append(" Muon Cocktail Single Per4");
1331 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1332 gener->SetPtRange(0.0,100.); // Transverse momentum range
1333 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1334 gener->SetYRange(-4.0,-2.4);
1335 gener->SetMuonPtCut(0.8);
1336 gener->SetMuonThetaCut(171.,178.);
1337 gener->SetMuonMultiplicity(1);
1338 gener->SetImpactParameterRange(13.2,15.0);//Centrality class Per4 for PDC04
1339 gener->SetProjectile("A", 208, 82) ;
1340 gener->SetTarget("A", 208, 82) ;
1341 gGener=gener;
1342 }
1343 break;
1344 case kFlow_2_2000:
1345 {
1346 comment = comment.Append(" Flow with dN/deta = 2000, vn = 2%");
1347 gGener = GeVSimStandard(2000., 2.);
1348 }
1349 break;
1350
1351 case kFlow_10_2000:
1352 {
1353 comment = comment.Append(" Flow with dN/deta = 2000, vn = 10%");
1354 gGener = GeVSimStandard(2000., 10.);
1355 }
1356 break;
1357
1358 case kFlow_6_2000:
1359 {
1360 comment = comment.Append(" Flow with dN/deta = 2000, vn = 6%");
1361 gGener = GeVSimStandard(2000., 6.);
1362 }
1363 break;
1364
1365 case kFlow_6_5000:
1366 {
1367 comment = comment.Append(" Flow with dN/deta = 5000, vn = 6%");
1368 gGener = GeVSimStandard(5000., 6.);
1369 }
1370 break;
1371 case kHIJINGplus:
1372 {
1373 //
1374 // The cocktail
1375 AliGenCocktail *gener = new AliGenCocktail();
1376
1377 //
1378 // Charm production by Pythia
1379 AliGenPythia * genpyc = new AliGenPythia(230);
1380 genpyc->SetProcess(kPyCharmPbPbMNR);
1381 genpyc->SetStrucFunc(kCTEQ4L);
1382 genpyc->SetPtHard(2.1,-1.0);
1383 genpyc->SetEnergyCMS(5500.);
1384 genpyc->SetNuclei(208,208);
1385 genpyc->SetYRange(-999,999);
1386 genpyc->SetForceDecay(kAll);
1387 genpyc->SetFeedDownHigherFamily(kFALSE);
1388 genpyc->SetCountMode(AliGenPythia::kCountParents);
1389 //
1390 // Beauty production by Pythia
1391 AliGenPythia * genpyb = new AliGenPythia(9);
1392 genpyb->SetProcess(kPyBeautyPbPbMNR);
1393 genpyb->SetStrucFunc(kCTEQ4L);
1394 genpyb->SetPtHard(2.75,-1.0);
1395 genpyb->SetEnergyCMS(5500.);
1396 genpyb->SetNuclei(208,208);
1397 genpyb->SetYRange(-999,999);
1398 genpyb->SetForceDecay(kAll);
1399 genpyb->SetFeedDownHigherFamily(kFALSE);
1400 genpyb->SetCountMode(AliGenPythia::kCountParents);
1401 //
1402 // Hyperons
1403 //
1404 AliGenSTRANGElib *lib = new AliGenSTRANGElib();
1405 Int_t particle;
1406 // Xi
1407 particle = kXiMinus;
1408 AliGenParam *genXi = new AliGenParam(16,lib,particle);
1409 genXi->SetPtRange(0., 12.);
1410 genXi->SetYRange(-1.1, 1.1);
1411 genXi->SetForceDecay(kNoDecay);
1412
1413 //
1414 // Omega
1415 particle = kOmegaMinus;
1416 AliGenParam *genOmega = new AliGenParam(10,lib,particle);
1417 genOmega->SetPtRange(0, 12.);
1418 genOmega->SetYRange(-1.1, 1.1);
1419 genOmega->SetForceDecay(kNoDecay);
1420
1421 //
1422 // Central Hijing
1423 AliGenHijing *genHi = HijingStandard();
1424 genHi->SwitchOffHeavyQuarks(kTRUE);
1425 genHi->SetImpactParameterRange(0.,5.);
1426 //
1427 // Add everything to the cocktail and shake ...
1428 gener->AddGenerator(genHi, "Hijing cent1", 1);
1429 gener->AddGenerator(genpyc, "Extra charm", 1);
1430 gener->AddGenerator(genpyb, "Extra beauty", 1);
1431 gener->AddGenerator(genXi, "Xi" , 1);
1432 gener->AddGenerator(genOmega, "Omega", 1);
1433 gener->SetProjectile("A", 208, 82) ;
1434 gener->SetTarget("A", 208, 82) ;
1435 gGener = gener;
1436 }
1437 break;
1438 default: break;
1439 }
1440
1441 return gGener;
1442}
1443
1444AliGenHijing* HijingStandard()
1445{
1446 AliGenHijing *gener = new AliGenHijing(-1);
1447 // centre of mass energy
1448 gener->SetEnergyCMS(5500.);
1449 // reference frame
1450 gener->SetReferenceFrame("CMS");
1451 // projectile
1452 gener->SetProjectile("A", 208, 82);
1453 gener->SetTarget ("A", 208, 82);
1454 // tell hijing to keep the full parent child chain
1455 gener->KeepFullEvent();
1456 // enable jet quenching
1457 gener->SetJetQuenching(1);
1458 // enable shadowing
1459 gener->SetShadowing(1);
1460 // neutral pion and heavy particle decays switched off
1461 gener->SetDecaysOff(1);
1462 // Don't track spectators
1463 gener->SetSpectators(0);
1464 // kinematic selection
1465 gener->SetSelectAll(0);
1466 return gener;
1467}
1468
1469AliGenGeVSim* GeVSimStandard(Float_t mult, Float_t vn)
1470{
1471 AliGenGeVSim* gener = new AliGenGeVSim(0);
1472 //
1473 // Mult is the number of charged particles in |eta| < 0.5
1474 // Vn is in (%)
1475 //
1476 // Sigma of the Gaussian dN/deta
1477 Float_t sigma_eta = 2.75;
1478 //
1479 // Maximum eta
1480 Float_t etamax = 7.00;
1481 //
1482 //
1483 // Scale from multiplicity in |eta| < 0.5 to |eta| < |etamax|
1484 Float_t mm = mult * (TMath::Erf(etamax/sigma_eta/sqrt(2.)) / TMath::Erf(0.5/sigma_eta/sqrt(2.)));
1485 //
1486 // Scale from charged to total multiplicity
1487 //
1488 mm *= 1.587;
1489 //
1490 // Vn
1491 vn /= 100.;
1492 //
1493 // Define particles
1494 //
1495 //
1496 // 78% Pions (26% pi+, 26% pi-, 26% p0) T = 250 MeV
1497 AliGeVSimParticle *pp = new AliGeVSimParticle(kPiPlus, 1, 0.26 * mm, 0.25, sigma_eta) ;
1498 AliGeVSimParticle *pm = new AliGeVSimParticle(kPiMinus, 1, 0.26 * mm, 0.25, sigma_eta) ;
1499 AliGeVSimParticle *p0 = new AliGeVSimParticle(kPi0, 1, 0.26 * mm, 0.25, sigma_eta) ;
1500 //
1501 // 12% Kaons (3% K0short, 3% K0long, 3% K+, 3% K-) T = 300 MeV
1502 AliGeVSimParticle *ks = new AliGeVSimParticle(kK0Short, 1, 0.03 * mm, 0.30, sigma_eta) ;
1503 AliGeVSimParticle *kl = new AliGeVSimParticle(kK0Long, 1, 0.03 * mm, 0.30, sigma_eta) ;
1504 AliGeVSimParticle *kp = new AliGeVSimParticle(kKPlus, 1, 0.03 * mm, 0.30, sigma_eta) ;
1505 AliGeVSimParticle *km = new AliGeVSimParticle(kKMinus, 1, 0.03 * mm, 0.30, sigma_eta) ;
1506 //
1507 // 10% Protons / Neutrons (5% Protons, 5% Neutrons) T = 250 MeV
1508 AliGeVSimParticle *pr = new AliGeVSimParticle(kProton, 1, 0.05 * mm, 0.25, sigma_eta) ;
1509 AliGeVSimParticle *ne = new AliGeVSimParticle(kNeutron, 1, 0.05 * mm, 0.25, sigma_eta) ;
1510 //
1511 // Set Elliptic Flow properties
1512
1513 Float_t pTsaturation = 2. ;
1514
1515 pp->SetEllipticParam(vn,pTsaturation,0.) ;
1516 pm->SetEllipticParam(vn,pTsaturation,0.) ;
1517 p0->SetEllipticParam(vn,pTsaturation,0.) ;
1518 pr->SetEllipticParam(vn,pTsaturation,0.) ;
1519 ne->SetEllipticParam(vn,pTsaturation,0.) ;
1520 ks->SetEllipticParam(vn,pTsaturation,0.) ;
1521 kl->SetEllipticParam(vn,pTsaturation,0.) ;
1522 kp->SetEllipticParam(vn,pTsaturation,0.) ;
1523 km->SetEllipticParam(vn,pTsaturation,0.) ;
1524 //
1525 // Set Direct Flow properties
1526 pp->SetDirectedParam(vn,1.0,0.) ;
1527 pm->SetDirectedParam(vn,1.0,0.) ;
1528 p0->SetDirectedParam(vn,1.0,0.) ;
1529 pr->SetDirectedParam(vn,1.0,0.) ;
1530 ne->SetDirectedParam(vn,1.0,0.) ;
1531 ks->SetDirectedParam(vn,1.0,0.) ;
1532 kl->SetDirectedParam(vn,1.0,0.) ;
1533 kp->SetDirectedParam(vn,1.0,0.) ;
1534 km->SetDirectedParam(vn,1.0,0.) ;
1535 //
1536 // Add particles to the list
1537 gener->AddParticleType(pp) ;
1538 gener->AddParticleType(pm) ;
1539 gener->AddParticleType(p0) ;
1540 gener->AddParticleType(pr) ;
1541 gener->AddParticleType(ne) ;
1542 gener->AddParticleType(ks) ;
1543 gener->AddParticleType(kl) ;
1544 gener->AddParticleType(kp) ;
1545 gener->AddParticleType(km) ;
1546 //
1547 // Random Ev.Plane ----------------------------------
1548 TF1 *rpa = new TF1("gevsimPsiRndm","1", 0, 360);
1549 // --------------------------------------------------
1550 gener->SetPtRange(0., 9.) ; // Use a resonable range! (used for bin size in numerical integration)
1551 gener->SetPhiRange(0, 360);
1552 //
1553 // Set pseudorapidity range
1554 Float_t thmin = EtaToTheta(+etamax);
1555 Float_t thmax = EtaToTheta(-etamax);
1556 gener->SetThetaRange(thmin,thmax);
1557 return gener;
1558}
1559
1560
1561
1562void ProcessEnvironmentVars()
1563{
1564 // Run type
1565 if (gSystem->Getenv("CONFIG_RUN_TYPE")) {
1566 for (Int_t iRun = 0; iRun < kRunMax; iRun++) {
1567 if (strcmp(gSystem->Getenv("CONFIG_RUN_TYPE"), pprRunName[iRun])==0) {
1568 srun = (PprRun_t)iRun;
1569 cout<<"Run type set to "<<pprRunName[iRun]<<endl;
1570 }
1571 }
1572 }
1573
1574 // Random Number seed
1575 if (gSystem->Getenv("CONFIG_SEED")) {
1576 sseed = atoi(gSystem->Getenv("CONFIG_SEED"));
1577 }
1578}