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