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