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