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 // - "Charm and beauty production at the LHC", ALICE note submitted //
10 // and available at: http://www.pd.infn.it/alipd/Docs.html //
11 // - Current version of the ALICE PPR (Chapter 6.5) //
12 // at: http://alice.web.cern.ch/Alice/ppr/web/CurrentVersion.html //
13 //*******************************************************************//
15 //--- Heavy Flavour Production ---
18 kCharmPbPb5500, kCharmpPb8800, kCharmpp14000,
19 kD0PbPb5500, kD0pPb8800, kD0pp14000,
20 kBeautyPbPb5500, kBeautypPb8800, kBeautypp14000
25 kNature, kHadr, kSemiEl, kSemiMu
27 //--- Rapidity Cut ---
30 kFull, kBarrel, kMuonArm
32 //--- Magnetic Field ---
38 // This part for configuration
39 static ProcessHvFl_t procHvFl = kCharmPbPb5500;
40 static DecayHvFl_t decHvFl = kNature;
41 static YCut_t ycut = kFull;
42 static Mag_t mag = k4kG;
43 // nEvts = -1 : you get 1 QQbar pair and all the fragmentation and
45 // nEvts = N>0 : you get N charm / beauty Hadrons
47 // stars = kTRUE : all heavy resonances and their decay stored
48 // = kFALSE: only final heavy hadrons and their decays stored
53 static TString comment;
58 //========================//
59 // Set Random Number seed //
60 //========================//
62 UInt_t curtime=dt.Get();
63 UInt_t procid=gSystem->GetPid();
64 UInt_t seed=curtime-procid;
66 gRandom->SetSeed(12345);
67 cerr<<"Seed for random number generation= "<<seed<<endl;
69 // libraries required by geant321
70 gSystem->Load("libgeant321");
72 new TGeant3("C++ Interface to Geant3");
74 //=======================================================================
75 // Create the output file
76 TFile *rootfile = new TFile("galice.root","recreate");
77 rootfile->SetCompressionLevel(2);
78 TGeant3 *geant3 = (TGeant3*)gMC;
81 //=======================================================================
82 // ******* GEANT STEERING parameters FOR ALICE SIMULATION *******
83 geant3->SetTRIG(1); //Number of events to be processed
84 geant3->SetSWIT(4,10);
85 geant3->SetDEBU(0,0,1);
86 //geant3->SetSWIT(2,2);
97 geant3->SetHADR(1); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
101 geant3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0)
102 geant3->SetABAN(0); //Restore 3.16 behaviour for abandoned tracks
103 geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2)
104 geant3->SetERAN(5.e-7);
106 Float_t cut = 1.e-3; // 1MeV cut by default
107 Float_t tofmax = 1.e10;
108 // GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
109 geant3->SetCUTS(cut,cut, cut, cut, cut, cut, cut, cut, cut, cut, tofmax);
111 //=======================================================================
112 // ************* STEERING parameters FOR ALICE SIMULATION **************
113 // --- Specify event type to be tracked through the ALICE setup
114 // --- All positions are in cm, angles in degrees, and P and E in GeV
115 //======================//
116 // Set External decayer //
117 //======================//
118 TVirtualMCDecayer* decayer = new AliDecayerPythia();
123 decayer->SetForceDecay(kAll);
126 decayer->SetForceDecay(kHadronicD);
129 decayer->SetForceDecay(kSemiElectronic);
132 decayer->SetForceDecay(kSemiMuonic);
136 gMC->SetExternalDecayer(decayer);
138 //=========================//
139 // Generator Configuration //
140 //=========================//
141 AliGenPythia *pythia = PythiaHVQ(procHvFl);
143 pythia->SetFeedDownHigherFamily(kFALSE);
144 // Stack filling option
145 if(!stars) pythia->SetStackFillOpt(AliGenPythia::kParentSelection);
147 if(nEvts>0) pythia->SetCountMode(AliGenPythia::kCountParents);
152 pythia->SetForceDecay(kAll);
155 pythia->SetForceDecay(kHadronicD);
158 pythia->SetForceDecay(kSemiElectronic);
161 pythia->SetForceDecay(kSemiMuonic);
166 pythia->SetMomentumRange(0,99999999);
167 pythia->SetPhiRange(-180.,180.);
168 pythia->SetThetaRange(0,180);
171 pythia->SetYRange(-999,999);
174 pythia->SetYRange(-2,2);
177 pythia->SetYRange(1,6);
183 pythia->SetOrigin(0, 0, 0); // vertex position
184 pythia->SetSigma(0, 0, 5.3); // Sigma in (X,Y,Z) (cm) on IP position
185 pythia->SetCutVertexZ(1.); // Truncate at 1 sigma
186 pythia->SetVertexSmear(kPerEvent);
190 pythia->SetTrackingFlag(0);
191 // Specify GEANT tracking limits (Rmax, Zmax)
192 //gAlice->TrackingLimits(90.,1.0e10);
200 comment = comment.Append(" | L3 field 0.2 T");
201 } else if (mag == k4kG) {
202 comment = comment.Append(" | L3 field 0.4 T");
203 } else if (mag == k5kG) {
204 comment = comment.Append(" | L3 field 0.5 T");
206 printf("\n \n Comment: %s \n \n", (char*) comment);
208 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., mag);
210 gAlice->SetField(field);
213 // By default all ALICE is switched off
234 //=================== Alice BODY parameters =============================
235 AliBODY *BODY = new AliBODY("BODY","Alice envelop");
238 //=================== MAG parameters ============================
239 // --- Start with Magnet since detector layouts may be depending ---
240 // --- on the selected Magnet dimensions ---
241 AliMAG *MAG = new AliMAG("MAG","Magnet");
246 //=================== ABSO parameters ============================
247 AliABSO *ABSO = new AliABSOv0("ABSO","Muon Absorber");
251 //=================== DIPO parameters ============================
253 AliDIPO *DIPO = new AliDIPOv2("DIPO","Dipole version 2");
257 //=================== HALL parameters ============================
259 AliHALL *HALL = new AliHALL("HALL","Alice Hall");
264 //=================== FRAME parameters ============================
266 AliFRAME *FRAME = new AliFRAMEv2("FRAME","Space Frame");
271 //=================== SHIL parameters ============================
273 AliSHIL *SHIL = new AliSHILv2("SHIL","Shielding");
278 //=================== PIPE parameters ============================
280 AliPIPE *PIPE = new AliPIPEv0("PIPE","Beam Pipe");
286 //=================== ITS parameters ============================
288 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
289 // almost all other detectors. This involves the fact that the ITS geometry
290 // still has several options to be followed in parallel in order to determine
291 // the best set-up which minimizes the induced background. All the geometries
292 // available to date are described in the following. Read carefully the comments
293 // and use the default version (the only one uncommented) unless you are making
294 // comparisons and you know what you are doing. In this case just uncomment the
295 // ITS geometry you want to use and run Aliroot.
297 // Detailed geometries:
300 //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services");
302 //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
304 AliITSvPPRasymm *ITS = new AliITSvPPRasymm("ITS","New ITS PPR detailed version with asymmetric services");
305 ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
306 ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
307 ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer
308 ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [150,300]
309 ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [150,300]
310 ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [100,300]
311 ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [100,300]
312 ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
313 ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
315 //AliITSvPPRsymm *ITS = new AliITSvPPRsymm("ITS","New ITS PPR detailed version with symmetric services");
316 //ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
317 //ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
318 //ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRsymm2.det"); // don't touch this parameter if you're not an ITS developer
319 //ITS->SetThicknessDet1(300.); // detector thickness on layer 1 must be in the range [150,300]
320 //ITS->SetThicknessDet2(300.); // detector thickness on layer 2 must be in the range [150,300]
321 //ITS->SetThicknessChip1(300.); // chip thickness on layer 1 must be in the range [100,300]
322 //ITS->SetThicknessChip2(300.); // chip thickness on layer 2 must be in the range [100,300]
323 //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
324 //ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
327 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
328 // for reconstruction !):
331 //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
332 //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
333 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
335 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
336 //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
337 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
341 // Geant3 <-> EUCLID conversion
342 // ============================
344 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
345 // media to two ASCII files (called by default ITSgeometry.euc and
346 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
347 // The default (=0) means that you dont want to use this facility.
354 //============================ TPC parameters ================================
355 // --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
356 // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
357 // --- sectors are specified, any value other than that requires at least one
358 // --- sector (lower or upper)to be specified!
359 // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
360 // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
361 // --- SecLows - number of lower sectors specified (up to 6)
362 // --- SecUps - number of upper sectors specified (up to 12)
363 // --- Sens - sensitive strips for the Slow Simulator !!!
364 // --- This does NOT work if all S or L-sectors are specified, i.e.
365 // --- if SecAL or SecAU < 0
368 //-----------------------------------------------------------------------------
370 // gROOT->LoadMacro("SetTPCParam.C");
371 // AliTPCParam *param = SetTPCParam();
372 AliTPC *TPC = new AliTPCv2("TPC","Default");
373 // All sectors included
381 //=================== TOF parameters ============================
382 AliTOF *TOF = new AliTOFv2("TOF","normal TOF");
386 //=================== RICH parameters ===========================
387 AliRICH *RICH = new AliRICHv1("RICH","normal RICH");
393 //=================== ZDC parameters ============================
395 AliZDC *ZDC = new AliZDCv1("ZDC","normal ZDC");
399 //=================== CRT parameters ============================
401 AliCRT *CRT = new AliCRTv1("CRT","normal CRT");
405 //=================== TRD parameters ============================
407 AliTRD *TRD = new AliTRDv1("TRD","TRD slow simulator");
409 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
412 // With hole in front of PHOS
414 // With hole in front of RICH
417 AliTRDsim *TRDsim = TRD->CreateTR();
421 //=================== FMD parameters ============================
423 AliFMD *FMD = new AliFMDv0("FMD","normal FMD");
427 //=================== MUON parameters ===========================
428 AliMUON *MUON = new AliMUONv1("MUON","default");
431 //=================== PHOS parameters ===========================
434 AliPHOS *PHOS = new AliPHOSv1("PHOS","GPS2");
438 //=================== CRT parameters ===========================
441 AliCRT *CRT = new AliCRTv1("CRT","Normal CRTGPS2");
446 //=================== PMD parameters ============================
448 AliPMD *PMD = new AliPMDv1("PMD","normal PMD");
449 PMD->SetPAR(1., 1., 0.8, 0.02);
450 PMD->SetIN(6., 18., -580., 27., 27.);
451 PMD->SetGEO(0.0, 0.2, 4.);
452 PMD->SetPadSize(0.8, 1.0, 1.0, 1.5);
457 //=================== START parameters ============================
458 AliSTART *START = new AliSTARTv1("START","START Detector");
466 AliGenPythia *PythiaHVQ(ProcessHvFl_t proc) {
470 comment = comment.Append(" Charm in Pb-Pb at 5.5 TeV");
471 AliGenPythia *gener = new AliGenPythia(nEvts);
472 gener->SetProcess(kPyCharmPbPbMNR);
473 gener->SetStrucFunc(kCTEQ4L);
474 gener->SetPtHard(2.1,-1.0);
475 gener->SetEnergyCMS(5500.);
476 gener->SetNuclei(208,208);
479 comment = comment.Append(" Charm in p-Pb at 8.8 TeV");
480 AliGenPythia *gener = new AliGenPythia(nEvts);
481 gener->SetProcess(kPyCharmpPbMNR);
482 gener->SetStrucFunc(kCTEQ4L);
483 gener->SetPtHard(2.1,-1.0);
484 gener->SetEnergyCMS(8800.);
485 gener->SetProjectile("P",1,1);
486 gener->SetTarget("Pb",208,82);
489 comment = comment.Append(" Charm in pp at 14 TeV");
490 AliGenPythia *gener = new AliGenPythia(nEvts);
491 gener->SetProcess(kPyCharmppMNR);
492 gener->SetStrucFunc(kCTEQ4L);
493 gener->SetPtHard(2.1,-1.0);
494 gener->SetEnergyCMS(14000.);
497 comment = comment.Append(" D0 in Pb-Pb at 5.5 TeV");
498 AliGenPythia *gener = new AliGenPythia(nEvts);
499 gener->SetProcess(kPyD0PbPbMNR);
500 gener->SetStrucFunc(kCTEQ4L);
501 gener->SetPtHard(2.1,-1.0);
502 gener->SetEnergyCMS(5500.);
503 gener->SetNuclei(208,208);
506 comment = comment.Append(" D0 in p-Pb at 8.8 TeV");
507 AliGenPythia *gener = new AliGenPythia(nEvts);
508 gener->SetProcess(kPyD0pPbMNR);
509 gener->SetStrucFunc(kCTEQ4L);
510 gener->SetPtHard(2.1,-1.0);
511 gener->SetEnergyCMS(8800.);
512 gener->SetProjectile("P",1,1);
513 gener->SetTarget("Pb",208,82);
516 comment = comment.Append(" D0 in pp at 14 TeV");
517 AliGenPythia *gener = new AliGenPythia(nEvts);
518 gener->SetProcess(kPyD0ppMNR);
519 gener->SetStrucFunc(kCTEQ4L);
520 gener->SetPtHard(2.1,-1.0);
521 gener->SetEnergyCMS(14000.);
523 case kBeautyPbPb5500:
524 comment = comment.Append(" Beauty in Pb-Pb at 5.5 TeV");
525 AliGenPythia *gener = new AliGenPythia(nEvts);
526 gener->SetProcess(kPyBeautyPbPbMNR);
527 gener->SetStrucFunc(kCTEQ4L);
528 gener->SetPtHard(2.75,-1.0);
529 gener->SetEnergyCMS(5500.);
530 gener->SetNuclei(208,208);
533 comment = comment.Append(" Beauty in p-Pb at 8.8 TeV");
534 AliGenPythia *gener = new AliGenPythia(nEvts);
535 gener->SetProcess(kPyBeautypPbMNR);
536 gener->SetStrucFunc(kCTEQ4L);
537 gener->SetPtHard(2.75,-1.0);
538 gener->SetEnergyCMS(8800.);
539 gener->SetProjectile("P",1,1);
540 gener->SetTarget("Pb",208,82);
543 comment = comment.Append(" Beauty in pp at 14 TeV");
544 AliGenPythia *gener = new AliGenPythia(nEvts);
545 gener->SetProcess(kPyBeautyppMNR);
546 gener->SetStrucFunc(kCTEQ4L);
547 gener->SetPtHard(2.75,-1.0);
548 gener->SetEnergyCMS(14000.);