]>
Commit | Line | Data |
---|---|---|
610a88ae | 1 | void Config() |
2 | { | |
3 | // | |
4 | // Set Random Number seed | |
5 | gRandom->SetSeed(12345); | |
6 | ||
7 | // ============================= | |
8 | // Geant4 | |
9 | ||
10 | // load Geant4 and AliRoot steer libraries | |
11 | if (!gInterpreter->IsLoaded("g4libs.C")) gROOT->LoadMacro("g4libs.C"); | |
12 | gInterpreter->ProcessLine("g4libs()"); | |
13 | gInterpreter->ProcessLine("steerlibs()"); | |
14 | ||
15 | // Create Geant4 | |
16 | if (!gInterpreter->IsLoaded("g4menu.C")) gROOT->LoadMacro("g4menu.C"); | |
17 | gInterpreter->ProcessLine("CreateGeant4()"); | |
18 | ||
19 | //======================================================================= | |
20 | // Create the output file | |
21 | ||
22 | TFile *rootfile = new TFile("galice.root","recreate"); | |
23 | rootfile->SetCompressionLevel(2); | |
24 | ||
25 | // | |
26 | // Set External decayer | |
27 | //AliDecayer* decayer = new AliDecayerPythia(); | |
f65f3af2 | 28 | //decayer->SetForceDecay(kAll); |
610a88ae | 29 | //decayer->Init(); |
30 | //gMC->SetExternalDecayer(decayer); | |
31 | ||
32 | //======================================================================= | |
33 | // ******* GEANT STEERING parameters FOR ALICE SIMULATION ******* | |
34 | // Physics process control | |
35 | // (in development) | |
36 | gMC ->SetProcess("DCAY",1); | |
37 | gMC ->SetProcess("PAIR",1); | |
38 | gMC ->SetProcess("COMP",1); | |
39 | gMC ->SetProcess("PHOT",1); | |
40 | gMC ->SetProcess("PFIS",0); | |
41 | gMC ->SetProcess("DRAY",0); | |
42 | gMC ->SetProcess("ANNI",1); | |
43 | gMC ->SetProcess("BREM",1); | |
44 | gMC ->SetProcess("MUNU",1); | |
45 | //xx gMC ->SetProcess("CKOV",1); | |
46 | gMC ->SetProcess("HADR",1); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3) | |
47 | gMC ->SetProcess("LOSS",2); | |
48 | gMC ->SetProcess("MULS",1); | |
49 | //xx gMC ->SetProcess("RAYL",1); | |
50 | ||
51 | // Energy cuts | |
52 | // (in development) | |
53 | Float_t cut = 1.e-3; // 1MeV cut by default | |
54 | gMC ->SetCut("CUTGAM",cut); | |
55 | gMC ->SetCut("CUTELE",cut); | |
56 | gMC ->SetCut("CUTNEU",cut); | |
57 | gMC ->SetCut("CUTHAD",cut); | |
58 | gMC ->SetCut("CUTMUO",cut); | |
59 | gMC ->SetCut("BCUTE",cut); | |
60 | gMC ->SetCut("BCUTM",cut); | |
61 | gMC ->SetCut("DCUTE",cut); | |
62 | gMC ->SetCut("DCUTM",cut); | |
63 | //xx gMC ->SetCut("PPCUTM",cut); | |
64 | ||
65 | // | |
66 | //======================================================================= | |
67 | // ************* STEERING parameters FOR ALICE SIMULATION ************** | |
68 | // --- Specify event type to be tracked through the ALICE setup | |
69 | // --- All positions are in cm, angles in degrees, and P and E in GeV | |
70 | //AliGenHIJINGpara *gener = new AliGenHIJINGpara(84210); | |
f65f3af2 | 71 | AliGenHIJINGpara *gener = new AliGenHIJINGpara(20000); |
610a88ae | 72 | gener->SetMomentumRange(0,999); |
73 | gener->SetPhiRange(0,360); | |
74 | // gener->SetThetaRange(0.28,179.72); | |
75 | gener->SetThetaRange(0.,180.); | |
76 | gener->SetOrigin(0,0,0); //vertex position | |
77 | gener->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position | |
78 | gener->Init(); | |
79 | // | |
80 | // Activate this line if you want the vertex smearing to happen | |
81 | // track by track | |
82 | // | |
83 | //gener->SetVertexSmear(perTrack); | |
84 | ||
85 | //gAlice->SetField(-999,2); //Specify maximum magnetic field in Tesla (neg. ==> default field) | |
86 | ||
87 | ||
88 | // ============================= | |
89 | // Alice modules | |
90 | ||
91 | //Bool_t isSetInteractively = false; | |
92 | Bool_t isSetInteractively = true; | |
93 | ||
94 | if (!isSetInteractively) { | |
95 | ||
96 | // Load modules libraries | |
97 | gInterpreter->ProcessLine("detlibs()"); | |
98 | ||
99 | // Select modules | |
100 | ||
101 | Int_t iABSO=1; | |
102 | Int_t iCASTOR=1; | |
103 | Int_t iDIPO=1; | |
104 | Int_t iFMD=1; | |
105 | Int_t iFRAME=1; | |
106 | Int_t iHALL=1; | |
107 | Int_t iITS=1; | |
108 | Int_t iMAG=1; | |
109 | Int_t iMUON=1; | |
110 | Int_t iPHOS=1; | |
111 | Int_t iPIPE=1; | |
112 | Int_t iPMD=1; | |
113 | Int_t iRICH=1; | |
114 | Int_t iSHIL=1; | |
115 | Int_t iSTART=1; | |
116 | Int_t iTOF=1; | |
117 | Int_t iTPC=1; | |
118 | Int_t iTRD=1; | |
119 | Int_t iZDC=1; | |
120 | ||
121 | // Exclude detectors that do not work with Geant4 | |
122 | iCASTOR=0; | |
123 | // Detectors with temporary problem | |
124 | iZDC=0; | |
125 | ||
126 | // From G3 ConfigPPR.C | |
127 | // Without any modification | |
128 | ||
129 | //=================== Alice BODY parameters ============================= | |
130 | AliBODY *BODY = new AliBODY("BODY","Alice envelop"); | |
131 | ||
132 | if(iMAG) { | |
133 | //=================== MAG parameters ============================ | |
134 | // --- Start with Magnet since detector layouts may be depending --- | |
135 | // --- on the selected Magnet dimensions --- | |
136 | AliMAG *MAG = new AliMAG("MAG","Magnet"); | |
137 | } | |
138 | ||
139 | ||
140 | if(iABSO) { | |
141 | //=================== ABSO parameters ============================ | |
142 | AliABSO *ABSO = new AliABSOv0("ABSO","Muon Absorber"); | |
143 | } | |
144 | ||
145 | if(iDIPO) { | |
146 | //=================== DIPO parameters ============================ | |
147 | ||
148 | AliDIPO *DIPO = new AliDIPOv2("DIPO","Dipole version 2"); | |
149 | } | |
150 | ||
151 | if(iHALL) { | |
152 | //=================== HALL parameters ============================ | |
153 | ||
154 | AliHALL *HALL = new AliHALL("HALL","Alice Hall"); | |
155 | } | |
156 | ||
157 | ||
158 | if(iFRAME) { | |
159 | //=================== FRAME parameters ============================ | |
160 | ||
161 | AliFRAME *FRAME = new AliFRAMEv1("FRAME","Space Frame"); | |
162 | ||
163 | } | |
164 | ||
165 | if(iSHIL) { | |
166 | //=================== SHIL parameters ============================ | |
167 | ||
168 | AliSHIL *SHIL = new AliSHILv0("SHIL","Shielding"); | |
169 | } | |
170 | ||
171 | ||
172 | if(iPIPE) { | |
173 | //=================== PIPE parameters ============================ | |
174 | ||
043ee3b8 | 175 | AliPIPE *PIPE = new AliPIPEv0("PIPE","Beam Pipe"); |
610a88ae | 176 | } |
177 | ||
178 | ||
179 | if(iITS) { | |
180 | //=================== ITS parameters ============================ | |
181 | // | |
182 | // As the innermost detector in ALICE, the Inner Tracking System "impacts" on | |
f65f3af2 | 183 | // almost all other detectors. This involves the fact that the ITS geometry |
184 | // still has several options to be followed in parallel in order to determine | |
610a88ae | 185 | // the best set-up which minimizes the induced background. All the geometries |
f65f3af2 | 186 | // available to date are described in the following. Read carefully the comments |
610a88ae | 187 | // and use the default version (the only one uncommented) unless you are making |
188 | // comparisons and you know what you are doing. In this case just uncomment the | |
f65f3af2 | 189 | // ITS geometry you want to use and run Aliroot. |
610a88ae | 190 | // |
f65f3af2 | 191 | // Detailed geometries: |
192 | ||
610a88ae | 193 | // |
194 | // | |
195 | //AliITS *ITS = new AliITSv3("ITS","Old ITS detailed version as of the ALICE TP"); | |
196 | // | |
197 | //AliITS *ITS = new AliITSv5("ITS","Current ITS detailed version used for the ITS TDR"); | |
198 | // | |
199 | //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services"); | |
200 | // | |
201 | AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services"); | |
202 | // | |
f65f3af2 | 203 | //AliITSvPPRasymm *ITS = new AliITSvPPRasymm("ITS","New ITS PPR detailed version with asymmetric services"); |
204 | //ITS->SetMinorVersion(2); | |
205 | //ITS->SetReadDet(kFALSE); | |
206 | //ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); | |
207 | //ITS->SetThicknessDet1(300.); // detector thickness on layer 1 must be in the range [100,300] | |
208 | //ITS->SetThicknessDet2(300.); // detector thickness on layer 2 must be in the range [100,300] | |
209 | //ITS->SetThicknessChip1(300.); // chip thickness on layer 1 must be in the range [150,300] | |
210 | //ITS->SetThicknessChip2(300.); // chip thickness on layer 2 must be in the range [150,300] | |
211 | //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out | |
212 | //ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon | |
213 | // | |
214 | //AliITSvPPRsymm *ITS = new AliITSvPPRsymm("ITS","New ITS PPR detailed version with symmetric services"); | |
215 | //ITS->SetMinorVersion(2); | |
216 | ||
217 | //ITS->SetReadDet(kFALSE); | |
218 | //ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRsymm2.det"); | |
219 | //ITS->SetThicknessDet1(300.); // detector thickness on layer 1 must be in the range [100,300] | |
220 | //ITS->SetThicknessDet2(300.); // detector thickness on layer 2 must be in the range [100,300] | |
221 | //ITS->SetThicknessChip1(300.); // chip thickness on layer 1 must be in the range [150,300] | |
222 | //ITS->SetThicknessChip2(300.); // chip thickness on layer 2 must be in the range [150,300] | |
223 | //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out | |
224 | //ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon | |
610a88ae | 225 | // |
f65f3af2 | 226 | // |
227 | // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful | |
228 | // for reconstruction !): | |
229 | // | |
610a88ae | 230 | // |
231 | // | |
232 | //AliITS *ITS = new AliITSv1("ITS","Old ITS coarse version as of the ALICE TP"); | |
233 | // | |
f65f3af2 | 234 | //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS coarse version with asymmetric services"); |
235 | //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out | |
236 | //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon | |
610a88ae | 237 | // |
238 | //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS coarse version with symmetric services"); | |
f65f3af2 | 239 | //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out |
240 | //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon | |
241 | // | |
610a88ae | 242 | // |
243 | // | |
244 | // Geant3 <-> EUCLID conversion | |
245 | // ============================ | |
246 | // | |
f65f3af2 | 247 | // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and |
248 | // media to two ASCII files (called by default ITSgeometry.euc and | |
249 | // ITSgeometry.tme) in a format understandable to the CAD system EUCLID. | |
610a88ae | 250 | // The default (=0) means that you dont want to use this facility. |
251 | // | |
f65f3af2 | 252 | ITS->SetEUCLID(0); |
610a88ae | 253 | } |
254 | ||
255 | ||
610a88ae | 256 | if(iTPC) { |
257 | //============================ TPC parameters ================================ | |
258 | // --- This allows the user to specify sectors for the SLOW (TPC geometry 2) | |
259 | // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper) | |
260 | // --- sectors are specified, any value other than that requires at least one | |
261 | // --- sector (lower or upper)to be specified! | |
262 | // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0) | |
263 | // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0) | |
264 | // --- SecLows - number of lower sectors specified (up to 6) | |
265 | // --- SecUps - number of upper sectors specified (up to 12) | |
266 | // --- Sens - sensitive strips for the Slow Simulator !!! | |
267 | // --- This does NOT work if all S or L-sectors are specified, i.e. | |
268 | // --- if SecAL or SecAU < 0 | |
269 | // | |
270 | // | |
271 | //----------------------------------------------------------------------------- | |
272 | ||
273 | // gROOT->LoadMacro("SetTPCParam.C"); | |
274 | // AliTPCParam *param = SetTPCParam(); | |
275 | AliTPC *TPC = new AliTPCv2("TPC","Default"); | |
276 | // All sectors included | |
277 | TPC->SetSecAL(-1); | |
278 | TPC->SetSecAU(-1); | |
279 | ||
280 | } | |
281 | ||
282 | ||
283 | if(iTOF) { | |
284 | //=================== TOF parameters ============================ | |
285 | AliTOF *TOF = new AliTOFv2("TOF","normal TOF"); | |
286 | } | |
287 | ||
288 | if(iRICH) { | |
289 | //=================== RICH parameters =========================== | |
290 | AliRICH *RICH = new AliRICHv1("RICH","normal RICH"); | |
610a88ae | 291 | } |
292 | ||
610a88ae | 293 | if(iZDC) { |
294 | //=================== ZDC parameters ============================ | |
610a88ae | 295 | AliZDC *ZDC = new AliZDCv1("ZDC","normal ZDC"); |
296 | } | |
297 | ||
298 | if(iCASTOR) { | |
299 | //=================== CASTOR parameters ============================ | |
300 | ||
301 | AliCASTOR *CASTOR = new AliCASTORv1("CASTOR","normal CASTOR"); | |
302 | } | |
303 | ||
304 | if(iTRD) { | |
305 | //=================== TRD parameters ============================ | |
306 | ||
307 | AliTRD *TRD = new AliTRDv1("TRD","TRD slow simulator"); | |
308 | ||
309 | // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2) | |
310 | TRD->SetGasMix(1); | |
311 | ||
312 | // With hole in front of PHOS | |
313 | TRD->SetPHOShole(); | |
314 | // With hole in front of RICH | |
315 | TRD->SetRICHhole(); | |
316 | // Switch on TR | |
317 | AliTRDsim *TRDsim = TRD->CreateTR(); | |
318 | } | |
319 | ||
320 | if(iFMD) { | |
321 | //=================== FMD parameters ============================ | |
322 | ||
323 | AliFMD *FMD = new AliFMDv0("FMD","normal FMD"); | |
324 | } | |
325 | ||
326 | if(iMUON) { | |
327 | //=================== MUON parameters =========================== | |
f65f3af2 | 328 | AliMUON *MUON = new AliMUONv1("MUON","default"); |
610a88ae | 329 | } |
330 | ||
331 | //=================== PHOS parameters =========================== | |
332 | ||
333 | if(iPHOS) { | |
334 | AliPHOS *PHOS = new AliPHOSv1("PHOS","GPS2"); | |
335 | } | |
336 | ||
337 | ||
338 | if(iPMD) { | |
339 | //=================== PMD parameters ============================ | |
340 | ||
341 | AliPMD *PMD = new AliPMDv1("PMD","normal PMD"); | |
342 | PMD->SetPAR(1., 1., 0.8, 0.02); | |
343 | PMD->SetIN(6., 18., -580., 27., 27.); | |
344 | PMD->SetGEO(0.0, 0.2, 4.); | |
345 | PMD->SetPadSize(0.8, 1.0, 1.0, 1.5); | |
346 | ||
347 | } | |
348 | ||
349 | if(iSTART) { | |
350 | //=================== START parameters ============================ | |
351 | AliSTART *START = new AliSTARTv1("START","START Detector"); | |
352 | } | |
353 | ||
354 | } // end (!isSetInteractively) | |
355 | ||
356 | } |