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