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