4 // Set Random Number seed
5 // gRandom->SetSeed(12345);
6 // libraries required by geant321
7 gSystem->Load("libgeant321");
8 new TGeant3("C++ Interface to Geant3");
9 if (!gSystem->Getenv("CONFIG_FILE")){
10 cout<<"Config.C: Creating Run Loader ..."<<endl;
11 AliRunLoader *rl = AliRunLoader::Open("galice.root",
12 AliConfig::fgkDefaultEventFolderName,"recreate");
14 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
17 rl->SetCompressionLevel(2);
18 rl->SetNumberOfEventsPerFile(1000);
19 gAlice->SetRunLoader(rl);
21 TGeant3 *geant3 = (TGeant3 *) gMC;
22 // Set External decayer
23 AliDecayer *decayer = new AliDecayerPythia();
24 decayer->SetForceDecay(kAll);
26 gMC->SetExternalDecayer(decayer);
27 //=======================================================================
28 // ******* GEANT STEERING parameters FOR ALICE SIMULATION *******
29 geant3->SetTRIG(1); //Number of events to be processed
30 geant3->SetSWIT(4, 10);
31 geant3->SetDEBU(0, 0, 1);
32 //geant3->SetSWIT(2,2);
43 geant3->SetHADR(1);//Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
47 geant3->SetAUTO(1);//Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0)
48 geant3->SetABAN(0);//Restore 3.16 behaviour for abandoned tracks
49 geant3->SetOPTI(2);//Select optimisation level for GEANT geometry searches (0,1,2)
50 geant3->SetERAN(5.e-7);
51 Float_t cut = 1.e-3; // 1MeV cut by default
52 Float_t tofmax = 1.e10;
53 // GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
54 geant3->SetCUTS(cut, cut, cut, cut, cut, cut, cut, cut, cut, cut,
56 //=======================================================================
57 // ************* STEERING parameters FOR ALICE SIMULATION **************
58 // --- Specify event type to be tracked through the ALICE setup
59 // --- All positions are in cm, angles in degrees, and P and E in GeV
60 if (gSystem->Getenv("CONFIG_NPARTICLES")){
61 int nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES"));
65 //*********************************************
66 // Example for Moving Particle Gun *
67 //*********************************************
68 AliGenBox *gener = new AliGenBox(nParticles);
69 gener->SetMomentumRange(100.,300.);
70 gener->SetPhiRange(0,0.1);
71 gener->SetThetaRange(0.0, .1);
72 gener->SetOrigin(0.,0.,-50.);
74 gener->SetSigma(0.1,0.1,0.0); //Sigma in (X,Y,Z) (cm) on IP position
75 gener->SetPart(kPiPlus);
77 // Activate this line if you want the vertex smearing to happen
80 //gener->SetVertexSmear(perTrack);
83 //gAlice->SetField(field);
88 //=================== Alice BODY parameters =============================
89 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
92 //=================== HALL parameters ============================
93 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
96 //=================== ITS parameters ============================
97 AliITSvSPD02 *ITS = new AliITSvSPD02("SPD test beam 2002");
102 Float_t EtaToTheta(Float_t arg){
103 return (180./TMath::Pi())*2.*atan(exp(-arg));