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