]>
Commit | Line | Data |
---|---|---|
9123a941 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | #include "AliRICHv3.h" | |
17 | #include "AliRun.h" | |
9123a941 | 18 | #include "AliMC.h" |
19 | #include "AliMagF.h" | |
9123a941 | 20 | |
21 | #include <iostream.h> | |
22 | #include <TNode.h> | |
23 | #include <TGeometry.h> | |
24 | #include <TBRIK.h> | |
25 | ||
ae714751 | 26 | #include "AliRICHGeometry.h" |
27 | #include "AliRICHSegmentationV1.h" | |
28 | #include "AliRICHResponseV0.h" | |
29 | ||
30 | ||
9123a941 | 31 | |
32 | ClassImp(AliRICHv3) | |
33 | ||
34 | AliRICHv3::AliRICHv3(const char *pcName, const char *pcTitle) | |
35 | :AliRICH(pcName,pcTitle) | |
36 | { | |
ae714751 | 37 | cout<<ClassName()<<"::named ctor>\n"; // no way to control it as ctor is called before call to SetDebugXXXX() |
9123a941 | 38 | |
ae714751 | 39 | fCkovNumber=fFreonProd=fDebugLevel=0; |
40 | ||
41 | AliRICHGeometry *pRICHGeometry =new AliRICHGeometry; | |
42 | AliRICHSegmentationV1 *pRICHSegmentation=new AliRICHSegmentationV1; | |
43 | AliRICHResponseV0 *pRICHResponse =new AliRICHResponseV0; | |
44 | ||
9123a941 | 45 | fChambers = new TObjArray(kNCH); |
46 | for (Int_t i=0; i<kNCH; i++){ | |
47 | fChambers->AddAt(new AliRICHChamber,i); | |
ae714751 | 48 | SetGeometryModel(i,pRICHGeometry); |
49 | SetSegmentationModel(i,pRICHSegmentation); | |
50 | SetResponseModel(i,pRICHResponse); | |
9123a941 | 51 | ((AliRICHChamber*)fChambers->At(i))->Init(i); |
52 | } | |
53 | }//AliRICHv3::ctor(const char *pcName, const char *pcTitle) | |
54 | ||
55 | void AliRICHv3::CreateMaterials() | |
56 | { | |
ae714751 | 57 | if(IsDebugStart()) cout<<ClassName()<<"::CreateMaterials()>\n"; |
9123a941 | 58 | |
59 | // | |
60 | // Defines all RICH materials | |
61 | // | |
62 | Int_t isxfld = gAlice->Field()->Integ(); | |
63 | Float_t sxmgmx = gAlice->Field()->Max(); | |
64 | Int_t i; | |
65 | ||
66 | ||
67 | //Photons energy intervals | |
68 | Float_t ppckov[26]; | |
69 | for (i=0;i<26;i++) | |
70 | { | |
71 | ppckov[i] = (Float_t(i)*0.1+5.5)*1e-9; | |
72 | //printf ("Energy intervals: %e\n",ppckov[i]); | |
73 | } | |
74 | ||
75 | ||
76 | //Refraction index for quarz | |
77 | Float_t rIndexQuarz[26]; | |
78 | Float_t e1= 10.666; | |
79 | Float_t e2= 18.125; | |
80 | Float_t f1= 46.411; | |
81 | Float_t f2= 228.71; | |
82 | for (i=0;i<26;i++) | |
83 | { | |
84 | Float_t ene=ppckov[i]*1e9; | |
85 | Float_t a=f1/(e1*e1 - ene*ene); | |
86 | Float_t b=f2/(e2*e2 - ene*ene); | |
87 | rIndexQuarz[i] = TMath::Sqrt(1. + a + b ); | |
88 | //printf ("rIndexQuarz: %e\n",rIndexQuarz[i]); | |
89 | } | |
90 | ||
91 | //Refraction index for opaque quarz, methane and grid | |
92 | Float_t rIndexOpaqueQuarz[26]; | |
93 | Float_t rIndexMethane[26]; | |
94 | Float_t rIndexGrid[26]; | |
95 | for (i=0;i<26;i++) | |
96 | { | |
97 | rIndexOpaqueQuarz[i]=1; | |
98 | rIndexMethane[i]=1.000444; | |
99 | rIndexGrid[i]=1; | |
100 | //printf ("rIndexOpaqueQuarz , etc: %e, %e, %e\n",rIndexOpaqueQuarz[i], rIndexMethane[i], rIndexGrid[i]=1); | |
101 | } | |
102 | ||
103 | //Absorption index for freon | |
104 | Float_t abscoFreon[26] = {179.0987, 179.0987, 179.0987, 179.0987, 179.0987, 179.0987, 179.0987, 179.0987, | |
105 | 179.0987, 142.9206, 56.64957, 25.58622, 13.95293, 12.03905, 10.42953, 8.804196, | |
106 | 7.069031, 4.461292, 2.028366, 1.293013, .577267, .40746, .334964, 0., 0., 0.}; | |
107 | ||
108 | ||
109 | Float_t abscoQuarz [26] = {105.8, 65.52, 48.58, 42.85, 35.79, 31.262, 28.598, 27.527, 25.007, 22.815, 21.004, | |
110 | 19.266, 17.525, 15.878, 14.177, 11.719, 9.282, 6.62, 4.0925, 2.601, 1.149, .667, .3627, | |
111 | .192, .1497, .10857}; | |
112 | ||
113 | //Absorption index for methane | |
114 | Float_t abscoMethane[26]; | |
115 | for (i=0;i<26;i++) | |
116 | { | |
117 | abscoMethane[i]=AbsoCH4(ppckov[i]*1e9); | |
118 | //printf("abscoMethane: %e for energy: %e\n", abscoMethane[i],ppckov[i]*1e9); | |
119 | } | |
120 | ||
121 | //Absorption index for opaque quarz, csi and grid, efficiency for all and grid | |
122 | Float_t abscoOpaqueQuarz[26]; | |
123 | Float_t abscoCsI[26]; | |
124 | Float_t abscoGrid[26]; | |
125 | Float_t efficAll[26]; | |
126 | Float_t efficGrid[26]; | |
127 | for (i=0;i<26;i++) | |
128 | { | |
129 | abscoOpaqueQuarz[i]=1e-5; | |
130 | abscoCsI[i]=1e-4; | |
131 | abscoGrid[i]=1e-4; | |
132 | efficAll[i]=1; | |
133 | efficGrid[i]=1; | |
134 | } | |
135 | ||
136 | //Efficiency for csi | |
137 | ||
138 | Float_t efficCsI[26] = {0.000199999995, 0.000600000028, 0.000699999975, 0.00499999989, 0.00749999983, 0.010125, | |
139 | 0.0242999997, 0.0405000001, 0.0688500032, 0.105299994, 0.121500008, 0.141749993, 0.157949999, | |
140 | 0.162, 0.166050002, 0.167669997, 0.174299985, 0.176789999, 0.179279998, 0.182599992, 0.18592, | |
141 | 0.187579989, 0.189239994, 0.190899998, 0.207499996, 0.215799987}; | |
142 | ||
143 | ||
144 | ||
145 | //FRESNEL LOSS CORRECTION FOR PERPENDICULAR INCIDENCE AND | |
146 | //UNPOLARIZED PHOTONS | |
147 | ||
148 | for (i=0;i<26;i++) | |
149 | { | |
150 | efficCsI[i] = efficCsI[i]/(1.-Fresnel(ppckov[i]*1e9,1.,0)); | |
151 | } | |
152 | ||
153 | ||
154 | Float_t afre[2], agri, amet[2], aqua[2], ahon, zfre[2], zgri, zhon, | |
155 | zmet[2], zqua[2]; | |
156 | Int_t nlmatfre; | |
157 | Float_t densquao; | |
158 | Int_t nlmatmet, nlmatqua; | |
159 | Float_t wmatquao[2], rIndexFreon[26]; | |
160 | Float_t aquao[2], epsil, stmin, zquao[2]; | |
161 | Int_t nlmatquao; | |
162 | Float_t radlal, densal, tmaxfd, deemax, stemax; | |
163 | Float_t aal, zal, radlgri, densfre, radlhon, densgri, denshon,densqua, densmet, wmatfre[2], wmatmet[2], wmatqua[2]; | |
164 | ||
165 | Int_t *idtmed = fIdtmed->GetArray()-999; | |
166 | ||
167 | // --- Photon energy (GeV) | |
168 | // --- Refraction indexes | |
169 | for (i = 0; i < 26; ++i) { | |
170 | rIndexFreon[i] = ppckov[i] * .0172 * 1e9 + 1.177; | |
171 | //rIndexFreon[i] = 1; | |
172 | //printf ("rIndexFreon: %e \n efficCsI: %e for energy: %e\n",rIndexFreon[i], efficCsI[i], ppckov[i]); | |
173 | } | |
174 | ||
175 | // --- Detection efficiencies (quantum efficiency for CsI) | |
176 | // --- Define parameters for honeycomb. | |
177 | // Used carbon of equivalent rad. lenght | |
178 | ||
179 | ahon = 12.01; | |
180 | zhon = 6.; | |
181 | denshon = 0.1; | |
182 | radlhon = 18.8; | |
183 | ||
184 | // --- Parameters to include in GSMIXT, relative to Quarz (SiO2) | |
185 | ||
186 | aqua[0] = 28.09; | |
187 | aqua[1] = 16.; | |
188 | zqua[0] = 14.; | |
189 | zqua[1] = 8.; | |
190 | densqua = 2.64; | |
191 | nlmatqua = -2; | |
192 | wmatqua[0] = 1.; | |
193 | wmatqua[1] = 2.; | |
194 | ||
195 | // --- Parameters to include in GSMIXT, relative to opaque Quarz (SiO2) | |
196 | ||
197 | aquao[0] = 28.09; | |
198 | aquao[1] = 16.; | |
199 | zquao[0] = 14.; | |
200 | zquao[1] = 8.; | |
201 | densquao = 2.64; | |
202 | nlmatquao = -2; | |
203 | wmatquao[0] = 1.; | |
204 | wmatquao[1] = 2.; | |
205 | ||
206 | // --- Parameters to include in GSMIXT, relative to Freon (C6F14) | |
207 | ||
208 | afre[0] = 12.; | |
209 | afre[1] = 19.; | |
210 | zfre[0] = 6.; | |
211 | zfre[1] = 9.; | |
212 | densfre = 1.7; | |
213 | nlmatfre = -2; | |
214 | wmatfre[0] = 6.; | |
215 | wmatfre[1] = 14.; | |
216 | ||
217 | // --- Parameters to include in GSMIXT, relative to methane (CH4) | |
218 | ||
219 | amet[0] = 12.01; | |
220 | amet[1] = 1.; | |
221 | zmet[0] = 6.; | |
222 | zmet[1] = 1.; | |
223 | densmet = 7.17e-4; | |
224 | nlmatmet = -2; | |
225 | wmatmet[0] = 1.; | |
226 | wmatmet[1] = 4.; | |
227 | ||
228 | // --- Parameters to include in GSMIXT, relative to anode grid (Cu) | |
229 | ||
230 | agri = 63.54; | |
231 | zgri = 29.; | |
232 | densgri = 8.96; | |
233 | radlgri = 1.43; | |
234 | ||
235 | // --- Parameters to include in GSMATE related to aluminium sheet | |
236 | ||
237 | aal = 26.98; | |
238 | zal = 13.; | |
239 | densal = 2.7; | |
240 | radlal = 8.9; | |
241 | ||
242 | // --- Glass parameters | |
243 | ||
244 | Float_t aglass[5]={12.01, 28.09, 16., 10.8, 23.}; | |
245 | Float_t zglass[5]={ 6., 14., 8., 5., 11.}; | |
246 | Float_t wglass[5]={ 0.5, 0.105, 0.355, 0.03, 0.01}; | |
247 | Float_t dglass=1.74; | |
248 | ||
249 | ||
250 | AliMaterial(1, "Air $", 14.61, 7.3, .001205, 30420., 67500); | |
251 | AliMaterial(6, "HON", ahon, zhon, denshon, radlhon, 0); | |
252 | AliMaterial(16, "CSI", ahon, zhon, denshon, radlhon, 0); | |
253 | AliMixture(20, "QUA", aqua, zqua, densqua, nlmatqua, wmatqua); | |
254 | AliMixture(21, "QUAO", aquao, zquao, densquao, nlmatquao, wmatquao); | |
255 | AliMixture(30, "FRE", afre, zfre, densfre, nlmatfre, wmatfre); | |
256 | AliMixture(40, "MET", amet, zmet, densmet, nlmatmet, wmatmet); | |
257 | AliMixture(41, "METG", amet, zmet, densmet, nlmatmet, wmatmet); | |
258 | AliMaterial(11, "GRI", agri, zgri, densgri, radlgri, 0); | |
259 | AliMaterial(50, "ALUM", aal, zal, densal, radlal, 0); | |
260 | AliMixture(32, "GLASS",aglass, zglass, dglass, 5, wglass); | |
261 | AliMaterial(31, "COPPER$", 63.54, 29., 8.96, 1.4, 0.); | |
262 | ||
263 | tmaxfd = -10.; | |
264 | stemax = -.1; | |
265 | deemax = -.2; | |
266 | epsil = .001; | |
267 | stmin = -.001; | |
268 | ||
269 | AliMedium(1, "DEFAULT MEDIUM AIR$", 1, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin); | |
270 | AliMedium(2, "HONEYCOMB$", 6, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin); | |
271 | AliMedium(3, "QUARZO$", 20, 1, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin); | |
272 | AliMedium(4, "FREON$", 30, 1, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin); | |
273 | AliMedium(5, "METANO$", 40, 1, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin); | |
274 | AliMedium(6, "CSI$", 16, 1, isxfld, sxmgmx,tmaxfd, stemax, deemax, epsil, stmin); | |
275 | AliMedium(7, "GRIGLIA$", 11, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin); | |
276 | AliMedium(8, "QUARZOO$", 21, 1, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin); | |
277 | AliMedium(9, "GAP$", 41, 1, isxfld, sxmgmx,tmaxfd, .1, -deemax, epsil, -stmin); | |
278 | AliMedium(10, "ALUMINUM$", 50, 1, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin); | |
279 | AliMedium(11, "GLASS", 32, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin); | |
280 | AliMedium(12, "PCB_COPPER", 31, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin); | |
281 | ||
282 | ||
283 | gMC->SetCerenkov(idtmed[1000], 26, ppckov, abscoMethane, efficAll, rIndexMethane); | |
284 | gMC->SetCerenkov(idtmed[1001], 26, ppckov, abscoMethane, efficAll, rIndexMethane); | |
285 | gMC->SetCerenkov(idtmed[1002], 26, ppckov, abscoQuarz, efficAll,rIndexQuarz); | |
286 | gMC->SetCerenkov(idtmed[1003], 26, ppckov, abscoFreon, efficAll,rIndexFreon); | |
287 | gMC->SetCerenkov(idtmed[1004], 26, ppckov, abscoMethane, efficAll, rIndexMethane); | |
288 | gMC->SetCerenkov(idtmed[1005], 26, ppckov, abscoCsI, efficCsI, rIndexMethane); | |
289 | gMC->SetCerenkov(idtmed[1006], 26, ppckov, abscoGrid, efficGrid, rIndexGrid); | |
290 | gMC->SetCerenkov(idtmed[1007], 26, ppckov, abscoOpaqueQuarz, efficAll, rIndexOpaqueQuarz); | |
291 | gMC->SetCerenkov(idtmed[1008], 26, ppckov, abscoMethane, efficAll, rIndexMethane); | |
292 | gMC->SetCerenkov(idtmed[1009], 26, ppckov, abscoGrid, efficGrid, rIndexGrid); | |
293 | gMC->SetCerenkov(idtmed[1010], 26, ppckov, abscoOpaqueQuarz, efficAll, rIndexOpaqueQuarz); | |
294 | }//AliRICHv3::CreateMaterials() | |
295 | ||
296 | ||
297 | void AliRICHv3::CreateGeometry() | |
298 | { | |
299 | if(fDebug) cout<<ClassName()<<"::CreateGeometry()>\n"; | |
300 | ||
301 | AliRICH *pRICH = (AliRICH *) gAlice->GetDetector("RICH"); | |
302 | AliRICHSegmentationV0* segmentation; | |
303 | AliRICHGeometry* geometry; | |
304 | AliRICHChamber* iChamber; | |
305 | ||
306 | iChamber = &(pRICH->Chamber(0)); | |
307 | segmentation=(AliRICHSegmentationV0*) iChamber->GetSegmentationModel(0); | |
308 | geometry=iChamber->GetGeometryModel(); | |
309 | ||
310 | Float_t distance; | |
311 | distance = geometry->GetFreonThickness()/2 + geometry->GetQuartzThickness() + geometry->GetGapThickness(); | |
312 | geometry->SetRadiatorToPads(distance); | |
313 | ||
314 | //Opaque quartz thickness | |
315 | Float_t oqua_thickness = .5; | |
316 | //CsI dimensions | |
317 | ||
318 | ||
319 | Float_t csi_width = segmentation->Npx()*segmentation->Dpx() + segmentation->DeadZone(); | |
320 | Float_t csi_length = segmentation->Npy()*segmentation->Dpy() + 2*segmentation->DeadZone(); | |
321 | ||
322 | ||
323 | Int_t *idtmed = fIdtmed->GetArray()-999; | |
324 | ||
325 | Int_t i; | |
326 | Float_t zs; | |
327 | Int_t idrotm[1099]; | |
328 | Float_t par[3]; | |
329 | ||
330 | // --- Define the RICH detector | |
331 | // External aluminium box | |
332 | par[0] = 68.8; | |
333 | par[1] = 13; //Original Settings | |
334 | par[2] = 70.86; | |
335 | gMC->Gsvolu("RICH", "BOX ", idtmed[1009], par, 3); | |
336 | ||
337 | // Air | |
338 | par[0] = 66.3; | |
339 | par[1] = 13; //Original Settings | |
340 | par[2] = 68.35; | |
341 | gMC->Gsvolu("SRIC", "BOX ", idtmed[1000], par, 3); | |
342 | ||
343 | // Air 2 (cutting the lower part of the box) | |
344 | ||
345 | par[0] = 1.25; | |
346 | par[1] = 3; //Original Settings | |
347 | par[2] = 70.86; | |
348 | gMC->Gsvolu("AIR2", "BOX ", idtmed[1000], par, 3); | |
349 | ||
350 | // Air 3 (cutting the lower part of the box) | |
351 | ||
352 | par[0] = 66.3; | |
353 | par[1] = 3; //Original Settings | |
354 | par[2] = 1.2505; | |
355 | gMC->Gsvolu("AIR3", "BOX ", idtmed[1000], par, 3); | |
356 | ||
357 | // Honeycomb | |
358 | par[0] = 66.3; | |
359 | par[1] = .188; //Original Settings | |
360 | par[2] = 68.35; | |
361 | gMC->Gsvolu("HONE", "BOX ", idtmed[1001], par, 3); | |
362 | ||
363 | // Aluminium sheet | |
364 | par[0] = 66.3; | |
365 | par[1] = .025; //Original Settings | |
366 | par[2] = 68.35; | |
367 | /*par[0] = 66.5; | |
368 | par[1] = .025; | |
369 | par[2] = 63.1;*/ | |
370 | gMC->Gsvolu("ALUM", "BOX ", idtmed[1009], par, 3); | |
371 | ||
372 | // Quartz | |
373 | par[0] = geometry->GetQuartzWidth()/2; | |
374 | par[1] = geometry->GetQuartzThickness()/2; | |
375 | par[2] = geometry->GetQuartzLength()/2; | |
376 | gMC->Gsvolu("QUAR", "BOX ", idtmed[1002], par, 3); | |
377 | ||
378 | // Spacers (cylinders) | |
379 | par[0] = 0.; | |
380 | par[1] = .5; | |
381 | par[2] = geometry->GetFreonThickness()/2; | |
382 | gMC->Gsvolu("SPAC", "TUBE", idtmed[1002], par, 3); | |
383 | ||
384 | // Feet (freon slabs supports) | |
385 | ||
386 | par[0] = .7; | |
387 | par[1] = .3; | |
388 | par[2] = 1.9; | |
389 | gMC->Gsvolu("FOOT", "BOX", idtmed[1009], par, 3); | |
390 | ||
391 | // Opaque quartz | |
392 | par[0] = geometry->GetQuartzWidth()/2; | |
393 | par[1] = .2; | |
394 | par[2] = geometry->GetQuartzLength()/2; | |
395 | gMC->Gsvolu("OQUA", "BOX ", idtmed[1007], par, 3); | |
396 | ||
397 | // Frame of opaque quartz | |
398 | par[0] = geometry->GetOuterFreonWidth()/2; | |
399 | par[1] = geometry->GetFreonThickness()/2; | |
400 | par[2] = geometry->GetOuterFreonLength()/2; | |
401 | gMC->Gsvolu("OQF1", "BOX ", idtmed[1007], par, 3); | |
402 | ||
403 | par[0] = geometry->GetInnerFreonWidth()/2; | |
404 | par[1] = geometry->GetFreonThickness()/2; | |
405 | par[2] = geometry->GetInnerFreonLength()/2; | |
406 | gMC->Gsvolu("OQF2", "BOX ", idtmed[1007], par, 3); | |
407 | ||
408 | ||
409 | // Freon | |
410 | par[0] = geometry->GetOuterFreonWidth()/2 - oqua_thickness; | |
411 | par[1] = geometry->GetFreonThickness()/2; | |
412 | par[2] = geometry->GetOuterFreonLength()/2 - 2*oqua_thickness; | |
413 | gMC->Gsvolu("FRE1", "BOX ", idtmed[1003], par, 3); | |
414 | ||
415 | par[0] = geometry->GetInnerFreonWidth()/2 - oqua_thickness; | |
416 | par[1] = geometry->GetFreonThickness()/2; | |
417 | par[2] = geometry->GetInnerFreonLength()/2 - 2*oqua_thickness; | |
418 | gMC->Gsvolu("FRE2", "BOX ", idtmed[1003], par, 3); | |
419 | ||
420 | // Methane | |
421 | par[0] = csi_width/2; | |
422 | par[1] = geometry->GetGapThickness()/2; | |
423 | par[2] = csi_length/2; | |
424 | gMC->Gsvolu("META", "BOX ", idtmed[1004], par, 3); | |
425 | ||
426 | // Methane gap | |
427 | par[0] = csi_width/2; | |
428 | par[1] = geometry->GetProximityGapThickness()/2; | |
429 | par[2] = csi_length/2; | |
430 | gMC->Gsvolu("GAP ", "BOX ", idtmed[1008], par, 3); | |
431 | ||
432 | // CsI photocathode | |
433 | par[0] = csi_width/2; | |
434 | par[1] = .25; | |
435 | par[2] = csi_length/2; | |
436 | gMC->Gsvolu("CSI ", "BOX ", idtmed[1005], par, 3); | |
437 | ||
438 | // Anode grid | |
439 | par[0] = 0.; | |
440 | par[1] = .001; | |
441 | par[2] = 20.; | |
442 | gMC->Gsvolu("GRID", "TUBE", idtmed[1006], par, 3); | |
443 | ||
444 | // Wire supports | |
445 | // Bar of metal | |
446 | ||
447 | par[0] = csi_width/2; | |
448 | par[1] = 1.05; | |
449 | par[2] = 1.05; | |
450 | gMC->Gsvolu("WSMe", "BOX ", idtmed[1009], par, 3); | |
451 | ||
452 | // Ceramic pick up (base) | |
453 | ||
454 | par[0] = csi_width/2; | |
455 | par[1] = .25; | |
456 | par[2] = 1.05; | |
457 | gMC->Gsvolu("WSG1", "BOX ", idtmed[1010], par, 3); | |
458 | ||
459 | // Ceramic pick up (head) | |
460 | ||
461 | par[0] = csi_width/2; | |
462 | par[1] = .1; | |
463 | par[2] = .1; | |
464 | gMC->Gsvolu("WSG2", "BOX ", idtmed[1010], par, 3); | |
465 | ||
466 | // Aluminium supports for methane and CsI | |
467 | // Short bar | |
468 | ||
469 | par[0] = csi_width/2; | |
470 | par[1] = geometry->GetGapThickness()/2 + .25; | |
471 | par[2] = (68.35 - csi_length/2)/2; | |
472 | gMC->Gsvolu("SMSH", "BOX", idtmed[1009], par, 3); | |
473 | ||
474 | // Long bar | |
475 | ||
476 | par[0] = (66.3 - csi_width/2)/2; | |
477 | par[1] = geometry->GetGapThickness()/2 + .25; | |
478 | par[2] = csi_length/2 + 68.35 - csi_length/2; | |
479 | gMC->Gsvolu("SMLG", "BOX", idtmed[1009], par, 3); | |
480 | ||
481 | // Aluminium supports for freon | |
482 | // Short bar | |
483 | ||
484 | par[0] = geometry->GetQuartzWidth()/2; | |
485 | par[1] = .3; | |
486 | par[2] = (68.35 - geometry->GetQuartzLength()/2)/2; | |
487 | gMC->Gsvolu("SFSH", "BOX", idtmed[1009], par, 3); | |
488 | ||
489 | // Long bar | |
490 | ||
491 | par[0] = (66.3 - geometry->GetQuartzWidth()/2)/2; | |
492 | par[1] = .3; | |
493 | par[2] = geometry->GetQuartzLength()/2 + 68.35 - geometry->GetQuartzLength()/2; | |
494 | gMC->Gsvolu("SFLG", "BOX", idtmed[1009], par, 3); | |
495 | ||
496 | // PCB backplane | |
497 | ||
498 | par[0] = csi_width/2; | |
499 | par[1] = .25; | |
500 | par[2] = csi_length/4 -.5025; | |
501 | gMC->Gsvolu("PCB ", "BOX", idtmed[1011], par, 3); | |
502 | ||
503 | ||
504 | // Backplane supports | |
505 | ||
506 | // Aluminium slab | |
507 | ||
508 | par[0] = 33.15; | |
509 | par[1] = 2; | |
510 | par[2] = 21.65; | |
511 | gMC->Gsvolu("BACK", "BOX", idtmed[1009], par, 3); | |
512 | ||
513 | // Big hole | |
514 | ||
515 | par[0] = 9.05; | |
516 | par[1] = 2; | |
517 | par[2] = 4.4625; | |
518 | gMC->Gsvolu("BKHL", "BOX", idtmed[1000], par, 3); | |
519 | ||
520 | // Small hole | |
521 | ||
522 | par[0] = 5.7; | |
523 | par[1] = 2; | |
524 | par[2] = 4.4625; | |
525 | gMC->Gsvolu("BKHS", "BOX", idtmed[1000], par, 3); | |
526 | ||
527 | // Place holes inside backplane support | |
528 | ||
529 | gMC->Gspos("BKHS", 1, "BACK", .8 + 5.7,0., .6 + 4.4625, 0, "ONLY"); | |
530 | gMC->Gspos("BKHS", 2, "BACK", -.8 - 5.7,0., .6 + 4.4625, 0, "ONLY"); | |
531 | gMC->Gspos("BKHS", 3, "BACK", .8 + 5.7,0., -.6 - 4.4625, 0, "ONLY"); | |
532 | gMC->Gspos("BKHS", 4, "BACK", -.8 - 5.7,0., -.6 - 4.4625, 0, "ONLY"); | |
533 | gMC->Gspos("BKHS", 5, "BACK", .8 + 5.7,0., .6 + 8.925 + 1.2 + 4.4625, 0, "ONLY"); | |
534 | gMC->Gspos("BKHS", 6, "BACK", -.8 - 5.7,0., .6 + 8.925 + 1.2 + 4.4625, 0, "ONLY"); | |
535 | gMC->Gspos("BKHS", 7, "BACK", .8 + 5.7,0., -.6 - 8.925 - 1.2 - 4.4625, 0, "ONLY"); | |
536 | gMC->Gspos("BKHS", 8, "BACK", -.8 - 5.7,0., -.6 - 8.925 - 1.2 - 4.4625, 0, "ONLY"); | |
537 | gMC->Gspos("BKHL", 1, "BACK", .8 + 11.4 + 1.6 + 9.05, 0., .6 + 4.4625, 0, "ONLY"); | |
538 | gMC->Gspos("BKHL", 2, "BACK", -.8 - 11.4 - 1.6 - 9.05, 0., .6 + 4.4625, 0, "ONLY"); | |
539 | gMC->Gspos("BKHL", 3, "BACK", .8 + 11.4 + 1.6 + 9.05, 0., -.6 - 4.4625, 0, "ONLY"); | |
540 | gMC->Gspos("BKHL", 4, "BACK", -.8 - 11.4 - 1.6 - 9.05, 0., -.6 - 4.4625, 0, "ONLY"); | |
541 | gMC->Gspos("BKHL", 5, "BACK", .8 + 11.4+ 1.6 + 9.05, 0., .6 + 8.925 + 1.2 + 4.4625, 0, "ONLY"); | |
542 | gMC->Gspos("BKHL", 6, "BACK", -.8 - 11.4 - 1.6 - 9.05, 0., .6 + 8.925 + 1.2 + 4.4625, 0, "ONLY"); | |
543 | gMC->Gspos("BKHL", 7, "BACK", .8 + 11.4 + 1.6 + 9.05, 0., -.6 - 8.925 - 1.2 - 4.4625, 0, "ONLY"); | |
544 | gMC->Gspos("BKHL", 8, "BACK", -.8 - 11.4 - 1.6 - 9.05, 0., -.6 - 8.925 - 1.2 - 4.4625, 0, "ONLY"); | |
545 | ||
546 | ||
547 | ||
548 | // --- Places the detectors defined with GSVOLU | |
549 | // Place material inside RICH | |
550 | gMC->Gspos("SRIC", 1, "RICH", 0.,0., 0., 0, "ONLY"); | |
551 | gMC->Gspos("AIR2", 1, "RICH", 66.3 + 1.2505, 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()- .4 - .6 - .05 - .376 -.5 - 3.35, 0., 0, "ONLY"); | |
552 | gMC->Gspos("AIR2", 2, "RICH", -66.3 - 1.2505, 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()- .4 - .6 - .05 - .376 -.5 - 3.35, 0., 0, "ONLY"); | |
553 | gMC->Gspos("AIR3", 1, "RICH", 0., 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()- .4 - .6 - .05 - .376 -.5 - 3.35, -68.35 - 1.25, 0, "ONLY"); | |
554 | gMC->Gspos("AIR3", 2, "RICH", 0., 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()- .4 - .6 - .05 - .376 -.5 - 3.35, 68.35 + 1.25, 0, "ONLY"); | |
555 | ||
556 | ||
557 | gMC->Gspos("ALUM", 1, "SRIC", 0., 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()- .4 - .6 - .05 - .376 -.025, 0., 0, "ONLY"); | |
558 | gMC->Gspos("HONE", 1, "SRIC", 0., 1.276- geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()- .4 - .6 - .05 - .188, 0., 0, "ONLY"); | |
559 | gMC->Gspos("ALUM", 2, "SRIC", 0., 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()- .4 - .6 - .025, 0., 0, "ONLY"); | |
560 | gMC->Gspos("FOOT", 1, "SRIC", 64.95, 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()- .4 - .3, 36.9, 0, "ONLY"); | |
561 | gMC->Gspos("FOOT", 2, "SRIC", 21.65, 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()- .4 - .3 , 36.9, 0, "ONLY"); | |
562 | gMC->Gspos("FOOT", 3, "SRIC", -21.65, 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()- .4 - .3, 36.9, 0, "ONLY"); | |
563 | gMC->Gspos("FOOT", 4, "SRIC", -64.95, 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()- .4 - .3, 36.9, 0, "ONLY"); | |
564 | gMC->Gspos("FOOT", 5, "SRIC", 64.95, 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()- .4 - .3, -36.9, 0, "ONLY"); | |
565 | gMC->Gspos("FOOT", 6, "SRIC", 21.65, 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()- .4 - .3, -36.9, 0, "ONLY"); | |
566 | gMC->Gspos("FOOT", 7, "SRIC", -21.65, 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()- .4 - .3, -36.9, 0, "ONLY"); | |
567 | gMC->Gspos("FOOT", 8, "SRIC", -64.95, 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()- .4 - .3, -36.9, 0, "ONLY"); | |
568 | gMC->Gspos("OQUA", 1, "SRIC", 0., 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()- .2, 0., 0, "ONLY"); | |
569 | ||
570 | // Supports placing | |
571 | ||
572 | // Methane supports | |
573 | gMC->Gspos("SMLG", 1, "SRIC", csi_width/2 + (66.3 - csi_width/2)/2, 1.276 + .25, 0., 0, "ONLY"); | |
574 | gMC->Gspos("SMLG", 2, "SRIC", - csi_width/2 - (66.3 - csi_width/2)/2, 1.276 + .25, 0., 0, "ONLY"); | |
575 | gMC->Gspos("SMSH", 1, "SRIC", 0., 1.276 + .25, csi_length/2 + (68.35 - csi_length/2)/2, 0, "ONLY"); | |
576 | gMC->Gspos("SMSH", 2, "SRIC", 0., 1.276 + .25, - csi_length/2 - (68.35 - csi_length/2)/2, 0, "ONLY"); | |
577 | ||
578 | //Freon supports | |
579 | ||
580 | Float_t supp_y = 1.276 - geometry->GetGapThickness()/2- geometry->GetQuartzThickness() -geometry->GetFreonThickness() - .2 + .3; //y position of freon supports | |
581 | ||
582 | gMC->Gspos("SFLG", 1, "SRIC", geometry->GetQuartzWidth()/2 + (66.3 - geometry->GetQuartzWidth()/2)/2, supp_y, 0., 0, "ONLY"); | |
583 | gMC->Gspos("SFLG", 2, "SRIC", - geometry->GetQuartzWidth()/2 - (66.3 - geometry->GetQuartzWidth()/2)/2, supp_y, 0., 0, "ONLY"); | |
584 | gMC->Gspos("SFSH", 1, "SRIC", 0., supp_y, geometry->GetQuartzLength()/2 + (68.35 - geometry->GetQuartzLength()/2)/2, 0, "ONLY"); | |
585 | gMC->Gspos("SFSH", 2, "SRIC", 0., supp_y, - geometry->GetQuartzLength()/2 - (68.35 - geometry->GetQuartzLength()/2)/2, 0, "ONLY"); | |
586 | ||
587 | AliMatrix(idrotm[1019], 0., 0., 90., 0., 90., 90.); | |
588 | ||
589 | ||
590 | Int_t nspacers = 30; | |
591 | ||
592 | for (i = 0; i < nspacers/3; i++) { | |
593 | zs = -11.6/2 + (TMath::Abs(nspacers/6) - i) * 12.2; | |
594 | gMC->Gspos("SPAC", i, "FRE1", 10.5, 0., zs, idrotm[1019], "ONLY"); //Original settings | |
595 | } | |
596 | ||
597 | for (i = nspacers/3; i < (nspacers*2)/3; i++) { | |
598 | zs = -11.6/2 + (nspacers/3 + TMath::Abs(nspacers/6) - i) * 12.2; | |
599 | gMC->Gspos("SPAC", i, "FRE1", 0, 0., zs, idrotm[1019], "ONLY"); //Original settings | |
600 | } | |
601 | ||
602 | for (i = (nspacers*2)/3; i < nspacers; ++i) { | |
603 | zs = -11.6/2 + ((nspacers*2)/3 + TMath::Abs(nspacers/6) - i) * 12.2; | |
604 | gMC->Gspos("SPAC", i, "FRE1", -10.5, 0., zs, idrotm[1019], "ONLY"); //Original settings | |
605 | } | |
606 | ||
607 | for (i = 0; i < nspacers/3; i++) { | |
608 | zs = -11.6/2 + (TMath::Abs(nspacers/6) - i) * 12.2; | |
609 | gMC->Gspos("SPAC", i, "FRE2", 10.5, 0., zs, idrotm[1019], "ONLY"); //Original settings | |
610 | } | |
611 | ||
612 | for (i = nspacers/3; i < (nspacers*2)/3; i++) { | |
613 | zs = -11.6/2 + (nspacers/3 + TMath::Abs(nspacers/6) - i) * 12.2; | |
614 | gMC->Gspos("SPAC", i, "FRE2", 0, 0., zs, idrotm[1019], "ONLY"); //Original settings | |
615 | } | |
616 | ||
617 | for (i = (nspacers*2)/3; i < nspacers; ++i) { | |
618 | zs = -11.6/2 + ((nspacers*2)/3 + TMath::Abs(nspacers/6) - i) * 12.2; | |
619 | gMC->Gspos("SPAC", i, "FRE2", -10.5, 0., zs, idrotm[1019], "ONLY"); //Original settings | |
620 | } | |
621 | ||
622 | ||
623 | gMC->Gspos("FRE1", 1, "OQF1", 0., 0., 0., 0, "ONLY"); | |
624 | gMC->Gspos("FRE2", 1, "OQF2", 0., 0., 0., 0, "ONLY"); | |
625 | gMC->Gspos("OQF1", 1, "SRIC", geometry->GetOuterFreonWidth()/2 + geometry->GetInnerFreonWidth()/2 + 2, 1.276 - geometry->GetGapThickness()/2- geometry->GetQuartzThickness() -geometry->GetFreonThickness()/2, 0., 0, "ONLY"); //Original settings (31.3) | |
626 | gMC->Gspos("OQF2", 2, "SRIC", 0., 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()/2, 0., 0, "ONLY"); //Original settings | |
627 | gMC->Gspos("OQF1", 3, "SRIC", - (geometry->GetOuterFreonWidth()/2 + geometry->GetInnerFreonWidth()/2) - 2, 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness() - geometry->GetFreonThickness()/2, 0., 0, "ONLY"); //Original settings (-31.3) | |
628 | gMC->Gspos("QUAR", 1, "SRIC", 0., 1.276 - geometry->GetGapThickness()/2 - geometry->GetQuartzThickness()/2, 0., 0, "ONLY"); | |
629 | gMC->Gspos("GAP ", 1, "META", 0., geometry->GetGapThickness()/2 - geometry->GetProximityGapThickness()/2 - 0.0001, 0., 0, "ONLY"); | |
630 | gMC->Gspos("META", 1, "SRIC", 0., 1.276, 0., 0, "ONLY"); | |
631 | gMC->Gspos("CSI ", 1, "SRIC", 0., 1.276 + geometry->GetGapThickness()/2 + .25, 0., 0, "ONLY"); | |
632 | printf("CSI pos: %f\n",1.276 + geometry->GetGapThickness()/2 + .25); | |
633 | ||
634 | // Wire support placing | |
635 | ||
636 | gMC->Gspos("WSG2", 1, "GAP ", 0., geometry->GetProximityGapThickness()/2 - .1, 0., 0, "ONLY"); | |
637 | gMC->Gspos("WSG1", 1, "CSI ", 0., 0., 0., 0, "ONLY"); | |
638 | gMC->Gspos("WSMe", 1, "SRIC ", 0., 1.276 + geometry->GetGapThickness()/2 + .5 + 1.05, 0., 0, "ONLY"); | |
639 | ||
640 | // Backplane placing | |
641 | ||
642 | gMC->Gspos("BACK", 1, "SRIC ", -33.15, 1.276 + geometry->GetGapThickness()/2 + .5 + 2.1 + 2, 43.3, 0, "ONLY"); | |
643 | gMC->Gspos("BACK", 2, "SRIC ", 33.15, 1.276 + geometry->GetGapThickness()/2 + .5 + 2.1 + 2 , 43.3, 0, "ONLY"); | |
644 | gMC->Gspos("BACK", 3, "SRIC ", -33.15, 1.276 + geometry->GetGapThickness()/2 + .5 + 2.1 + 2, 0., 0, "ONLY"); | |
645 | gMC->Gspos("BACK", 4, "SRIC ", 33.15, 1.276 + geometry->GetGapThickness()/2 + .5 + 2.1 + 2, 0., 0, "ONLY"); | |
646 | gMC->Gspos("BACK", 5, "SRIC ", 33.15, 1.276 + geometry->GetGapThickness()/2 + .5 + 2.1 + 2, -43.3, 0, "ONLY"); | |
647 | gMC->Gspos("BACK", 6, "SRIC ", -33.15, 1.276 + geometry->GetGapThickness()/2 + .5 + 2.1 + 2, -43.3, 0, "ONLY"); | |
648 | ||
649 | // PCB placing | |
650 | ||
651 | gMC->Gspos("PCB ", 1, "SRIC ", 0., 1.276 + geometry->GetGapThickness()/2 + .5 + 1.05, csi_width/4 + .5025 + 2.5, 0, "ONLY"); | |
652 | gMC->Gspos("PCB ", 2, "SRIC ", 0., 1.276 + geometry->GetGapThickness()/2 + .5 + 1.05, -csi_width/4 - .5025 - 2.5, 0, "ONLY"); | |
653 | ||
654 | // Place chambers into mother volume ALIC | |
655 | ||
656 | Double_t dOffset = 490 + 1.276 - geometry->GetGapThickness()/2; // distance from center of mother volume ALIC to methane | |
657 | Double_t dAlpha = 19.5; // angle between centers of chambers - y-z plane | |
658 | Double_t dBeta = 20; // angle between center of chambers - y-x plane | |
659 | Double_t dRotAngle = geometry->GetRotationAngle(); // the whole RICH is to be rotated in x-y plane + means clockwise rotation | |
660 | ||
661 | Double_t dCosAlpha = TMath::Cos(dAlpha*TMath::Pi()/180); | |
662 | Double_t dSinAlpha = TMath::Sin(dAlpha*TMath::Pi()/180); | |
663 | Double_t dCosBeta = TMath::Cos(dBeta*TMath::Pi()/180); | |
664 | Double_t dSinBeta = TMath::Sin(dBeta*TMath::Pi()/180); | |
665 | ||
666 | Double_t dCosRot = TMath::Cos(dRotAngle*TMath::Pi()/180); | |
667 | Double_t dSinRot = TMath::Sin(dRotAngle*TMath::Pi()/180); | |
668 | ||
669 | Double_t dX,dY,dZ; | |
670 | TRotMatrix *pRotMatrix; // tmp pointer | |
671 | // Chamber 0 standalone (no other chambers in this row) | |
672 | AliMatrix(idrotm[1000], 90, -dRotAngle , 90-dAlpha , 90-dRotAngle , dAlpha , -90 ); | |
673 | pRotMatrix=new TRotMatrix("rot993","rot993", 90, -dRotAngle , 90-dAlpha , 90-dRotAngle , dAlpha , -90 ); | |
674 | ||
675 | dX=0; dY=dOffset*dCosAlpha; dZ=dOffset*dSinAlpha; // before azimuthal rotation | |
676 | dX=dX*dCosRot+dY*dSinRot; dY=-dX*dSinRot+dY*dCosRot; // after azimuthal rotation | |
677 | ||
678 | gMC->Gspos("RICH",1,"ALIC",dX,dY,dZ,idrotm[1000], "ONLY"); | |
679 | Chamber(0).SetChamberTransform(dX,dY,dZ,pRotMatrix); | |
680 | // Chamber 1 | |
681 | AliMatrix(idrotm[1001], 90, -dBeta-dRotAngle , 90 , 90-dBeta-dRotAngle , 0 , 0 ); | |
682 | pRotMatrix=new TRotMatrix("rot994","rot994", 90, -dBeta-dRotAngle , 90 , 90-dBeta-dRotAngle , 0 , 0 ); | |
683 | ||
684 | dX=dOffset*dSinBeta; dY=dOffset*dCosBeta; dZ=0; // before azimuthal rotation | |
685 | dX=dX*dCosRot+dY*dSinRot; dY=-dX*dSinRot+dY*dCosRot; // after azimuthal rotation | |
686 | ||
687 | gMC->Gspos("RICH",2,"ALIC",dX,dY,dZ,idrotm[1001], "ONLY"); | |
688 | Chamber(1).SetChamberTransform(dX,dY,dZ,pRotMatrix); | |
689 | // Chamber 2 the top one with no Alpha-Beta rotation | |
690 | AliMatrix(idrotm[1002], 90, -dRotAngle , 90 , 90-dRotAngle , 0 , 0 ); | |
691 | pRotMatrix=new TRotMatrix("rot995","rot995", 90, -dRotAngle , 90 , 90-dRotAngle , 0 , 0 ); | |
692 | ||
693 | dX=0; dY=dOffset; dZ=0; // before azimuthal rotation | |
694 | dX=dX*dCosRot+dY*dSinRot; dY=-dX*dSinRot+dY*dCosRot; // after azimuthal rotation | |
695 | ||
696 | gMC->Gspos("RICH",3,"ALIC",dX,dY,dZ,idrotm[1002], "ONLY"); | |
697 | Chamber(2).SetChamberTransform(dX,dY,dZ,pRotMatrix); | |
698 | // Chamber 3 | |
699 | AliMatrix(idrotm[1003], 90, dBeta-dRotAngle , 90. , 90+dBeta-dRotAngle , 0 , 0 ); | |
700 | pRotMatrix=new TRotMatrix("rot996","rot996", 90, dBeta-dRotAngle , 90. , 90+dBeta-dRotAngle , 0 , 0 ); | |
701 | ||
702 | dX=-dOffset*dSinBeta; dY=dOffset*dCosBeta; dZ=0; // before azimuthal rotation | |
703 | dX=dX*dCosRot+dY*dSinRot; dY=-dX*dSinRot+dY*dCosRot; // after azimuthal rotation | |
704 | ||
705 | gMC->Gspos("RICH",4,"ALIC",dX,dY,dZ,idrotm[1003], "ONLY"); | |
706 | Chamber(3).SetChamberTransform(dX,dY,dZ,pRotMatrix); | |
707 | // Chamber 4 | |
708 | AliMatrix(idrotm[1004], 90, 360-dBeta-dRotAngle , 108.2 , 90-dBeta-dRotAngle , 18.2 , 90-dBeta ); | |
709 | pRotMatrix=new TRotMatrix("rot997","rot997", 90, 360-dBeta-dRotAngle , 108.2 , 90-dBeta-dRotAngle , 18.2 , 90-dBeta ); | |
710 | ||
711 | dX=dOffset*dSinBeta; dY=dOffset*dCosAlpha*dCosBeta; dZ=-dOffset*dSinAlpha; // before azimuthal rotation | |
712 | dX=dX*dCosRot+dY*dSinRot; dY=-dX*dSinRot+dY*dCosRot; // after azimuthal rotation | |
713 | ||
714 | gMC->Gspos("RICH",5,"ALIC",dX,dY,dZ,idrotm[1004], "ONLY"); | |
715 | Chamber(4).SetChamberTransform(dX,dY,dZ,pRotMatrix); | |
716 | // Chamber 5 | |
717 | AliMatrix(idrotm[1005], 90, -dRotAngle , 90+dAlpha , 90-dRotAngle , dAlpha , 90 ); | |
718 | pRotMatrix=new TRotMatrix("rot998","rot998", 90, -dRotAngle , 90+dAlpha , 90-dRotAngle , dAlpha , 90 ); | |
719 | ||
720 | dX=0; dY=dOffset*dCosAlpha; dZ=-dOffset*dSinAlpha; // before azimuthal rotation | |
721 | dX=dX*dCosRot+dY*dSinRot; dY=-dX*dSinRot+dY*dCosRot; // after azimuthal rotation | |
722 | ||
723 | gMC->Gspos("RICH",6,"ALIC",dX,dY,dZ,idrotm[1005], "ONLY"); | |
724 | Chamber(5).SetChamberTransform(dX,dY,dZ,pRotMatrix); | |
725 | // Chamber 6 | |
726 | AliMatrix(idrotm[1006], 90, dBeta-dRotAngle , 108.2 , 90+dBeta-dRotAngle , 18.2 , 90+dBeta ); | |
727 | pRotMatrix=new TRotMatrix("rot999","rot999", 90, dBeta-dRotAngle , 108.2 , 90+dBeta-dRotAngle , 18.2 , 90+dBeta ); | |
728 | ||
729 | dX=-dOffset*dSinBeta; dY=dOffset*dCosAlpha*dCosBeta; dZ=-dOffset*dSinAlpha; // before azimuthal rotation | |
730 | dX=dX*dCosRot+dY*dSinRot; dY=-dX*dSinRot+dY*dCosRot; // after azimuthal rotation | |
731 | ||
732 | gMC->Gspos("RICH",7,"ALIC",dX,dY,dZ,idrotm[1006], "ONLY"); | |
733 | Chamber(6).SetChamberTransform(dX,dY,dZ,pRotMatrix); | |
734 | ||
735 | }//void AliRICHv3::CreateGeometry() | |
736 | ||
737 | ||
738 | ||
739 | ||
740 | void AliRICHv3::Init() | |
741 | { | |
742 | if(fDebug) cout<<ClassName()<<"::Init()>\n"; | |
743 | ||
744 | } | |
745 | ||
746 | ||
747 | void AliRICHv3::BuildGeometry() | |
748 | { | |
749 | // | |
750 | // Builds a TNode geometry for event display | |
751 | // | |
752 | if(fDebug) cout<<ClassName()<<"::BuildGeometry()>\n"; | |
753 | ||
754 | TNode *node, *subnode, *top; | |
755 | ||
756 | const int kColorRICH = kRed; | |
757 | // | |
758 | top=gAlice->GetGeometry()->GetNode("alice"); | |
759 | ||
760 | AliRICH *pRICH = (AliRICH *) gAlice->GetDetector("RICH"); | |
761 | AliRICHSegmentationV0* segmentation; | |
762 | AliRICHChamber* iChamber; | |
763 | AliRICHGeometry* geometry; | |
764 | ||
765 | iChamber = &(pRICH->Chamber(0)); | |
766 | segmentation=(AliRICHSegmentationV0*) iChamber->GetSegmentationModel(0); | |
767 | geometry=iChamber->GetGeometryModel(); | |
768 | ||
769 | new TBRIK("S_RICH","S_RICH","void",71.09999,11.5,73.15); | |
770 | ||
771 | Float_t padplane_width = segmentation->GetPadPlaneWidth(); | |
772 | Float_t padplane_length = segmentation->GetPadPlaneLength(); | |
773 | ||
774 | ||
775 | new TBRIK("PHOTO","PHOTO","void", padplane_width/2,.1,padplane_length/2); | |
776 | ||
777 | // Chamber 0 | |
778 | top->cd(); | |
779 | node = new TNode("RICH1","RICH1","S_RICH",Chamber(0).GetX(),Chamber(0).GetY(),Chamber(0).GetZ(),"rot993"); | |
780 | node->SetLineColor(kColorRICH); | |
781 | node->cd(); | |
782 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",padplane_width + segmentation->DeadZone(),5,padplane_length/2 + segmentation->DeadZone()/2,""); | |
783 | subnode->SetLineColor(kGreen); | |
784 | fNodes->Add(subnode); | |
785 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",0,5,padplane_length/2 + segmentation->DeadZone()/2,""); | |
786 | subnode->SetLineColor(kGreen); | |
787 | fNodes->Add(subnode); | |
788 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",-padplane_width - segmentation->DeadZone(),5,padplane_length/2 + segmentation->DeadZone()/2,""); | |
789 | subnode->SetLineColor(kGreen); | |
790 | fNodes->Add(subnode); | |
791 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",padplane_width + segmentation->DeadZone(),5,-padplane_length/2 - segmentation->DeadZone()/2,""); | |
792 | subnode->SetLineColor(kGreen); | |
793 | fNodes->Add(subnode); | |
794 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",0,5,-padplane_length/2 - segmentation->DeadZone()/2,""); | |
795 | subnode->SetLineColor(kGreen); | |
796 | fNodes->Add(subnode); | |
797 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",-padplane_width - segmentation->DeadZone(),5,-padplane_length/2 - segmentation->DeadZone()/2,""); | |
798 | subnode->SetLineColor(kGreen); | |
799 | fNodes->Add(subnode); | |
800 | fNodes->Add(node); | |
801 | ||
802 | // Chamber 1 | |
803 | top->cd(); | |
804 | node = new TNode("RICH2","RICH2","S_RICH",Chamber(1).GetX(),Chamber(1).GetY(),Chamber(1).GetZ(),"rot994"); | |
805 | node->SetLineColor(kColorRICH); | |
806 | node->cd(); | |
807 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",padplane_width + segmentation->DeadZone(),5,padplane_length/2 + segmentation->DeadZone()/2,""); | |
808 | subnode->SetLineColor(kGreen); | |
809 | fNodes->Add(subnode); | |
810 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",0,5,padplane_length/2 + segmentation->DeadZone()/2,""); | |
811 | subnode->SetLineColor(kGreen); | |
812 | fNodes->Add(subnode); | |
813 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",-padplane_width - segmentation->DeadZone(),5,padplane_length/2 + segmentation->DeadZone()/2,""); | |
814 | subnode->SetLineColor(kGreen); | |
815 | fNodes->Add(subnode); | |
816 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",padplane_width + segmentation->DeadZone(),5,-padplane_length/2 - segmentation->DeadZone()/2,""); | |
817 | subnode->SetLineColor(kGreen); | |
818 | fNodes->Add(subnode); | |
819 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",0,5,-padplane_length/2 - segmentation->DeadZone()/2,""); | |
820 | subnode->SetLineColor(kGreen); | |
821 | fNodes->Add(subnode); | |
822 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",-padplane_width - segmentation->DeadZone(),5,-padplane_length/2 - segmentation->DeadZone()/2,""); | |
823 | subnode->SetLineColor(kGreen); | |
824 | fNodes->Add(subnode); | |
825 | fNodes->Add(node); | |
826 | ||
827 | // Chamber 2 | |
828 | top->cd(); | |
829 | node = new TNode("RICH3","RICH3","S_RICH",Chamber(2).GetX(),Chamber(2).GetY(),Chamber(2).GetZ(),"rot995"); | |
830 | node->SetLineColor(kColorRICH); | |
831 | node->cd(); | |
832 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",padplane_width + segmentation->DeadZone(),5,padplane_length/2 + segmentation->DeadZone()/2,""); | |
833 | subnode->SetLineColor(kGreen); | |
834 | fNodes->Add(subnode); | |
835 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",0,5,padplane_length/2 + segmentation->DeadZone()/2,""); | |
836 | subnode->SetLineColor(kGreen); | |
837 | fNodes->Add(subnode); | |
838 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",-padplane_width - segmentation->DeadZone(),5,padplane_length/2 + segmentation->DeadZone()/2,""); | |
839 | subnode->SetLineColor(kGreen); | |
840 | fNodes->Add(subnode); | |
841 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",padplane_width + segmentation->DeadZone(),5,-padplane_length/2 - segmentation->DeadZone()/2,""); | |
842 | subnode->SetLineColor(kGreen); | |
843 | fNodes->Add(subnode); | |
844 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",0,5,-padplane_length/2 - segmentation->DeadZone()/2,""); | |
845 | subnode->SetLineColor(kGreen); | |
846 | fNodes->Add(subnode); | |
847 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",-padplane_width - segmentation->DeadZone(),5,-padplane_length/2 - segmentation->DeadZone()/2,""); | |
848 | subnode->SetLineColor(kGreen); | |
849 | fNodes->Add(subnode); | |
850 | fNodes->Add(node); | |
851 | ||
852 | // Chamber 3 | |
853 | top->cd(); | |
854 | node = new TNode("RICH4","RICH4","S_RICH",Chamber(3).GetX(),Chamber(3).GetY(),Chamber(3).GetZ(),"rot996"); | |
855 | node->SetLineColor(kColorRICH); | |
856 | node->cd(); | |
857 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",padplane_width + segmentation->DeadZone(),5,padplane_length/2 + segmentation->DeadZone()/2,""); | |
858 | subnode->SetLineColor(kGreen); | |
859 | fNodes->Add(subnode); | |
860 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",0,5,padplane_length/2 + segmentation->DeadZone()/2,""); | |
861 | subnode->SetLineColor(kGreen); | |
862 | fNodes->Add(subnode); | |
863 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",-padplane_width - segmentation->DeadZone(),5,padplane_length/2 + segmentation->DeadZone()/2,""); | |
864 | subnode->SetLineColor(kGreen); | |
865 | fNodes->Add(subnode); | |
866 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",padplane_width + segmentation->DeadZone(),5,-padplane_length/2 - segmentation->DeadZone()/2,""); | |
867 | subnode->SetLineColor(kGreen); | |
868 | fNodes->Add(subnode); | |
869 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",0,5,-padplane_length/2 - segmentation->DeadZone()/2,""); | |
870 | subnode->SetLineColor(kGreen); | |
871 | fNodes->Add(subnode); | |
872 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",-padplane_width - segmentation->DeadZone(),5,-padplane_length/2 - segmentation->DeadZone()/2,""); | |
873 | subnode->SetLineColor(kGreen); | |
874 | fNodes->Add(subnode); | |
875 | fNodes->Add(node); | |
876 | ||
877 | // Chamber 4 | |
878 | top->cd(); | |
879 | node = new TNode("RICH5","RICH5","S_RICH",Chamber(4).GetX(),Chamber(4).GetY(),Chamber(4).GetZ(),"rot997"); | |
880 | node->SetLineColor(kColorRICH); | |
881 | node->cd(); | |
882 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",padplane_width + segmentation->DeadZone(),5,padplane_length/2 + segmentation->DeadZone()/2,""); | |
883 | subnode->SetLineColor(kGreen); | |
884 | fNodes->Add(subnode); | |
885 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",0,5,padplane_length/2 + segmentation->DeadZone()/2,""); | |
886 | subnode->SetLineColor(kGreen); | |
887 | fNodes->Add(subnode); | |
888 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",-padplane_width - segmentation->DeadZone(),5,padplane_length/2 + segmentation->DeadZone()/2,""); | |
889 | subnode->SetLineColor(kGreen); | |
890 | fNodes->Add(subnode); | |
891 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",padplane_width + segmentation->DeadZone(),5,-padplane_length/2 - segmentation->DeadZone()/2,""); | |
892 | subnode->SetLineColor(kGreen); | |
893 | fNodes->Add(subnode); | |
894 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",0,5,-padplane_length/2 - segmentation->DeadZone()/2,""); | |
895 | subnode->SetLineColor(kGreen); | |
896 | fNodes->Add(subnode); | |
897 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",-padplane_width - segmentation->DeadZone(),5,-padplane_length/2 - segmentation->DeadZone()/2,""); | |
898 | subnode->SetLineColor(kGreen); | |
899 | fNodes->Add(subnode); | |
900 | fNodes->Add(node); | |
901 | ||
902 | // Chamber 5 | |
903 | top->cd(); | |
904 | node = new TNode("RICH6","RICH6","S_RICH",Chamber(5).GetX(),Chamber(5).GetY(),Chamber(5).GetZ(),"rot998"); | |
905 | node->SetLineColor(kColorRICH); | |
906 | fNodes->Add(node);node->cd(); | |
907 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",padplane_width + segmentation->DeadZone(),5,padplane_length/2 + segmentation->DeadZone()/2,""); | |
908 | subnode->SetLineColor(kGreen); | |
909 | fNodes->Add(subnode); | |
910 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",0,5,padplane_length/2 + segmentation->DeadZone()/2,""); | |
911 | subnode->SetLineColor(kGreen); | |
912 | fNodes->Add(subnode); | |
913 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",-padplane_width - segmentation->DeadZone(),5,padplane_length/2 + segmentation->DeadZone()/2,""); | |
914 | subnode->SetLineColor(kGreen); | |
915 | fNodes->Add(subnode); | |
916 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",padplane_width + segmentation->DeadZone(),5,-padplane_length/2 - segmentation->DeadZone()/2,""); | |
917 | subnode->SetLineColor(kGreen); | |
918 | fNodes->Add(subnode); | |
919 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",0,5,-padplane_length/2 - segmentation->DeadZone()/2,""); | |
920 | subnode->SetLineColor(kGreen); | |
921 | fNodes->Add(subnode); | |
922 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",-padplane_width - segmentation->DeadZone(),5,-padplane_length/2 - segmentation->DeadZone()/2,""); | |
923 | subnode->SetLineColor(kGreen); | |
924 | fNodes->Add(subnode); | |
925 | ||
926 | // Chamber 6 | |
927 | top->cd(); | |
928 | node = new TNode("RICH7","RICH7","S_RICH",Chamber(6).GetX(),Chamber(6).GetY(),Chamber(6).GetZ(),"rot999"); | |
929 | node->SetLineColor(kColorRICH); | |
930 | node->cd(); | |
931 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",padplane_width + segmentation->DeadZone(),5,padplane_length/2 + segmentation->DeadZone()/2,""); | |
932 | subnode->SetLineColor(kGreen); | |
933 | fNodes->Add(subnode); | |
934 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",0,5,padplane_length/2 + segmentation->DeadZone()/2,""); | |
935 | subnode->SetLineColor(kGreen); | |
936 | fNodes->Add(subnode); | |
937 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",-padplane_width - segmentation->DeadZone(),5,padplane_length/2 + segmentation->DeadZone()/2,""); | |
938 | subnode->SetLineColor(kGreen); | |
939 | fNodes->Add(subnode); | |
940 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",padplane_width + segmentation->DeadZone(),5,-padplane_length/2 - segmentation->DeadZone()/2,""); | |
941 | subnode->SetLineColor(kGreen); | |
942 | fNodes->Add(subnode); | |
943 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",0,5,-padplane_length/2 - segmentation->DeadZone()/2,""); | |
944 | subnode->SetLineColor(kGreen); | |
945 | fNodes->Add(subnode); | |
946 | subnode = new TNode("PHOTO1","PHOTO1","PHOTO",-padplane_width - segmentation->DeadZone(),5,-padplane_length/2 - segmentation->DeadZone()/2,""); | |
947 | subnode->SetLineColor(kGreen); | |
948 | fNodes->Add(subnode); | |
949 | fNodes->Add(node); | |
950 | ||
951 | }//AliRICHv3::BuildGeometry() |