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