1 //*******************************************************************//
2 // Configuration file for charm / beauty generation with PYTHIA //
4 // The parameters have been tuned in order to reproduce the inclusive//
5 // heavy quark pt distribution given by the NLO pQCD calculation by //
6 // Mangano, Nason and Ridolfi. //
8 // For details and for the NORMALIZATION of the yields see: //
9 // N.Carrer and A.Dainese, //
10 // "Charm and beauty production at the LHC", //
11 // ALICE-INT-2003-019, [arXiv:hep-ph/0312255]. //
12 //*******************************************************************//
13 #if !defined(__CINT__) || defined(__MAKECINT__)
14 #include <Riostream.h>
18 #include <TVirtualMC.h>
20 #include "STEER/AliRunLoader.h"
21 #include "STEER/AliRun.h"
22 #include "STEER/AliConfig.h"
23 #include "PYTHIA6/AliDecayerPythia.h"
24 #include "PYTHIA6/AliGenPythia.h"
25 #include "STEER/AliMagFMaps.h"
26 #include "STRUCT/AliBODY.h"
27 #include "STRUCT/AliMAG.h"
28 #include "STRUCT/AliABSOv0.h"
29 #include "STRUCT/AliDIPOv2.h"
30 #include "STRUCT/AliHALL.h"
31 #include "STRUCT/AliFRAMEv2.h"
32 #include "STRUCT/AliSHILv2.h"
33 #include "STRUCT/AliPIPEv0.h"
34 #include "ITS/AliITSvPPRasymmFMD.h"
35 #include "TPC/AliTPCv2.h"
36 #include "TOF/AliTOFv4T0.h"
37 #include "RICH/AliRICHv1.h"
38 #include "ZDC/AliZDCv1.h"
39 #include "TRD/AliTRDv1.h"
40 #include "FMD/AliFMDv0.h"
41 #include "MUON/AliMUONv1.h"
42 #include "PHOS/AliPHOSv1.h"
43 #include "PMD/AliPMDv1.h"
44 #include "START/AliSTARTv1.h"
45 #include "CRT/AliCRTv1.h"
48 //--- Heavy Flavour Production ---
51 kCharmPbPb5500, kCharmpPb8800, kCharmpp14000,
52 kD0PbPb5500, kD0pPb8800, kD0pp14000,
53 kDPlusPbPb5500, kDPluspPb8800, kDPluspp14000,
54 kBeautyPbPb5500, kBeautypPb8800, kBeautypp14000
59 kNature, kHadr, kSemiEl, kSemiMu
61 //--- Rapidity Cut ---
64 kFull, kBarrel, kMuonArm
66 //--- Magnetic Field ---
72 AliGenPythia *PythiaHVQ(ProcessHvFl_t proc);
75 // This part for configuration
76 static ProcessHvFl_t procHvFl = kCharmPbPb5500;
77 static DecayHvFl_t decHvFl = kNature;
78 static YCut_t ycut = kFull;
79 static Mag_t mag = k4kG;
80 // nEvts = -1 : you get 1 QQbar pair and all the fragmentation and
82 // nEvts = N>0 : you get N charm / beauty Hadrons
84 // stars = kTRUE : all heavy resonances and their decay stored
85 // = kFALSE: only final heavy hadrons and their decays stored
90 static TString comment;
95 //========================//
96 // Set Random Number seed //
97 //========================//
99 UInt_t curtime=dt.Get();
100 UInt_t procid=gSystem->GetPid();
101 UInt_t seed=curtime-procid;
103 // gRandom->SetSeed(seed);
104 // cerr<<"Seed for random number generation= "<<seed<<endl;
105 gRandom->SetSeed(12345);
108 // libraries required by geant321
109 #if defined(__CINT__)
110 gSystem->Load("libgeant321");
113 new TGeant3("C++ Interface to Geant3");
115 //=======================================================================
116 // Create the output file
119 AliRunLoader* rl=0x0;
121 cout<<"Config.C: Creating Run Loader ..."<<endl;
122 rl = AliRunLoader::Open("galice.root",
123 AliConfig::GetDefaultEventFolderName(),
127 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
130 rl->SetCompressionLevel(2);
131 rl->SetNumberOfEventsPerFile(3);
132 gAlice->SetRunLoader(rl);
135 //=======================================================================
136 // ************* STEERING parameters FOR ALICE SIMULATION **************
137 // --- Specify event type to be tracked through the ALICE setup
138 // --- All positions are in cm, angles in degrees, and P and E in GeV
141 gMC->SetProcess("DCAY",1);
142 gMC->SetProcess("PAIR",1);
143 gMC->SetProcess("COMP",1);
144 gMC->SetProcess("PHOT",1);
145 gMC->SetProcess("PFIS",0);
146 gMC->SetProcess("DRAY",0);
147 gMC->SetProcess("ANNI",1);
148 gMC->SetProcess("BREM",1);
149 gMC->SetProcess("MUNU",1);
150 gMC->SetProcess("CKOV",1);
151 gMC->SetProcess("HADR",1);
152 gMC->SetProcess("LOSS",2);
153 gMC->SetProcess("MULS",1);
154 gMC->SetProcess("RAYL",1);
156 Float_t cut = 1.e-3; // 1MeV cut by default
157 Float_t tofmax = 1.e10;
159 gMC->SetCut("CUTGAM", cut);
160 gMC->SetCut("CUTELE", cut);
161 gMC->SetCut("CUTNEU", cut);
162 gMC->SetCut("CUTHAD", cut);
163 gMC->SetCut("CUTMUO", cut);
164 gMC->SetCut("BCUTE", cut);
165 gMC->SetCut("BCUTM", cut);
166 gMC->SetCut("DCUTE", cut);
167 gMC->SetCut("DCUTM", cut);
168 gMC->SetCut("PPCUTM", cut);
169 gMC->SetCut("TOFMAX", tofmax);
174 // Set External decayer //
175 //======================//
176 TVirtualMCDecayer* decayer = new AliDecayerPythia();
181 decayer->SetForceDecay(kAll);
184 decayer->SetForceDecay(kHadronicD);
187 decayer->SetForceDecay(kSemiElectronic);
190 decayer->SetForceDecay(kSemiMuonic);
194 gMC->SetExternalDecayer(decayer);
196 //=========================//
197 // Generator Configuration //
198 //=========================//
199 AliGenPythia *pythia = PythiaHVQ(procHvFl);
201 pythia->SetFeedDownHigherFamily(kFALSE);
202 // Stack filling option
203 if(!stars) pythia->SetStackFillOpt(AliGenPythia::kParentSelection);
205 if(nEvts>0) pythia->SetCountMode(AliGenPythia::kCountParents);
210 pythia->SetForceDecay(kAll);
213 pythia->SetForceDecay(kHadronicD);
216 pythia->SetForceDecay(kSemiElectronic);
219 pythia->SetForceDecay(kSemiMuonic);
224 pythia->SetMomentumRange(0,99999999);
225 pythia->SetPhiRange(0., 360.);
226 pythia->SetThetaRange(0,180);
229 pythia->SetYRange(-999,999);
232 pythia->SetYRange(-2,2);
235 pythia->SetYRange(1,6);
241 pythia->SetOrigin(0, 0, 0); // vertex position
242 pythia->SetSigma(0, 0, 5.3); // Sigma in (X,Y,Z) (cm) on IP position
243 pythia->SetCutVertexZ(1.); // Truncate at 1 sigma
244 pythia->SetVertexSmear(kPerEvent);
248 pythia->SetTrackingFlag(0);
249 // Specify GEANT tracking limits (Rmax, Zmax)
250 //gAlice->TrackingLimits(90.,1.0e10);
258 comment = comment.Append(" | L3 field 0.2 T");
259 } else if (mag == k4kG) {
260 comment = comment.Append(" | L3 field 0.4 T");
261 } else if (mag == k5kG) {
262 comment = comment.Append(" | L3 field 0.5 T");
264 printf("\n \n Comment: %s \n \n", comment.Data());
266 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., mag);
268 gAlice->SetField(field);
271 // By default all ALICE is switched off
292 //=================== Alice BODY parameters =============================
293 AliBODY *BODY = new AliBODY("BODY","Alice envelop");
296 //=================== MAG parameters ============================
297 // --- Start with Magnet since detector layouts may be depending ---
298 // --- on the selected Magnet dimensions ---
299 AliMAG *MAG = new AliMAG("MAG","Magnet");
304 //=================== ABSO parameters ============================
305 AliABSO *ABSO = new AliABSOv0("ABSO","Muon Absorber");
309 //=================== DIPO parameters ============================
311 AliDIPO *DIPO = new AliDIPOv2("DIPO","Dipole version 2");
315 //=================== HALL parameters ============================
317 AliHALL *HALL = new AliHALL("HALL","Alice Hall");
322 //=================== FRAME parameters ============================
324 AliFRAME *FRAME = new AliFRAMEv2("FRAME","Space Frame");
329 //=================== SHIL parameters ============================
331 AliSHIL *SHIL = new AliSHILv2("SHIL","Shielding");
336 //=================== PIPE parameters ============================
338 AliPIPE *PIPE = new AliPIPEv0("PIPE","Beam Pipe");
344 //=================== ITS parameters ============================
346 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
347 // almost all other detectors. This involves the fact that the ITS geometry
348 // still has several options to be followed in parallel in order to determine
349 // the best set-up which minimizes the induced background. All the geometries
350 // available to date are described in the following. Read carefully the comments
351 // and use the default version (the only one uncommented) unless you are making
352 // comparisons and you know what you are doing. In this case just uncomment the
353 // ITS geometry you want to use and run Aliroot.
355 // Detailed geometries:
358 //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services");
360 //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
362 AliITSvPPRasymmFMD *ITS = new AliITSvPPRasymmFMD("ITS","New ITS PPR detailed version with asymmetric services");
363 ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
364 ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
365 ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer
366 ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [150,300]
367 ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [150,300]
368 ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [100,300]
369 ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [100,300]
370 ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
371 ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
373 //AliITSvPPRsymm *ITS = new AliITSvPPRsymm("ITS","New ITS PPR detailed version with symmetric services");
374 //ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
375 //ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
376 //ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRsymm2.det"); // don't touch this parameter if you're not an ITS developer
377 //ITS->SetThicknessDet1(300.); // detector thickness on layer 1 must be in the range [150,300]
378 //ITS->SetThicknessDet2(300.); // detector thickness on layer 2 must be in the range [150,300]
379 //ITS->SetThicknessChip1(300.); // chip thickness on layer 1 must be in the range [100,300]
380 //ITS->SetThicknessChip2(300.); // chip thickness on layer 2 must be in the range [100,300]
381 //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
382 //ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
385 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
386 // for reconstruction !):
389 //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
390 //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
391 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
393 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
394 //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
395 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
399 // Geant3 <-> EUCLID conversion
400 // ============================
402 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
403 // media to two ASCII files (called by default ITSgeometry.euc and
404 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
405 // The default (=0) means that you dont want to use this facility.
412 //============================ TPC parameters ================================
413 // --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
414 // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
415 // --- sectors are specified, any value other than that requires at least one
416 // --- sector (lower or upper)to be specified!
417 // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
418 // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
419 // --- SecLows - number of lower sectors specified (up to 6)
420 // --- SecUps - number of upper sectors specified (up to 12)
421 // --- Sens - sensitive strips for the Slow Simulator !!!
422 // --- This does NOT work if all S or L-sectors are specified, i.e.
423 // --- if SecAL or SecAU < 0
426 //-----------------------------------------------------------------------------
428 // gROOT->LoadMacro("SetTPCParam.C");
429 // AliTPCParam *param = SetTPCParam();
430 AliTPC *TPC = new AliTPCv2("TPC","Default");
431 // All sectors included
439 //=================== TOF parameters ============================
440 AliTOF *TOF = new AliTOFv4T0("TOF","normal TOF");
444 //=================== RICH parameters ===========================
445 AliRICH *RICH = new AliRICHv1("RICH","normal RICH");
451 //=================== ZDC parameters ============================
453 AliZDC *ZDC = new AliZDCv1("ZDC","normal ZDC");
457 //=================== CRT parameters ============================
459 AliCRT *CRT = new AliCRTv1("CRT","normal CRT");
463 //=================== TRD parameters ============================
465 AliTRD *TRD = new AliTRDv1("TRD","TRD slow simulator");
467 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
470 // With hole in front of PHOS
472 // With hole in front of RICH
475 AliTRDsim *TRDsim = TRD->CreateTR();
479 //=================== FMD parameters ============================
481 AliFMD *FMD = new AliFMDv0("FMD","normal FMD");
485 //=================== MUON parameters ===========================
486 AliMUON *MUON = new AliMUONv1("MUON","default");
489 //=================== PHOS parameters ===========================
492 AliPHOS *PHOS = new AliPHOSv1("PHOS","GPS2");
496 //=================== CRT parameters ===========================
499 AliCRT *CRT = new AliCRTv1("CRT","Normal CRTGPS2");
504 //=================== PMD parameters ============================
506 AliPMD *PMD = new AliPMDv1("PMD","normal PMD");
507 PMD->SetPAR(1., 1., 0.8, 0.02);
508 PMD->SetIN(6., 18., -580., 27., 27.);
509 PMD->SetGEO(0.0, 0.2, 4.);
510 PMD->SetPadSize(0.8, 1.0, 1.0, 1.5);
515 //=================== START parameters ============================
516 AliSTART *START = new AliSTARTv1("START","START Detector");
524 AliGenPythia *PythiaHVQ(ProcessHvFl_t proc) {
526 AliGenPythia * gener = 0x0;
530 comment = comment.Append(" Charm in Pb-Pb at 5.5 TeV");
531 gener = new AliGenPythia(nEvts);
532 gener->SetProcess(kPyCharmPbPbMNR);
533 gener->SetStrucFunc(kCTEQ4L);
534 gener->SetPtHard(2.1,-1.0);
535 gener->SetEnergyCMS(5500.);
536 gener->SetNuclei(208,208);
539 comment = comment.Append(" Charm in p-Pb at 8.8 TeV");
540 gener = new AliGenPythia(nEvts);
541 gener->SetProcess(kPyCharmpPbMNR);
542 gener->SetStrucFunc(kCTEQ4L);
543 gener->SetPtHard(2.1,-1.0);
544 gener->SetEnergyCMS(8800.);
545 gener->SetProjectile("P",1,1);
546 gener->SetTarget("Pb",208,82);
549 comment = comment.Append(" Charm in pp at 14 TeV");
550 gener = new AliGenPythia(nEvts);
551 gener->SetProcess(kPyCharmppMNR);
552 gener->SetStrucFunc(kCTEQ4L);
553 gener->SetPtHard(2.1,-1.0);
554 gener->SetEnergyCMS(14000.);
557 comment = comment.Append(" D0 in Pb-Pb at 5.5 TeV");
558 gener = new AliGenPythia(nEvts);
559 gener->SetProcess(kPyD0PbPbMNR);
560 gener->SetStrucFunc(kCTEQ4L);
561 gener->SetPtHard(2.1,-1.0);
562 gener->SetEnergyCMS(5500.);
563 gener->SetNuclei(208,208);
566 comment = comment.Append(" D0 in p-Pb at 8.8 TeV");
567 gener = new AliGenPythia(nEvts);
568 gener->SetProcess(kPyD0pPbMNR);
569 gener->SetStrucFunc(kCTEQ4L);
570 gener->SetPtHard(2.1,-1.0);
571 gener->SetEnergyCMS(8800.);
572 gener->SetProjectile("P",1,1);
573 gener->SetTarget("Pb",208,82);
576 comment = comment.Append(" D0 in pp at 14 TeV");
577 gener = new AliGenPythia(nEvts);
578 gener->SetProcess(kPyD0ppMNR);
579 gener->SetStrucFunc(kCTEQ4L);
580 gener->SetPtHard(2.1,-1.0);
581 gener->SetEnergyCMS(14000.);
584 comment = comment.Append(" DPlus in Pb-Pb at 5.5 TeV");
585 gener = new AliGenPythia(nEvts);
586 gener->SetProcess(kPyDPlusPbPbMNR);
587 gener->SetStrucFunc(kCTEQ4L);
588 gener->SetPtHard(2.1,-1.0);
589 gener->SetEnergyCMS(5500.);
590 gener->SetNuclei(208,208);
593 comment = comment.Append(" DPlus in p-Pb at 8.8 TeV");
594 gener = new AliGenPythia(nEvts);
595 gener->SetProcess(kPyDPluspPbMNR);
596 gener->SetStrucFunc(kCTEQ4L);
597 gener->SetPtHard(2.1,-1.0);
598 gener->SetEnergyCMS(8800.);
599 gener->SetProjectile("P",1,1);
600 gener->SetTarget("Pb",208,82);
603 comment = comment.Append(" DPlus in pp at 14 TeV");
604 gener = new AliGenPythia(nEvts);
605 gener->SetProcess(kPyDPlusppMNR);
606 gener->SetStrucFunc(kCTEQ4L);
607 gener->SetPtHard(2.1,-1.0);
608 gener->SetEnergyCMS(14000.);
610 case kBeautyPbPb5500:
611 comment = comment.Append(" Beauty in Pb-Pb at 5.5 TeV");
612 gener = new AliGenPythia(nEvts);
613 gener->SetProcess(kPyBeautyPbPbMNR);
614 gener->SetStrucFunc(kCTEQ4L);
615 gener->SetPtHard(2.75,-1.0);
616 gener->SetEnergyCMS(5500.);
617 gener->SetNuclei(208,208);
620 comment = comment.Append(" Beauty in p-Pb at 8.8 TeV");
621 gener = new AliGenPythia(nEvts);
622 gener->SetProcess(kPyBeautypPbMNR);
623 gener->SetStrucFunc(kCTEQ4L);
624 gener->SetPtHard(2.75,-1.0);
625 gener->SetEnergyCMS(8800.);
626 gener->SetProjectile("P",1,1);
627 gener->SetTarget("Pb",208,82);
630 comment = comment.Append(" Beauty in pp at 14 TeV");
631 gener = new AliGenPythia(nEvts);
632 gener->SetProcess(kPyBeautyppMNR);
633 gener->SetStrucFunc(kCTEQ4L);
634 gener->SetPtHard(2.75,-1.0);
635 gener->SetEnergyCMS(14000.);