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