Corrected position of the MIP peak
[u/mrichter/AliRoot.git] / test / merge / backgr / Config.C
CommitLineData
3928b038 1// One can use the configuration macro in compiled mode by
2// root [0] gSystem->Load("libgeant321");
3// root [0] gSystem->SetIncludePath("-I$ROOTSYS/include -I$ALICE_ROOT/include\
4// -I$ALICE_ROOT -I$ALICE/geant3/TGeant3");
5// root [0] .x grun.C(1,"ConfigPPR.C++")
6
7#if !defined(__CINT__) || defined(__MAKECINT__)
8#include <Riostream.h>
9#include <TDatime.h>
10#include <TRandom.h>
11#include <TSystem.h>
12#include <TVirtualMC.h>
13#include <TGeant3TGeo.h>
14#include <TPDGCode.h>
15#include <TF1.h>
16#include "STEER/AliRunLoader.h"
17#include "STEER/AliRun.h"
18#include "STEER/AliConfig.h"
19#include "STEER/AliGenerator.h"
20#include "STEER/AliLog.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/AliGenSTRANGElib.h"
30#include "EVGEN/AliGenMUONCocktail.h"
31#include "EVGEN/AliGenCocktail.h"
32#include "EVGEN/AliGenGeVSim.h"
33#include "EVGEN/AliGeVSimParticle.h"
34#include "PYTHIA6/AliGenPythia.h"
35#include "STEER/AliMagFMaps.h"
36#include "STRUCT/AliBODY.h"
37#include "STRUCT/AliMAG.h"
38#include "STRUCT/AliABSOv0.h"
39#include "STRUCT/AliDIPOv2.h"
40#include "STRUCT/AliHALL.h"
41#include "STRUCT/AliFRAMEv2.h"
42#include "STRUCT/AliSHILv2.h"
43#include "STRUCT/AliPIPEv0.h"
44#include "ITS/AliITSvPPRasymmFMD.h"
45#include "TPC/AliTPCv2.h"
0d7ef405 46#include "TOF/AliTOFv6T0.h"
3928b038 47#include "HMPID/AliHMPIDv1.h"
48#include "ZDC/AliZDCv2.h"
49#include "TRD/AliTRDv1.h"
50#include "FMD/AliFMDv1.h"
51#include "MUON/AliMUONv1.h"
52#include "PHOS/AliPHOSv1.h"
53#include "PMD/AliPMDv1.h"
54#include "T0/AliT0v1.h"
55#include "EMCAL/AliEMCALv2.h"
56#include "ACORDE/AliACORDEv0.h"
57#include "VZERO/AliVZEROv7.h"
58#endif
59
60enum PprRun_t
61{
62 test50,
63 kParam_8000, kParam_4000, kParam_2000,
64 kHijing_cent1, kHijing_cent2,
65 kHijing_per1, kHijing_per2, kHijing_per3, kHijing_per4, kHijing_per5,
66 kHijing_jj25, kHijing_jj50, kHijing_jj75, kHijing_jj100, kHijing_jj200,
67 kHijing_gj25, kHijing_gj50, kHijing_gj75, kHijing_gj100, kHijing_gj200,
68 kHijing_pA, kPythia6,
69 kPythia6Jets20_24, kPythia6Jets24_29, kPythia6Jets29_35,
70 kPythia6Jets35_42, kPythia6Jets42_50, kPythia6Jets50_60,
71 kPythia6Jets60_72, kPythia6Jets72_86, kPythia6Jets86_104,
72 kPythia6Jets104_125, kPythia6Jets125_150, kPythia6Jets150_180,
73 kD0PbPb5500, kCharmSemiElPbPb5500, kBeautySemiElPbPb5500,
74 kCocktailTRD, kPyJJ, kPyGJ,
75 kMuonCocktailCent1, kMuonCocktailPer1, kMuonCocktailPer4,
76 kMuonCocktailCent1HighPt, kMuonCocktailPer1HighPt, kMuonCocktailPer4HighPt,
77 kMuonCocktailCent1Single, kMuonCocktailPer1Single, kMuonCocktailPer4Single,
78 kFlow_2_2000, kFlow_10_2000, kFlow_6_2000, kFlow_6_5000,
79 kHIJINGplus, kRunMax
80};
81
82const char* pprRunName[] = {
83 "test50",
84 "kParam_8000", "kParam_4000", "kParam_2000",
85 "kHijing_cent1", "kHijing_cent2",
86 "kHijing_per1", "kHijing_per2", "kHijing_per3", "kHijing_per4",
87 "kHijing_per5",
88 "kHijing_jj25", "kHijing_jj50", "kHijing_jj75", "kHijing_jj100",
89 "kHijing_jj200",
90 "kHijing_gj25", "kHijing_gj50", "kHijing_gj75", "kHijing_gj100",
91 "kHijing_gj200", "kHijing_pA", "kPythia6",
92 "kPythia6Jets20_24", "kPythia6Jets24_29", "kPythia6Jets29_35",
93 "kPythia6Jets35_42", "kPythia6Jets42_50", "kPythia6Jets50_60",
94 "kPythia6Jets60_72", "kPythia6Jets72_86", "kPythia6Jets86_104",
95 "kPythia6Jets104_125", "kPythia6Jets125_150", "kPythia6Jets150_180",
96 "kD0PbPb5500", "kCharmSemiElPbPb5500", "kBeautySemiElPbPb5500",
97 "kCocktailTRD", "kPyJJ", "kPyGJ",
98 "kMuonCocktailCent1", "kMuonCocktailPer1", "kMuonCocktailPer4",
99 "kMuonCocktailCent1HighPt", "kMuonCocktailPer1HighPt", "kMuonCocktailPer4HighPt",
100 "kMuonCocktailCent1Single", "kMuonCocktailPer1Single", "kMuonCocktailPer4Single",
101 "kFlow_2_2000", "kFlow_10_2000", "kFlow_6_2000", "kFlow_6_5000", "kHIJINGplus"
102};
103
104enum PprRad_t
105{
106 kGluonRadiation, kNoGluonRadiation
107};
108
109enum PprMag_t
110{
111 k2kG, k4kG, k5kG
112};
113
114enum PprTrigConf_t
115{
116 kDefaultPPTrig, kDefaultPbPbTrig
117};
118
119const char * pprTrigConfName[] = {
120 "p-p","Pb-Pb"
121};
122
123// This part for configuration
124//static PprRun_t srun = test50;
125static PprRun_t srun = kHijing_per4;
126static PprRad_t srad = kGluonRadiation;
127static PprMag_t smag = k5kG;
128TDatime dat;
129static Int_t sseed = dat.Get(); //Set 0 to use the current time
130//static PprTrigConf_t strig = kDefaultPPTrig; // default pp trigger configuration
131static PprTrigConf_t strig = kDefaultPbPbTrig; // default PbPb trigger configuration
132
133// Comment line
134static TString comment;
135
136// Functions
137Float_t EtaToTheta(Float_t arg);
138AliGenerator* GeneratorFactory(PprRun_t srun);
139AliGenHijing* HijingStandard();
140AliGenGeVSim* GeVSimStandard(Float_t, Float_t);
141void ProcessEnvironmentVars();
142
143void Config()
144{
145 // ThetaRange is (0., 180.). It was (0.28,179.72) 7/12/00 09:00
146 // Theta range given through pseudorapidity limits 22/6/2001
147
148 // Get settings from environment variables
149 ProcessEnvironmentVars();
150
151 // Set Random Number seed
152 gRandom->SetSeed(sseed);
153 cout<<"Seed for random number generation= "<<gRandom->GetSeed()<<endl;
154
155
156 // libraries required by geant321
157#if defined(__CINT__)
158 gSystem->Load("libgeant321");
159#endif
160
161 new TGeant3TGeo("C++ Interface to Geant3");
162
163 AliRunLoader* rl=0x0;
164
165 AliLog::Message(AliLog::kInfo, "Creating Run Loader", "", "", "Config()"," ConfigPPR.C", __LINE__);
166
167 rl = AliRunLoader::Open("galice.root",
168 AliConfig::GetDefaultEventFolderName(),
169 "recreate");
170 if (rl == 0x0)
171 {
172 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
173 return;
174 }
175 rl->SetCompressionLevel(2);
176 rl->SetNumberOfEventsPerFile(3);
177 gAlice->SetRunLoader(rl);
178
179 // Set the trigger configuration
180 gAlice->SetTriggerDescriptor(pprTrigConfName[strig]);
181 cout<<"Trigger configuration is set to "<<pprTrigConfName[strig]<<endl;
182
183 //
184 // Set External decayer
185 AliDecayer *decayer = new AliDecayerPythia();
186
187
188 switch (srun) {
189 case kD0PbPb5500:
190 decayer->SetForceDecay(kHadronicD);
191 break;
192 case kCharmSemiElPbPb5500:
193 decayer->SetForceDecay(kSemiElectronic);
194 break;
195 case kBeautySemiElPbPb5500:
196 decayer->SetForceDecay(kSemiElectronic);
197 break;
198 default:
199 decayer->SetForceDecay(kAll);
200 break;
201 }
202 decayer->Init();
203 gMC->SetExternalDecayer(decayer);
204 //
205 //
206 //=======================================================================
207 //
208 //=======================================================================
209 // ************* STEERING parameters FOR ALICE SIMULATION **************
210 // --- Specify event type to be tracked through the ALICE setup
211 // --- All positions are in cm, angles in degrees, and P and E in GeV
212
213 gMC->SetProcess("DCAY",1);
214 gMC->SetProcess("PAIR",1);
215 gMC->SetProcess("COMP",1);
216 gMC->SetProcess("PHOT",1);
217 gMC->SetProcess("PFIS",0);
218 gMC->SetProcess("DRAY",0);
219 gMC->SetProcess("ANNI",1);
220 gMC->SetProcess("BREM",1);
221 gMC->SetProcess("MUNU",1);
222 gMC->SetProcess("CKOV",1);
223 gMC->SetProcess("HADR",1);
224 gMC->SetProcess("LOSS",2);
225 gMC->SetProcess("MULS",1);
226 gMC->SetProcess("RAYL",1);
227
228 Float_t cut = 1.e-3; // 1MeV cut by default
229 Float_t tofmax = 1.e10;
230
231 gMC->SetCut("CUTGAM", cut);
232 gMC->SetCut("CUTELE", cut);
233 gMC->SetCut("CUTNEU", cut);
234 gMC->SetCut("CUTHAD", cut);
235 gMC->SetCut("CUTMUO", cut);
236 gMC->SetCut("BCUTE", cut);
237 gMC->SetCut("BCUTM", cut);
238 gMC->SetCut("DCUTE", cut);
239 gMC->SetCut("DCUTM", cut);
240 gMC->SetCut("PPCUTM", cut);
241 gMC->SetCut("TOFMAX", tofmax);
242
243 // Debug and log level
244 // AliLog::SetGlobalDebugLevel(0);
245 // AliLog::SetGlobalLogLevel(AliLog::kError);
246
247 // Generator Configuration
248 AliGenerator* gener = GeneratorFactory(srun);
249 gener->SetOrigin(0, 0, 0); // vertex position
250 gener->SetSigma(0, 0, 5.3); // Sigma in (X,Y,Z) (cm) on IP position
251 gener->SetCutVertexZ(1.); // Truncate at 1 sigma
252 gener->SetVertexSmear(kPerEvent);
253 gener->SetTrackingFlag(1);
254 gener->Init();
255
256 if (smag == k2kG) {
257 comment = comment.Append(" | L3 field 0.2 T");
258 } else if (smag == k4kG) {
259 comment = comment.Append(" | L3 field 0.4 T");
260 } else if (smag == k5kG) {
261 comment = comment.Append(" | L3 field 0.5 T");
262 }
263
264
265 if (srad == kGluonRadiation)
266 {
267 comment = comment.Append(" | Gluon Radiation On");
268
269 } else {
270 comment = comment.Append(" | Gluon Radiation Off");
271 }
272
273 printf("\n \n Comment: %s \n \n", comment.Data());
274
275
276// Field (L3 0.4 T)
277 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., smag);
278 field->SetL3ConstField(0); //Using const. field in the barrel
279 rl->CdGAFile();
280 gAlice->SetField(field);
281//
282 Int_t iABSO = 1;
283 Int_t iDIPO = 1;
284 Int_t iFMD = 1;
285 Int_t iFRAME = 1;
286 Int_t iHALL = 1;
287 Int_t iITS = 1;
288 Int_t iMAG = 1;
289 Int_t iMUON = 1;
290 Int_t iPHOS = 1;
291 Int_t iPIPE = 1;
292 Int_t iPMD = 1;
293 Int_t iHMPID = 1;
294 Int_t iSHIL = 1;
295 Int_t iT0 = 1;
296 Int_t iTOF = 1;
297 Int_t iTPC = 1;
298 Int_t iTRD = 1;
299 Int_t iZDC = 1;
300 Int_t iEMCAL = 1;
301 Int_t iVZERO = 1;
302 Int_t iACORDE = 0;
303
304 //=================== Alice BODY parameters =============================
305 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
306
307
308 if (iMAG)
309 {
310 //=================== MAG parameters ============================
311 // --- Start with Magnet since detector layouts may be depending ---
312 // --- on the selected Magnet dimensions ---
313 AliMAG *MAG = new AliMAG("MAG", "Magnet");
314 }
315
316
317 if (iABSO)
318 {
319 //=================== ABSO parameters ============================
320 AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
321 }
322
323 if (iDIPO)
324 {
325 //=================== DIPO parameters ============================
326
327 AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
328 }
329
330 if (iHALL)
331 {
332 //=================== HALL parameters ============================
333
334 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
335 }
336
337
338 if (iFRAME)
339 {
340 //=================== FRAME parameters ============================
341
342 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
343 }
344
345 if (iSHIL)
346 {
347 //=================== SHIL parameters ============================
348
349 AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding Version 2");
350 }
351
352
353 if (iPIPE)
354 {
355 //=================== PIPE parameters ============================
356
357 AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
358 }
359
360 if(iITS) {
361
362 //=================== ITS parameters ============================
363 //
364 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
365 // almost all other detectors. This involves the fact that the ITS geometry
366 // still has several options to be followed in parallel in order to determine
367 // the best set-up which minimizes the induced background. All the geometries
368 // available to date are described in the following. Read carefully the comments
369 // and use the default version (the only one uncommented) unless you are making
370 // comparisons and you know what you are doing. In this case just uncomment the
371 // ITS geometry you want to use and run Aliroot.
372 //
373 // Detailed geometries:
374 //
375 //
376 //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services");
377 //
378 //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
379 //
380 AliITSvPPRasymmFMD *ITS = new AliITSvPPRasymmFMD("ITS","New ITS PPR detailed version with asymmetric services");
381 ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
382 ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
383 // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer
384 ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
385 ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
386 ITS->SetThicknessChip1(150.); // chip thickness on layer 1 must be in the range [150,300]
387 ITS->SetThicknessChip2(150.); // chip thickness on layer 2 must be in the range [150,300]
388 ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
389 ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
390
391 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
392 // for reconstruction !):
393 //
394 //
395 //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
396 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
397 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
398 //
399 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
400 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
401 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
402 //
403 //
404 //
405 // Geant3 <-> EUCLID conversion
406 // ============================
407 //
408 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
409 // media to two ASCII files (called by default ITSgeometry.euc and
410 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
411 // The default (=0) means that you dont want to use this facility.
412 //
413 ITS->SetEUCLID(0);
414 }
415
416 if (iTPC)
417 {
418 //============================ TPC parameters =====================
419 AliTPC *TPC = new AliTPCv2("TPC", "Default");
420 }
421
422
423 if (iTOF) {
424 //=================== TOF parameters ============================
0d7ef405 425 AliTOF *TOF = new AliTOFv6T0("TOF", "normal TOF");
3928b038 426 }
427
428
429 if (iHMPID)
430 {
431 //=================== HMPID parameters ===========================
432 AliHMPID *HMPID = new AliHMPIDv1("HMPID", "normal HMPID");
433
434 }
435
436
437 if (iZDC)
438 {
439 //=================== ZDC parameters ============================
440
441 AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
442 }
443
444 if (iTRD)
445 {
446 //=================== TRD parameters ============================
447
448 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
449 }
450
451 if (iFMD)
452 {
453 //=================== FMD parameters ============================
454 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
455 }
456
457 if (iMUON)
458 {
459 //=================== MUON parameters ===========================
460 // New MUONv1 version (geometry defined via builders)
461 AliMUON *MUON = new AliMUONv1("MUON", "default");
462 }
463 //=================== PHOS parameters ===========================
464
465 if (iPHOS)
466 {
467 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
468 }
469
470
471 if (iPMD)
472 {
473 //=================== PMD parameters ============================
474 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
475 }
476
477 if (iT0)
478 {
479 //=================== T0 parameters ============================
480 AliT0 *T0 = new AliT0v1("T0", "T0 Detector");
481 }
482
483 if (iEMCAL)
484 {
485 //=================== EMCAL parameters ============================
486 AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "SHISH_77_TRD1_2X2_FINAL_110DEG");
487 }
488
489 if (iACORDE)
490 {
491 //=================== ACORDE parameters ============================
492 AliACORDE *ACORDE = new AliACORDEv0("ACORDE", "normal ACORDE");
493 }
494
495 if (iVZERO)
496 {
497 //=================== ACORDE parameters ============================
498 AliVZERO *VZERO = new AliVZEROv7("VZERO", "normal VZERO");
499 }
500
501
502}
503
504Float_t EtaToTheta(Float_t arg){
505 return (180./TMath::Pi())*2.*atan(exp(-arg));
506}
507
508
509
510AliGenerator* GeneratorFactory(PprRun_t srun) {
511 Int_t isw = 3;
512 if (srad == kNoGluonRadiation) isw = 0;
513
514
515 AliGenerator * gGener = 0x0;
516 switch (srun) {
517 case test50:
518 {
519 comment = comment.Append(":HIJINGparam test 50 particles");
520 AliGenHIJINGpara *gener = new AliGenHIJINGpara(50);
521 gener->SetMomentumRange(0, 999999.);
522 gener->SetPhiRange(0., 360.);
523 // Set pseudorapidity range from -8 to 8.
524 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
525 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
526 gener->SetThetaRange(thmin,thmax);
527 gGener=gener;
528 }
529 break;
530 case kParam_8000:
531 {
532 comment = comment.Append(":HIJINGparam N=8000");
533 AliGenHIJINGpara *gener = new AliGenHIJINGpara(86030);
534 gener->SetMomentumRange(0, 999999.);
535 gener->SetPhiRange(0., 360.);
536 // Set pseudorapidity range from -8 to 8.
537 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
538 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
539 gener->SetThetaRange(thmin,thmax);
540 gGener=gener;
541 }
542 break;
543 case kParam_4000:
544 {
545 comment = comment.Append("HIJINGparam N=4000");
546 AliGenHIJINGpara *gener = new AliGenHIJINGpara(43015);
547 gener->SetMomentumRange(0, 999999.);
548 gener->SetPhiRange(0., 360.);
549 // Set pseudorapidity range from -8 to 8.
550 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
551 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
552 gener->SetThetaRange(thmin,thmax);
553 gGener=gener;
554 }
555 break;
556 case kParam_2000:
557 {
558 comment = comment.Append("HIJINGparam N=2000");
559 AliGenHIJINGpara *gener = new AliGenHIJINGpara(21507);
560 gener->SetMomentumRange(0, 999999.);
561 gener->SetPhiRange(0., 360.);
562 // Set pseudorapidity range from -8 to 8.
563 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
564 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
565 gener->SetThetaRange(thmin,thmax);
566 gGener=gener;
567 }
568 break;
569//
570// Hijing Central
571//
572 case kHijing_cent1:
573 {
574 comment = comment.Append("HIJING cent1");
575 AliGenHijing *gener = HijingStandard();
576// impact parameter range
577 gener->SetImpactParameterRange(0., 5.);
578 gGener=gener;
579 }
580 break;
581 case kHijing_cent2:
582 {
583 comment = comment.Append("HIJING cent2");
584 AliGenHijing *gener = HijingStandard();
585// impact parameter range
586 gener->SetImpactParameterRange(0., 2.);
587 gGener=gener;
588 }
589 break;
590//
591// Hijing Peripheral
592//
593 case kHijing_per1:
594 {
595 comment = comment.Append("HIJING per1");
596 AliGenHijing *gener = HijingStandard();
597// impact parameter range
598 gener->SetImpactParameterRange(5., 8.6);
599 gGener=gener;
600 }
601 break;
602 case kHijing_per2:
603 {
604 comment = comment.Append("HIJING per2");
605 AliGenHijing *gener = HijingStandard();
606// impact parameter range
607 gener->SetImpactParameterRange(8.6, 11.2);
608 gGener=gener;
609 }
610 break;
611 case kHijing_per3:
612 {
613 comment = comment.Append("HIJING per3");
614 AliGenHijing *gener = HijingStandard();
615// impact parameter range
616 gener->SetImpactParameterRange(11.2, 13.2);
617 gGener=gener;
618 }
619 break;
620 case kHijing_per4:
621 {
622 comment = comment.Append("HIJING per4");
623 AliGenHijing *gener = HijingStandard();
624// impact parameter range
625 gener->SetImpactParameterRange(13.2, 15.);
626 gGener=gener;
627 }
628 break;
629 case kHijing_per5:
630 {
631 comment = comment.Append("HIJING per5");
632 AliGenHijing *gener = HijingStandard();
633// impact parameter range
634 gener->SetImpactParameterRange(15., 100.);
635 gGener=gener;
636 }
637 break;
638//
639// Jet-Jet
640//
641 case kHijing_jj25:
642 {
643 comment = comment.Append("HIJING Jet 25 GeV");
644 AliGenHijing *gener = HijingStandard();
645// impact parameter range
646 gener->SetImpactParameterRange(0., 5.);
647 // trigger
648 gener->SetTrigger(1);
649 gener->SetPtJet(25.);
650 gener->SetRadiation(isw);
651 gener->SetSimpleJets(!isw);
652 gener->SetJetEtaRange(-0.3,0.3);
653 gener->SetJetPhiRange(75., 165.);
654 gGener=gener;
655 }
656 break;
657
658 case kHijing_jj50:
659 {
660 comment = comment.Append("HIJING Jet 50 GeV");
661 AliGenHijing *gener = HijingStandard();
662// impact parameter range
663 gener->SetImpactParameterRange(0., 5.);
664 // trigger
665 gener->SetTrigger(1);
666 gener->SetPtJet(50.);
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_jj75:
676 {
677 comment = comment.Append("HIJING Jet 75 GeV");
678 AliGenHijing *gener = HijingStandard();
679// impact parameter range
680 gener->SetImpactParameterRange(0., 5.);
681 // trigger
682 gener->SetTrigger(1);
683 gener->SetPtJet(75.);
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_jj100:
693 {
694 comment = comment.Append("HIJING Jet 100 GeV");
695 AliGenHijing *gener = HijingStandard();
696// impact parameter range
697 gener->SetImpactParameterRange(0., 5.);
698 // trigger
699 gener->SetTrigger(1);
700 gener->SetPtJet(100.);
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_jj200:
710 {
711 comment = comment.Append("HIJING Jet 200 GeV");
712 AliGenHijing *gener = HijingStandard();
713// impact parameter range
714 gener->SetImpactParameterRange(0., 5.);
715 // trigger
716 gener->SetTrigger(1);
717 gener->SetPtJet(200.);
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// Gamma-Jet
727//
728 case kHijing_gj25:
729 {
730 comment = comment.Append("HIJING Gamma 25 GeV");
731 AliGenHijing *gener = HijingStandard();
732// impact parameter range
733 gener->SetImpactParameterRange(0., 5.);
734 // trigger
735 gener->SetTrigger(2);
736 gener->SetPtJet(25.);
737 gener->SetRadiation(isw);
738 gener->SetSimpleJets(!isw);
739 gener->SetJetEtaRange(-0.12, 0.12);
740 gener->SetJetPhiRange(220., 320.);
741 gGener=gener;
742 }
743 break;
744
745 case kHijing_gj50:
746 {
747 comment = comment.Append("HIJING Gamma 50 GeV");
748 AliGenHijing *gener = HijingStandard();
749// impact parameter range
750 gener->SetImpactParameterRange(0., 5.);
751 // trigger
752 gener->SetTrigger(2);
753 gener->SetPtJet(50.);
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_gj75:
763 {
764 comment = comment.Append("HIJING Gamma 75 GeV");
765 AliGenHijing *gener = HijingStandard();
766// impact parameter range
767 gener->SetImpactParameterRange(0., 5.);
768 // trigger
769 gener->SetTrigger(2);
770 gener->SetPtJet(75.);
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_gj100:
780 {
781 comment = comment.Append("HIJING Gamma 100 GeV");
782 AliGenHijing *gener = HijingStandard();
783// impact parameter range
784 gener->SetImpactParameterRange(0., 5.);
785 // trigger
786 gener->SetTrigger(2);
787 gener->SetPtJet(100.);
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_gj200:
797 {
798 comment = comment.Append("HIJING Gamma 200 GeV");
799 AliGenHijing *gener = HijingStandard();
800// impact parameter range
801 gener->SetImpactParameterRange(0., 5.);
802 // trigger
803 gener->SetTrigger(2);
804 gener->SetPtJet(200.);
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 case kHijing_pA:
813 {
814 comment = comment.Append("HIJING pA");
815
816 AliGenCocktail *gener = new AliGenCocktail();
817
818 AliGenHijing *hijing = new AliGenHijing(-1);
819// centre of mass energy
820 hijing->SetEnergyCMS(TMath::Sqrt(82./208.) * 14000.);
821// impact parameter range
822 hijing->SetImpactParameterRange(0., 15.);
823// reference frame
824 hijing->SetReferenceFrame("CMS");
825 hijing->SetBoostLHC(1);
826// projectile
827 hijing->SetProjectile("P", 1, 1);
828 hijing->SetTarget ("A", 208, 82);
829// tell hijing to keep the full parent child chain
830 hijing->KeepFullEvent();
831// enable jet quenching
832 hijing->SetJetQuenching(0);
833// enable shadowing
834 hijing->SetShadowing(1);
835// Don't track spectators
836 hijing->SetSpectators(0);
837// kinematic selection
838 hijing->SetSelectAll(0);
839//
840 AliGenSlowNucleons* gray = new AliGenSlowNucleons(1);
841 AliSlowNucleonModel* model = new AliSlowNucleonModelExp();
842 gray->SetSlowNucleonModel(model);
843 gray->SetDebug(1);
844 gener->AddGenerator(hijing,"Hijing pPb", 1);
845 gener->AddGenerator(gray, "Gray Particles",1);
846 gGener=gener;
847 }
848 break;
849 case kPythia6:
850 {
851 comment = comment.Append(":Pythia p-p @ 14 TeV");
852 AliGenPythia *gener = new AliGenPythia(-1);
853 gener->SetMomentumRange(0,999999);
854 gener->SetThetaRange(0., 180.);
855 gener->SetYRange(-12,12);
856 gener->SetPtRange(0,1000);
857 gener->SetProcess(kPyMb);
858 gener->SetEnergyCMS(14000.);
859 gGener=gener;
860 }
861 break;
862 case kPythia6Jets20_24:
863 {
864 comment = comment.Append(":Pythia jets 20-24 GeV @ 5.5 TeV");
865 AliGenPythia * gener = new AliGenPythia(-1);
866 gener->SetEnergyCMS(5500.);// Centre of mass energy
867 gener->SetProcess(kPyJets);// Process type
868 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
869 gener->SetJetPhiRange(0., 360.);
870 gener->SetJetEtRange(10., 1000.);
871 gener->SetGluonRadiation(1,1);
872 // gener->SetPtKick(0.);
873 // Structure function
874 gener->SetStrucFunc(kCTEQ4L);
875 gener->SetPtHard(20., 24.);// Pt transfer of the hard scattering
876 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
877 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
878 gGener=gener;
879 }
880 break;
881 case kPythia6Jets24_29:
882 {
883 comment = comment.Append(":Pythia jets 24-29 GeV @ 5.5 TeV");
884 AliGenPythia * gener = new AliGenPythia(-1);
885 gener->SetEnergyCMS(5500.);// Centre of mass energy
886 gener->SetProcess(kPyJets);// Process type
887 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
888 gener->SetJetPhiRange(0., 360.);
889 gener->SetJetEtRange(10., 1000.);
890 gener->SetGluonRadiation(1,1);
891 // gener->SetPtKick(0.);
892 // Structure function
893 gener->SetStrucFunc(kCTEQ4L);
894 gener->SetPtHard(24., 29.);// Pt transfer of the hard scattering
895 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
896 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
897 gGener=gener;
898 }
899 break;
900 case kPythia6Jets29_35:
901 {
902 comment = comment.Append(":Pythia jets 29-35 GeV @ 5.5 TeV");
903 AliGenPythia * gener = new AliGenPythia(-1);
904 gener->SetEnergyCMS(5500.);// Centre of mass energy
905 gener->SetProcess(kPyJets);// Process type
906 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
907 gener->SetJetPhiRange(0., 360.);
908 gener->SetJetEtRange(10., 1000.);
909 gener->SetGluonRadiation(1,1);
910 // gener->SetPtKick(0.);
911 // Structure function
912 gener->SetStrucFunc(kCTEQ4L);
913 gener->SetPtHard(29., 35.);// Pt transfer of the hard scattering
914 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
915 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
916 gGener=gener;
917 }
918 break;
919 case kPythia6Jets35_42:
920 {
921 comment = comment.Append(":Pythia jets 35-42 GeV @ 5.5 TeV");
922 AliGenPythia * gener = new AliGenPythia(-1);
923 gener->SetEnergyCMS(5500.);// Centre of mass energy
924 gener->SetProcess(kPyJets);// Process type
925 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
926 gener->SetJetPhiRange(0., 360.);
927 gener->SetJetEtRange(10., 1000.);
928 gener->SetGluonRadiation(1,1);
929 // gener->SetPtKick(0.);
930 // Structure function
931 gener->SetStrucFunc(kCTEQ4L);
932 gener->SetPtHard(35., 42.);// Pt transfer of the hard scattering
933 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
934 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
935 gGener=gener;
936 }
937 break;
938 case kPythia6Jets42_50:
939 {
940 comment = comment.Append(":Pythia jets 42-50 GeV @ 5.5 TeV");
941 AliGenPythia * gener = new AliGenPythia(-1);
942 gener->SetEnergyCMS(5500.);// Centre of mass energy
943 gener->SetProcess(kPyJets);// Process type
944 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
945 gener->SetJetPhiRange(0., 360.);
946 gener->SetJetEtRange(10., 1000.);
947 gener->SetGluonRadiation(1,1);
948 // gener->SetPtKick(0.);
949 // Structure function
950 gener->SetStrucFunc(kCTEQ4L);
951 gener->SetPtHard(42., 50.);// Pt transfer of the hard scattering
952 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
953 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
954 gGener=gener;
955 }
956 break;
957 case kPythia6Jets50_60:
958 {
959 comment = comment.Append(":Pythia jets 50-60 GeV @ 5.5 TeV");
960 AliGenPythia * gener = new AliGenPythia(-1);
961 gener->SetEnergyCMS(5500.);// Centre of mass energy
962 gener->SetProcess(kPyJets);// Process type
963 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
964 gener->SetJetPhiRange(0., 360.);
965 gener->SetJetEtRange(10., 1000.);
966 gener->SetGluonRadiation(1,1);
967 // gener->SetPtKick(0.);
968 // Structure function
969 gener->SetStrucFunc(kCTEQ4L);
970 gener->SetPtHard(50., 60.);// Pt transfer of the hard scattering
971 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
972 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
973 gGener=gener;
974 }
975 break;
976 case kPythia6Jets60_72:
977 {
978 comment = comment.Append(":Pythia jets 60-72 GeV @ 5.5 TeV");
979 AliGenPythia * gener = new AliGenPythia(-1);
980 gener->SetEnergyCMS(5500.);// Centre of mass energy
981 gener->SetProcess(kPyJets);// Process type
982 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
983 gener->SetJetPhiRange(0., 360.);
984 gener->SetJetEtRange(10., 1000.);
985 gener->SetGluonRadiation(1,1);
986 // gener->SetPtKick(0.);
987 // Structure function
988 gener->SetStrucFunc(kCTEQ4L);
989 gener->SetPtHard(60., 72.);// Pt transfer of the hard scattering
990 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
991 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
992 gGener=gener;
993 }
994 break;
995 case kPythia6Jets72_86:
996 {
997 comment = comment.Append(":Pythia jets 72-86 GeV @ 5.5 TeV");
998 AliGenPythia * gener = new AliGenPythia(-1);
999 gener->SetEnergyCMS(5500.);// Centre of mass energy
1000 gener->SetProcess(kPyJets);// Process type
1001 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
1002 gener->SetJetPhiRange(0., 360.);
1003 gener->SetJetEtRange(10., 1000.);
1004 gener->SetGluonRadiation(1,1);
1005 // gener->SetPtKick(0.);
1006 // Structure function
1007 gener->SetStrucFunc(kCTEQ4L);
1008 gener->SetPtHard(72., 86.);// Pt transfer of the hard scattering
1009 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
1010 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
1011 gGener=gener;
1012 }
1013 break;
1014 case kPythia6Jets86_104:
1015 {
1016 comment = comment.Append(":Pythia jets 86-104 GeV @ 5.5 TeV");
1017 AliGenPythia * gener = new AliGenPythia(-1);
1018 gener->SetEnergyCMS(5500.);// Centre of mass energy
1019 gener->SetProcess(kPyJets);// Process type
1020 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
1021 gener->SetJetPhiRange(0., 360.);
1022 gener->SetJetEtRange(10., 1000.);
1023 gener->SetGluonRadiation(1,1);
1024 // gener->SetPtKick(0.);
1025 // Structure function
1026 gener->SetStrucFunc(kCTEQ4L);
1027 gener->SetPtHard(86., 104.);// Pt transfer of the hard scattering
1028 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
1029 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
1030 gGener=gener;
1031 }
1032 break;
1033 case kPythia6Jets104_125:
1034 {
1035 comment = comment.Append(":Pythia jets 105-125 GeV @ 5.5 TeV");
1036 AliGenPythia * gener = new AliGenPythia(-1);
1037 gener->SetEnergyCMS(5500.);// Centre of mass energy
1038 gener->SetProcess(kPyJets);// Process type
1039 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
1040 gener->SetJetPhiRange(0., 360.);
1041 gener->SetJetEtRange(10., 1000.);
1042 gener->SetGluonRadiation(1,1);
1043 // gener->SetPtKick(0.);
1044 // Structure function
1045 gener->SetStrucFunc(kCTEQ4L);
1046 gener->SetPtHard(104., 125.);// Pt transfer of the hard scattering
1047 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
1048 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
1049 gGener=gener;
1050 }
1051 break;
1052 case kPythia6Jets125_150:
1053 {
1054 comment = comment.Append(":Pythia jets 125-150 GeV @ 5.5 TeV");
1055 AliGenPythia * gener = new AliGenPythia(-1);
1056 gener->SetEnergyCMS(5500.);// Centre of mass energy
1057 gener->SetProcess(kPyJets);// Process type
1058 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
1059 gener->SetJetPhiRange(0., 360.);
1060 gener->SetJetEtRange(10., 1000.);
1061 gener->SetGluonRadiation(1,1);
1062 // gener->SetPtKick(0.);
1063 // Structure function
1064 gener->SetStrucFunc(kCTEQ4L);
1065 gener->SetPtHard(125., 150.);// Pt transfer of the hard scattering
1066 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
1067 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
1068 gGener=gener;
1069 }
1070 break;
1071 case kPythia6Jets150_180:
1072 {
1073 comment = comment.Append(":Pythia jets 150-180 GeV @ 5.5 TeV");
1074 AliGenPythia * gener = new AliGenPythia(-1);
1075 gener->SetEnergyCMS(5500.);// Centre of mass energy
1076 gener->SetProcess(kPyJets);// Process type
1077 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
1078 gener->SetJetPhiRange(0., 360.);
1079 gener->SetJetEtRange(10., 1000.);
1080 gener->SetGluonRadiation(1,1);
1081 // gener->SetPtKick(0.);
1082 // Structure function
1083 gener->SetStrucFunc(kCTEQ4L);
1084 gener->SetPtHard(150., 180.);// Pt transfer of the hard scattering
1085 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
1086 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
1087 gGener=gener;
1088 }
1089 break;
1090 case kD0PbPb5500:
1091 {
1092 comment = comment.Append(" D0 in Pb-Pb at 5.5 TeV");
1093 AliGenPythia * gener = new AliGenPythia(10);
1094 gener->SetProcess(kPyD0PbPbMNR);
1095 gener->SetStrucFunc(kCTEQ4L);
1096 gener->SetPtHard(2.1,-1.0);
1097 gener->SetEnergyCMS(5500.);
1098 gener->SetNuclei(208,208);
1099 gener->SetForceDecay(kHadronicD);
1100 gener->SetYRange(-2,2);
1101 gener->SetFeedDownHigherFamily(kFALSE);
1102 gener->SetStackFillOpt(AliGenPythia::kParentSelection);
1103 gener->SetCountMode(AliGenPythia::kCountParents);
1104 gGener=gener;
1105 }
1106 break;
1107 case kCharmSemiElPbPb5500:
1108 {
1109 comment = comment.Append(" Charm in Pb-Pb at 5.5 TeV");
1110 AliGenPythia * gener = new AliGenPythia(10);
1111 gener->SetProcess(kPyCharmPbPbMNR);
1112 gener->SetStrucFunc(kCTEQ4L);
1113 gener->SetPtHard(2.1,-1.0);
1114 gener->SetEnergyCMS(5500.);
1115 gener->SetNuclei(208,208);
1116 gener->SetForceDecay(kSemiElectronic);
1117 gener->SetYRange(-2,2);
1118 gener->SetFeedDownHigherFamily(kFALSE);
1119 gener->SetCountMode(AliGenPythia::kCountParents);
1120 gGener=gener;
1121 }
1122 break;
1123 case kBeautySemiElPbPb5500:
1124 {
1125 comment = comment.Append(" Beauty in Pb-Pb at 5.5 TeV");
1126 AliGenPythia *gener = new AliGenPythia(10);
1127 gener->SetProcess(kPyBeautyPbPbMNR);
1128 gener->SetStrucFunc(kCTEQ4L);
1129 gener->SetPtHard(2.75,-1.0);
1130 gener->SetEnergyCMS(5500.);
1131 gener->SetNuclei(208,208);
1132 gener->SetForceDecay(kSemiElectronic);
1133 gener->SetYRange(-2,2);
1134 gener->SetFeedDownHigherFamily(kFALSE);
1135 gener->SetCountMode(AliGenPythia::kCountParents);
1136 gGener=gener;
1137 }
1138 break;
1139 case kCocktailTRD:
1140 {
1141 comment = comment.Append(" Cocktail for TRD at 5.5 TeV");
1142 AliGenCocktail *gener = new AliGenCocktail();
1143
1144 AliGenParam *phi = new AliGenParam(10,
1145 new AliGenMUONlib(),
1146 AliGenMUONlib::kPhi,
1147 "Vogt PbPb");
1148
1149 phi->SetPtRange(0, 100);
1150 phi->SetYRange(-1., +1.);
1151 phi->SetForceDecay(kDiElectron);
1152
1153 AliGenParam *omega = new AliGenParam(10,
1154 new AliGenMUONlib(),
1155 AliGenMUONlib::kOmega,
1156 "Vogt PbPb");
1157
1158 omega->SetPtRange(0, 100);
1159 omega->SetYRange(-1., +1.);
1160 omega->SetForceDecay(kDiElectron);
1161
1162 AliGenParam *jpsi = new AliGenParam(10,
1163 new AliGenMUONlib(),
1164 AliGenMUONlib::kJpsiFamily,
1165 "Vogt PbPb");
1166
1167 jpsi->SetPtRange(0, 100);
1168 jpsi->SetYRange(-1., +1.);
1169 jpsi->SetForceDecay(kDiElectron);
1170
1171 AliGenParam *ups = new AliGenParam(10,
1172 new AliGenMUONlib(),
1173 AliGenMUONlib::kUpsilonFamily,
1174 "Vogt PbPb");
1175 ups->SetPtRange(0, 100);
1176 ups->SetYRange(-1., +1.);
1177 ups->SetForceDecay(kDiElectron);
1178
1179 AliGenParam *charm = new AliGenParam(10,
1180 new AliGenMUONlib(),
1181 AliGenMUONlib::kCharm,
1182 "central");
1183 charm->SetPtRange(0, 100);
1184 charm->SetYRange(-1.5, +1.5);
1185 charm->SetForceDecay(kSemiElectronic);
1186
1187
1188 AliGenParam *beauty = new AliGenParam(10,
1189 new AliGenMUONlib(),
1190 AliGenMUONlib::kBeauty,
1191 "central");
1192 beauty->SetPtRange(0, 100);
1193 beauty->SetYRange(-1.5, +1.5);
1194 beauty->SetForceDecay(kSemiElectronic);
1195
1196 AliGenParam *beautyJ = new AliGenParam(10,
1197 new AliGenMUONlib(),
1198 AliGenMUONlib::kBeauty,
1199 "central");
1200 beautyJ->SetPtRange(0, 100);
1201 beautyJ->SetYRange(-1.5, +1.5);
1202 beautyJ->SetForceDecay(kBJpsiDiElectron);
1203
1204 gener->AddGenerator(phi,"Phi",1);
1205 gener->AddGenerator(omega,"Omega",1);
1206 gener->AddGenerator(jpsi,"J/psi",1);
1207 gener->AddGenerator(ups,"Upsilon",1);
1208 gener->AddGenerator(charm,"Charm",1);
1209 gener->AddGenerator(beauty,"Beauty",1);
1210 gener->AddGenerator(beautyJ,"J/Psi from Beauty",1);
1211 gGener=gener;
1212 }
1213 break;
1214 case kPyJJ:
1215 {
1216 comment = comment.Append(" Jet-jet at 5.5 TeV");
1217 AliGenPythia *gener = new AliGenPythia(-1);
1218 gener->SetEnergyCMS(5500.);
1219 gener->SetProcess(kPyJets);
1220 Double_t ptHardMin=10.0, ptHardMax=-1.0;
1221 gener->SetPtHard(ptHardMin,ptHardMax);
1222 gener->SetYHard(-0.7,0.7);
1223 gener->SetJetEtaRange(-0.2,0.2);
1224 gener->SetEventListRange(0,1);
1225 gGener=gener;
1226 }
1227 break;
1228 case kPyGJ:
1229 {
1230 comment = comment.Append(" Gamma-jet at 5.5 TeV");
1231 AliGenPythia *gener = new AliGenPythia(-1);
1232 gener->SetEnergyCMS(5500.);
1233 gener->SetProcess(kPyDirectGamma);
1234 Double_t ptHardMin=10.0, ptHardMax=-1.0;
1235 gener->SetPtHard(ptHardMin,ptHardMax);
1236 gener->SetYHard(-1.0,1.0);
1237 gener->SetGammaEtaRange(-0.13,0.13);
1238 gener->SetGammaPhiRange(210.,330.);
1239 gener->SetEventListRange(0,1);
1240 gGener=gener;
1241 }
1242 break;
1243 case kMuonCocktailCent1:
1244 {
1245 comment = comment.Append(" Muon Cocktail Cent1");
1246 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1247 gener->SetPtRange(0.4,100.); // Transverse momentum range
1248 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1249 gener->SetYRange(-4.0,-2.4);
1250 gener->SetMuonPtCut(0.8);
1251 gener->SetMuonThetaCut(171.,178.);
1252 gener->SetMuonMultiplicity(2);
1253 gener->SetImpactParameterRange(0.,5.); //Centrality class Cent1 for PDC04
1254 gGener=gener;
1255 }
1256 break;
1257 case kMuonCocktailPer1:
1258 {
1259 comment = comment.Append(" Muon Cocktail Per1");
1260 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1261 gener->SetPtRange(0.0,100.); // Transverse momentum range
1262 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1263 gener->SetYRange(-4.0,-2.4);
1264 gener->SetMuonPtCut(0.8);
1265 gener->SetMuonThetaCut(171.,178.);
1266 gener->SetMuonMultiplicity(2);
1267 gener->SetImpactParameterRange(5.,8.6);//Centrality class Per1 for PDC04
1268 gGener=gener;
1269 }
1270 break;
1271 case kMuonCocktailPer4:
1272 {
1273 comment = comment.Append(" Muon Cocktail Per4");
1274 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1275 gener->SetPtRange(0.0,100.); // Transverse momentum range
1276 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1277 gener->SetYRange(-4.0,-2.4);
1278 gener->SetMuonPtCut(0.8);
1279 gener->SetMuonThetaCut(171.,178.);
1280 gener->SetMuonMultiplicity(2);
1281 gener->SetImpactParameterRange(13.2,15.0);//Centrality class Per4 for PDC04
1282 gGener=gener;
1283 }
1284 break;
1285 case kMuonCocktailCent1HighPt:
1286 {
1287 comment = comment.Append(" Muon Cocktail HighPt Cent1");
1288 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1289 gener->SetPtRange(0.0,100.); // Transverse momentum range
1290 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1291 gener->SetYRange(-4.0,-2.4);
1292 gener->SetMuonPtCut(2.5);
1293 gener->SetMuonThetaCut(171.,178.);
1294 gener->SetMuonMultiplicity(2);
1295 gener->SetImpactParameterRange(0.,5.); //Centrality class Cent1 for PDC04
1296 gGener=gener;
1297 }
1298 break;
1299 case kMuonCocktailPer1HighPt :
1300 {
1301 comment = comment.Append(" Muon Cocktail HighPt Per1");
1302 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1303 gener->SetPtRange(0.0,100.); // Transverse momentum range
1304 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1305 gener->SetYRange(-4.0,-2.4);
1306 gener->SetMuonPtCut(2.5);
1307 gener->SetMuonThetaCut(171.,178.);
1308 gener->SetMuonMultiplicity(2);
1309 gener->SetImpactParameterRange(5.,8.6);//Centrality class Per1 for PDC04
1310 gGener=gener;
1311 }
1312 break;
1313 case kMuonCocktailPer4HighPt:
1314 {
1315 comment = comment.Append(" Muon Cocktail HighPt Per4");
1316 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1317 gener->SetPtRange(0.0,100.); // Transverse momentum range
1318 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1319 gener->SetYRange(-4.0,-2.4);
1320 gener->SetMuonPtCut(2.5);
1321 gener->SetMuonThetaCut(171.,178.);
1322 gener->SetMuonMultiplicity(2);
1323 gener->SetImpactParameterRange(13.2,15.0);//Centrality class Per4 for PDC04
1324 gGener=gener;
1325 }
1326 break;
1327 case kMuonCocktailCent1Single:
1328 {
1329 comment = comment.Append(" Muon Cocktail Single Cent1");
1330 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1331 gener->SetPtRange(0.0,100.); // Transverse momentum range
1332 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1333 gener->SetYRange(-4.0,-2.4);
1334 gener->SetMuonPtCut(0.8);
1335 gener->SetMuonThetaCut(171.,178.);
1336 gener->SetMuonMultiplicity(1);
1337 gener->SetImpactParameterRange(0.,5.); //Centrality class Cent1 for PDC04
1338 gGener=gener;
1339 }
1340 break;
1341 case kMuonCocktailPer1Single :
1342 {
1343 comment = comment.Append(" Muon Cocktail Single Per1");
1344 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1345 gener->SetPtRange(0.0,100.); // Transverse momentum range
1346 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1347 gener->SetYRange(-4.0,-2.4);
1348 gener->SetMuonPtCut(0.8);
1349 gener->SetMuonThetaCut(171.,178.);
1350 gener->SetMuonMultiplicity(1);
1351 gener->SetImpactParameterRange(5.,8.6);//Centrality class Per1 for PDC04
1352 gener->SetNumberOfParticipants(229.3);//Centrality class Per1 for PDC04
1353 gGener=gener;
1354 }
1355 break;
1356 case kMuonCocktailPer4Single:
1357 {
1358 comment = comment.Append(" Muon Cocktail Single Per4");
1359 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1360 gener->SetPtRange(0.0,100.); // Transverse momentum range
1361 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1362 gener->SetYRange(-4.0,-2.4);
1363 gener->SetMuonPtCut(0.8);
1364 gener->SetMuonThetaCut(171.,178.);
1365 gener->SetMuonMultiplicity(1);
1366 gener->SetImpactParameterRange(13.2,15.0);//Centrality class Per4 for PDC04
1367 gGener=gener;
1368 }
1369 break;
1370 case kFlow_2_2000:
1371 {
1372 comment = comment.Append(" Flow with dN/deta = 2000, vn = 2%");
1373 gGener = GeVSimStandard(2000., 2.);
1374 }
1375 break;
1376
1377 case kFlow_10_2000:
1378 {
1379 comment = comment.Append(" Flow with dN/deta = 2000, vn = 10%");
1380 gGener = GeVSimStandard(2000., 10.);
1381 }
1382 break;
1383
1384 case kFlow_6_2000:
1385 {
1386 comment = comment.Append(" Flow with dN/deta = 2000, vn = 6%");
1387 gGener = GeVSimStandard(2000., 6.);
1388 }
1389 break;
1390
1391 case kFlow_6_5000:
1392 {
1393 comment = comment.Append(" Flow with dN/deta = 5000, vn = 6%");
1394 gGener = GeVSimStandard(5000., 6.);
1395 }
1396 break;
1397 case kHIJINGplus:
1398 {
1399 //
1400 // The cocktail
1401 AliGenCocktail *gener = new AliGenCocktail();
1402
1403 //
1404 // Charm production by Pythia
1405 AliGenPythia * genpyc = new AliGenPythia(230);
1406 genpyc->SetProcess(kPyCharmPbPbMNR);
1407 genpyc->SetStrucFunc(kCTEQ4L);
1408 genpyc->SetPtHard(2.1,-1.0);
1409 genpyc->SetEnergyCMS(5500.);
1410 genpyc->SetNuclei(208,208);
1411 genpyc->SetYRange(-999,999);
1412 genpyc->SetForceDecay(kAll);
1413 genpyc->SetFeedDownHigherFamily(kFALSE);
1414 genpyc->SetCountMode(AliGenPythia::kCountParents);
1415 //
1416 // Beauty production by Pythia
1417 AliGenPythia * genpyb = new AliGenPythia(9);
1418 genpyb->SetProcess(kPyBeautyPbPbMNR);
1419 genpyb->SetStrucFunc(kCTEQ4L);
1420 genpyb->SetPtHard(2.75,-1.0);
1421 genpyb->SetEnergyCMS(5500.);
1422 genpyb->SetNuclei(208,208);
1423 genpyb->SetYRange(-999,999);
1424 genpyb->SetForceDecay(kAll);
1425 genpyb->SetFeedDownHigherFamily(kFALSE);
1426 genpyb->SetCountMode(AliGenPythia::kCountParents);
1427 //
1428 // Hyperons
1429 //
1430 AliGenSTRANGElib *lib = new AliGenSTRANGElib();
1431 Int_t particle;
1432 // Xi
1433 particle = AliGenSTRANGElib::kXiMinus;
1434 AliGenParam *genXi = new AliGenParam(16,particle,lib->GetPt(particle),lib->GetY(particle),lib->GetIp(particle));
1435 genXi->SetPtRange(0., 12.);
1436 genXi->SetYRange(-1.1, 1.1);
1437 genXi->SetForceDecay(kNoDecay);
1438
1439 //
1440 // Omega
1441 particle = AliGenSTRANGElib::kOmegaMinus;
1442 AliGenParam *genOmega = new AliGenParam(10,particle,lib->GetPt(particle),lib->GetY(particle),lib->GetIp(particle));
1443 genOmega->SetPtRange(0, 12.);
1444 genOmega->SetYRange(-1.1, 1.1);
1445 genOmega->SetForceDecay(kNoDecay);
1446
1447 //
1448 // Central Hijing
1449 AliGenHijing *genHi = HijingStandard();
1450 genHi->SwitchOffHeavyQuarks(kTRUE);
1451 genHi->SetImpactParameterRange(0.,5.);
1452 //
1453 // Add everything to the cocktail and shake ...
1454 gener->AddGenerator(genHi, "Hijing cent1", 1);
1455 gener->AddGenerator(genpyc, "Extra charm", 1);
1456 gener->AddGenerator(genpyb, "Extra beauty", 1);
1457 gener->AddGenerator(genXi, "Xi" , 1);
1458 gener->AddGenerator(genOmega, "Omega", 1);
1459 gGener = gener;
1460 }
1461 break;
1462 default: break;
1463 }
1464
1465 return gGener;
1466}
1467
1468AliGenHijing* HijingStandard()
1469{
1470 AliGenHijing *gener = new AliGenHijing(-1);
1471// centre of mass energy
1472 gener->SetEnergyCMS(5500.);
1473// reference frame
1474 gener->SetReferenceFrame("CMS");
1475// projectile
1476 gener->SetProjectile("A", 208, 82);
1477 gener->SetTarget ("A", 208, 82);
1478// tell hijing to keep the full parent child chain
1479 gener->KeepFullEvent();
1480// enable jet quenching
1481 gener->SetJetQuenching(1);
1482// enable shadowing
1483 gener->SetShadowing(1);
1484// neutral pion and heavy particle decays switched off
1485 gener->SetDecaysOff(1);
1486// Don't track spectators
1487 gener->SetSpectators(0);
1488// kinematic selection
1489 gener->SetSelectAll(0);
1490 return gener;
1491}
1492
1493AliGenGeVSim* GeVSimStandard(Float_t mult, Float_t vn)
1494{
1495 AliGenGeVSim* gener = new AliGenGeVSim(0);
1496//
1497// Mult is the number of charged particles in |eta| < 0.5
1498// Vn is in (%)
1499//
1500// Sigma of the Gaussian dN/deta
1501 Float_t sigma_eta = 2.75;
1502//
1503// Maximum eta
1504 Float_t etamax = 7.00;
1505//
1506//
1507// Scale from multiplicity in |eta| < 0.5 to |eta| < |etamax|
1508 Float_t mm = mult * (TMath::Erf(etamax/sigma_eta/sqrt(2.)) / TMath::Erf(0.5/sigma_eta/sqrt(2.)));
1509//
1510// Scale from charged to total multiplicity
1511//
1512 mm *= 1.587;
1513//
1514// Vn
1515 vn /= 100.;
1516//
1517// Define particles
1518//
1519//
1520// 78% Pions (26% pi+, 26% pi-, 26% p0) T = 250 MeV
1521 AliGeVSimParticle *pp = new AliGeVSimParticle(kPiPlus, 1, 0.26 * mm, 0.25, sigma_eta) ;
1522 AliGeVSimParticle *pm = new AliGeVSimParticle(kPiMinus, 1, 0.26 * mm, 0.25, sigma_eta) ;
1523 AliGeVSimParticle *p0 = new AliGeVSimParticle(kPi0, 1, 0.26 * mm, 0.25, sigma_eta) ;
1524//
1525// 12% Kaons (3% K0short, 3% K0long, 3% K+, 3% K-) T = 300 MeV
1526 AliGeVSimParticle *ks = new AliGeVSimParticle(kK0Short, 1, 0.03 * mm, 0.30, sigma_eta) ;
1527 AliGeVSimParticle *kl = new AliGeVSimParticle(kK0Long, 1, 0.03 * mm, 0.30, sigma_eta) ;
1528 AliGeVSimParticle *kp = new AliGeVSimParticle(kKPlus, 1, 0.03 * mm, 0.30, sigma_eta) ;
1529 AliGeVSimParticle *km = new AliGeVSimParticle(kKMinus, 1, 0.03 * mm, 0.30, sigma_eta) ;
1530//
1531// 10% Protons / Neutrons (5% Protons, 5% Neutrons) T = 250 MeV
1532 AliGeVSimParticle *pr = new AliGeVSimParticle(kProton, 1, 0.05 * mm, 0.25, sigma_eta) ;
1533 AliGeVSimParticle *ne = new AliGeVSimParticle(kNeutron, 1, 0.05 * mm, 0.25, sigma_eta) ;
1534//
1535// Set Elliptic Flow properties
1536
1537 Float_t pTsaturation = 2. ;
1538
1539 pp->SetEllipticParam(vn,pTsaturation,0.) ;
1540 pm->SetEllipticParam(vn,pTsaturation,0.) ;
1541 p0->SetEllipticParam(vn,pTsaturation,0.) ;
1542 pr->SetEllipticParam(vn,pTsaturation,0.) ;
1543 ne->SetEllipticParam(vn,pTsaturation,0.) ;
1544 ks->SetEllipticParam(vn,pTsaturation,0.) ;
1545 kl->SetEllipticParam(vn,pTsaturation,0.) ;
1546 kp->SetEllipticParam(vn,pTsaturation,0.) ;
1547 km->SetEllipticParam(vn,pTsaturation,0.) ;
1548//
1549// Set Direct Flow properties
1550 pp->SetDirectedParam(vn,1.0,0.) ;
1551 pm->SetDirectedParam(vn,1.0,0.) ;
1552 p0->SetDirectedParam(vn,1.0,0.) ;
1553 pr->SetDirectedParam(vn,1.0,0.) ;
1554 ne->SetDirectedParam(vn,1.0,0.) ;
1555 ks->SetDirectedParam(vn,1.0,0.) ;
1556 kl->SetDirectedParam(vn,1.0,0.) ;
1557 kp->SetDirectedParam(vn,1.0,0.) ;
1558 km->SetDirectedParam(vn,1.0,0.) ;
1559//
1560// Add particles to the list
1561 gener->AddParticleType(pp) ;
1562 gener->AddParticleType(pm) ;
1563 gener->AddParticleType(p0) ;
1564 gener->AddParticleType(pr) ;
1565 gener->AddParticleType(ne) ;
1566 gener->AddParticleType(ks) ;
1567 gener->AddParticleType(kl) ;
1568 gener->AddParticleType(kp) ;
1569 gener->AddParticleType(km) ;
1570//
1571// Random Ev.Plane ----------------------------------
1572 TF1 *rpa = new TF1("gevsimPsiRndm","1", 0, 360);
1573// --------------------------------------------------
1574 gener->SetPtRange(0., 9.) ; // Use a resonable range! (used for bin size in numerical integration)
1575 gener->SetPhiRange(0, 360);
1576 //
1577 // Set pseudorapidity range
1578 Float_t thmin = EtaToTheta(+etamax);
1579 Float_t thmax = EtaToTheta(-etamax);
1580 gener->SetThetaRange(thmin,thmax);
1581 return gener;
1582}
1583
1584
1585
1586void ProcessEnvironmentVars()
1587{
1588 // Run type
1589 if (gSystem->Getenv("CONFIG_RUN_TYPE")) {
1590 for (Int_t iRun = 0; iRun < kRunMax; iRun++) {
1591 if (strcmp(gSystem->Getenv("CONFIG_RUN_TYPE"), pprRunName[iRun])==0) {
1592 srun = (PprRun_t)iRun;
1593 cout<<"Run type set to "<<pprRunName[iRun]<<endl;
1594 }
1595 }
1596 }
1597
1598 // Random Number seed
1599 if (gSystem->Getenv("CONFIG_SEED")) {
1600 sseed = atoi(gSystem->Getenv("CONFIG_SEED"));
1601 }
1602}