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