adapted macro to QAManager
[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"
99887042 36#include "ITS/AliITSv11Hybrid.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
183 gAlice->SetTriggerDescriptor(TrigConfName[trig]);
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
f7a1cc68 337 AliMagF* field = new AliMagF("Maps","Maps", 2, 1., 1., 10., mag);
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
99887042 426 AliITS *ITS = new AliITSv11Hybrid("ITS","ITS v11Hybrid");
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();
463 // Partial geometry: modules at 2,3,4,6,11,12,14,15
464 // starting at 6h in positive direction
465 geoTRD->SetSMstatus(0,0);
466 geoTRD->SetSMstatus(1,0);
467 geoTRD->SetSMstatus(5,0);
468 geoTRD->SetSMstatus(7,0);
469 geoTRD->SetSMstatus(8,0);
470 geoTRD->SetSMstatus(9,0);
471 geoTRD->SetSMstatus(10,0);
472 geoTRD->SetSMstatus(13,0);
473 geoTRD->SetSMstatus(16,0);
474 geoTRD->SetSMstatus(17,0);
475 }
476
477 if (iFMD)
478 {
479 //=================== FMD parameters ============================
480 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
481 }
482
483 if (iMUON)
484 {
485 //=================== MUON parameters ===========================
486 // New MUONv1 version (geometry defined via builders)
487 AliMUON *MUON = new AliMUONv1("MUON", "default");
488 }
489 //=================== PHOS parameters ===========================
490
491 if (iPHOS)
492 {
493 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
494 }
495
496
497 if (iPMD)
498 {
499 //=================== PMD parameters ============================
500 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
501 }
502
503 if (iT0)
504 {
505 //=================== T0 parameters ============================
506 AliT0 *T0 = new AliT0v1("T0", "T0 Detector");
507 }
508
509 if (iEMCAL)
510 {
511 //=================== EMCAL parameters ============================
8224b11d 512 AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "EMCAL_COMPLETE");
3928b038 513 }
514
515 if (iACORDE)
516 {
517 //=================== ACORDE parameters ============================
f7882672 518 AliACORDE *ACORDE = new AliACORDEv1("ACORDE", "normal ACORDE");
3928b038 519 }
520
521 if (iVZERO)
522 {
523 //=================== VZERO parameters ============================
524 AliVZERO *VZERO = new AliVZEROv7("VZERO", "normal VZERO");
525 }
526}
527//
528// PYTHIA
529//
530AliGenPythia *PythiaHVQ(PDC06Proc_t proc) {
531//*******************************************************************//
532// Configuration file for charm / beauty generation with PYTHIA //
533// //
534// The parameters have been tuned in order to reproduce the inclusive//
535// heavy quark pt distribution given by the NLO pQCD calculation by //
536// Mangano, Nason and Ridolfi. //
537// //
538// For details and for the NORMALIZATION of the yields see: //
539// N.Carrer and A.Dainese, //
540// "Charm and beauty production at the LHC", //
541// ALICE-INT-2003-019, [arXiv:hep-ph/0311225]; //
542// PPR Chapter 6.6, CERN/LHCC 2005-030 (2005). //
543//*******************************************************************//
544 AliGenPythia * gener = 0x0;
545
546 switch(proc) {
547 case kCharmPbPb5500:
548 comment = comment.Append(" Charm in Pb-Pb at 5.5 TeV");
549 gener = new AliGenPythia(nEvts);
550 gener->SetProcess(kPyCharmPbPbMNR);
551 gener->SetStrucFunc(kCTEQ4L);
552 gener->SetPtHard(2.1,-1.0);
553 gener->SetEnergyCMS(5500.);
554 gener->SetNuclei(208,208);
555 break;
556 case kCharmpPb8800:
557 comment = comment.Append(" Charm in p-Pb at 8.8 TeV");
558 gener = new AliGenPythia(nEvts);
559 gener->SetProcess(kPyCharmpPbMNR);
560 gener->SetStrucFunc(kCTEQ4L);
561 gener->SetPtHard(2.1,-1.0);
562 gener->SetEnergyCMS(8800.);
563 gener->SetProjectile("P",1,1);
564 gener->SetTarget("Pb",208,82);
565 break;
566 case kCharmpp14000:
567 comment = comment.Append(" Charm in pp at 14 TeV");
568 gener = new AliGenPythia(nEvts);
569 gener->SetProcess(kPyCharmppMNR);
570 gener->SetStrucFunc(kCTEQ4L);
571 gener->SetPtHard(2.1,-1.0);
572 gener->SetEnergyCMS(14000.);
573 break;
574 case kCharmpp14000wmi:
575 comment = comment.Append(" Charm in pp at 14 TeV with mult. interactions");
576 gener = new AliGenPythia(-1);
577 gener->SetProcess(kPyCharmppMNRwmi);
578 gener->SetStrucFunc(kCTEQ5L);
579 gener->SetPtHard(ptHardMin,ptHardMax);
580 gener->SetEnergyCMS(14000.);
581 break;
582 case kD0PbPb5500:
583 comment = comment.Append(" D0 in Pb-Pb at 5.5 TeV");
584 gener = new AliGenPythia(nEvts);
585 gener->SetProcess(kPyD0PbPbMNR);
586 gener->SetStrucFunc(kCTEQ4L);
587 gener->SetPtHard(2.1,-1.0);
588 gener->SetEnergyCMS(5500.);
589 gener->SetNuclei(208,208);
590 break;
591 case kD0pPb8800:
592 comment = comment.Append(" D0 in p-Pb at 8.8 TeV");
593 gener = new AliGenPythia(nEvts);
594 gener->SetProcess(kPyD0pPbMNR);
595 gener->SetStrucFunc(kCTEQ4L);
596 gener->SetPtHard(2.1,-1.0);
597 gener->SetEnergyCMS(8800.);
598 gener->SetProjectile("P",1,1);
599 gener->SetTarget("Pb",208,82);
600 break;
601 case kD0pp14000:
602 comment = comment.Append(" D0 in pp at 14 TeV");
603 gener = new AliGenPythia(nEvts);
604 gener->SetProcess(kPyD0ppMNR);
605 gener->SetStrucFunc(kCTEQ4L);
606 gener->SetPtHard(2.1,-1.0);
607 gener->SetEnergyCMS(14000.);
608 break;
609 case kDPlusPbPb5500:
610 comment = comment.Append(" DPlus in Pb-Pb at 5.5 TeV");
611 gener = new AliGenPythia(nEvts);
612 gener->SetProcess(kPyDPlusPbPbMNR);
613 gener->SetStrucFunc(kCTEQ4L);
614 gener->SetPtHard(2.1,-1.0);
615 gener->SetEnergyCMS(5500.);
616 gener->SetNuclei(208,208);
617 break;
618 case kDPluspPb8800:
619 comment = comment.Append(" DPlus in p-Pb at 8.8 TeV");
620 gener = new AliGenPythia(nEvts);
621 gener->SetProcess(kPyDPluspPbMNR);
622 gener->SetStrucFunc(kCTEQ4L);
623 gener->SetPtHard(2.1,-1.0);
624 gener->SetEnergyCMS(8800.);
625 gener->SetProjectile("P",1,1);
626 gener->SetTarget("Pb",208,82);
627 break;
628 case kDPluspp14000:
629 comment = comment.Append(" DPlus in pp at 14 TeV");
630 gener = new AliGenPythia(nEvts);
631 gener->SetProcess(kPyDPlusppMNR);
632 gener->SetStrucFunc(kCTEQ4L);
633 gener->SetPtHard(2.1,-1.0);
634 gener->SetEnergyCMS(14000.);
635 break;
636 case kBeautyPbPb5500:
637 comment = comment.Append(" Beauty in Pb-Pb at 5.5 TeV");
638 gener = new AliGenPythia(nEvts);
639 gener->SetProcess(kPyBeautyPbPbMNR);
640 gener->SetStrucFunc(kCTEQ4L);
641 gener->SetPtHard(2.75,-1.0);
642 gener->SetEnergyCMS(5500.);
643 gener->SetNuclei(208,208);
644 break;
645 case kBeautypPb8800:
646 comment = comment.Append(" Beauty in p-Pb at 8.8 TeV");
647 gener = new AliGenPythia(nEvts);
648 gener->SetProcess(kPyBeautypPbMNR);
649 gener->SetStrucFunc(kCTEQ4L);
650 gener->SetPtHard(2.75,-1.0);
651 gener->SetEnergyCMS(8800.);
652 gener->SetProjectile("P",1,1);
653 gener->SetTarget("Pb",208,82);
654 break;
655 case kBeautypp14000:
656 comment = comment.Append(" Beauty in pp at 14 TeV");
657 gener = new AliGenPythia(nEvts);
658 gener->SetProcess(kPyBeautyppMNR);
659 gener->SetStrucFunc(kCTEQ4L);
660 gener->SetPtHard(2.75,-1.0);
661 gener->SetEnergyCMS(14000.);
662 break;
663 case kBeautypp14000wmi:
664 comment = comment.Append(" Beauty in pp at 14 TeV with mult. interactions");
665 gener = new AliGenPythia(-1);
666 gener->SetProcess(kPyBeautyppMNRwmi);
667 gener->SetStrucFunc(kCTEQ5L);
668 gener->SetPtHard(ptHardMin,ptHardMax);
669 gener->SetEnergyCMS(14000.);
670 break;
671 }
672
673 return gener;
674}
675
676AliGenerator* MbCocktail()
677{
678 comment = comment.Append(" pp at 14 TeV: Pythia low-pt, no heavy quarks + J/Psi from parameterisation");
679 AliGenCocktail * gener = new AliGenCocktail();
680 gener->UsePerEventRates();
681
682//
683// Pythia
684 AliGenPythia* pythia = new AliGenPythia(-1);
685 pythia->SetMomentumRange(0, 999999.);
686 pythia->SetThetaRange(0., 180.);
687 pythia->SetYRange(-12.,12.);
688 pythia->SetPtRange(0,1000.);
689 pythia->SetProcess(kPyMb);
690 pythia->SetEnergyCMS(14000.);
691 pythia->SwitchHFOff();
692
693//
694// J/Psi parameterisation
695
696 AliGenParam* jpsi = new AliGenParam(1, AliGenMUONlib::kJpsi, "CDF scaled", "Jpsi");
697 jpsi->SetPtRange(0.,100.);
698 jpsi->SetYRange(-8., 8.);
699 jpsi->SetPhiRange(0., 360.);
700 jpsi->SetForceDecay(kAll);
701//
702//
703 gener->AddGenerator(jpsi, "J/Psi", 8.e-4);
704 gener->AddGenerator(pythia, "Pythia", 1.);
705
706
707 return gener;
708}
709
710AliGenerator* PyMbTriggered(Int_t pdg)
711{
712 AliGenPythia* pythia = new AliGenPythia(-1);
713 pythia->SetMomentumRange(0, 999999.);
714 pythia->SetThetaRange(0., 180.);
715 pythia->SetYRange(-12.,12.);
716 pythia->SetPtRange(0,1000.);
717 pythia->SetProcess(kPyMb);
718 pythia->SetEnergyCMS(14000.);
719 pythia->SetTriggerParticle(pdg, 0.9);
720 return pythia;
721}
722
723void ProcessEnvironmentVars()
724{
725 // Run type
726 if (gSystem->Getenv("CONFIG_RUN_TYPE")) {
727 for (Int_t iRun = 0; iRun < kRunMax; iRun++) {
728 if (strcmp(gSystem->Getenv("CONFIG_RUN_TYPE"), pprRunName[iRun])==0) {
729 proc = (PDC06Proc_t)iRun;
730 cout<<"Run type set to "<<pprRunName[iRun]<<endl;
731 }
732 }
733 }
734
735 // Random Number seed
736 if (gSystem->Getenv("CONFIG_SEED")) {
737 seed = atoi(gSystem->Getenv("CONFIG_SEED"));
738 }
739}
740
741
742