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