Removing .cvsignore files
[u/mrichter/AliRoot.git] / test / pploadlibs / Config.C
CommitLineData
3928b038 1//
2// Configuration for the Physics Data Challenge 2006
3//
4
5// One can use the configuration macro in compiled mode by
6// root [0] gSystem->Load("libgeant321");
7// root [0] gSystem->SetIncludePath("-I$ROOTSYS/include -I$ALICE_ROOT/include\
8// -I$ALICE_ROOT -I$ALICE/geant3/TGeant3");
9// root [0] .x grun.C(1,"Config_PDC06.C++")
10
11#if !defined(__CINT__) || defined(__MAKECINT__)
12#include <Riostream.h>
13#include <TRandom.h>
14#include <TDatime.h>
15#include <TSystem.h>
16#include <TVirtualMC.h>
17#include <TGeant3TGeo.h>
18#include "EVGEN/AliGenCocktail.h"
19#include "EVGEN/AliGenParam.h"
20#include "EVGEN/AliGenMUONlib.h"
21#include "STEER/AliRunLoader.h"
22#include "STEER/AliRun.h"
23#include "STEER/AliConfig.h"
24#include "PYTHIA6/AliDecayerPythia.h"
25#include "PYTHIA6/AliGenPythia.h"
26#include "STEER/AliMagFMaps.h"
27#include "STRUCT/AliBODY.h"
28#include "STRUCT/AliMAG.h"
96fb3353 29#include "STRUCT/AliABSOv3.h"
30#include "STRUCT/AliDIPOv3.h"
31#include "STRUCT/AliHALLv3.h"
3928b038 32#include "STRUCT/AliFRAMEv2.h"
96fb3353 33#include "STRUCT/AliSHILv3.h"
34#include "STRUCT/AliPIPEv3.h"
3928b038 35#include "ITS/AliITSgeom.h"
36#include "ITS/AliITSvPPRasymmFMD.h"
37#include "TPC/AliTPCv2.h"
0d7ef405 38#include "TOF/AliTOFv6T0.h"
55eb2b56 39#include "HMPID/AliHMPIDv2.h"
cb14d625 40#include "ZDC/AliZDCv3.h"
3928b038 41#include "TRD/AliTRDv1.h"
42#include "FMD/AliFMDv1.h"
43#include "MUON/AliMUONv1.h"
44#include "PHOS/AliPHOSv1.h"
45#include "PMD/AliPMDv1.h"
46#include "T0/AliT0v1.h"
47#include "EMCAL/AliEMCALv2.h"
48#include "ACORDE/AliACORDEv0.h"
49#include "VZERO/AliVZEROv7.h"
50#endif
51
52
53enum PDC06Proc_t
54{
55//--- Heavy Flavour Production ---
56 kCharmPbPb5500, kCharmpPb8800, kCharmpp14000, kCharmpp14000wmi,
57 kD0PbPb5500, kD0pPb8800, kD0pp14000,
58 kDPlusPbPb5500, kDPluspPb8800, kDPluspp14000,
59 kBeautyPbPb5500, kBeautypPb8800, kBeautypp14000, kBeautypp14000wmi,
60// -- Pythia Mb
61 kPyMbNoHvq, kPyOmegaPlus, kPyOmegaMinus, kRunMax
62};
63
64const char * pprRunName[] = {
65 "kCharmPbPb5500", "kCharmpPb8800", "kCharmpp14000", "kCharmpp14000wmi",
66 "kD0PbPb5500", "kD0pPb8800", "kD0pp14000",
67 "kDPlusPbPb5500", "kDPluspPb8800", "kDPluspp14000",
68 "kBeautyPbPb5500", "kBeautypPb8800", "kBeautypp14000", "kBeautypp14000wmi",
69 "kPyMbNoHvq", "kPyOmegaPlus", "kPyOmegaMinus"
70};
71
72
73//--- Decay Mode ---
74enum DecayHvFl_t
75{
76 kNature, kHadr, kSemiEl, kSemiMu
77};
78//--- Rapidity Cut ---
79enum YCut_t
80{
81 kFull, kBarrel, kMuonArm
82};
83//--- Magnetic Field ---
84enum Mag_t
85{
86 k2kG, k4kG, k5kG
87};
88
89//--- Trigger config ---
90enum TrigConf_t
91{
92 kDefaultPPTrig, kDefaultPbPbTrig
93};
94
95const char * TrigConfName[] = {
96 "p-p","Pb-Pb"
97};
98
99//--- Functions ---
100AliGenPythia *PythiaHVQ(PDC06Proc_t proc);
101AliGenerator *MbCocktail();
102AliGenerator *PyMbTriggered(Int_t pdg);
103void ProcessEnvironmentVars();
104
105// This part for configuration
106static PDC06Proc_t proc = kPyMbNoHvq;
107static DecayHvFl_t decHvFl = kNature;
108static YCut_t ycut = kFull;
109static Mag_t mag = k5kG;
110static TrigConf_t trig = kDefaultPPTrig; // default pp trigger configuration
111//========================//
112// Set Random Number seed //
113//========================//
114TDatime dt;
115static UInt_t seed = dt.Get();
116
117// nEvts = -1 : you get 1 QQbar pair and all the fragmentation and
118// decay chain
119// nEvts = N>0 : you get N charm / beauty Hadrons
120Int_t nEvts = -1;
121// stars = kTRUE : all heavy resonances and their decay stored
122// = kFALSE: only final heavy hadrons and their decays stored
123Bool_t stars = kTRUE;
124
125// To be used only with kCharmppMNRwmi and kBeautyppMNRwmi
126// To get a "reasonable" agreement with MNR results, events have to be
127// generated with the minimum ptHard set to 2.76 GeV.
128// To get a "perfect" agreement with MNR results, events have to be
129// generated in four ptHard bins with the following relative
130// normalizations:
131// CHARM
132// 2.76-3 GeV: 25%
133// 3-4 GeV: 40%
134// 4-8 GeV: 29%
135// >8 GeV: 6%
136// BEAUTY
137// 2.76-4 GeV: 5%
138// 4-6 GeV: 31%
139// 6-8 GeV: 28%
140// >8 GeV: 36%
141Float_t ptHardMin = 2.76;
142Float_t ptHardMax = -1.;
143
144
145// Comment line
146static TString comment;
147
148void Config()
149{
150
151
152 // Get settings from environment variables
153 ProcessEnvironmentVars();
154
155 gRandom->SetSeed(seed);
156 cerr<<"Seed for random number generation= "<<seed<<endl;
157
158 // libraries required by geant321
159#if defined(__CINT__)
160 gSystem->Load("libgeant321");
161#endif
162
163 new TGeant3TGeo("C++ Interface to Geant3");
164
165 //=======================================================================
166 // Create the output file
167
168
169 AliRunLoader* rl=0x0;
170
171 cout<<"Config.C: Creating Run Loader ..."<<endl;
172 rl = AliRunLoader::Open("galice.root",
173 AliConfig::GetDefaultEventFolderName(),
174 "recreate");
175 if (rl == 0x0)
176 {
177 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
178 return;
179 }
180 rl->SetCompressionLevel(2);
181 rl->SetNumberOfEventsPerFile(1000);
182 gAlice->SetRunLoader(rl);
183
184 // Set the trigger configuration
185 gAlice->SetTriggerDescriptor(TrigConfName[trig]);
186 cout<<"Trigger configuration is set to "<<TrigConfName[trig]<<endl;
187
188 //
189 //=======================================================================
190 // ************* STEERING parameters FOR ALICE SIMULATION **************
191 // --- Specify event type to be tracked through the ALICE setup
192 // --- All positions are in cm, angles in degrees, and P and E in GeV
193
194
195 gMC->SetProcess("DCAY",1);
196 gMC->SetProcess("PAIR",1);
197 gMC->SetProcess("COMP",1);
198 gMC->SetProcess("PHOT",1);
199 gMC->SetProcess("PFIS",0);
200 gMC->SetProcess("DRAY",0);
201 gMC->SetProcess("ANNI",1);
202 gMC->SetProcess("BREM",1);
203 gMC->SetProcess("MUNU",1);
204 gMC->SetProcess("CKOV",1);
205 gMC->SetProcess("HADR",1);
206 gMC->SetProcess("LOSS",2);
207 gMC->SetProcess("MULS",1);
208 gMC->SetProcess("RAYL",1);
209
210 Float_t cut = 1.e-3; // 1MeV cut by default
211 Float_t tofmax = 1.e10;
212
213 gMC->SetCut("CUTGAM", cut);
214 gMC->SetCut("CUTELE", cut);
215 gMC->SetCut("CUTNEU", cut);
216 gMC->SetCut("CUTHAD", cut);
217 gMC->SetCut("CUTMUO", cut);
218 gMC->SetCut("BCUTE", cut);
219 gMC->SetCut("BCUTM", cut);
220 gMC->SetCut("DCUTE", cut);
221 gMC->SetCut("DCUTM", cut);
222 gMC->SetCut("PPCUTM", cut);
223 gMC->SetCut("TOFMAX", tofmax);
224
225
226
227
228 // Set External decayer //
229 //======================//
230 TVirtualMCDecayer* decayer = new AliDecayerPythia();
231 // DECAYS
232 //
233 switch(decHvFl) {
234 case kNature:
235 decayer->SetForceDecay(kAll);
236 break;
237 case kHadr:
238 decayer->SetForceDecay(kHadronicD);
239 break;
240 case kSemiEl:
241 decayer->SetForceDecay(kSemiElectronic);
242 break;
243 case kSemiMu:
244 decayer->SetForceDecay(kSemiMuonic);
245 break;
246 }
247 decayer->Init();
248 gMC->SetExternalDecayer(decayer);
249
250 //=========================//
251 // Generator Configuration //
252 //=========================//
253 AliGenerator* gener = 0x0;
254
255 if (proc <= kBeautypp14000wmi) {
256 AliGenPythia *pythia = PythiaHVQ(proc);
257 // FeedDown option
258 pythia->SetFeedDownHigherFamily(kFALSE);
259 // Stack filling option
260 if(!stars) pythia->SetStackFillOpt(AliGenPythia::kParentSelection);
261 // Set Count mode
262 if(nEvts>0) pythia->SetCountMode(AliGenPythia::kCountParents);
263 //
264 // DECAYS
265 //
266 switch(decHvFl) {
267 case kNature:
268 pythia->SetForceDecay(kAll);
269 break;
270 case kHadr:
271 pythia->SetForceDecay(kHadronicD);
272 break;
273 case kSemiEl:
274 pythia->SetForceDecay(kSemiElectronic);
275 break;
276 case kSemiMu:
277 pythia->SetForceDecay(kSemiMuonic);
278 break;
279 }
280 //
281 // GEOM & KINE CUTS
282 //
283 pythia->SetMomentumRange(0,99999999);
284 pythia->SetPhiRange(0., 360.);
285 pythia->SetThetaRange(0,180);
286 switch(ycut) {
287 case kFull:
288 pythia->SetYRange(-999,999);
289 break;
290 case kBarrel:
291 pythia->SetYRange(-2,2);
292 break;
293 case kMuonArm:
294 pythia->SetYRange(1,6);
295 break;
296 }
297 gener = pythia;
298 } else if (proc == kPyMbNoHvq) {
299 gener = MbCocktail();
300 } else if (proc == kPyOmegaMinus) {
301 gener = PyMbTriggered(3334);
302 } else if (proc == kPyOmegaPlus) {
303 gener = PyMbTriggered(-3334);
304 }
305
306
307
308 // PRIMARY VERTEX
309 //
310 gener->SetOrigin(0., 0., 0.); // vertex position
311 //
312 //
313 // Size of the interaction diamond
314 // Longitudinal
315 Float_t sigmaz = 7.55 / TMath::Sqrt(2.); // [cm]
316 //
317 // Transverse
318 Float_t betast = 10; // beta* [m]
319 Float_t eps = 3.75e-6; // emittance [m]
320 Float_t gamma = 7000. / 0.938272; // relativistic gamma [1]
321 Float_t sigmaxy = TMath::Sqrt(eps * betast / gamma) / TMath::Sqrt(2.) * 100.; // [cm]
322 printf("\n \n Diamond size x-y: %10.3e z: %10.3e\n \n", sigmaxy, sigmaz);
323
324 gener->SetSigma(sigmaxy, sigmaxy, sigmaz); // Sigma in (X,Y,Z) (cm) on IP position
325 gener->SetCutVertexZ(3.); // Truncate at 3 sigma
326 gener->SetVertexSmear(kPerEvent);
327
328 gener->Init();
329
330 // FIELD
331 //
332 if (mag == k2kG) {
333 comment = comment.Append(" | L3 field 0.2 T");
334 } else if (mag == k4kG) {
335 comment = comment.Append(" | L3 field 0.4 T");
336 } else if (mag == k5kG) {
337 comment = comment.Append(" | L3 field 0.5 T");
338 }
339 printf("\n \n Comment: %s \n \n", comment.Data());
340
341 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., mag);
342 field->SetL3ConstField(0); //Using const. field in the barrel
343 rl->CdGAFile();
344 gAlice->SetField(field);
345
346
347
348 Int_t iABSO = 1;
349 Int_t iACORDE = 0;
350 Int_t iDIPO = 1;
351 Int_t iEMCAL = 1;
352 Int_t iFMD = 1;
353 Int_t iFRAME = 1;
354 Int_t iHALL = 1;
355 Int_t iITS = 1;
356 Int_t iMAG = 1;
357 Int_t iMUON = 1;
358 Int_t iPHOS = 1;
359 Int_t iPIPE = 1;
360 Int_t iPMD = 1;
361 Int_t iHMPID = 1;
362 Int_t iSHIL = 1;
363 Int_t iT0 = 1;
364 Int_t iTOF = 1;
365 Int_t iTPC = 1;
366 Int_t iTRD = 1;
367 Int_t iVZERO = 1;
368 Int_t iZDC = 1;
369
370
371 //=================== Alice BODY parameters =============================
372 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
373
374
375 if (iMAG)
376 {
377 //=================== MAG parameters ============================
378 // --- Start with Magnet since detector layouts may be depending ---
379 // --- on the selected Magnet dimensions ---
380 AliMAG *MAG = new AliMAG("MAG", "Magnet");
381 }
382
383
384 if (iABSO)
385 {
386 //=================== ABSO parameters ============================
96fb3353 387 AliABSO *ABSO = new AliABSOv3("ABSO", "Muon Absorber");
3928b038 388 }
389
390 if (iDIPO)
391 {
392 //=================== DIPO parameters ============================
393
96fb3353 394 AliDIPO *DIPO = new AliDIPOv3("DIPO", "Dipole version 3");
3928b038 395 }
396
397 if (iHALL)
398 {
399 //=================== HALL parameters ============================
400
96fb3353 401 AliHALL *HALL = new AliHALLv3("HALL", "Alice Hall");
3928b038 402 }
403
404
405 if (iFRAME)
406 {
407 //=================== FRAME parameters ============================
408
409 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
410 }
411
412 if (iSHIL)
413 {
414 //=================== SHIL parameters ============================
415
96fb3353 416 AliSHIL *SHIL = new AliSHILv3("SHIL", "Shielding Version 3");
3928b038 417 }
418
419
420 if (iPIPE)
421 {
422 //=================== PIPE parameters ============================
423
96fb3353 424 AliPIPE *PIPE = new AliPIPEv3("PIPE", "Beam Pipe");
3928b038 425 }
426
e89fa83b 427 if (iITS)
428 {
429 //=================== ITS parameters ============================
430
3928b038 431 AliITSvPPRasymmFMD *ITS = new AliITSvPPRasymmFMD("ITS","New ITS PPR detailed version with asymmetric services");
3928b038 432 }
433
434 if (iTPC)
435 {
436 //============================ TPC parameters =====================
437 AliTPC *TPC = new AliTPCv2("TPC", "Default");
438 }
439
440
441 if (iTOF) {
442 //=================== TOF parameters ============================
0d7ef405 443 AliTOF *TOF = new AliTOFv6T0("TOF", "normal TOF");
3928b038 444 // Partial geometry: modules at 2,3,4,6,7,11,12,14,15,16
445 // starting at 6h in positive direction
446 // Int_t TOFSectors[18]={-1,-1,0,0,0,-1,0,0,-1,-1,-1,0,0,-1,0,0,0,0};
447 // Partial geometry: modules at 1,2,6,7,9,10,11,12,15,16,17
448 // (ALICE numbering convention)
449 Int_t TOFSectors[18]={-1,0,0,-1,-1,-1,0,0,-1,0,0,0,0,-1,-1,0,0,0};
450 TOF->SetTOFSectors(TOFSectors);
451 }
452
453
454 if (iHMPID)
455 {
456 //=================== HMPID parameters ===========================
55eb2b56 457 AliHMPID *HMPID = new AliHMPIDv2("HMPID", "normal HMPID");
3928b038 458
459 }
460
461
462 if (iZDC)
463 {
464 //=================== ZDC parameters ============================
465
cb14d625 466 AliZDC *ZDC = new AliZDCv3("ZDC", "normal ZDC");
3928b038 467 }
468
469 if (iTRD)
470 {
471 //=================== TRD parameters ============================
472
473 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
474 AliTRDgeometry *geoTRD = TRD->GetGeometry();
475 // Partial geometry: modules at 2,3,4,6,11,12,14,15
476 // starting at 6h in positive direction
477 geoTRD->SetSMstatus(0,0);
478 geoTRD->SetSMstatus(1,0);
479 geoTRD->SetSMstatus(5,0);
480 geoTRD->SetSMstatus(7,0);
481 geoTRD->SetSMstatus(8,0);
482 geoTRD->SetSMstatus(9,0);
483 geoTRD->SetSMstatus(10,0);
484 geoTRD->SetSMstatus(13,0);
485 geoTRD->SetSMstatus(16,0);
486 geoTRD->SetSMstatus(17,0);
487 }
488
489 if (iFMD)
490 {
491 //=================== FMD parameters ============================
492 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
493 }
494
495 if (iMUON)
496 {
497 //=================== MUON parameters ===========================
498 // New MUONv1 version (geometry defined via builders)
499 AliMUON *MUON = new AliMUONv1("MUON", "default");
500 }
501 //=================== PHOS parameters ===========================
502
503 if (iPHOS)
504 {
505 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
506 }
507
508
509 if (iPMD)
510 {
511 //=================== PMD parameters ============================
512 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
513 }
514
515 if (iT0)
516 {
517 //=================== T0 parameters ============================
518 AliT0 *T0 = new AliT0v1("T0", "T0 Detector");
519 }
520
521 if (iEMCAL)
522 {
523 //=================== EMCAL parameters ============================
524 AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "SHISH_77_TRD1_2X2_FINAL_110DEG");
525 }
526
527 if (iACORDE)
528 {
529 //=================== ACORDE parameters ============================
530 AliACORDE *ACORDE = new AliACORDEv0("ACORDE", "normal ACORDE");
531 }
532
533 if (iVZERO)
534 {
535 //=================== VZERO parameters ============================
536 AliVZERO *VZERO = new AliVZEROv7("VZERO", "normal VZERO");
537 }
538}
539//
540// PYTHIA
541//
542AliGenPythia *PythiaHVQ(PDC06Proc_t proc) {
543//*******************************************************************//
544// Configuration file for charm / beauty generation with PYTHIA //
545// //
546// The parameters have been tuned in order to reproduce the inclusive//
547// heavy quark pt distribution given by the NLO pQCD calculation by //
548// Mangano, Nason and Ridolfi. //
549// //
550// For details and for the NORMALIZATION of the yields see: //
551// N.Carrer and A.Dainese, //
552// "Charm and beauty production at the LHC", //
553// ALICE-INT-2003-019, [arXiv:hep-ph/0311225]; //
554// PPR Chapter 6.6, CERN/LHCC 2005-030 (2005). //
555//*******************************************************************//
556 AliGenPythia * gener = 0x0;
557
558 switch(proc) {
559 case kCharmPbPb5500:
560 comment = comment.Append(" Charm in Pb-Pb at 5.5 TeV");
561 gener = new AliGenPythia(nEvts);
562 gener->SetProcess(kPyCharmPbPbMNR);
563 gener->SetStrucFunc(kCTEQ4L);
564 gener->SetPtHard(2.1,-1.0);
565 gener->SetEnergyCMS(5500.);
566 gener->SetNuclei(208,208);
567 break;
568 case kCharmpPb8800:
569 comment = comment.Append(" Charm in p-Pb at 8.8 TeV");
570 gener = new AliGenPythia(nEvts);
571 gener->SetProcess(kPyCharmpPbMNR);
572 gener->SetStrucFunc(kCTEQ4L);
573 gener->SetPtHard(2.1,-1.0);
574 gener->SetEnergyCMS(8800.);
575 gener->SetProjectile("P",1,1);
576 gener->SetTarget("Pb",208,82);
577 break;
578 case kCharmpp14000:
579 comment = comment.Append(" Charm in pp at 14 TeV");
580 gener = new AliGenPythia(nEvts);
581 gener->SetProcess(kPyCharmppMNR);
582 gener->SetStrucFunc(kCTEQ4L);
583 gener->SetPtHard(2.1,-1.0);
584 gener->SetEnergyCMS(14000.);
585 break;
586 case kCharmpp14000wmi:
587 comment = comment.Append(" Charm in pp at 14 TeV with mult. interactions");
588 gener = new AliGenPythia(-1);
589 gener->SetProcess(kPyCharmppMNRwmi);
590 gener->SetStrucFunc(kCTEQ5L);
591 gener->SetPtHard(ptHardMin,ptHardMax);
592 gener->SetEnergyCMS(14000.);
593 break;
594 case kD0PbPb5500:
595 comment = comment.Append(" D0 in Pb-Pb at 5.5 TeV");
596 gener = new AliGenPythia(nEvts);
597 gener->SetProcess(kPyD0PbPbMNR);
598 gener->SetStrucFunc(kCTEQ4L);
599 gener->SetPtHard(2.1,-1.0);
600 gener->SetEnergyCMS(5500.);
601 gener->SetNuclei(208,208);
602 break;
603 case kD0pPb8800:
604 comment = comment.Append(" D0 in p-Pb at 8.8 TeV");
605 gener = new AliGenPythia(nEvts);
606 gener->SetProcess(kPyD0pPbMNR);
607 gener->SetStrucFunc(kCTEQ4L);
608 gener->SetPtHard(2.1,-1.0);
609 gener->SetEnergyCMS(8800.);
610 gener->SetProjectile("P",1,1);
611 gener->SetTarget("Pb",208,82);
612 break;
613 case kD0pp14000:
614 comment = comment.Append(" D0 in pp at 14 TeV");
615 gener = new AliGenPythia(nEvts);
616 gener->SetProcess(kPyD0ppMNR);
617 gener->SetStrucFunc(kCTEQ4L);
618 gener->SetPtHard(2.1,-1.0);
619 gener->SetEnergyCMS(14000.);
620 break;
621 case kDPlusPbPb5500:
622 comment = comment.Append(" DPlus in Pb-Pb at 5.5 TeV");
623 gener = new AliGenPythia(nEvts);
624 gener->SetProcess(kPyDPlusPbPbMNR);
625 gener->SetStrucFunc(kCTEQ4L);
626 gener->SetPtHard(2.1,-1.0);
627 gener->SetEnergyCMS(5500.);
628 gener->SetNuclei(208,208);
629 break;
630 case kDPluspPb8800:
631 comment = comment.Append(" DPlus in p-Pb at 8.8 TeV");
632 gener = new AliGenPythia(nEvts);
633 gener->SetProcess(kPyDPluspPbMNR);
634 gener->SetStrucFunc(kCTEQ4L);
635 gener->SetPtHard(2.1,-1.0);
636 gener->SetEnergyCMS(8800.);
637 gener->SetProjectile("P",1,1);
638 gener->SetTarget("Pb",208,82);
639 break;
640 case kDPluspp14000:
641 comment = comment.Append(" DPlus in pp at 14 TeV");
642 gener = new AliGenPythia(nEvts);
643 gener->SetProcess(kPyDPlusppMNR);
644 gener->SetStrucFunc(kCTEQ4L);
645 gener->SetPtHard(2.1,-1.0);
646 gener->SetEnergyCMS(14000.);
647 break;
648 case kBeautyPbPb5500:
649 comment = comment.Append(" Beauty in Pb-Pb at 5.5 TeV");
650 gener = new AliGenPythia(nEvts);
651 gener->SetProcess(kPyBeautyPbPbMNR);
652 gener->SetStrucFunc(kCTEQ4L);
653 gener->SetPtHard(2.75,-1.0);
654 gener->SetEnergyCMS(5500.);
655 gener->SetNuclei(208,208);
656 break;
657 case kBeautypPb8800:
658 comment = comment.Append(" Beauty in p-Pb at 8.8 TeV");
659 gener = new AliGenPythia(nEvts);
660 gener->SetProcess(kPyBeautypPbMNR);
661 gener->SetStrucFunc(kCTEQ4L);
662 gener->SetPtHard(2.75,-1.0);
663 gener->SetEnergyCMS(8800.);
664 gener->SetProjectile("P",1,1);
665 gener->SetTarget("Pb",208,82);
666 break;
667 case kBeautypp14000:
668 comment = comment.Append(" Beauty in pp at 14 TeV");
669 gener = new AliGenPythia(nEvts);
670 gener->SetProcess(kPyBeautyppMNR);
671 gener->SetStrucFunc(kCTEQ4L);
672 gener->SetPtHard(2.75,-1.0);
673 gener->SetEnergyCMS(14000.);
674 break;
675 case kBeautypp14000wmi:
676 comment = comment.Append(" Beauty in pp at 14 TeV with mult. interactions");
677 gener = new AliGenPythia(-1);
678 gener->SetProcess(kPyBeautyppMNRwmi);
679 gener->SetStrucFunc(kCTEQ5L);
680 gener->SetPtHard(ptHardMin,ptHardMax);
681 gener->SetEnergyCMS(14000.);
682 break;
683 }
684
685 return gener;
686}
687
688AliGenerator* MbCocktail()
689{
690 comment = comment.Append(" pp at 14 TeV: Pythia low-pt, no heavy quarks + J/Psi from parameterisation");
691 AliGenCocktail * gener = new AliGenCocktail();
692 gener->UsePerEventRates();
693
694//
695// Pythia
696 AliGenPythia* pythia = new AliGenPythia(-1);
697 pythia->SetMomentumRange(0, 999999.);
698 pythia->SetThetaRange(0., 180.);
699 pythia->SetYRange(-12.,12.);
700 pythia->SetPtRange(0,1000.);
701 pythia->SetProcess(kPyMb);
702 pythia->SetEnergyCMS(14000.);
703 pythia->SwitchHFOff();
704
705//
706// J/Psi parameterisation
707
708 AliGenParam* jpsi = new AliGenParam(1, AliGenMUONlib::kJpsi, "CDF scaled", "Jpsi");
709 jpsi->SetPtRange(0.,100.);
710 jpsi->SetYRange(-8., 8.);
711 jpsi->SetPhiRange(0., 360.);
712 jpsi->SetForceDecay(kAll);
713//
714//
715 gener->AddGenerator(jpsi, "J/Psi", 8.e-4);
716 gener->AddGenerator(pythia, "Pythia", 1.);
717
718
719 return gener;
720}
721
722AliGenerator* PyMbTriggered(Int_t pdg)
723{
724 AliGenPythia* pythia = new AliGenPythia(-1);
725 pythia->SetMomentumRange(0, 999999.);
726 pythia->SetThetaRange(0., 180.);
727 pythia->SetYRange(-12.,12.);
728 pythia->SetPtRange(0,1000.);
729 pythia->SetProcess(kPyMb);
730 pythia->SetEnergyCMS(14000.);
731 pythia->SetTriggerParticle(pdg, 0.9);
732 return pythia;
733}
734
735void ProcessEnvironmentVars()
736{
737 // Run type
738 if (gSystem->Getenv("CONFIG_RUN_TYPE")) {
739 for (Int_t iRun = 0; iRun < kRunMax; iRun++) {
740 if (strcmp(gSystem->Getenv("CONFIG_RUN_TYPE"), pprRunName[iRun])==0) {
741 proc = (PDC06Proc_t)iRun;
742 cout<<"Run type set to "<<pprRunName[iRun]<<endl;
743 }
744 }
745 }
746
747 // Random Number seed
748 if (gSystem->Getenv("CONFIG_SEED")) {
749 seed = atoi(gSystem->Getenv("CONFIG_SEED"));
750 }
751}
752
753
754