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