]>
Commit | Line | Data |
---|---|---|
0f507a31 | 1 | void Config() |
2 | { | |
3 | // ============================= | |
4 | // Root file | |
5 | // ============================= | |
6 | ||
7 | // Create the output file | |
8 | TFile *rootfile = new TFile("galice.root","recreate"); | |
9 | rootfile->SetCompressionLevel(2); | |
10 | ||
11 | // ============================= | |
12 | // Geant4 | |
13 | // ============================= | |
14 | ||
15 | // load Geant4 and AliRoot steer libraries | |
7f94d6d2 | 16 | if (!gInterpreter->IsLoaded("g4libs.C")) gROOT->LoadMacro("g4libs.C"); |
0f507a31 | 17 | gInterpreter->ProcessLine("g4libs()"); |
18 | gInterpreter->ProcessLine("steerlibs()"); | |
19 | ||
20 | // Create Geant4 | |
7f94d6d2 | 21 | if (!gInterpreter->IsLoaded("g4menu.C")) gROOT->LoadMacro("g4menu.C"); |
0f507a31 | 22 | gInterpreter->ProcessLine("CreateGeant4()"); |
23 | ||
24 | // Physics process control | |
25 | // (in development) | |
26 | gMC ->SetProcess("DCAY",1); | |
27 | gMC ->SetProcess("PAIR",1); | |
28 | gMC ->SetProcess("COMP",1); | |
29 | //gMC ->SetProcess("PHOT",1); | |
30 | gMC ->SetProcess("PFIS",0); | |
31 | gMC ->SetProcess("DRAY",0); | |
32 | gMC ->SetProcess("ANNI",1); | |
33 | gMC ->SetProcess("BREM",1); | |
34 | gMC ->SetProcess("MUNU",1); | |
35 | //xx gMC ->SetProcess("CKOV",1); | |
36 | gMC ->SetProcess("HADR",1); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3) | |
37 | gMC ->SetProcess("LOSS",2); | |
38 | gMC ->SetProcess("MULS",1); | |
39 | //xx gMC ->SetProcess("RAYL",1); | |
40 | ||
41 | // Energy cuts | |
42 | // (in development) | |
43 | Float_t cut = 1.e-3; // 1MeV cut by default | |
44 | gMC ->SetCut("CUTGAM",cut); | |
45 | gMC ->SetCut("CUTELE",cut); | |
46 | gMC ->SetCut("CUTNEU",cut); | |
47 | gMC ->SetCut("CUTHAD",cut); | |
48 | gMC ->SetCut("CUTMUO",cut); | |
49 | gMC ->SetCut("BCUTE",cut); | |
50 | gMC ->SetCut("BCUTM",cut); | |
51 | gMC ->SetCut("DCUTE",cut); | |
52 | gMC ->SetCut("DCUTM",cut); | |
53 | //xx gMC ->SetCut("PPCUTM",cut); | |
54 | ||
55 | // ============================= | |
56 | // Event generator | |
57 | // ============================= | |
58 | ||
59 | // --- Specify event type to be tracked through the ALICE setup | |
60 | // --- All positions are in cm, angles in degrees, and P and E in GeV | |
61 | ||
62 | AliGenHIJINGpara *gener = new AliGenHIJINGpara(50); | |
63 | gener->SetMomentumRange(0,999); | |
64 | gener->SetPhiRange(0,360); | |
65 | gener->SetThetaRange(10,170); | |
66 | gener->SetOrigin(0,0,0); //vertex position | |
67 | gener->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position | |
68 | gener->Init(); | |
69 | ||
70 | // Activate this line if you want the vertex smearing to happen | |
71 | // track by track | |
72 | ||
73 | //gener->SetVertexSmear(perTrack); | |
74 | ||
75 | // ============================= | |
76 | // Magnetic field | |
77 | // ============================= | |
78 | ||
79 | //?? gAlice->SetField(-999,2); //Specify maximum magnetic field in Tesla (neg. ==> default field) | |
80 | ||
81 | // ============================= | |
82 | // Alice modules | |
83 | // ============================= | |
84 | ||
85 | //Bool_t isSetInteractively = false; | |
86 | Bool_t isSetInteractively = true; | |
87 | ||
88 | if (!isSetInteractively) { | |
89 | ||
90 | // Load modules libraries | |
91 | gInterpreter->ProcessLine("detlibs()"); | |
92 | ||
93 | // Select modules | |
94 | ||
95 | Int_t iMAG=1; | |
96 | Int_t iITS=1; | |
97 | Int_t iTPC=1; | |
98 | Int_t iTOF=1; | |
99 | Int_t iRICH=1; | |
e6738716 | 100 | Int_t iZDC=0; |
0f507a31 | 101 | Int_t iCASTOR=1; |
102 | Int_t iTRD=1; | |
103 | Int_t iABSO=1; | |
104 | Int_t iDIPO=1; | |
105 | Int_t iHALL=1; | |
106 | Int_t iFRAME=1; | |
107 | Int_t iSHIL=1; | |
108 | Int_t iPIPE=1; | |
e6738716 | 109 | Int_t iFMD=1; |
0f507a31 | 110 | Int_t iMUON=1; |
111 | Int_t iPHOS=1; | |
112 | Int_t iPMD=1; | |
e6738716 | 113 | Int_t iSTART=0; |
0f507a31 | 114 | |
115 | // Exclude detectors that do not work with Geant4 | |
116 | iRICH=0; | |
0f507a31 | 117 | iCASTOR=0; |
d6880eca | 118 | // Detectors with temporary problem |
119 | iMUON=0; | |
120 | iFMD=0; | |
0f507a31 | 121 | |
122 | // From G3 Config.C | |
123 | // Without any modification | |
124 | ||
125 | //=================== Alice BODY parameters ============================= | |
126 | AliBODY *BODY = new AliBODY("BODY","Alice envelop"); | |
127 | ||
128 | ||
129 | if(iMAG) { | |
130 | //=================== MAG parameters ============================ | |
131 | // --- Start with Magnet since detector layouts may be depending --- | |
132 | // --- on the selected Magnet dimensions --- | |
133 | AliMAG *MAG = new AliMAG("MAG","Magnet"); | |
134 | } | |
135 | ||
136 | ||
137 | if(iABSO) { | |
138 | //=================== ABSO parameters ============================ | |
139 | AliABSO *ABSO = new AliABSOv0("ABSO","Muon Absorber"); | |
140 | } | |
141 | ||
142 | if(iDIPO) { | |
143 | //=================== DIPO parameters ============================ | |
144 | ||
145 | AliDIPO *DIPO = new AliDIPOv2("DIPO","Dipole version 2"); | |
146 | } | |
147 | ||
148 | if(iHALL) { | |
149 | //=================== HALL parameters ============================ | |
150 | ||
151 | AliHALL *HALL = new AliHALL("HALL","Alice Hall"); | |
152 | } | |
153 | ||
154 | ||
155 | if(iFRAME) { | |
156 | //=================== FRAME parameters ============================ | |
157 | ||
158 | AliFRAME *FRAME = new AliFRAMEv1("FRAME","Space Frame"); | |
159 | ||
160 | } | |
161 | ||
162 | if(iSHIL) { | |
163 | //=================== SHIL parameters ============================ | |
164 | ||
165 | AliSHIL *SHIL = new AliSHILv0("SHIL","Shielding"); | |
166 | } | |
167 | ||
168 | ||
169 | if(iPIPE) { | |
170 | //=================== PIPE parameters ============================ | |
171 | ||
172 | AliPIPE *PIPE = new AliPIPEv0("PIPE","Beam Pipe"); | |
173 | } | |
174 | ||
175 | ||
176 | if(iITS) { | |
177 | //=================== ITS parameters ============================ | |
178 | // | |
179 | // EUCLID is a flag to output (=1) both geometry and media to two ASCII files | |
180 | // (called by default ITSgeometry.euc and ITSgeometry.tme) in a format | |
181 | // understandable to the CAD system EUCLID. The default (=0) means that you | |
182 | // dont want to use this facility. | |
183 | // | |
184 | AliITS *ITS = new AliITSv5("ITS","normal ITS"); | |
185 | ITS->SetEUCLID(0); | |
186 | } | |
187 | ||
188 | ||
189 | if(iTPC) { | |
190 | //============================ TPC parameters ================================ | |
191 | // --- This allows the user to specify sectors for the SLOW (TPC geometry 2) | |
192 | // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper) | |
193 | // --- sectors are specified, any value other than that requires at least one | |
194 | // --- sector (lower or upper)to be specified! | |
195 | // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0) | |
196 | // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0) | |
197 | // --- SecLows - number of lower sectors specified (up to 6) | |
198 | // --- SecUps - number of upper sectors specified (up to 12) | |
199 | // --- Sens - sensitive strips for the Slow Simulator !!! | |
200 | // --- This does NOT work if all S or L-sectors are specified, i.e. | |
201 | // --- if SecAL or SecAU < 0 | |
202 | // | |
203 | // | |
204 | //----------------------------------------------------------------------------- | |
205 | ||
e6738716 | 206 | // gROOT->LoadMacro("SetTPCParam.C"); |
207 | // AliTPCParam *param = SetTPCParam(); | |
208 | AliTPC *TPC = new AliTPCv1("TPC","Default"); //v1 is default | |
209 | // TPC->SetParam(param); // pass the parameter object to the TPC | |
0f507a31 | 210 | |
211 | // set gas mixture | |
212 | ||
e6738716 | 213 | //TPC->SetGasMixt(2,20,10,-1,0.9,0.1,0.); |
214 | //TPC->SetSecAL(4); | |
215 | //TPC->SetSecAU(4); | |
216 | //TPC->SetSecLows(1, 2, 3, 19, 20, 21); | |
217 | //TPC->SetSecUps(37, 38, 39, 37+18, 38+18, 39+18, -1, -1, -1, -1, -1, -1); | |
218 | //TPC->SetSens(1); | |
0f507a31 | 219 | |
e6738716 | 220 | //if (TPC->IsVersion()==1) param->Write(param->GetTitle()); |
0f507a31 | 221 | } |
222 | ||
223 | if(iTOF) { | |
224 | //=================== TOF parameters ============================ | |
225 | AliTOF *TOF = new AliTOFv1("TOF","normal TOF"); | |
226 | } | |
227 | ||
228 | if(iRICH) { | |
229 | //=================== RICH parameters =========================== | |
e6738716 | 230 | AliRICH *RICH = new AliRICHv1("RICH","normal RICH"); |
0f507a31 | 231 | |
0f507a31 | 232 | } |
233 | ||
234 | ||
235 | if(iZDC) { | |
236 | //=================== ZDC parameters ============================ | |
237 | ||
238 | AliZDC *ZDC = new AliZDCv1("ZDC","normal ZDC"); | |
239 | } | |
240 | ||
241 | if(iCASTOR) { | |
242 | //=================== CASTOR parameters ============================ | |
243 | ||
244 | AliCASTOR *CASTOR = new AliCASTORv1("CASTOR","normal CASTOR"); | |
245 | } | |
246 | ||
247 | if(iTRD) { | |
248 | //=================== TRD parameters ============================ | |
249 | ||
250 | AliTRD *TRD = new AliTRDv0("TRD","TRD fast simulator"); | |
251 | //TRD->SetHits(); | |
252 | ||
253 | //AliTRD *TRD = new AliTRDv1("TRD","TRD slow simulator"); | |
254 | //TRD->SetSensPlane(0); | |
255 | //TRD->SetSensChamber(2); | |
256 | //TRD->SetSensSector(17); | |
257 | ||
258 | // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2) | |
259 | TRD->SetGasMix(1); | |
260 | ||
261 | // With hole in front of PHOS | |
262 | TRD->SetPHOShole(); | |
263 | // With hole in front of RICH | |
264 | TRD->SetRICHhole(); | |
265 | } | |
266 | ||
267 | if(iFMD) { | |
268 | //=================== FMD parameters ============================ | |
269 | ||
270 | AliFMD *FMD = new AliFMDv1("FMD","normal FMD"); | |
271 | } | |
272 | ||
273 | if(iMUON) { | |
274 | //=================== MUON parameters =========================== | |
275 | ||
276 | AliMUON *MUON = new AliMUONv0("MUON","normal MUON"); | |
277 | ||
0f507a31 | 278 | } |
279 | ||
280 | //=================== PHOS parameters =========================== | |
281 | ||
282 | if(iPHOS) { | |
e6738716 | 283 | AliPHOS *PHOS = new AliPHOSv1("PHOS","GPS2"); |
0f507a31 | 284 | } |
285 | ||
286 | ||
287 | if(iPMD) { | |
288 | //=================== PMD parameters ============================ | |
289 | ||
290 | AliPMD *PMD = new AliPMDv0("PMD","normal PMD"); | |
291 | PMD->SetPAR(1., 1., 0.8, 0.02); | |
292 | PMD->SetIN(6., 18., -580., 27., 27.); | |
293 | PMD->SetGEO(0.0, 0.2, 4.); | |
294 | PMD->SetPadSize(0.8, 1.0, 1.0, 1.5); | |
295 | ||
296 | } | |
297 | ||
298 | if(iSTART) { | |
299 | //=================== START parameters ============================ | |
0889434d | 300 | AliSTART *START = new AliSTARTv1("START","START Detector"); |
0f507a31 | 301 | } |
302 | ||
0f507a31 | 303 | } // end (!isSetInteractively) |
304 | ||
305 | } |