4 // Switch on Transition Radiation simulation. 6/12/00 18:00
5 // iZDC=1 7/12/00 09:00
6 // ThetaRange is (0., 180.). It was (0.28,179.72) 7/12/00 09:00
7 // Theta range given through pseudorapidity limits 22/6/2001
9 // Set Random Number seed
12 gRandom->SetSeed(dat.GetTime());
14 new AliGeant3("C++ Interface to Geant3");
16 TFile *rootfile = new TFile("testPHOS.root", "recreate");
17 rootfile->SetCompressionLevel(2);
20 TGeant3 *geant3 = (TGeant3 *) gMC;
23 // Set External decayer
24 AliDecayer *decayer = new AliDecayerPythia();
26 decayer->SetForceDecay(kAll);
28 gMC->SetExternalDecayer(decayer);
31 //=======================================================================
32 // ******* GEANT STEERING parameters FOR ALICE SIMULATION *******
33 geant3->SetTRIG(1); //Number of events to be processed
34 geant3->SetSWIT(4, 10);
35 geant3->SetDEBU(0, 0, 1);
36 //geant3->SetSWIT(2,2);
47 geant3->SetHADR(1); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
51 geant3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0)
52 geant3->SetABAN(0); //Restore 3.16 behaviour for abandoned tracks
53 geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2)
54 geant3->SetERAN(5.e-7);
56 Float_t cut = 1.e-3; // 1MeV cut by default
57 Float_t tofmax = 1.e10;
59 // GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
60 geant3->SetCUTS(cut, cut, cut, cut, cut, cut, cut, cut, cut, cut,
63 //=======================================================================
64 // ************* STEERING parameters FOR ALICE SIMULATION **************
65 // --- Specify event type to be tracked through the ALICE setup
66 // --- All positions are in cm, angles in degrees, and P and E in GeV
69 AliGenBox *gener = new AliGenBox(nParticles);
72 gener->SetPtRange(9.99, 10.00);
73 gener->SetPhiRange(220, 320);
74 // Set pseudorapidity range from -8 to 8.
75 Float_t thmin = EtaToTheta(0.12); // 220 theta min. <---> eta max
76 Float_t thmax = EtaToTheta(-0.12); // 320 theta max. <---> eta min
78 gener->SetThetaRange(thmin, thmax);
79 gener->SetOrigin(0, 0, 0); //vertex position
80 gener->SetSigma(0, 0, 0); //Sigma in (X,Y,Z) (cm) on IP position
83 // Activate this line if you want the vertex smearing to happen
86 //gener->SetVertexSmear(perTrack);
88 gAlice->SetField(0,2); //Specify maximum magnetic field in Tesla (neg. ==> default field)
90 //=================== Alice BODY parameters =============================
91 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
94 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
95 AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ;
96 AliPHOSQAMeanChecker * hm = static_cast<AliPHOSQAMeanChecker *>gime->QATasks("HitsMul");
97 AliPHOSQAMeanChecker * te = static_cast<AliPHOSQAMeanChecker *>gime->QATasks("TotEner");
98 AliPHOSQAMeanChecker * hmB = static_cast<AliPHOSQAMeanChecker *>gime->QATasks("HitsMulB");
99 AliPHOSQAMeanChecker * teB = static_cast<AliPHOSQAMeanChecker *>gime->QATasks("TotEnerB");
100 hm->Set(62.18, 23.81) ;
102 te->Set(8.092, 3.06) ;
103 hmB->Set(63.498, 24.348) ;
104 teB->Set(8.363, 3.44) ;
108 Float_t EtaToTheta(Float_t arg){
109 return (180./TMath::Pi())*2.*atan(exp(-arg));