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