]>
Commit | Line | Data |
---|---|---|
04fa961a | 1 | void galice() |
2 | { | |
3 | AliRunLoader* runLoader = AliRunLoader::Open("galice.root", AliConfig::fgkDefaultEventFolderName, "recreate"); | |
4 | runLoader->SetCompressionLevel(2); | |
5 | runLoader->SetNumberOfEventsPerFile(1); | |
6 | gAlice->SetRunLoader(runLoader); | |
7 | ||
8 | gSystem->Load("libgeant321"); | |
9 | new TGeant3("C++ Interface to Geant3"); | |
10 | ||
11 | // Field (L3 0.4 T) | |
12 | AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., AliMagFMaps::k4kG); | |
13 | gAlice->SetField(field); | |
14 | ||
15 | Int_t iABSO = 0; | |
16 | Int_t iDIPO = 0; | |
17 | Int_t iFMD = 0; | |
18 | Int_t iFRAME = 0; | |
19 | Int_t iHALL = 0; | |
20 | Int_t iITS = 1; | |
21 | Int_t iMAG = 0; | |
22 | Int_t iMUON = 0; | |
23 | Int_t iPHOS = 0; | |
24 | Int_t iPIPE = 0; | |
25 | Int_t iPMD = 0; | |
26 | Int_t iRICH = 0; | |
27 | Int_t iSHIL = 0; | |
28 | Int_t iSTART = 0; | |
29 | Int_t iTOF = 0; | |
30 | Int_t iTPC = 1; | |
31 | Int_t iTRD = 0; | |
32 | Int_t iZDC = 0; | |
33 | Int_t iEMCAL = 0; | |
34 | Int_t iCRT = 0; | |
35 | Int_t iVZERO = 0; | |
36 | runLoader->CdGAFile(); | |
37 | //=================== Alice BODY parameters ============================= | |
38 | AliBODY *BODY = new AliBODY("BODY", "Alice envelop"); | |
39 | ||
40 | if (iMAG) | |
41 | { | |
42 | //=================== MAG parameters ============================ | |
43 | // --- Start with Magnet since detector layouts may be depending --- | |
44 | // --- on the selected Magnet dimensions --- | |
45 | AliMAG *MAG = new AliMAG("MAG", "Magnet"); | |
46 | } | |
47 | ||
48 | ||
49 | if (iABSO) | |
50 | { | |
51 | //=================== ABSO parameters ============================ | |
52 | AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber"); | |
53 | } | |
54 | ||
55 | if (iDIPO) | |
56 | { | |
57 | //=================== DIPO parameters ============================ | |
58 | ||
59 | AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2"); | |
60 | } | |
61 | ||
62 | if (iHALL) | |
63 | { | |
64 | //=================== HALL parameters ============================ | |
65 | ||
66 | AliHALL *HALL = new AliHALL("HALL", "Alice Hall"); | |
67 | } | |
68 | ||
69 | ||
70 | if (iFRAME) | |
71 | { | |
72 | //=================== FRAME parameters ============================ | |
73 | ||
74 | AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame"); | |
75 | if (geo == kHoles) { | |
76 | FRAME->SetHoles(1); | |
77 | } else { | |
78 | FRAME->SetHoles(0); | |
79 | } | |
80 | } | |
81 | ||
82 | if (iSHIL) | |
83 | { | |
84 | //=================== SHIL parameters ============================ | |
85 | ||
86 | AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding Version 2"); | |
87 | } | |
88 | ||
89 | ||
90 | if (iPIPE) | |
91 | { | |
92 | //=================== PIPE parameters ============================ | |
93 | ||
94 | AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe"); | |
95 | } | |
96 | ||
97 | if(iITS) { | |
98 | ||
99 | //=================== ITS parameters ============================ | |
100 | // | |
101 | // As the innermost detector in ALICE, the Inner Tracking System "impacts" on | |
102 | // almost all other detectors. This involves the fact that the ITS geometry | |
103 | // still has several options to be followed in parallel in order to determine | |
104 | // the best set-up which minimizes the induced background. All the geometries | |
105 | // available to date are described in the following. Read carefully the comments | |
106 | // and use the default version (the only one uncommented) unless you are making | |
107 | // comparisons and you know what you are doing. In this case just uncomment the | |
108 | // ITS geometry you want to use and run Aliroot. | |
109 | // | |
110 | // Detailed geometries: | |
111 | // | |
112 | // | |
113 | //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services"); | |
114 | // | |
115 | //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services"); | |
116 | // | |
117 | AliITSvPPRasymm *ITS = new AliITSvPPRasymm("ITS","New ITS PPR detailed version with asymmetric services"); | |
118 | ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer | |
119 | ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer | |
120 | // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer | |
121 | ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300] | |
122 | ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300] | |
123 | ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300] | |
124 | ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300] | |
125 | ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out | |
126 | ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon | |
127 | // | |
128 | //AliITSvPPRsymm *ITS = new AliITSvPPRsymm("ITS","New ITS PPR detailed version with symmetric services"); | |
129 | //ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer | |
130 | //ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer | |
131 | //ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRsymm2.det"); // don't touch this parameter if you're not an ITS developer | |
132 | //ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300] | |
133 | //ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300] | |
134 | //ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300] | |
135 | //ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300] | |
136 | //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out | |
137 | //ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon | |
138 | // | |
139 | // | |
140 | // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful | |
141 | // for reconstruction !): | |
142 | // | |
143 | // | |
144 | //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services"); | |
145 | //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out | |
146 | //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon | |
147 | // | |
148 | //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services"); | |
149 | //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out | |
150 | //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon | |
151 | // | |
152 | // | |
153 | // | |
154 | // Geant3 <-> EUCLID conversion | |
155 | // ============================ | |
156 | // | |
157 | // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and | |
158 | // media to two ASCII files (called by default ITSgeometry.euc and | |
159 | // ITSgeometry.tme) in a format understandable to the CAD system EUCLID. | |
160 | // The default (=0) means that you dont want to use this facility. | |
161 | // | |
162 | ITS->SetEUCLID(0); | |
163 | } | |
164 | ||
165 | if (iTPC) | |
166 | { | |
167 | //============================ TPC parameters ================================ | |
168 | // --- This allows the user to specify sectors for the SLOW (TPC geometry 2) | |
169 | // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper) | |
170 | // --- sectors are specified, any value other than that requires at least one | |
171 | // --- sector (lower or upper)to be specified! | |
172 | // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0) | |
173 | // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0) | |
174 | // --- SecLows - number of lower sectors specified (up to 6) | |
175 | // --- SecUps - number of upper sectors specified (up to 12) | |
176 | // --- Sens - sensitive strips for the Slow Simulator !!! | |
177 | // --- This does NOT work if all S or L-sectors are specified, i.e. | |
178 | // --- if SecAL or SecAU < 0 | |
179 | // | |
180 | // | |
181 | //----------------------------------------------------------------------------- | |
182 | ||
183 | // gROOT->LoadMacro("SetTPCParam.C"); | |
184 | // AliTPCParam *param = SetTPCParam(); | |
185 | AliTPC *TPC = new AliTPCv2("TPC", "Default"); | |
186 | ||
187 | // All sectors included | |
188 | TPC->SetSecAU(-1); | |
189 | TPC->SetSecAL(-1); | |
190 | } | |
191 | ||
192 | ||
193 | if (iTOF) { | |
194 | if (geo == kHoles) { | |
195 | //=================== TOF parameters ============================ | |
196 | AliTOF *TOF = new AliTOFv2FHoles("TOF", "TOF with Holes"); | |
197 | } else { | |
198 | AliTOF *TOF = new AliTOFv4T0("TOF", "normal TOF"); | |
199 | } | |
200 | } | |
201 | ||
202 | ||
203 | if (iRICH) | |
204 | { | |
205 | //=================== RICH parameters =========================== | |
206 | AliRICH *RICH = new AliRICHv3("RICH", "normal RICH"); | |
207 | ||
208 | } | |
209 | ||
210 | ||
211 | if (iZDC) | |
212 | { | |
213 | //=================== ZDC parameters ============================ | |
214 | ||
215 | AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC"); | |
216 | } | |
217 | ||
218 | if (iTRD) | |
219 | { | |
220 | //=================== TRD parameters ============================ | |
221 | ||
222 | AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator"); | |
223 | ||
224 | // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2) | |
225 | TRD->SetGasMix(1); | |
226 | if (geo == kHoles) { | |
227 | // With hole in front of PHOS | |
228 | TRD->SetPHOShole(); | |
229 | // With hole in front of RICH | |
230 | TRD->SetRICHhole(); | |
231 | } | |
232 | // Switch on TR | |
233 | AliTRDsim *TRDsim = TRD->CreateTR(); | |
234 | } | |
235 | ||
236 | if (iFMD) | |
237 | { | |
238 | //=================== FMD parameters ============================ | |
239 | AliFMD *FMD = new AliFMDv1("FMD", "normal FMD"); | |
240 | FMD->SetRingsSi1(256); | |
241 | FMD->SetRingsSi2(128); | |
242 | FMD->SetSectorsSi1(20); | |
243 | FMD->SetSectorsSi2(40); | |
244 | } | |
245 | ||
246 | if (iMUON) | |
247 | { | |
248 | //=================== MUON parameters =========================== | |
249 | ||
250 | AliMUON *MUON = new AliMUONv1("MUON", "default"); | |
251 | } | |
252 | //=================== PHOS parameters =========================== | |
253 | ||
254 | if (iPHOS) | |
255 | { | |
256 | AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP"); | |
257 | } | |
258 | ||
259 | ||
260 | if (iPMD) | |
261 | { | |
262 | //=================== PMD parameters ============================ | |
263 | AliPMD *PMD = new AliPMDv1("PMD", "normal PMD"); | |
264 | } | |
265 | ||
266 | if (iSTART) | |
267 | { | |
268 | //=================== START parameters ============================ | |
269 | AliSTART *START = new AliSTARTv1("START", "START Detector"); | |
270 | } | |
271 | ||
272 | if (iEMCAL) | |
273 | { | |
274 | //=================== EMCAL parameters ============================ | |
275 | AliEMCAL *EMCAL = new AliEMCALv1("EMCAL", "EMCALArch1a"); | |
276 | } | |
277 | ||
278 | if (iCRT) | |
279 | { | |
280 | //=================== CRT parameters ============================ | |
281 | AliCRT *CRT = new AliCRTv0("CRT", "normal ACORDE"); | |
282 | } | |
283 | ||
284 | if (iVZERO) | |
285 | { | |
286 | //=================== CRT parameters ============================ | |
287 | AliVZERO *VZERO = new AliVZEROv2("VZERO", "normal VZERO"); | |
288 | } | |
289 | ||
290 | AliConfig::Instance()->Add(gMC); | |
291 | gMC->Init(); | |
292 | gAlice->InitLoaders(); | |
293 | gAlice->Write(); | |
294 | runLoader->MakeTree("E"); | |
295 | runLoader->Write(); | |
296 | delete runLoader; | |
297 | } |