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