Updated SNM Glauber fit
[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"
f7a1cc68 26#include "STEER/AliMagF.h"
e3d91248 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"
3a5fcc75 36#include "ITS/AliITSv11.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};
6521ae06 83//--- Trigger config ---
84enum TrigConf_t
85{
86 kDefaultPPTrig, kDefaultPbPbTrig
87};
88
89const char * TrigConfName[] = {
90 "p-p","Pb-Pb"
91};
92
e3d91248 93//--- Functions ---
1faeb480 94class AliGenPythia;
e3d91248 95AliGenPythia *PythiaHVQ(PDC06Proc_t proc);
96AliGenerator *MbCocktail();
97AliGenerator *PyMbTriggered(Int_t pdg);
13217d97 98void ProcessEnvironmentVars();
faf707c8 99void LoadPythia();
e3d91248 100
101// This part for configuration
f7691a35 102static PDC06Proc_t proc = kPyMbNoHvq;
e3d91248 103static DecayHvFl_t decHvFl = kNature;
104static YCut_t ycut = kFull;
f7a1cc68 105static AliMagF::BMap_t mag = AliMagF::k5kG;
6521ae06 106static TrigConf_t trig = kDefaultPPTrig; // default pp trigger configuration
13217d97 107//========================//
108// Set Random Number seed //
109//========================//
110TDatime dt;
111static UInt_t seed = dt.Get();
112
e3d91248 113// nEvts = -1 : you get 1 QQbar pair and all the fragmentation and
114// decay chain
115// nEvts = N>0 : you get N charm / beauty Hadrons
116Int_t nEvts = -1;
117// stars = kTRUE : all heavy resonances and their decay stored
118// = kFALSE: only final heavy hadrons and their decays stored
119Bool_t stars = kTRUE;
120
121// To be used only with kCharmppMNRwmi and kBeautyppMNRwmi
122// To get a "reasonable" agreement with MNR results, events have to be
123// generated with the minimum ptHard set to 2.76 GeV.
124// To get a "perfect" agreement with MNR results, events have to be
125// generated in four ptHard bins with the following relative
126// normalizations:
127// CHARM
128// 2.76-3 GeV: 25%
129// 3-4 GeV: 40%
130// 4-8 GeV: 29%
131// >8 GeV: 6%
132// BEAUTY
133// 2.76-4 GeV: 5%
134// 4-6 GeV: 31%
135// 6-8 GeV: 28%
136// >8 GeV: 36%
137Float_t ptHardMin = 2.76;
138Float_t ptHardMax = -1.;
139
140
141// Comment line
142static TString comment;
143
144void Config()
145{
faf707c8 146
13217d97 147
148 // Get settings from environment variables
149 ProcessEnvironmentVars();
faf707c8 150 // Load pythia libraries
151 LoadPythia();
152 //
13217d97 153
154 gRandom->SetSeed(seed);
155 cerr<<"Seed for random number generation= "<<seed<<endl;
e3d91248 156
157 // libraries required by geant321
158#if defined(__CINT__)
159 gSystem->Load("libgeant321");
160#endif
161
162 new TGeant3TGeo("C++ Interface to Geant3");
163
458041af 164 if(!AliCDBManager::Instance()->IsDefaultStorageSet()){
162637e4 165 AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
458041af 166 AliCDBManager::Instance()->SetRun(0);
167 }
168
e3d91248 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);
458041af 187 // gAlice->SetGeometryFromFile("geometry.root");
188 // gAlice->SetGeometryFromCDB();
6521ae06 189
190 // Set the trigger configuration
28da60d3 191 AliSimulation::Instance()->SetTriggerConfig(TrigConfName[trig]);
6521ae06 192 cout<<"Trigger configuration is set to "<<TrigConfName[trig]<<endl;
e3d91248 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 //=========================//
13217d97 259 AliGenerator* gener = 0x0;
e3d91248 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
550c2171 331 gener->SetCutVertexZ(3.); // Truncate at 3 sigma
e3d91248 332 gener->SetVertexSmear(kPerEvent);
333
e3d91248 334 gener->Init();
335
336 // FIELD
337 //
338 if (mag == k2kG) {
339 comment = comment.Append(" | L3 field 0.2 T");
e3d91248 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
4642ac4b 345 AliMagF* field = new AliMagF("Maps","Maps",1.,1.,,mag);
e3d91248 346 field->SetL3ConstField(0); //Using const. field in the barrel
f7a1cc68 347 TGeoGlobalMagField::Instance()->SetField(field);
e3d91248 348
f7a1cc68 349 rl->CdGAFile();
e3d91248 350
351 Int_t iABSO = 1;
b384f8a4 352 Int_t iACORDE = 0;
e3d91248 353 Int_t iDIPO = 1;
b9f5ae9d 354 Int_t iEMCAL = 1;
e3d91248 355 Int_t iFMD = 1;
356 Int_t iFRAME = 1;
357 Int_t iHALL = 1;
358 Int_t iITS = 1;
359 Int_t iMAG = 1;
360 Int_t iMUON = 1;
b9f5ae9d 361 Int_t iPHOS = 1;
e3d91248 362 Int_t iPIPE = 1;
363 Int_t iPMD = 1;
de1857bb 364 Int_t iHMPID = 1;
e3d91248 365 Int_t iSHIL = 1;
ababa197 366 Int_t iT0 = 1;
b9f5ae9d 367 Int_t iTOF = 1;
e3d91248 368 Int_t iTPC = 1;
369 Int_t iTRD = 1;
b9f5ae9d 370 Int_t iVZERO = 1;
e3d91248 371 Int_t iZDC = 1;
b9f5ae9d 372
e3d91248 373
b9f5ae9d 374 //=================== Alice BODY parameters =============================
375 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
e3d91248 376
e3d91248 377
b9f5ae9d 378 if (iMAG)
379 {
380 //=================== MAG parameters ============================
381 // --- Start with Magnet since detector layouts may be depending ---
382 // --- on the selected Magnet dimensions ---
383 AliMAG *MAG = new AliMAG("MAG", "Magnet");
384 }
e3d91248 385
e3d91248 386
b9f5ae9d 387 if (iABSO)
388 {
389 //=================== ABSO parameters ============================
96fb3353 390 AliABSO *ABSO = new AliABSOv3("ABSO", "Muon Absorber");
b9f5ae9d 391 }
e3d91248 392
b9f5ae9d 393 if (iDIPO)
394 {
395 //=================== DIPO parameters ============================
e3d91248 396
96fb3353 397 AliDIPO *DIPO = new AliDIPOv3("DIPO", "Dipole version 3");
b9f5ae9d 398 }
e3d91248 399
b9f5ae9d 400 if (iHALL)
401 {
402 //=================== HALL parameters ============================
e3d91248 403
96fb3353 404 AliHALL *HALL = new AliHALLv3("HALL", "Alice Hall");
b9f5ae9d 405 }
e3d91248 406
e3d91248 407
b9f5ae9d 408 if (iFRAME)
409 {
410 //=================== FRAME parameters ============================
e3d91248 411
b9f5ae9d 412 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
bab433b3 413 FRAME->SetHoles(1);
b9f5ae9d 414 }
e3d91248 415
b9f5ae9d 416 if (iSHIL)
417 {
418 //=================== SHIL parameters ============================
e3d91248 419
96fb3353 420 AliSHIL *SHIL = new AliSHILv3("SHIL", "Shielding Version 3");
b9f5ae9d 421 }
e3d91248 422
e3d91248 423
b9f5ae9d 424 if (iPIPE)
425 {
426 //=================== PIPE parameters ============================
e3d91248 427
96fb3353 428 AliPIPE *PIPE = new AliPIPEv3("PIPE", "Beam Pipe");
b9f5ae9d 429 }
430
e89fa83b 431 if (iITS)
432 {
433 //=================== ITS parameters ============================
434
3a5fcc75 435 AliITS *ITS = new AliITSv11("ITS","ITS v11");
b9f5ae9d 436 }
e3d91248 437
b9f5ae9d 438 if (iTPC)
439 {
440 //============================ TPC parameters =====================
441 AliTPC *TPC = new AliTPCv2("TPC", "Default");
442 }
e3d91248 443
e3d91248 444
b9f5ae9d 445 if (iTOF) {
446 //=================== TOF parameters ============================
0d7ef405 447 AliTOF *TOF = new AliTOFv6T0("TOF", "normal TOF");
b9f5ae9d 448 }
e3d91248 449
e3d91248 450
de1857bb 451 if (iHMPID)
b9f5ae9d 452 {
de1857bb 453 //=================== HMPID parameters ===========================
99887042 454 AliHMPID *HMPID = new AliHMPIDv3("HMPID", "normal HMPID");
e3d91248 455
b9f5ae9d 456 }
e3d91248 457
e3d91248 458
b9f5ae9d 459 if (iZDC)
460 {
461 //=================== ZDC parameters ============================
e3d91248 462
9d07603a 463 AliZDC *ZDC = new AliZDCv3("ZDC", "normal ZDC");
b9f5ae9d 464 }
e3d91248 465
b9f5ae9d 466 if (iTRD)
467 {
468 //=================== TRD parameters ============================
e3d91248 469
b9f5ae9d 470 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
db73b724 471 AliTRDgeometry *geoTRD = TRD->GetGeometry();
d2272c21 472 // Partial geometry: modules at 2,3,4,6,11,12,14,15
db73b724 473 // starting at 6h in positive direction
474 geoTRD->SetSMstatus(0,0);
475 geoTRD->SetSMstatus(1,0);
476 geoTRD->SetSMstatus(5,0);
477 geoTRD->SetSMstatus(7,0);
478 geoTRD->SetSMstatus(8,0);
479 geoTRD->SetSMstatus(9,0);
480 geoTRD->SetSMstatus(10,0);
db73b724 481 geoTRD->SetSMstatus(13,0);
d2272c21 482 geoTRD->SetSMstatus(16,0);
db73b724 483 geoTRD->SetSMstatus(17,0);
b9f5ae9d 484 }
e3d91248 485
b9f5ae9d 486 if (iFMD)
487 {
488 //=================== FMD parameters ============================
489 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
490 }
e3d91248 491
b9f5ae9d 492 if (iMUON)
493 {
494 //=================== MUON parameters ===========================
495 // New MUONv1 version (geometry defined via builders)
496 AliMUON *MUON = new AliMUONv1("MUON", "default");
497 }
498 //=================== PHOS parameters ===========================
e3d91248 499
b9f5ae9d 500 if (iPHOS)
501 {
502 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
503 }
e3d91248 504
505
b9f5ae9d 506 if (iPMD)
507 {
508 //=================== PMD parameters ============================
509 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
510 }
e3d91248 511
ababa197 512 if (iT0)
b9f5ae9d 513 {
ababa197 514 //=================== T0 parameters ============================
515 AliT0 *T0 = new AliT0v1("T0", "T0 Detector");
b9f5ae9d 516 }
e3d91248 517
b9f5ae9d 518 if (iEMCAL)
519 {
520 //=================== EMCAL parameters ============================
8224b11d 521 AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "EMCAL_COMPLETE");
b9f5ae9d 522 }
e3d91248 523
b384f8a4 524 if (iACORDE)
b9f5ae9d 525 {
b384f8a4 526 //=================== ACORDE parameters ============================
f7882672 527 AliACORDE *ACORDE = new AliACORDEv1("ACORDE", "normal ACORDE");
b9f5ae9d 528 }
e3d91248 529
b9f5ae9d 530 if (iVZERO)
531 {
b384f8a4 532 //=================== ACORDE parameters ============================
4a2f6442 533 AliVZERO *VZERO = new AliVZEROv7("VZERO", "normal VZERO");
b9f5ae9d 534 }
e3d91248 535}
536//
537// PYTHIA
538//
539AliGenPythia *PythiaHVQ(PDC06Proc_t proc) {
540//*******************************************************************//
541// Configuration file for charm / beauty generation with PYTHIA //
542// //
543// The parameters have been tuned in order to reproduce the inclusive//
544// heavy quark pt distribution given by the NLO pQCD calculation by //
545// Mangano, Nason and Ridolfi. //
546// //
547// For details and for the NORMALIZATION of the yields see: //
548// N.Carrer and A.Dainese, //
549// "Charm and beauty production at the LHC", //
550// ALICE-INT-2003-019, [arXiv:hep-ph/0311225]; //
551// PPR Chapter 6.6, CERN/LHCC 2005-030 (2005). //
552//*******************************************************************//
553 AliGenPythia * gener = 0x0;
554
555 switch(proc) {
556 case kCharmPbPb5500:
557 comment = comment.Append(" Charm in Pb-Pb at 5.5 TeV");
558 gener = new AliGenPythia(nEvts);
559 gener->SetProcess(kPyCharmPbPbMNR);
560 gener->SetStrucFunc(kCTEQ4L);
561 gener->SetPtHard(2.1,-1.0);
562 gener->SetEnergyCMS(5500.);
563 gener->SetNuclei(208,208);
564 break;
565 case kCharmpPb8800:
566 comment = comment.Append(" Charm in p-Pb at 8.8 TeV");
567 gener = new AliGenPythia(nEvts);
568 gener->SetProcess(kPyCharmpPbMNR);
569 gener->SetStrucFunc(kCTEQ4L);
570 gener->SetPtHard(2.1,-1.0);
571 gener->SetEnergyCMS(8800.);
572 gener->SetProjectile("P",1,1);
573 gener->SetTarget("Pb",208,82);
574 break;
575 case kCharmpp14000:
576 comment = comment.Append(" Charm in pp at 14 TeV");
577 gener = new AliGenPythia(nEvts);
578 gener->SetProcess(kPyCharmppMNR);
579 gener->SetStrucFunc(kCTEQ4L);
580 gener->SetPtHard(2.1,-1.0);
581 gener->SetEnergyCMS(14000.);
582 break;
583 case kCharmpp14000wmi:
584 comment = comment.Append(" Charm in pp at 14 TeV with mult. interactions");
585 gener = new AliGenPythia(-1);
586 gener->SetProcess(kPyCharmppMNRwmi);
587 gener->SetStrucFunc(kCTEQ5L);
588 gener->SetPtHard(ptHardMin,ptHardMax);
589 gener->SetEnergyCMS(14000.);
590 break;
591 case kD0PbPb5500:
592 comment = comment.Append(" D0 in Pb-Pb at 5.5 TeV");
593 gener = new AliGenPythia(nEvts);
594 gener->SetProcess(kPyD0PbPbMNR);
595 gener->SetStrucFunc(kCTEQ4L);
596 gener->SetPtHard(2.1,-1.0);
597 gener->SetEnergyCMS(5500.);
598 gener->SetNuclei(208,208);
599 break;
600 case kD0pPb8800:
601 comment = comment.Append(" D0 in p-Pb at 8.8 TeV");
602 gener = new AliGenPythia(nEvts);
603 gener->SetProcess(kPyD0pPbMNR);
604 gener->SetStrucFunc(kCTEQ4L);
605 gener->SetPtHard(2.1,-1.0);
606 gener->SetEnergyCMS(8800.);
607 gener->SetProjectile("P",1,1);
608 gener->SetTarget("Pb",208,82);
609 break;
610 case kD0pp14000:
611 comment = comment.Append(" D0 in pp at 14 TeV");
612 gener = new AliGenPythia(nEvts);
613 gener->SetProcess(kPyD0ppMNR);
614 gener->SetStrucFunc(kCTEQ4L);
615 gener->SetPtHard(2.1,-1.0);
616 gener->SetEnergyCMS(14000.);
617 break;
618 case kDPlusPbPb5500:
619 comment = comment.Append(" DPlus in Pb-Pb at 5.5 TeV");
620 gener = new AliGenPythia(nEvts);
621 gener->SetProcess(kPyDPlusPbPbMNR);
622 gener->SetStrucFunc(kCTEQ4L);
623 gener->SetPtHard(2.1,-1.0);
624 gener->SetEnergyCMS(5500.);
625 gener->SetNuclei(208,208);
626 break;
627 case kDPluspPb8800:
628 comment = comment.Append(" DPlus in p-Pb at 8.8 TeV");
629 gener = new AliGenPythia(nEvts);
630 gener->SetProcess(kPyDPluspPbMNR);
631 gener->SetStrucFunc(kCTEQ4L);
632 gener->SetPtHard(2.1,-1.0);
633 gener->SetEnergyCMS(8800.);
634 gener->SetProjectile("P",1,1);
635 gener->SetTarget("Pb",208,82);
636 break;
637 case kDPluspp14000:
638 comment = comment.Append(" DPlus in pp at 14 TeV");
639 gener = new AliGenPythia(nEvts);
640 gener->SetProcess(kPyDPlusppMNR);
641 gener->SetStrucFunc(kCTEQ4L);
642 gener->SetPtHard(2.1,-1.0);
643 gener->SetEnergyCMS(14000.);
644 break;
645 case kBeautyPbPb5500:
646 comment = comment.Append(" Beauty in Pb-Pb at 5.5 TeV");
647 gener = new AliGenPythia(nEvts);
648 gener->SetProcess(kPyBeautyPbPbMNR);
649 gener->SetStrucFunc(kCTEQ4L);
650 gener->SetPtHard(2.75,-1.0);
651 gener->SetEnergyCMS(5500.);
652 gener->SetNuclei(208,208);
653 break;
654 case kBeautypPb8800:
655 comment = comment.Append(" Beauty in p-Pb at 8.8 TeV");
656 gener = new AliGenPythia(nEvts);
657 gener->SetProcess(kPyBeautypPbMNR);
658 gener->SetStrucFunc(kCTEQ4L);
659 gener->SetPtHard(2.75,-1.0);
660 gener->SetEnergyCMS(8800.);
661 gener->SetProjectile("P",1,1);
662 gener->SetTarget("Pb",208,82);
663 break;
664 case kBeautypp14000:
665 comment = comment.Append(" Beauty in pp at 14 TeV");
666 gener = new AliGenPythia(nEvts);
667 gener->SetProcess(kPyBeautyppMNR);
668 gener->SetStrucFunc(kCTEQ4L);
669 gener->SetPtHard(2.75,-1.0);
670 gener->SetEnergyCMS(14000.);
671 break;
672 case kBeautypp14000wmi:
673 comment = comment.Append(" Beauty in pp at 14 TeV with mult. interactions");
674 gener = new AliGenPythia(-1);
675 gener->SetProcess(kPyBeautyppMNRwmi);
676 gener->SetStrucFunc(kCTEQ5L);
677 gener->SetPtHard(ptHardMin,ptHardMax);
678 gener->SetEnergyCMS(14000.);
679 break;
680 }
681
682 return gener;
683}
684
685AliGenerator* MbCocktail()
686{
687 comment = comment.Append(" pp at 14 TeV: Pythia low-pt, no heavy quarks + J/Psi from parameterisation");
13217d97 688 AliGenCocktail * gener = new AliGenCocktail();
e3d91248 689 gener->UsePerEventRates();
e3d91248 690
691//
692// Pythia
693 AliGenPythia* pythia = new AliGenPythia(-1);
694 pythia->SetMomentumRange(0, 999999.);
695 pythia->SetThetaRange(0., 180.);
696 pythia->SetYRange(-12.,12.);
697 pythia->SetPtRange(0,1000.);
698 pythia->SetProcess(kPyMb);
699 pythia->SetEnergyCMS(14000.);
700 pythia->SwitchHFOff();
701
702//
703// J/Psi parameterisation
704
705 AliGenParam* jpsi = new AliGenParam(1, AliGenMUONlib::kJpsi, "CDF scaled", "Jpsi");
706 jpsi->SetPtRange(0.,100.);
707 jpsi->SetYRange(-8., 8.);
708 jpsi->SetPhiRange(0., 360.);
709 jpsi->SetForceDecay(kAll);
710//
63c8e27e 711//
712 gener->AddGenerator(jpsi, "J/Psi", 8.e-4);
e3d91248 713 gener->AddGenerator(pythia, "Pythia", 1.);
63c8e27e 714
e3d91248 715
716 return gener;
717}
718
719AliGenerator* PyMbTriggered(Int_t pdg)
720{
721 AliGenPythia* pythia = new AliGenPythia(-1);
722 pythia->SetMomentumRange(0, 999999.);
723 pythia->SetThetaRange(0., 180.);
724 pythia->SetYRange(-12.,12.);
725 pythia->SetPtRange(0,1000.);
726 pythia->SetProcess(kPyMb);
727 pythia->SetEnergyCMS(14000.);
728 pythia->SetTriggerParticle(pdg, 0.9);
729 return pythia;
730}
731
13217d97 732void ProcessEnvironmentVars()
733{
734 // Run type
735 if (gSystem->Getenv("CONFIG_RUN_TYPE")) {
736 for (Int_t iRun = 0; iRun < kRunMax; iRun++) {
737 if (strcmp(gSystem->Getenv("CONFIG_RUN_TYPE"), pprRunName[iRun])==0) {
738 proc = (PDC06Proc_t)iRun;
739 cout<<"Run type set to "<<pprRunName[iRun]<<endl;
740 }
741 }
742 }
743
744 // Random Number seed
745 if (gSystem->Getenv("CONFIG_SEED")) {
746 seed = atoi(gSystem->Getenv("CONFIG_SEED"));
747 }
748}
e3d91248 749
750
751
faf707c8 752void LoadPythia()
753{
754 // Load Pythia related libraries
755 gSystem->Load("liblhapdf.so"); // Parton density functions
756 gSystem->Load("libEGPythia6.so"); // TGenerator interface
faf707c8 757 gSystem->Load("libpythia6.so"); // Pythia
758 gSystem->Load("libAliPythia6.so"); // ALICE specific implementations
759}