2 #if !defined(__CINT__) || defined(__MAKECINT__)
6 #include <TVirtualMC.h>
8 #include "STEER/AliRunLoader.h"
9 #include "STEER/AliRun.h"
10 #include "STEER/AliConfig.h"
11 #include "PYTHIA6/AliDecayerPythia.h"
12 #include "EVGEN/AliGenCocktail.h"
13 #include "EVGEN/AliGenHIJINGpara.h"
14 #include "STEER/AliMagFMaps.h"
15 #include "STRUCT/AliBODY.h"
16 #include "STRUCT/AliMAG.h"
17 #include "STRUCT/AliABSOv0.h"
18 #include "STRUCT/AliDIPOv2.h"
19 #include "STRUCT/AliHALL.h"
20 #include "STRUCT/AliFRAMEv2.h"
21 #include "STRUCT/AliSHILv2.h"
22 #include "STRUCT/AliPIPEv0.h"
23 #include "ITS/AliITSvSPD02.h"
26 Float_t EtaToTheta(Float_t arg){
27 return (180./TMath::Pi())*2.*atan(exp(-arg));
29 //------------------------------------------------------------------
31 // Set Random Number seed
32 // gRandom->SetSeed(12345);
33 // libraries required by geant321
35 gSystem->Load("libgeant321");
37 new TGeant3("C++ Interface to Geant3");
39 rl = AliRunLoader::Open("galice.root",
40 AliConfig::GetDefaultEventFolderName(),"recreate");
42 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
45 rl->SetCompressionLevel(2);
46 rl->SetNumberOfEventsPerFile(1000);
47 gAlice->SetRunLoader(rl);
49 // Set External decayer
50 TVirtualMCDecayer *decayer = new AliDecayerPythia();
51 decayer->SetForceDecay(kAll);
53 gMC->SetExternalDecayer(decayer);
54 //=======================================================================
55 gMC->SetProcess("DCAY",1);
56 gMC->SetProcess("PAIR",1);
57 gMC->SetProcess("COMP",1);
58 gMC->SetProcess("PHOT",1);
59 gMC->SetProcess("PFIS",0);
60 gMC->SetProcess("DRAY",0);
61 gMC->SetProcess("ANNI",1);
62 gMC->SetProcess("BREM",1);
63 gMC->SetProcess("MUNU",1);
64 gMC->SetProcess("CKOV",1);
65 gMC->SetProcess("HADR",1);
66 gMC->SetProcess("LOSS",2);
67 gMC->SetProcess("MULS",1);
68 gMC->SetProcess("RAYL",1);
69 Float_t cut = 1.e-3; // 1MeV cut by default
70 Float_t tofmax = 1.e10;
71 gMC->SetCut("CUTGAM", cut);
72 gMC->SetCut("CUTELE", cut);
73 gMC->SetCut("CUTNEU", cut);
74 gMC->SetCut("CUTHAD", cut);
75 gMC->SetCut("CUTMUO", cut);
76 gMC->SetCut("BCUTE", cut);
77 gMC->SetCut("BCUTM", cut);
78 gMC->SetCut("DCUTE", cut);
79 gMC->SetCut("DCUTM", cut);
80 gMC->SetCut("PPCUTM", cut);
81 gMC->SetCut("TOFMAX", tofmax);
83 if (gSystem->Getenv("CONFIG_NPARTICLES")){
84 nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES"));
86 //*********************************************
87 // Example for Moving Particle Gun *
88 //*********************************************
89 AliGenBox *gener = new AliGenBox(nParticles);
90 gener->SetMomentumRange(300.,301.);
91 gener->SetPhiRange(0,0.1);
92 gener->SetThetaRange(0.0, .1);
93 gener->SetOrigin(0.,0.,-800.);
95 gener->SetSigma(0.1,0.1,0.0); //Sigma in (X,Y,Z) (cm) on IP position
96 gener->SetPart(211); //GEANT particle type
98 // Activate this line if you want the vertex smearing to happen
101 //gener->SetVertexSmear(perTrack);
103 //gAlice->SetField(field);
108 //=================== Alice BODY parameters =============================
109 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
112 //=================== HALL parameters ============================
113 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
116 //=================== ITS parameters ============================
117 AliITSvSDD03 *ITS = new AliITSvSDD03("SDD test beam 2003",2003);