Do not load the geometry every event, use the one from AliSimulation
[u/mrichter/AliRoot.git] / macros / Config_PDC06.C
CommitLineData
e3d91248 1//
2// Configuration for the Physics Data Challenge 2006
3//
4
5#if !defined(__CINT__) || defined(__MAKECINT__)
6#include <Riostream.h>
7#include <TRandom.h>
8#include <TDatime.h>
9#include <TSystem.h>
10#include <TVirtualMC.h>
11#include <TGeant3.h>
12#include "STEER/AliRunLoader.h"
13#include "STEER/AliRun.h"
14#include "STEER/AliConfig.h"
15#include "PYTHIA6/AliDecayerPythia.h"
16#include "PYTHIA6/AliGenPythia.h"
17#include "STEER/AliMagFMaps.h"
18#include "STRUCT/AliBODY.h"
19#include "STRUCT/AliMAG.h"
20#include "STRUCT/AliABSOv0.h"
21#include "STRUCT/AliDIPOv2.h"
22#include "STRUCT/AliHALL.h"
23#include "STRUCT/AliFRAMEv2.h"
24#include "STRUCT/AliSHILv2.h"
25#include "STRUCT/AliPIPEv0.h"
26#include "ITS/AliITSvPPRasymmFMD.h"
27#include "TPC/AliTPCv2.h"
28#include "TOF/AliTOFv4T0.h"
29#include "RICH/AliRICHv1.h"
30#include "ZDC/AliZDCv1.h"
31#include "TRD/AliTRDv1.h"
32#include "FMD/AliFMDv0.h"
33#include "MUON/AliMUONv1.h"
34#include "PHOS/AliPHOSv1.h"
35#include "PMD/AliPMDv1.h"
36#include "START/AliSTARTv1.h"
37#include "CRT/AliCRTv1.h"
38#endif
39
40
41enum PDC06Proc_t
42{
43//--- Heavy Flavour Production ---
44 kCharmPbPb5500, kCharmpPb8800, kCharmpp14000, kCharmpp14000wmi,
45 kD0PbPb5500, kD0pPb8800, kD0pp14000,
46 kDPlusPbPb5500, kDPluspPb8800, kDPluspp14000,
47 kBeautyPbPb5500, kBeautypPb8800, kBeautypp14000, kBeautypp14000wmi,
48// -- Pythia Mb
49 kPyMbNoHvq, kPyOmegaPlus, kPyOmegaMinus
50};
51
52
53//--- Decay Mode ---
54enum DecayHvFl_t
55{
56 kNature, kHadr, kSemiEl, kSemiMu
57};
58//--- Rapidity Cut ---
59enum YCut_t
60{
61 kFull, kBarrel, kMuonArm
62};
63//--- Magnetic Field ---
64enum Mag_t
65{
66 k2kG, k4kG, k5kG
67};
68//--- Functions ---
69AliGenPythia *PythiaHVQ(PDC06Proc_t proc);
70AliGenerator *MbCocktail();
71AliGenerator *PyMbTriggered(Int_t pdg);
72
73// This part for configuration
b9f5ae9d 74static PDC06Proc_t proc = kPyMbNoHvq;
e3d91248 75static DecayHvFl_t decHvFl = kNature;
76static YCut_t ycut = kFull;
77static Mag_t mag = k5kG;
78// nEvts = -1 : you get 1 QQbar pair and all the fragmentation and
79// decay chain
80// nEvts = N>0 : you get N charm / beauty Hadrons
81Int_t nEvts = -1;
82// stars = kTRUE : all heavy resonances and their decay stored
83// = kFALSE: only final heavy hadrons and their decays stored
84Bool_t stars = kTRUE;
85
86// To be used only with kCharmppMNRwmi and kBeautyppMNRwmi
87// To get a "reasonable" agreement with MNR results, events have to be
88// generated with the minimum ptHard set to 2.76 GeV.
89// To get a "perfect" agreement with MNR results, events have to be
90// generated in four ptHard bins with the following relative
91// normalizations:
92// CHARM
93// 2.76-3 GeV: 25%
94// 3-4 GeV: 40%
95// 4-8 GeV: 29%
96// >8 GeV: 6%
97// BEAUTY
98// 2.76-4 GeV: 5%
99// 4-6 GeV: 31%
100// 6-8 GeV: 28%
101// >8 GeV: 36%
102Float_t ptHardMin = 2.76;
103Float_t ptHardMax = -1.;
104
105
106// Comment line
107static TString comment;
108
109void Config()
110{
111
112 //========================//
113 // Set Random Number seed //
114 //========================//
115 TDatime dt;
116 UInt_t curtime = dt.Get();
117 UInt_t procid = gSystem->GetPid();
118 UInt_t seed = curtime-procid;
119
120 // gRandom->SetSeed(seed);
121 // cerr<<"Seed for random number generation= "<<seed<<endl;
122 gRandom->SetSeed(12345);
123
124
125 // libraries required by geant321
126#if defined(__CINT__)
127 gSystem->Load("libgeant321");
128#endif
129
130 new TGeant3TGeo("C++ Interface to Geant3");
131
132 //=======================================================================
133 // Create the output file
134
135
136 AliRunLoader* rl=0x0;
137
138 cout<<"Config.C: Creating Run Loader ..."<<endl;
139 rl = AliRunLoader::Open("galice.root",
140 AliConfig::GetDefaultEventFolderName(),
141 "recreate");
142 if (rl == 0x0)
143 {
144 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
145 return;
146 }
147 rl->SetCompressionLevel(2);
148 rl->SetNumberOfEventsPerFile(1000);
149 gAlice->SetRunLoader(rl);
150
151 //
152 //=======================================================================
153 // ************* STEERING parameters FOR ALICE SIMULATION **************
154 // --- Specify event type to be tracked through the ALICE setup
155 // --- All positions are in cm, angles in degrees, and P and E in GeV
156
157
158 gMC->SetProcess("DCAY",1);
159 gMC->SetProcess("PAIR",1);
160 gMC->SetProcess("COMP",1);
161 gMC->SetProcess("PHOT",1);
162 gMC->SetProcess("PFIS",0);
163 gMC->SetProcess("DRAY",0);
164 gMC->SetProcess("ANNI",1);
165 gMC->SetProcess("BREM",1);
166 gMC->SetProcess("MUNU",1);
167 gMC->SetProcess("CKOV",1);
168 gMC->SetProcess("HADR",1);
169 gMC->SetProcess("LOSS",2);
170 gMC->SetProcess("MULS",1);
171 gMC->SetProcess("RAYL",1);
172
173 Float_t cut = 1.e-3; // 1MeV cut by default
174 Float_t tofmax = 1.e10;
175
176 gMC->SetCut("CUTGAM", cut);
177 gMC->SetCut("CUTELE", cut);
178 gMC->SetCut("CUTNEU", cut);
179 gMC->SetCut("CUTHAD", cut);
180 gMC->SetCut("CUTMUO", cut);
181 gMC->SetCut("BCUTE", cut);
182 gMC->SetCut("BCUTM", cut);
183 gMC->SetCut("DCUTE", cut);
184 gMC->SetCut("DCUTM", cut);
185 gMC->SetCut("PPCUTM", cut);
186 gMC->SetCut("TOFMAX", tofmax);
187
188
189
190
191 // Set External decayer //
192 //======================//
193 TVirtualMCDecayer* decayer = new AliDecayerPythia();
194 // DECAYS
195 //
196 switch(decHvFl) {
197 case kNature:
198 decayer->SetForceDecay(kAll);
199 break;
200 case kHadr:
201 decayer->SetForceDecay(kHadronicD);
202 break;
203 case kSemiEl:
204 decayer->SetForceDecay(kSemiElectronic);
205 break;
206 case kSemiMu:
207 decayer->SetForceDecay(kSemiMuonic);
208 break;
209 }
210 decayer->Init();
211 gMC->SetExternalDecayer(decayer);
212
213 //=========================//
214 // Generator Configuration //
215 //=========================//
216 AliGenerator* gener;
217
218 if (proc <= kBeautypp14000wmi) {
219 AliGenPythia *pythia = PythiaHVQ(proc);
220 // FeedDown option
221 pythia->SetFeedDownHigherFamily(kFALSE);
222 // Stack filling option
223 if(!stars) pythia->SetStackFillOpt(AliGenPythia::kParentSelection);
224 // Set Count mode
225 if(nEvts>0) pythia->SetCountMode(AliGenPythia::kCountParents);
226 //
227 // DECAYS
228 //
229 switch(decHvFl) {
230 case kNature:
231 pythia->SetForceDecay(kAll);
232 break;
233 case kHadr:
234 pythia->SetForceDecay(kHadronicD);
235 break;
236 case kSemiEl:
237 pythia->SetForceDecay(kSemiElectronic);
238 break;
239 case kSemiMu:
240 pythia->SetForceDecay(kSemiMuonic);
241 break;
242 }
243 //
244 // GEOM & KINE CUTS
245 //
246 pythia->SetMomentumRange(0,99999999);
247 pythia->SetPhiRange(0., 360.);
248 pythia->SetThetaRange(0,180);
249 switch(ycut) {
250 case kFull:
251 pythia->SetYRange(-999,999);
252 break;
253 case kBarrel:
254 pythia->SetYRange(-2,2);
255 break;
256 case kMuonArm:
257 pythia->SetYRange(1,6);
258 break;
259 }
260 gener = pythia;
261 } else if (proc == kPyMbNoHvq) {
262 gener = MbCocktail();
263 } else if (proc == kPyOmegaMinus) {
264 gener = PyMbTriggered(3334);
265 } else if (proc == kPyOmegaPlus) {
266 gener = PyMbTriggered(-3334);
267 }
268
269
270
271 // PRIMARY VERTEX
272 //
273 gener->SetOrigin(0., 0., 0.); // vertex position
274 //
275 //
276 // Size of the interaction diamond
277 // Longitudinal
278 Float_t sigmaz = 7.55 / TMath::Sqrt(2.); // [cm]
279 //
280 // Transverse
281 Float_t betast = 10; // beta* [m]
282 Float_t eps = 3.75e-6; // emittance [m]
283 Float_t gamma = 7000. / 0.938272; // relativistic gamma [1]
284 Float_t sigmaxy = TMath::Sqrt(eps * betast / gamma) / TMath::Sqrt(2.) * 100.; // [cm]
285 printf("\n \n Diamond size x-y: %10.3e z: %10.3e\n \n", sigmaxy, sigmaz);
286
287 gener->SetSigma(sigmaxy, sigmaxy, sigmaz); // Sigma in (X,Y,Z) (cm) on IP position
288 gener->SetCutVertexZ(1.); // Truncate at 1 sigma
289 gener->SetVertexSmear(kPerEvent);
290
291 gener->SetTrackingFlag(0);
292 // Specify GEANT tracking limits (Rmax, Zmax)
293 //gAlice->GetMCApp()->TrackingLimits(90.,1.0e10);
294
295
296 gener->Init();
297
298 // FIELD
299 //
300 if (mag == k2kG) {
301 comment = comment.Append(" | L3 field 0.2 T");
302 } else if (mag == k4kG) {
303 comment = comment.Append(" | L3 field 0.4 T");
304 } else if (mag == k5kG) {
305 comment = comment.Append(" | L3 field 0.5 T");
306 }
307 printf("\n \n Comment: %s \n \n", comment.Data());
308
309 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., mag);
310 field->SetL3ConstField(0); //Using const. field in the barrel
311 rl->CdGAFile();
312 gAlice->SetField(field);
313
314
315
316 Int_t iABSO = 1;
317 Int_t iCRT = 1;
318 Int_t iDIPO = 1;
b9f5ae9d 319 Int_t iEMCAL = 1;
e3d91248 320 Int_t iFMD = 1;
321 Int_t iFRAME = 1;
322 Int_t iHALL = 1;
323 Int_t iITS = 1;
324 Int_t iMAG = 1;
325 Int_t iMUON = 1;
b9f5ae9d 326 Int_t iPHOS = 1;
e3d91248 327 Int_t iPIPE = 1;
328 Int_t iPMD = 1;
329 Int_t iRICH = 1;
330 Int_t iSHIL = 1;
331 Int_t iSTART = 1;
b9f5ae9d 332 Int_t iTOF = 1;
e3d91248 333 Int_t iTPC = 1;
334 Int_t iTRD = 1;
b9f5ae9d 335 Int_t iVZERO = 1;
e3d91248 336 Int_t iZDC = 1;
b9f5ae9d 337
e3d91248 338
b9f5ae9d 339 //=================== Alice BODY parameters =============================
340 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
e3d91248 341
e3d91248 342
b9f5ae9d 343 if (iMAG)
344 {
345 //=================== MAG parameters ============================
346 // --- Start with Magnet since detector layouts may be depending ---
347 // --- on the selected Magnet dimensions ---
348 AliMAG *MAG = new AliMAG("MAG", "Magnet");
349 }
e3d91248 350
e3d91248 351
b9f5ae9d 352 if (iABSO)
353 {
354 //=================== ABSO parameters ============================
355 AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
356 }
e3d91248 357
b9f5ae9d 358 if (iDIPO)
359 {
360 //=================== DIPO parameters ============================
e3d91248 361
b9f5ae9d 362 AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
363 }
e3d91248 364
b9f5ae9d 365 if (iHALL)
366 {
367 //=================== HALL parameters ============================
e3d91248 368
b9f5ae9d 369 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
370 }
e3d91248 371
e3d91248 372
b9f5ae9d 373 if (iFRAME)
374 {
375 //=================== FRAME parameters ============================
e3d91248 376
b9f5ae9d 377 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
378 FRAME->SetHoles(0);
379 }
e3d91248 380
b9f5ae9d 381 if (iSHIL)
382 {
383 //=================== SHIL parameters ============================
e3d91248 384
b9f5ae9d 385 AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding Version 2");
386 }
e3d91248 387
e3d91248 388
b9f5ae9d 389 if (iPIPE)
390 {
391 //=================== PIPE parameters ============================
e3d91248 392
b9f5ae9d 393 AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
394 }
395
396 if(iITS) {
e3d91248 397
b9f5ae9d 398 //=================== ITS parameters ============================
e3d91248 399 //
400 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
401 // almost all other detectors. This involves the fact that the ITS geometry
402 // still has several options to be followed in parallel in order to determine
403 // the best set-up which minimizes the induced background. All the geometries
404 // available to date are described in the following. Read carefully the comments
405 // and use the default version (the only one uncommented) unless you are making
406 // comparisons and you know what you are doing. In this case just uncomment the
407 // ITS geometry you want to use and run Aliroot.
408 //
409 // Detailed geometries:
410 //
411 //
412 //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services");
413 //
414 //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
415 //
b9f5ae9d 416 AliITSvPPRasymmFMD *ITS = new AliITSvPPRasymmFMD("ITS","New ITS PPR detailed version with asymmetric services");
417 ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
418 ITS->SetReadDet(kTRUE); // don't touch this parameter if you're not an ITS developer
419 // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer
420 ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
421 ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
422 ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
423 ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
424 ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
425 ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
426
e3d91248 427 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
428 // for reconstruction !):
429 //
430 //
431 //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
b9f5ae9d 432 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
e3d91248 433 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
434 //
435 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
b9f5ae9d 436 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
e3d91248 437 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
438 //
439 //
440 //
441 // Geant3 <-> EUCLID conversion
442 // ============================
443 //
444 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
445 // media to two ASCII files (called by default ITSgeometry.euc and
446 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
447 // The default (=0) means that you dont want to use this facility.
448 //
b9f5ae9d 449 ITS->SetEUCLID(0);
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 ============================
461 AliTOF *TOF = new AliTOFv5T0("TOF", "normal TOF");
462 }
e3d91248 463
e3d91248 464
b9f5ae9d 465 if (iRICH)
466 {
467 //=================== RICH parameters ===========================
468 AliRICH *RICH = new AliRICHv1("RICH", "normal RICH");
e3d91248 469
b9f5ae9d 470 }
e3d91248 471
e3d91248 472
b9f5ae9d 473 if (iZDC)
474 {
475 //=================== ZDC parameters ============================
e3d91248 476
b9f5ae9d 477 AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
478 }
e3d91248 479
b9f5ae9d 480 if (iTRD)
481 {
482 //=================== TRD parameters ============================
e3d91248 483
b9f5ae9d 484 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
e3d91248 485
b9f5ae9d 486 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
487 TRD->SetGasMix(1);
488 // Switch on TR
489 AliTRDsim *TRDsim = TRD->CreateTR();
490 }
e3d91248 491
b9f5ae9d 492 if (iFMD)
493 {
494 //=================== FMD parameters ============================
495 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
496 }
e3d91248 497
b9f5ae9d 498 if (iMUON)
499 {
500 //=================== MUON parameters ===========================
501 // New MUONv1 version (geometry defined via builders)
502 AliMUON *MUON = new AliMUONv1("MUON", "default");
503 }
504 //=================== PHOS parameters ===========================
e3d91248 505
b9f5ae9d 506 if (iPHOS)
507 {
508 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
509 }
e3d91248 510
511
b9f5ae9d 512 if (iPMD)
513 {
514 //=================== PMD parameters ============================
515 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
516 }
e3d91248 517
b9f5ae9d 518 if (iSTART)
519 {
520 //=================== START parameters ============================
521 AliSTART *START = new AliSTARTv1("START", "START Detector");
522 }
e3d91248 523
b9f5ae9d 524 if (iEMCAL)
525 {
526 //=================== EMCAL parameters ============================
527 AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "SHISH");
528 }
e3d91248 529
b9f5ae9d 530 if (iCRT)
531 {
532 //=================== CRT parameters ============================
533 AliCRT *CRT = new AliCRTv0("CRT", "normal ACORDE");
534 }
e3d91248 535
b9f5ae9d 536 if (iVZERO)
537 {
538 //=================== CRT parameters ============================
539 AliVZERO *VZERO = new AliVZEROv5("VZERO", "normal VZERO");
540 }
e3d91248 541}
542//
543// PYTHIA
544//
545AliGenPythia *PythiaHVQ(PDC06Proc_t proc) {
546//*******************************************************************//
547// Configuration file for charm / beauty generation with PYTHIA //
548// //
549// The parameters have been tuned in order to reproduce the inclusive//
550// heavy quark pt distribution given by the NLO pQCD calculation by //
551// Mangano, Nason and Ridolfi. //
552// //
553// For details and for the NORMALIZATION of the yields see: //
554// N.Carrer and A.Dainese, //
555// "Charm and beauty production at the LHC", //
556// ALICE-INT-2003-019, [arXiv:hep-ph/0311225]; //
557// PPR Chapter 6.6, CERN/LHCC 2005-030 (2005). //
558//*******************************************************************//
559 AliGenPythia * gener = 0x0;
560
561 switch(proc) {
562 case kCharmPbPb5500:
563 comment = comment.Append(" Charm in Pb-Pb at 5.5 TeV");
564 gener = new AliGenPythia(nEvts);
565 gener->SetProcess(kPyCharmPbPbMNR);
566 gener->SetStrucFunc(kCTEQ4L);
567 gener->SetPtHard(2.1,-1.0);
568 gener->SetEnergyCMS(5500.);
569 gener->SetNuclei(208,208);
570 break;
571 case kCharmpPb8800:
572 comment = comment.Append(" Charm in p-Pb at 8.8 TeV");
573 gener = new AliGenPythia(nEvts);
574 gener->SetProcess(kPyCharmpPbMNR);
575 gener->SetStrucFunc(kCTEQ4L);
576 gener->SetPtHard(2.1,-1.0);
577 gener->SetEnergyCMS(8800.);
578 gener->SetProjectile("P",1,1);
579 gener->SetTarget("Pb",208,82);
580 break;
581 case kCharmpp14000:
582 comment = comment.Append(" Charm in pp at 14 TeV");
583 gener = new AliGenPythia(nEvts);
584 gener->SetProcess(kPyCharmppMNR);
585 gener->SetStrucFunc(kCTEQ4L);
586 gener->SetPtHard(2.1,-1.0);
587 gener->SetEnergyCMS(14000.);
588 break;
589 case kCharmpp14000wmi:
590 comment = comment.Append(" Charm in pp at 14 TeV with mult. interactions");
591 gener = new AliGenPythia(-1);
592 gener->SetProcess(kPyCharmppMNRwmi);
593 gener->SetStrucFunc(kCTEQ5L);
594 gener->SetPtHard(ptHardMin,ptHardMax);
595 gener->SetEnergyCMS(14000.);
596 break;
597 case kD0PbPb5500:
598 comment = comment.Append(" D0 in Pb-Pb at 5.5 TeV");
599 gener = new AliGenPythia(nEvts);
600 gener->SetProcess(kPyD0PbPbMNR);
601 gener->SetStrucFunc(kCTEQ4L);
602 gener->SetPtHard(2.1,-1.0);
603 gener->SetEnergyCMS(5500.);
604 gener->SetNuclei(208,208);
605 break;
606 case kD0pPb8800:
607 comment = comment.Append(" D0 in p-Pb at 8.8 TeV");
608 gener = new AliGenPythia(nEvts);
609 gener->SetProcess(kPyD0pPbMNR);
610 gener->SetStrucFunc(kCTEQ4L);
611 gener->SetPtHard(2.1,-1.0);
612 gener->SetEnergyCMS(8800.);
613 gener->SetProjectile("P",1,1);
614 gener->SetTarget("Pb",208,82);
615 break;
616 case kD0pp14000:
617 comment = comment.Append(" D0 in pp at 14 TeV");
618 gener = new AliGenPythia(nEvts);
619 gener->SetProcess(kPyD0ppMNR);
620 gener->SetStrucFunc(kCTEQ4L);
621 gener->SetPtHard(2.1,-1.0);
622 gener->SetEnergyCMS(14000.);
623 break;
624 case kDPlusPbPb5500:
625 comment = comment.Append(" DPlus in Pb-Pb at 5.5 TeV");
626 gener = new AliGenPythia(nEvts);
627 gener->SetProcess(kPyDPlusPbPbMNR);
628 gener->SetStrucFunc(kCTEQ4L);
629 gener->SetPtHard(2.1,-1.0);
630 gener->SetEnergyCMS(5500.);
631 gener->SetNuclei(208,208);
632 break;
633 case kDPluspPb8800:
634 comment = comment.Append(" DPlus in p-Pb at 8.8 TeV");
635 gener = new AliGenPythia(nEvts);
636 gener->SetProcess(kPyDPluspPbMNR);
637 gener->SetStrucFunc(kCTEQ4L);
638 gener->SetPtHard(2.1,-1.0);
639 gener->SetEnergyCMS(8800.);
640 gener->SetProjectile("P",1,1);
641 gener->SetTarget("Pb",208,82);
642 break;
643 case kDPluspp14000:
644 comment = comment.Append(" DPlus in pp at 14 TeV");
645 gener = new AliGenPythia(nEvts);
646 gener->SetProcess(kPyDPlusppMNR);
647 gener->SetStrucFunc(kCTEQ4L);
648 gener->SetPtHard(2.1,-1.0);
649 gener->SetEnergyCMS(14000.);
650 break;
651 case kBeautyPbPb5500:
652 comment = comment.Append(" Beauty in Pb-Pb at 5.5 TeV");
653 gener = new AliGenPythia(nEvts);
654 gener->SetProcess(kPyBeautyPbPbMNR);
655 gener->SetStrucFunc(kCTEQ4L);
656 gener->SetPtHard(2.75,-1.0);
657 gener->SetEnergyCMS(5500.);
658 gener->SetNuclei(208,208);
659 break;
660 case kBeautypPb8800:
661 comment = comment.Append(" Beauty in p-Pb at 8.8 TeV");
662 gener = new AliGenPythia(nEvts);
663 gener->SetProcess(kPyBeautypPbMNR);
664 gener->SetStrucFunc(kCTEQ4L);
665 gener->SetPtHard(2.75,-1.0);
666 gener->SetEnergyCMS(8800.);
667 gener->SetProjectile("P",1,1);
668 gener->SetTarget("Pb",208,82);
669 break;
670 case kBeautypp14000:
671 comment = comment.Append(" Beauty in pp at 14 TeV");
672 gener = new AliGenPythia(nEvts);
673 gener->SetProcess(kPyBeautyppMNR);
674 gener->SetStrucFunc(kCTEQ4L);
675 gener->SetPtHard(2.75,-1.0);
676 gener->SetEnergyCMS(14000.);
677 break;
678 case kBeautypp14000wmi:
679 comment = comment.Append(" Beauty in pp at 14 TeV with mult. interactions");
680 gener = new AliGenPythia(-1);
681 gener->SetProcess(kPyBeautyppMNRwmi);
682 gener->SetStrucFunc(kCTEQ5L);
683 gener->SetPtHard(ptHardMin,ptHardMax);
684 gener->SetEnergyCMS(14000.);
685 break;
686 }
687
688 return gener;
689}
690
691AliGenerator* MbCocktail()
692{
693 comment = comment.Append(" pp at 14 TeV: Pythia low-pt, no heavy quarks + J/Psi from parameterisation");
694 gener = new AliGenCocktail();
695 gener->UsePerEventRates();
e3d91248 696
697//
698// Pythia
699 AliGenPythia* pythia = new AliGenPythia(-1);
700 pythia->SetMomentumRange(0, 999999.);
701 pythia->SetThetaRange(0., 180.);
702 pythia->SetYRange(-12.,12.);
703 pythia->SetPtRange(0,1000.);
704 pythia->SetProcess(kPyMb);
705 pythia->SetEnergyCMS(14000.);
706 pythia->SwitchHFOff();
707
708//
709// J/Psi parameterisation
710
711 AliGenParam* jpsi = new AliGenParam(1, AliGenMUONlib::kJpsi, "CDF scaled", "Jpsi");
712 jpsi->SetPtRange(0.,100.);
713 jpsi->SetYRange(-8., 8.);
714 jpsi->SetPhiRange(0., 360.);
715 jpsi->SetForceDecay(kAll);
716//
717//
718 gener->AddGenerator(pythia, "Pythia", 1.);
719 gener->AddGenerator(jpsi, "J/Psi", 8.e-4);
720
721 return gener;
722}
723
724AliGenerator* PyMbTriggered(Int_t pdg)
725{
726 AliGenPythia* pythia = new AliGenPythia(-1);
727 pythia->SetMomentumRange(0, 999999.);
728 pythia->SetThetaRange(0., 180.);
729 pythia->SetYRange(-12.,12.);
730 pythia->SetPtRange(0,1000.);
731 pythia->SetProcess(kPyMb);
732 pythia->SetEnergyCMS(14000.);
733 pythia->SetTriggerParticle(pdg, 0.9);
734 return pythia;
735}
736
737
738
739