]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/ConfigSPD02.C
First commit.
[u/mrichter/AliRoot.git] / ITS / ConfigSPD02.C
CommitLineData
6078cf56 1void Config(){
2 // Set Random Number seed
3 // gRandom->SetSeed(12345);
4 // libraries required by geant321
5 gSystem->Load("libgeant321");
6 new TGeant3("C++ Interface to Geant3");
7 if (!gSystem->Getenv("CONFIG_FILE")){
8 TFile *rootfile = new TFile("galice.root", "recreate");
9 rootfile->SetCompressionLevel(2);
10 } // end if
11 TGeant3 *geant3 = (TGeant3 *) gMC;
12 // Set External decayer
13 AliDecayer *decayer = new AliDecayerPythia();
14 decayer->SetForceDecay(kAll);
15 decayer->Init();
16 gMC->SetExternalDecayer(decayer);
17 //=======================================================================
18 // ******* GEANT STEERING parameters FOR ALICE SIMULATION *******
19 geant3->SetTRIG(1); //Number of events to be processed
20 geant3->SetSWIT(4, 10);
21 geant3->SetDEBU(0, 0, 1);
22 //geant3->SetSWIT(2,2);
23 geant3->SetDCAY(1);
24 geant3->SetPAIR(1);
25 geant3->SetCOMP(1);
26 geant3->SetPHOT(1);
27 geant3->SetPFIS(0);
28 geant3->SetDRAY(0);
29 geant3->SetANNI(1);
30 geant3->SetBREM(1);
31 geant3->SetMUNU(1);
32 geant3->SetCKOV(1);
33 geant3->SetHADR(1);//Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
34 geant3->SetLOSS(2);
35 geant3->SetMULS(1);
36 geant3->SetRAYL(1);
37 geant3->SetAUTO(1);//Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0)
38 geant3->SetABAN(0);//Restore 3.16 behaviour for abandoned tracks
39 geant3->SetOPTI(2);//Select optimisation level for GEANT geometry searches (0,1,2)
40 geant3->SetERAN(5.e-7);
41 Float_t cut = 1.e-3; // 1MeV cut by default
42 Float_t tofmax = 1.e10;
43 // GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
44 geant3->SetCUTS(cut, cut, cut, cut, cut, cut, cut, cut, cut, cut,
45 tofmax);
46 //=======================================================================
47 // ************* STEERING parameters FOR ALICE SIMULATION **************
48 // --- Specify event type to be tracked through the ALICE setup
49 // --- All positions are in cm, angles in degrees, and P and E in GeV
50 if (gSystem->Getenv("CONFIG_NPARTICLES")){
51 int nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES"));
52 }else{
53 int nParticles = 50;
54 } // end if
55 //*********************************************
56 // Example for Moving Particle Gun *
57 //*********************************************
58 AliGenBox *gener = new AliGenBox(nParticles);
59 gener->SetMomentumRange(100.,300.);
60 gener->SetPhiRange(0,0.01);
61 gener->SetThetaRange(0.0, 1.0);
62 gener->SetOrigin(0.,0.,-100.);
63 //vertex position
64 gener->SetSigma(1.0,1.00,0); //Sigma in (X,Y,Z) (cm) on IP position
65 gener->SetPart(211); //GEANT particle type
66 gener->Init();
67 // Activate this line if you want the vertex smearing to happen
68 // track by track
69 //
70 //gener->SetVertexSmear(perTrack);
71 // Field (L3 0.4 T)
72 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., 1);
73 rootfile->cd();
74 gAlice->SetField(field);
75
76 Int_t iHALL = 0;
77 Int_t iITS = 1;
78 //=================== Alice BODY parameters =============================
79 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
80
81 if (iHALL){
82 //=================== HALL parameters ============================
83 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
84 } // end if
85 if(iITS) {
86 //=================== ITS parameters ============================
87 AliITSvSPD02 *ITS = new AliITSvSPD02("SPD test beam 2002");
88 }
89 return;
90}
91
92Float_t EtaToTheta(Float_t arg){
93 return (180./TMath::Pi())*2.*atan(exp(-arg));
94}