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