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