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