Replace the PHOS version from IHEP to Run1 and fix the compilation, when possibletest...
[u/mrichter/AliRoot.git] / test / ppbench / Config.C
CommitLineData
2b919384 1//Configuration of simulation
27b7c1fb 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,
651d08c2 22 kHIJINGplus, kRunMax, kHepMC
27b7c1fb 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",
651d08c2 44 "kFlow_2_2000", "kFlow_10_2000", "kFlow_6_2000", "kFlow_6_5000",
45 "kHIJINGplus", "kRunMax", "kHepMC"
27b7c1fb 46};
47
48enum PprRad_t
49{
50 kGluonRadiation, kNoGluonRadiation
51};
52
27b7c1fb 53enum PprTrigConf_t
54{
55 kDefaultPPTrig, kDefaultPbPbTrig
56};
57
58const char * pprTrigConfName[] = {
59 "p-p","Pb-Pb"
60};
61
62// This part for configuration
63
64static PprRun_t srun = kPythia6;
65static PprRad_t srad = kGluonRadiation;
f7a1cc68 66static AliMagF::BMap_t smag = AliMagF::k5kG;
27b7c1fb 67static Int_t sseed = 12345; //Set 0 to use the current time
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
2b919384 93 // libraries required by geant321 and Pythia: loaded in sim.C
27b7c1fb 94
95 new TGeant3TGeo("C++ Interface to Geant3");
96
97 // Output every 100 tracks
2b919384 98
99 TVirtualMC * vmc = TVirtualMC::GetMC();
100
101 ((TGeant3*)vmc)->SetSWIT(4,100);
27b7c1fb 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
28da60d3 120 AliSimulation::Instance()->SetTriggerConfig(pprTrigConfName[strig]);
27b7c1fb 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();
2b919384 143 vmc->SetExternalDecayer(decayer);
27b7c1fb 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
2b919384 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);
27b7c1fb 167
168 Float_t cut = 1.e-3; // 1MeV cut by default
169 Float_t tofmax = 1.e10;
170
2b919384 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);
27b7c1fb 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
f7a1cc68 192 if (smag == AliMagF::k2kG) {
27b7c1fb 193 comment = comment.Append(" | L3 field 0.2 T");
f7a1cc68 194 } else if (smag == AliMagF::k5kG) {
27b7c1fb 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
4642ac4b 211 TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", -1., -1., smag));
f7a1cc68 212
27b7c1fb 213 rl->CdGAFile();
27b7c1fb 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;
17e8369c 235 Int_t iACORDE = 1;
5e319bd5 236 Int_t iAD = 0;
27b7c1fb 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 ============================
96fb3353 254 AliABSO *ABSO = new AliABSOv3("ABSO", "Muon Absorber");
27b7c1fb 255 }
256
257 if (iDIPO)
258 {
259 //=================== DIPO parameters ============================
260
96fb3353 261 AliDIPO *DIPO = new AliDIPOv3("DIPO", "Dipole version 3");
27b7c1fb 262 }
263
264 if (iHALL)
265 {
266 //=================== HALL parameters ============================
267
96fb3353 268 AliHALL *HALL = new AliHALLv3("HALL", "Alice Hall");
27b7c1fb 269 }
270
271
272 if (iFRAME)
273 {
274 //=================== FRAME parameters ============================
275
276 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
bab433b3 277 FRAME->SetHoles(1);
27b7c1fb 278 }
279
280 if (iSHIL)
281 {
282 //=================== SHIL parameters ============================
283
96fb3353 284 AliSHIL *SHIL = new AliSHILv3("SHIL", "Shielding Version 3");
27b7c1fb 285 }
286
287
288 if (iPIPE)
289 {
290 //=================== PIPE parameters ============================
291
96fb3353 292 AliPIPE *PIPE = new AliPIPEv3("PIPE", "Beam Pipe");
27b7c1fb 293 }
294
e89fa83b 295 if (iITS)
296 {
297 //=================== ITS parameters ============================
27b7c1fb 298
3a5fcc75 299 AliITS *ITS = new AliITSv11("ITS","ITS v11");
27b7c1fb 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 ============================
0d7ef405 311 AliTOF *TOF = new AliTOFv6T0("TOF", "normal TOF");
27b7c1fb 312 }
313
314
315 if (iHMPID)
316 {
317 //=================== HMPID parameters ===========================
99887042 318 AliHMPID *HMPID = new AliHMPIDv3("HMPID", "normal HMPID");
27b7c1fb 319
320 }
321
322
323 if (iZDC)
324 {
325 //=================== ZDC parameters ============================
326
047922b1 327 AliZDC *ZDC = new AliZDCv4("ZDC", "normal ZDC");
27b7c1fb 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");
27b7c1fb 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 ============================
c76b9217 372 AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "EMCAL_COMPLETEV1");
27b7c1fb 373 }
374
375 if (iACORDE)
376 {
377 //=================== ACORDE parameters ============================
f7882672 378 AliACORDE *ACORDE = new AliACORDEv1("ACORDE", "normal ACORDE");
27b7c1fb 379 }
380
381 if (iVZERO)
382 {
383 //=================== VZERO parameters ============================
384 AliVZERO *VZERO = new AliVZEROv7("VZERO", "normal VZERO");
385 }
386
5e319bd5 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
27b7c1fb 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;
424 case kParam_8000:
425 {
426 comment = comment.Append(":HIJINGparam N=8000");
427 AliGenHIJINGpara *gener = new AliGenHIJINGpara(86030);
428 gener->SetMomentumRange(0, 999999.);
429 gener->SetPhiRange(0., 360.);
430 // Set pseudorapidity range from -8 to 8.
431 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
432 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
433 gener->SetThetaRange(thmin,thmax);
434 gGener=gener;
435 }
436 break;
437 case kParam_4000:
438 {
439 comment = comment.Append("HIJINGparam N=4000");
440 AliGenHIJINGpara *gener = new AliGenHIJINGpara(43015);
441 gener->SetMomentumRange(0, 999999.);
442 gener->SetPhiRange(0., 360.);
443 // Set pseudorapidity range from -8 to 8.
444 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
445 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
446 gener->SetThetaRange(thmin,thmax);
447 gGener=gener;
448 }
449 break;
450 case kParam_2000:
451 {
452 comment = comment.Append("HIJINGparam N=2000");
453 AliGenHIJINGpara *gener = new AliGenHIJINGpara(21507);
454 gener->SetMomentumRange(0, 999999.);
455 gener->SetPhiRange(0., 360.);
456 // Set pseudorapidity range from -8 to 8.
457 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
458 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
459 gener->SetThetaRange(thmin,thmax);
460 gGener=gener;
461 }
462 break;
463//
464// Hijing Central
465//
466 case kHijing_cent1:
467 {
468 comment = comment.Append("HIJING cent1");
469 AliGenHijing *gener = HijingStandard();
470// impact parameter range
471 gener->SetImpactParameterRange(0., 5.);
472 gGener=gener;
473 }
474 break;
475 case kHijing_cent2:
476 {
477 comment = comment.Append("HIJING cent2");
478 AliGenHijing *gener = HijingStandard();
479// impact parameter range
480 gener->SetImpactParameterRange(0., 2.);
481 gGener=gener;
482 }
483 break;
484//
485// Hijing Peripheral
486//
487 case kHijing_per1:
488 {
489 comment = comment.Append("HIJING per1");
490 AliGenHijing *gener = HijingStandard();
491// impact parameter range
492 gener->SetImpactParameterRange(5., 8.6);
493 gGener=gener;
494 }
495 break;
496 case kHijing_per2:
497 {
498 comment = comment.Append("HIJING per2");
499 AliGenHijing *gener = HijingStandard();
500// impact parameter range
501 gener->SetImpactParameterRange(8.6, 11.2);
502 gGener=gener;
503 }
504 break;
505 case kHijing_per3:
506 {
507 comment = comment.Append("HIJING per3");
508 AliGenHijing *gener = HijingStandard();
509// impact parameter range
510 gener->SetImpactParameterRange(11.2, 13.2);
511 gGener=gener;
512 }
513 break;
514 case kHijing_per4:
515 {
516 comment = comment.Append("HIJING per4");
517 AliGenHijing *gener = HijingStandard();
518// impact parameter range
519 gener->SetImpactParameterRange(13.2, 15.);
520 gGener=gener;
521 }
522 break;
523 case kHijing_per5:
524 {
525 comment = comment.Append("HIJING per5");
526 AliGenHijing *gener = HijingStandard();
527// impact parameter range
528 gener->SetImpactParameterRange(15., 100.);
529 gGener=gener;
530 }
531 break;
532//
533// Jet-Jet
534//
535 case kHijing_jj25:
536 {
537 comment = comment.Append("HIJING Jet 25 GeV");
538 AliGenHijing *gener = HijingStandard();
539// impact parameter range
540 gener->SetImpactParameterRange(0., 5.);
541 // trigger
542 gener->SetTrigger(1);
543 gener->SetPtJet(25.);
544 gener->SetRadiation(isw);
545 gener->SetSimpleJets(!isw);
546 gener->SetJetEtaRange(-0.3,0.3);
547 gener->SetJetPhiRange(75., 165.);
548 gGener=gener;
549 }
550 break;
551
552 case kHijing_jj50:
553 {
554 comment = comment.Append("HIJING Jet 50 GeV");
555 AliGenHijing *gener = HijingStandard();
556// impact parameter range
557 gener->SetImpactParameterRange(0., 5.);
558 // trigger
559 gener->SetTrigger(1);
560 gener->SetPtJet(50.);
561 gener->SetRadiation(isw);
562 gener->SetSimpleJets(!isw);
563 gener->SetJetEtaRange(-0.3,0.3);
564 gener->SetJetPhiRange(75., 165.);
565 gGener=gener;
566 }
567 break;
568
569 case kHijing_jj75:
570 {
571 comment = comment.Append("HIJING Jet 75 GeV");
572 AliGenHijing *gener = HijingStandard();
573// impact parameter range
574 gener->SetImpactParameterRange(0., 5.);
575 // trigger
576 gener->SetTrigger(1);
577 gener->SetPtJet(75.);
578 gener->SetRadiation(isw);
579 gener->SetSimpleJets(!isw);
580 gener->SetJetEtaRange(-0.3,0.3);
581 gener->SetJetPhiRange(75., 165.);
582 gGener=gener;
583 }
584 break;
585
586 case kHijing_jj100:
587 {
588 comment = comment.Append("HIJING Jet 100 GeV");
589 AliGenHijing *gener = HijingStandard();
590// impact parameter range
591 gener->SetImpactParameterRange(0., 5.);
592 // trigger
593 gener->SetTrigger(1);
594 gener->SetPtJet(100.);
595 gener->SetRadiation(isw);
596 gener->SetSimpleJets(!isw);
597 gener->SetJetEtaRange(-0.3,0.3);
598 gener->SetJetPhiRange(75., 165.);
599 gGener=gener;
600 }
601 break;
602
603 case kHijing_jj200:
604 {
605 comment = comment.Append("HIJING Jet 200 GeV");
606 AliGenHijing *gener = HijingStandard();
607// impact parameter range
608 gener->SetImpactParameterRange(0., 5.);
609 // trigger
610 gener->SetTrigger(1);
611 gener->SetPtJet(200.);
612 gener->SetRadiation(isw);
613 gener->SetSimpleJets(!isw);
614 gener->SetJetEtaRange(-0.3,0.3);
615 gener->SetJetPhiRange(75., 165.);
616 gGener=gener;
617 }
618 break;
619//
620// Gamma-Jet
621//
622 case kHijing_gj25:
623 {
624 comment = comment.Append("HIJING Gamma 25 GeV");
625 AliGenHijing *gener = HijingStandard();
626// impact parameter range
627 gener->SetImpactParameterRange(0., 5.);
628 // trigger
629 gener->SetTrigger(2);
630 gener->SetPtJet(25.);
631 gener->SetRadiation(isw);
632 gener->SetSimpleJets(!isw);
633 gener->SetJetEtaRange(-0.12, 0.12);
634 gener->SetJetPhiRange(220., 320.);
635 gGener=gener;
636 }
637 break;
638
639 case kHijing_gj50:
640 {
641 comment = comment.Append("HIJING Gamma 50 GeV");
642 AliGenHijing *gener = HijingStandard();
643// impact parameter range
644 gener->SetImpactParameterRange(0., 5.);
645 // trigger
646 gener->SetTrigger(2);
647 gener->SetPtJet(50.);
648 gener->SetRadiation(isw);
649 gener->SetSimpleJets(!isw);
650 gener->SetJetEtaRange(-0.12, 0.12);
651 gener->SetJetPhiRange(220., 320.);
652 gGener=gener;
653 }
654 break;
655
656 case kHijing_gj75:
657 {
658 comment = comment.Append("HIJING Gamma 75 GeV");
659 AliGenHijing *gener = HijingStandard();
660// impact parameter range
661 gener->SetImpactParameterRange(0., 5.);
662 // trigger
663 gener->SetTrigger(2);
664 gener->SetPtJet(75.);
665 gener->SetRadiation(isw);
666 gener->SetSimpleJets(!isw);
667 gener->SetJetEtaRange(-0.12, 0.12);
668 gener->SetJetPhiRange(220., 320.);
669 gGener=gener;
670 }
671 break;
672
673 case kHijing_gj100:
674 {
675 comment = comment.Append("HIJING Gamma 100 GeV");
676 AliGenHijing *gener = HijingStandard();
677// impact parameter range
678 gener->SetImpactParameterRange(0., 5.);
679 // trigger
680 gener->SetTrigger(2);
681 gener->SetPtJet(100.);
682 gener->SetRadiation(isw);
683 gener->SetSimpleJets(!isw);
684 gener->SetJetEtaRange(-0.12, 0.12);
685 gener->SetJetPhiRange(220., 320.);
686 gGener=gener;
687 }
688 break;
689
690 case kHijing_gj200:
691 {
692 comment = comment.Append("HIJING Gamma 200 GeV");
693 AliGenHijing *gener = HijingStandard();
694// impact parameter range
695 gener->SetImpactParameterRange(0., 5.);
696 // trigger
697 gener->SetTrigger(2);
698 gener->SetPtJet(200.);
699 gener->SetRadiation(isw);
700 gener->SetSimpleJets(!isw);
701 gener->SetJetEtaRange(-0.12, 0.12);
702 gener->SetJetPhiRange(220., 320.);
703 gGener=gener;
704 }
705 break;
706 case kHijing_pA:
707 {
708 comment = comment.Append("HIJING pA");
709
710 AliGenCocktail *gener = new AliGenCocktail();
711
712 AliGenHijing *hijing = new AliGenHijing(-1);
713// centre of mass energy
714 hijing->SetEnergyCMS(TMath::Sqrt(82./208.) * 14000.);
715// impact parameter range
716 hijing->SetImpactParameterRange(0., 15.);
717// reference frame
718 hijing->SetReferenceFrame("CMS");
719 hijing->SetBoostLHC(1);
720// projectile
721 hijing->SetProjectile("P", 1, 1);
722 hijing->SetTarget ("A", 208, 82);
723// tell hijing to keep the full parent child chain
724 hijing->KeepFullEvent();
725// enable jet quenching
726 hijing->SetJetQuenching(0);
727// enable shadowing
728 hijing->SetShadowing(1);
729// Don't track spectators
730 hijing->SetSpectators(0);
731// kinematic selection
732 hijing->SetSelectAll(0);
733//
734 AliGenSlowNucleons* gray = new AliGenSlowNucleons(1);
735 AliSlowNucleonModel* model = new AliSlowNucleonModelExp();
736 gray->SetSlowNucleonModel(model);
737 gray->SetDebug(1);
738 gener->AddGenerator(hijing,"Hijing pPb", 1);
739 gener->AddGenerator(gray, "Gray Particles",1);
740 gGener=gener;
741 }
742 break;
6d1a0a21 743 case kPythia6:
27b7c1fb 744 {
745 comment = comment.Append(":Pythia p-p @ 14 TeV");
746 AliGenPythia *gener = new AliGenPythia(-1);
747 gener->SetMomentumRange(0,999999);
748 gener->SetThetaRange(0., 180.);
749 gener->SetYRange(-12,12);
750 gener->SetPtRange(0,1000);
751 gener->SetProcess(kPyMb);
752 gener->SetEnergyCMS(14000.);
6d1a0a21 753 gener->SetProjectile("p", 1, 1) ;
754 gener->SetTarget("p", 1, 1) ;
755 gGener=gener;
27b7c1fb 756 }
6d1a0a21 757 break;
758 case kPythia6Jets20_24:
27b7c1fb 759 {
760 comment = comment.Append(":Pythia jets 20-24 GeV @ 5.5 TeV");
761 AliGenPythia * gener = new AliGenPythia(-1);
6d1a0a21 762 gener->SetEnergyCMS(5500.);// Centre of mass energy
763 gener->SetProcess(kPyJets);// Process type
764 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
765 gener->SetJetPhiRange(0., 360.);
766 gener->SetJetEtRange(10., 1000.);
767 gener->SetGluonRadiation(1,1);
768 // gener->SetPtKick(0.);
769 // Structure function
770 gener->SetStrucFunc(kCTEQ4L);
771 gener->SetPtHard(20., 24.);// Pt transfer of the hard scattering
772 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
773 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
774 gener->SetProjectile("p", 1, 1) ;
775 gener->SetTarget("p", 1, 1) ;
776 gGener=gener;
27b7c1fb 777 }
6d1a0a21 778 break;
779 case kPythia6Jets24_29:
27b7c1fb 780 {
781 comment = comment.Append(":Pythia jets 24-29 GeV @ 5.5 TeV");
782 AliGenPythia * gener = new AliGenPythia(-1);
6d1a0a21 783 gener->SetEnergyCMS(5500.);// Centre of mass energy
784 gener->SetProcess(kPyJets);// Process type
785 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
786 gener->SetJetPhiRange(0., 360.);
787 gener->SetJetEtRange(10., 1000.);
788 gener->SetGluonRadiation(1,1);
789 // gener->SetPtKick(0.);
790 // Structure function
791 gener->SetStrucFunc(kCTEQ4L);
792 gener->SetPtHard(24., 29.);// Pt transfer of the hard scattering
793 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
794 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
795 gener->SetProjectile("p", 1, 1) ;
796 gener->SetTarget("p", 1, 1) ;
797 gGener=gener;
27b7c1fb 798 }
6d1a0a21 799 break;
800 case kPythia6Jets29_35:
27b7c1fb 801 {
802 comment = comment.Append(":Pythia jets 29-35 GeV @ 5.5 TeV");
803 AliGenPythia * gener = new AliGenPythia(-1);
6d1a0a21 804 gener->SetEnergyCMS(5500.);// Centre of mass energy
805 gener->SetProcess(kPyJets);// Process type
806 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
807 gener->SetJetPhiRange(0., 360.);
808 gener->SetJetEtRange(10., 1000.);
809 gener->SetGluonRadiation(1,1);
810 // gener->SetPtKick(0.);
811 // Structure function
812 gener->SetStrucFunc(kCTEQ4L);
813 gener->SetPtHard(29., 35.);// Pt transfer of the hard scattering
814 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
815 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
816 gener->SetProjectile("p", 1, 1) ;
817 gener->SetTarget("p", 1, 1) ;
818 gGener=gener;
27b7c1fb 819 }
6d1a0a21 820 break;
821 case kPythia6Jets35_42:
27b7c1fb 822 {
823 comment = comment.Append(":Pythia jets 35-42 GeV @ 5.5 TeV");
824 AliGenPythia * gener = new AliGenPythia(-1);
6d1a0a21 825 gener->SetEnergyCMS(5500.);// Centre of mass energy
826 gener->SetProcess(kPyJets);// Process type
827 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
828 gener->SetJetPhiRange(0., 360.);
829 gener->SetJetEtRange(10., 1000.);
830 gener->SetGluonRadiation(1,1);
831 // gener->SetPtKick(0.);
832 // Structure function
833 gener->SetStrucFunc(kCTEQ4L);
834 gener->SetPtHard(35., 42.);// Pt transfer of the hard scattering
835 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
836 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
837 gener->SetProjectile("p", 1, 1) ;
838 gener->SetTarget("p", 1, 1) ;
839 gGener=gener;
27b7c1fb 840 }
6d1a0a21 841 break;
842 case kPythia6Jets42_50:
27b7c1fb 843 {
844 comment = comment.Append(":Pythia jets 42-50 GeV @ 5.5 TeV");
845 AliGenPythia * gener = new AliGenPythia(-1);
6d1a0a21 846 gener->SetEnergyCMS(5500.);// Centre of mass energy
847 gener->SetProcess(kPyJets);// Process type
848 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
849 gener->SetJetPhiRange(0., 360.);
850 gener->SetJetEtRange(10., 1000.);
851 gener->SetGluonRadiation(1,1);
852 // gener->SetPtKick(0.);
853 // Structure function
854 gener->SetStrucFunc(kCTEQ4L);
855 gener->SetPtHard(42., 50.);// Pt transfer of the hard scattering
856 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
857 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
858 gener->SetProjectile("p", 1, 1) ;
859 gener->SetTarget("p", 1, 1) ;
860 gGener=gener;
27b7c1fb 861 }
862 break;
6d1a0a21 863 case kPythia6Jets50_60:
27b7c1fb 864 {
865 comment = comment.Append(":Pythia jets 50-60 GeV @ 5.5 TeV");
866 AliGenPythia * gener = new AliGenPythia(-1);
6d1a0a21 867 gener->SetEnergyCMS(5500.);// Centre of mass energy
868 gener->SetProcess(kPyJets);// Process type
869 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
870 gener->SetJetPhiRange(0., 360.);
871 gener->SetJetEtRange(10., 1000.);
872 gener->SetGluonRadiation(1,1);
873 // gener->SetPtKick(0.);
874 // Structure function
875 gener->SetStrucFunc(kCTEQ4L);
876 gener->SetPtHard(50., 60.);// Pt transfer of the hard scattering
877 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
878 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
879 gGener=gener;
27b7c1fb 880 }
6d1a0a21 881 break;
882 case kPythia6Jets60_72:
27b7c1fb 883 {
884 comment = comment.Append(":Pythia jets 60-72 GeV @ 5.5 TeV");
885 AliGenPythia * gener = new AliGenPythia(-1);
6d1a0a21 886 gener->SetEnergyCMS(5500.);// Centre of mass energy
887 gener->SetProcess(kPyJets);// Process type
888 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
889 gener->SetJetPhiRange(0., 360.);
890 gener->SetJetEtRange(10., 1000.);
891 gener->SetGluonRadiation(1,1);
892 // gener->SetPtKick(0.);
893 // Structure function
894 gener->SetStrucFunc(kCTEQ4L);
895 gener->SetPtHard(60., 72.);// Pt transfer of the hard scattering
896 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
897 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
898 gener->SetProjectile("p", 1, 1) ;
899 gener->SetTarget("p", 1, 1) ;
900 gGener=gener;
27b7c1fb 901 }
6d1a0a21 902 break;
903 case kPythia6Jets72_86:
27b7c1fb 904 {
905 comment = comment.Append(":Pythia jets 72-86 GeV @ 5.5 TeV");
906 AliGenPythia * gener = new AliGenPythia(-1);
6d1a0a21 907 gener->SetEnergyCMS(5500.);// Centre of mass energy
908 gener->SetProcess(kPyJets);// Process type
909 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
910 gener->SetJetPhiRange(0., 360.);
911 gener->SetJetEtRange(10., 1000.);
912 gener->SetGluonRadiation(1,1);
913 // gener->SetPtKick(0.);
914 // Structure function
915 gener->SetStrucFunc(kCTEQ4L);
916 gener->SetPtHard(72., 86.);// Pt transfer of the hard scattering
917 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
918 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
919 gener->SetProjectile("p", 1, 1) ;
920 gener->SetTarget("p", 1, 1) ;
921 gGener=gener;
27b7c1fb 922 }
923 break;
6d1a0a21 924 case kPythia6Jets86_104:
27b7c1fb 925 {
926 comment = comment.Append(":Pythia jets 86-104 GeV @ 5.5 TeV");
927 AliGenPythia * gener = new AliGenPythia(-1);
6d1a0a21 928 gener->SetEnergyCMS(5500.);// Centre of mass energy
929 gener->SetProcess(kPyJets);// Process type
930 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
931 gener->SetJetPhiRange(0., 360.);
932 gener->SetJetEtRange(10., 1000.);
933 gener->SetGluonRadiation(1,1);
934 // gener->SetPtKick(0.);
935 // Structure function
936 gener->SetStrucFunc(kCTEQ4L);
937 gener->SetPtHard(86., 104.);// Pt transfer of the hard scattering
938 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
939 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
940 gener->SetProjectile("p", 1, 1) ;
941 gener->SetTarget("p", 1, 1) ;
942 gGener=gener;
27b7c1fb 943 }
944 break;
945 case kPythia6Jets104_125:
946 {
947 comment = comment.Append(":Pythia jets 105-125 GeV @ 5.5 TeV");
948 AliGenPythia * gener = new AliGenPythia(-1);
6d1a0a21 949 gener->SetEnergyCMS(5500.);// Centre of mass energy
950 gener->SetProcess(kPyJets);// Process type
951 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
952 gener->SetJetPhiRange(0., 360.);
953 gener->SetJetEtRange(10., 1000.);
954 gener->SetGluonRadiation(1,1);
955 // gener->SetPtKick(0.);
956 // Structure function
957 gener->SetStrucFunc(kCTEQ4L);
958 gener->SetPtHard(104., 125.);// Pt transfer of the hard scattering
959 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
960 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
961 gener->SetProjectile("p", 1, 1) ;
962 gener->SetTarget("p", 1, 1) ;
963 gGener=gener;
27b7c1fb 964 }
6d1a0a21 965 break;
966 case kPythia6Jets125_150:
27b7c1fb 967 {
968 comment = comment.Append(":Pythia jets 125-150 GeV @ 5.5 TeV");
969 AliGenPythia * gener = new AliGenPythia(-1);
6d1a0a21 970 gener->SetEnergyCMS(5500.);// Centre of mass energy
971 gener->SetProcess(kPyJets);// Process type
972 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
973 gener->SetJetPhiRange(0., 360.);
974 gener->SetJetEtRange(10., 1000.);
975 gener->SetGluonRadiation(1,1);
976 // gener->SetPtKick(0.);
977 // Structure function
978 gener->SetStrucFunc(kCTEQ4L);
979 gener->SetPtHard(125., 150.);// Pt transfer of the hard scattering
980 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
981 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
982 gGener=gener;
27b7c1fb 983 }
6d1a0a21 984 break;
985 case kPythia6Jets150_180:
27b7c1fb 986 {
987 comment = comment.Append(":Pythia jets 150-180 GeV @ 5.5 TeV");
988 AliGenPythia * gener = new AliGenPythia(-1);
6d1a0a21 989 gener->SetEnergyCMS(5500.);// Centre of mass energy
990 gener->SetProcess(kPyJets);// Process type
991 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
992 gener->SetJetPhiRange(0., 360.);
993 gener->SetJetEtRange(10., 1000.);
994 gener->SetGluonRadiation(1,1);
995 // gener->SetPtKick(0.);
996 // Structure function
997 gener->SetStrucFunc(kCTEQ4L);
998 gener->SetPtHard(150., 180.);// Pt transfer of the hard scattering
999 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
1000 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
1001 gener->SetProjectile("p", 1, 1) ;
1002 gener->SetTarget("p", 1, 1) ;
1003 gGener=gener;
27b7c1fb 1004 }
1005 break;
6d1a0a21 1006 case kD0PbPb5500:
27b7c1fb 1007 {
6d1a0a21 1008 comment = comment.Append(" D0 in Pb-Pb at 5.5 TeV");
1009 AliGenPythia * gener = new AliGenPythia(10);
1010 gener->SetProcess(kPyD0PbPbMNR);
1011 gener->SetStrucFunc(kCTEQ4L);
1012 gener->SetPtHard(2.1,-1.0);
1013 gener->SetEnergyCMS(5500.);
1014 gener->SetNuclei(208,208);
1015 gener->SetForceDecay(kHadronicD);
1016 gener->SetYRange(-2,2);
1017 gener->SetFeedDownHigherFamily(kFALSE);
1018 gener->SetStackFillOpt(AliGenPythia::kParentSelection);
1019 gener->SetCountMode(AliGenPythia::kCountParents);
1020 gener->SetProjectile("A", 208, 82) ;
1021 gener->SetTarget("A", 208, 82) ;
1022 gGener=gener;
27b7c1fb 1023 }
1024 break;
1025 case kCharmSemiElPbPb5500:
1026 {
6d1a0a21 1027 comment = comment.Append(" Charm in Pb-Pb at 5.5 TeV");
1028 AliGenPythia * gener = new AliGenPythia(10);
1029 gener->SetProcess(kPyCharmPbPbMNR);
1030 gener->SetStrucFunc(kCTEQ4L);
1031 gener->SetPtHard(2.1,-1.0);
1032 gener->SetEnergyCMS(5500.);
1033 gener->SetNuclei(208,208);
1034 gener->SetForceDecay(kSemiElectronic);
1035 gener->SetYRange(-2,2);
1036 gener->SetFeedDownHigherFamily(kFALSE);
1037 gener->SetCountMode(AliGenPythia::kCountParents);
1038 gener->SetProjectile("A", 208, 82) ;
1039 gener->SetTarget("A", 208, 82) ;
1040 gGener=gener;
27b7c1fb 1041 }
1042 break;
6d1a0a21 1043 case kBeautySemiElPbPb5500:
27b7c1fb 1044 {
6d1a0a21 1045 comment = comment.Append(" Beauty in Pb-Pb at 5.5 TeV");
1046 AliGenPythia *gener = new AliGenPythia(10);
1047 gener->SetProcess(kPyBeautyPbPbMNR);
1048 gener->SetStrucFunc(kCTEQ4L);
1049 gener->SetPtHard(2.75,-1.0);
1050 gener->SetEnergyCMS(5500.);
1051 gener->SetNuclei(208,208);
1052 gener->SetForceDecay(kSemiElectronic);
1053 gener->SetYRange(-2,2);
1054 gener->SetFeedDownHigherFamily(kFALSE);
1055 gener->SetCountMode(AliGenPythia::kCountParents);
1056 gener->SetProjectile("A", 208, 82) ;
1057 gener->SetTarget("A", 208, 82) ;
1058 gGener=gener;
27b7c1fb 1059 }
6d1a0a21 1060 break;
1061 case kCocktailTRD:
27b7c1fb 1062 {
6d1a0a21 1063 comment = comment.Append(" Cocktail for TRD at 5.5 TeV");
1064 AliGenCocktail *gener = new AliGenCocktail();
1065
1066 AliGenParam *phi = new AliGenParam(10,
27b7c1fb 1067 new AliGenMUONlib(),
1068 AliGenMUONlib::kPhi,
1069 "Vogt PbPb");
6d1a0a21 1070
1071 phi->SetPtRange(0, 100);
1072 phi->SetYRange(-1., +1.);
1073 phi->SetForceDecay(kDiElectron);
1074
1075 AliGenParam *omega = new AliGenParam(10,
1076 new AliGenMUONlib(),
1077 AliGenMUONlib::kOmega,
1078 "Vogt PbPb");
1079
1080 omega->SetPtRange(0, 100);
1081 omega->SetYRange(-1., +1.);
1082 omega->SetForceDecay(kDiElectron);
1083
1084 AliGenParam *jpsi = new AliGenParam(10,
1085 new AliGenMUONlib(),
1086 AliGenMUONlib::kJpsiFamily,
1087 "Vogt PbPb");
1088
1089 jpsi->SetPtRange(0, 100);
1090 jpsi->SetYRange(-1., +1.);
1091 jpsi->SetForceDecay(kDiElectron);
1092
1093 AliGenParam *ups = new AliGenParam(10,
1094 new AliGenMUONlib(),
1095 AliGenMUONlib::kUpsilonFamily,
1096 "Vogt PbPb");
1097 ups->SetPtRange(0, 100);
1098 ups->SetYRange(-1., +1.);
1099 ups->SetForceDecay(kDiElectron);
1100
1101 AliGenParam *charm = new AliGenParam(10,
1102 new AliGenMUONlib(),
1103 AliGenMUONlib::kCharm,
1104 "central");
1105 charm->SetPtRange(0, 100);
1106 charm->SetYRange(-1.5, +1.5);
1107 charm->SetForceDecay(kSemiElectronic);
1108
1109
1110 AliGenParam *beauty = new AliGenParam(10,
1111 new AliGenMUONlib(),
1112 AliGenMUONlib::kBeauty,
1113 "central");
1114 beauty->SetPtRange(0, 100);
1115 beauty->SetYRange(-1.5, +1.5);
1116 beauty->SetForceDecay(kSemiElectronic);
1117
1118 AliGenParam *beautyJ = new AliGenParam(10,
1119 new AliGenMUONlib(),
1120 AliGenMUONlib::kBeauty,
1121 "central");
1122 beautyJ->SetPtRange(0, 100);
1123 beautyJ->SetYRange(-1.5, +1.5);
1124 beautyJ->SetForceDecay(kBJpsiDiElectron);
1125
1126 gener->AddGenerator(phi,"Phi",1);
1127 gener->AddGenerator(omega,"Omega",1);
1128 gener->AddGenerator(jpsi,"J/psi",1);
1129 gener->AddGenerator(ups,"Upsilon",1);
1130 gener->AddGenerator(charm,"Charm",1);
1131 gener->AddGenerator(beauty,"Beauty",1);
1132 gener->AddGenerator(beautyJ,"J/Psi from Beauty",1);
1133 gener->SetProjectile("A", 208, 82) ;
1134 gener->SetTarget("A", 208, 82) ;
1135 gGener=gener;
27b7c1fb 1136 }
1137 break;
1138 case kPyJJ:
1139 {
6d1a0a21 1140 comment = comment.Append(" Jet-jet at 5.5 TeV");
1141 AliGenPythia *gener = new AliGenPythia(-1);
1142 gener->SetEnergyCMS(5500.);
1143 gener->SetProcess(kPyJets);
1144 Double_t ptHardMin=10.0, ptHardMax=-1.0;
1145 gener->SetPtHard(ptHardMin,ptHardMax);
1146 gener->SetYHard(-0.7,0.7);
1147 gener->SetJetEtaRange(-0.2,0.2);
1148 gener->SetEventListRange(0,1);
1149 gener->SetProjectile("p", 1, 1) ;
1150 gener->SetTarget("p", 1, 1) ;
1151 gGener=gener;
27b7c1fb 1152 }
6d1a0a21 1153 break;
1154 case kPyGJ:
27b7c1fb 1155 {
6d1a0a21 1156 comment = comment.Append(" Gamma-jet at 5.5 TeV");
1157 AliGenPythia *gener = new AliGenPythia(-1);
1158 gener->SetEnergyCMS(5500.);
1159 gener->SetProcess(kPyDirectGamma);
1160 Double_t ptHardMin=10.0, ptHardMax=-1.0;
1161 gener->SetPtHard(ptHardMin,ptHardMax);
1162 gener->SetYHard(-1.0,1.0);
1163 gener->SetGammaEtaRange(-0.13,0.13);
1164 gener->SetGammaPhiRange(210.,330.);
1165 gener->SetEventListRange(0,1);
1166 gener->SetProjectile("p", 1, 1) ;
1167 gener->SetTarget("p", 1, 1) ;
1168 gGener=gener;
27b7c1fb 1169 }
6d1a0a21 1170 break;
1171 case kMuonCocktailCent1:
27b7c1fb 1172 {
6d1a0a21 1173 comment = comment.Append(" Muon Cocktail Cent1");
1174 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1175 gener->SetPtRange(0.4,100.); // Transverse momentum range
1176 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1177 gener->SetYRange(-4.0,-2.4);
1178 gener->SetMuonPtCut(0.8);
1179 gener->SetMuonThetaCut(171.,178.);
1180 gener->SetMuonMultiplicity(2);
1181 gener->SetImpactParameterRange(0.,5.); //Centrality class Cent1 for PDC04
1182 gGener=gener;
1183 gener->SetProjectile("A", 208, 82) ;
1184 gener->SetTarget("A", 208, 82) ;
27b7c1fb 1185 }
6d1a0a21 1186 break;
1187 case kMuonCocktailPer1:
27b7c1fb 1188 {
6d1a0a21 1189 comment = comment.Append(" Muon Cocktail Per1");
1190 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1191 gener->SetPtRange(0.0,100.); // Transverse momentum range
1192 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1193 gener->SetYRange(-4.0,-2.4);
1194 gener->SetMuonPtCut(0.8);
1195 gener->SetMuonThetaCut(171.,178.);
1196 gener->SetMuonMultiplicity(2);
1197 gener->SetImpactParameterRange(5.,8.6);//Centrality class Per1 for PDC04
1198 gener->SetProjectile("A", 208, 82) ;
1199 gener->SetTarget("A", 208, 82) ;
1200 gGener=gener;
27b7c1fb 1201 }
1202 break;
1203 case kMuonCocktailPer4:
1204 {
6d1a0a21 1205 comment = comment.Append(" Muon Cocktail Per4");
1206 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1207 gener->SetPtRange(0.0,100.); // Transverse momentum range
1208 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1209 gener->SetYRange(-4.0,-2.4);
1210 gener->SetMuonPtCut(0.8);
1211 gener->SetMuonThetaCut(171.,178.);
1212 gener->SetMuonMultiplicity(2);
1213 gener->SetImpactParameterRange(13.2,15.0);//Centrality class Per4 for PDC04
1214 gener->SetProjectile("A", 208, 82) ;
1215 gener->SetTarget("A", 208, 82) ;
1216 gGener=gener;
27b7c1fb 1217 }
6d1a0a21 1218 break;
1219 case kMuonCocktailCent1HighPt:
27b7c1fb 1220 {
6d1a0a21 1221 comment = comment.Append(" Muon Cocktail HighPt Cent1");
1222 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1223 gener->SetPtRange(0.0,100.); // Transverse momentum range
1224 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1225 gener->SetYRange(-4.0,-2.4);
1226 gener->SetMuonPtCut(2.5);
1227 gener->SetMuonThetaCut(171.,178.);
1228 gener->SetMuonMultiplicity(2);
1229 gener->SetImpactParameterRange(0.,5.); //Centrality class Cent1 for PDC04
1230 gener->SetProjectile("A", 208, 82) ;
1231 gener->SetTarget("A", 208, 82) ;
1232 gGener=gener;
27b7c1fb 1233 }
6d1a0a21 1234 break;
1235 case kMuonCocktailPer1HighPt :
27b7c1fb 1236 {
6d1a0a21 1237 comment = comment.Append(" Muon Cocktail HighPt Per1");
1238 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1239 gener->SetPtRange(0.0,100.); // Transverse momentum range
1240 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1241 gener->SetYRange(-4.0,-2.4);
1242 gener->SetMuonPtCut(2.5);
1243 gener->SetMuonThetaCut(171.,178.);
1244 gener->SetMuonMultiplicity(2);
1245 gener->SetImpactParameterRange(5.,8.6);//Centrality class Per1 for PDC04
1246 gener->SetProjectile("A", 208, 82) ;
1247 gener->SetTarget("A", 208, 82) ;
1248 gGener=gener;
27b7c1fb 1249 }
6d1a0a21 1250 break;
1251 case kMuonCocktailPer4HighPt:
27b7c1fb 1252 {
6d1a0a21 1253 comment = comment.Append(" Muon Cocktail HighPt Per4");
1254 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1255 gener->SetPtRange(0.0,100.); // Transverse momentum range
1256 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1257 gener->SetYRange(-4.0,-2.4);
1258 gener->SetMuonPtCut(2.5);
1259 gener->SetMuonThetaCut(171.,178.);
1260 gener->SetMuonMultiplicity(2);
1261 gener->SetImpactParameterRange(13.2,15.0);//Centrality class Per4 for PDC04
1262 gener->SetProjectile("A", 208, 82) ;
1263 gener->SetTarget("A", 208, 82) ;
1264 gGener=gener;
27b7c1fb 1265 }
6d1a0a21 1266 break;
1267 case kMuonCocktailCent1Single:
27b7c1fb 1268 {
6d1a0a21 1269 comment = comment.Append(" Muon Cocktail Single Cent1");
1270 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1271 gener->SetPtRange(0.0,100.); // Transverse momentum range
1272 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1273 gener->SetYRange(-4.0,-2.4);
1274 gener->SetMuonPtCut(0.8);
1275 gener->SetMuonThetaCut(171.,178.);
1276 gener->SetMuonMultiplicity(1);
1277 gener->SetImpactParameterRange(0.,5.); //Centrality class Cent1 for PDC04
1278 gener->SetProjectile("A", 208, 82) ;
1279 gener->SetTarget("A", 208, 82) ;
1280 gGener=gener;
27b7c1fb 1281 }
6d1a0a21 1282 break;
1283 case kMuonCocktailPer1Single :
27b7c1fb 1284 {
6d1a0a21 1285 comment = comment.Append(" Muon Cocktail Single Per1");
1286 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1287 gener->SetPtRange(0.0,100.); // Transverse momentum range
1288 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1289 gener->SetYRange(-4.0,-2.4);
1290 gener->SetMuonPtCut(0.8);
1291 gener->SetMuonThetaCut(171.,178.);
1292 gener->SetMuonMultiplicity(1);
1293 gener->SetImpactParameterRange(5.,8.6);//Centrality class Per1 for PDC04
1294 gener->SetNumberOfParticipants(229.3);//Centrality class Per1 for PDC04
1295 gener->SetProjectile("A", 208, 82) ;
1296 gener->SetTarget("A", 208, 82) ;
1297 gGener=gener;
27b7c1fb 1298 }
6d1a0a21 1299 break;
1300 case kMuonCocktailPer4Single:
27b7c1fb 1301 {
6d1a0a21 1302 comment = comment.Append(" Muon Cocktail Single Per4");
1303 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1304 gener->SetPtRange(0.0,100.); // Transverse momentum range
1305 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1306 gener->SetYRange(-4.0,-2.4);
1307 gener->SetMuonPtCut(0.8);
1308 gener->SetMuonThetaCut(171.,178.);
1309 gener->SetMuonMultiplicity(1);
1310 gener->SetImpactParameterRange(13.2,15.0);//Centrality class Per4 for PDC04
1311 gener->SetProjectile("A", 208, 82) ;
1312 gener->SetTarget("A", 208, 82) ;
1313 gGener=gener;
27b7c1fb 1314 }
6d1a0a21 1315 break;
1316 case kFlow_2_2000:
1317 {
1318 comment = comment.Append(" Flow with dN/deta = 2000, vn = 2%");
1319 gGener = GeVSimStandard(2000., 2.);
1320 }
1321 break;
1322
1323 case kFlow_10_2000:
1324 {
1325 comment = comment.Append(" Flow with dN/deta = 2000, vn = 10%");
1326 gGener = GeVSimStandard(2000., 10.);
1327 }
1328 break;
1329
1330 case kFlow_6_2000:
1331 {
1332 comment = comment.Append(" Flow with dN/deta = 2000, vn = 6%");
1333 gGener = GeVSimStandard(2000., 6.);
1334 }
1335 break;
1336
1337 case kFlow_6_5000:
1338 {
1339 comment = comment.Append(" Flow with dN/deta = 5000, vn = 6%");
1340 gGener = GeVSimStandard(5000., 6.);
1341 }
1342 break;
1343 case kHIJINGplus:
1344 {
1345 //
1346 // The cocktail
1347 AliGenCocktail *gener = new AliGenCocktail();
1348
1349 //
1350 // Charm production by Pythia
1351 AliGenPythia * genpyc = new AliGenPythia(230);
1352 genpyc->SetProcess(kPyCharmPbPbMNR);
1353 genpyc->SetStrucFunc(kCTEQ4L);
1354 genpyc->SetPtHard(2.1,-1.0);
1355 genpyc->SetEnergyCMS(5500.);
1356 genpyc->SetNuclei(208,208);
1357 genpyc->SetYRange(-999,999);
1358 genpyc->SetForceDecay(kAll);
1359 genpyc->SetFeedDownHigherFamily(kFALSE);
1360 genpyc->SetCountMode(AliGenPythia::kCountParents);
1361 //
1362 // Beauty production by Pythia
1363 AliGenPythia * genpyb = new AliGenPythia(9);
1364 genpyb->SetProcess(kPyBeautyPbPbMNR);
1365 genpyb->SetStrucFunc(kCTEQ4L);
1366 genpyb->SetPtHard(2.75,-1.0);
1367 genpyb->SetEnergyCMS(5500.);
1368 genpyb->SetNuclei(208,208);
1369 genpyb->SetYRange(-999,999);
1370 genpyb->SetForceDecay(kAll);
1371 genpyb->SetFeedDownHigherFamily(kFALSE);
1372 genpyb->SetCountMode(AliGenPythia::kCountParents);
27b7c1fb 1373 //
1374 // Hyperons
27b7c1fb 1375 //
6d1a0a21 1376 AliGenSTRANGElib *lib = new AliGenSTRANGElib();
1377 Int_t particle;
1378 // Xi
1379 particle = kXiMinus;
2b919384 1380 AliGenParam *genXi = new AliGenParam(16,lib,particle);
6d1a0a21 1381 genXi->SetPtRange(0., 12.);
1382 genXi->SetYRange(-1.1, 1.1);
1383 genXi->SetForceDecay(kNoDecay);
1384
1385 //
1386 // Omega
1387 particle = kOmegaMinus;
2b919384 1388 AliGenParam *genOmega = new AliGenParam(10,lib,particle);
6d1a0a21 1389 genOmega->SetPtRange(0, 12.);
1390 genOmega->SetYRange(-1.1, 1.1);
1391 genOmega->SetForceDecay(kNoDecay);
1392
1393 //
1394 // Central Hijing
1395 AliGenHijing *genHi = HijingStandard();
1396 genHi->SwitchOffHeavyQuarks(kTRUE);
1397 genHi->SetImpactParameterRange(0.,5.);
1398 //
1399 // Add everything to the cocktail and shake ...
1400 gener->AddGenerator(genHi, "Hijing cent1", 1);
1401 gener->AddGenerator(genpyc, "Extra charm", 1);
1402 gener->AddGenerator(genpyb, "Extra beauty", 1);
1403 gener->AddGenerator(genXi, "Xi" , 1);
1404 gener->AddGenerator(genOmega, "Omega", 1);
1405 gener->SetProjectile("A", 208, 82) ;
1406 gener->SetTarget("A", 208, 82) ;
1407 gGener = gener;
1408 }
1409 break;
651d08c2 1410 case kHepMC:
1411 {
1412 comment = comment.Append(":HepMC test");
1413 AliGenReaderHepMC *reader = new AliGenReaderHepMC();
1414 reader->SetFileName("crmc_eposlhc_323355159_p_p_3500.hepmc");
1415 AliGenExtFile *gener = new AliGenExtFile(-1);
1416 gener->SetReader(reader);
1417 gener->SetMomentumRange(0, 999999.);
1418 gener->SetPhiRange(0., 360.);
1419 // Set pseudorapidity range from -8 to 8.
1420 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
1421 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
1422 gener->SetThetaRange(thmin,thmax);
1423 gGener=gener;
1424 }
1425 break;
6d1a0a21 1426 default: break;
27b7c1fb 1427 }
6d1a0a21 1428
1429 return gGener;
27b7c1fb 1430}
1431
1432AliGenHijing* HijingStandard()
1433{
6d1a0a21 1434 AliGenHijing *gener = new AliGenHijing(-1);
1435 // centre of mass energy
1436 gener->SetEnergyCMS(5500.);
1437 // reference frame
1438 gener->SetReferenceFrame("CMS");
1439 // projectile
1440 gener->SetProjectile("A", 208, 82);
1441 gener->SetTarget ("A", 208, 82);
1442 // tell hijing to keep the full parent child chain
1443 gener->KeepFullEvent();
1444 // enable jet quenching
1445 gener->SetJetQuenching(1);
1446 // enable shadowing
1447 gener->SetShadowing(1);
1448 // neutral pion and heavy particle decays switched off
1449 gener->SetDecaysOff(1);
1450 // Don't track spectators
1451 gener->SetSpectators(0);
1452 // kinematic selection
1453 gener->SetSelectAll(0);
1454 return gener;
27b7c1fb 1455}
1456
1457AliGenGeVSim* GeVSimStandard(Float_t mult, Float_t vn)
1458{
6d1a0a21 1459 AliGenGeVSim* gener = new AliGenGeVSim(0);
1460 //
1461 // Mult is the number of charged particles in |eta| < 0.5
1462 // Vn is in (%)
1463 //
1464 // Sigma of the Gaussian dN/deta
1465 Float_t sigma_eta = 2.75;
1466 //
1467 // Maximum eta
1468 Float_t etamax = 7.00;
1469 //
1470 //
1471 // Scale from multiplicity in |eta| < 0.5 to |eta| < |etamax|
1472 Float_t mm = mult * (TMath::Erf(etamax/sigma_eta/sqrt(2.)) / TMath::Erf(0.5/sigma_eta/sqrt(2.)));
1473 //
1474 // Scale from charged to total multiplicity
1475 //
1476 mm *= 1.587;
1477 //
1478 // Vn
1479 vn /= 100.;
1480 //
1481 // Define particles
1482 //
1483 //
1484 // 78% Pions (26% pi+, 26% pi-, 26% p0) T = 250 MeV
1485 AliGeVSimParticle *pp = new AliGeVSimParticle(kPiPlus, 1, 0.26 * mm, 0.25, sigma_eta) ;
1486 AliGeVSimParticle *pm = new AliGeVSimParticle(kPiMinus, 1, 0.26 * mm, 0.25, sigma_eta) ;
1487 AliGeVSimParticle *p0 = new AliGeVSimParticle(kPi0, 1, 0.26 * mm, 0.25, sigma_eta) ;
1488 //
1489 // 12% Kaons (3% K0short, 3% K0long, 3% K+, 3% K-) T = 300 MeV
1490 AliGeVSimParticle *ks = new AliGeVSimParticle(kK0Short, 1, 0.03 * mm, 0.30, sigma_eta) ;
1491 AliGeVSimParticle *kl = new AliGeVSimParticle(kK0Long, 1, 0.03 * mm, 0.30, sigma_eta) ;
1492 AliGeVSimParticle *kp = new AliGeVSimParticle(kKPlus, 1, 0.03 * mm, 0.30, sigma_eta) ;
1493 AliGeVSimParticle *km = new AliGeVSimParticle(kKMinus, 1, 0.03 * mm, 0.30, sigma_eta) ;
1494 //
1495 // 10% Protons / Neutrons (5% Protons, 5% Neutrons) T = 250 MeV
1496 AliGeVSimParticle *pr = new AliGeVSimParticle(kProton, 1, 0.05 * mm, 0.25, sigma_eta) ;
1497 AliGeVSimParticle *ne = new AliGeVSimParticle(kNeutron, 1, 0.05 * mm, 0.25, sigma_eta) ;
1498 //
1499 // Set Elliptic Flow properties
1500
1501 Float_t pTsaturation = 2. ;
1502
1503 pp->SetEllipticParam(vn,pTsaturation,0.) ;
1504 pm->SetEllipticParam(vn,pTsaturation,0.) ;
1505 p0->SetEllipticParam(vn,pTsaturation,0.) ;
1506 pr->SetEllipticParam(vn,pTsaturation,0.) ;
1507 ne->SetEllipticParam(vn,pTsaturation,0.) ;
1508 ks->SetEllipticParam(vn,pTsaturation,0.) ;
1509 kl->SetEllipticParam(vn,pTsaturation,0.) ;
1510 kp->SetEllipticParam(vn,pTsaturation,0.) ;
1511 km->SetEllipticParam(vn,pTsaturation,0.) ;
1512 //
1513 // Set Direct Flow properties
1514 pp->SetDirectedParam(vn,1.0,0.) ;
1515 pm->SetDirectedParam(vn,1.0,0.) ;
1516 p0->SetDirectedParam(vn,1.0,0.) ;
1517 pr->SetDirectedParam(vn,1.0,0.) ;
1518 ne->SetDirectedParam(vn,1.0,0.) ;
1519 ks->SetDirectedParam(vn,1.0,0.) ;
1520 kl->SetDirectedParam(vn,1.0,0.) ;
1521 kp->SetDirectedParam(vn,1.0,0.) ;
1522 km->SetDirectedParam(vn,1.0,0.) ;
1523 //
1524 // Add particles to the list
1525 gener->AddParticleType(pp) ;
1526 gener->AddParticleType(pm) ;
1527 gener->AddParticleType(p0) ;
1528 gener->AddParticleType(pr) ;
1529 gener->AddParticleType(ne) ;
1530 gener->AddParticleType(ks) ;
1531 gener->AddParticleType(kl) ;
1532 gener->AddParticleType(kp) ;
1533 gener->AddParticleType(km) ;
1534 //
1535 // Random Ev.Plane ----------------------------------
1536 TF1 *rpa = new TF1("gevsimPsiRndm","1", 0, 360);
1537 // --------------------------------------------------
1538 gener->SetPtRange(0., 9.) ; // Use a resonable range! (used for bin size in numerical integration)
1539 gener->SetPhiRange(0, 360);
1540 //
1541 // Set pseudorapidity range
1542 Float_t thmin = EtaToTheta(+etamax);
1543 Float_t thmax = EtaToTheta(-etamax);
1544 gener->SetThetaRange(thmin,thmax);
1545 return gener;
27b7c1fb 1546}
1547
1548
1549
1550void ProcessEnvironmentVars()
1551{
1552 // Run type
1553 if (gSystem->Getenv("CONFIG_RUN_TYPE")) {
1554 for (Int_t iRun = 0; iRun < kRunMax; iRun++) {
1555 if (strcmp(gSystem->Getenv("CONFIG_RUN_TYPE"), pprRunName[iRun])==0) {
1556 srun = (PprRun_t)iRun;
1557 cout<<"Run type set to "<<pprRunName[iRun]<<endl;
1558 }
1559 }
1560 }
1561
1562 // Random Number seed
1563 if (gSystem->Getenv("CONFIG_SEED")) {
1564 sseed = atoi(gSystem->Getenv("CONFIG_SEED"));
1565 }
1566}