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