]>
Commit | Line | Data |
---|---|---|
2ef7007f | 1 | // |
2 | #if !defined(__CINT__) || defined(__MAKECINT__) | |
3 | #include <Riostream.h> | |
4 | #include <TRandom.h> | |
5 | #include <TSystem.h> | |
6 | #include <TVirtualMC.h> | |
7 | #include <TGeant3.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/AliITSvSSD03.h" | |
24 | #endif | |
25 | ||
26 | Float_t EtaToTheta(Float_t arg){ | |
27 | return (180./TMath::Pi())*2.*atan(exp(-arg)); | |
28 | } | |
29 | //------------------------------------------------------------------ | |
30 | void Config(){ | |
31 | // Set Random Number seed | |
32 | // gRandom->SetSeed(12345); | |
33 | // libraries required by geant321 | |
34 | #if defined(__CINT__) | |
35 | gSystem->Load("libgeant321"); | |
36 | #endif | |
37 | new TGeant3("C++ Interface to Geant3"); | |
38 | AliRunLoader *rl = 0; | |
39 | rl = AliRunLoader::Open("galice.root", | |
40 | AliConfig::GetDefaultEventFolderName(),"recreate"); | |
41 | if (rl == 0x0){ | |
42 | gAlice->Fatal("Config.C","Can not instatiate the Run Loader"); | |
43 | return; | |
44 | } // end if rl==0x0 | |
45 | rl->SetCompressionLevel(2); | |
46 | rl->SetNumberOfEventsPerFile(1000); | |
47 | gAlice->SetRunLoader(rl); | |
48 | // | |
49 | // Set External decayer | |
50 | TVirtualMCDecayer *decayer = new AliDecayerPythia(); | |
51 | decayer->SetForceDecay(kAll); | |
52 | decayer->Init(); | |
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); | |
82 | int nParticles = 1; | |
83 | if (gSystem->Getenv("CONFIG_NPARTICLES")){ | |
84 | nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES")); | |
85 | } // end if | |
86 | //********************************************* | |
87 | // Example for Moving Particle Gun * | |
88 | //********************************************* | |
89 | AliGenBox *gener = new AliGenBox(nParticles); | |
90 | //gener->SetMomentumRange(100.,300.); | |
91 | gener->SetMomentumRange(7.,7.); | |
92 | //gener->SetPhiRange(0,0.1); | |
93 | gener->SetPhiRange(0,360.0); | |
94 | gener->SetThetaRange(0.0, .2); | |
95 | //gener->SetThetaRange(0.0,0.0); | |
96 | gener->SetOrigin(0.,0.,-650.); // beam comes ~-6.5 m from telescope | |
97 | //vertex position | |
98 | gener->SetSigma(1.,1.,0.0); //Sigma in (X,Y,Z) (cm) on IP position | |
99 | ||
100 | //gener->SetPart(211); //GEANT particle type | |
101 | //cout<<"kPiPlus="<<kPiPlus<<endl; | |
102 | gener->SetPart(kPiPlus); //GEANT particle type | |
103 | gener->Init(); | |
104 | // Activate this line if you want the vertex smearing to happen | |
105 | // track by track | |
106 | // | |
107 | //gener->SetVertexSmear(kPerTrack); | |
108 | // Field (L3 0.4 T) | |
109 | //gAlice->SetField(field); | |
110 | ||
111 | Int_t iHALL = 0; | |
112 | Int_t iITS = 1; | |
113 | rl->CdGAFile(); | |
114 | //=================== Alice BODY parameters ============================= | |
115 | AliBODY *BODY = new AliBODY("BODY", "Alice envelop"); | |
116 | ||
117 | if (iHALL){ | |
118 | //=================== HALL parameters ============================ | |
119 | AliHALL *HALL = new AliHALL("HALL", "Alice Hall"); | |
120 | } // end if | |
121 | if(iITS) { | |
122 | //=================== ITS parameters ============================ | |
123 | AliITSvSSD03 *ITS = new AliITSvSSD03("SSD test beam 2003",2003); | |
124 | } | |
125 | return; | |
126 | } |