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