]>
Commit | Line | Data |
---|---|---|
75e8bb1f | 1 | // |
2 | #if !defined(__CINT__) || defined(__MAKECINT__) | |
3 | #include <Riostream.h> | |
9bb2665f | 4 | #include <TPDGCode.h> |
75e8bb1f | 5 | #include <TRandom.h> |
6 | #include <TSystem.h> | |
7 | #include <TVirtualMC.h> | |
8 | #include <TGeant3.h> | |
9 | #include "STEER/AliRunLoader.h" | |
10 | #include "STEER/AliRun.h" | |
11 | #include "STEER/AliConfig.h" | |
12 | #include "PYTHIA6/AliDecayerPythia.h" | |
13 | #include "EVGEN/AliGenCocktail.h" | |
14 | #include "EVGEN/AliGenHIJINGpara.h" | |
15 | #include "STEER/AliMagFMaps.h" | |
16 | #include "STRUCT/AliBODY.h" | |
17 | #include "STRUCT/AliMAG.h" | |
18 | #include "STRUCT/AliABSOv0.h" | |
19 | #include "STRUCT/AliDIPOv2.h" | |
20 | #include "STRUCT/AliHALL.h" | |
21 | #include "STRUCT/AliFRAMEv2.h" | |
22 | #include "STRUCT/AliSHILv2.h" | |
23 | #include "STRUCT/AliPIPEv0.h" | |
24 | #include "ITS/AliITSvSPD02.h" | |
25 | #endif | |
26 | ||
27 | Float_t EtaToTheta(Float_t arg){ | |
28 | return (180./TMath::Pi())*2.*atan(exp(-arg)); | |
29 | } | |
30 | //------------------------------------------------------------------ | |
31 | void Config(){ | |
32 | // Set Random Number seed | |
33 | // gRandom->SetSeed(12345); | |
34 | // libraries required by geant321 | |
35 | #if defined(__CINT__) | |
36 | gSystem->Load("libgeant321"); | |
37 | #endif | |
38 | new TGeant3("C++ Interface to Geant3"); | |
39 | AliRunLoader *rl = 0; | |
40 | rl = AliRunLoader::Open("galice.root", | |
f5a857b2 | 41 | AliConfig::GetDefaultEventFolderName(),"recreate"); |
75e8bb1f | 42 | if (rl == 0x0){ |
43 | gAlice->Fatal("Config.C","Can not instatiate the Run Loader"); | |
44 | return; | |
45 | } // end if rl==0x0 | |
46 | rl->SetCompressionLevel(2); | |
47 | rl->SetNumberOfEventsPerFile(1000); | |
48 | gAlice->SetRunLoader(rl); | |
49 | // | |
50 | // Set External decayer | |
51 | TVirtualMCDecayer *decayer = new AliDecayerPythia(); | |
52 | decayer->SetForceDecay(kAll); | |
53 | decayer->Init(); | |
54 | gMC->SetExternalDecayer(decayer); | |
55 | //======================================================================= | |
56 | gMC->SetProcess("DCAY",1); | |
57 | gMC->SetProcess("PAIR",1); | |
58 | gMC->SetProcess("COMP",1); | |
59 | gMC->SetProcess("PHOT",1); | |
60 | gMC->SetProcess("PFIS",0); | |
61 | gMC->SetProcess("DRAY",0); | |
62 | gMC->SetProcess("ANNI",1); | |
63 | gMC->SetProcess("BREM",1); | |
64 | gMC->SetProcess("MUNU",1); | |
65 | gMC->SetProcess("CKOV",1); | |
66 | gMC->SetProcess("HADR",1); | |
67 | gMC->SetProcess("LOSS",2); | |
68 | gMC->SetProcess("MULS",1); | |
69 | gMC->SetProcess("RAYL",1); | |
70 | Float_t cut = 1.e-3; // 1MeV cut by default | |
71 | Float_t tofmax = 1.e10; | |
72 | gMC->SetCut("CUTGAM", cut); | |
73 | gMC->SetCut("CUTELE", cut); | |
74 | gMC->SetCut("CUTNEU", cut); | |
75 | gMC->SetCut("CUTHAD", cut); | |
76 | gMC->SetCut("CUTMUO", cut); | |
77 | gMC->SetCut("BCUTE", cut); | |
78 | gMC->SetCut("BCUTM", cut); | |
79 | gMC->SetCut("DCUTE", cut); | |
80 | gMC->SetCut("DCUTM", cut); | |
81 | gMC->SetCut("PPCUTM", cut); | |
82 | gMC->SetCut("TOFMAX", tofmax); | |
4f09a120 | 83 | int nParticles = 1; |
75e8bb1f | 84 | if (gSystem->Getenv("CONFIG_NPARTICLES")){ |
85 | nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES")); | |
86 | } // end if | |
87 | //********************************************* | |
88 | // Example for Moving Particle Gun * | |
89 | //********************************************* | |
90 | AliGenBox *gener = new AliGenBox(nParticles); | |
91 | gener->SetMomentumRange(100.,300.); | |
92 | gener->SetPhiRange(0,0.1); | |
93 | gener->SetThetaRange(0.0, .1); | |
94 | gener->SetOrigin(0.,0.,-50.); | |
95 | //vertex position | |
96 | gener->SetSigma(0.1,0.1,0.0); //Sigma in (X,Y,Z) (cm) on IP position | |
9bb2665f | 97 | gener->SetPart(kPiPlus); |
75e8bb1f | 98 | gener->Init(); |
99 | // Activate this line if you want the vertex smearing to happen | |
100 | // track by track | |
101 | // | |
102 | //gener->SetVertexSmear(perTrack); | |
103 | // Field (L3 0.4 T) | |
104 | //gAlice->SetField(field); | |
105 | ||
106 | Int_t iHALL = 0; | |
107 | Int_t iITS = 1; | |
108 | rl->CdGAFile(); | |
109 | //=================== Alice BODY parameters ============================= | |
110 | AliBODY *BODY = new AliBODY("BODY", "Alice envelop"); | |
111 | ||
112 | if (iHALL){ | |
113 | //=================== HALL parameters ============================ | |
114 | AliHALL *HALL = new AliHALL("HALL", "Alice Hall"); | |
115 | } // end if | |
116 | if(iITS) { | |
117 | //=================== ITS parameters ============================ | |
a421d869 | 118 | AliITSvSPD02 *ITS = new AliITSvSPD02("SPD test beam 2002",2002); |
75e8bb1f | 119 | } |
120 | return; | |
121 | } |