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