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