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_jj200,
8 kHijing_gj25, kHijing_gj50, kHijing_gj75, kHijing_gj100, kHijing_gj200,
19 kGluonRadiation, kNoGluonRadiation
28 // This part for configuration
29 static PprRun_t run = test50;
30 static PprGeo_t geo = kHoles;
31 static PprRad_t rad = kGluonRadiation;
32 static PprMag_t mag = k4kG;
35 static TString comment;
43 // Switch on Transition adiation simulation. 6/12/00 18:00
44 // iZDC=1 7/12/00 09:00
45 // ThetaRange is (0., 180.). It was (0.28,179.72) 7/12/00 09:00
46 // Theta range given through pseudorapidity limits 22/6/2001
48 // Set Random Number seed
49 // gRandom->SetSeed(12345);
51 // libraries required by geant321
52 gSystem->Load("libgeant321");
54 new TGeant3("C++ Interface to Geant3");
56 if (!gSystem->Getenv("CONFIG_FILE"))
58 TFile *rootfile = new TFile("galice.root", "recreate");
60 rootfile->SetCompressionLevel(2);
63 TGeant3 *geant3 = (TGeant3 *) gMC;
66 // Set External decayer
67 AliDecayer *decayer = new AliDecayerPythia();
69 decayer->SetForceDecay(kAll);
71 gMC->SetExternalDecayer(decayer);
74 //=======================================================================
75 // ******* GEANT STEERING parameters FOR ALICE SIMULATION *******
76 geant3->SetTRIG(1); //Number of events to be processed
77 geant3->SetSWIT(4, 10);
78 geant3->SetDEBU(0, 0, 1);
79 //geant3->SetSWIT(2,2);
90 geant3->SetHADR(1); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
94 geant3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0)
95 geant3->SetABAN(0); //Restore 3.16 behaviour for abandoned tracks
96 geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2)
97 geant3->SetERAN(5.e-7);
99 Float_t cut = 1.e-3; // 1MeV cut by default
100 Float_t tofmax = 1.e10;
102 // GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
103 geant3->SetCUTS(cut, cut, cut, cut, cut, cut, cut, cut, cut, cut,
106 //=======================================================================
107 // ************* STEERING parameters FOR ALICE SIMULATION **************
108 // --- Specify event type to be tracked through the ALICE setup
109 // --- All positions are in cm, angles in degrees, and P and E in GeV
112 // Generator Configuration
114 AliGenerator* gener = GeneratorFactory(run);
115 gener->SetOrigin(0, 0, 0); // vertex position
116 gener->SetSigma(0, 0, 5.3); // Sigma in (X,Y,Z) (cm) on IP position
117 gener->SetCutVertexZ(1.); // Truncate at 1 sigma
118 gener->SetVertexSmear(kPerEvent);
119 gener->SetTrackingFlag(1);
123 comment = comment.Append(" | L3 field 0.2 T");
124 } else if (mag == k4kG) {
125 comment = comment.Append(" | L3 field 0.4 T");
126 } else if (mag == k5kG) {
127 comment = comment.Append(" | L3 field 0.5 T");
131 if (rad == kGluonRadiation)
133 comment = comment.Append(" | Gluon Radiation On");
136 comment = comment.Append(" | Gluon Radiation Off");
141 comment = comment.Append(" | Holes for PHOS/RICH");
144 comment = comment.Append(" | No holes for PHOS/RICH");
147 printf("\n \n Comment: %s \n \n", (char*) comment);
151 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., mag);
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 Version 2");
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(0); // 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(0); // 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(0); // 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(0); // 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.
309 //============================ TPC parameters ================================
310 // --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
311 // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
312 // --- sectors are specified, any value other than that requires at least one
313 // --- sector (lower or upper)to be specified!
314 // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
315 // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
316 // --- SecLows - number of lower sectors specified (up to 6)
317 // --- SecUps - number of upper sectors specified (up to 12)
318 // --- Sens - sensitive strips for the Slow Simulator !!!
319 // --- This does NOT work if all S or L-sectors are specified, i.e.
320 // --- if SecAL or SecAU < 0
323 //-----------------------------------------------------------------------------
325 // gROOT->LoadMacro("SetTPCParam.C");
326 // AliTPCParam *param = SetTPCParam();
327 AliTPC *TPC = new AliTPCv2("TPC", "Default");
329 // All sectors included
338 //=================== TOF parameters ============================
339 AliTOF *TOF = new AliTOFv2FHoles("TOF", "TOF with Holes");
341 AliTOF *TOF = new AliTOFv4T0("TOF", "normal TOF");
348 //=================== RICH parameters ===========================
349 AliRICH *RICH = new AliRICHv3("RICH", "normal RICH");
356 //=================== ZDC parameters ============================
358 AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
363 //=================== TRD parameters ============================
365 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
367 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
370 // With hole in front of PHOS
372 // With hole in front of RICH
376 AliTRDsim *TRDsim = TRD->CreateTR();
381 //=================== FMD parameters ============================
382 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
383 FMD->SetRingsSi1(256);
384 FMD->SetRingsSi2(128);
385 FMD->SetSectorsSi1(20);
386 FMD->SetSectorsSi2(40);
391 //=================== MUON parameters ===========================
393 AliMUON *MUON = new AliMUONv1("MUON", "default");
395 //=================== PHOS parameters ===========================
399 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
405 //=================== PMD parameters ============================
406 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
411 //=================== START parameters ============================
412 AliSTART *START = new AliSTARTv1("START", "START Detector");
417 //=================== EMCAL parameters ============================
418 AliEMCAL *EMCAL = new AliEMCALv1("EMCAL", "G56_2_55_19");
423 //=================== CRT parameters ============================
424 AliCRT *CRT = new AliCRTv0("CRT", "normal ACORDE");
429 //=================== CRT parameters ============================
430 AliVZERO *VZERO = new AliVZEROv2("VZERO", "normal VZERO");
436 Float_t EtaToTheta(Float_t arg){
437 return (180./TMath::Pi())*2.*atan(exp(-arg));
442 AliGenerator* GeneratorFactory(PprRun_t run) {
444 if (rad == kNoGluonRadiation) isw = 0;
449 comment = comment.Append(":HIJINGparam test 50 particles");
450 AliGenHIJINGpara *gener = new AliGenHIJINGpara(50);
451 gener->SetMomentumRange(0, 999999.);
452 gener->SetPhiRange(0., 360.);
453 // Set pseudorapidity range from -8 to 8.
454 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
455 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
456 gener->SetThetaRange(thmin,thmax);
459 comment = comment.Append(":HIJINGparam N=8000");
460 AliGenHIJINGpara *gener = new AliGenHIJINGpara(86030);
461 gener->SetMomentumRange(0, 999999.);
462 gener->SetPhiRange(0., 360.);
463 // Set pseudorapidity range from -8 to 8.
464 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
465 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
466 gener->SetThetaRange(thmin,thmax);
469 comment = comment.Append("HIJINGparam N=4000");
470 AliGenHIJINGpara *gener = new AliGenHIJINGpara(43015);
471 gener->SetMomentumRange(0, 999999.);
472 gener->SetPhiRange(0., 360.);
473 // Set pseudorapidity range from -8 to 8.
474 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
475 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
476 gener->SetThetaRange(thmin,thmax);
479 comment = comment.Append("HIJINGparam N=2000");
480 AliGenHIJINGpara *gener = new AliGenHIJINGpara(21507);
481 gener->SetMomentumRange(0, 999999.);
482 gener->SetPhiRange(0., 360.);
483 // Set pseudorapidity range from -8 to 8.
484 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
485 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
486 gener->SetThetaRange(thmin,thmax);
492 comment = comment.Append("HIJING cent1");
493 AliGenHijing *gener = HijingStandard();
494 // impact parameter range
495 gener->SetImpactParameterRange(0., 5.);
498 comment = comment.Append("HIJING cent2");
499 AliGenHijing *gener = HijingStandard();
500 // impact parameter range
501 gener->SetImpactParameterRange(0., 2.);
507 comment = comment.Append("HIJING per1");
508 AliGenHijing *gener = HijingStandard();
509 // impact parameter range
510 gener->SetImpactParameterRange(5., 8.6);
513 comment = comment.Append("HIJING per2");
514 AliGenHijing *gener = HijingStandard();
515 // impact parameter range
516 gener->SetImpactParameterRange(8.6, 11.2);
519 comment = comment.Append("HIJING per3");
520 AliGenHijing *gener = HijingStandard();
521 // impact parameter range
522 gener->SetImpactParameterRange(11.2, 13.2);
525 comment = comment.Append("HIJING per4");
526 AliGenHijing *gener = HijingStandard();
527 // impact parameter range
528 gener->SetImpactParameterRange(13.2, 15.);
531 comment = comment.Append("HIJING per5");
532 AliGenHijing *gener = HijingStandard();
533 // impact parameter range
534 gener->SetImpactParameterRange(15., 100.);
540 comment = comment.Append("HIJING Jet 25 GeV");
541 AliGenHijing *gener = HijingStandard();
542 // impact parameter range
543 gener->SetImpactParameterRange(0., 5.);
545 gener->SetTrigger(1);
546 gener->SetPtJet(25.);
547 gener->SetRadiation(isw);
548 gener->SetSimpleJets(!isw);
549 gener->SetJetEtaRange(-0.3,0.3);
550 gener->SetJetPhiRange(75., 165.);
554 comment = comment.Append("HIJING Jet 50 GeV");
555 AliGenHijing *gener = HijingStandard();
556 // impact parameter range
557 gener->SetImpactParameterRange(0., 5.);
559 gener->SetTrigger(1);
560 gener->SetPtJet(50.);
561 gener->SetRadiation(isw);
562 gener->SetSimpleJets(!isw);
563 gener->SetJetEtaRange(-0.3,0.3);
564 gener->SetJetPhiRange(75., 165.);
568 comment = comment.Append("HIJING Jet 75 GeV");
569 AliGenHijing *gener = HijingStandard();
570 // impact parameter range
571 gener->SetImpactParameterRange(0., 5.);
573 gener->SetTrigger(1);
574 gener->SetPtJet(75.);
575 gener->SetRadiation(isw);
576 gener->SetSimpleJets(!isw);
577 gener->SetJetEtaRange(-0.3,0.3);
578 gener->SetJetPhiRange(75., 165.);
582 comment = comment.Append("HIJING Jet 100 GeV");
583 AliGenHijing *gener = HijingStandard();
584 // impact parameter range
585 gener->SetImpactParameterRange(0., 5.);
587 gener->SetTrigger(1);
588 gener->SetPtJet(100.);
589 gener->SetRadiation(isw);
590 gener->SetSimpleJets(!isw);
591 gener->SetJetEtaRange(-0.3,0.3);
592 gener->SetJetPhiRange(75., 165.);
596 comment = comment.Append("HIJING Jet 200 GeV");
597 AliGenHijing *gener = HijingStandard();
598 // impact parameter range
599 gener->SetImpactParameterRange(0., 5.);
601 gener->SetTrigger(1);
602 gener->SetPtJet(200.);
603 gener->SetRadiation(isw);
604 gener->SetSimpleJets(!isw);
605 gener->SetJetEtaRange(-0.3,0.3);
606 gener->SetJetPhiRange(75., 165.);
612 comment = comment.Append("HIJING Gamma 25 GeV");
613 AliGenHijing *gener = HijingStandard();
614 // impact parameter range
615 gener->SetImpactParameterRange(0., 5.);
617 gener->SetTrigger(2);
618 gener->SetPtJet(25.);
619 gener->SetRadiation(isw);
620 gener->SetSimpleJets(!isw);
621 gener->SetJetEtaRange(-0.12, 0.12);
622 gener->SetJetPhiRange(220., 320.);
626 comment = comment.Append("HIJING Gamma 50 GeV");
627 AliGenHijing *gener = HijingStandard();
628 // impact parameter range
629 gener->SetImpactParameterRange(0., 5.);
631 gener->SetTrigger(2);
632 gener->SetPtJet(50.);
633 gener->SetRadiation(isw);
634 gener->SetSimpleJets(!isw);
635 gener->SetJetEtaRange(-0.12, 0.12);
636 gener->SetJetPhiRange(220., 320.);
640 comment = comment.Append("HIJING Gamma 75 GeV");
641 AliGenHijing *gener = HijingStandard();
642 // impact parameter range
643 gener->SetImpactParameterRange(0., 5.);
645 gener->SetTrigger(2);
646 gener->SetPtJet(75.);
647 gener->SetRadiation(isw);
648 gener->SetSimpleJets(!isw);
649 gener->SetJetEtaRange(-0.12, 0.12);
650 gener->SetJetPhiRange(220., 320.);
654 comment = comment.Append("HIJING Gamma 100 GeV");
655 AliGenHijing *gener = HijingStandard();
656 // impact parameter range
657 gener->SetImpactParameterRange(0., 5.);
659 gener->SetTrigger(2);
660 gener->SetPtJet(100.);
661 gener->SetRadiation(isw);
662 gener->SetSimpleJets(!isw);
663 gener->SetJetEtaRange(-0.12, 0.12);
664 gener->SetJetPhiRange(220., 320.);
668 comment = comment.Append("HIJING Gamma 200 GeV");
669 AliGenHijing *gener = HijingStandard();
670 // impact parameter range
671 gener->SetImpactParameterRange(0., 5.);
673 gener->SetTrigger(2);
674 gener->SetPtJet(200.);
675 gener->SetRadiation(isw);
676 gener->SetSimpleJets(!isw);
677 gener->SetJetEtaRange(-0.12, 0.12);
678 gener->SetJetPhiRange(220., 320.);
681 comment = comment.Append("HIJING pA");
683 AliGenCocktail *gener = new AliGenCocktail();
684 // gener->SetTrackingFlag(0);
685 gener->SetOrigin(0, 0, 0); // vertex position
686 gener->SetSigma(0, 0, 5.3); // Sigma in (X,Y,Z) (cm) on IP position
687 gener->SetCutVertexZ(1.); // Truncate at 1 sigma
688 gener->SetVertexSmear(kPerEvent);
689 AliGenHijing *hijing = new AliGenHijing(-1);
690 // centre of mass energy
691 hijing->SetEnergyCMS(TMath::Sqrt(82./208.) * 14000.);
692 // impact parameter range
693 hijing->SetImpactParameterRange(0., 15.);
695 hijing->SetReferenceFrame("CMS");
696 hijing->SetBoostLHC(1);
698 hijing->SetProjectile("P", 1, 1);
699 hijing->SetTarget ("A", 208, 82);
700 // tell hijing to keep the full parent child chain
701 hijing->KeepFullEvent();
702 // enable jet quenching
703 hijing->SetJetQuenching(0);
705 hijing->SetShadowing(1);
706 // Don't track spectators
707 hijing->SetSpectators(0);
708 // kinematic selection
709 hijing->SetSelectAll(0);
711 AliGenSlowNucleons* gray = new AliGenSlowNucleons(1);
712 AliSlowNucleonModel* model = new AliSlowNucleonModelExp();
713 gray->SetSlowNucleonModel(model);
715 gener->AddGenerator(hijing,"Hijing pPb", 1);
716 gener->AddGenerator(gray, "Gray Particles",1);
722 AliGenHijing* HijingStandard()
724 AliGenHijing *gener = new AliGenHijing(-1);
725 // centre of mass energy
726 gener->SetEnergyCMS(5500.);
728 gener->SetReferenceFrame("CMS");
730 gener->SetProjectile("A", 208, 82);
731 gener->SetTarget ("A", 208, 82);
732 // tell hijing to keep the full parent child chain
733 gener->KeepFullEvent();
734 // enable jet quenching
735 gener->SetJetQuenching(4);
737 gener->SetShadowing(1);
738 // neutral pion and heavy particle decays switched off
739 gener->SetDecaysOff(1);
740 // Don't track spectators
741 gener->SetSpectators(0);
742 // kinematic selection
743 gener->SetSelectAll(0);