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