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