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