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
27 // This part for configuration
28 static PprRun_t run = test50;
29 static PprGeo_t geo = kHoles;
30 static PprRad_t rad = kGluonRadiation;
31 static PprMag_t mag = k4kG;
34 static TString comment;
42 // Switch on Transition adiation simulation. 6/12/00 18:00
43 // iZDC=1 7/12/00 09:00
44 // ThetaRange is (0., 180.). It was (0.28,179.72) 7/12/00 09:00
45 // Theta range given through pseudorapidity limits 22/6/2001
47 // Set Random Number seed
48 // gRandom->SetSeed(12345);
50 new AliGeant3("C++ Interface to Geant3");
52 if (!gSystem->Getenv("CONFIG_FILE"))
54 TFile *rootfile = new TFile("galice.root", "recreate");
56 rootfile->SetCompressionLevel(2);
59 TGeant3 *geant3 = (TGeant3 *) gMC;
62 // Set External decayer
63 AliDecayer *decayer = new AliDecayerPythia();
65 decayer->SetForceDecay(kAll);
67 gMC->SetExternalDecayer(decayer);
70 //=======================================================================
71 // ******* GEANT STEERING parameters FOR ALICE SIMULATION *******
72 geant3->SetTRIG(1); //Number of events to be processed
73 geant3->SetSWIT(4, 10);
74 geant3->SetDEBU(0, 0, 1);
75 //geant3->SetSWIT(2,2);
86 geant3->SetHADR(1); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
90 geant3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0)
91 geant3->SetABAN(0); //Restore 3.16 behaviour for abandoned tracks
92 geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2)
93 geant3->SetERAN(5.e-7);
95 Float_t cut = 1.e-3; // 1MeV cut by default
96 Float_t tofmax = 1.e10;
98 // GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
99 geant3->SetCUTS(cut, cut, cut, cut, cut, cut, cut, cut, cut, cut,
102 //=======================================================================
103 // ************* STEERING parameters FOR ALICE SIMULATION **************
104 // --- Specify event type to be tracked through the ALICE setup
105 // --- All positions are in cm, angles in degrees, and P and E in GeV
108 // Generator Configuration
110 AliGenerator* gener = GeneratorFactory(run);
111 gener->SetOrigin(0, 0, 0); // vertex position
112 gener->SetSigma(0, 0, 5.3); // Sigma in (X,Y,Z) (cm) on IP position
113 gener->SetCutVertexZ(1.); // Truncate at 1 sigma
114 gener->SetVertexSmear(kPerEvent);
115 gener->SetTrackingFlag(1);
119 comment = comment.Append(" | L3 field 0.2 T");
120 } else if (mag == k4kG) {
121 comment = comment.Append(" | L3 field 0.4 T");
122 } else if (mag == k5kG) {
123 comment = comment.Append(" | L3 field 0.5 T");
127 if (rad == kGluonRadiation)
129 comment = comment.Append(" | Gluon Radiation On");
132 comment = comment.Append(" | Gluon Radiation Off");
137 comment = comment.Append(" | Holes for PHOS/RICH");
140 comment = comment.Append(" | No holes for PHOS/RICH");
143 printf("\n \n Comment: %s \n \n", (char*) comment);
147 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., mag);
149 gAlice->SetField(field);
174 //=================== Alice BODY parameters =============================
175 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
180 //=================== MAG parameters ============================
181 // --- Start with Magnet since detector layouts may be depending ---
182 // --- on the selected Magnet dimensions ---
183 AliMAG *MAG = new AliMAG("MAG", "Magnet");
189 //=================== ABSO parameters ============================
190 AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
195 //=================== DIPO parameters ============================
197 AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
202 //=================== HALL parameters ============================
204 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
210 //=================== FRAME parameters ============================
212 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
222 //=================== SHIL parameters ============================
224 AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding Version 2");
230 //=================== PIPE parameters ============================
232 AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
237 //=================== ITS parameters ============================
239 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
240 // almost all other detectors. This involves the fact that the ITS geometry
241 // still has several options to be followed in parallel in order to determine
242 // the best set-up which minimizes the induced background. All the geometries
243 // available to date are described in the following. Read carefully the comments
244 // and use the default version (the only one uncommented) unless you are making
245 // comparisons and you know what you are doing. In this case just uncomment the
246 // ITS geometry you want to use and run Aliroot.
248 // Detailed geometries:
251 //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services");
253 //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
255 AliITSvPPRasymm *ITS = new AliITSvPPRasymm("ITS","New ITS PPR detailed version with asymmetric services");
256 ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
257 ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
258 // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer
259 ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
260 ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
261 ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
262 ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
263 ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
264 ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
266 //AliITSvPPRsymm *ITS = new AliITSvPPRsymm("ITS","New ITS PPR detailed version with symmetric services");
267 //ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
268 //ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
269 //ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRsymm2.det"); // don't touch this parameter if you're not an ITS developer
270 //ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
271 //ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
272 //ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
273 //ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
274 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
275 //ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
278 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
279 // for reconstruction !):
282 //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
283 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
284 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
286 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
287 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
288 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
292 // Geant3 <-> EUCLID conversion
293 // ============================
295 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
296 // media to two ASCII files (called by default ITSgeometry.euc and
297 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
298 // The default (=0) means that you dont want to use this facility.
305 //============================ TPC parameters ================================
306 // --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
307 // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
308 // --- sectors are specified, any value other than that requires at least one
309 // --- sector (lower or upper)to be specified!
310 // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
311 // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
312 // --- SecLows - number of lower sectors specified (up to 6)
313 // --- SecUps - number of upper sectors specified (up to 12)
314 // --- Sens - sensitive strips for the Slow Simulator !!!
315 // --- This does NOT work if all S or L-sectors are specified, i.e.
316 // --- if SecAL or SecAU < 0
319 //-----------------------------------------------------------------------------
321 // gROOT->LoadMacro("SetTPCParam.C");
322 // AliTPCParam *param = SetTPCParam();
323 AliTPC *TPC = new AliTPCv2("TPC", "Default");
325 // All sectors included
334 //=================== TOF parameters ============================
335 AliTOF *TOF = new AliTOFv2FHoles("TOF", "TOF with Holes");
337 AliTOF *TOF = new AliTOFv4T0("TOF", "normal TOF");
344 //=================== RICH parameters ===========================
345 AliRICH *RICH = new AliRICHv3("RICH", "normal RICH");
352 //=================== ZDC parameters ============================
354 AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
359 //=================== TRD parameters ============================
361 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
363 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
366 // With hole in front of PHOS
368 // With hole in front of RICH
372 AliTRDsim *TRDsim = TRD->CreateTR();
377 //=================== FMD parameters ============================
378 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
379 FMD->SetRingsSi1(256);
380 FMD->SetRingsSi2(128);
381 FMD->SetSectorsSi1(20);
382 FMD->SetSectorsSi2(40);
387 //=================== MUON parameters ===========================
389 AliMUON *MUON = new AliMUONv1("MUON", "default");
391 //=================== PHOS parameters ===========================
395 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
401 //=================== PMD parameters ============================
402 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
407 //=================== START parameters ============================
408 AliSTART *START = new AliSTARTv1("START", "START Detector");
413 //=================== EMCAL parameters ============================
414 AliEMCAL *EMCAL = new AliEMCALv1("EMCAL", "EMCALArch1a");
419 //=================== CRT parameters ============================
420 AliCRT *CRT = new AliCRTv0("CRT", "normal ACORDE");
425 //=================== CRT parameters ============================
426 AliVZERO *VZERO = new AliVZEROv2("VZERO", "normal VZERO");
432 Float_t EtaToTheta(Float_t arg){
433 return (180./TMath::Pi())*2.*atan(exp(-arg));
438 AliGenerator* GeneratorFactory(PprRun_t run) {
440 if (rad == kNoGluonRadiation) isw = 0;
445 comment = comment.Append(":HIJINGparam test 50 particles");
446 AliGenHIJINGpara *gener = new AliGenHIJINGpara(50);
447 gener->SetMomentumRange(0, 999999.);
448 gener->SetPhiRange(-180., 180.);
449 // Set pseudorapidity range from -8 to 8.
450 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
451 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
452 gener->SetThetaRange(thmin,thmax);
455 comment = comment.Append(":HIJINGparam N=8000");
456 AliGenHIJINGpara *gener = new AliGenHIJINGpara(86030);
457 gener->SetMomentumRange(0, 999999.);
458 gener->SetPhiRange(-180., 180.);
459 // Set pseudorapidity range from -8 to 8.
460 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
461 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
462 gener->SetThetaRange(thmin,thmax);
465 comment = comment.Append("HIJINGparam N=4000");
466 AliGenHIJINGpara *gener = new AliGenHIJINGpara(43015);
467 gener->SetMomentumRange(0, 999999.);
468 gener->SetPhiRange(-180., 180.);
469 // Set pseudorapidity range from -8 to 8.
470 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
471 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
472 gener->SetThetaRange(thmin,thmax);
475 comment = comment.Append("HIJINGparam N=2000");
476 AliGenHIJINGpara *gener = new AliGenHIJINGpara(21507);
477 gener->SetMomentumRange(0, 999999.);
478 gener->SetPhiRange(-180., 180.);
479 // Set pseudorapidity range from -8 to 8.
480 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
481 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
482 gener->SetThetaRange(thmin,thmax);
488 comment = comment.Append("HIJING cent1");
489 AliGenHijing *gener = HijingStandard();
490 // impact parameter range
491 gener->SetImpactParameterRange(0., 5.);
494 comment = comment.Append("HIJING cent2");
495 AliGenHijing *gener = HijingStandard();
496 // impact parameter range
497 gener->SetImpactParameterRange(0., 2.);
503 comment = comment.Append("HIJING per1");
504 AliGenHijing *gener = HijingStandard();
505 // impact parameter range
506 gener->SetImpactParameterRange(5., 8.6);
509 comment = comment.Append("HIJING per2");
510 AliGenHijing *gener = HijingStandard();
511 // impact parameter range
512 gener->SetImpactParameterRange(8.6, 11.2);
515 comment = comment.Append("HIJING per3");
516 AliGenHijing *gener = HijingStandard();
517 // impact parameter range
518 gener->SetImpactParameterRange(11.2, 13.2);
521 comment = comment.Append("HIJING per4");
522 AliGenHijing *gener = HijingStandard();
523 // impact parameter range
524 gener->SetImpactParameterRange(13.2, 15.);
527 comment = comment.Append("HIJING per5");
528 AliGenHijing *gener = HijingStandard();
529 // impact parameter range
530 gener->SetImpactParameterRange(15., 100.);
536 comment = comment.Append("HIJING Jet 25 GeV");
537 AliGenHijing *gener = HijingStandard();
538 // impact parameter range
539 gener->SetImpactParameterRange(0., 5.);
541 gener->SetTrigger(1);
542 gener->SetPtMinJet(25.);
543 gener->SetRadiation(isw);
544 gener->JetEtaRange(-0.3,0.3);
545 gener->JetPhiRange(15.,105.);
549 comment = comment.Append("HIJING Jet 50 GeV");
550 AliGenHijing *gener = HijingStandard();
551 // impact parameter range
552 gener->SetImpactParameterRange(0., 5.);
554 gener->SetTrigger(1);
555 gener->SetPtMinJet(50.);
556 gener->SetRadiation(isw);
557 gener->JetEtaRange(-0.3,0.3);
558 gener->JetPhiRange(15.,105.);
562 comment = comment.Append("HIJING Jet 75 GeV");
563 AliGenHijing *gener = HijingStandard();
564 // impact parameter range
565 gener->SetImpactParameterRange(0., 5.);
567 gener->SetTrigger(1);
568 gener->SetPtMinJet(75.);
569 gener->SetRadiation(isw);
570 gener->JetEtaRange(-0.3,0.3);
571 gener->JetPhiRange(15.,105.);
575 comment = comment.Append("HIJING Jet 100 GeV");
576 AliGenHijing *gener = HijingStandard();
577 // impact parameter range
578 gener->SetImpactParameterRange(0., 5.);
580 gener->SetTrigger(1);
581 gener->SetPtMinJet(100.);
582 gener->SetRadiation(isw);
583 gener->JetEtaRange(-0.3,0.3);
584 gener->JetPhiRange(15.,105.);
588 comment = comment.Append("HIJING Jet 125 GeV");
589 AliGenHijing *gener = HijingStandard();
590 // impact parameter range
591 gener->SetImpactParameterRange(0., 5.);
593 gener->SetTrigger(1);
594 gener->SetPtMinJet(125.);
595 gener->SetRadiation(isw);
596 gener->JetEtaRange(-0.3,0.3);
597 gener->JetPhiRange(15.,105.);
603 comment = comment.Append("HIJING Gamma 25 GeV");
604 AliGenHijing *gener = HijingStandard();
605 // impact parameter range
606 gener->SetImpactParameterRange(0., 5.);
608 gener->SetTrigger(2);
609 gener->SetPtMinJet(25.);
610 gener->SetRadiation(isw);
611 gener->JetEtaRange(-0.3,0.3);
612 gener->JetPhiRange(15.,105.);
616 comment = comment.Append("HIJING Gamma 50 GeV");
617 AliGenHijing *gener = HijingStandard();
618 // impact parameter range
619 gener->SetImpactParameterRange(0., 5.);
621 gener->SetTrigger(2);
622 gener->SetPtMinJet(50.);
623 gener->SetRadiation(isw);
624 gener->JetEtaRange(-0.3,0.3);
625 gener->JetPhiRange(15.,105.);
629 comment = comment.Append("HIJING Gamma 75 GeV");
630 AliGenHijing *gener = HijingStandard();
631 // impact parameter range
632 gener->SetImpactParameterRange(0., 5.);
634 gener->SetTrigger(2);
635 gener->SetPtMinJet(75.);
636 gener->SetRadiation(isw);
637 gener->JetEtaRange(-0.3,0.3);
638 gener->JetPhiRange(15.,105.);
642 comment = comment.Append("HIJING Gamma 100 GeV");
643 AliGenHijing *gener = HijingStandard();
644 // impact parameter range
645 gener->SetImpactParameterRange(0., 5.);
647 gener->SetTrigger(2);
648 gener->SetPtMinJet(100.);
649 gener->SetRadiation(isw);
650 gener->JetEtaRange(-0.3,0.3);
651 gener->JetPhiRange(15.,105.);
655 comment = comment.Append("HIJING Gamma 125 GeV");
656 AliGenHijing *gener = HijingStandard();
657 // impact parameter range
658 gener->SetImpactParameterRange(0., 5.);
660 gener->SetTrigger(2);
661 gener->SetPtMinJet(125.);
662 gener->SetRadiation(isw);
663 gener->JetEtaRange(-0.3,0.3);
664 gener->JetPhiRange(15.,105.);
670 AliGenHijing* HijingStandard()
672 AliGenHijing *gener = new AliGenHijing(-1);
673 // centre of mass energy
674 gener->SetEnergyCMS(5500.);
676 gener->SetReferenceFrame("CMS");
678 gener->SetProjectile("A", 208, 82);
679 gener->SetTarget ("A", 208, 82);
680 // tell hijing to keep the full parent child chain
681 gener->KeepFullEvent();
682 // enable jet quenching
683 gener->SetJetQuenching(4);
685 gener->SetShadowing(1);
686 // neutral pion and heavy particle decays switched off
687 gener->SetDecaysOff(1);
688 // Don't track spectators
689 gener->SetSpectators(0);
690 // kinematic selection
691 gener->SetSelectAll(0);