ACORDEv1 is now the default
[u/mrichter/AliRoot.git] / FMD / scripts / DummyConfig.C
CommitLineData
a9579262 1//____________________________________________________________________
2//
3// $Id$
4//
5// One can use the configuration macro in compiled mode by
6// root [0] gSystem->Load("libgeant321");
7// root [0] gSystem->SetIncludePath("-I$ROOTSYS/include -I$ALICE_ROOT/include\
8// -I$ALICE_ROOT -I$ALICE/geant3/TGeant3");
9// root [0] .x grun.C(1,"ConfigPPR.C++")
10//
11/** @file Config.C
12 @author Christian Holm Christensen <cholm@nbi.dk>
13 @date Mon Mar 27 12:50:29 2006
14 @brief Simulation configuration script
15*/
16//____________________________________________________________________
17//
18// Generator types
19//
20enum EG_t {
21 test50,
22 kParam_8000, //
23 kParam_4000, //
24 kParam_2000, //
25 kParam_fmd, //
26 kHijing_cent1, //
27 kHijing_cent2, //
28 kHijing_per1, //
29 kHijing_per2, //
30 kHijing_per3, //
31 kHijing_per4, //
32 kHijing_per5, //
33 kHijing_jj25, //
34 kHijing_jj50, //
35 kHijing_jj75, //
36 kHijing_jj100, //
37 kHijing_jj200, //
38 kHijing_gj25, //
39 kHijing_gj50, //
40 kHijing_gj75, //
41 kHijing_gj100, //
42 kHijing_gj200, //
43 kHijing_pA, //
44 kPythia6, //
45 kPythia6Jets20_24, //
46 kPythia6Jets24_29, //
47 kPythia6Jets29_35, //
48 kPythia6Jets35_42, //
49 kPythia6Jets42_50, //
50 kPythia6Jets50_60, //
51 kPythia6Jets60_72, //
52 kPythia6Jets72_86, //
53 kPythia6Jets86_104, //
54 kPythia6Jets104_125, //
55 kPythia6Jets125_150, //
56 kPythia6Jets150_180, //
57 kD0PbPb5500, //
58 kCharmSemiElPbPb5500, //
59 kBeautySemiElPbPb5500, //
60 kCocktailTRD, //
61 kPyJJ, //
62 kPyGJ, //
63 kMuonCocktailCent1, //
64 kMuonCocktailPer1, //
65 kMuonCocktailPer4, //
66 kMuonCocktailCent1HighPt, //
67 kMuonCocktailPer1HighPt, //
68 kMuonCocktailPer4HighPt, //
69 kMuonCocktailCent1Single, //
70 kMuonCocktailPer1Single, //
71 kMuonCocktailPer4Single,
72 kFMD1Flat,
73 kFMD2Flat,
74 kFMD3Flat,
75 kFMDFlat,
76 kEgMax
77};
78
79//____________________________________________________________________
80//
81// Generator types names
82//
83const char* egName[kEgMax] = {
84 "test50",
85 "kParam_8000", //
86 "kParam_4000", //
87 "kParam_2000", //
88 "kParam_fmd", //
89 "kHijing_cent1", //
90 "kHijing_cent2", //
91 "kHijing_per1", //
92 "kHijing_per2", //
93 "kHijing_per3", //
94 "kHijing_per4", //
95 "kHijing_per5", //
96 "kHijing_jj25", //
97 "kHijing_jj50", //
98 "kHijing_jj75", //
99 "kHijing_jj100", //
100 "kHijing_jj200", //
101 "kHijing_gj25", //
102 "kHijing_gj50", //
103 "kHijing_gj75", //
104 "kHijing_gj100", //
105 "kHijing_gj200", //
106 "kHijing_pA", //
107 "kPythia6", //
108 "kPythia6Jets20_24", //
109 "kPythia6Jets24_29", //
110 "kPythia6Jets29_35", //
111 "kPythia6Jets35_42", //
112 "kPythia6Jets42_50", //
113 "kPythia6Jets50_60", //
114 "kPythia6Jets60_72", //
115 "kPythia6Jets72_86", //
116 "kPythia6Jets86_104", //
117 "kPythia6Jets104_125", //
118 "kPythia6Jets125_150", //
119 "kPythia6Jets150_180", //
120 "kD0PbPb5500", //
121 "kCharmSemiElPbPb5500", //
122 "kBeautySemiElPbPb5500", //
123 "kCocktailTRD", //
124 "kPyJJ", //
125 "kPyGJ", //
126 "kMuonCocktailCent1", //
127 "kMuonCocktailPer1", //
128 "kMuonCocktailPer4", //
129 "kMuonCocktailCent1HighPt", //
130 "kMuonCocktailPer1HighPt", //
131 "kMuonCocktailPer4HighPt", //
132 "kMuonCocktailCent1Single", //
133 "kMuonCocktailPer1Single", //
134 "kMuonCocktailPer4Single",
135 "kFMD1Flat",
136 "kFMD2Flat",
137 "kFMD3Flat",
138 "kFMDFlat"
139};
140
141//____________________________________________________________________
142enum Geo_t {
143 kHoles, //
144 kNoHoles //
145};
146
147//____________________________________________________________________
148enum Rad_t {
149 kGluonRadiation, //
150 kNoGluonRadiation //
151};
152
153//____________________________________________________________________
154enum Mag_t {
155 k2kG, //
156 k4kG, //
157 k5kG //
158};
159
160//____________________________________________________________________
161enum MC_t {
162 kFLUKA,
163 kGEANT3,
164 kGEANT4,
165 kGEANT3TGEO,
166};
167
168//____________________________________________________________________
169// Functions
170Float_t EtaToTheta(Float_t eta);
171Eg_t LookupEG(const Char_t* name);
172AliGenerator* GeneratorFactory(EG_t eg, Rad_t rad, TString& comment);
173AliGenHijing* HijingStandard();
174void ProcessEnvironmentVars(EG_t& eg, Int_t& seed);
175
176//____________________________________________________________________
177void
178Config()
179{
180 //____________________________________________________________________
181 // This part for configuration
182 // EG_t eg = test50;
183 // EG_t eg = kParam_fmd;
184 EG_t eg = kParam_2000; // kPythia;
185 // EG_t eg = kFMDFlat;
186 Geo_t geo = kNoHoles;
187 Rad_t rad = kGluonRadiation;
188 Mag_t mag = k5kG;
189 Int_t seed = 12345; //Set 0 to use the current time
190 MC_t mc = kGEANT3TGEO;
191
192 //____________________________________________________________________
193 // Comment line
194 static TString comment;
195
196 //____________________________________________________________________
197 // Get settings from environment variables
198 ProcessEnvironmentVars(eg, seed);
199
200 //____________________________________________________________________
201 // Set Random Number seed
202 gRandom->SetSeed(seed);
203 cout<<"Seed for random number generation= "<<gRandom->GetSeed()<<endl;
204
205
206 //__________________________________________________________________
207 switch (mc) {
208 case kFLUKA:
209 //
210 // libraries required by fluka21
211 //
212 gSystem->Load("libGeom");
213 cout << "\t* Loading TFluka..." << endl;
214 gSystem->Load("libTFluka");
215 gSystem->MakeDirectory("peg");
216 //
217 // FLUKA MC
218 //
219 cout << "\t* Instantiating TFluka..." << endl;
220 new TFluka("C++ Interface to Fluka", 0/*verbosity*/);
221 break;
222 case kGEANT3:
223 {
224 //
225 // Libraries needed by GEANT 3.21
226 //
227 gSystem->Load("libgeant321");
228
229 //
230 // GEANT 3.21 MC
231 //
232 TGeant3* gmc = new TGeant3("C++ Interface to Geant3");
233 gmc->SetSWIT(4, 1000);
234 }
235 break;
236 case kGEANT3TGEO:
237 {
238 //
239 // Libraries needed by GEANT 3.21
240 //
241 gSystem->Load("libgeant321");
242
243 //
244 // GEANT 3.21 MC
245 //
246 TGeant3TGeo* gmc = new TGeant3TGeo("C++ Interface to Geant3");
247 gmc->SetSWIT(4, 1000);
248 Printf("Making a TGeant3TGeo objet");
249 }
250 break;
251 default:
252 gAlice->Fatal("Config.C", "No MC type chosen");
253 return;
254 }
255
256 //__________________________________________________________________
257 AliRunLoader* rl = 0;
258
259 cout<<"Config.C: Creating Run Loader ..."<<endl;
260 rl = AliRunLoader::Open("galice.root",
261 AliConfig::GetDefaultEventFolderName(),
262 "recreate");
263 if (!rl) {
264 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
265 return;
266 }
267 rl->SetCompressionLevel(2);
268 rl->SetNumberOfEventsPerFile(3);
269 gAlice->SetRunLoader(rl);
270
271 //__________________________________________________________________
272 // For FLUKA
273 switch (mc) {
274 case kFLUKA:
275 {
276 //
277 // Use kTRUE as argument to generate alice.pemf first
278 //
279 TString alice_pemf(gSystem->Which(".", "peg/mat17.pemf"));
280 if (!alice_pemf.IsNull())
281 ((TFluka*)gMC)->SetGeneratePemf(kFALSE);
282 else
283 ((TFluka*)gMC)->SetGeneratePemf(kTRUE);
284 TString flupro(gSystem->Getenv("FLUPRO"));
285 if (flupro.IsNull())
286 Fatal("Config.C", "Environment variable FLUPRO not set");
287#if 0
288 char* files[] = { "brems_fin.bin", "cohff.bin", "elasct.bin",
289 "gxsect.bin", "nuclear.bin", "sigmapi.bin",
290 0 };
291 char* file = files[0];
292 while (file) {
293 TString which(gSystem->Which(".", file));
294 if (which.IsNull()) {
295 if (gSystem->Symlink(Form("%s/%s", flupro.Data(), file), file)!=0)
296 Fatal("Config.C", "Couldn't link $(FLUPRO)/%s -> .", file);
297 }
298 file++;
299 }
300#endif
301 TString neuxsc(gSystem->Which(".", "neuxsc.bin"));
302 if (neuxsc.IsNull())
303 gSystem->Symlink(Form("%s/neuxsc_72.bin", flupro.Data()),
304 "neuxsc.bin");
305 gSystem->CopyFile("$(FLUPRO)/random.dat", "old.seed", kTRUE);
306 }
307 break;
308 }
309
310 //__________________________________________________________________
311 //
312 // Set External decayer
313#if 0
314 AliDecayer *decayer = new AliDecayerPythia();
315 switch (eg) {
316 case kD0PbPb5500: decayer->SetForceDecay(kHadronicD); break;
317 case kCharmSemiElPbPb5500: decayer->SetForceDecay(kSemiElectronic); break;
318 case kBeautySemiElPbPb5500: decayer->SetForceDecay(kSemiElectronic); break;
319 default: decayer->SetForceDecay(kAll); break;
320 }
321 decayer->Init();
322 gMC->SetExternalDecayer(decayer);
323#endif
324
325 //__________________________________________________________________
326 // *********** STEERING parameters FOR ALICE SIMULATION ************
327 // - Specify event type to be tracked through the ALICE setup
328 // - All positions are in cm, angles in degrees, and P and E in GeV
329 gMC->SetProcess("DCAY",1);
330 gMC->SetProcess("PAIR",1);
331 gMC->SetProcess("COMP",1);
332 gMC->SetProcess("PHOT",1);
333 gMC->SetProcess("PFIS",0);
334 gMC->SetProcess("DRAY",0);
335 gMC->SetProcess("ANNI",1);
336 gMC->SetProcess("BREM",1);
337 gMC->SetProcess("MUNU",1);
338 gMC->SetProcess("CKOV",1);
339 gMC->SetProcess("HADR",1);
340 gMC->SetProcess("LOSS",2);
341 gMC->SetProcess("MULS",1);
342 gMC->SetProcess("RAYL",1);
343
344 Float_t cut = 1.e-3; // 1MeV cut by default
345 Float_t tofmax = 1.e10;
346
347 gMC->SetCut("CUTGAM", cut);
348 gMC->SetCut("CUTELE", cut);
349 gMC->SetCut("CUTNEU", cut);
350 gMC->SetCut("CUTHAD", cut);
351 gMC->SetCut("CUTMUO", cut);
352 gMC->SetCut("BCUTE", cut);
353 gMC->SetCut("BCUTM", cut);
354 gMC->SetCut("DCUTE", cut);
355 gMC->SetCut("DCUTM", cut);
356 gMC->SetCut("PPCUTM", cut);
357 gMC->SetCut("TOFMAX", tofmax);
358
359
360 //__________________________________________________________________
361 // Generator Configuration
362 AliGenerator* gener = GeneratorFactory(eg, rad, comment);
363 gener->SetOrigin(0, 0, 0); // vertex position
364 gener->SetSigma(0, 0, 5.3); // Sigma in (X,Y,Z) (cm) on IP position
365 gener->SetCutVertexZ(1.); // Truncate at 1 sigma
366 gener->SetVertexSmear(kPerEvent);
367 gener->SetTrackingFlag(1);
368 gener->Init();
369
370 //__________________________________________________________________
371 //
372 // Comments
373 //
374 switch (mag) {
375 case k2kG: comment = comment.Append(" | L3 field 0.2 T"); break;
376 case k4kG: comment = comment.Append(" | L3 field 0.4 T"); break;
377 case k5kG: comment = comment.Append(" | L3 field 0.5 T"); break;
378 }
379
380 switch (rad) {
381 case kGluonRadiation:
382 comment = comment.Append(" | Gluon Radiation On"); break;
383 default:
384 comment = comment.Append(" | Gluon Radiation Off"); break;
385 }
386
387 switch(geo) {
388 case kHoles: comment = comment.Append(" | Holes for PHOS/HMPID"); break;
389 default: comment = comment.Append(" | No holes for PHOS/HMPID"); break;
390 }
391
392 std::cout << "\n\n Comment: " << comment << "\n" << std::endl;
393
394 //__________________________________________________________________
395 // Field (L3 0.4 T)
396 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., mag);
397 field->SetL3ConstField(0); //Using const. field in the barrel
398 rl->CdGAFile();
399 gAlice->SetField(field);
400
401 //__________________________________________________________________
402 //
403 // Used detectors
404 //
405 Bool_t useABSO = kTRUE;
406 Bool_t useACORDE= kFALSE;
407 Bool_t useDIPO = kFALSE;
408 Bool_t useFMD = kTRUE;
409 Bool_t useFRAME = kFALSE;
410 Bool_t useHALL = kFALSE;
411 Bool_t useITS = kTRUE;
412 Bool_t useMAG = kFALSE;
413 Bool_t useMUON = kFALSE;
414 Bool_t usePHOS = kFALSE;
415 Bool_t usePIPE = kFALSE;
416 Bool_t usePMD = kFALSE;
417 Bool_t useHMPID = kFALSE;
418 Bool_t useSHIL = kFALSE;
419 Bool_t useT0 = kTRUE;
420 Bool_t useTOF = kFALSE;
421 Bool_t useTPC = kFALSE;
422 Bool_t useTRD = kFALSE;
423 Bool_t useZDC = kFALSE;
424 Bool_t useEMCAL = kFALSE;
425 Bool_t useVZERO = kTRUE;
426
427 gROOT->LoadMacro("LoadDummy.C");
428 cout << "\t* Creating the detectors ..." << endl;
429 // ================= Alice BODY parameters =========================
430 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
431
432
433 if (useMAG) {
434 // =================== MAG parameters ============================
435 // Start with Magnet since detector layouts may be depending on
436 // the selected Magnet dimensions
437 AliMAG *MAG = new AliMAG("MAG", "Magnet");
438 }
439
440 if (useABSO) {
441 // =================== ABSO parameters ===========================
442 AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
443 }
444
445 if (useDIPO) {
446 // =================== DIPO parameters ===========================
447 AliDIPO *DIPO = new DummyABSO("DIPO");
448 }
449
450 if (useHALL) {
451 // =================== HALL parameters ===========================
452 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
453 }
454
455
456 if (useFRAME) {
457 // ================== FRAME parameters ===========================
458 AliFRAMEv2 *FRAME = new DummyFRAME("FRAME");
459 switch (geo) {
460 case kHoles: FRAME->SetHoles(1); break;
461 default: FRAME->SetHoles(0); break;
462 }
463 }
464
465 if (useSHIL) {
466 // ================== SHIL parameters ============================
467 AliSHIL *SHIL = new DummySHIl("SHIL");
468 }
469
470
471 if (usePIPE) {
472 // ================== PIPE parameters ============================
473 AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
474 }
475
476 if (useITS) {
477 // =================== ITS parameters ============================
478 //
479 // As the innermost detector in ALICE, the Inner Tracking System
480 // "impacts" on almost all other detectors. This involves the fact
481 // that the ITS geometry still has several options to be followed
482 // in parallel in order to determine the best set-up which
483 // minimizes the induced background. All the geometries available
484 // to date are described in the following. Read carefully the
485 // comments and use the default version (the only one uncommented)
486 // unless you are making comparisons and you know what you are
487 // doing. In this case just uncomment the ITS geometry you want to
488 // use and run Aliroot.
489 //
490 // Detailed geometries:
491 //
492 //
493 // AliITS *ITS =
494 // new AliITSv5symm("ITS", "Updated ITS TDR detailed version "
495 // "with symmetric services");
496 // AliITS *ITS =
497 // new AliITSv5asymm("ITS","Updates ITS TDR detailed version "
498 // "with asymmetric services");
499 //
500 AliITSvPPRasymmFMD *ITS = new DummyITS("ITS");
501 // new AliITSvPPRasymmFMD("ITS","New ITS PPR detailed version "
502 // "with asymmetric services")
503 // don't touch this parameter if you're not an ITS developer
504 ITS->SetMinorVersion(2);
505 // don't touch this parameter if you're not an ITS developer
506 ITS->SetReadDet(kTRUE);
507 // don't touch this parameter if you're not an ITS developer
508 // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det");
509 // detector thickness on layer 1 must be in the range [100,300]
510 ITS->SetThicknessDet1(200.);
511 // detector thickness on layer 2 must be in the range [100,300]
512 ITS->SetThicknessDet2(200.);
513 // chip thickness on layer 1 must be in the range [150,300]
514 ITS->SetThicknessChip1(200.);
515 // chip thickness on layer 2 must be in the range [150,300]
516 ITS->SetThicknessChip2(200.);
517 // 1 --> rails in ; 0 --> rails out
518 ITS->SetRails(0);
519 // 1 --> water ; 0 --> freon
520 ITS->SetCoolingFluid(1);
521
522 // Coarse geometries (warning: no hits are produced with these
523 // coarse geometries and they unuseful for reconstruction !):
524 //
525 //
526 // AliITSvPPRcoarseasymm *ITS =
527 // new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version "
528 // "with asymmetric services");
529 // 1 --> rails in ; 0 --> rails out
530 // ITS->SetRails(0);
531 // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
532 // ITS->SetSupportMaterial(0);
533 //
534 // AliITS *ITS =
535 // new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version "
536 // "with symmetric services");
537 // 1 --> rails in ; 0 --> rails out
538 // ITS->SetRails(0);
539 // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
540 // ITS->SetSupportMaterial(0);
541 //
542 // Geant3 <-> EUCLID conversion
543 // ============================
544 //
545 // SetEUCLID is a flag to output (=1) or not to output (=0) both
546 // geometry and media to two ASCII files (called by default
547 // ITSgeometry.euc and ITSgeometry.tme) in a format understandable
548 // to the CAD system EUCLID. The default (=0) means that you dont
549 // want to use this facility.
550 //
551 ITS->SetEUCLID(0);
552 }
553
554 if (useTPC) {
555 // =================== TPC parameters ============================
556 //
557 // This allows the user to specify sectors for the SLOW (TPC
558 // geometry 2) Simulator. SecAL (SecAU) <0 means that ALL lower
559 // (upper) sectors are specified, any value other than that
560 // requires at least one sector (lower or upper)to be specified!
561 //
562 // Reminder:
563 // sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
564 // sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
565 //
566 // SecLows - number of lower sectors specified (up to 6)
567 // SecUps - number of upper sectors specified (up to 12)
568 // Sens - sensitive strips for the Slow Simulator !!!
569 //
570 // This does NOT work if all S or L-sectors are specified, i.e.
571 // if SecAL or SecAU < 0
572 //
573 //
574 //----------------------------------------------------------------
575 // gROOT->LoadMacro("SetTPCParam.C");
576 // AliTPCParam *param = SetTPCParam();
577 AliTPC *TPC = new DummyTPC("TPC");
578 }
579
580 if (useTOF) {
581 // ================== TOF parameters =============================
582 AliTOF *TOF = new DummyTOF("TOF");
583 }
584
585 if (useHMPID) {
586 // ================== HMPID parameters ============================
587 AliHMPID *HMPID = new DummyHMPID("HMPID");
588
589 }
590
591 if (useZDC) {
592 // ================== ZDC parameters =============================
593 AliZDC *ZDC = new DummyZDC("ZDC");
594 }
595
596 if (useTRD) {
597 // ================== TRD parameters =============================
598 AliTRD *TRD = new DummyTRD("TRD");
599
600 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
601 TRD->SetGasMix(1);
602 if (geo == kHoles) {
603 // With hole in front of PHOS
604 TRD->SetPHOShole();
605 // With hole in front of HMPID
606 TRD->SetHMPIDhole();
607 }
608 // Switch on TR
609 AliTRDsim *TRDsim = TRD->CreateTR();
610 }
611
612 if (useFMD) {
613 // =================== FMD parameters ============================
614 // AliLog::SetModuleDebugLevel("FMD", 15);
615 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
616 // FMD->UseDetailed(kFALSE);
617 // FMD->UseAssembly();
618 // FMD->UseOld();
619 }
620
621 if (useMUON) {
622 // =================== MUON parameters ===========================
623 AliMUON *MUON = new DummyMUON("MUON");
624 // MUON->AddGeometryBuilder(new AliMUONSt1GeometryBuilder(MUON));
625 // MUON->AddGeometryBuilder(new AliMUONSt2GeometryBuilder(MUON));
626 // MUON->AddGeometryBuilder(new AliMUONSlatGeometryBuilder(MUON));
627 // MUON->AddGeometryBuilder(new AliMUONTriggerGeometryBuilder(MUON));
628 }
629
630 if (usePHOS) {
631 // =================== PHOS parameters ===========================
632 AliPHOS *PHOS = new DummyPHOS("PHOS");
633 }
634
635 if (usePMD) {
636 // =================== PMD parameters ============================
637 AliPMD *PMD = new DummyPMD("PMD");
638 }
639
640 if (useT0) {
641 // =================== T0 parameters ==========================
642 AliT0 *T0 = new DummyT0("T0");
643 }
644
645 if (useEMCAL) {
646 // =================== EMCAL parameters ==========================
647 AliEMCAL *EMCAL = new DummyEMCAL("EMCAL");
648 }
649
650 if (useACORDE) {
651 // =================== ACORDE parameters ============================
f7882672 652 AliACORDE *ACORDE = new AliACORDEv1("ACORDE", "normal ACORDE");
a9579262 653 }
654
655 if (useVZERO) {
656 // =================== V0 parameters =============================
657 AliVZERO *VZERO = new DummyVZERO("VZERO");
658 }
659}
660
661//____________________________________________________________________
662Float_t EtaToTheta(Float_t arg)
663{
664 return (180./TMath::Pi())*2.*TMath::ATan(TMath::Exp(-arg));
665}
666
667//____________________________________________________________________
668Int_t
669LookupEG(const Char_t* name)
670{
671 TString n(name);
672 for (Int_t i = 0; i < kEgMax; i++) {
673 if (n == egName[i]) return i;
674 }
675 return -1;
676}
677
678//____________________________________________________________________
679AliGenerator*
680GeneratorFactory(EG_t eg, Rad_t rad, TString& comment)
681{
682 Int_t isw = 3;
683 if (rad == kNoGluonRadiation) isw = 0;
684
685
686 AliGenerator * gGener = 0;
687 switch (eg) {
688 case test50:
689 {
690 comment = comment.Append(":HIJINGparam test 50 particles");
691 AliGenHIJINGpara *gener = new AliGenHIJINGpara(50);
692 gener->SetMomentumRange(0, 999999.);
693 gener->SetPhiRange(0., 360.);
694 // Set pseudorapidity range from -8 to 8.
695 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
696 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
697 gener->SetThetaRange(thmin,thmax);
698 gGener=gener;
699 }
700 break;
701 case kParam_8000:
702 {
703 comment = comment.Append(":HIJINGparam N=8000");
704 AliGenHIJINGpara *gener = new AliGenHIJINGpara(86030);
705 gener->SetMomentumRange(0, 999999.);
706 gener->SetPhiRange(0., 360.);
707 // Set pseudorapidity range from -8 to 8.
708 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
709 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
710 gener->SetThetaRange(thmin,thmax);
711 gGener=gener;
712 }
713 break;
714 case kParam_4000:
715 {
716 comment = comment.Append("HIJINGparam N=4000");
717 AliGenHIJINGpara *gener = new AliGenHIJINGpara(43015);
718 gener->SetMomentumRange(0, 999999.);
719 gener->SetPhiRange(0., 360.);
720 // Set pseudorapidity range from -8 to 8.
721 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
722 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
723 gener->SetThetaRange(thmin,thmax);
724 gGener=gener;
725 }
726 break;
727 case kParam_2000:
728 {
729 comment = comment.Append("HIJINGparam N=2000");
730 AliGenHIJINGpara *gener = new AliGenHIJINGpara(21507);
731 gener->SetMomentumRange(0, 999999.);
732 gener->SetPhiRange(0., 360.);
733 // Set pseudorapidity range from -8 to 8.
734 Float_t thmin = EtaToTheta(9); // theta min. <---> eta max
735 Float_t thmax = EtaToTheta(-9); // theta max. <---> eta min
736 gener->SetThetaRange(thmin,thmax);
737 gGener=gener;
738 }
739 break;
740 case kParam_fmd:
741 {
742 comment = comment.Append("HIJINGparam N=100");
743 AliGenHIJINGpara *gener = new AliGenHIJINGpara(500);
744 gener->SetMomentumRange(0, 999999.);
745 gener->SetPhiRange(0., 360.);
746 // Set pseudorapidity range from -8 to 8.
747 Float_t thmin = EtaToTheta(6); // theta min. <---> eta max
748 Float_t thmax = EtaToTheta(2); // theta max. <---> eta min
749 gener->SetThetaRange(thmin,thmax);
750 gGener=gener;
751 }
752 break;
753 //
754 // Hijing Central
755 //
756 case kHijing_cent1:
757 {
758 comment = comment.Append("HIJING cent1");
759 AliGenHijing *gener = HijingStandard();
760 // impact parameter range
761 gener->SetImpactParameterRange(0., 5.);
762 gGener=gener;
763 }
764 break;
765 case kHijing_cent2:
766 {
767 comment = comment.Append("HIJING cent2");
768 AliGenHijing *gener = HijingStandard();
769 // impact parameter range
770 gener->SetImpactParameterRange(0., 2.);
771 gGener=gener;
772 }
773 break;
774 //
775 // Hijing Peripheral
776 //
777 case kHijing_per1:
778 {
779 comment = comment.Append("HIJING per1");
780 AliGenHijing *gener = HijingStandard();
781 // impact parameter range
782 gener->SetImpactParameterRange(5., 8.6);
783 gGener=gener;
784 }
785 break;
786 case kHijing_per2:
787 {
788 comment = comment.Append("HIJING per2");
789 AliGenHijing *gener = HijingStandard();
790 // impact parameter range
791 gener->SetImpactParameterRange(8.6, 11.2);
792 gGener=gener;
793 }
794 break;
795 case kHijing_per3:
796 {
797 comment = comment.Append("HIJING per3");
798 AliGenHijing *gener = HijingStandard();
799 // impact parameter range
800 gener->SetImpactParameterRange(11.2, 13.2);
801 gGener=gener;
802 }
803 break;
804 case kHijing_per4:
805 {
806 comment = comment.Append("HIJING per4");
807 AliGenHijing *gener = HijingStandard();
808 // impact parameter range
809 gener->SetImpactParameterRange(13.2, 15.);
810 gGener=gener;
811 }
812 break;
813 case kHijing_per5:
814 {
815 comment = comment.Append("HIJING per5");
816 AliGenHijing *gener = HijingStandard();
817 // impact parameter range
818 gener->SetImpactParameterRange(15., 100.);
819 gGener=gener;
820 }
821 break;
822 //
823 // Jet-Jet
824 //
825 case kHijing_jj25:
826 {
827 comment = comment.Append("HIJING Jet 25 GeV");
828 AliGenHijing *gener = HijingStandard();
829 // impact parameter range
830 gener->SetImpactParameterRange(0., 5.);
831 // trigger
832 gener->SetTrigger(1);
833 gener->SetPtJet(25.);
834 gener->SetRadiation(isw);
835 gener->SetSimpleJets(!isw);
836 gener->SetJetEtaRange(-0.3,0.3);
837 gener->SetJetPhiRange(75., 165.);
838 gGener=gener;
839 }
840 break;
841
842 case kHijing_jj50:
843 {
844 comment = comment.Append("HIJING Jet 50 GeV");
845 AliGenHijing *gener = HijingStandard();
846 // impact parameter range
847 gener->SetImpactParameterRange(0., 5.);
848 // trigger
849 gener->SetTrigger(1);
850 gener->SetPtJet(50.);
851 gener->SetRadiation(isw);
852 gener->SetSimpleJets(!isw);
853 gener->SetJetEtaRange(-0.3,0.3);
854 gener->SetJetPhiRange(75., 165.);
855 gGener=gener;
856 }
857 break;
858
859 case kHijing_jj75:
860 {
861 comment = comment.Append("HIJING Jet 75 GeV");
862 AliGenHijing *gener = HijingStandard();
863 // impact parameter range
864 gener->SetImpactParameterRange(0., 5.);
865 // trigger
866 gener->SetTrigger(1);
867 gener->SetPtJet(75.);
868 gener->SetRadiation(isw);
869 gener->SetSimpleJets(!isw);
870 gener->SetJetEtaRange(-0.3,0.3);
871 gener->SetJetPhiRange(75., 165.);
872 gGener=gener;
873 }
874 break;
875
876 case kHijing_jj100:
877 {
878 comment = comment.Append("HIJING Jet 100 GeV");
879 AliGenHijing *gener = HijingStandard();
880 // impact parameter range
881 gener->SetImpactParameterRange(0., 5.);
882 // trigger
883 gener->SetTrigger(1);
884 gener->SetPtJet(100.);
885 gener->SetRadiation(isw);
886 gener->SetSimpleJets(!isw);
887 gener->SetJetEtaRange(-0.3,0.3);
888 gener->SetJetPhiRange(75., 165.);
889 gGener=gener;
890 }
891 break;
892
893 case kHijing_jj200:
894 {
895 comment = comment.Append("HIJING Jet 200 GeV");
896 AliGenHijing *gener = HijingStandard();
897 // impact parameter range
898 gener->SetImpactParameterRange(0., 5.);
899 // trigger
900 gener->SetTrigger(1);
901 gener->SetPtJet(200.);
902 gener->SetRadiation(isw);
903 gener->SetSimpleJets(!isw);
904 gener->SetJetEtaRange(-0.3,0.3);
905 gener->SetJetPhiRange(75., 165.);
906 gGener=gener;
907 }
908 break;
909 //
910 // Gamma-Jet
911 //
912 case kHijing_gj25:
913 {
914 comment = comment.Append("HIJING Gamma 25 GeV");
915 AliGenHijing *gener = HijingStandard();
916 // impact parameter range
917 gener->SetImpactParameterRange(0., 5.);
918 // trigger
919 gener->SetTrigger(2);
920 gener->SetPtJet(25.);
921 gener->SetRadiation(isw);
922 gener->SetSimpleJets(!isw);
923 gener->SetJetEtaRange(-0.12, 0.12);
924 gener->SetJetPhiRange(220., 320.);
925 gGener=gener;
926 }
927 break;
928
929 case kHijing_gj50:
930 {
931 comment = comment.Append("HIJING Gamma 50 GeV");
932 AliGenHijing *gener = HijingStandard();
933 // impact parameter range
934 gener->SetImpactParameterRange(0., 5.);
935 // trigger
936 gener->SetTrigger(2);
937 gener->SetPtJet(50.);
938 gener->SetRadiation(isw);
939 gener->SetSimpleJets(!isw);
940 gener->SetJetEtaRange(-0.12, 0.12);
941 gener->SetJetPhiRange(220., 320.);
942 gGener=gener;
943 }
944 break;
945
946 case kHijing_gj75:
947 {
948 comment = comment.Append("HIJING Gamma 75 GeV");
949 AliGenHijing *gener = HijingStandard();
950 // impact parameter range
951 gener->SetImpactParameterRange(0., 5.);
952 // trigger
953 gener->SetTrigger(2);
954 gener->SetPtJet(75.);
955 gener->SetRadiation(isw);
956 gener->SetSimpleJets(!isw);
957 gener->SetJetEtaRange(-0.12, 0.12);
958 gener->SetJetPhiRange(220., 320.);
959 gGener=gener;
960 }
961 break;
962
963 case kHijing_gj100:
964 {
965 comment = comment.Append("HIJING Gamma 100 GeV");
966 AliGenHijing *gener = HijingStandard();
967 // impact parameter range
968 gener->SetImpactParameterRange(0., 5.);
969 // trigger
970 gener->SetTrigger(2);
971 gener->SetPtJet(100.);
972 gener->SetRadiation(isw);
973 gener->SetSimpleJets(!isw);
974 gener->SetJetEtaRange(-0.12, 0.12);
975 gener->SetJetPhiRange(220., 320.);
976 gGener=gener;
977 }
978 break;
979
980 case kHijing_gj200:
981 {
982 comment = comment.Append("HIJING Gamma 200 GeV");
983 AliGenHijing *gener = HijingStandard();
984 // impact parameter range
985 gener->SetImpactParameterRange(0., 5.);
986 // trigger
987 gener->SetTrigger(2);
988 gener->SetPtJet(200.);
989 gener->SetRadiation(isw);
990 gener->SetSimpleJets(!isw);
991 gener->SetJetEtaRange(-0.12, 0.12);
992 gener->SetJetPhiRange(220., 320.);
993 gGener=gener;
994 }
995 break;
996 case kHijing_pA:
997 {
998 comment = comment.Append("HIJING pA");
999
1000 AliGenCocktail *gener = new AliGenCocktail();
1001
1002 AliGenHijing *hijing = new AliGenHijing(-1);
1003 // centre of mass energy
1004 hijing->SetEnergyCMS(TMath::Sqrt(82./208.) * 14000.);
1005 // impact parameter range
1006 hijing->SetImpactParameterRange(0., 15.);
1007 // reference frame
1008 hijing->SetReferenceFrame("CMS");
1009 hijing->SetBoostLHC(1);
1010 // projectile
1011 hijing->SetProjectile("P", 1, 1);
1012 hijing->SetTarget ("A", 208, 82);
1013 // tell hijing to keep the full parent child chain
1014 hijing->KeepFullEvent();
1015 // enable jet quenching
1016 hijing->SetJetQuenching(0);
1017 // enable shadowing
1018 hijing->SetShadowing(1);
1019 // Don't track spectators
1020 hijing->SetSpectators(0);
1021 // kinematic selection
1022 hijing->SetSelectAll(0);
1023 //
1024 AliGenSlowNucleons* gray = new AliGenSlowNucleons(1);
1025 AliSlowNucleonModel* model = new AliSlowNucleonModelExp();
1026 gray->SetSlowNucleonModel(model);
1027 gray->SetDebug(1);
1028 gener->AddGenerator(hijing,"Hijing pPb", 1);
1029 gener->AddGenerator(gray, "Gray Particles",1);
1030 gGener=gener;
1031 }
1032 break;
1033 case kPythia6:
1034 {
1035 comment = comment.Append(":Pythia p-p @ 14 TeV");
1036 AliGenPythia *gener = new AliGenPythia(-1);
1037 gener->SetMomentumRange(0,999999);
1038 gener->SetThetaRange(0., 180.);
1039 gener->SetYRange(-12,12);
1040 gener->SetPtRange(0,1000);
1041 gener->SetProcess(kPyMb);
1042 gener->SetEnergyCMS(14000.);
1043 gGener=gener;
1044 }
1045 break;
1046 case kPythia6Jets20_24:
1047 {
1048 comment = comment.Append(":Pythia jets 20-24 GeV @ 5.5 TeV");
1049 AliGenPythia * gener = new AliGenPythia(-1);
1050 gener->SetEnergyCMS(5500.);// Centre of mass energy
1051 gener->SetProcess(kPyJets);// Process type
1052 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
1053 gener->SetJetPhiRange(0., 360.);
1054 gener->SetJetEtRange(10., 1000.);
1055 gener->SetGluonRadiation(1,1);
1056 // gener->SetPtKick(0.);
1057 // Structure function
1058 gener->SetStrucFunc(kCTEQ4L);
1059 gener->SetPtHard(20., 24.);// Pt transfer of the hard scattering
1060 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
1061 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
1062 gGener=gener;
1063 }
1064 break;
1065 case kPythia6Jets24_29:
1066 {
1067 comment = comment.Append(":Pythia jets 24-29 GeV @ 5.5 TeV");
1068 AliGenPythia * gener = new AliGenPythia(-1);
1069 gener->SetEnergyCMS(5500.);// Centre of mass energy
1070 gener->SetProcess(kPyJets);// Process type
1071 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
1072 gener->SetJetPhiRange(0., 360.);
1073 gener->SetJetEtRange(10., 1000.);
1074 gener->SetGluonRadiation(1,1);
1075 // gener->SetPtKick(0.);
1076 // Structure function
1077 gener->SetStrucFunc(kCTEQ4L);
1078 gener->SetPtHard(24., 29.);// Pt transfer of the hard scattering
1079 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
1080 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
1081 gGener=gener;
1082 }
1083 break;
1084 case kPythia6Jets29_35:
1085 {
1086 comment = comment.Append(":Pythia jets 29-35 GeV @ 5.5 TeV");
1087 AliGenPythia * gener = new AliGenPythia(-1);
1088 gener->SetEnergyCMS(5500.);// Centre of mass energy
1089 gener->SetProcess(kPyJets);// Process type
1090 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
1091 gener->SetJetPhiRange(0., 360.);
1092 gener->SetJetEtRange(10., 1000.);
1093 gener->SetGluonRadiation(1,1);
1094 // gener->SetPtKick(0.);
1095 // Structure function
1096 gener->SetStrucFunc(kCTEQ4L);
1097 gener->SetPtHard(29., 35.);// Pt transfer of the hard scattering
1098 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
1099 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
1100 gGener=gener;
1101 }
1102 break;
1103 case kPythia6Jets35_42:
1104 {
1105 comment = comment.Append(":Pythia jets 35-42 GeV @ 5.5 TeV");
1106 AliGenPythia * gener = new AliGenPythia(-1);
1107 gener->SetEnergyCMS(5500.);// Centre of mass energy
1108 gener->SetProcess(kPyJets);// Process type
1109 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
1110 gener->SetJetPhiRange(0., 360.);
1111 gener->SetJetEtRange(10., 1000.);
1112 gener->SetGluonRadiation(1,1);
1113 // gener->SetPtKick(0.);
1114 // Structure function
1115 gener->SetStrucFunc(kCTEQ4L);
1116 gener->SetPtHard(35., 42.);// Pt transfer of the hard scattering
1117 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
1118 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
1119 gGener=gener;
1120 }
1121 break;
1122 case kPythia6Jets42_50:
1123 {
1124 comment = comment.Append(":Pythia jets 42-50 GeV @ 5.5 TeV");
1125 AliGenPythia * gener = new AliGenPythia(-1);
1126 gener->SetEnergyCMS(5500.);// Centre of mass energy
1127 gener->SetProcess(kPyJets);// Process type
1128 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
1129 gener->SetJetPhiRange(0., 360.);
1130 gener->SetJetEtRange(10., 1000.);
1131 gener->SetGluonRadiation(1,1);
1132 // gener->SetPtKick(0.);
1133 // Structure function
1134 gener->SetStrucFunc(kCTEQ4L);
1135 gener->SetPtHard(42., 50.);// Pt transfer of the hard scattering
1136 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
1137 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
1138 gGener=gener;
1139 }
1140 break;
1141 case kPythia6Jets50_60:
1142 {
1143 comment = comment.Append(":Pythia jets 50-60 GeV @ 5.5 TeV");
1144 AliGenPythia * gener = new AliGenPythia(-1);
1145 gener->SetEnergyCMS(5500.);// Centre of mass energy
1146 gener->SetProcess(kPyJets);// Process type
1147 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
1148 gener->SetJetPhiRange(0., 360.);
1149 gener->SetJetEtRange(10., 1000.);
1150 gener->SetGluonRadiation(1,1);
1151 // gener->SetPtKick(0.);
1152 // Structure function
1153 gener->SetStrucFunc(kCTEQ4L);
1154 gener->SetPtHard(50., 60.);// Pt transfer of the hard scattering
1155 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
1156 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
1157 gGener=gener;
1158 }
1159 break;
1160 case kPythia6Jets60_72:
1161 {
1162 comment = comment.Append(":Pythia jets 60-72 GeV @ 5.5 TeV");
1163 AliGenPythia * gener = new AliGenPythia(-1);
1164 gener->SetEnergyCMS(5500.);// Centre of mass energy
1165 gener->SetProcess(kPyJets);// Process type
1166 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
1167 gener->SetJetPhiRange(0., 360.);
1168 gener->SetJetEtRange(10., 1000.);
1169 gener->SetGluonRadiation(1,1);
1170 // gener->SetPtKick(0.);
1171 // Structure function
1172 gener->SetStrucFunc(kCTEQ4L);
1173 gener->SetPtHard(60., 72.);// Pt transfer of the hard scattering
1174 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
1175 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
1176 gGener=gener;
1177 }
1178 break;
1179 case kPythia6Jets72_86:
1180 {
1181 comment = comment.Append(":Pythia jets 72-86 GeV @ 5.5 TeV");
1182 AliGenPythia * gener = new AliGenPythia(-1);
1183 gener->SetEnergyCMS(5500.);// Centre of mass energy
1184 gener->SetProcess(kPyJets);// Process type
1185 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
1186 gener->SetJetPhiRange(0., 360.);
1187 gener->SetJetEtRange(10., 1000.);
1188 gener->SetGluonRadiation(1,1);
1189 // gener->SetPtKick(0.);
1190 // Structure function
1191 gener->SetStrucFunc(kCTEQ4L);
1192 gener->SetPtHard(72., 86.);// Pt transfer of the hard scattering
1193 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
1194 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
1195 gGener=gener;
1196 }
1197 break;
1198 case kPythia6Jets86_104:
1199 {
1200 comment = comment.Append(":Pythia jets 86-104 GeV @ 5.5 TeV");
1201 AliGenPythia * gener = new AliGenPythia(-1);
1202 gener->SetEnergyCMS(5500.);// Centre of mass energy
1203 gener->SetProcess(kPyJets);// Process type
1204 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
1205 gener->SetJetPhiRange(0., 360.);
1206 gener->SetJetEtRange(10., 1000.);
1207 gener->SetGluonRadiation(1,1);
1208 // gener->SetPtKick(0.);
1209 // Structure function
1210 gener->SetStrucFunc(kCTEQ4L);
1211 gener->SetPtHard(86., 104.);// Pt transfer of the hard scattering
1212 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
1213 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
1214 gGener=gener;
1215 }
1216 break;
1217 case kPythia6Jets104_125:
1218 {
1219 comment = comment.Append(":Pythia jets 105-125 GeV @ 5.5 TeV");
1220 AliGenPythia * gener = new AliGenPythia(-1);
1221 gener->SetEnergyCMS(5500.);// Centre of mass energy
1222 gener->SetProcess(kPyJets);// Process type
1223 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
1224 gener->SetJetPhiRange(0., 360.);
1225 gener->SetJetEtRange(10., 1000.);
1226 gener->SetGluonRadiation(1,1);
1227 // gener->SetPtKick(0.);
1228 // Structure function
1229 gener->SetStrucFunc(kCTEQ4L);
1230 gener->SetPtHard(104., 125.);// Pt transfer of the hard scattering
1231 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
1232 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
1233 gGener=gener;
1234 }
1235 break;
1236 case kPythia6Jets125_150:
1237 {
1238 comment = comment.Append(":Pythia jets 125-150 GeV @ 5.5 TeV");
1239 AliGenPythia * gener = new AliGenPythia(-1);
1240 gener->SetEnergyCMS(5500.);// Centre of mass energy
1241 gener->SetProcess(kPyJets);// Process type
1242 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
1243 gener->SetJetPhiRange(0., 360.);
1244 gener->SetJetEtRange(10., 1000.);
1245 gener->SetGluonRadiation(1,1);
1246 // gener->SetPtKick(0.);
1247 // Structure function
1248 gener->SetStrucFunc(kCTEQ4L);
1249 gener->SetPtHard(125., 150.);// Pt transfer of the hard scattering
1250 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
1251 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
1252 gGener=gener;
1253 }
1254 break;
1255 case kPythia6Jets150_180:
1256 {
1257 comment = comment.Append(":Pythia jets 150-180 GeV @ 5.5 TeV");
1258 AliGenPythia * gener = new AliGenPythia(-1);
1259 gener->SetEnergyCMS(5500.);// Centre of mass energy
1260 gener->SetProcess(kPyJets);// Process type
1261 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
1262 gener->SetJetPhiRange(0., 360.);
1263 gener->SetJetEtRange(10., 1000.);
1264 gener->SetGluonRadiation(1,1);
1265 // gener->SetPtKick(0.);
1266 // Structure function
1267 gener->SetStrucFunc(kCTEQ4L);
1268 gener->SetPtHard(150., 180.);// Pt transfer of the hard scattering
1269 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
1270 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
1271 gGener=gener;
1272 }
1273 break;
1274 case kD0PbPb5500:
1275 {
1276 comment = comment.Append(" D0 in Pb-Pb at 5.5 TeV");
1277 AliGenPythia * gener = new AliGenPythia(10);
1278 gener->SetProcess(kPyD0PbPbMNR);
1279 gener->SetStrucFunc(kCTEQ4L);
1280 gener->SetPtHard(2.1,-1.0);
1281 gener->SetEnergyCMS(5500.);
1282 gener->SetNuclei(208,208);
1283 gener->SetForceDecay(kHadronicD);
1284 gener->SetYRange(-2,2);
1285 gener->SetFeedDownHigherFamily(kFALSE);
1286 gener->SetStackFillOpt(AliGenPythia::kParentSelection);
1287 gener->SetCountMode(AliGenPythia::kCountParents);
1288 gGener=gener;
1289 }
1290 break;
1291 case kCharmSemiElPbPb5500:
1292 {
1293 comment = comment.Append(" Charm in Pb-Pb at 5.5 TeV");
1294 AliGenPythia * gener = new AliGenPythia(10);
1295 gener->SetProcess(kPyCharmPbPbMNR);
1296 gener->SetStrucFunc(kCTEQ4L);
1297 gener->SetPtHard(2.1,-1.0);
1298 gener->SetEnergyCMS(5500.);
1299 gener->SetNuclei(208,208);
1300 gener->SetForceDecay(kSemiElectronic);
1301 gener->SetYRange(-2,2);
1302 gener->SetFeedDownHigherFamily(kFALSE);
1303 gener->SetCountMode(AliGenPythia::kCountParents);
1304 gGener=gener;
1305 }
1306 break;
1307 case kBeautySemiElPbPb5500:
1308 {
1309 comment = comment.Append(" Beauty in Pb-Pb at 5.5 TeV");
1310 AliGenPythia *gener = new AliGenPythia(10);
1311 gener->SetProcess(kPyBeautyPbPbMNR);
1312 gener->SetStrucFunc(kCTEQ4L);
1313 gener->SetPtHard(2.75,-1.0);
1314 gener->SetEnergyCMS(5500.);
1315 gener->SetNuclei(208,208);
1316 gener->SetForceDecay(kSemiElectronic);
1317 gener->SetYRange(-2,2);
1318 gener->SetFeedDownHigherFamily(kFALSE);
1319 gener->SetCountMode(AliGenPythia::kCountParents);
1320 gGener=gener;
1321 }
1322 break;
1323 case kCocktailTRD:
1324 {
1325 comment = comment.Append(" Cocktail for TRD at 5.5 TeV");
1326 AliGenCocktail *gener = new AliGenCocktail();
1327
1328 AliGenParam *jpsi = new AliGenParam(10,
1329 new AliGenMUONlib(),
1330 AliGenMUONlib::kJpsiFamily,
1331 "Vogt PbPb");
1332
1333 jpsi->SetPtRange(0, 100);
1334 jpsi->SetYRange(-1., +1.);
1335 jpsi->SetForceDecay(kDiElectron);
1336
1337 AliGenParam *ups = new AliGenParam(10,
1338 new AliGenMUONlib(),
1339 AliGenMUONlib::kUpsilonFamily,
1340 "Vogt PbPb");
1341 ups->SetPtRange(0, 100);
1342 ups->SetYRange(-1., +1.);
1343 ups->SetForceDecay(kDiElectron);
1344
1345 AliGenParam *charm = new AliGenParam(10,
1346 new AliGenMUONlib(),
1347 AliGenMUONlib::kCharm,
1348 "central");
1349 charm->SetPtRange(0, 100);
1350 charm->SetYRange(-1.5, +1.5);
1351 charm->SetForceDecay(kSemiElectronic);
1352
1353
1354 AliGenParam *beauty = new AliGenParam(10,
1355 new AliGenMUONlib(),
1356 AliGenMUONlib::kBeauty,
1357 "central");
1358 beauty->SetPtRange(0, 100);
1359 beauty->SetYRange(-1.5, +1.5);
1360 beauty->SetForceDecay(kSemiElectronic);
1361
1362 gener->AddGenerator(jpsi,"J/psi",1);
1363 gener->AddGenerator(ups,"Upsilon",1);
1364 gener->AddGenerator(charm,"Charm",1);
1365 gener->AddGenerator(beauty,"Beauty",1);
1366 gGener=gener;
1367 }
1368 break;
1369 case kPyJJ:
1370 {
1371 comment = comment.Append(" Jet-jet at 5.5 TeV");
1372 AliGenPythia *gener = new AliGenPythia(-1);
1373 gener->SetEnergyCMS(5500.);
1374 gener->SetProcess(kPyJets);
1375 Double_t ptHardMin=10.0, ptHardMax=-1.0;
1376 gener->SetPtHard(ptHardMin,ptHardMax);
1377 gener->SetYHard(-0.7,0.7);
1378 gener->SetJetEtaRange(-0.2,0.2);
1379 gener->SetEventListRange(0,1);
1380 gGener=gener;
1381 }
1382 break;
1383 case kPyGJ:
1384 {
1385 comment = comment.Append(" Gamma-jet at 5.5 TeV");
1386 AliGenPythia *gener = new AliGenPythia(-1);
1387 gener->SetEnergyCMS(5500.);
1388 gener->SetProcess(kPyDirectGamma);
1389 Double_t ptHardMin=10.0, ptHardMax=-1.0;
1390 gener->SetPtHard(ptHardMin,ptHardMax);
1391 gener->SetYHard(-1.0,1.0);
1392 gener->SetGammaEtaRange(-0.13,0.13);
1393 gener->SetGammaPhiRange(210.,330.);
1394 gener->SetEventListRange(0,1);
1395 gGener=gener;
1396 }
1397 break;
1398 case kMuonCocktailCent1:
1399 {
1400 comment = comment.Append(" Muon Cocktail Cent1");
1401 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1402 gener->SetPtRange(1.0,100.); // Transverse momentum range
1403 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1404 gener->SetYRange(-4.0,-2.4);
1405 gener->SetMuonPtCut(0.8);
1406 gener->SetMuonThetaCut(171.,178.);
1407 gener->SetMuonMultiplicity(2);
1408 gener->SetNumberOfCollisions(1626.); //Centrality class Cent1 for PDC04
1409 gener->SetNumberOfParticipants(359.4);//Centrality class Cent1 for PDC04
1410 gGener=gener;
1411 }
1412 break;
1413 case kMuonCocktailPer1:
1414 {
1415 comment = comment.Append(" Muon Cocktail Per1");
1416 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1417 gener->SetPtRange(1.0,100.); // Transverse momentum range
1418 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1419 gener->SetYRange(-4.0,-2.4);
1420 gener->SetMuonPtCut(0.8);
1421 gener->SetMuonThetaCut(171.,178.);
1422 gener->SetMuonMultiplicity(2);
1423 gener->SetNumberOfCollisions(820.0);//Centrality class Per1 for PDC04
1424 gener->SetNumberOfParticipants(229.3);//Centrality class Per1 for PDC04
1425 gGener=gener;
1426 }
1427 break;
1428 case kMuonCocktailPer4:
1429 {
1430 comment = comment.Append(" Muon Cocktail Per4");
1431 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1432 gener->SetPtRange(1.0,100.); // Transverse momentum range
1433 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1434 gener->SetYRange(-4.0,-2.4);
1435 gener->SetMuonPtCut(0.8);
1436 gener->SetMuonThetaCut(171.,178.);
1437 gener->SetMuonMultiplicity(2);
1438 gener->SetNumberOfCollisions(13.6);//Centrality class Per4 for PDC04
1439 gener->SetNumberOfParticipants(13.3);//Centrality class Per4 for PDC04
1440 gGener=gener;
1441 }
1442 break;
1443 case kMuonCocktailCent1HighPt:
1444 {
1445 comment = comment.Append(" Muon Cocktail HighPt Cent1");
1446 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1447 gener->SetPtRange(1.0,100.); // Transverse momentum range
1448 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1449 gener->SetYRange(-4.0,-2.4);
1450 gener->SetMuonPtCut(2.5);
1451 gener->SetMuonThetaCut(171.,178.);
1452 gener->SetMuonMultiplicity(2);
1453 gener->SetNumberOfCollisions(1626.); //Centrality class Cent1 for PDC04
1454 gener->SetNumberOfParticipants(359.4);//Centrality class Cent1 for PDC04
1455 gGener=gener;
1456 }
1457 break;
1458 case kMuonCocktailPer1HighPt :
1459 {
1460 comment = comment.Append(" Muon Cocktail HighPt Per1");
1461 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1462 gener->SetPtRange(1.0,100.); // Transverse momentum range
1463 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1464 gener->SetYRange(-4.0,-2.4);
1465 gener->SetMuonPtCut(2.5);
1466 gener->SetMuonThetaCut(171.,178.);
1467 gener->SetMuonMultiplicity(2);
1468 gener->SetNumberOfCollisions(820.0);//Centrality class Per1 for PDC04
1469 gener->SetNumberOfParticipants(229.3);//Centrality class Per1 for PDC04
1470 gGener=gener;
1471 }
1472 break;
1473 case kMuonCocktailPer4HighPt:
1474 {
1475 comment = comment.Append(" Muon Cocktail HighPt Per4");
1476 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1477 gener->SetPtRange(1.0,100.); // Transverse momentum range
1478 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1479 gener->SetYRange(-4.0,-2.4);
1480 gener->SetMuonPtCut(2.5);
1481 gener->SetMuonThetaCut(171.,178.);
1482 gener->SetMuonMultiplicity(2);
1483 gener->SetNumberOfCollisions(13.6);//Centrality class Per4 for PDC04
1484 gener->SetNumberOfParticipants(13.3);//Centrality class Per4 for PDC04
1485 gGener=gener;
1486 }
1487 break;
1488 case kMuonCocktailCent1Single:
1489 {
1490 comment = comment.Append(" Muon Cocktail Single Cent1");
1491 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1492 gener->SetPtRange(1.0,100.); // Transverse momentum range
1493 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1494 gener->SetYRange(-4.0,-2.4);
1495 gener->SetMuonPtCut(0.8);
1496 gener->SetMuonThetaCut(171.,178.);
1497 gener->SetMuonMultiplicity(1);
1498 gener->SetNumberOfCollisions(1626.); //Centrality class Cent1 for PDC04
1499 gener->SetNumberOfParticipants(359.4);//Centrality class Cent1 for PDC04
1500 gGener=gener;
1501 }
1502 break;
1503 case kMuonCocktailPer1Single :
1504 {
1505 comment = comment.Append(" Muon Cocktail Single Per1");
1506 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1507 gener->SetPtRange(1.0,100.); // Transverse momentum range
1508 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1509 gener->SetYRange(-4.0,-2.4);
1510 gener->SetMuonPtCut(0.8);
1511 gener->SetMuonThetaCut(171.,178.);
1512 gener->SetMuonMultiplicity(1);
1513 gener->SetNumberOfCollisions(820.0);//Centrality class Per1 for PDC04
1514 gener->SetNumberOfParticipants(229.3);//Centrality class Per1 for PDC04
1515 gGener=gener;
1516 }
1517 break;
1518 case kMuonCocktailPer4Single:
1519 {
1520 comment = comment.Append(" Muon Cocktail Single Per4");
1521 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1522 gener->SetPtRange(1.0,100.); // Transverse momentum range
1523 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1524 gener->SetYRange(-4.0,-2.4);
1525 gener->SetMuonPtCut(0.8);
1526 gener->SetMuonThetaCut(171.,178.);
1527 gener->SetMuonMultiplicity(1);
1528 gener->SetNumberOfCollisions(13.6);//Centrality class Per4 for PDC04
1529 gener->SetNumberOfParticipants(13.3);//Centrality class Per4 for PDC04
1530 gGener=gener;
1531 }
1532 break;
1533 case kFMD1Flat:
1534 {
1535 comment = comment.Append(" Flat in FMD1 range");
1536 AliGenBox* gener = new AliGenBox(2000);
1537 gener->SetPart(211);
1538 gener->SetMomentumRange(3,4);
1539 gener->SetPhiRange(0, 360);
1540 gener->SetThetaRange(0.77, 3.08);
1541 gGener = gener;
1542 }
1543 break;
1544 case kFMD2Flat:
1545 {
1546 comment = comment.Append(" Flat in FMD2 range");
1547 AliGenBox* gener = new AliGenBox(2000);
1548 gener->SetPart(211);
1549 gener->SetMomentumRange(3,4);
1550 gener->SetPhiRange(0, 360);
1551 gener->SetThetaRange(2.95, 20.42);
1552 gGener = gener;
1553 }
1554 break;
1555 case kFMD3Flat:
1556 {
1557 comment = comment.Append(" Flat in FMD3 range");
1558 AliGenBox* gener = new AliGenBox(2000);
1559 gener->SetPart(211);
1560 gener->SetMomentumRange(3,4);
1561 gener->SetPhiRange(0, 360);
1562 gener->SetThetaRange(155.97, 176.73);
1563 gGener = gener;
1564 }
1565 break;
1566 case kFMDFlat:
1567 {
1568 comment = comment.Append(" Flat in FMD range");
1569 AliGenCocktail* gener = new AliGenCocktail();
1570 gener->SetMomentumRange(3,4);
1571 gener->SetPhiRange(0, 360);
1572 AliGenBox* gener3 = new AliGenBox(2000);
1573 gener3->SetThetaRange(155.97, 176.73);
1574 gener3->SetPart(211);
1575 gener->AddGenerator(gener3, "FMD3", .33);
1576 AliGenBox* gener2 = new AliGenBox(2000);
1577 gener2->SetThetaRange(2.95, 20.42);
1578 gener2->SetPart(211);
1579 gener->AddGenerator(gener2, "FMD2", .33);
1580 AliGenBox* gener1 = new AliGenBox(2000);
1581 gener1->SetThetaRange(0.77, 3.08);
1582 gener1->SetPart(211);
1583 gener->AddGenerator(gener1, "FMD1", .34);
1584 gGener = gener;
1585 }
1586 break;
1587
1588 default: break;
1589 }
1590 return gGener;
1591}
1592
1593//____________________________________________________________________
1594AliGenHijing*
1595HijingStandard()
1596{
1597 AliGenHijing *gener = new AliGenHijing(-1);
1598 // centre of mass energy
1599 gener->SetEnergyCMS(5500.);
1600 // reference frame
1601 gener->SetReferenceFrame("CMS");
1602 // projectile
1603 gener->SetProjectile("A", 208, 82);
1604 gener->SetTarget ("A", 208, 82);
1605 // tell hijing to keep the full parent child chain
1606 gener->KeepFullEvent();
1607 // enable jet quenching
1608 gener->SetJetQuenching(1);
1609 // enable shadowing
1610 gener->SetShadowing(1);
1611 // neutral pion and heavy particle decays switched off
1612 gener->SetDecaysOff(1);
1613 // Don't track spectators
1614 gener->SetSpectators(0);
1615 // kinematic selection
1616 gener->SetSelectAll(0);
1617 return gener;
1618}
1619
1620
1621//____________________________________________________________________
1622void
1623ProcessEnvironmentVars(EG_t& eg, Int_t& seed)
1624{
1625 // Run type
1626 if (gSystem->Getenv("CONFIG_RUN_TYPE")) {
1627 Int_t eg1 = LookupEG(gSystem->Getenv("CONFIG_RUN_TYPE"));
1628 if (eg1 >= 0) eg = EG_t(eg1);
1629 }
1630 // Random Number seed
1631 if (gSystem->Getenv("CONFIG_SEED")) {
1632 seed = atoi(gSystem->Getenv("CONFIG_SEED"));
1633 }
1634}
1635
1636//____________________________________________________________________
1637//
1638// EOF
1639//