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