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