Changes for #89427: Porting modification for material budget issues to the Release...
[u/mrichter/AliRoot.git] / TPC / testMC / ConfigCosmic.C
CommitLineData
a2c98880 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"
f7a1cc68 34#include "STEER/AliMagF.h"
a2c98880 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"
3a5fcc75 43#include "ITS/AliITSv11.h"
a2c98880 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
a2c98880 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;
f7a1cc68 123static AliMagF::BMap_t smag = AliMagF::k5kG;
a2c98880 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
28da60d3 181 AliSimulation::Instance()->SetTriggerConfig(pprTrigConfName[strig]);
a2c98880 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
f7a1cc68 253 if (smag == AliMagF::k2kG) {
a2c98880 254 comment = comment.Append(" | L3 field 0.2 T");
f7a1cc68 255 } else if (smag == AliMagF::k5kG) {
a2c98880 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));
a2c98880 273 rl->CdGAFile();
a2c98880 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
3a5fcc75 361 AliITS *ITS = new AliITSv11("ITS","ITS v11");
a2c98880 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 break;
480 case kParam_8000:
481 {
482 comment = comment.Append(":HIJINGparam N=8000");
483 AliGenHIJINGpara *gener = new AliGenHIJINGpara(86030);
484 gener->SetMomentumRange(0, 999999.);
485 gener->SetPhiRange(0., 360.);
486 // Set pseudorapidity range from -8 to 8.
487 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
488 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
489 gener->SetThetaRange(thmin,thmax);
490 gGener=gener;
491 }
492 break;
493 case kParam_4000:
494 {
495 comment = comment.Append("HIJINGparam N=4000");
496 AliGenHIJINGpara *gener = new AliGenHIJINGpara(43015);
497 gener->SetMomentumRange(0, 999999.);
498 gener->SetPhiRange(0., 360.);
499 // Set pseudorapidity range from -8 to 8.
500 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
501 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
502 gener->SetThetaRange(thmin,thmax);
503 gGener=gener;
504 }
505 break;
506 case kParam_2000:
507 {
508 comment = comment.Append("HIJINGparam N=2000");
509 AliGenHIJINGpara *gener = new AliGenHIJINGpara(21507);
510 gener->SetMomentumRange(0, 999999.);
511 gener->SetPhiRange(0., 360.);
512 // Set pseudorapidity range from -8 to 8.
513 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
514 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
515 gener->SetThetaRange(thmin,thmax);
516 gGener=gener;
517 }
518 break;
519//
520// Hijing Central
521//
522 case kHijing_cent1:
523 {
524 comment = comment.Append("HIJING cent1");
525 AliGenHijing *gener = HijingStandard();
526// impact parameter range
527 gener->SetImpactParameterRange(0., 5.);
528 gGener=gener;
529 }
530 break;
531 case kHijing_cent2:
532 {
533 comment = comment.Append("HIJING cent2");
534 AliGenHijing *gener = HijingStandard();
535// impact parameter range
536 gener->SetImpactParameterRange(0., 2.);
537 gGener=gener;
538 }
539 break;
540//
541// Hijing Peripheral
542//
543 case kHijing_per1:
544 {
545 comment = comment.Append("HIJING per1");
546 AliGenHijing *gener = HijingStandard();
547// impact parameter range
548 gener->SetImpactParameterRange(5., 8.6);
549 gGener=gener;
550 }
551 break;
552 case kHijing_per2:
553 {
554 comment = comment.Append("HIJING per2");
555 AliGenHijing *gener = HijingStandard();
556// impact parameter range
557 gener->SetImpactParameterRange(8.6, 11.2);
558 gGener=gener;
559 }
560 break;
561 case kHijing_per3:
562 {
563 comment = comment.Append("HIJING per3");
564 AliGenHijing *gener = HijingStandard();
565// impact parameter range
566 gener->SetImpactParameterRange(11.2, 13.2);
567 gGener=gener;
568 }
569 break;
570 case kHijing_per4:
571 {
572 comment = comment.Append("HIJING per4");
573 AliGenHijing *gener = HijingStandard();
574// impact parameter range
575 gener->SetImpactParameterRange(13.2, 15.);
576 gGener=gener;
577 }
578 break;
579 case kHijing_per5:
580 {
581 comment = comment.Append("HIJING per5");
582 AliGenHijing *gener = HijingStandard();
583// impact parameter range
584 gener->SetImpactParameterRange(15., 100.);
585 gGener=gener;
586 }
587 break;
588//
589// Jet-Jet
590//
591 case kHijing_jj25:
592 {
593 comment = comment.Append("HIJING Jet 25 GeV");
594 AliGenHijing *gener = HijingStandard();
595// impact parameter range
596 gener->SetImpactParameterRange(0., 5.);
597 // trigger
598 gener->SetTrigger(1);
599 gener->SetPtJet(25.);
600 gener->SetRadiation(isw);
601 gener->SetSimpleJets(!isw);
602 gener->SetJetEtaRange(-0.3,0.3);
603 gener->SetJetPhiRange(75., 165.);
604 gGener=gener;
605 }
606 break;
607
608 case kHijing_jj50:
609 {
610 comment = comment.Append("HIJING Jet 50 GeV");
611 AliGenHijing *gener = HijingStandard();
612// impact parameter range
613 gener->SetImpactParameterRange(0., 5.);
614 // trigger
615 gener->SetTrigger(1);
616 gener->SetPtJet(50.);
617 gener->SetRadiation(isw);
618 gener->SetSimpleJets(!isw);
619 gener->SetJetEtaRange(-0.3,0.3);
620 gener->SetJetPhiRange(75., 165.);
621 gGener=gener;
622 }
623 break;
624
625 case kHijing_jj75:
626 {
627 comment = comment.Append("HIJING Jet 75 GeV");
628 AliGenHijing *gener = HijingStandard();
629// impact parameter range
630 gener->SetImpactParameterRange(0., 5.);
631 // trigger
632 gener->SetTrigger(1);
633 gener->SetPtJet(75.);
634 gener->SetRadiation(isw);
635 gener->SetSimpleJets(!isw);
636 gener->SetJetEtaRange(-0.3,0.3);
637 gener->SetJetPhiRange(75., 165.);
638 gGener=gener;
639 }
640 break;
641
642 case kHijing_jj100:
643 {
644 comment = comment.Append("HIJING Jet 100 GeV");
645 AliGenHijing *gener = HijingStandard();
646// impact parameter range
647 gener->SetImpactParameterRange(0., 5.);
648 // trigger
649 gener->SetTrigger(1);
650 gener->SetPtJet(100.);
651 gener->SetRadiation(isw);
652 gener->SetSimpleJets(!isw);
653 gener->SetJetEtaRange(-0.3,0.3);
654 gener->SetJetPhiRange(75., 165.);
655 gGener=gener;
656 }
657 break;
658
659 case kHijing_jj200:
660 {
661 comment = comment.Append("HIJING Jet 200 GeV");
662 AliGenHijing *gener = HijingStandard();
663// impact parameter range
664 gener->SetImpactParameterRange(0., 5.);
665 // trigger
666 gener->SetTrigger(1);
667 gener->SetPtJet(200.);
668 gener->SetRadiation(isw);
669 gener->SetSimpleJets(!isw);
670 gener->SetJetEtaRange(-0.3,0.3);
671 gener->SetJetPhiRange(75., 165.);
672 gGener=gener;
673 }
674 break;
675//
676// Gamma-Jet
677//
678 case kHijing_gj25:
679 {
680 comment = comment.Append("HIJING Gamma 25 GeV");
681 AliGenHijing *gener = HijingStandard();
682// impact parameter range
683 gener->SetImpactParameterRange(0., 5.);
684 // trigger
685 gener->SetTrigger(2);
686 gener->SetPtJet(25.);
687 gener->SetRadiation(isw);
688 gener->SetSimpleJets(!isw);
689 gener->SetJetEtaRange(-0.12, 0.12);
690 gener->SetJetPhiRange(220., 320.);
691 gGener=gener;
692 }
693 break;
694
695 case kHijing_gj50:
696 {
697 comment = comment.Append("HIJING Gamma 50 GeV");
698 AliGenHijing *gener = HijingStandard();
699// impact parameter range
700 gener->SetImpactParameterRange(0., 5.);
701 // trigger
702 gener->SetTrigger(2);
703 gener->SetPtJet(50.);
704 gener->SetRadiation(isw);
705 gener->SetSimpleJets(!isw);
706 gener->SetJetEtaRange(-0.12, 0.12);
707 gener->SetJetPhiRange(220., 320.);
708 gGener=gener;
709 }
710 break;
711
712 case kHijing_gj75:
713 {
714 comment = comment.Append("HIJING Gamma 75 GeV");
715 AliGenHijing *gener = HijingStandard();
716// impact parameter range
717 gener->SetImpactParameterRange(0., 5.);
718 // trigger
719 gener->SetTrigger(2);
720 gener->SetPtJet(75.);
721 gener->SetRadiation(isw);
722 gener->SetSimpleJets(!isw);
723 gener->SetJetEtaRange(-0.12, 0.12);
724 gener->SetJetPhiRange(220., 320.);
725 gGener=gener;
726 }
727 break;
728
729 case kHijing_gj100:
730 {
731 comment = comment.Append("HIJING Gamma 100 GeV");
732 AliGenHijing *gener = HijingStandard();
733// impact parameter range
734 gener->SetImpactParameterRange(0., 5.);
735 // trigger
736 gener->SetTrigger(2);
737 gener->SetPtJet(100.);
738 gener->SetRadiation(isw);
739 gener->SetSimpleJets(!isw);
740 gener->SetJetEtaRange(-0.12, 0.12);
741 gener->SetJetPhiRange(220., 320.);
742 gGener=gener;
743 }
744 break;
745
746 case kHijing_gj200:
747 {
748 comment = comment.Append("HIJING Gamma 200 GeV");
749 AliGenHijing *gener = HijingStandard();
750// impact parameter range
751 gener->SetImpactParameterRange(0., 5.);
752 // trigger
753 gener->SetTrigger(2);
754 gener->SetPtJet(200.);
755 gener->SetRadiation(isw);
756 gener->SetSimpleJets(!isw);
757 gener->SetJetEtaRange(-0.12, 0.12);
758 gener->SetJetPhiRange(220., 320.);
759 gGener=gener;
760 }
761 break;
762 case kHijing_pA:
763 {
764 comment = comment.Append("HIJING pA");
765
766 AliGenCocktail *gener = new AliGenCocktail();
767
768 AliGenHijing *hijing = new AliGenHijing(-1);
769// centre of mass energy
770 hijing->SetEnergyCMS(TMath::Sqrt(82./208.) * 14000.);
771// impact parameter range
772 hijing->SetImpactParameterRange(0., 15.);
773// reference frame
774 hijing->SetReferenceFrame("CMS");
775 hijing->SetBoostLHC(1);
776// projectile
777 hijing->SetProjectile("P", 1, 1);
778 hijing->SetTarget ("A", 208, 82);
779// tell hijing to keep the full parent child chain
780 hijing->KeepFullEvent();
781// enable jet quenching
782 hijing->SetJetQuenching(0);
783// enable shadowing
784 hijing->SetShadowing(1);
785// Don't track spectators
786 hijing->SetSpectators(0);
787// kinematic selection
788 hijing->SetSelectAll(0);
789//
790 AliGenSlowNucleons* gray = new AliGenSlowNucleons(1);
791 AliSlowNucleonModel* model = new AliSlowNucleonModelExp();
792 gray->SetSlowNucleonModel(model);
793 gray->SetDebug(1);
794 gener->AddGenerator(hijing,"Hijing pPb", 1);
795 gener->AddGenerator(gray, "Gray Particles",1);
796 gGener=gener;
797 }
798 break;
799 case kPythia6:
800 {
801 comment = comment.Append(":Pythia p-p @ 14 TeV");
802 AliGenPythia *gener = new AliGenPythia(-1);
803 gener->SetMomentumRange(0,999999);
804 gener->SetThetaRange(0., 180.);
805 gener->SetYRange(-12,12);
806 gener->SetPtRange(0,1000);
807 gener->SetProcess(kPyMb);
808 gener->SetEnergyCMS(14000.);
809 gGener=gener;
810 }
811 break;
812 case kPythia6Jets20_24:
813 {
814 comment = comment.Append(":Pythia jets 20-24 GeV @ 5.5 TeV");
815 AliGenPythia * gener = new AliGenPythia(-1);
816 gener->SetEnergyCMS(5500.);// Centre of mass energy
817 gener->SetProcess(kPyJets);// Process type
818 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
819 gener->SetJetPhiRange(0., 360.);
820 gener->SetJetEtRange(10., 1000.);
821 gener->SetGluonRadiation(1,1);
822 // gener->SetPtKick(0.);
823 // Structure function
824 gener->SetStrucFunc(kCTEQ4L);
825 gener->SetPtHard(20., 24.);// Pt transfer of the hard scattering
826 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
827 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
828 gGener=gener;
829 }
830 break;
831 case kPythia6Jets24_29:
832 {
833 comment = comment.Append(":Pythia jets 24-29 GeV @ 5.5 TeV");
834 AliGenPythia * gener = new AliGenPythia(-1);
835 gener->SetEnergyCMS(5500.);// Centre of mass energy
836 gener->SetProcess(kPyJets);// Process type
837 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
838 gener->SetJetPhiRange(0., 360.);
839 gener->SetJetEtRange(10., 1000.);
840 gener->SetGluonRadiation(1,1);
841 // gener->SetPtKick(0.);
842 // Structure function
843 gener->SetStrucFunc(kCTEQ4L);
844 gener->SetPtHard(24., 29.);// Pt transfer of the hard scattering
845 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
846 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
847 gGener=gener;
848 }
849 break;
850 case kPythia6Jets29_35:
851 {
852 comment = comment.Append(":Pythia jets 29-35 GeV @ 5.5 TeV");
853 AliGenPythia * gener = new AliGenPythia(-1);
854 gener->SetEnergyCMS(5500.);// Centre of mass energy
855 gener->SetProcess(kPyJets);// Process type
856 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
857 gener->SetJetPhiRange(0., 360.);
858 gener->SetJetEtRange(10., 1000.);
859 gener->SetGluonRadiation(1,1);
860 // gener->SetPtKick(0.);
861 // Structure function
862 gener->SetStrucFunc(kCTEQ4L);
863 gener->SetPtHard(29., 35.);// Pt transfer of the hard scattering
864 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
865 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
866 gGener=gener;
867 }
868 break;
869 case kPythia6Jets35_42:
870 {
871 comment = comment.Append(":Pythia jets 35-42 GeV @ 5.5 TeV");
872 AliGenPythia * gener = new AliGenPythia(-1);
873 gener->SetEnergyCMS(5500.);// Centre of mass energy
874 gener->SetProcess(kPyJets);// Process type
875 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
876 gener->SetJetPhiRange(0., 360.);
877 gener->SetJetEtRange(10., 1000.);
878 gener->SetGluonRadiation(1,1);
879 // gener->SetPtKick(0.);
880 // Structure function
881 gener->SetStrucFunc(kCTEQ4L);
882 gener->SetPtHard(35., 42.);// Pt transfer of the hard scattering
883 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
884 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
885 gGener=gener;
886 }
887 break;
888 case kPythia6Jets42_50:
889 {
890 comment = comment.Append(":Pythia jets 42-50 GeV @ 5.5 TeV");
891 AliGenPythia * gener = new AliGenPythia(-1);
892 gener->SetEnergyCMS(5500.);// Centre of mass energy
893 gener->SetProcess(kPyJets);// Process type
894 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
895 gener->SetJetPhiRange(0., 360.);
896 gener->SetJetEtRange(10., 1000.);
897 gener->SetGluonRadiation(1,1);
898 // gener->SetPtKick(0.);
899 // Structure function
900 gener->SetStrucFunc(kCTEQ4L);
901 gener->SetPtHard(42., 50.);// Pt transfer of the hard scattering
902 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
903 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
904 gGener=gener;
905 }
906 break;
907 case kPythia6Jets50_60:
908 {
909 comment = comment.Append(":Pythia jets 50-60 GeV @ 5.5 TeV");
910 AliGenPythia * gener = new AliGenPythia(-1);
911 gener->SetEnergyCMS(5500.);// Centre of mass energy
912 gener->SetProcess(kPyJets);// Process type
913 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
914 gener->SetJetPhiRange(0., 360.);
915 gener->SetJetEtRange(10., 1000.);
916 gener->SetGluonRadiation(1,1);
917 // gener->SetPtKick(0.);
918 // Structure function
919 gener->SetStrucFunc(kCTEQ4L);
920 gener->SetPtHard(50., 60.);// Pt transfer of the hard scattering
921 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
922 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
923 gGener=gener;
924 }
925 break;
926 case kPythia6Jets60_72:
927 {
928 comment = comment.Append(":Pythia jets 60-72 GeV @ 5.5 TeV");
929 AliGenPythia * gener = new AliGenPythia(-1);
930 gener->SetEnergyCMS(5500.);// Centre of mass energy
931 gener->SetProcess(kPyJets);// Process type
932 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
933 gener->SetJetPhiRange(0., 360.);
934 gener->SetJetEtRange(10., 1000.);
935 gener->SetGluonRadiation(1,1);
936 // gener->SetPtKick(0.);
937 // Structure function
938 gener->SetStrucFunc(kCTEQ4L);
939 gener->SetPtHard(60., 72.);// Pt transfer of the hard scattering
940 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
941 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
942 gGener=gener;
943 }
944 break;
945 case kPythia6Jets72_86:
946 {
947 comment = comment.Append(":Pythia jets 72-86 GeV @ 5.5 TeV");
948 AliGenPythia * gener = new AliGenPythia(-1);
949 gener->SetEnergyCMS(5500.);// Centre of mass energy
950 gener->SetProcess(kPyJets);// Process type
951 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
952 gener->SetJetPhiRange(0., 360.);
953 gener->SetJetEtRange(10., 1000.);
954 gener->SetGluonRadiation(1,1);
955 // gener->SetPtKick(0.);
956 // Structure function
957 gener->SetStrucFunc(kCTEQ4L);
958 gener->SetPtHard(72., 86.);// Pt transfer of the hard scattering
959 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
960 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
961 gGener=gener;
962 }
963 break;
964 case kPythia6Jets86_104:
965 {
966 comment = comment.Append(":Pythia jets 86-104 GeV @ 5.5 TeV");
967 AliGenPythia * gener = new AliGenPythia(-1);
968 gener->SetEnergyCMS(5500.);// Centre of mass energy
969 gener->SetProcess(kPyJets);// Process type
970 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
971 gener->SetJetPhiRange(0., 360.);
972 gener->SetJetEtRange(10., 1000.);
973 gener->SetGluonRadiation(1,1);
974 // gener->SetPtKick(0.);
975 // Structure function
976 gener->SetStrucFunc(kCTEQ4L);
977 gener->SetPtHard(86., 104.);// Pt transfer of the hard scattering
978 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
979 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
980 gGener=gener;
981 }
982 break;
983 case kPythia6Jets104_125:
984 {
985 comment = comment.Append(":Pythia jets 105-125 GeV @ 5.5 TeV");
986 AliGenPythia * gener = new AliGenPythia(-1);
987 gener->SetEnergyCMS(5500.);// Centre of mass energy
988 gener->SetProcess(kPyJets);// Process type
989 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
990 gener->SetJetPhiRange(0., 360.);
991 gener->SetJetEtRange(10., 1000.);
992 gener->SetGluonRadiation(1,1);
993 // gener->SetPtKick(0.);
994 // Structure function
995 gener->SetStrucFunc(kCTEQ4L);
996 gener->SetPtHard(104., 125.);// Pt transfer of the hard scattering
997 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
998 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
999 gGener=gener;
1000 }
1001 break;
1002 case kPythia6Jets125_150:
1003 {
1004 comment = comment.Append(":Pythia jets 125-150 GeV @ 5.5 TeV");
1005 AliGenPythia * gener = new AliGenPythia(-1);
1006 gener->SetEnergyCMS(5500.);// Centre of mass energy
1007 gener->SetProcess(kPyJets);// Process type
1008 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
1009 gener->SetJetPhiRange(0., 360.);
1010 gener->SetJetEtRange(10., 1000.);
1011 gener->SetGluonRadiation(1,1);
1012 // gener->SetPtKick(0.);
1013 // Structure function
1014 gener->SetStrucFunc(kCTEQ4L);
1015 gener->SetPtHard(125., 150.);// Pt transfer of the hard scattering
1016 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
1017 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
1018 gGener=gener;
1019 }
1020 break;
1021 case kPythia6Jets150_180:
1022 {
1023 comment = comment.Append(":Pythia jets 150-180 GeV @ 5.5 TeV");
1024 AliGenPythia * gener = new AliGenPythia(-1);
1025 gener->SetEnergyCMS(5500.);// Centre of mass energy
1026 gener->SetProcess(kPyJets);// Process type
1027 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
1028 gener->SetJetPhiRange(0., 360.);
1029 gener->SetJetEtRange(10., 1000.);
1030 gener->SetGluonRadiation(1,1);
1031 // gener->SetPtKick(0.);
1032 // Structure function
1033 gener->SetStrucFunc(kCTEQ4L);
1034 gener->SetPtHard(150., 180.);// Pt transfer of the hard scattering
1035 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
1036 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
1037 gGener=gener;
1038 }
1039 break;
1040 case kD0PbPb5500:
1041 {
1042 comment = comment.Append(" D0 in Pb-Pb at 5.5 TeV");
1043 AliGenPythia * gener = new AliGenPythia(10);
1044 gener->SetProcess(kPyD0PbPbMNR);
1045 gener->SetStrucFunc(kCTEQ4L);
1046 gener->SetPtHard(2.1,-1.0);
1047 gener->SetEnergyCMS(5500.);
1048 gener->SetNuclei(208,208);
1049 gener->SetForceDecay(kHadronicD);
1050 gener->SetYRange(-2,2);
1051 gener->SetFeedDownHigherFamily(kFALSE);
1052 gener->SetStackFillOpt(AliGenPythia::kParentSelection);
1053 gener->SetCountMode(AliGenPythia::kCountParents);
1054 gGener=gener;
1055 }
1056 break;
1057 case kCharmSemiElPbPb5500:
1058 {
1059 comment = comment.Append(" Charm in Pb-Pb at 5.5 TeV");
1060 AliGenPythia * gener = new AliGenPythia(10);
1061 gener->SetProcess(kPyCharmPbPbMNR);
1062 gener->SetStrucFunc(kCTEQ4L);
1063 gener->SetPtHard(2.1,-1.0);
1064 gener->SetEnergyCMS(5500.);
1065 gener->SetNuclei(208,208);
1066 gener->SetForceDecay(kSemiElectronic);
1067 gener->SetYRange(-2,2);
1068 gener->SetFeedDownHigherFamily(kFALSE);
1069 gener->SetCountMode(AliGenPythia::kCountParents);
1070 gGener=gener;
1071 }
1072 break;
1073 case kBeautySemiElPbPb5500:
1074 {
1075 comment = comment.Append(" Beauty in Pb-Pb at 5.5 TeV");
1076 AliGenPythia *gener = new AliGenPythia(10);
1077 gener->SetProcess(kPyBeautyPbPbMNR);
1078 gener->SetStrucFunc(kCTEQ4L);
1079 gener->SetPtHard(2.75,-1.0);
1080 gener->SetEnergyCMS(5500.);
1081 gener->SetNuclei(208,208);
1082 gener->SetForceDecay(kSemiElectronic);
1083 gener->SetYRange(-2,2);
1084 gener->SetFeedDownHigherFamily(kFALSE);
1085 gener->SetCountMode(AliGenPythia::kCountParents);
1086 gGener=gener;
1087 }
1088 break;
1089 case kCocktailTRD:
1090 {
1091 comment = comment.Append(" Cocktail for TRD at 5.5 TeV");
1092 AliGenCocktail *gener = new AliGenCocktail();
1093
1094 AliGenParam *phi = new AliGenParam(10,
1095 new AliGenMUONlib(),
1096 AliGenMUONlib::kPhi,
1097 "Vogt PbPb");
1098
1099 phi->SetPtRange(0, 100);
1100 phi->SetYRange(-1., +1.);
1101 phi->SetForceDecay(kDiElectron);
1102
1103 AliGenParam *omega = new AliGenParam(10,
1104 new AliGenMUONlib(),
1105 AliGenMUONlib::kOmega,
1106 "Vogt PbPb");
1107
1108 omega->SetPtRange(0, 100);
1109 omega->SetYRange(-1., +1.);
1110 omega->SetForceDecay(kDiElectron);
1111
1112 AliGenParam *jpsi = new AliGenParam(10,
1113 new AliGenMUONlib(),
1114 AliGenMUONlib::kJpsiFamily,
1115 "Vogt PbPb");
1116
1117 jpsi->SetPtRange(0, 100);
1118 jpsi->SetYRange(-1., +1.);
1119 jpsi->SetForceDecay(kDiElectron);
1120
1121 AliGenParam *ups = new AliGenParam(10,
1122 new AliGenMUONlib(),
1123 AliGenMUONlib::kUpsilonFamily,
1124 "Vogt PbPb");
1125 ups->SetPtRange(0, 100);
1126 ups->SetYRange(-1., +1.);
1127 ups->SetForceDecay(kDiElectron);
1128
1129 AliGenParam *charm = new AliGenParam(10,
1130 new AliGenMUONlib(),
1131 AliGenMUONlib::kCharm,
1132 "central");
1133 charm->SetPtRange(0, 100);
1134 charm->SetYRange(-1.5, +1.5);
1135 charm->SetForceDecay(kSemiElectronic);
1136
1137
1138 AliGenParam *beauty = new AliGenParam(10,
1139 new AliGenMUONlib(),
1140 AliGenMUONlib::kBeauty,
1141 "central");
1142 beauty->SetPtRange(0, 100);
1143 beauty->SetYRange(-1.5, +1.5);
1144 beauty->SetForceDecay(kSemiElectronic);
1145
1146 AliGenParam *beautyJ = new AliGenParam(10,
1147 new AliGenMUONlib(),
1148 AliGenMUONlib::kBeauty,
1149 "central");
1150 beautyJ->SetPtRange(0, 100);
1151 beautyJ->SetYRange(-1.5, +1.5);
1152 beautyJ->SetForceDecay(kBJpsiDiElectron);
1153
1154 gener->AddGenerator(phi,"Phi",1);
1155 gener->AddGenerator(omega,"Omega",1);
1156 gener->AddGenerator(jpsi,"J/psi",1);
1157 gener->AddGenerator(ups,"Upsilon",1);
1158 gener->AddGenerator(charm,"Charm",1);
1159 gener->AddGenerator(beauty,"Beauty",1);
1160 gener->AddGenerator(beautyJ,"J/Psi from Beauty",1);
1161 gGener=gener;
1162 }
1163 break;
1164 case kPyJJ:
1165 {
1166 comment = comment.Append(" Jet-jet at 5.5 TeV");
1167 AliGenPythia *gener = new AliGenPythia(-1);
1168 gener->SetEnergyCMS(5500.);
1169 gener->SetProcess(kPyJets);
1170 Double_t ptHardMin=10.0, ptHardMax=-1.0;
1171 gener->SetPtHard(ptHardMin,ptHardMax);
1172 gener->SetYHard(-0.7,0.7);
1173 gener->SetJetEtaRange(-0.2,0.2);
1174 gener->SetEventListRange(0,1);
1175 gGener=gener;
1176 }
1177 break;
1178 case kPyGJ:
1179 {
1180 comment = comment.Append(" Gamma-jet at 5.5 TeV");
1181 AliGenPythia *gener = new AliGenPythia(-1);
1182 gener->SetEnergyCMS(5500.);
1183 gener->SetProcess(kPyDirectGamma);
1184 Double_t ptHardMin=10.0, ptHardMax=-1.0;
1185 gener->SetPtHard(ptHardMin,ptHardMax);
1186 gener->SetYHard(-1.0,1.0);
1187 gener->SetGammaEtaRange(-0.13,0.13);
1188 gener->SetGammaPhiRange(210.,330.);
1189 gener->SetEventListRange(0,1);
1190 gGener=gener;
1191 }
1192 break;
1193 case kMuonCocktailCent1:
1194 {
1195 comment = comment.Append(" Muon Cocktail Cent1");
1196 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1197 gener->SetPtRange(0.4,100.); // Transverse momentum range
1198 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1199 gener->SetYRange(-4.0,-2.4);
1200 gener->SetMuonPtCut(0.8);
1201 gener->SetMuonThetaCut(171.,178.);
1202 gener->SetMuonMultiplicity(2);
1203 gener->SetImpactParameterRange(0.,5.); //Centrality class Cent1 for PDC04
1204 gGener=gener;
1205 }
1206 break;
1207 case kMuonCocktailPer1:
1208 {
1209 comment = comment.Append(" Muon Cocktail Per1");
1210 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1211 gener->SetPtRange(0.0,100.); // Transverse momentum range
1212 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1213 gener->SetYRange(-4.0,-2.4);
1214 gener->SetMuonPtCut(0.8);
1215 gener->SetMuonThetaCut(171.,178.);
1216 gener->SetMuonMultiplicity(2);
1217 gener->SetImpactParameterRange(5.,8.6);//Centrality class Per1 for PDC04
1218 gGener=gener;
1219 }
1220 break;
1221 case kMuonCocktailPer4:
1222 {
1223 comment = comment.Append(" Muon Cocktail Per4");
1224 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1225 gener->SetPtRange(0.0,100.); // Transverse momentum range
1226 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1227 gener->SetYRange(-4.0,-2.4);
1228 gener->SetMuonPtCut(0.8);
1229 gener->SetMuonThetaCut(171.,178.);
1230 gener->SetMuonMultiplicity(2);
1231 gener->SetImpactParameterRange(13.2,15.0);//Centrality class Per4 for PDC04
1232 gGener=gener;
1233 }
1234 break;
1235 case kMuonCocktailCent1HighPt:
1236 {
1237 comment = comment.Append(" Muon Cocktail HighPt Cent1");
1238 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1239 gener->SetPtRange(0.0,100.); // Transverse momentum range
1240 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1241 gener->SetYRange(-4.0,-2.4);
1242 gener->SetMuonPtCut(2.5);
1243 gener->SetMuonThetaCut(171.,178.);
1244 gener->SetMuonMultiplicity(2);
1245 gener->SetImpactParameterRange(0.,5.); //Centrality class Cent1 for PDC04
1246 gGener=gener;
1247 }
1248 break;
1249 case kMuonCocktailPer1HighPt :
1250 {
1251 comment = comment.Append(" Muon Cocktail HighPt Per1");
1252 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1253 gener->SetPtRange(0.0,100.); // Transverse momentum range
1254 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1255 gener->SetYRange(-4.0,-2.4);
1256 gener->SetMuonPtCut(2.5);
1257 gener->SetMuonThetaCut(171.,178.);
1258 gener->SetMuonMultiplicity(2);
1259 gener->SetImpactParameterRange(5.,8.6);//Centrality class Per1 for PDC04
1260 gGener=gener;
1261 }
1262 break;
1263 case kMuonCocktailPer4HighPt:
1264 {
1265 comment = comment.Append(" Muon Cocktail HighPt Per4");
1266 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1267 gener->SetPtRange(0.0,100.); // Transverse momentum range
1268 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1269 gener->SetYRange(-4.0,-2.4);
1270 gener->SetMuonPtCut(2.5);
1271 gener->SetMuonThetaCut(171.,178.);
1272 gener->SetMuonMultiplicity(2);
1273 gener->SetImpactParameterRange(13.2,15.0);//Centrality class Per4 for PDC04
1274 gGener=gener;
1275 }
1276 break;
1277 case kMuonCocktailCent1Single:
1278 {
1279 comment = comment.Append(" Muon Cocktail Single Cent1");
1280 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1281 gener->SetPtRange(0.0,100.); // Transverse momentum range
1282 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1283 gener->SetYRange(-4.0,-2.4);
1284 gener->SetMuonPtCut(0.8);
1285 gener->SetMuonThetaCut(171.,178.);
1286 gener->SetMuonMultiplicity(1);
1287 gener->SetImpactParameterRange(0.,5.); //Centrality class Cent1 for PDC04
1288 gGener=gener;
1289 }
1290 break;
1291 case kMuonCocktailPer1Single :
1292 {
1293 comment = comment.Append(" Muon Cocktail Single Per1");
1294 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1295 gener->SetPtRange(0.0,100.); // Transverse momentum range
1296 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1297 gener->SetYRange(-4.0,-2.4);
1298 gener->SetMuonPtCut(0.8);
1299 gener->SetMuonThetaCut(171.,178.);
1300 gener->SetMuonMultiplicity(1);
1301 gener->SetImpactParameterRange(5.,8.6);//Centrality class Per1 for PDC04
1302 gener->SetNumberOfParticipants(229.3);//Centrality class Per1 for PDC04
1303 gGener=gener;
1304 }
1305 break;
1306 case kMuonCocktailPer4Single:
1307 {
1308 comment = comment.Append(" Muon Cocktail Single Per4");
1309 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
1310 gener->SetPtRange(0.0,100.); // Transverse momentum range
1311 gener->SetPhiRange(0.,360.); // Azimuthal angle range
1312 gener->SetYRange(-4.0,-2.4);
1313 gener->SetMuonPtCut(0.8);
1314 gener->SetMuonThetaCut(171.,178.);
1315 gener->SetMuonMultiplicity(1);
1316 gener->SetImpactParameterRange(13.2,15.0);//Centrality class Per4 for PDC04
1317 gGener=gener;
1318 }
1319 break;
1320 case kFlow_2_2000:
1321 {
1322 comment = comment.Append(" Flow with dN/deta = 2000, vn = 2%");
1323 gGener = GeVSimStandard(2000., 2.);
1324 }
1325 break;
1326
1327 case kFlow_10_2000:
1328 {
1329 comment = comment.Append(" Flow with dN/deta = 2000, vn = 10%");
1330 gGener = GeVSimStandard(2000., 10.);
1331 }
1332 break;
1333
1334 case kFlow_6_2000:
1335 {
1336 comment = comment.Append(" Flow with dN/deta = 2000, vn = 6%");
1337 gGener = GeVSimStandard(2000., 6.);
1338 }
1339 break;
1340
1341 case kFlow_6_5000:
1342 {
1343 comment = comment.Append(" Flow with dN/deta = 5000, vn = 6%");
1344 gGener = GeVSimStandard(5000., 6.);
1345 }
1346 break;
1347 case kHIJINGplus:
1348 {
1349 //
1350 // The cocktail
1351 AliGenCocktail *gener = new AliGenCocktail();
1352
1353 //
1354 // Charm production by Pythia
1355 AliGenPythia * genpyc = new AliGenPythia(230);
1356 genpyc->SetProcess(kPyCharmPbPbMNR);
1357 genpyc->SetStrucFunc(kCTEQ4L);
1358 genpyc->SetPtHard(2.1,-1.0);
1359 genpyc->SetEnergyCMS(5500.);
1360 genpyc->SetNuclei(208,208);
1361 genpyc->SetYRange(-999,999);
1362 genpyc->SetForceDecay(kAll);
1363 genpyc->SetFeedDownHigherFamily(kFALSE);
1364 genpyc->SetCountMode(AliGenPythia::kCountParents);
1365 //
1366 // Beauty production by Pythia
1367 AliGenPythia * genpyb = new AliGenPythia(9);
1368 genpyb->SetProcess(kPyBeautyPbPbMNR);
1369 genpyb->SetStrucFunc(kCTEQ4L);
1370 genpyb->SetPtHard(2.75,-1.0);
1371 genpyb->SetEnergyCMS(5500.);
1372 genpyb->SetNuclei(208,208);
1373 genpyb->SetYRange(-999,999);
1374 genpyb->SetForceDecay(kAll);
1375 genpyb->SetFeedDownHigherFamily(kFALSE);
1376 genpyb->SetCountMode(AliGenPythia::kCountParents);
1377 //
1378 // Hyperons
1379 //
1380 AliGenSTRANGElib *lib = new AliGenSTRANGElib();
1381 Int_t particle;
1382 // Xi
7d245e03 1383 particle = kXiMinus;
a2c98880 1384 AliGenParam *genXi = new AliGenParam(16,particle,lib->GetPt(particle),lib->GetY(particle),lib->GetIp(particle));
1385 genXi->SetPtRange(0., 12.);
1386 genXi->SetYRange(-1.1, 1.1);
1387 genXi->SetForceDecay(kNoDecay);
1388
1389 //
1390 // Omega
7d245e03 1391 particle = kOmegaMinus;
a2c98880 1392 AliGenParam *genOmega = new AliGenParam(10,particle,lib->GetPt(particle),lib->GetY(particle),lib->GetIp(particle));
1393 genOmega->SetPtRange(0, 12.);
1394 genOmega->SetYRange(-1.1, 1.1);
1395 genOmega->SetForceDecay(kNoDecay);
1396
1397 //
1398 // Central Hijing
1399 AliGenHijing *genHi = HijingStandard();
1400 genHi->SwitchOffHeavyQuarks(kTRUE);
1401 genHi->SetImpactParameterRange(0.,5.);
1402 //
1403 // Add everything to the cocktail and shake ...
1404 gener->AddGenerator(genHi, "Hijing cent1", 1);
1405 gener->AddGenerator(genpyc, "Extra charm", 1);
1406 gener->AddGenerator(genpyb, "Extra beauty", 1);
1407 gener->AddGenerator(genXi, "Xi" , 1);
1408 gener->AddGenerator(genOmega, "Omega", 1);
1409 gGener = gener;
1410 }
1411 break;
1412 default: break;
1413 }
1414
1415 return gGener;
1416}
1417
1418AliGenHijing* HijingStandard()
1419{
1420 AliGenHijing *gener = new AliGenHijing(-1);
1421// centre of mass energy
1422 gener->SetEnergyCMS(5500.);
1423// reference frame
1424 gener->SetReferenceFrame("CMS");
1425// projectile
1426 gener->SetProjectile("A", 208, 82);
1427 gener->SetTarget ("A", 208, 82);
1428// tell hijing to keep the full parent child chain
1429 gener->KeepFullEvent();
1430// enable jet quenching
1431 gener->SetJetQuenching(1);
1432// enable shadowing
1433 gener->SetShadowing(1);
1434// neutral pion and heavy particle decays switched off
1435 gener->SetDecaysOff(1);
1436// Don't track spectators
1437 gener->SetSpectators(0);
1438// kinematic selection
1439 gener->SetSelectAll(0);
1440 return gener;
1441}
1442
1443AliGenGeVSim* GeVSimStandard(Float_t mult, Float_t vn)
1444{
1445 AliGenGeVSim* gener = new AliGenGeVSim(0);
1446//
1447// Mult is the number of charged particles in |eta| < 0.5
1448// Vn is in (%)
1449//
1450// Sigma of the Gaussian dN/deta
1451 Float_t sigma_eta = 2.75;
1452//
1453// Maximum eta
1454 Float_t etamax = 7.00;
1455//
1456//
1457// Scale from multiplicity in |eta| < 0.5 to |eta| < |etamax|
1458 Float_t mm = mult * (TMath::Erf(etamax/sigma_eta/sqrt(2.)) / TMath::Erf(0.5/sigma_eta/sqrt(2.)));
1459//
1460// Scale from charged to total multiplicity
1461//
1462 mm *= 1.587;
1463//
1464// Vn
1465 vn /= 100.;
1466//
1467// Define particles
1468//
1469//
1470// 78% Pions (26% pi+, 26% pi-, 26% p0) T = 250 MeV
1471 AliGeVSimParticle *pp = new AliGeVSimParticle(kPiPlus, 1, 0.26 * mm, 0.25, sigma_eta) ;
1472 AliGeVSimParticle *pm = new AliGeVSimParticle(kPiMinus, 1, 0.26 * mm, 0.25, sigma_eta) ;
1473 AliGeVSimParticle *p0 = new AliGeVSimParticle(kPi0, 1, 0.26 * mm, 0.25, sigma_eta) ;
1474//
1475// 12% Kaons (3% K0short, 3% K0long, 3% K+, 3% K-) T = 300 MeV
1476 AliGeVSimParticle *ks = new AliGeVSimParticle(kK0Short, 1, 0.03 * mm, 0.30, sigma_eta) ;
1477 AliGeVSimParticle *kl = new AliGeVSimParticle(kK0Long, 1, 0.03 * mm, 0.30, sigma_eta) ;
1478 AliGeVSimParticle *kp = new AliGeVSimParticle(kKPlus, 1, 0.03 * mm, 0.30, sigma_eta) ;
1479 AliGeVSimParticle *km = new AliGeVSimParticle(kKMinus, 1, 0.03 * mm, 0.30, sigma_eta) ;
1480//
1481// 10% Protons / Neutrons (5% Protons, 5% Neutrons) T = 250 MeV
1482 AliGeVSimParticle *pr = new AliGeVSimParticle(kProton, 1, 0.05 * mm, 0.25, sigma_eta) ;
1483 AliGeVSimParticle *ne = new AliGeVSimParticle(kNeutron, 1, 0.05 * mm, 0.25, sigma_eta) ;
1484//
1485// Set Elliptic Flow properties
1486
1487 Float_t pTsaturation = 2. ;
1488
1489 pp->SetEllipticParam(vn,pTsaturation,0.) ;
1490 pm->SetEllipticParam(vn,pTsaturation,0.) ;
1491 p0->SetEllipticParam(vn,pTsaturation,0.) ;
1492 pr->SetEllipticParam(vn,pTsaturation,0.) ;
1493 ne->SetEllipticParam(vn,pTsaturation,0.) ;
1494 ks->SetEllipticParam(vn,pTsaturation,0.) ;
1495 kl->SetEllipticParam(vn,pTsaturation,0.) ;
1496 kp->SetEllipticParam(vn,pTsaturation,0.) ;
1497 km->SetEllipticParam(vn,pTsaturation,0.) ;
1498//
1499// Set Direct Flow properties
1500 pp->SetDirectedParam(vn,1.0,0.) ;
1501 pm->SetDirectedParam(vn,1.0,0.) ;
1502 p0->SetDirectedParam(vn,1.0,0.) ;
1503 pr->SetDirectedParam(vn,1.0,0.) ;
1504 ne->SetDirectedParam(vn,1.0,0.) ;
1505 ks->SetDirectedParam(vn,1.0,0.) ;
1506 kl->SetDirectedParam(vn,1.0,0.) ;
1507 kp->SetDirectedParam(vn,1.0,0.) ;
1508 km->SetDirectedParam(vn,1.0,0.) ;
1509//
1510// Add particles to the list
1511 gener->AddParticleType(pp) ;
1512 gener->AddParticleType(pm) ;
1513 gener->AddParticleType(p0) ;
1514 gener->AddParticleType(pr) ;
1515 gener->AddParticleType(ne) ;
1516 gener->AddParticleType(ks) ;
1517 gener->AddParticleType(kl) ;
1518 gener->AddParticleType(kp) ;
1519 gener->AddParticleType(km) ;
1520//
1521// Random Ev.Plane ----------------------------------
1522 TF1 *rpa = new TF1("gevsimPsiRndm","1", 0, 360);
1523// --------------------------------------------------
1524 gener->SetPtRange(0., 9.) ; // Use a resonable range! (used for bin size in numerical integration)
1525 gener->SetPhiRange(0, 360);
1526 //
1527 // Set pseudorapidity range
1528 Float_t thmin = EtaToTheta(+etamax);
1529 Float_t thmax = EtaToTheta(-etamax);
1530 gener->SetThetaRange(thmin,thmax);
1531 return gener;
1532}
1533
1534
1535
1536void ProcessEnvironmentVars()
1537{
1538 // Run type
1539 if (gSystem->Getenv("CONFIG_RUN_TYPE")) {
1540 for (Int_t iRun = 0; iRun < kRunMax; iRun++) {
1541 if (strcmp(gSystem->Getenv("CONFIG_RUN_TYPE"), pprRunName[iRun])==0) {
1542 srun = (PprRun_t)iRun;
1543 cout<<"Run type set to "<<pprRunName[iRun]<<endl;
1544 }
1545 }
1546 }
1547
1548 // Random Number seed
1549 if (gSystem->Getenv("CONFIG_SEED")) {
1550 sseed = atoi(gSystem->Getenv("CONFIG_SEED"));
1551 }
1552}