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