Added code to put N_primary and N_total into all SDigits.
[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//
c2fc1258 11/** @file Config.C
12 @author Christian Holm Christensen <cholm@nbi.dk>
13 @date Mon Mar 27 12:50:29 2006
14 @brief Simulation configuration script
15*/
0d0e6995 16
7684b53c 17//____________________________________________________________________
18//
19// Generator types
20//
21enum EG_t {
0d0e6995 22 test50,
7684b53c 23 kParam_8000, //
24 kParam_4000, //
25 kParam_2000, //
824466d5 26 kParam_fmd, //
7684b53c 27 kHijing_cent1, //
28 kHijing_cent2, //
29 kHijing_per1, //
30 kHijing_per2, //
31 kHijing_per3, //
32 kHijing_per4, //
33 kHijing_per5, //
34 kHijing_jj25, //
35 kHijing_jj50, //
36 kHijing_jj75, //
37 kHijing_jj100, //
38 kHijing_jj200, //
39 kHijing_gj25, //
40 kHijing_gj50, //
41 kHijing_gj75, //
42 kHijing_gj100, //
43 kHijing_gj200, //
44 kHijing_pA, //
45 kPythia6, //
46 kPythia6Jets20_24, //
47 kPythia6Jets24_29, //
48 kPythia6Jets29_35, //
49 kPythia6Jets35_42, //
50 kPythia6Jets42_50, //
51 kPythia6Jets50_60, //
52 kPythia6Jets60_72, //
53 kPythia6Jets72_86, //
54 kPythia6Jets86_104, //
55 kPythia6Jets104_125, //
56 kPythia6Jets125_150, //
57 kPythia6Jets150_180, //
58 kD0PbPb5500, //
59 kCharmSemiElPbPb5500, //
60 kBeautySemiElPbPb5500, //
61 kCocktailTRD, //
62 kPyJJ, //
63 kPyGJ, //
64 kMuonCocktailCent1, //
65 kMuonCocktailPer1, //
66 kMuonCocktailPer4, //
67 kMuonCocktailCent1HighPt, //
68 kMuonCocktailPer1HighPt, //
69 kMuonCocktailPer4HighPt, //
70 kMuonCocktailCent1Single, //
71 kMuonCocktailPer1Single, //
72 kMuonCocktailPer4Single,
8f6ee336 73 kFMD1Flat,
74 kFMD2Flat,
75 kFMD3Flat,
76 kFMDFlat,
7684b53c 77 kEgMax
0d0e6995 78};
4347b38f 79
7684b53c 80//____________________________________________________________________
81//
82// Generator types names
83//
84const char* egName[kEgMax] = {
85 "test50",
86 "kParam_8000", //
87 "kParam_4000", //
88 "kParam_2000", //
824466d5 89 "kParam_fmd", //
7684b53c 90 "kHijing_cent1", //
91 "kHijing_cent2", //
92 "kHijing_per1", //
93 "kHijing_per2", //
94 "kHijing_per3", //
95 "kHijing_per4", //
96 "kHijing_per5", //
97 "kHijing_jj25", //
98 "kHijing_jj50", //
99 "kHijing_jj75", //
100 "kHijing_jj100", //
101 "kHijing_jj200", //
102 "kHijing_gj25", //
103 "kHijing_gj50", //
104 "kHijing_gj75", //
105 "kHijing_gj100", //
106 "kHijing_gj200", //
107 "kHijing_pA", //
108 "kPythia6", //
109 "kPythia6Jets20_24", //
110 "kPythia6Jets24_29", //
111 "kPythia6Jets29_35", //
112 "kPythia6Jets35_42", //
113 "kPythia6Jets42_50", //
114 "kPythia6Jets50_60", //
115 "kPythia6Jets60_72", //
116 "kPythia6Jets72_86", //
117 "kPythia6Jets86_104", //
118 "kPythia6Jets104_125", //
119 "kPythia6Jets125_150", //
120 "kPythia6Jets150_180", //
121 "kD0PbPb5500", //
122 "kCharmSemiElPbPb5500", //
123 "kBeautySemiElPbPb5500", //
124 "kCocktailTRD", //
125 "kPyJJ", //
126 "kPyGJ", //
127 "kMuonCocktailCent1", //
128 "kMuonCocktailPer1", //
129 "kMuonCocktailPer4", //
130 "kMuonCocktailCent1HighPt", //
131 "kMuonCocktailPer1HighPt", //
132 "kMuonCocktailPer4HighPt", //
133 "kMuonCocktailCent1Single", //
134 "kMuonCocktailPer1Single", //
088f8e79 135 "kMuonCocktailPer4Single",
136 "kFMD1Flat",
137 "kFMD2Flat",
8f6ee336 138 "kFMD3Flat",
139 "kFMDFlat"
0d0e6995 140};
141
7684b53c 142//____________________________________________________________________
143enum Geo_t {
144 kHoles, //
145 kNoHoles //
0d0e6995 146};
147
7684b53c 148//____________________________________________________________________
149enum Rad_t {
150 kGluonRadiation, //
151 kNoGluonRadiation //
0d0e6995 152};
153
7684b53c 154//____________________________________________________________________
155enum Mag_t {
156 k2kG, //
157 k4kG, //
158 k5kG //
159};
160
161//____________________________________________________________________
0d0e6995 162enum MC_t {
163 kFLUKA,
164 kGEANT3,
1a1fdef7 165 kGEANT4,
166 kGEANT3TGEO,
4347b38f 167};
0d0e6995 168
7684b53c 169//____________________________________________________________________
0d0e6995 170// Functions
7684b53c 171Float_t EtaToTheta(Float_t eta);
c6b36280 172EG_t LookupEG(const Char_t* name);
7684b53c 173AliGenerator* GeneratorFactory(EG_t eg, Rad_t rad, TString& comment);
174AliGenHijing* HijingStandard();
175void ProcessEnvironmentVars(EG_t& eg, Int_t& seed);
42403906 176
7684b53c 177//____________________________________________________________________
178void
179Config()
afddaa11 180{
7684b53c 181 //____________________________________________________________________
182 // This part for configuration
6169f936 183 // EG_t eg = test50;
184 // EG_t eg = kParam_fmd;
40076ce1 185 // EG_t eg = kFMDFlat; // kParam_2000; // kPythia;
f95a63c4 186 // EG_t eg = kFMDFlat;
83ad576a 187 EG_t eg = kPythia6;
188 // EG_t eg = kFMD2Flat;
7684b53c 189 Geo_t geo = kNoHoles;
190 Rad_t rad = kGluonRadiation;
191 Mag_t mag = k5kG;
192 Int_t seed = 12345; //Set 0 to use the current time
54e415a8 193 MC_t mc = kGEANT3TGEO;
afddaa11 194
7684b53c 195 //____________________________________________________________________
196 // Comment line
197 static TString comment;
198
199 //____________________________________________________________________
200 // Get settings from environment variables
201 ProcessEnvironmentVars(eg, seed);
202
203 //____________________________________________________________________
4347b38f 204 // Set Random Number seed
7684b53c 205 gRandom->SetSeed(seed);
206 cout<<"Seed for random number generation= "<<gRandom->GetSeed()<<endl;
0d0e6995 207
7684b53c 208
209 //__________________________________________________________________
210 switch (mc) {
0d0e6995 211 case kFLUKA:
37c4363a 212 //
213 // libraries required by fluka21
214 //
215 gSystem->Load("libGeom");
216 cout << "\t* Loading TFluka..." << endl;
217 gSystem->Load("libTFluka");
9aa0bdc4 218 gSystem->MakeDirectory("peg");
37c4363a 219 //
220 // FLUKA MC
221 //
222 cout << "\t* Instantiating TFluka..." << endl;
223 new TFluka("C++ Interface to Fluka", 0/*verbosity*/);
0d0e6995 224 break;
225 case kGEANT3:
4ac75127 226 {
227 //
228 // Libraries needed by GEANT 3.21
229 //
40076ce1 230 gSystem->Load("$ALICE_ROOT/lib/tgt_$ALICE_TARGET/libpythia6.so");
4ac75127 231 gSystem->Load("libgeant321");
232
233 //
234 // GEANT 3.21 MC
235 //
236 TGeant3* gmc = new TGeant3("C++ Interface to Geant3");
237 gmc->SetSWIT(4, 1000);
238 }
0d0e6995 239 break;
1a1fdef7 240 case kGEANT3TGEO:
4ac75127 241 {
242 //
243 // Libraries needed by GEANT 3.21
244 //
40076ce1 245 gSystem->Load("$ALICE_ROOT/lib/tgt_$ALICE_TARGET/liblhapdf.so");
246 gSystem->Load("$ALICE_ROOT/lib/tgt_$ALICE_TARGET/libpythia6.so");
247 // gSystem->Load("libEGPythia6.so"); //<- For non-debian (sigh!)
c1b9c050 248 gSystem->Load("EGPythia6.so");
4ac75127 249 gSystem->Load("libgeant321");
1a1fdef7 250
4ac75127 251 //
252 // GEANT 3.21 MC
253 //
254 TGeant3TGeo* gmc = new TGeant3TGeo("C++ Interface to Geant3");
255 gmc->SetSWIT(4, 1000);
256 Printf("Making a TGeant3TGeo objet");
257 }
1a1fdef7 258 break;
0d0e6995 259 default:
260 gAlice->Fatal("Config.C", "No MC type chosen");
261 return;
262 }
7684b53c 263
264 //__________________________________________________________________
265 AliRunLoader* rl = 0;
266
4347b38f 267 cout<<"Config.C: Creating Run Loader ..."<<endl;
7684b53c 268 rl = AliRunLoader::Open("galice.root",
269 AliConfig::GetDefaultEventFolderName(),
270 "recreate");
4347b38f 271 if (!rl) {
272 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
273 return;
274 }
275 rl->SetCompressionLevel(2);
276 rl->SetNumberOfEventsPerFile(3);
277 gAlice->SetRunLoader(rl);
278
7684b53c 279 //__________________________________________________________________
280 // For FLUKA
281 switch (mc) {
37c4363a 282 case kFLUKA:
283 {
284 //
285 // Use kTRUE as argument to generate alice.pemf first
286 //
287 TString alice_pemf(gSystem->Which(".", "peg/mat17.pemf"));
288 if (!alice_pemf.IsNull())
289 ((TFluka*)gMC)->SetGeneratePemf(kFALSE);
290 else
291 ((TFluka*)gMC)->SetGeneratePemf(kTRUE);
088f8e79 292 TString flupro(gSystem->Getenv("FLUPRO"));
293 if (flupro.IsNull())
294 Fatal("Config.C", "Environment variable FLUPRO not set");
295#if 0
296 char* files[] = { "brems_fin.bin", "cohff.bin", "elasct.bin",
297 "gxsect.bin", "nuclear.bin", "sigmapi.bin",
298 0 };
299 char* file = files[0];
300 while (file) {
301 TString which(gSystem->Which(".", file));
302 if (which.IsNull()) {
303 if (gSystem->Symlink(Form("%s/%s", flupro.Data(), file), file)!=0)
304 Fatal("Config.C", "Couldn't link $(FLUPRO)/%s -> .", file);
305 }
306 file++;
9aa0bdc4 307 }
088f8e79 308#endif
309 TString neuxsc(gSystem->Which(".", "neuxsc.bin"));
310 if (neuxsc.IsNull())
311 gSystem->Symlink(Form("%s/neuxsc_72.bin", flupro.Data()),
312 "neuxsc.bin");
9aa0bdc4 313 gSystem->CopyFile("$(FLUPRO)/random.dat", "old.seed", kTRUE);
37c4363a 314 }
315 break;
316 }
7684b53c 317
318 //__________________________________________________________________
0d0e6995 319 //
320 // Set External decayer
4ac75127 321#if 0
0d0e6995 322 AliDecayer *decayer = new AliDecayerPythia();
7684b53c 323 switch (eg) {
324 case kD0PbPb5500: decayer->SetForceDecay(kHadronicD); break;
325 case kCharmSemiElPbPb5500: decayer->SetForceDecay(kSemiElectronic); break;
326 case kBeautySemiElPbPb5500: decayer->SetForceDecay(kSemiElectronic); break;
327 default: decayer->SetForceDecay(kAll); break;
328 }
4347b38f 329 decayer->Init();
330 gMC->SetExternalDecayer(decayer);
4ac75127 331#endif
4347b38f 332
7684b53c 333 //__________________________________________________________________
bf000c32 334 // *********** STEERING parameters FOR ALICE SIMULATION ************
335 // - Specify event type to be tracked through the ALICE setup
336 // - All positions are in cm, angles in degrees, and P and E in GeV
4347b38f 337 gMC->SetProcess("DCAY",1);
338 gMC->SetProcess("PAIR",1);
339 gMC->SetProcess("COMP",1);
340 gMC->SetProcess("PHOT",1);
341 gMC->SetProcess("PFIS",0);
7684b53c 342 gMC->SetProcess("DRAY",0);
4347b38f 343 gMC->SetProcess("ANNI",1);
344 gMC->SetProcess("BREM",1);
345 gMC->SetProcess("MUNU",1);
7684b53c 346 gMC->SetProcess("CKOV",1);
4347b38f 347 gMC->SetProcess("HADR",1);
83ad576a 348 gMC->SetProcess("LOSS",1); // 0:none 1,3:dray 2:nodray 4:nofluct (def:2)
7684b53c 349 gMC->SetProcess("MULS",1);
4347b38f 350 gMC->SetProcess("RAYL",1);
351
352 Float_t cut = 1.e-3; // 1MeV cut by default
353 Float_t tofmax = 1.e10;
354
355 gMC->SetCut("CUTGAM", cut);
356 gMC->SetCut("CUTELE", cut);
357 gMC->SetCut("CUTNEU", cut);
358 gMC->SetCut("CUTHAD", cut);
359 gMC->SetCut("CUTMUO", cut);
7684b53c 360 gMC->SetCut("BCUTE", cut);
361 gMC->SetCut("BCUTM", cut);
362 gMC->SetCut("DCUTE", cut);
363 gMC->SetCut("DCUTM", cut);
4347b38f 364 gMC->SetCut("PPCUTM", cut);
7684b53c 365 gMC->SetCut("TOFMAX", tofmax);
0d0e6995 366
4ac75127 367
7684b53c 368 //__________________________________________________________________
369 // Generator Configuration
7684b53c 370 AliGenerator* gener = GeneratorFactory(eg, rad, comment);
371 gener->SetOrigin(0, 0, 0); // vertex position
372 gener->SetSigma(0, 0, 5.3); // Sigma in (X,Y,Z) (cm) on IP position
373 gener->SetCutVertexZ(1.); // Truncate at 1 sigma
374 gener->SetVertexSmear(kPerEvent);
375 gener->SetTrackingFlag(1);
376 gener->Init();
377
378 //__________________________________________________________________
0d0e6995 379 //
380 // Comments
381 //
7684b53c 382 switch (mag) {
0d0e6995 383 case k2kG: comment = comment.Append(" | L3 field 0.2 T"); break;
384 case k4kG: comment = comment.Append(" | L3 field 0.4 T"); break;
385 case k5kG: comment = comment.Append(" | L3 field 0.5 T"); break;
386 }
387
7684b53c 388 switch (rad) {
0d0e6995 389 case kGluonRadiation:
390 comment = comment.Append(" | Gluon Radiation On"); break;
391 default:
392 comment = comment.Append(" | Gluon Radiation Off"); break;
393 }
394
7684b53c 395 switch(geo) {
f4b3bbb7 396 case kHoles: comment = comment.Append(" | Holes for PHOS/HMPID"); break;
397 default: comment = comment.Append(" | No holes for PHOS/HMPID"); break;
0d0e6995 398 }
399
400 std::cout << "\n\n Comment: " << comment << "\n" << std::endl;
401
7684b53c 402 //__________________________________________________________________
4347b38f 403 // Field (L3 0.4 T)
7684b53c 404 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., mag);
0d0e6995 405 field->SetL3ConstField(0); //Using const. field in the barrel
406 rl->CdGAFile();
7684b53c 407 gAlice->SetField(field);
ed82d35e 408 TFile* magF = TFile::Open("mag.root", "RECREATE");
409 field->Write("mag");
410 magF->Close();
0d0e6995 411
7684b53c 412 //__________________________________________________________________
0d0e6995 413 //
414 // Used detectors
415 //
0dd3acef 416 Bool_t useABSO = kFALSE;
65af05bc 417 Bool_t useACORDE= kFALSE;
4ac75127 418 Bool_t useDIPO = kFALSE;
0d0e6995 419 Bool_t useFMD = kTRUE;
4ac75127 420 Bool_t useFRAME = kFALSE;
69b696b9 421 Bool_t useHALL = kFALSE;
83ad576a 422 Bool_t useITS = kFALSE;
4ac75127 423 Bool_t useMAG = kFALSE;
424 Bool_t useMUON = kFALSE;
425 Bool_t usePHOS = kFALSE;
2e0139df 426 Bool_t usePIPE = kTRUE;
83ad576a 427 Bool_t usePMD = kFALSE;
65af05bc 428 Bool_t useHMPID = kFALSE;
4ac75127 429 Bool_t useSHIL = kFALSE;
0dd3acef 430 Bool_t useT0 = kFALSE;
4ac75127 431 Bool_t useTOF = kFALSE;
432 Bool_t useTPC = kFALSE;
433 Bool_t useTRD = kFALSE;
69b696b9 434 Bool_t useZDC = kFALSE;
4ac75127 435 Bool_t useEMCAL = kFALSE;
83ad576a 436 Bool_t useVZERO = kFALSE;
4347b38f 437
0d0e6995 438 cout << "\t* Creating the detectors ..." << endl;
bf000c32 439 // ================= Alice BODY parameters =========================
4347b38f 440 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
441
0d0e6995 442
f70f588a 443 if (useMAG) AliMAG *MAG = new AliMAG("MAG", "Magnet");
444 if (useABSO) AliABSO *ABSO = new AliABSOv3("ABSO", "Muon Absorber");
445 if (useDIPO) AliDIPO *DIPO = new AliDIPOv3("DIPO", "Dipole version 3");
446 if (useHALL) AliHALL *HALL = new AliHALLv3("HALL", "Alice Hall");
4347b38f 447 if (useFRAME) {
4347b38f 448 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
7684b53c 449 switch (geo) {
0d0e6995 450 case kHoles: FRAME->SetHoles(1); break;
451 default: FRAME->SetHoles(0); break;
4347b38f 452 }
453 }
f70f588a 454 if (useSHIL) AliSHIL *SHIL = new AliSHILv3("SHIL", "Shielding v3");
455 if (usePIPE) AliPIPE *PIPE = new AliPIPEv3("PIPE", "Beam Pipe");
456 if (useITS) AliITS *ITS = new AliITSv11Hybrid("ITS","ITS v11Hybrid");
457 if (useTPC) AliTPC *TPC = new AliTPCv2("TPC", "Default");
458 if (useTOF) AliTOF *TOF = new AliTOFv6T0("TOF", "normal TOF");
459 if (useHMPID) AliHMPID *HMPID = new AliHMPIDv1("HMPID", "normal HMPID");
460 if (useZDC) AliZDC *ZDC = new AliZDCv3("ZDC", "normal ZDC");
461 if (useTRD) AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
462 if (useFMD) AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
463 if (useMUON) AliMUON *MUON = new AliMUONv1("MUON", "default");
464 if (usePHOS) AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
465 if (usePMD) AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
466 if (useT0) AliT0 *T0 = new AliT0v1("T0", "T0 Detector");
467 if (useEMCAL) AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "EMCAL_COMPLETE");
468 if (useACORDE) AliACORDE *ACORDE = new AliACORDEv1("ACORDE", "normal ACORDE");
469 if (useVZERO) AliVZERO *VZERO = new AliVZEROv7("VZERO", "normal VZERO");
4347b38f 470}
471
7684b53c 472//____________________________________________________________________
0d0e6995 473Float_t EtaToTheta(Float_t arg)
474{
7684b53c 475 return (180./TMath::Pi())*2.*TMath::ATan(TMath::Exp(-arg));
476}
477
478//____________________________________________________________________
479Int_t
480LookupEG(const Char_t* name)
481{
482 TString n(name);
483 for (Int_t i = 0; i < kEgMax; i++) {
484 if (n == egName[i]) return i;
485 }
486 return -1;
487}
488
489//____________________________________________________________________
490AliGenerator*
491GeneratorFactory(EG_t eg, Rad_t rad, TString& comment)
492{
493 Int_t isw = 3;
494 if (rad == kNoGluonRadiation) isw = 0;
495
40076ce1 496 // Possibly load libAliPythia6
497 switch (eg) {
498 case kPythia6:
499 case kPythia6Jets20_24:
500 case kPythia6Jets24_29:
501 case kPythia6Jets29_35:
502 case kPythia6Jets35_42:
503 case kPythia6Jets42_50:
504 case kPythia6Jets50_60:
505 case kPythia6Jets60_72:
506 case kPythia6Jets72_86:
507 case kPythia6Jets86_104:
508 case kPythia6Jets104_125:
509 case kPythia6Jets125_150:
510 case kPythia6Jets150_180:
511 gSystem->Load("liblhapdf.so");
512 // gSystem->Load("/usr/lib/libpythia.so");
513 // gSystem->ListLibraries();
514 gSystem->Load("EGPythia6.so");
515 gSystem->Load("libAliPythia6");
516 break;
517 }
7684b53c 518
519 AliGenerator * gGener = 0;
520 switch (eg) {
521 case test50:
522 {
523 comment = comment.Append(":HIJINGparam test 50 particles");
524 AliGenHIJINGpara *gener = new AliGenHIJINGpara(50);
525 gener->SetMomentumRange(0, 999999.);
526 gener->SetPhiRange(0., 360.);
527 // Set pseudorapidity range from -8 to 8.
528 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
529 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
530 gener->SetThetaRange(thmin,thmax);
531 gGener=gener;
532 }
533 break;
534 case kParam_8000:
535 {
536 comment = comment.Append(":HIJINGparam N=8000");
537 AliGenHIJINGpara *gener = new AliGenHIJINGpara(86030);
538 gener->SetMomentumRange(0, 999999.);
539 gener->SetPhiRange(0., 360.);
540 // Set pseudorapidity range from -8 to 8.
541 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
542 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
543 gener->SetThetaRange(thmin,thmax);
544 gGener=gener;
545 }
546 break;
547 case kParam_4000:
548 {
549 comment = comment.Append("HIJINGparam N=4000");
550 AliGenHIJINGpara *gener = new AliGenHIJINGpara(43015);
551 gener->SetMomentumRange(0, 999999.);
552 gener->SetPhiRange(0., 360.);
553 // Set pseudorapidity range from -8 to 8.
554 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
555 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
556 gener->SetThetaRange(thmin,thmax);
557 gGener=gener;
558 }
559 break;
560 case kParam_2000:
561 {
562 comment = comment.Append("HIJINGparam N=2000");
563 AliGenHIJINGpara *gener = new AliGenHIJINGpara(21507);
564 gener->SetMomentumRange(0, 999999.);
565 gener->SetPhiRange(0., 360.);
566 // Set pseudorapidity range from -8 to 8.
567 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
568 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
824466d5 569 gener->SetThetaRange(thmin,thmax);
570 gGener=gener;
571 }
572 break;
573 case kParam_fmd:
574 {
575 comment = comment.Append("HIJINGparam N=100");
1a1fdef7 576 AliGenHIJINGpara *gener = new AliGenHIJINGpara(500);
824466d5 577 gener->SetMomentumRange(0, 999999.);
578 gener->SetPhiRange(0., 360.);
579 // Set pseudorapidity range from -8 to 8.
1a1fdef7 580 Float_t thmin = EtaToTheta(6); // theta min. <---> eta max
581 Float_t thmax = EtaToTheta(2); // theta max. <---> eta min
7684b53c 582 gener->SetThetaRange(thmin,thmax);
583 gGener=gener;
584 }
585 break;
586 //
587 // Hijing Central
588 //
589 case kHijing_cent1:
590 {
591 comment = comment.Append("HIJING cent1");
592 AliGenHijing *gener = HijingStandard();
593 // impact parameter range
594 gener->SetImpactParameterRange(0., 5.);
595 gGener=gener;
596 }
597 break;
598 case kHijing_cent2:
599 {
600 comment = comment.Append("HIJING cent2");
601 AliGenHijing *gener = HijingStandard();
602 // impact parameter range
603 gener->SetImpactParameterRange(0., 2.);
604 gGener=gener;
605 }
606 break;
607 //
608 // Hijing Peripheral
609 //
610 case kHijing_per1:
611 {
612 comment = comment.Append("HIJING per1");
613 AliGenHijing *gener = HijingStandard();
614 // impact parameter range
615 gener->SetImpactParameterRange(5., 8.6);
616 gGener=gener;
617 }
618 break;
619 case kHijing_per2:
620 {
621 comment = comment.Append("HIJING per2");
622 AliGenHijing *gener = HijingStandard();
623 // impact parameter range
624 gener->SetImpactParameterRange(8.6, 11.2);
625 gGener=gener;
626 }
627 break;
628 case kHijing_per3:
629 {
630 comment = comment.Append("HIJING per3");
631 AliGenHijing *gener = HijingStandard();
632 // impact parameter range
633 gener->SetImpactParameterRange(11.2, 13.2);
634 gGener=gener;
635 }
636 break;
637 case kHijing_per4:
638 {
639 comment = comment.Append("HIJING per4");
640 AliGenHijing *gener = HijingStandard();
641 // impact parameter range
642 gener->SetImpactParameterRange(13.2, 15.);
643 gGener=gener;
644 }
645 break;
646 case kHijing_per5:
647 {
648 comment = comment.Append("HIJING per5");
649 AliGenHijing *gener = HijingStandard();
650 // impact parameter range
651 gener->SetImpactParameterRange(15., 100.);
652 gGener=gener;
653 }
654 break;
655 //
656 // Jet-Jet
657 //
658 case kHijing_jj25:
659 {
660 comment = comment.Append("HIJING Jet 25 GeV");
661 AliGenHijing *gener = HijingStandard();
662 // impact parameter range
663 gener->SetImpactParameterRange(0., 5.);
664 // trigger
665 gener->SetTrigger(1);
666 gener->SetPtJet(25.);
667 gener->SetRadiation(isw);
668 gener->SetSimpleJets(!isw);
669 gener->SetJetEtaRange(-0.3,0.3);
670 gener->SetJetPhiRange(75., 165.);
671 gGener=gener;
672 }
673 break;
674
675 case kHijing_jj50:
676 {
677 comment = comment.Append("HIJING Jet 50 GeV");
678 AliGenHijing *gener = HijingStandard();
679 // impact parameter range
680 gener->SetImpactParameterRange(0., 5.);
681 // trigger
682 gener->SetTrigger(1);
683 gener->SetPtJet(50.);
684 gener->SetRadiation(isw);
685 gener->SetSimpleJets(!isw);
686 gener->SetJetEtaRange(-0.3,0.3);
687 gener->SetJetPhiRange(75., 165.);
688 gGener=gener;
689 }
690 break;
691
692 case kHijing_jj75:
693 {
694 comment = comment.Append("HIJING Jet 75 GeV");
695 AliGenHijing *gener = HijingStandard();
696 // impact parameter range
697 gener->SetImpactParameterRange(0., 5.);
698 // trigger
699 gener->SetTrigger(1);
700 gener->SetPtJet(75.);
701 gener->SetRadiation(isw);
702 gener->SetSimpleJets(!isw);
703 gener->SetJetEtaRange(-0.3,0.3);
704 gener->SetJetPhiRange(75., 165.);
705 gGener=gener;
706 }
707 break;
708
709 case kHijing_jj100:
710 {
711 comment = comment.Append("HIJING Jet 100 GeV");
712 AliGenHijing *gener = HijingStandard();
713 // impact parameter range
714 gener->SetImpactParameterRange(0., 5.);
715 // trigger
716 gener->SetTrigger(1);
717 gener->SetPtJet(100.);
718 gener->SetRadiation(isw);
719 gener->SetSimpleJets(!isw);
720 gener->SetJetEtaRange(-0.3,0.3);
721 gener->SetJetPhiRange(75., 165.);
722 gGener=gener;
723 }
724 break;
725
726 case kHijing_jj200:
727 {
728 comment = comment.Append("HIJING Jet 200 GeV");
729 AliGenHijing *gener = HijingStandard();
730 // impact parameter range
731 gener->SetImpactParameterRange(0., 5.);
732 // trigger
733 gener->SetTrigger(1);
734 gener->SetPtJet(200.);
735 gener->SetRadiation(isw);
736 gener->SetSimpleJets(!isw);
737 gener->SetJetEtaRange(-0.3,0.3);
738 gener->SetJetPhiRange(75., 165.);
739 gGener=gener;
740 }
741 break;
742 //
743 // Gamma-Jet
744 //
745 case kHijing_gj25:
746 {
747 comment = comment.Append("HIJING Gamma 25 GeV");
748 AliGenHijing *gener = HijingStandard();
749 // impact parameter range
750 gener->SetImpactParameterRange(0., 5.);
751 // trigger
752 gener->SetTrigger(2);
753 gener->SetPtJet(25.);
754 gener->SetRadiation(isw);
755 gener->SetSimpleJets(!isw);
756 gener->SetJetEtaRange(-0.12, 0.12);
757 gener->SetJetPhiRange(220., 320.);
758 gGener=gener;
759 }
760 break;
761
762 case kHijing_gj50:
763 {
764 comment = comment.Append("HIJING Gamma 50 GeV");
765 AliGenHijing *gener = HijingStandard();
766 // impact parameter range
767 gener->SetImpactParameterRange(0., 5.);
768 // trigger
769 gener->SetTrigger(2);
770 gener->SetPtJet(50.);
771 gener->SetRadiation(isw);
772 gener->SetSimpleJets(!isw);
773 gener->SetJetEtaRange(-0.12, 0.12);
774 gener->SetJetPhiRange(220., 320.);
775 gGener=gener;
776 }
777 break;
778
779 case kHijing_gj75:
780 {
781 comment = comment.Append("HIJING Gamma 75 GeV");
782 AliGenHijing *gener = HijingStandard();
783 // impact parameter range
784 gener->SetImpactParameterRange(0., 5.);
785 // trigger
786 gener->SetTrigger(2);
787 gener->SetPtJet(75.);
788 gener->SetRadiation(isw);
789 gener->SetSimpleJets(!isw);
790 gener->SetJetEtaRange(-0.12, 0.12);
791 gener->SetJetPhiRange(220., 320.);
792 gGener=gener;
793 }
794 break;
795
796 case kHijing_gj100:
797 {
798 comment = comment.Append("HIJING Gamma 100 GeV");
799 AliGenHijing *gener = HijingStandard();
800 // impact parameter range
801 gener->SetImpactParameterRange(0., 5.);
802 // trigger
803 gener->SetTrigger(2);
804 gener->SetPtJet(100.);
805 gener->SetRadiation(isw);
806 gener->SetSimpleJets(!isw);
807 gener->SetJetEtaRange(-0.12, 0.12);
808 gener->SetJetPhiRange(220., 320.);
809 gGener=gener;
810 }
811 break;
812
813 case kHijing_gj200:
814 {
815 comment = comment.Append("HIJING Gamma 200 GeV");
816 AliGenHijing *gener = HijingStandard();
817 // impact parameter range
818 gener->SetImpactParameterRange(0., 5.);
819 // trigger
820 gener->SetTrigger(2);
821 gener->SetPtJet(200.);
822 gener->SetRadiation(isw);
823 gener->SetSimpleJets(!isw);
824 gener->SetJetEtaRange(-0.12, 0.12);
825 gener->SetJetPhiRange(220., 320.);
826 gGener=gener;
827 }
828 break;
829 case kHijing_pA:
830 {
831 comment = comment.Append("HIJING pA");
832
833 AliGenCocktail *gener = new AliGenCocktail();
834
835 AliGenHijing *hijing = new AliGenHijing(-1);
836 // centre of mass energy
837 hijing->SetEnergyCMS(TMath::Sqrt(82./208.) * 14000.);
838 // impact parameter range
839 hijing->SetImpactParameterRange(0., 15.);
840 // reference frame
841 hijing->SetReferenceFrame("CMS");
842 hijing->SetBoostLHC(1);
843 // projectile
844 hijing->SetProjectile("P", 1, 1);
845 hijing->SetTarget ("A", 208, 82);
846 // tell hijing to keep the full parent child chain
847 hijing->KeepFullEvent();
848 // enable jet quenching
849 hijing->SetJetQuenching(0);
850 // enable shadowing
851 hijing->SetShadowing(1);
852 // Don't track spectators
853 hijing->SetSpectators(0);
854 // kinematic selection
855 hijing->SetSelectAll(0);
856 //
857 AliGenSlowNucleons* gray = new AliGenSlowNucleons(1);
858 AliSlowNucleonModel* model = new AliSlowNucleonModelExp();
859 gray->SetSlowNucleonModel(model);
860 gray->SetDebug(1);
861 gener->AddGenerator(hijing,"Hijing pPb", 1);
862 gener->AddGenerator(gray, "Gray Particles",1);
863 gGener=gener;
864 }
865 break;
866 case kPythia6:
867 {
868 comment = comment.Append(":Pythia p-p @ 14 TeV");
869 AliGenPythia *gener = new AliGenPythia(-1);
870 gener->SetMomentumRange(0,999999);
871 gener->SetThetaRange(0., 180.);
872 gener->SetYRange(-12,12);
873 gener->SetPtRange(0,1000);
874 gener->SetProcess(kPyMb);
875 gener->SetEnergyCMS(14000.);
876 gGener=gener;
877 }
878 break;
879 case kPythia6Jets20_24:
880 {
881 comment = comment.Append(":Pythia jets 20-24 GeV @ 5.5 TeV");
882 AliGenPythia * gener = new AliGenPythia(-1);
883 gener->SetEnergyCMS(5500.);// Centre of mass energy
884 gener->SetProcess(kPyJets);// Process type
885 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
886 gener->SetJetPhiRange(0., 360.);
887 gener->SetJetEtRange(10., 1000.);
888 gener->SetGluonRadiation(1,1);
889 // gener->SetPtKick(0.);
890 // Structure function
891 gener->SetStrucFunc(kCTEQ4L);
892 gener->SetPtHard(20., 24.);// Pt transfer of the hard scattering
893 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
894 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
895 gGener=gener;
896 }
897 break;
898 case kPythia6Jets24_29:
899 {
900 comment = comment.Append(":Pythia jets 24-29 GeV @ 5.5 TeV");
901 AliGenPythia * gener = new AliGenPythia(-1);
902 gener->SetEnergyCMS(5500.);// Centre of mass energy
903 gener->SetProcess(kPyJets);// Process type
904 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
905 gener->SetJetPhiRange(0., 360.);
906 gener->SetJetEtRange(10., 1000.);
907 gener->SetGluonRadiation(1,1);
908 // gener->SetPtKick(0.);
909 // Structure function
910 gener->SetStrucFunc(kCTEQ4L);
911 gener->SetPtHard(24., 29.);// Pt transfer of the hard scattering
912 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
913 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
914 gGener=gener;
915 }
916 break;
917 case kPythia6Jets29_35:
918 {
919 comment = comment.Append(":Pythia jets 29-35 GeV @ 5.5 TeV");
920 AliGenPythia * gener = new AliGenPythia(-1);
921 gener->SetEnergyCMS(5500.);// Centre of mass energy
922 gener->SetProcess(kPyJets);// Process type
923 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
924 gener->SetJetPhiRange(0., 360.);
925 gener->SetJetEtRange(10., 1000.);
926 gener->SetGluonRadiation(1,1);
927 // gener->SetPtKick(0.);
928 // Structure function
929 gener->SetStrucFunc(kCTEQ4L);
930 gener->SetPtHard(29., 35.);// Pt transfer of the hard scattering
931 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
932 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
933 gGener=gener;
934 }
935 break;
936 case kPythia6Jets35_42:
937 {
938 comment = comment.Append(":Pythia jets 35-42 GeV @ 5.5 TeV");
939 AliGenPythia * gener = new AliGenPythia(-1);
940 gener->SetEnergyCMS(5500.);// Centre of mass energy
941 gener->SetProcess(kPyJets);// Process type
942 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
943 gener->SetJetPhiRange(0., 360.);
944 gener->SetJetEtRange(10., 1000.);
945 gener->SetGluonRadiation(1,1);
946 // gener->SetPtKick(0.);
947 // Structure function
948 gener->SetStrucFunc(kCTEQ4L);
949 gener->SetPtHard(35., 42.);// Pt transfer of the hard scattering
950 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
951 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
952 gGener=gener;
953 }
954 break;
955 case kPythia6Jets42_50:
956 {
957 comment = comment.Append(":Pythia jets 42-50 GeV @ 5.5 TeV");
958 AliGenPythia * gener = new AliGenPythia(-1);
959 gener->SetEnergyCMS(5500.);// Centre of mass energy
960 gener->SetProcess(kPyJets);// Process type
961 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
962 gener->SetJetPhiRange(0., 360.);
963 gener->SetJetEtRange(10., 1000.);
964 gener->SetGluonRadiation(1,1);
965 // gener->SetPtKick(0.);
966 // Structure function
967 gener->SetStrucFunc(kCTEQ4L);
968 gener->SetPtHard(42., 50.);// Pt transfer of the hard scattering
969 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
970 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
971 gGener=gener;
972 }
973 break;
974 case kPythia6Jets50_60:
975 {
976 comment = comment.Append(":Pythia jets 50-60 GeV @ 5.5 TeV");
977 AliGenPythia * gener = new AliGenPythia(-1);
978 gener->SetEnergyCMS(5500.);// Centre of mass energy
979 gener->SetProcess(kPyJets);// Process type
980 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
981 gener->SetJetPhiRange(0., 360.);
982 gener->SetJetEtRange(10., 1000.);
983 gener->SetGluonRadiation(1,1);
984 // gener->SetPtKick(0.);
985 // Structure function
986 gener->SetStrucFunc(kCTEQ4L);
987 gener->SetPtHard(50., 60.);// Pt transfer of the hard scattering
988 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
989 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
990 gGener=gener;
991 }
992 break;
993 case kPythia6Jets60_72:
994 {
995 comment = comment.Append(":Pythia jets 60-72 GeV @ 5.5 TeV");
996 AliGenPythia * gener = new AliGenPythia(-1);
997 gener->SetEnergyCMS(5500.);// Centre of mass energy
998 gener->SetProcess(kPyJets);// Process type
999 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
1000 gener->SetJetPhiRange(0., 360.);
1001 gener->SetJetEtRange(10., 1000.);
1002 gener->SetGluonRadiation(1,1);
1003 // gener->SetPtKick(0.);
1004 // Structure function
1005 gener->SetStrucFunc(kCTEQ4L);
1006 gener->SetPtHard(60., 72.);// Pt transfer of the hard scattering
1007 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
1008 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
1009 gGener=gener;
1010 }
1011 break;
1012 case kPythia6Jets72_86:
1013 {
1014 comment = comment.Append(":Pythia jets 72-86 GeV @ 5.5 TeV");
1015 AliGenPythia * gener = new AliGenPythia(-1);
1016 gener->SetEnergyCMS(5500.);// Centre of mass energy
1017 gener->SetProcess(kPyJets);// Process type
1018 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
1019 gener->SetJetPhiRange(0., 360.);
1020 gener->SetJetEtRange(10., 1000.);
1021 gener->SetGluonRadiation(1,1);
1022 // gener->SetPtKick(0.);
1023 // Structure function
1024 gener->SetStrucFunc(kCTEQ4L);
1025 gener->SetPtHard(72., 86.);// Pt transfer of the hard scattering
1026 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
1027 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
1028 gGener=gener;
1029 }
1030 break;
1031 case kPythia6Jets86_104:
1032 {
1033 comment = comment.Append(":Pythia jets 86-104 GeV @ 5.5 TeV");
1034 AliGenPythia * gener = new AliGenPythia(-1);
1035 gener->SetEnergyCMS(5500.);// Centre of mass energy
1036 gener->SetProcess(kPyJets);// Process type
1037 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
1038 gener->SetJetPhiRange(0., 360.);
1039 gener->SetJetEtRange(10., 1000.);
1040 gener->SetGluonRadiation(1,1);
1041 // gener->SetPtKick(0.);
1042 // Structure function
1043 gener->SetStrucFunc(kCTEQ4L);
1044 gener->SetPtHard(86., 104.);// Pt transfer of the hard scattering
1045 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
1046 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
1047 gGener=gener;
1048 }
1049 break;
1050 case kPythia6Jets104_125:
1051 {
1052 comment = comment.Append(":Pythia jets 105-125 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(104., 125.);// 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 kPythia6Jets125_150:
1070 {
1071 comment = comment.Append(":Pythia jets 125-150 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(125., 150.);// 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 kPythia6Jets150_180:
1089 {
1090 comment = comment.Append(":Pythia jets 150-180 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(150., 180.);// 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 kD0PbPb5500:
1108 {
1109 comment = comment.Append(" D0 in Pb-Pb at 5.5 TeV");
1110 AliGenPythia * gener = new AliGenPythia(10);
1111 gener->SetProcess(kPyD0PbPbMNR);
1112 gener->SetStrucFunc(kCTEQ4L);
1113 gener->SetPtHard(2.1,-1.0);
1114 gener->SetEnergyCMS(5500.);
1115 gener->SetNuclei(208,208);
1116 gener->SetForceDecay(kHadronicD);
1117 gener->SetYRange(-2,2);
1118 gener->SetFeedDownHigherFamily(kFALSE);
1119 gener->SetStackFillOpt(AliGenPythia::kParentSelection);
1120 gener->SetCountMode(AliGenPythia::kCountParents);
1121 gGener=gener;
1122 }
1123 break;
1124 case kCharmSemiElPbPb5500:
1125 {
1126 comment = comment.Append(" Charm in Pb-Pb at 5.5 TeV");
1127 AliGenPythia * gener = new AliGenPythia(10);
1128 gener->SetProcess(kPyCharmPbPbMNR);
1129 gener->SetStrucFunc(kCTEQ4L);
1130 gener->SetPtHard(2.1,-1.0);
1131 gener->SetEnergyCMS(5500.);
1132 gener->SetNuclei(208,208);
1133 gener->SetForceDecay(kSemiElectronic);
1134 gener->SetYRange(-2,2);
1135 gener->SetFeedDownHigherFamily(kFALSE);
1136 gener->SetCountMode(AliGenPythia::kCountParents);
1137 gGener=gener;
1138 }
1139 break;
1140 case kBeautySemiElPbPb5500:
1141 {
1142 comment = comment.Append(" Beauty in Pb-Pb at 5.5 TeV");
1143 AliGenPythia *gener = new AliGenPythia(10);
1144 gener->SetProcess(kPyBeautyPbPbMNR);
1145 gener->SetStrucFunc(kCTEQ4L);
1146 gener->SetPtHard(2.75,-1.0);
1147 gener->SetEnergyCMS(5500.);
1148 gener->SetNuclei(208,208);
1149 gener->SetForceDecay(kSemiElectronic);
1150 gener->SetYRange(-2,2);
1151 gener->SetFeedDownHigherFamily(kFALSE);
1152 gener->SetCountMode(AliGenPythia::kCountParents);
1153 gGener=gener;
1154 }
1155 break;
1156 case kCocktailTRD:
1157 {
1158 comment = comment.Append(" Cocktail for TRD at 5.5 TeV");
1159 AliGenCocktail *gener = new AliGenCocktail();
1160
1161 AliGenParam *jpsi = new AliGenParam(10,
1162 new AliGenMUONlib(),
1163 AliGenMUONlib::kJpsiFamily,
1164 "Vogt PbPb");
1165
1166 jpsi->SetPtRange(0, 100);
1167 jpsi->SetYRange(-1., +1.);
1168 jpsi->SetForceDecay(kDiElectron);
1169
1170 AliGenParam *ups = new AliGenParam(10,
1171 new AliGenMUONlib(),
1172 AliGenMUONlib::kUpsilonFamily,
1173 "Vogt PbPb");
1174 ups->SetPtRange(0, 100);
1175 ups->SetYRange(-1., +1.);
1176 ups->SetForceDecay(kDiElectron);
1177
1178 AliGenParam *charm = new AliGenParam(10,
1179 new AliGenMUONlib(),
1180 AliGenMUONlib::kCharm,
1181 "central");
1182 charm->SetPtRange(0, 100);
1183 charm->SetYRange(-1.5, +1.5);
1184 charm->SetForceDecay(kSemiElectronic);
1185
1186
1187 AliGenParam *beauty = new AliGenParam(10,
1188 new AliGenMUONlib(),
1189 AliGenMUONlib::kBeauty,
1190 "central");
1191 beauty->SetPtRange(0, 100);
1192 beauty->SetYRange(-1.5, +1.5);
1193 beauty->SetForceDecay(kSemiElectronic);
1194
1195 gener->AddGenerator(jpsi,"J/psi",1);
1196 gener->AddGenerator(ups,"Upsilon",1);
1197 gener->AddGenerator(charm,"Charm",1);
1198 gener->AddGenerator(beauty,"Beauty",1);
1199 gGener=gener;
1200 }
1201 break;
1202 case kPyJJ:
1203 {
1204 comment = comment.Append(" Jet-jet at 5.5 TeV");
1205 AliGenPythia *gener = new AliGenPythia(-1);
1206 gener->SetEnergyCMS(5500.);
1207 gener->SetProcess(kPyJets);
1208 Double_t ptHardMin=10.0, ptHardMax=-1.0;
1209 gener->SetPtHard(ptHardMin,ptHardMax);
1210 gener->SetYHard(-0.7,0.7);
1211 gener->SetJetEtaRange(-0.2,0.2);
1212 gener->SetEventListRange(0,1);
1213 gGener=gener;
1214 }
1215 break;
1216 case kPyGJ:
1217 {
1218 comment = comment.Append(" Gamma-jet at 5.5 TeV");
1219 AliGenPythia *gener = new AliGenPythia(-1);
1220 gener->SetEnergyCMS(5500.);
1221 gener->SetProcess(kPyDirectGamma);
1222 Double_t ptHardMin=10.0, ptHardMax=-1.0;
1223 gener->SetPtHard(ptHardMin,ptHardMax);
1224 gener->SetYHard(-1.0,1.0);
1225 gener->SetGammaEtaRange(-0.13,0.13);
1226 gener->SetGammaPhiRange(210.,330.);
1227 gener->SetEventListRange(0,1);
1228 gGener=gener;
1229 }
1230 break;
1231 case kMuonCocktailCent1:
1232 {
1233 comment = comment.Append(" Muon Cocktail Cent1");
1234 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1235 gener->SetPtRange(1.0,100.); // Transverse momentum range
1236 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1237 gener->SetYRange(-4.0,-2.4);
1238 gener->SetMuonPtCut(0.8);
1239 gener->SetMuonThetaCut(171.,178.);
1240 gener->SetMuonMultiplicity(2);
1241 gener->SetNumberOfCollisions(1626.); //Centrality class Cent1 for PDC04
1242 gener->SetNumberOfParticipants(359.4);//Centrality class Cent1 for PDC04
1243 gGener=gener;
1244 }
1245 break;
1246 case kMuonCocktailPer1:
1247 {
1248 comment = comment.Append(" Muon Cocktail Per1");
1249 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1250 gener->SetPtRange(1.0,100.); // Transverse momentum range
1251 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1252 gener->SetYRange(-4.0,-2.4);
1253 gener->SetMuonPtCut(0.8);
1254 gener->SetMuonThetaCut(171.,178.);
1255 gener->SetMuonMultiplicity(2);
1256 gener->SetNumberOfCollisions(820.0);//Centrality class Per1 for PDC04
1257 gener->SetNumberOfParticipants(229.3);//Centrality class Per1 for PDC04
1258 gGener=gener;
1259 }
1260 break;
1261 case kMuonCocktailPer4:
1262 {
1263 comment = comment.Append(" Muon Cocktail Per4");
1264 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1265 gener->SetPtRange(1.0,100.); // Transverse momentum range
1266 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1267 gener->SetYRange(-4.0,-2.4);
1268 gener->SetMuonPtCut(0.8);
1269 gener->SetMuonThetaCut(171.,178.);
1270 gener->SetMuonMultiplicity(2);
1271 gener->SetNumberOfCollisions(13.6);//Centrality class Per4 for PDC04
1272 gener->SetNumberOfParticipants(13.3);//Centrality class Per4 for PDC04
1273 gGener=gener;
1274 }
1275 break;
1276 case kMuonCocktailCent1HighPt:
1277 {
1278 comment = comment.Append(" Muon Cocktail HighPt Cent1");
1279 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1280 gener->SetPtRange(1.0,100.); // Transverse momentum range
1281 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1282 gener->SetYRange(-4.0,-2.4);
1283 gener->SetMuonPtCut(2.5);
1284 gener->SetMuonThetaCut(171.,178.);
1285 gener->SetMuonMultiplicity(2);
1286 gener->SetNumberOfCollisions(1626.); //Centrality class Cent1 for PDC04
1287 gener->SetNumberOfParticipants(359.4);//Centrality class Cent1 for PDC04
1288 gGener=gener;
1289 }
1290 break;
1291 case kMuonCocktailPer1HighPt :
1292 {
1293 comment = comment.Append(" Muon Cocktail HighPt Per1");
1294 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1295 gener->SetPtRange(1.0,100.); // Transverse momentum range
1296 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1297 gener->SetYRange(-4.0,-2.4);
1298 gener->SetMuonPtCut(2.5);
1299 gener->SetMuonThetaCut(171.,178.);
1300 gener->SetMuonMultiplicity(2);
1301 gener->SetNumberOfCollisions(820.0);//Centrality class Per1 for PDC04
1302 gener->SetNumberOfParticipants(229.3);//Centrality class Per1 for PDC04
1303 gGener=gener;
1304 }
1305 break;
1306 case kMuonCocktailPer4HighPt:
1307 {
1308 comment = comment.Append(" Muon Cocktail HighPt Per4");
1309 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1310 gener->SetPtRange(1.0,100.); // Transverse momentum range
1311 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1312 gener->SetYRange(-4.0,-2.4);
1313 gener->SetMuonPtCut(2.5);
1314 gener->SetMuonThetaCut(171.,178.);
1315 gener->SetMuonMultiplicity(2);
1316 gener->SetNumberOfCollisions(13.6);//Centrality class Per4 for PDC04
1317 gener->SetNumberOfParticipants(13.3);//Centrality class Per4 for PDC04
1318 gGener=gener;
1319 }
1320 break;
1321 case kMuonCocktailCent1Single:
1322 {
1323 comment = comment.Append(" Muon Cocktail Single Cent1");
1324 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1325 gener->SetPtRange(1.0,100.); // Transverse momentum range
1326 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1327 gener->SetYRange(-4.0,-2.4);
1328 gener->SetMuonPtCut(0.8);
1329 gener->SetMuonThetaCut(171.,178.);
1330 gener->SetMuonMultiplicity(1);
1331 gener->SetNumberOfCollisions(1626.); //Centrality class Cent1 for PDC04
1332 gener->SetNumberOfParticipants(359.4);//Centrality class Cent1 for PDC04
1333 gGener=gener;
1334 }
1335 break;
1336 case kMuonCocktailPer1Single :
1337 {
1338 comment = comment.Append(" Muon Cocktail Single Per1");
1339 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1340 gener->SetPtRange(1.0,100.); // Transverse momentum range
1341 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1342 gener->SetYRange(-4.0,-2.4);
1343 gener->SetMuonPtCut(0.8);
1344 gener->SetMuonThetaCut(171.,178.);
1345 gener->SetMuonMultiplicity(1);
1346 gener->SetNumberOfCollisions(820.0);//Centrality class Per1 for PDC04
1347 gener->SetNumberOfParticipants(229.3);//Centrality class Per1 for PDC04
1348 gGener=gener;
1349 }
1350 break;
1351 case kMuonCocktailPer4Single:
1352 {
1353 comment = comment.Append(" Muon Cocktail Single Per4");
1354 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1355 gener->SetPtRange(1.0,100.); // Transverse momentum range
1356 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1357 gener->SetYRange(-4.0,-2.4);
1358 gener->SetMuonPtCut(0.8);
1359 gener->SetMuonThetaCut(171.,178.);
1360 gener->SetMuonMultiplicity(1);
1361 gener->SetNumberOfCollisions(13.6);//Centrality class Per4 for PDC04
1362 gener->SetNumberOfParticipants(13.3);//Centrality class Per4 for PDC04
1363 gGener=gener;
1364 }
1365 break;
8f6ee336 1366 case kFMD1Flat:
088f8e79 1367 {
1368 comment = comment.Append(" Flat in FMD1 range");
8f6ee336 1369 AliGenBox* gener = new AliGenBox(2000);
9bb2665f 1370 gener->SetPart(kPiPlus);
088f8e79 1371 gener->SetMomentumRange(3,4);
1372 gener->SetPhiRange(0, 360);
1373 gener->SetThetaRange(0.77, 3.08);
1374 gGener = gener;
1375 }
1376 break;
8f6ee336 1377 case kFMD2Flat:
088f8e79 1378 {
1379 comment = comment.Append(" Flat in FMD2 range");
c6b36280 1380 AliGenBox* gener = new AliGenBox(10);
9bb2665f 1381 gener->SetPart(kPiPlus);
088f8e79 1382 gener->SetMomentumRange(3,4);
1383 gener->SetPhiRange(0, 360);
1384 gener->SetThetaRange(2.95, 20.42);
1385 gGener = gener;
1386 }
1387 break;
8f6ee336 1388 case kFMD3Flat:
088f8e79 1389 {
1390 comment = comment.Append(" Flat in FMD3 range");
8f6ee336 1391 AliGenBox* gener = new AliGenBox(2000);
9bb2665f 1392 gener->SetPart(kPiPlus);
088f8e79 1393 gener->SetMomentumRange(3,4);
1394 gener->SetPhiRange(0, 360);
1395 gener->SetThetaRange(155.97, 176.73);
1396 gGener = gener;
1397 }
1398 break;
8f6ee336 1399 case kFMDFlat:
1400 {
1401 comment = comment.Append(" Flat in FMD range");
6169f936 1402 AliGenCocktail* gener = new AliGenCocktail();
8f6ee336 1403 gener->SetMomentumRange(3,4);
1404 gener->SetPhiRange(0, 360);
1405 AliGenBox* gener3 = new AliGenBox(2000);
1406 gener3->SetThetaRange(155.97, 176.73);
9bb2665f 1407 gener3->SetPart(kPiPlus);
8f6ee336 1408 gener->AddGenerator(gener3, "FMD3", .33);
1409 AliGenBox* gener2 = new AliGenBox(2000);
1410 gener2->SetThetaRange(2.95, 20.42);
9bb2665f 1411 gener2->SetPart(kPiPlus);
8f6ee336 1412 gener->AddGenerator(gener2, "FMD2", .33);
1413 AliGenBox* gener1 = new AliGenBox(2000);
1414 gener1->SetThetaRange(0.77, 3.08);
9bb2665f 1415 gener1->SetPart(kPiPlus);
8f6ee336 1416 gener->AddGenerator(gener1, "FMD1", .34);
1417 gGener = gener;
1418 }
1419 break;
088f8e79 1420
7684b53c 1421 default: break;
1422 }
1423 return gGener;
1424}
1425
1426//____________________________________________________________________
1427AliGenHijing*
1428HijingStandard()
1429{
1430 AliGenHijing *gener = new AliGenHijing(-1);
1431 // centre of mass energy
1432 gener->SetEnergyCMS(5500.);
1433 // reference frame
1434 gener->SetReferenceFrame("CMS");
1435 // projectile
1436 gener->SetProjectile("A", 208, 82);
1437 gener->SetTarget ("A", 208, 82);
1438 // tell hijing to keep the full parent child chain
1439 gener->KeepFullEvent();
1440 // enable jet quenching
1441 gener->SetJetQuenching(1);
1442 // enable shadowing
1443 gener->SetShadowing(1);
1444 // neutral pion and heavy particle decays switched off
1445 gener->SetDecaysOff(1);
1446 // Don't track spectators
1447 gener->SetSpectators(0);
1448 // kinematic selection
1449 gener->SetSelectAll(0);
1450 return gener;
1451}
1452
1453
1454//____________________________________________________________________
1455void
1456ProcessEnvironmentVars(EG_t& eg, Int_t& seed)
1457{
1458 // Run type
1459 if (gSystem->Getenv("CONFIG_RUN_TYPE")) {
1460 Int_t eg1 = LookupEG(gSystem->Getenv("CONFIG_RUN_TYPE"));
1461 if (eg1 >= 0) eg = EG_t(eg1);
1462 }
1463 // Random Number seed
1464 if (gSystem->Getenv("CONFIG_SEED")) {
1465 seed = atoi(gSystem->Getenv("CONFIG_SEED"));
1466 }
4347b38f 1467}
0d0e6995 1468
7684b53c 1469//____________________________________________________________________
1470//
1471// EOF
1472//