]>
Commit | Line | Data |
---|---|---|
fe4da5cc | 1 | void Config() |
2 | { | |
2ab0c725 | 3 | // 7-DEC-2000 09:00 |
4 | // Switch on Transition Radiation simulation. 6/12/00 18:00 | |
5 | // iZDC=1 7/12/00 09:00 | |
6 | // ThetaRange is (0., 180.). It was (0.28,179.72) 7/12/00 09:00 | |
7 | ||
8 | new AliGeant3("C++ Interface to Geant3"); | |
9 | ||
10 | if (!gSystem->Getenv("CONFIG_FILE")) { | |
11 | TFile *rootfile = new TFile("galice.root","recreate"); | |
12 | rootfile->SetCompressionLevel(2); | |
13 | } | |
14 | ||
15 | TGeant3 *geant3 = (TGeant3*)gMC; | |
16 | // | |
17 | // Set External decayer | |
18 | AliDecayer* decayer = new AliDecayerPythia(); | |
11a136ef | 19 | decayer->SetForceDecay(kAll); |
2ab0c725 | 20 | decayer->Init(); |
21 | gMC->SetExternalDecayer(decayer); | |
22 | // | |
23 | // | |
24 | //======================================================================= | |
25 | // ******* GEANT STEERING parameters FOR ALICE SIMULATION ******* | |
26 | geant3->SetTRIG(1); //Number of events to be processed | |
27 | geant3->SetSWIT(4,10); | |
28 | geant3->SetDEBU(0,0,1); | |
29 | //geant3->SetSWIT(2,2); | |
30 | geant3->SetDCAY(1); | |
31 | geant3->SetPAIR(1); | |
32 | geant3->SetCOMP(1); | |
33 | geant3->SetPHOT(1); | |
34 | geant3->SetPFIS(0); | |
35 | geant3->SetDRAY(0); | |
36 | geant3->SetANNI(1); | |
37 | geant3->SetBREM(1); | |
38 | geant3->SetMUNU(1); | |
39 | geant3->SetCKOV(1); | |
40 | geant3->SetHADR(1); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3) | |
41 | geant3->SetLOSS(2); | |
42 | geant3->SetMULS(1); | |
43 | geant3->SetRAYL(1); | |
44 | geant3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0) | |
45 | geant3->SetABAN(0); //Restore 3.16 behaviour for abandoned tracks | |
46 | geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2) | |
47 | geant3->SetERAN(5.e-7); | |
48 | ||
49 | Float_t cut = 1.e-3; // 1MeV cut by default | |
50 | Float_t tofmax = 1.e10; | |
51 | // GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX | |
52 | geant3->SetCUTS(cut,cut, cut, cut, cut, cut, cut, cut, cut, cut, tofmax); | |
53 | // | |
54 | //======================================================================= | |
55 | // ************* STEERING parameters FOR ALICE SIMULATION ************** | |
56 | // --- Specify event type to be tracked through the ALICE setup | |
57 | // --- All positions are in cm, angles in degrees, and P and E in GeV | |
58 | if (gSystem->Getenv("CONFIG_NPARTICLES")) { | |
59 | int nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES")); | |
60 | } else { | |
61 | int nParticles = 50; | |
62 | } | |
63 | AliGenHIJINGpara *gener = new AliGenHIJINGpara(nParticles); | |
64 | ||
65 | gener->SetMomentumRange(0,999); | |
66 | gener->SetPhiRange(0,360); | |
67 | // gener->SetThetaRange(0.28,179.72); | |
68 | gener->SetThetaRange(0.,180.); | |
69 | gener->SetOrigin(0,0,0); //vertex position | |
70 | gener->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position | |
71 | gener->Init(); | |
72 | // | |
73 | // Activate this line if you want the vertex smearing to happen | |
74 | // track by track | |
75 | // | |
76 | //gener->SetVertexSmear(perTrack); | |
77 | ||
78 | gAlice->SetField(-999,2); //Specify maximum magnetic field in Tesla (neg. ==> default field) | |
79 | ||
80 | Int_t iABSO=1; | |
81 | Int_t iCASTOR=1; | |
82 | Int_t iDIPO=1; | |
83 | Int_t iFMD=1; | |
84 | Int_t iFRAME=1; | |
85 | Int_t iHALL=1; | |
86 | Int_t iITS=1; | |
87 | Int_t iMAG=1; | |
88 | Int_t iMUON=1; | |
89 | Int_t iPHOS=1; | |
90 | Int_t iPIPE=1; | |
91 | Int_t iPMD=1; | |
92 | Int_t iRICH=1; | |
93 | Int_t iSHIL=1; | |
94 | Int_t iSTART=1; | |
95 | Int_t iTOF=1; | |
96 | Int_t iTPC=1; | |
97 | Int_t iTRD=1; | |
98 | Int_t iZDC=1; | |
99 | ||
100 | //=================== Alice BODY parameters ============================= | |
101 | AliBODY *BODY = new AliBODY("BODY","Alice envelop"); | |
102 | ||
103 | ||
104 | if(iMAG) { | |
105 | //=================== MAG parameters ============================ | |
106 | // --- Start with Magnet since detector layouts may be depending --- | |
107 | // --- on the selected Magnet dimensions --- | |
108 | AliMAG *MAG = new AliMAG("MAG","Magnet"); | |
109 | } | |
110 | ||
111 | ||
112 | if(iABSO) { | |
113 | //=================== ABSO parameters ============================ | |
114 | AliABSO *ABSO = new AliABSOv0("ABSO","Muon Absorber"); | |
115 | } | |
116 | ||
117 | if(iDIPO) { | |
118 | //=================== DIPO parameters ============================ | |
119 | ||
120 | AliDIPO *DIPO = new AliDIPOv2("DIPO","Dipole version 2"); | |
121 | } | |
122 | ||
123 | if(iHALL) { | |
124 | //=================== HALL parameters ============================ | |
125 | ||
126 | AliHALL *HALL = new AliHALL("HALL","Alice Hall"); | |
127 | } | |
128 | ||
129 | ||
130 | if(iFRAME) { | |
131 | //=================== FRAME parameters ============================ | |
132 | ||
3103ed57 | 133 | AliFRAME *FRAME = new AliFRAMEv2("FRAME","Space Frame"); |
2ab0c725 | 134 | |
135 | } | |
136 | ||
137 | if(iSHIL) { | |
138 | //=================== SHIL parameters ============================ | |
139 | ||
140 | AliSHIL *SHIL = new AliSHILv0("SHIL","Shielding"); | |
141 | } | |
142 | ||
143 | ||
144 | if(iPIPE) { | |
145 | //=================== PIPE parameters ============================ | |
146 | ||
e8ae4d03 | 147 | AliPIPE *PIPE = new AliPIPEv0("PIPE","Beam Pipe"); |
2ab0c725 | 148 | } |
149 | ||
2ab0c725 | 150 | if(iITS) { |
d551411b | 151 | |
152 | //=================== ITS parameters ============================ | |
2ab0c725 | 153 | // |
154 | // As the innermost detector in ALICE, the Inner Tracking System "impacts" on | |
d551411b | 155 | // almost all other detectors. This involves the fact that the ITS geometry |
156 | // still has several options to be followed in parallel in order to determine | |
2ab0c725 | 157 | // the best set-up which minimizes the induced background. All the geometries |
d551411b | 158 | // available to date are described in the following. Read carefully the comments |
2ab0c725 | 159 | // and use the default version (the only one uncommented) unless you are making |
160 | // comparisons and you know what you are doing. In this case just uncomment the | |
d551411b | 161 | // ITS geometry you want to use and run Aliroot. |
2ab0c725 | 162 | // |
d551411b | 163 | // Detailed geometries: |
2ab0c725 | 164 | // |
2ab0c725 | 165 | // |
2ab0c725 | 166 | // |
167 | //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services"); | |
168 | // | |
169 | AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services"); | |
170 | // | |
d551411b | 171 | //AliITSvPPRasymm *ITS = new AliITSvPPRasymm("ITS","New ITS PPR detailed version with asymmetric services"); |
172 | //ITS->SetMinorVersion(2); | |
173 | //ITS->SetReadDet(kFALSE); | |
174 | //ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); | |
175 | //ITS->SetThicknessDet1(300.); // detector thickness on layer 1 must be in the range [100,300] | |
176 | //ITS->SetThicknessDet2(300.); // detector thickness on layer 2 must be in the range [100,300] | |
177 | //ITS->SetThicknessChip1(300.); // chip thickness on layer 1 must be in the range [150,300] | |
178 | //ITS->SetThicknessChip2(300.); // chip thickness on layer 2 must be in the range [150,300] | |
f958a183 | 179 | //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out |
180 | //ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon | |
d551411b | 181 | // |
182 | //AliITSvPPRsymm *ITS = new AliITSvPPRsymm("ITS","New ITS PPR detailed version with symmetric services"); | |
f958a183 | 183 | //ITS->SetMinorVersion(2); |
d551411b | 184 | //ITS->SetReadDet(kFALSE); |
185 | //ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRsymm2.det"); | |
186 | //ITS->SetThicknessDet1(300.); // detector thickness on layer 1 must be in the range [100,300] | |
187 | //ITS->SetThicknessDet2(300.); // detector thickness on layer 2 must be in the range [100,300] | |
188 | //ITS->SetThicknessChip1(300.); // chip thickness on layer 1 must be in the range [150,300] | |
189 | //ITS->SetThicknessChip2(300.); // chip thickness on layer 2 must be in the range [150,300] | |
190 | //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out | |
191 | //ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon | |
192 | // | |
193 | // | |
194 | // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful | |
195 | // for reconstruction !): | |
196 | // | |
2ab0c725 | 197 | // |
198 | // | |
d551411b | 199 | //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS coarse version with asymmetric services"); |
200 | //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out | |
201 | //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon | |
2ab0c725 | 202 | // |
203 | //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS coarse version with symmetric services"); | |
d551411b | 204 | //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out |
205 | //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon | |
206 | // | |
2ab0c725 | 207 | // |
208 | // | |
209 | // Geant3 <-> EUCLID conversion | |
210 | // ============================ | |
211 | // | |
d551411b | 212 | // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and |
213 | // media to two ASCII files (called by default ITSgeometry.euc and | |
214 | // ITSgeometry.tme) in a format understandable to the CAD system EUCLID. | |
2ab0c725 | 215 | // The default (=0) means that you dont want to use this facility. |
216 | // | |
d551411b | 217 | ITS->SetEUCLID(0); |
2ab0c725 | 218 | } |
d551411b | 219 | |
2ab0c725 | 220 | if(iTPC) { |
221 | //============================ TPC parameters ================================ | |
222 | // --- This allows the user to specify sectors for the SLOW (TPC geometry 2) | |
223 | // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper) | |
224 | // --- sectors are specified, any value other than that requires at least one | |
225 | // --- sector (lower or upper)to be specified! | |
226 | // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0) | |
227 | // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0) | |
228 | // --- SecLows - number of lower sectors specified (up to 6) | |
229 | // --- SecUps - number of upper sectors specified (up to 12) | |
230 | // --- Sens - sensitive strips for the Slow Simulator !!! | |
231 | // --- This does NOT work if all S or L-sectors are specified, i.e. | |
232 | // --- if SecAL or SecAU < 0 | |
233 | // | |
234 | // | |
235 | //----------------------------------------------------------------------------- | |
236 | ||
237 | // gROOT->LoadMacro("SetTPCParam.C"); | |
238 | // AliTPCParam *param = SetTPCParam(); | |
239 | AliTPC *TPC = new AliTPCv2("TPC","Default"); | |
240 | // All sectors included | |
241 | TPC->SetSecAL(-1); | |
242 | TPC->SetSecAU(-1); | |
243 | ||
244 | } | |
245 | ||
246 | if(iTOF) { | |
247 | //=================== TOF parameters ============================ | |
248 | AliTOF *TOF = new AliTOFv2("TOF","normal TOF"); | |
249 | } | |
250 | ||
251 | if(iRICH) { | |
252 | //=================== RICH parameters =========================== | |
4a67c433 | 253 | AliRICH *RICH = new AliRICHv1("RICH","normal RICH"); |
8de40c27 | 254 | |
2ab0c725 | 255 | } |
fe4da5cc | 256 | |
8de40c27 | 257 | |
2ab0c725 | 258 | if(iZDC) { |
259 | //=================== ZDC parameters ============================ | |
fe4da5cc | 260 | |
2ab0c725 | 261 | AliZDC *ZDC = new AliZDCv1("ZDC","normal ZDC"); |
262 | } | |
fe4da5cc | 263 | |
2ab0c725 | 264 | if(iCASTOR) { |
265 | //=================== CASTOR parameters ============================ | |
fe4da5cc | 266 | |
2ab0c725 | 267 | AliCASTOR *CASTOR = new AliCASTORv1("CASTOR","normal CASTOR"); |
268 | } | |
fe4da5cc | 269 | |
2ab0c725 | 270 | if(iTRD) { |
271 | //=================== TRD parameters ============================ | |
adc10334 | 272 | |
2ab0c725 | 273 | AliTRD *TRD = new AliTRDv1("TRD","TRD slow simulator"); |
adc10334 | 274 | |
2ab0c725 | 275 | // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2) |
276 | TRD->SetGasMix(1); | |
adc10334 | 277 | |
2ab0c725 | 278 | // With hole in front of PHOS |
279 | TRD->SetPHOShole(); | |
280 | // With hole in front of RICH | |
281 | TRD->SetRICHhole(); | |
282 | // Switch on TR | |
283 | AliTRDsim *TRDsim = TRD->CreateTR(); | |
284 | } | |
285 | ||
286 | if(iFMD) { | |
287 | //=================== FMD parameters ============================ | |
288 | ||
a8a6107b | 289 | AliFMD *FMD = new AliFMDv0("FMD","normal FMD"); |
2ab0c725 | 290 | } |
291 | ||
292 | if(iMUON) { | |
293 | //=================== MUON parameters =========================== | |
294 | ||
6d4be3d3 | 295 | AliMUON *MUON = new AliMUONv1("MUON","default"); |
2ab0c725 | 296 | } |
0f5936af | 297 | |
2ab0c725 | 298 | //=================== PHOS parameters =========================== |
fe4da5cc | 299 | |
2ab0c725 | 300 | if(iPHOS) { |
301 | AliPHOS *PHOS = new AliPHOSv1("PHOS","GPS2"); | |
302 | } | |
fe4da5cc | 303 | |
8dfe31df | 304 | |
2ab0c725 | 305 | if(iPMD) { |
306 | //=================== PMD parameters ============================ | |
fe4da5cc | 307 | |
2ab0c725 | 308 | AliPMD *PMD = new AliPMDv1("PMD","normal PMD"); |
309 | PMD->SetPAR(1., 1., 0.8, 0.02); | |
310 | PMD->SetIN(6., 18., -580., 27., 27.); | |
311 | PMD->SetGEO(0.0, 0.2, 4.); | |
312 | PMD->SetPadSize(0.8, 1.0, 1.0, 1.5); | |
ecd5c1f7 | 313 | |
2ab0c725 | 314 | } |
b422f318 | 315 | |
2ab0c725 | 316 | if(iSTART) { |
317 | //=================== START parameters ============================ | |
318 | AliSTART *START = new AliSTARTv1("START","START Detector"); | |
319 | } | |
b422f318 | 320 | |
fe4da5cc | 321 | |
322 | } | |
2ab0c725 | 323 |