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