4 kParam_8000, kParam_4000, kParam_2000,
5 kHijing_cent1, kHijing_cent2,
6 kHijing_per1, kHijing_per2, kHijing_per3, kHijing_per4, kHijing_per5,
7 kHijing_jj25, kHijing_jj50, kHijing_jj75, kHijing_jj100, kHijing_jj125,
8 kHijing_gj25, kHijing_gj50, kHijing_gj75, kHijing_gj100, kHijing_gj125
18 kGluonRadiation, kNoGluonRadiation
22 // This part for configuration
23 static PprRun_t run = kPythia;
24 static PprGeo_t geo = kNoHoles;
25 static PprRad_t rad = kGluonRadiation;
27 static TString comment;
36 // Switch on Transition adiation simulation. 6/12/00 18:00
37 // iZDC=1 7/12/00 09:00
38 // ThetaRange is (0., 180.). It was (0.28,179.72) 7/12/00 09:00
39 // Theta range given through pseudorapidity limits 22/6/2001
41 // Set Random Number seed
42 // gRandom->SetSeed(12345);
47 // TEMPORARY TO BE ELIMINATED WHEN RUNNING WITH ALIEN
49 UInt_t curtime=dt.Get();
50 UInt_t procid=gSystem->GetPid();
51 UInt_t seed=curtime-procid;
53 gRandom->SetSeed(seed);
54 cerr<<"Seed for random number generation= "<<seed<<endl;
58 // libraries required by geant321
59 gSystem->Load("libgeant321");
61 new TGeant3("C++ Interface to Geant3");
63 if (!gSystem->Getenv("CONFIG_FILE"))
65 TFile *rootfile = new TFile("galice.root", "recreate");
67 rootfile->SetCompressionLevel(2);
70 TGeant3 *geant3 = (TGeant3 *) gMC;
73 // Set External decayer
74 AliDecayer *decayer = new AliDecayerPythia();
76 decayer->SetForceDecay(kAll);
78 gMC->SetExternalDecayer(decayer);
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;
109 // GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
110 geant3->SetCUTS(cut, cut, cut, cut, cut, cut, cut, cut, cut, cut,
113 //=======================================================================
114 // ************* STEERING parameters FOR ALICE SIMULATION **************
115 // --- Specify event type to be tracked through the ALICE setup
116 // --- All positions are in cm, angles in degrees, and P and E in GeV
119 // Generator Configuration
121 AliGenerator* gener = GeneratorFactory(run);
122 gener->SetOrigin(0, 0, 0); // vertex position
123 gener->SetSigma(0, 0, 5.3); // Sigma in (X,Y,Z) (cm) on IP position
124 gener->SetCutVertexZ(1.); // Truncate at 1 sigma
125 gener->SetVertexSmear(kPerEvent);
126 gener->SetTrackingFlag(1);
129 if (rad == kGluonRadiation)
131 comment = comment.Append(" | Gluon Radiation On");
134 comment = comment.Append(" | Gluon Radiation Off");
139 comment = comment.Append(" | Holes for PHOS/RICH");
142 comment = comment.Append(" | No holes for PHOS/RICH");
145 printf("\n \n Comment: %s \n \n", (char*) comment);
150 AliMagFCM* field = new AliMagFCM(
151 "Map2","$(ALICE_ROOT)/data/field01.dat", 2, 1., 10.);
152 field->SetSolenoidField(4.);
153 gAlice->SetField(field);
178 //=================== Alice BODY parameters =============================
179 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
184 //=================== MAG parameters ============================
185 // --- Start with Magnet since detector layouts may be depending ---
186 // --- on the selected Magnet dimensions ---
187 AliMAG *MAG = new AliMAG("MAG", "Magnet");
193 //=================== ABSO parameters ============================
194 AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
199 //=================== DIPO parameters ============================
201 AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
206 //=================== HALL parameters ============================
208 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
214 //=================== FRAME parameters ============================
216 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
226 //=================== SHIL parameters ============================
228 AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding");
234 //=================== PIPE parameters ============================
236 AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
241 //=================== ITS parameters ============================
243 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
244 // almost all other detectors. This involves the fact that the ITS geometry
245 // still has several options to be followed in parallel in order to determine
246 // the best set-up which minimizes the induced background. All the geometries
247 // available to date are described in the following. Read carefully the comments
248 // and use the default version (the only one uncommented) unless you are making
249 // comparisons and you know what you are doing. In this case just uncomment the
250 // ITS geometry you want to use and run Aliroot.
252 // Detailed geometries:
255 //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services");
257 //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
259 AliITSvPPRasymm *ITS = new AliITSvPPRasymm("ITS","New ITS PPR detailed version with asymmetric services");
260 ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
261 ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
262 // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer
263 ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
264 ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
265 ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
266 ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
267 ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
268 ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
270 //AliITSvPPRsymm *ITS = new AliITSvPPRsymm("ITS","New ITS PPR detailed version with symmetric services");
271 //ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
272 //ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
273 //ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRsymm2.det"); // don't touch this parameter if you're not an ITS developer
274 //ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
275 //ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
276 //ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
277 //ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
278 //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
279 //ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
282 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
283 // for reconstruction !):
286 //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
287 //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
288 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
290 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
291 //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
292 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
296 // Geant3 <-> EUCLID conversion
297 // ============================
299 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
300 // media to two ASCII files (called by default ITSgeometry.euc and
301 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
302 // The default (=0) means that you dont want to use this facility.
310 //============================ TPC parameters ================================
311 // --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
312 // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
313 // --- sectors are specified, any value other than that requires at least one
314 // --- sector (lower or upper)to be specified!
315 // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
316 // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
317 // --- SecLows - number of lower sectors specified (up to 6)
318 // --- SecUps - number of upper sectors specified (up to 12)
319 // --- Sens - sensitive strips for the Slow Simulator !!!
320 // --- This does NOT work if all S or L-sectors are specified, i.e.
321 // --- if SecAL or SecAU < 0
324 //-----------------------------------------------------------------------------
326 // gROOT->LoadMacro("SetTPCParam.C");
327 // AliTPCParam *param = SetTPCParam();
328 AliTPC *TPC = new AliTPCv2("TPC", "Default");
330 // All sectors included
338 //=================== TOF parameters ============================
339 AliTOF *TOF = new AliTOFv2FHoles("TOF", "TOF with Holes");
341 AliTOF *TOF = new AliTOFv4("TOF", "normal TOF");
347 //=================== RICH parameters ===========================
348 AliRICH *RICH = new AliRICHv1("RICH", "normal RICH");
355 //=================== ZDC parameters ============================
357 AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
362 //=================== CRT parameters ============================
364 AliCRT *CRT = new AliCRTv1("CRT", "normal CRT");
369 //=================== TRD parameters ============================
371 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
373 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
376 // With hole in front of PHOS
378 // With hole in front of RICH
382 AliTRDsim *TRDsim = TRD->CreateTR();
387 //=================== FMD parameters ============================
389 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
390 FMD->SetRingsSi1(256);
391 FMD->SetRingsSi2(64);
392 FMD->SetSectorsSi1(20);
393 FMD->SetSectorsSi2(24);
398 //=================== MUON parameters ===========================
400 AliMUON *MUON = new AliMUONv1("MUON", "default");
402 //=================== PHOS parameters ===========================
406 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
412 //=================== PMD parameters ============================
413 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
414 PMD->SetPAR(1., 1., 0.8, 0.02);
415 PMD->SetIN(6., 18., -580., 27., 27.);
416 PMD->SetGEO(0.0, 0.2, 4.);
417 PMD->SetPadSize(0.8, 1.0, 1.0, 1.5);
420 if (iEMCAL!=0 && iRICH==0)
422 //=================== START parameters ============================
423 AliEMCAL *EMCAL = new AliEMCALv1("EMCAL", "G56_2_55_19_104_14");
428 //=================== START parameters ============================
429 AliSTART *START = new AliSTARTv1("START", "START Detector");
435 Float_t EtaToTheta(Float_t arg){
436 return (180./TMath::Pi())*2.*atan(exp(-arg));
441 AliGenerator* GeneratorFactory(PprRun_t run) {
443 if (rad == kNoGluonRadiation) isw = 0;
448 comment = comment.Append(":HIJINGparam test 50 particles");
449 AliGenHIJINGpara *gener = new AliGenHIJINGpara(50);
450 gener->SetMomentumRange(0, 999999.);
451 gener->SetPhiRange(-180., 180.);
452 // Set pseudorapidity range from -8 to 8.
453 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
454 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
455 gener->SetThetaRange(thmin,thmax);
458 comment = comment.Append(":Pythia p-p @ 14 TeV");
459 AliGenPythia *gener = new AliGenPythia(-1);
460 gener->SetMomentumRange(0,999999);
461 gener->SetPhiRange(-180,180);
462 gener->SetThetaRange(0., 180.);
463 gener->SetYRange(-12,12);
464 gener->SetPtRange(0,1000);
465 gener->SetStrucFunc(kCTEQ_4L);
466 gener->SetProcess(kPyMb);
467 gener->SetEnergyCMS(14000.);
470 comment = comment.Append(":HIJINGparam N=8000");
471 AliGenHIJINGpara *gener = new AliGenHIJINGpara(86030);
472 gener->SetMomentumRange(0, 999999.);
473 gener->SetPhiRange(-180., 180.);
474 // Set pseudorapidity range from -8 to 8.
475 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
476 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
477 gener->SetThetaRange(thmin,thmax);
480 comment = comment.Append("HIJINGparam N=4000");
481 AliGenHIJINGpara *gener = new AliGenHIJINGpara(43015);
482 gener->SetMomentumRange(0, 999999.);
483 gener->SetPhiRange(-180., 180.);
484 // Set pseudorapidity range from -8 to 8.
485 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
486 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
487 gener->SetThetaRange(thmin,thmax);
490 comment = comment.Append("HIJINGparam N=2000");
491 AliGenHIJINGpara *gener = new AliGenHIJINGpara(21507);
492 gener->SetMomentumRange(0, 999999.);
493 gener->SetPhiRange(-180., 180.);
494 // Set pseudorapidity range from -8 to 8.
495 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
496 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
497 gener->SetThetaRange(thmin,thmax);
503 comment = comment.Append("HIJING cent1");
504 AliGenHijing *gener = HijingStandard();
505 // impact parameter range
506 gener->SetImpactParameterRange(0., 5.);
509 comment = comment.Append("HIJING cent2");
510 AliGenHijing *gener = HijingStandard();
511 // impact parameter range
512 gener->SetImpactParameterRange(0., 2.);
518 comment = comment.Append("HIJING per1");
519 AliGenHijing *gener = HijingStandard();
520 // impact parameter range
521 gener->SetImpactParameterRange(5., 8.6);
524 comment = comment.Append("HIJING per2");
525 AliGenHijing *gener = HijingStandard();
526 // impact parameter range
527 gener->SetImpactParameterRange(8.6, 11.2);
530 comment = comment.Append("HIJING per3");
531 AliGenHijing *gener = HijingStandard();
532 // impact parameter range
533 gener->SetImpactParameterRange(11.2, 13.2);
536 comment = comment.Append("HIJING per4");
537 AliGenHijing *gener = HijingStandard();
538 // impact parameter range
539 gener->SetImpactParameterRange(13.2, 15.);
542 comment = comment.Append("HIJING per5");
543 AliGenHijing *gener = HijingStandard();
544 // impact parameter range
545 gener->SetImpactParameterRange(15., 100.);
551 comment = comment.Append("HIJING Jet 25 GeV");
552 AliGenHijing *gener = HijingStandard();
553 // impact parameter range
554 gener->SetImpactParameterRange(0., 5.);
556 gener->SetTrigger(1);
557 gener->SetPtMinJet(25.);
558 gener->SetRadiation(isw);
561 comment = comment.Append("HIJING Jet 50 GeV");
562 AliGenHijing *gener = HijingStandard();
563 // impact parameter range
564 gener->SetImpactParameterRange(0., 5.);
566 gener->SetTrigger(1);
567 gener->SetPtMinJet(50.);
568 gener->SetRadiation(isw);
571 comment = comment.Append("HIJING Jet 75 GeV");
572 AliGenHijing *gener = HijingStandard();
573 // impact parameter range
574 gener->SetImpactParameterRange(0., 5.);
576 gener->SetTrigger(1);
577 gener->SetPtMinJet(75.);
578 gener->SetRadiation(isw);
581 comment = comment.Append("HIJING Jet 100 GeV");
582 AliGenHijing *gener = HijingStandard();
583 // impact parameter range
584 gener->SetImpactParameterRange(0., 5.);
586 gener->SetTrigger(1);
587 gener->SetPtMinJet(100.);
588 gener->SetRadiation(isw);
591 comment = comment.Append("HIJING Jet 125 GeV");
592 AliGenHijing *gener = HijingStandard();
593 // impact parameter range
594 gener->SetImpactParameterRange(0., 5.);
596 gener->SetTrigger(1);
597 gener->SetPtMinJet(125.);
598 gener->SetRadiation(isw);
604 comment = comment.Append("HIJING Gamma 25 GeV");
605 AliGenHijing *gener = HijingStandard();
606 // impact parameter range
607 gener->SetImpactParameterRange(0., 5.);
609 gener->SetTrigger(2);
610 gener->SetPtMinJet(25.);
611 gener->SetRadiation(isw);
614 comment = comment.Append("HIJING Gamma 50 GeV");
615 AliGenHijing *gener = HijingStandard();
616 // impact parameter range
617 gener->SetImpactParameterRange(0., 5.);
619 gener->SetTrigger(2);
620 gener->SetPtMinJet(50.);
621 gener->SetRadiation(isw);
624 comment = comment.Append("HIJING Gamma 75 GeV");
625 AliGenHijing *gener = HijingStandard();
626 // impact parameter range
627 gener->SetImpactParameterRange(0., 5.);
629 gener->SetTrigger(2);
630 gener->SetPtMinJet(75.);
631 gener->SetRadiation(isw);
634 comment = comment.Append("HIJING Gamma 100 GeV");
635 AliGenHijing *gener = HijingStandard();
636 // impact parameter range
637 gener->SetImpactParameterRange(0., 5.);
639 gener->SetTrigger(2);
640 gener->SetPtMinJet(100.);
641 gener->SetRadiation(isw);
644 comment = comment.Append("HIJING Gamma 125 GeV");
645 AliGenHijing *gener = HijingStandard();
646 // impact parameter range
647 gener->SetImpactParameterRange(0., 5.);
649 gener->SetTrigger(2);
650 gener->SetPtMinJet(125.);
651 gener->SetRadiation(isw);
657 AliGenHijing* HijingStandard()
659 AliGenHijing *gener = new AliGenHijing(-1);
660 // centre of mass energy
661 gener->SetEnergyCMS(5500.);
663 gener->SetReferenceFrame("CMS");
665 gener->SetProjectile("A", 208, 82);
666 gener->SetTarget ("A", 208, 82);
667 // tell hijing to keep the full parent child chain
668 gener->KeepFullEvent();
669 // enable jet quenching
670 gener->SetJetQuenching(1);
672 gener->SetShadowing(1);
673 // neutral pion and heavy particle decays switched off
674 gener->SetDecaysOff(1);
675 // Don't track spectators
676 gener->SetSpectators(0);
677 // kinematic selection
678 gener->SetSelectAll(0);