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