]>
Commit | Line | Data |
---|---|---|
d3c7bfac | 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 | /* | |
17 | $Log$ | |
0dadb22b | 18 | Revision 1.1 2005/12/15 08:55:33 decaro |
19 | New TOF geometry description (V5) -G. Cara Romeo and A. De Caro | |
20 | ||
d3c7bfac | 21 | |
22 | Revision 0.1 2004 November G. Cara Romeo and A. De Caro | |
23 | Implement new TOF geometry version | |
24 | in order to | |
25 | suppress few volume overlaps | |
26 | (in the 4th TOF geometry version), | |
27 | insert the realistic strip numbers and positions | |
28 | ||
29 | */ | |
30 | ||
31 | /////////////////////////////////////////////////////////////////////////////// | |
32 | // // | |
33 | // This class contains the functions for version 5 of the Time Of Flight // | |
34 | // detector. // | |
35 | // // | |
36 | // VERSION WITH 5 MODULES AND TILTED STRIPS // | |
37 | // // | |
38 | // FULL COVERAGE VERSION + OPTION for PHOS holes // | |
39 | // // | |
40 | // // | |
41 | //Begin_Html // | |
42 | /* // | |
43 | <img src="picts/AliTOFv5T0Class.gif"> // | |
44 | */ // | |
45 | //End_Html // | |
46 | // // | |
47 | /////////////////////////////////////////////////////////////////////////////// | |
48 | ||
49 | #include "Riostream.h" | |
50 | #include <stdlib.h> | |
51 | ||
52 | #include "TVirtualMC.h" | |
53 | #include <TBRIK.h> | |
54 | #include <TGeometry.h> | |
55 | #include <TLorentzVector.h> | |
56 | #include <TNode.h> | |
57 | #include <TObject.h> | |
58 | #include <TVirtualMC.h> | |
59 | ||
60 | #include "AliLog.h" | |
61 | #include "AliConst.h" | |
62 | #include "AliRun.h" | |
63 | #include "AliMC.h" | |
64 | #include "AliMagF.h" | |
65 | ||
66 | #include "AliTOFGeometry.h" | |
67 | #include "AliTOFGeometryV5.h" | |
68 | #include "AliTOFv5T0.h" | |
69 | ||
70 | ClassImp(AliTOFv5T0) | |
71 | ||
72 | //_____________________________________________________________________________ | |
73 | AliTOFv5T0::AliTOFv5T0() | |
74 | { | |
75 | // | |
76 | // Default constructor | |
77 | // | |
78 | } | |
79 | ||
80 | //_____________________________________________________________________________ | |
81 | AliTOFv5T0::AliTOFv5T0(const char *name, const char *title) | |
82 | : AliTOF(name,title,"tzero") | |
83 | { | |
84 | // | |
85 | // Standard constructor | |
86 | // | |
87 | // | |
88 | // Check that FRAME is there otherwise we have no place where to | |
89 | // put TOF | |
90 | ||
91 | ||
92 | AliModule* frame=gAlice->GetModule("FRAME"); | |
93 | if(!frame) { | |
94 | AliFatal("TOF needs FRAME to be present"); | |
95 | } else{ | |
96 | ||
97 | if (fTOFGeometry) delete fTOFGeometry; | |
98 | fTOFGeometry = new AliTOFGeometryV5(); | |
99 | ||
100 | if(frame->IsVersion()==1) { | |
101 | AliInfo(Form("Frame version %d", frame->IsVersion())); | |
102 | AliInfo("Full Coverage for TOF"); | |
103 | fTOFHoles=false;} | |
104 | else { | |
105 | AliInfo(Form("Frame version %d", frame->IsVersion())); | |
106 | AliInfo("TOF with Holes for PHOS"); | |
107 | fTOFHoles=true;} | |
108 | } | |
109 | fTOFGeometry->SetHoles(fTOFHoles); | |
110 | ||
111 | //AliTOF::fTOFGeometry = fTOFGeometry; | |
112 | ||
113 | // Save the geometry | |
114 | TDirectory* saveDir = gDirectory; | |
115 | gAlice->GetRunLoader()->CdGAFile(); | |
116 | fTOFGeometry->Write("TOFgeometry"); | |
117 | saveDir->cd(); | |
118 | ||
119 | } | |
120 | ||
121 | //____________________________________________________________________________ | |
122 | void AliTOFv5T0::BuildGeometry() | |
123 | { | |
124 | // | |
125 | // Build TOF ROOT geometry for the ALICE event display | |
126 | // | |
127 | TNode *node, *top; | |
128 | const int kColorTOF = 27; | |
129 | ||
130 | // Find top TNODE | |
131 | top = gAlice->GetGeometry()->GetNode("alice"); | |
132 | ||
133 | // Position the different copies | |
134 | const Float_t krTof =(fTOFGeometry->Rmax()+fTOFGeometry->Rmin())/2.; | |
135 | const Float_t khTof = fTOFGeometry->Rmax()-fTOFGeometry->Rmin(); | |
136 | const Int_t kNTof = fTOFGeometry->NSectors(); | |
137 | const Float_t kangle = k2PI/kNTof; | |
138 | ||
139 | const Float_t kInterCentrModBorder1 = 49.5; | |
140 | const Float_t kInterCentrModBorder2 = 57.5; | |
141 | ||
142 | Float_t ang; | |
143 | ||
144 | // define offset for nodes | |
145 | Float_t zOffsetB = (fTOFGeometry->ZlenA()*0.5 + (kInterCentrModBorder1+kInterCentrModBorder2)*0.5)*0.5; | |
146 | Float_t zOffsetA = 0.; | |
147 | // Define TOF basic volume | |
148 | ||
149 | char nodeName0[7], nodeName1[7], nodeName2[7]; | |
150 | char nodeName3[7], nodeName4[7], rotMatNum[7]; | |
151 | ||
152 | if (fTOFHoles) { | |
153 | new TBRIK("S_TOF_B","TOF box","void", | |
154 | fTOFGeometry->StripLength()*0.5, khTof*0.5, fTOFGeometry->ZlenB()*0.5); | |
155 | new TBRIK("S_TOF_C","TOF box","void", | |
156 | fTOFGeometry->StripLength()*0.5, khTof*0.5, fTOFGeometry->ZlenB()*0.5); | |
157 | } | |
158 | new TBRIK("S_TOF_A","TOF box","void", | |
159 | fTOFGeometry->StripLength()*0.5, khTof*0.5, fTOFGeometry->ZlenA()*0.5); | |
160 | ||
161 | for (Int_t nodeNum=1;nodeNum<19;nodeNum++){ | |
162 | ||
163 | if (nodeNum<10) { | |
164 | sprintf(rotMatNum,"rot50%i",nodeNum); | |
165 | sprintf(nodeName0,"FTO00%i",nodeNum); | |
166 | sprintf(nodeName1,"FTO10%i",nodeNum); | |
167 | sprintf(nodeName2,"FTO20%i",nodeNum); | |
168 | sprintf(nodeName3,"FTO30%i",nodeNum); | |
169 | sprintf(nodeName4,"FTO40%i",nodeNum); | |
170 | } | |
171 | if (nodeNum>9) { | |
172 | sprintf(rotMatNum,"rot5%i",nodeNum); | |
173 | sprintf(nodeName0,"FTO0%i",nodeNum); | |
174 | sprintf(nodeName1,"FTO1%i",nodeNum); | |
175 | sprintf(nodeName2,"FTO2%i",nodeNum); | |
176 | sprintf(nodeName3,"FTO3%i",nodeNum); | |
177 | sprintf(nodeName4,"FTO4%i",nodeNum); | |
178 | } | |
179 | ||
180 | new TRotMatrix(rotMatNum,rotMatNum,90,-20*nodeNum,90,90-20*nodeNum,0,0); | |
181 | ang = (4.5-nodeNum) * kangle; | |
182 | ||
183 | if (fTOFHoles) { | |
184 | top->cd(); | |
185 | node = new TNode(nodeName2,nodeName2,"S_TOF_B", krTof*TMath::Cos(ang), krTof*TMath::Sin(ang), zOffsetB,rotMatNum); | |
186 | node->SetLineColor(kColorTOF); | |
187 | fNodes->Add(node); | |
188 | ||
189 | top->cd(); | |
190 | node = new TNode(nodeName3,nodeName3,"S_TOF_C", krTof*TMath::Cos(ang), krTof*TMath::Sin(ang),-zOffsetB,rotMatNum); | |
191 | node->SetLineColor(kColorTOF); | |
192 | fNodes->Add(node); | |
193 | } | |
194 | ||
195 | top->cd(); | |
196 | node = new TNode(nodeName4,nodeName4,"S_TOF_A", krTof*TMath::Cos(ang), krTof*TMath::Sin(ang), zOffsetA,rotMatNum); | |
197 | node->SetLineColor(kColorTOF); | |
198 | fNodes->Add(node); | |
199 | } // end loop on nodeNum | |
200 | ||
201 | } | |
202 | ||
203 | //_____________________________________________________________________________ | |
204 | void AliTOFv5T0::CreateGeometry() | |
205 | { | |
206 | // | |
207 | // Create geometry for Time Of Flight version 0 | |
208 | // | |
209 | //Begin_Html | |
210 | /* | |
211 | <img src="picts/AliTOFv5T0.gif"> | |
212 | */ | |
213 | //End_Html | |
214 | // | |
215 | // Creates common geometry | |
216 | // | |
217 | AliTOF::CreateGeometry(); | |
218 | } | |
219 | ||
220 | ||
221 | //_____________________________________________________________________________ | |
222 | void AliTOFv5T0::TOFpc(Float_t xtof, Float_t ytof, Float_t zlenA, | |
223 | Float_t zlenB) | |
224 | { | |
225 | ||
226 | const Float_t kPi = TMath::Pi(); | |
227 | ||
228 | const Float_t kInterCentrModBorder1 = 49.5; | |
229 | const Float_t kInterCentrModBorder2 = 57.5; | |
230 | const Float_t kExterInterModBorder1 = 196.0; | |
231 | const Float_t kExterInterModBorder2 = 203.5; | |
232 | ||
233 | const Float_t kLengthExInModBorder = 4.7; | |
234 | const Float_t kLengthInCeModBorder = 7.0; | |
235 | ||
236 | const Float_t khAlWall = 0.1; | |
237 | ||
238 | // module wall thickness | |
239 | const Float_t kModuleWallThickness = 0.3; | |
240 | ||
241 | // 1.5 cm Al honeycomb layer between strips and cards | |
242 | const Float_t kHoneycombLayerThickness = 1.5; | |
243 | ||
244 | AliDebug(2,Form("zlenA*0.5 = %d", zlenA*0.5)); | |
245 | AliDebug(1, "************************* TOF geometry **************************"); | |
246 | ||
247 | // Definition of the Time Of Fligh Resistive Plate Chambers | |
248 | // xFLT, yFLT, zFLT - sizes of TOF modules (large) | |
249 | ||
250 | Float_t ycoor, zcoor; | |
251 | Float_t par[3]; | |
252 | Int_t *idtmed = fIdtmed->GetArray()-499; | |
253 | Int_t idrotm[100]; | |
254 | ||
255 | par[0] = xtof * 0.5; | |
256 | par[1] = ytof * 0.5; | |
257 | par[2] = zlenA * 0.5; | |
258 | gMC->Gsvolu("FTOA", "BOX ", idtmed[503], par, 3); // fibre glass | |
259 | ||
260 | if (fTOFHoles) { | |
261 | par[2] = (zlenA*0.5 - kInterCentrModBorder1)*0.5; | |
262 | gMC->Gsvolu("FTOB", "BOX ", idtmed[503], par, 3); | |
263 | gMC->Gsvolu("FTOC", "BOX ", idtmed[503], par, 3); | |
264 | } | |
265 | ||
266 | // Positioning of modules | |
267 | ||
268 | //AliMatrix(idrotm[0], 90., 0., 0., 0., 90.,-90.); | |
269 | AliMatrix(idrotm[0], 90., 0., 0., 0., 90.,270.); // adc | |
270 | ||
271 | Float_t zcor3 = 0.; | |
272 | ||
273 | gMC->Gspos("FTOA", 0, "BTO1", 0, zcor3, 0, idrotm[0], "ONLY"); | |
274 | gMC->Gspos("FTOA", 0, "BTO3", 0, zcor3, 0, idrotm[0], "ONLY"); | |
275 | ||
276 | if (fTOFHoles) { | |
277 | zcor3 = (zlenA*0.5 + kInterCentrModBorder1)*0.5; | |
278 | gMC->Gspos("FTOB", 0, "BTO2", 0, zcor3, 0, idrotm[0], "ONLY"); | |
279 | gMC->Gspos("FTOC", 0, "BTO2", 0,-zcor3, 0, idrotm[0], "ONLY"); | |
280 | } | |
281 | else gMC->Gspos("FTOA", 0, "BTO2", 0, zcor3, 0, idrotm[0], "ONLY"); | |
282 | ||
283 | // Large not sensitive volumes with Insensitive Freon (FLTA, FLTB and FLTC) | |
284 | ||
285 | Float_t xFLT, yFLT, zFLTA; | |
286 | ||
287 | xFLT = xtof - kModuleWallThickness*2.; | |
288 | yFLT = ytof - kModuleWallThickness*2.; | |
289 | zFLTA = zlenA - kModuleWallThickness*2.; | |
290 | ||
291 | par[0] = xFLT*0.5; | |
292 | par[1] = yFLT*0.5; | |
293 | ||
294 | par[2] = zFLTA*0.5; | |
295 | gMC->Gsvolu("FLTA", "BOX ", idtmed[507], par, 3); // Freon mix ok | |
296 | gMC->Gspos ("FLTA", 0, "FTOA", 0., 0., 0., 0, "ONLY"); | |
297 | ||
298 | if (fTOFHoles) { | |
299 | par[2] = (zlenA*0.5 - kInterCentrModBorder1-kModuleWallThickness)*0.5; | |
300 | gMC->Gsvolu("FLTB", "BOX ", idtmed[507], par, 3); // Freon mix | |
301 | gMC->Gspos ("FLTB", 0, "FTOB", 0., 0., kModuleWallThickness*0.5, 0, "ONLY"); | |
302 | gMC->Gsvolu("FLTC", "BOX ", idtmed[507], par, 3); // Freon mix | |
303 | gMC->Gspos ("FLTC", 0, "FTOC", 0., 0., -kModuleWallThickness*0.5, 0, "ONLY"); | |
304 | } | |
305 | ||
306 | // Layer of Aluminum after detector | |
307 | //par[0] = xFLT*0.5; | |
308 | par[1] = khAlWall*0.5; | |
309 | ||
310 | par[2] = zFLTA *0.5; | |
311 | ycoor = (-yFLT + khAlWall)*0.5; | |
312 | gMC->Gsvolu("FALA", "BOX ", idtmed[505], par, 3); // Alluminium ok | |
313 | gMC->Gspos ("FALA", 0, "FLTA", 0., -ycoor, 0., 0, "ONLY"); | |
314 | ||
315 | if (fTOFHoles) { | |
316 | par[2] = (zlenA*0.5 - kInterCentrModBorder2-kModuleWallThickness)*0.5; | |
317 | gMC->Gsvolu("FALB", "BOX ", idtmed[505], par, 3); // Alluminium | |
318 | gMC->Gspos ("FALB", 1, "FLTB", 0.,-ycoor, -(kInterCentrModBorder2-kInterCentrModBorder1)*0.5, 0, "ONLY"); | |
319 | gMC->Gspos ("FALB", 2, "FLTC", 0.,-ycoor, (kInterCentrModBorder2-kInterCentrModBorder1)*0.5, 0, "ONLY"); | |
320 | } | |
321 | ||
322 | Float_t y0, alpha, beta, tgbe, trpa[11], dy, zcoo; | |
323 | dy = yFLT*0.5; | |
324 | ||
325 | // wall between central and intermediate modules | |
326 | y0 = kLengthInCeModBorder; | |
327 | zcoor = kInterCentrModBorder1; | |
328 | zcoo = kInterCentrModBorder2; | |
329 | alpha = TMath::ATan((dy-2.*y0)/(zcoo-zcoor)); | |
330 | beta = (kPi*0.5-alpha)*0.5; | |
331 | tgbe = TMath::Tan(beta); | |
332 | trpa[0] = xFLT*0.5;//par[0]; | |
333 | trpa[1] = 0.; | |
334 | trpa[2] = 0.; | |
335 | trpa[3] = kModuleWallThickness; | |
336 | trpa[4] = (y0-kModuleWallThickness*tgbe)*0.5; | |
337 | trpa[5] = (y0+kModuleWallThickness*tgbe)*0.5; | |
338 | trpa[6] = TMath::ATan(tgbe*0.5)*kRaddeg; | |
339 | trpa[7] = kModuleWallThickness; | |
340 | trpa[8] = (y0-kModuleWallThickness*tgbe)*0.5; | |
341 | trpa[9] = (y0+kModuleWallThickness*tgbe)*0.5; | |
342 | trpa[10] = TMath::ATan(tgbe*0.5)*kRaddeg; | |
343 | ||
344 | gMC->Gsvolu("FWZ1","TRAP", idtmed[503], trpa, 11); // fibre glass | |
345 | ||
346 | AliMatrix (idrotm[1],90., 90.,180.,0.,90.,180.); | |
347 | ycoor = -dy + y0*0.5; | |
348 | gMC->Gspos("FWZ1", 1,"FLTA",0.,ycoor, zcoor,idrotm[1],"ONLY"); | |
349 | ||
350 | AliMatrix (idrotm[4],90., 90., 0.,0.,90., 0.); | |
351 | gMC->Gspos("FWZ1", 2,"FLTA",0.,ycoor,-zcoor,idrotm[4],"ONLY"); | |
352 | ||
353 | if (fTOFHoles) { | |
354 | Float_t y0B = y0 - kModuleWallThickness*0.5*tgbe; | |
355 | Float_t ycoorB = ycoor - kModuleWallThickness*0.25/tgbe; | |
356 | trpa[0] = xFLT*0.5;//par[0]; | |
357 | trpa[1] = 0.; | |
358 | trpa[2] = 0.; | |
359 | trpa[3] = kModuleWallThickness*0.5; | |
360 | trpa[4] = (y0B-kModuleWallThickness*0.5*tgbe)*0.5; | |
361 | trpa[5] = (y0B+kModuleWallThickness*0.5*tgbe)*0.5; | |
362 | trpa[6] = TMath::ATan(tgbe*0.5)*kRaddeg; | |
363 | trpa[7] = kModuleWallThickness*0.5; | |
364 | trpa[8] = (y0B-kModuleWallThickness*0.5*tgbe)*0.5; | |
365 | trpa[9] = (y0B+kModuleWallThickness*0.5*tgbe)*0.5; | |
366 | trpa[10] = TMath::ATan(tgbe*0.5)*kRaddeg; | |
367 | gMC->Gsvolu("FZ1B","TRAP", idtmed[503], trpa, 11); // fibre glass | |
368 | gMC->Gspos("FZ1B", 5,"FLTB",0.,ycoorB,-zcoor+(zlenA*0.5+kInterCentrModBorder1)*0.5-kModuleWallThickness,idrotm[4],"ONLY"); | |
369 | gMC->Gspos("FZ1B", 6,"FLTC",0.,ycoorB,+zcoor-(zlenA*0.5+kInterCentrModBorder1)*0.5+kModuleWallThickness,idrotm[1],"ONLY"); | |
370 | } | |
371 | ||
372 | AliMatrix (idrotm[2],90.,270., 0.,0.,90.,180.); | |
373 | ycoor = -y0*0.5; | |
374 | gMC->Gspos("FWZ1", 3,"FLTA",0.,ycoor, zcoo,idrotm[2],"ONLY"); | |
375 | AliMatrix (idrotm[5],90.,270.,180.,0.,90., 0.); | |
376 | gMC->Gspos("FWZ1", 4,"FLTA",0.,ycoor,-zcoo,idrotm[5],"ONLY"); | |
377 | ||
378 | if (fTOFHoles) { | |
379 | Float_t y0B = y0 + kModuleWallThickness*0.5*tgbe; | |
380 | Float_t ycoorB = ycoor - kModuleWallThickness*0.25/tgbe; | |
381 | trpa[0] = xFLT*0.5;//par[0]; | |
382 | trpa[1] = 0.; | |
383 | trpa[2] = 0.; | |
384 | trpa[3] = kModuleWallThickness*0.5; | |
385 | trpa[4] = (y0B-kModuleWallThickness*0.5*tgbe)*0.5; | |
386 | trpa[5] = (y0B+kModuleWallThickness*0.5*tgbe)*0.5; | |
387 | trpa[6] = TMath::ATan(tgbe*0.5)*kRaddeg; | |
388 | trpa[7] = kModuleWallThickness*0.5; | |
389 | trpa[8] = (y0B-kModuleWallThickness*0.5*tgbe)*0.5; | |
390 | trpa[9] = (y0B+kModuleWallThickness*0.5*tgbe)*0.5; | |
391 | trpa[10] = TMath::ATan(tgbe*0.5)*kRaddeg; | |
392 | gMC->Gsvolu("FZ1C","TRAP", idtmed[503], trpa, 11); // fibre glass | |
393 | gMC->Gspos("FZ1C", 7,"FLTB",0.,ycoorB,-zcoo+(zlenA*0.5+kInterCentrModBorder1)*0.5-kModuleWallThickness,idrotm[5],"ONLY"); | |
394 | gMC->Gspos("FZ1C", 8,"FLTC",0.,ycoorB, zcoo-(zlenA*0.5+kInterCentrModBorder1)*0.5+kModuleWallThickness,idrotm[2],"ONLY"); | |
395 | } | |
396 | ||
397 | trpa[0] = 0.5*(zcoo-zcoor)/TMath::Cos(alpha); | |
398 | trpa[1] = kModuleWallThickness; | |
399 | trpa[2] = xFLT*0.5;//par[0]; | |
400 | trpa[3] = -beta*kRaddeg; | |
401 | trpa[4] = 0.; | |
402 | trpa[5] = 0.; | |
403 | gMC->Gsvolu("FWZ2","PARA", idtmed[503], trpa, 6); // fibre glass | |
404 | AliMatrix (idrotm[3], alpha*kRaddeg,90.,90.+alpha*kRaddeg,90.,90.,180.); | |
405 | gMC->Gspos("FWZ2", 1,"FLTA",0.,-dy*0.5, (zcoo+zcoor)*0.5,idrotm[3],"ONLY"); | |
406 | AliMatrix (idrotm[6],180.-alpha*kRaddeg,90.,90.-alpha*kRaddeg,90.,90., 0.); | |
407 | gMC->Gspos("FWZ2", 2,"FLTA",0.,-dy*0.5,-(zcoo+zcoor)*0.5,idrotm[6],"ONLY"); | |
408 | ||
409 | if (fTOFHoles) { | |
410 | trpa[0] = 0.5*(zcoo-zcoor)/TMath::Cos(alpha); | |
411 | trpa[1] = kModuleWallThickness*0.5; | |
412 | trpa[2] = xFLT*0.5;//par[0]; | |
413 | trpa[3] = -beta*kRaddeg; | |
414 | trpa[4] = 0.; | |
415 | trpa[5] = 0.; | |
416 | gMC->Gsvolu("FZ2B","PARA", idtmed[503], trpa, 6); // fibre glass | |
417 | gMC->Gspos("FZ2B", 3,"FLTB",0.,-dy*0.5-kModuleWallThickness*0.5/tgbe,-(zcoo+zcoor)*0.5+(zlenA*0.5+kInterCentrModBorder1)*0.5-kModuleWallThickness,idrotm[6],"ONLY"); | |
418 | gMC->Gspos("FZ2B", 4,"FLTC",0.,-dy*0.5-kModuleWallThickness*0.5/tgbe,+(zcoo+zcoor)*0.5-(zlenA*0.5+kInterCentrModBorder1)*0.5+kModuleWallThickness,idrotm[3],"ONLY"); | |
419 | } | |
420 | ||
421 | // wall between intermediate and lateral modules | |
422 | y0 = kLengthExInModBorder;//4.7; | |
423 | zcoor = kExterInterModBorder1;//196.; | |
424 | zcoo = kExterInterModBorder2;//203.5; | |
425 | alpha = TMath::ATan((dy-2.*y0)/(zcoo-zcoor)); | |
426 | beta = (kPi*0.5-alpha)*0.5; | |
427 | tgbe = TMath::Tan(beta); | |
428 | trpa[0] = xFLT*0.5;//par[0]; | |
429 | trpa[1] = 0.; | |
430 | trpa[2] = 0.; | |
431 | trpa[3] = kModuleWallThickness; | |
432 | trpa[4] = (y0-kModuleWallThickness*tgbe)*0.5; | |
433 | trpa[5] = (y0+kModuleWallThickness*tgbe)*0.5; | |
434 | trpa[6] = TMath::ATan(tgbe*0.5)*kRaddeg; | |
435 | trpa[7] = kModuleWallThickness; | |
436 | trpa[8] = (y0-kModuleWallThickness*tgbe)*0.5; | |
437 | trpa[9] = (y0+kModuleWallThickness*tgbe)*0.5; | |
438 | trpa[10] = TMath::ATan(tgbe*0.5)*kRaddeg; | |
439 | gMC->Gsvolu("FWZ3","TRAP", idtmed[503], trpa, 11); // fibre glass | |
440 | ycoor = -y0*0.5; | |
441 | gMC->Gspos("FWZ3", 1,"FLTA",0.,ycoor, zcoor,idrotm[5],"ONLY"); | |
442 | gMC->Gspos("FWZ3", 2,"FLTA",0.,ycoor,-zcoor,idrotm[2],"ONLY"); | |
443 | ||
444 | if (fTOFHoles) { | |
445 | gMC->Gspos("FWZ3", 5,"FLTB",0.,ycoor,-zcoor+(zlenA*0.5 + kInterCentrModBorder1 - kModuleWallThickness)*0.5,idrotm[2],"ONLY"); | |
446 | gMC->Gspos("FWZ3", 6,"FLTC",0.,ycoor, zcoor-(zlenA*0.5 + kInterCentrModBorder1 - kModuleWallThickness)*0.5,idrotm[5],"ONLY"); | |
447 | } | |
448 | ycoor = -dy+y0*0.5; | |
449 | gMC->Gspos("FWZ3", 3,"FLTA",0.,ycoor, zcoo,idrotm[4],"ONLY"); | |
450 | gMC->Gspos("FWZ3", 4,"FLTA",0.,ycoor,-zcoo,idrotm[1],"ONLY"); | |
451 | ||
452 | if (fTOFHoles) { | |
453 | gMC->Gspos("FWZ3", 7,"FLTB",0.,ycoor,-zcoo+(zlenA*0.5 + kInterCentrModBorder1 - kModuleWallThickness)*0.5,idrotm[1],"ONLY"); | |
454 | gMC->Gspos("FWZ3", 8,"FLTC",0.,ycoor, zcoo-(zlenA*0.5 + kInterCentrModBorder1 - kModuleWallThickness)*0.5,idrotm[4],"ONLY"); | |
455 | } | |
456 | ||
457 | trpa[0] = 0.5*(zcoo-zcoor)/TMath::Cos(alpha); | |
458 | trpa[1] = kModuleWallThickness; | |
459 | trpa[2] = xFLT*0.5;//par[0]; | |
460 | trpa[3] = -beta*kRaddeg; | |
461 | trpa[4] = 0.; | |
462 | trpa[5] = 0.; | |
463 | gMC->Gsvolu("FWZ4","PARA", idtmed[503], trpa, 6); // fibre glass | |
464 | AliMatrix (idrotm[3],alpha*kRaddeg,90.,90.+alpha*kRaddeg,90.,90.,180.); | |
465 | AliMatrix (idrotm[6],180.-alpha*kRaddeg,90.,90.-alpha*kRaddeg,90.,90.,0.); | |
466 | gMC->Gspos("FWZ4", 1,"FLTA",0.,-dy*0.5, (zcoo+zcoor)*0.5,idrotm[6],"ONLY"); | |
467 | gMC->Gspos("FWZ4", 2,"FLTA",0.,-dy*0.5,-(zcoo+zcoor)*0.5,idrotm[3],"ONLY"); | |
468 | ||
469 | if (fTOFHoles) { | |
470 | gMC->Gspos("FWZ4", 3,"FLTB",0.,-dy*0.5,-(zcoo+zcoor)*0.5+(zlenA*0.5 + kInterCentrModBorder1 - kModuleWallThickness)*0.5,idrotm[3],"ONLY"); | |
471 | gMC->Gspos("FWZ4", 4,"FLTC",0.,-dy*0.5, (zcoo+zcoor)*0.5-(zlenA*0.5 + kInterCentrModBorder1 - kModuleWallThickness)*0.5,idrotm[6],"ONLY"); | |
472 | } | |
473 | ||
474 | ///////////////// Detector itself ////////////////////// | |
475 | ||
476 | const Int_t knx = fTOFGeometry->NpadX(); // number of pads along x | |
477 | const Int_t knz = fTOFGeometry->NpadZ(); // number of pads along z | |
478 | const Float_t kPadX = fTOFGeometry->XPad(); // pad length along x | |
479 | const Float_t kPadZ = fTOFGeometry->ZPad(); // pad length along z | |
480 | ||
481 | // new description for strip volume -double stack strip- | |
482 | // -- all constants are expressed in cm | |
483 | // heigth of different layers | |
484 | const Float_t khhony = 1.0 ; // heigth of HONY Layer | |
485 | const Float_t khpcby = 0.08 ; // heigth of PCB Layer | |
486 | const Float_t khrgly = 0.055 ; // heigth of RED GLASS Layer | |
487 | const Float_t khglfy = 0.285 ; // heigth of GLASS+FISHLINE Layer | |
488 | const Float_t khcpcby = 0.16 ; // heigth of PCB Central Layer | |
489 | const Float_t kwhonz = 8.1 ; // z dimension of HONEY Layer | |
490 | const Float_t kwpcbz1 = 10.6 ; // z dimension of PCB Lower Layer | |
491 | const Float_t kwpcbz2 = 11.6 ; // z dimension of PCB Upper Layer | |
492 | const Float_t kwcpcbz = 12.4 ; // z dimension of PCB Central Layer | |
493 | const Float_t kwrglz = 8. ; // z dimension of RED GLASS Layer | |
494 | const Float_t kwglfz = 7. ; // z dimension of GLASS+FISHLN Layer | |
495 | const Float_t klsensmx = knx*kPadX; // length of Sensitive Layer | |
496 | const Float_t khsensmy = 0.05;//0.11;//0.16;// heigth of Sensitive Layer // ADC | |
497 | const Float_t kwsensmz = knz*kPadZ; // width of Sensitive Layer | |
498 | ||
499 | // heigth of the FSTR Volume (the strip volume) | |
500 | const Float_t khstripy = 2.*khhony+2.*khpcby+4.*khrgly+2.*khglfy+khcpcby; | |
501 | ||
502 | // width of the FSTR Volume (the strip volume) | |
503 | const Float_t kwstripz = kwcpcbz; | |
504 | // length of the FSTR Volume (the strip volume) | |
505 | const Float_t klstripx = fTOFGeometry->StripLength();//122.; | |
506 | ||
507 | Float_t parfp[3]={klstripx*0.5,khstripy*0.5,kwstripz*0.5}; | |
508 | // Coordinates of the strip center in the strip reference frame; | |
509 | // used for positioning internal strip volumes | |
510 | Float_t posfp[3]={0.,0.,0.}; | |
511 | ||
512 | // FSTR volume definition-filling this volume with non sensitive Gas Mixture | |
513 | gMC->Gsvolu("FSTR","BOX",idtmed[507],parfp,3); // Freon mix | |
514 | ||
515 | //-- HONY Layer definition | |
516 | parfp[1] = khhony*0.5; | |
517 | parfp[2] = kwhonz*0.5; | |
518 | gMC->Gsvolu("FHON","BOX",idtmed[501],parfp,3); // honeycomb (Nomex) | |
519 | // positioning 2 HONY Layers on FSTR volume | |
520 | posfp[1] =-khstripy*0.5+parfp[1]; | |
521 | gMC->Gspos("FHON",1,"FSTR",0., posfp[1],0.,0,"ONLY"); | |
522 | gMC->Gspos("FHON",2,"FSTR",0.,-posfp[1],0.,0,"ONLY"); | |
523 | ||
524 | //-- PCB Layer definition | |
525 | parfp[1] = khpcby*0.5; | |
526 | parfp[2] = kwpcbz1*0.5; | |
527 | gMC->Gsvolu("FPC1","BOX",idtmed[502],parfp,3); // G10 | |
528 | parfp[2] = kwpcbz2*0.5; | |
529 | gMC->Gsvolu("FPC2","BOX",idtmed[502],parfp,3); // G10 | |
530 | // positioning 2 PCB Layers on FSTR volume | |
531 | posfp[1] =-khstripy*0.5+khhony+parfp[1]; | |
532 | gMC->Gspos("FPC1",1,"FSTR",0.,-posfp[1],0.,0,"ONLY"); | |
533 | gMC->Gspos("FPC2",1,"FSTR",0., posfp[1],0.,0,"ONLY"); | |
534 | ||
535 | //-- central PCB layer definition | |
536 | parfp[1] = khcpcby*0.5; | |
537 | parfp[2] = kwcpcbz*0.5; | |
538 | gMC->Gsvolu("FPCB","BOX",idtmed[502],parfp,3); // G10 | |
539 | // positioning the central PCB layer | |
540 | gMC->Gspos("FPCB",1,"FSTR",0.,0.,0.,0,"ONLY"); | |
541 | ||
542 | // Sensitive volume | |
543 | Float_t parfs[3] = {klsensmx*0.5, khsensmy*0.5, kwsensmz*0.5}; | |
544 | gMC->Gsvolu("FSEN","BOX",idtmed[508],parfs,3); // sensitive ... | |
545 | // dividing FSEN along z in knz=2 and along x in knx=48 | |
546 | gMC->Gsdvn("FSEZ","FSEN",knz,3); | |
547 | gMC->Gsdvn("FPAD","FSEZ",knx,1); | |
548 | // positioning a Sensitive layer inside FPCB | |
549 | gMC->Gspos("FSEN",1,"FPCB",0.,0.,0.,0,"ONLY"); | |
550 | ||
551 | //-- RED GLASS Layer definition | |
552 | parfp[1] = khrgly*0.5; | |
553 | parfp[2] = kwrglz*0.5; | |
554 | gMC->Gsvolu("FRGL","BOX",idtmed[509],parfp,3); // glass | |
555 | // positioning 4 RED GLASS Layers on FSTR volume | |
556 | posfp[1] = -khstripy*0.5+khhony+khpcby+parfp[1]; | |
557 | gMC->Gspos("FRGL",1,"FSTR",0., posfp[1],0.,0,"ONLY"); | |
558 | gMC->Gspos("FRGL",4,"FSTR",0.,-posfp[1],0.,0,"ONLY"); | |
559 | posfp[1] = (khcpcby+khrgly)*0.5; | |
560 | gMC->Gspos("FRGL",2,"FSTR",0.,-posfp[1],0.,0,"ONLY"); | |
561 | gMC->Gspos("FRGL",3,"FSTR",0., posfp[1],0.,0,"ONLY"); | |
562 | ||
563 | //-- GLASS+FISHLINE Layer definition | |
564 | parfp[1] = khglfy*0.5; | |
565 | parfp[2] = kwglfz*0.5; | |
566 | gMC->Gsvolu("FGLF","BOX",idtmed[504],parfp,3); | |
567 | ||
568 | // positioning 2 GLASS+FISHLINE Layers on FSTR volume | |
569 | posfp[1] = (khcpcby+khglfy)*0.5+khrgly; | |
570 | gMC->Gspos("FGLF",1,"FSTR",0.,-posfp[1],0.,0,"ONLY"); | |
571 | gMC->Gspos("FGLF",2,"FSTR",0., posfp[1],0.,0,"ONLY"); | |
572 | ||
573 | ||
574 | // Positioning the Strips (FSTR) in the FLT volumes | |
575 | Int_t maxStripNumbers [5] ={fTOFGeometry->NStripC(), | |
576 | fTOFGeometry->NStripB(), | |
577 | fTOFGeometry->NStripA(), | |
578 | fTOFGeometry->NStripB(), | |
579 | fTOFGeometry->NStripC()}; | |
580 | ||
581 | Int_t totalStrip = 0; | |
582 | Float_t zpos, ypos, ang; | |
583 | for(Int_t iplate =0; iplate < fTOFGeometry->NPlates(); iplate++){ | |
584 | if (iplate>0) totalStrip += maxStripNumbers[iplate-1]; | |
585 | for(Int_t istrip =0; istrip < maxStripNumbers[iplate]; istrip++){ | |
586 | ||
587 | ang = fTOFGeometry->GetAngles(iplate,istrip); | |
588 | AliDebug(1, Form(" iplate = %1i, istrip = %2i ---> ang = %f", iplate, istrip, ang)); | |
589 | ||
590 | if (ang>0.) AliMatrix (idrotm[istrip+totalStrip+1],90.,0.,90.+ang,90., ang, 90.); | |
591 | else if (ang==0.) AliMatrix (idrotm[istrip+totalStrip+1],90.,0.,90.,90., 0., 0.); | |
592 | else if (ang<0.) AliMatrix (idrotm[istrip+totalStrip+1],90.,0.,90.+ang,90.,-ang,270.); | |
593 | ||
594 | ||
595 | zpos = fTOFGeometry->GetDistances(iplate,istrip); | |
596 | ypos = fTOFGeometry->GetHeights(iplate,istrip); | |
597 | ||
598 | gMC->Gspos("FSTR",istrip+totalStrip+1,"FLTA",0.,ypos,-zpos,idrotm[istrip+totalStrip+1], "ONLY"); | |
599 | ||
600 | if (fTOFHoles) { | |
601 | if (istrip+totalStrip+1>53) gMC->Gspos("FSTR",istrip+totalStrip+1,"FLTC",0.,ypos,-zpos-(zlenA*0.5 + kInterCentrModBorder1 - kModuleWallThickness)*0.5,idrotm[istrip+totalStrip+1],"ONLY"); | |
602 | if (istrip+totalStrip+1<39) gMC->Gspos("FSTR",istrip+totalStrip+1,"FLTB",0.,ypos,-zpos+(zlenA*0.5 + kInterCentrModBorder1 - kModuleWallThickness)*0.5,idrotm[istrip+totalStrip+1],"ONLY"); | |
603 | } | |
604 | } | |
605 | } | |
606 | ||
607 | // 1.5 cm Al honeycomb layer between strips and cards | |
608 | par[0] = xFLT*0.5; | |
609 | par[1] = kHoneycombLayerThickness*0.5; | |
610 | par[2] = zFLTA*0.5; | |
611 | ycoor = kHoneycombLayerThickness*0.5; | |
612 | gMC->Gsvolu("FPEA", "BOX ", idtmed[506], par, 3); // Al honeycomb ok giovanni cara romeo | |
613 | gMC->Gspos ("FPEA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY"); | |
614 | ||
615 | if (fTOFHoles) { | |
616 | par[2] = (zlenA*0.5 - kInterCentrModBorder2-kModuleWallThickness)*0.5; | |
617 | ycoor = kHoneycombLayerThickness*0.5; | |
618 | gMC->Gsvolu("FPEB", "BOX ", idtmed[506], par, 3); // Al honeycomb ok giovanni cara romeo | |
619 | gMC->Gspos ("FPEB", 1, "FLTB", 0., ycoor, -(kInterCentrModBorder2-kInterCentrModBorder1)*0.5, 0, "ONLY"); | |
620 | gMC->Gspos ("FPEB", 2, "FLTC", 0., ycoor, (kInterCentrModBorder2-kInterCentrModBorder1)*0.5, 0, "ONLY"); | |
621 | } | |
622 | ||
623 | // frame of Air | |
624 | ycoor += kHoneycombLayerThickness*0.5; | |
625 | //par[0] = xFLT*0.5; | |
626 | par[1] = (yFLT*0.5-kHoneycombLayerThickness-khAlWall)*0.5; | |
627 | par[2] = zFLTA *0.5; | |
628 | ycoor += (yFLT*0.5-kHoneycombLayerThickness-khAlWall)*0.5; | |
629 | gMC->Gsvolu("FAIA", "BOX ", idtmed[500], par, 3); // Air | |
630 | gMC->Gspos ("FAIA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY"); | |
631 | ||
632 | if (fTOFHoles) { | |
633 | par[2] = (zlenA*0.5 - kInterCentrModBorder2 - kModuleWallThickness)*0.5; | |
634 | gMC->Gsvolu("FAIB", "BOX ", idtmed[500], par, 3); // Air | |
635 | gMC->Gspos ("FAIB", 0, "FLTB", 0., ycoor, -(kInterCentrModBorder2-kInterCentrModBorder1)*0.5, 0, "ONLY"); | |
636 | gMC->Gsvolu("FAIC", "BOX ", idtmed[500], par, 3); // Air | |
637 | gMC->Gspos ("FAIC", 0, "FLTC", 0., ycoor, (kInterCentrModBorder2-kInterCentrModBorder1)*0.5, 0, "ONLY"); | |
638 | } | |
639 | ||
640 | // start with cards and cooling tubes | |
641 | // finally, cards, cooling tubes and layer for thermal dispersion | |
642 | // 3 volumes | |
643 | ||
644 | // see GEOM200 in GEANT manual | |
645 | ||
646 | //AliMatrix(idrotm[98], 90., 0., 90., 90., 0., 0.); // 0 deg | |
647 | ||
648 | Float_t cardpar[3]; | |
649 | ||
650 | // card volume definition | |
651 | cardpar[0]= xFLT*0.5; | |
652 | cardpar[1]= 5.; | |
653 | cardpar[2]= 0.1; | |
654 | gMC->Gsvolu("FCAR", "BOX ", idtmed[502], cardpar, 3); // PCB Card | |
655 | ||
656 | //alu plate volume definition | |
657 | cardpar[1]= 3.5; | |
658 | cardpar[2]= 0.05; | |
659 | gMC->Gsvolu("FALP", "BOX ", idtmed[505], cardpar, 3); // Alu Plate | |
660 | ||
661 | // tube volume definition | |
662 | Float_t tubepar[3]; | |
663 | tubepar[0]= 0.; | |
664 | tubepar[1]= 0.4; | |
665 | tubepar[2]= 61.; | |
666 | gMC->Gsvolu("FTUB", "TUBE", idtmed[511], tubepar, 3); // cooling tubes (steel) | |
667 | ||
668 | //tubepar[0]= 0.; | |
669 | tubepar[1]= 0.35; | |
670 | //tubepar[2]= 61.; | |
671 | gMC->Gsvolu("FITU", "TUBE", idtmed[510], tubepar, 3); // cooling water | |
672 | // positioning water tube into the steel one | |
673 | gMC->Gspos("FITU",1,"FTUB",0.,0.,0.,0,"ONLY"); | |
674 | ||
675 | // rotation matrix | |
676 | AliMatrix(idrotm[99], 180., 90., 90., 90., 90., 0.); | |
677 | ||
678 | // central module positioning | |
679 | Float_t cardpos[3], aplpos2; | |
680 | Float_t stepforcardA=6.625; | |
681 | Float_t tdis=0.6; | |
682 | Float_t aplpos1 = -2.; | |
683 | ||
684 | cardpos[0]= 0.; | |
685 | cardpos[1]= -0.5; | |
686 | cardpos[2]= -53.; | |
687 | // tubepos= -53.+tdis; | |
688 | Int_t icard; | |
689 | for (icard=39; icard<54; ++icard) { | |
690 | cardpos[2]= cardpos[2]+stepforcardA; | |
691 | aplpos2 = cardpos[2]+0.15; | |
692 | gMC->Gspos("FCAR",icard,"FAIA",cardpos[0],cardpos[1], cardpos[2], 0,"ONLY"); | |
693 | gMC->Gspos("FALP",icard,"FAIA",cardpos[0], aplpos1, aplpos2, 0,"ONLY"); | |
694 | gMC->Gspos("FTUB",icard,"FAIA", 0.,cardpos[1],cardpos[2]+tdis,idrotm[99],"ONLY"); | |
695 | } | |
696 | ||
697 | // intermediate module positioning | |
698 | Float_t stepforcardB= 7.05; | |
699 | Float_t offs = 53.; | |
700 | ||
701 | cardpos[2]= offs; | |
702 | for (icard=20; icard<39; ++icard) { | |
703 | cardpos[2]= cardpos[2]+stepforcardB; | |
704 | aplpos2 = cardpos[2]+0.15; | |
705 | ||
706 | gMC->Gspos("FCAR",icard+34,"FAIA",cardpos[0],cardpos[1], cardpos[2], 0,"ONLY"); | |
707 | gMC->Gspos("FALP",icard+34,"FAIA",cardpos[0], aplpos1, aplpos2, 0,"ONLY"); | |
708 | gMC->Gspos("FTUB",icard+34,"FAIA", 0.,cardpos[1], cardpos[2]+tdis,idrotm[99],"ONLY"); | |
709 | gMC->Gspos("FCAR",58-icard,"FAIA",cardpos[0],cardpos[1], -cardpos[2], 0,"ONLY"); | |
710 | gMC->Gspos("FALP",58-icard,"FAIA",cardpos[0], aplpos1, -aplpos2, 0,"ONLY"); | |
711 | gMC->Gspos("FTUB",58-icard,"FAIA", 0.,cardpos[1],-cardpos[2]-tdis,idrotm[99],"ONLY"); | |
712 | ||
713 | if (fTOFHoles) { | |
714 | gMC->Gspos("FCAR",icard+34+182,"FAIC",cardpos[0],cardpos[1], cardpos[2]-(zlenA*0.5 + kInterCentrModBorder2 - kModuleWallThickness)*0.5, 0,"ONLY"); | |
715 | gMC->Gspos("FALP",icard+34+182,"FAIC",cardpos[0], aplpos1, aplpos2-(zlenA*0.5 + kInterCentrModBorder2 - kModuleWallThickness)*0.5, 0,"ONLY"); | |
716 | gMC->Gspos("FTUB",icard+34+182,"FAIC", 0.,cardpos[1], cardpos[2]+tdis-(zlenA*0.5 + kInterCentrModBorder2 - kModuleWallThickness)*0.5,idrotm[99],"ONLY"); | |
717 | gMC->Gspos("FCAR",58-icard+ 91,"FAIB",cardpos[0],cardpos[1], -cardpos[2]+(zlenA*0.5 + kInterCentrModBorder2 - kModuleWallThickness)*0.5, 0,"ONLY"); | |
718 | gMC->Gspos("FALP",58-icard+ 91,"FAIB",cardpos[0], aplpos1, -aplpos2+(zlenA*0.5 + kInterCentrModBorder2 - kModuleWallThickness)*0.5, 0,"ONLY"); | |
719 | gMC->Gspos("FTUB",58-icard+ 91,"FAIB", 0.,cardpos[1],-cardpos[2]-tdis+(zlenA*0.5 + kInterCentrModBorder2 - kModuleWallThickness)*0.5,idrotm[99],"ONLY"); | |
720 | } | |
721 | ||
722 | } | |
723 | ||
724 | // outer module positioning | |
725 | Float_t stepforcardC= 8.45238; | |
726 | offs += zlenB; | |
727 | cardpos[2]= offs; | |
728 | for (icard=1; icard<20; ++icard) { | |
729 | cardpos[2]= cardpos[2]+stepforcardC; | |
730 | aplpos2 = cardpos[2]+0.15; | |
731 | ||
732 | gMC->Gspos("FCAR",icard+72,"FAIA",cardpos[0],cardpos[1], cardpos[2], 0,"ONLY"); | |
733 | gMC->Gspos("FALP",icard+72,"FAIA",cardpos[0], aplpos1, aplpos2, 0,"ONLY"); | |
734 | gMC->Gspos("FTUB",icard+72,"FAIA", 0.,cardpos[1], cardpos[2]+tdis,idrotm[99],"ONLY"); | |
735 | gMC->Gspos("FCAR",20-icard,"FAIA",cardpos[0],cardpos[1], -cardpos[2], 0,"ONLY"); | |
736 | gMC->Gspos("FALP",20-icard,"FAIA",cardpos[0], aplpos1, -aplpos2, 0,"ONLY"); | |
737 | gMC->Gspos("FTUB",20-icard,"FAIA", 0.,cardpos[1],-cardpos[2]-tdis,idrotm[99],"ONLY"); | |
738 | ||
739 | if (fTOFHoles) { | |
740 | gMC->Gspos("FCAR",icard+72+182,"FAIC",cardpos[0],cardpos[1], cardpos[2]-(zlenA*0.5 + kInterCentrModBorder2 - kModuleWallThickness)*0.5, 0,"ONLY"); | |
741 | gMC->Gspos("FALP",icard+72+182,"FAIC",cardpos[0], aplpos1, aplpos2-(zlenA*0.5 + kInterCentrModBorder2 - kModuleWallThickness)*0.5, 0,"ONLY"); | |
742 | gMC->Gspos("FTUB",icard+72+182,"FAIC", 0.,cardpos[1], cardpos[2]+tdis-(zlenA*0.5 + kInterCentrModBorder2 - kModuleWallThickness)*0.5,idrotm[99],"ONLY"); | |
743 | gMC->Gspos("FCAR",20-icard+ 91,"FAIB",cardpos[0],cardpos[1], -cardpos[2]+(zlenA*0.5 + kInterCentrModBorder2 - kModuleWallThickness)*0.5, 0,"ONLY"); | |
744 | gMC->Gspos("FALP",20-icard+ 91,"FAIB",cardpos[0], aplpos1, -aplpos2+(zlenA*0.5 + kInterCentrModBorder2 - kModuleWallThickness)*0.5, 0,"ONLY"); | |
745 | gMC->Gspos("FTUB",20-icard+ 91,"FAIB", 0.,cardpos[1],-cardpos[2]-tdis+(zlenA*0.5 + kInterCentrModBorder2 - kModuleWallThickness)*0.5,idrotm[99],"ONLY"); | |
746 | } | |
747 | } | |
748 | ||
749 | } | |
750 | //_____________________________________________________________________________ | |
751 | void AliTOFv5T0::DrawModule() const | |
752 | { | |
753 | // | |
754 | // Draw a shaded view of the Time Of Flight version 4 | |
755 | // | |
756 | ||
757 | // Set everything unseen | |
758 | gMC->Gsatt("*", "seen", -1); | |
759 | ||
760 | // | |
761 | //Set volumes visible | |
762 | // | |
763 | ||
764 | //Set ALIC mother transparent | |
765 | gMC->Gsatt("ALIC","SEEN", 0); | |
766 | ||
767 | //=====> Level 1 | |
768 | // Level 1 for TOF volumes | |
769 | gMC->Gsatt("B077","seen", 0); | |
770 | ||
771 | //=====> Level 2 | |
772 | // Level 2 for TOF volumes | |
773 | gMC->Gsatt("B071","seen", 0); | |
774 | gMC->Gsatt("B074","seen", 0); | |
775 | gMC->Gsatt("B075","seen", 0); | |
776 | gMC->Gsatt("B076","seen",-1); // all B076 sub-levels skipped - | |
777 | gMC->Gsatt("B080","seen", 0); // B080 does not has sub-level | |
778 | ||
779 | // Level 2 of B071 | |
780 | gMC->Gsatt("B056","seen", 0); // B056 does not has sub-levels - | |
781 | gMC->Gsatt("B063","seen",-1); // all B063 sub-levels skipped - | |
782 | gMC->Gsatt("B065","seen",-1); // all B065 sub-levels skipped - | |
783 | gMC->Gsatt("B067","seen",-1); // all B067 sub-levels skipped - | |
784 | gMC->Gsatt("B072","seen",-1); // all B072 sub-levels skipped - | |
785 | ||
786 | gMC->Gsatt("BTR1","seen", 0); // all BTR1 sub-levels skipped - | |
787 | gMC->Gsatt("BTO1","seen", 0); | |
788 | ||
789 | // Level 2 of B074 | |
790 | gMC->Gsatt("BTR2","seen", 0); // all BTR1 sub-levels skipped - | |
791 | gMC->Gsatt("BTO2","seen", 0); | |
792 | ||
793 | // Level 2 of B075 | |
794 | gMC->Gsatt("BTR3","seen", 0); // all BTR1 sub-levels skipped - | |
795 | gMC->Gsatt("BTO3","seen", 0); | |
796 | ||
797 | // Level 3 of B071, B074 and B075 | |
798 | gMC->Gsatt("FTOA","SEEN", 0); | |
799 | if (fTOFHoles) gMC->Gsatt("FTOB","SEEN", 0); | |
800 | ||
801 | // Level 4 of B071, B074 and B075 | |
802 | gMC->Gsatt("FLTA","SEEN", 0); | |
803 | if (fTOFHoles) gMC->Gsatt("FLTB","SEEN",0); | |
804 | if (fTOFHoles) gMC->Gsatt("FLTC","SEEN",0); | |
805 | ||
806 | // Level 5 of B071, B074 and B075 | |
807 | gMC->Gsatt("FAIA","SEEN",-1); // all FAIA sub-levels skipped - | |
808 | if (fTOFHoles) gMC->Gsatt("FAIB","SEEN",-1); // all FAIB sub-levels skipped - | |
809 | if (fTOFHoles) gMC->Gsatt("FAIC","SEEN",-1); // all FAIC sub-levels skipped - | |
810 | ||
811 | gMC->Gsatt("FALA","SEEN", 0); | |
812 | if (fTOFHoles) gMC->Gsatt("FALB","SEEN", 0); | |
813 | ||
814 | gMC->Gsatt("FPEA","SEEN", 1); | |
815 | if (fTOFHoles) gMC->Gsatt("FPEB","SEEN", 1); | |
816 | ||
817 | gMC->Gsatt("FSTR","SEEN",-1); // all FSTR sub-levels skipped - | |
818 | ||
819 | gMC->Gsatt("FWZ1","SEEN", 0); | |
820 | gMC->Gsatt("FWZ2","SEEN", 0); | |
821 | gMC->Gsatt("FWZ3","SEEN", 0); | |
822 | gMC->Gsatt("FWZ4","SEEN", 0); | |
823 | if (fTOFHoles) { | |
824 | gMC->Gsatt("FZ1B","SEEN", 0); | |
825 | gMC->Gsatt("FZ1C","SEEN", 0); | |
826 | gMC->Gsatt("FZ2B","SEEN", 0); | |
827 | } | |
828 | ||
829 | gMC->Gdopt("hide", "on"); | |
830 | gMC->Gdopt("shad", "on"); | |
831 | gMC->Gsatt("*", "fill", 7); | |
832 | gMC->SetClipBox("."); | |
833 | gMC->SetClipBox("*", 100, 1000, 100, 1000, 100, 1000); | |
834 | gMC->DefaultRange(); | |
835 | gMC->Gdraw("alic", 40, 30, 0, 10, 9.5, .018, .018); | |
836 | gMC->Gdhead(1111, "Time Of Flight"); | |
837 | gMC->Gdman(18, 3, "MAN"); | |
838 | gMC->Gdopt("hide","off"); | |
839 | } | |
840 | //_____________________________________________________________________________ | |
841 | void AliTOFv5T0::DrawDetectorModules() | |
842 | { | |
843 | // | |
844 | // Draw a shaded view of the TOF detector version 4 | |
845 | // | |
846 | ||
847 | // Set everything unseen | |
848 | gMC->Gsatt("*", "seen", -1); | |
849 | ||
850 | // | |
851 | //Set volumes visible | |
852 | // | |
853 | ||
854 | //Set ALIC mother transparent | |
855 | gMC->Gsatt("ALIC","SEEN", 0); | |
856 | ||
857 | //=====> Level 1 | |
858 | // Level 1 for TOF volumes | |
859 | gMC->Gsatt("B077","seen", 0); | |
860 | ||
861 | //=====> Level 2 | |
862 | // Level 2 for TOF volumes | |
863 | gMC->Gsatt("B071","seen", 0); | |
864 | gMC->Gsatt("B074","seen", 0); | |
865 | gMC->Gsatt("B075","seen", 0); | |
866 | gMC->Gsatt("B076","seen",-1); // all B076 sub-levels skipped - | |
867 | gMC->Gsatt("B080","seen", 0); // B080 does not has sub-level | |
868 | ||
869 | // Level 2 of B071 | |
870 | gMC->Gsatt("B056","seen", 0); // B056 does not has sub-levels - | |
871 | gMC->Gsatt("B063","seen",-1); // all B063 sub-levels skipped - | |
872 | gMC->Gsatt("B065","seen",-1); // all B065 sub-levels skipped - | |
873 | gMC->Gsatt("B067","seen",-1); // all B067 sub-levels skipped - | |
874 | gMC->Gsatt("B072","seen",-1); // all B072 sub-levels skipped - | |
875 | ||
876 | gMC->Gsatt("BTR1","seen", 0); // all BTR1 sub-levels skipped - | |
877 | gMC->Gsatt("BTO1","seen", 0); | |
878 | ||
879 | // Level 2 of B074 | |
880 | gMC->Gsatt("BTR2","seen", 0); // all BTR1 sub-levels skipped - | |
881 | gMC->Gsatt("BTO2","seen", 0); | |
882 | ||
883 | // Level 2 of B075 | |
884 | gMC->Gsatt("BTR3","seen", 0); // all BTR1 sub-levels skipped - | |
885 | gMC->Gsatt("BTO3","seen", 0); | |
886 | ||
887 | // Level 3 of B071, B075 and B074 | |
888 | gMC->Gsatt("FTOA","seen",-2); // all FTOA sub-levels skipped - | |
889 | if (fTOFHoles) { | |
890 | gMC->Gsatt("FTOB","seen",-2); // all FTOB sub-levels skipped - | |
891 | gMC->Gsatt("FTOC","seen",-2); // all FTOC sub-levels skipped - | |
892 | } | |
893 | ||
894 | gMC->Gdopt("hide","on"); | |
895 | gMC->Gdopt("shad","on"); | |
896 | gMC->Gsatt("*", "fill", 5); | |
897 | gMC->SetClipBox("."); | |
898 | gMC->SetClipBox("*", 100, 1000, 100, 1000, 0, 1000); | |
899 | gMC->DefaultRange(); | |
900 | gMC->Gdraw("alic", 40, 30, 0, 10, 9.5, .018, .018); | |
901 | gMC->Gdhead(1111,"TOF detector"); | |
902 | gMC->Gdman(18, 3, "MAN"); | |
903 | gMC->Gdopt("hide","off"); | |
904 | } | |
905 | ||
906 | //_____________________________________________________________________________ | |
907 | void AliTOFv5T0::DrawDetectorStrips() | |
908 | { | |
909 | // | |
910 | // Draw a shaded view of the TOF strips for version 4 | |
911 | // | |
912 | ||
913 | // Set everything unseen | |
914 | gMC->Gsatt("*", "seen", -1); | |
915 | ||
916 | // | |
917 | //Set volumes visible | |
918 | // | |
919 | ||
920 | //Set ALIC mother transparent | |
921 | gMC->Gsatt("ALIC","SEEN", 0); | |
922 | ||
923 | //=====> Level 1 | |
924 | // Level 1 for TOF volumes | |
925 | gMC->Gsatt("B077","seen", 0); | |
926 | ||
927 | //=====> Level 2 | |
928 | // Level 2 for TOF volumes | |
929 | gMC->Gsatt("B071","seen", 0); | |
930 | gMC->Gsatt("B074","seen", 0); | |
931 | gMC->Gsatt("B075","seen", 0); | |
932 | gMC->Gsatt("B076","seen",-1); // all B076 sub-levels skipped - | |
933 | gMC->Gsatt("B080","seen", 0); // B080 does not has sub-level | |
934 | ||
935 | // Level 2 of B071 | |
936 | gMC->Gsatt("B063","seen",-1); // all B063 sub-levels skipped - | |
937 | gMC->Gsatt("B065","seen",-1); // all B065 sub-levels skipped - | |
938 | gMC->Gsatt("B067","seen",-1); // all B067 sub-levels skipped - | |
939 | gMC->Gsatt("B056","seen", 0); // B056 does not has sub-levels - | |
940 | gMC->Gsatt("B072","seen",-1); // all B072 sub-levels skipped - | |
941 | ||
942 | gMC->Gsatt("BTR1","seen", 0); // all BTR1 sub-levels skipped - | |
943 | gMC->Gsatt("BTO1","seen", 0); | |
944 | ||
945 | // Level 2 of B074 | |
946 | gMC->Gsatt("BTR2","seen", 0); // all BTR1 sub-levels skipped - | |
947 | gMC->Gsatt("BTO2","seen", 0); | |
948 | ||
949 | // Level 2 of B075 | |
950 | gMC->Gsatt("BTR3","seen", 0); // all BTR1 sub-levels skipped - | |
951 | gMC->Gsatt("BTO3","seen", 0); | |
952 | ||
953 | // Level 3 of B071, B074 and B075 | |
954 | gMC->Gsatt("FTOA","SEEN", 0); | |
955 | if (fTOFHoles) { | |
956 | gMC->Gsatt("FTOB","SEEN", 0); | |
957 | gMC->Gsatt("FTOC","SEEN", 0); | |
958 | } | |
959 | ||
960 | // Level 4 of B071, B074 and B075 | |
961 | gMC->Gsatt("FLTA","SEEN", 0); | |
962 | if (fTOFHoles) { | |
963 | gMC->Gsatt("FLTB","SEEN", 0); | |
964 | gMC->Gsatt("FLTC","SEEN", 0); | |
965 | } | |
966 | ||
967 | // Level 5 of B071, B074 and B075 | |
968 | gMC->Gsatt("FAIA","SEEN",-1); // all FAIA sub-levels skipped - | |
969 | if (fTOFHoles) { | |
970 | gMC->Gsatt("FAIB","SEEN",-1); // all FAIB sub-levels skipped - | |
971 | gMC->Gsatt("FAIC","SEEN",-1); // all FAIC sub-levels skipped - | |
972 | } | |
973 | ||
974 | gMC->Gsatt("FALA","SEEN", 0); | |
975 | if (fTOFHoles) gMC->Gsatt("FALB","SEEN", 0); | |
976 | ||
977 | gMC->Gsatt("FPEA","SEEN", 0); | |
978 | if (fTOFHoles) gMC->Gsatt("FPEB","SEEN", 0); | |
979 | ||
980 | gMC->Gsatt("FSTR","SEEN",-2); // all FSTR sub-levels skipped - | |
981 | ||
982 | gMC->Gsatt("FWZ1","SEEN", 0); | |
983 | gMC->Gsatt("FWZ2","SEEN", 0); | |
984 | gMC->Gsatt("FWZ3","SEEN", 0); | |
985 | gMC->Gsatt("FWZ4","SEEN", 0); | |
986 | if (fTOFHoles){ | |
987 | gMC->Gsatt("FZ1B","SEEN", 0); | |
988 | gMC->Gsatt("FZ1C","SEEN", 0); | |
989 | gMC->Gsatt("FZ2B","SEEN", 0); | |
990 | } | |
991 | ||
992 | /* | |
993 | // Level 2 of FAIA | |
994 | // Level 2 of FAIB | |
995 | // Level 2 of FAIC | |
996 | gMC->Gsatt("FALP","SEEN",0); | |
997 | gMC->Gsatt("FCAR","SEEN",0); | |
998 | gMC->Gsatt("FTUB","SEEN",-1); // all FTUB sub-levels skipped - | |
999 | ||
1000 | // Level 2 of FTUB | |
1001 | gMC->Gsatt("FITU","SEEN",0); | |
1002 | */ | |
1003 | ||
1004 | /* | |
1005 | // Level 2 of FSTR | |
1006 | gMC->Gsatt("FGLF","SEEN",0); | |
1007 | gMC->Gsatt("FHON","SEEN",0); | |
1008 | gMC->Gsatt("FPC1","SEEN",0); | |
1009 | gMC->Gsatt("FPC2","SEEN",0); | |
1010 | gMC->Gsatt("FPCB","SEEN",0); | |
1011 | gMC->Gsatt("FRGL","SEEN",0); | |
1012 | ||
1013 | // Level 2 of FPCB => Level 3 of FSTR | |
1014 | gMC->Gsatt("FSEN","SEEN",0); | |
1015 | gMC->Gsatt("FSEZ","SEEN",0); | |
1016 | gMC->Gsatt("FPAD","SEEN",1); | |
1017 | */ | |
1018 | ||
1019 | gMC->Gdopt("hide","on"); | |
1020 | gMC->Gdopt("shad","on"); | |
1021 | gMC->Gsatt("*", "fill", 5); | |
1022 | gMC->SetClipBox("."); | |
1023 | gMC->SetClipBox("*", 0, 1000, 0, 1000, 0, 1000); | |
1024 | gMC->DefaultRange(); | |
1025 | gMC->Gdraw("alic", 40, 30, 0, 10, 9.5, .018, .018); | |
1026 | gMC->Gdhead(1111,"TOF Strips"); | |
1027 | gMC->Gdman(18, 3, "MAN"); | |
1028 | gMC->Gdopt("hide","off"); | |
1029 | } | |
1030 | ||
1031 | //_____________________________________________________________________________ | |
1032 | void AliTOFv5T0::CreateMaterials() | |
1033 | { | |
1034 | // | |
1035 | // Define materials for the Time Of Flight | |
1036 | // | |
1037 | ||
1038 | //AliTOF::CreateMaterials(); | |
1039 | ||
1040 | Int_t isxfld = gAlice->Field()->Integ(); | |
1041 | Float_t sxmgmx = gAlice->Field()->Max(); | |
1042 | Float_t we[7], ae[7], na[7], fr[7], vl[7]; | |
1043 | Int_t i; | |
1044 | ||
1045 | // | |
1046 | //--- Quartz (SiO2) to simulate float glass | |
1047 | // density tuned to have correct float glass | |
1048 | // radiation length | |
1049 | Float_t aq[2] = { 28.0855,15.9994 }; | |
1050 | Float_t zq[2] = { 14.,8. }; | |
1051 | Float_t wq[2] = { 1.,2. }; | |
1052 | Float_t dq = 2.55; // std value: 2.2 | |
1053 | Int_t nq = -2; | |
1054 | ||
1055 | // --- Nomex | |
1056 | Float_t anox[4] = {12.01,1.01,16.00,14.01}; | |
1057 | Float_t znox[4] = { 6., 1., 8., 7.}; | |
1058 | Float_t wnox[4] = {14., 22., 2., 2.}; | |
1059 | Float_t dnox = 0.048; | |
1060 | Int_t nnox = -4; | |
1061 | ||
1062 | // { Si, C, H, O } | |
1063 | Float_t ag10[4] = {28.09,12.01,1.01,16.00}; | |
1064 | Float_t zg10[4] = {14., 6., 1., 8.}; | |
1065 | Float_t wmatg10[4]; | |
1066 | Int_t nlmatg10 = 4; | |
1067 | for (i = 0; i < nlmatg10; ++i) { | |
1068 | ae[i] = ag10[i]; | |
1069 | vl[i] = 1.; | |
1070 | } | |
1071 | ae[4] = 16.00; | |
1072 | vl[4] = 1.; | |
1073 | na[0] = 1.; | |
1074 | na[1] = 14.; | |
1075 | na[2] = 20.; | |
1076 | na[3] = 2.; | |
1077 | na[4] = 3.; | |
1078 | fr[0] = 0.6; | |
1079 | fr[1] = 0.4; | |
1080 | fr[2] = 0.4; | |
1081 | fr[3] = 0.6; | |
1082 | fr[4] = 0.4; | |
1083 | MaterialMixer(we,ae,na,fr,vl,5); | |
1084 | we[3] += we[4]; | |
1085 | wmatg10[0]= we[0]; | |
1086 | wmatg10[1]= we[1]; | |
1087 | wmatg10[2]= we[2]; | |
1088 | wmatg10[3]= we[3]; | |
1089 | Float_t densg10 = 1.7; | |
1090 | ||
1091 | // -- Water | |
1092 | Float_t awa[2] = { 1., 16. }; | |
1093 | Float_t zwa[2] = { 1., 8. }; | |
1094 | Float_t wwa[2] = { 2., 1. }; | |
1095 | Float_t dwa = 1.0; | |
1096 | Int_t nwa = -2; | |
1097 | ||
1098 | // stainless steel | |
1099 | Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 }; | |
1100 | Float_t zsteel[4] = { 26.,24.,28.,14. }; | |
1101 | Float_t wsteel[4] = { .715,.18,.1,.005 }; | |
1102 | ||
1103 | // AIR | |
1104 | Float_t aAir[4]={12.0107,14.0067,15.9994,39.948}; | |
1105 | Float_t zAir[4]={6.,7.,8.,18.}; | |
1106 | Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827}; | |
1107 | Float_t dAir = 1.20479E-3; | |
1108 | ||
1109 | // --- fibre glass | |
1110 | Float_t afg[4] = {28.09,16.00,12.01,1.01}; | |
1111 | Float_t zfg[4] = {14., 8., 6., 1.}; | |
1112 | Float_t wfg[4] = {0.12906,0.29405,0.51502,0.06187}; | |
1113 | Float_t dfg = 1.111; | |
1114 | Int_t nfg = 4; | |
1115 | ||
1116 | // --- Freon C2F4H2 + SF6 | |
1117 | Float_t afre[4]= {12.01,1.01,19.00,32.07}; | |
1118 | Float_t zfre[4]= { 6., 1., 9., 16.}; | |
1119 | Float_t wfre[4]= {0.21250,0.01787,0.74827,0.021355}; | |
1120 | Float_t densfre= 0.00375; | |
1121 | Int_t nfre = 4; | |
1122 | ||
1123 | char namat[15] = " "; | |
1124 | Float_t ama[2], zma[2], dma, radl, absl, buf[1]; | |
1125 | Int_t nbuf; | |
1126 | ||
1127 | AliMixture ( 0, "Air$", aAir, zAir, dAir, 4, wAir); | |
1128 | AliMixture ( 1, "Nomex$", anox, znox, dnox, nnox, wnox); | |
1129 | AliMixture ( 2, "G10$", ag10, zg10, densg10, nlmatg10, wmatg10); | |
1130 | AliMixture ( 3, "fibre glass$", afg, zfg, dfg, nfg, wfg); | |
1131 | AliMaterial( 4, "Al $", 26.98, 13., 2.7, 8.9, 37.2); | |
1132 | AliMaterial( 5, "Al honeycomb$", 26.98, 13., 0.0496, 483., 2483.); | |
1133 | AliMixture ( 6, "Freon$", afre, zfre, densfre, nfre, wfre); | |
1134 | AliMixture ( 7, "Glass$", aq, zq, dq, nq, wq); | |
1135 | ||
1136 | // get freon and glass | |
1137 | gMC->Gfmate((*fIdmate)[6],namat,ama[0],zma[0],dma,radl,absl,buf,nbuf); | |
1138 | gMC->Gfmate((*fIdmate)[7],namat,ama[1],zma[1],dma,radl,absl,buf,nbuf); | |
1139 | ||
1140 | // --- glass-freon | |
1141 | Float_t wgfr[2]= {0.0011,0.9989}; | |
1142 | Float_t dgfr = 1.434; | |
1143 | Int_t ngfr = 2; | |
1144 | AliMixture ( 8, "glass-freon$", ama, zma, dgfr, ngfr, wgfr); | |
1145 | AliMixture ( 9, "Water$", awa, zwa, dwa, nwa, wwa); | |
1146 | AliMixture (10, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel); | |
1147 | ||
1148 | Float_t epsil, stmin, deemax, stemax; | |
1149 | ||
1150 | // Previous data | |
1151 | // EPSIL = 0.1 ! Tracking precision, | |
1152 | // STEMAX = 0.1 ! Maximum displacement for multiple scattering | |
1153 | // DEEMAX = 0.1 ! Maximum fractional energy loss, DLS | |
1154 | // STMIN = 0.1 | |
1155 | ||
1156 | // New data | |
1157 | epsil = .001; // Tracking precision, | |
1158 | stemax = -1.; // Maximum displacement for multiple scattering | |
1159 | deemax = -.3; // Maximum fractional energy loss, DLS | |
1160 | stmin = -.8; | |
1161 | ||
1162 | AliMedium( 1, "Air$", 0, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin); | |
1163 | AliMedium( 2,"Nomex$", 1, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin); | |
1164 | AliMedium( 3,"G10$", 2, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin); | |
1165 | AliMedium( 4,"fibre glass$", 3, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin); | |
1166 | AliMedium( 5,"glass-freon$", 8, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin); | |
1167 | AliMedium( 6,"Al Frame$", 4, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin); | |
1168 | AliMedium( 7,"Al honeycomb$", 5, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin); | |
1169 | AliMedium( 8,"Fre$", 6, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin); | |
1170 | AliMedium( 9,"PCB-S$", 2, 1, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin); | |
1171 | AliMedium(10,"Glass$", 7, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin); | |
1172 | AliMedium(11,"Water$", 9, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin); | |
1173 | AliMedium(12,"STEEL$", 10, 0, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin); | |
1174 | ||
1175 | } | |
1176 | //_____________________________________________________________________________ | |
1177 | void AliTOFv5T0::Init() | |
1178 | { | |
1179 | // | |
1180 | // Initialise the detector after the geometry has been defined | |
1181 | // | |
1182 | AliDebug(1, "**************************************" | |
1183 | " TOF " | |
1184 | "**************************************"); | |
1185 | AliDebug(1, " Version 4 of TOF initialing, " | |
1186 | "symmetric TOF - Full Coverage version"); | |
1187 | ||
1188 | AliTOF::Init(); | |
1189 | ||
1190 | fIdFTOA = gMC->VolId("FTOA"); | |
1191 | if (fTOFHoles) { | |
1192 | fIdFTOB = gMC->VolId("FTOB"); | |
1193 | fIdFTOC = gMC->VolId("FTOC"); | |
1194 | } | |
1195 | fIdFLTA = gMC->VolId("FLTA"); | |
1196 | if (fTOFHoles) { | |
1197 | fIdFLTB = gMC->VolId("FLTB"); | |
1198 | fIdFLTC = gMC->VolId("FLTC"); | |
1199 | } | |
1200 | ||
1201 | AliDebug(1, "**************************************" | |
1202 | " TOF " | |
1203 | "**************************************"); | |
1204 | } | |
1205 | ||
1206 | //_____________________________________________________________________________ | |
1207 | void AliTOFv5T0::StepManager() | |
1208 | { | |
1209 | ||
1210 | // | |
1211 | // Procedure called at each step in the Time Of Flight | |
1212 | // | |
1213 | ||
1214 | TLorentzVector mom, pos; | |
1215 | Float_t xm[3],pm[3],xpad[3],ppad[3]; | |
0dadb22b | 1216 | Float_t hits[14]; |
d3c7bfac | 1217 | Int_t vol[5]; |
0dadb22b | 1218 | Int_t sector, plate, padx, padz, strip; |
d3c7bfac | 1219 | Int_t copy, padzid, padxid, stripid, i; |
1220 | Int_t *idtmed = fIdtmed->GetArray()-499; | |
1221 | Float_t incidenceAngle; | |
1222 | ||
0dadb22b | 1223 | const char * path71 = "B071"; |
1224 | const char * path75 = "B075"; | |
1225 | const char * path74 = "B074"; | |
1226 | const char* volpath; | |
1227 | ||
1228 | Int_t index = 0; | |
1229 | ||
d3c7bfac | 1230 | if( |
1231 | gMC->IsTrackEntering() | |
1232 | && gMC->TrackCharge() | |
1233 | && gMC->GetMedium()==idtmed[508] | |
1234 | && gMC->CurrentVolID(copy)==fIdSens | |
1235 | ) | |
1236 | { | |
1237 | ||
1238 | AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber()); | |
1239 | ||
1240 | // getting information about hit volumes | |
1241 | ||
1242 | padzid=gMC->CurrentVolOffID(1,copy); | |
1243 | padz=copy; | |
1244 | padz--; | |
1245 | ||
1246 | padxid=gMC->CurrentVolOffID(0,copy); | |
1247 | padx=copy; | |
1248 | padx--; | |
1249 | ||
1250 | stripid=gMC->CurrentVolOffID(4,copy); | |
1251 | strip=copy; | |
1252 | strip--; | |
1253 | ||
1254 | gMC->TrackPosition(pos); | |
1255 | gMC->TrackMomentum(mom); | |
1256 | ||
1257 | Double_t normMom=1./mom.Rho(); | |
1258 | ||
1259 | // getting the coordinates in pad ref system | |
1260 | ||
1261 | xm[0] = (Float_t)pos.X(); | |
1262 | xm[1] = (Float_t)pos.Y(); | |
1263 | xm[2] = (Float_t)pos.Z(); | |
1264 | ||
1265 | pm[0] = (Float_t)mom.X()*normMom; | |
1266 | pm[1] = (Float_t)mom.Y()*normMom; | |
1267 | pm[2] = (Float_t)mom.Z()*normMom; | |
1268 | ||
1269 | gMC->Gmtod(xm,xpad,1); // from MRS to DRS: coordinates convertion | |
1270 | gMC->Gmtod(pm,ppad,2); // from MRS to DRS: direction cosinus convertion | |
1271 | ||
1272 | ||
1273 | if (TMath::Abs(ppad[1])>1) { | |
1274 | AliWarning("Abs(ppad) > 1"); | |
1275 | ppad[1]=TMath::Sign((Float_t)1,ppad[1]); | |
1276 | } | |
1277 | incidenceAngle = TMath::ACos(ppad[1])*kRaddeg; | |
1278 | ||
0dadb22b | 1279 | plate = -1; |
d3c7bfac | 1280 | if (strip < fTOFGeometry->NStripC()) { |
1281 | plate = 0; | |
1282 | //strip = strip; | |
1283 | } | |
1284 | else if (strip >= fTOFGeometry->NStripC() && | |
1285 | strip < fTOFGeometry->NStripC() + fTOFGeometry->NStripB()) { | |
1286 | plate = 1; | |
1287 | strip = strip - fTOFGeometry->NStripC(); | |
1288 | } | |
1289 | else if (strip >= fTOFGeometry->NStripC() + fTOFGeometry->NStripB() && | |
1290 | strip < fTOFGeometry->NStripC() + fTOFGeometry->NStripB() + fTOFGeometry->NStripA()) { | |
1291 | plate = 2; | |
1292 | strip = strip - fTOFGeometry->NStripC() - fTOFGeometry->NStripB(); | |
1293 | } | |
1294 | else if (strip >= fTOFGeometry->NStripC() + fTOFGeometry->NStripB() + fTOFGeometry->NStripA() && | |
1295 | strip < fTOFGeometry->NStripC() + fTOFGeometry->NStripB() + fTOFGeometry->NStripA() + fTOFGeometry->NStripB()) { | |
1296 | plate = 3; | |
1297 | strip = strip - fTOFGeometry->NStripC() - fTOFGeometry->NStripB() - fTOFGeometry->NStripA(); | |
1298 | } | |
1299 | else { | |
1300 | plate = 4; | |
1301 | strip = strip - fTOFGeometry->NStripC() - fTOFGeometry->NStripB() - fTOFGeometry->NStripA() - fTOFGeometry->NStripB(); | |
1302 | } | |
1303 | ||
0dadb22b | 1304 | volpath=gMC->CurrentVolOffName(8); |
1305 | index=gMC->CurrentVolOffID(8,copy); | |
1306 | index=copy; | |
1307 | ||
1308 | sector=-1; | |
1309 | if(strcmp(path71,volpath)==0 && index <6) sector=12+index; | |
1310 | if(strcmp(path71,volpath)==0 && index >=6) sector=index-3; | |
1311 | if(strcmp(path75,volpath)==0) sector=index-1; | |
1312 | if(strcmp(path74,volpath)==0) sector=10+index; | |
1313 | ||
d3c7bfac | 1314 | for(i=0;i<3;++i) { |
1315 | hits[i] = pos[i]; | |
1316 | hits[i+3] = pm[i]; | |
1317 | } | |
1318 | ||
1319 | hits[6] = mom.Rho(); | |
1320 | hits[7] = pos[3]; | |
1321 | hits[8] = xpad[0]; | |
1322 | hits[9] = xpad[1]; | |
1323 | hits[10]= xpad[2]; | |
1324 | hits[11]= incidenceAngle; | |
1325 | hits[12]= gMC->Edep(); | |
1326 | hits[13]= gMC->TrackLength(); | |
1327 | ||
1328 | vol[0]= sector; | |
1329 | vol[1]= plate; | |
1330 | vol[2]= strip; | |
1331 | vol[3]= padx; | |
1332 | vol[4]= padz; | |
1333 | ||
1334 | AddT0Hit(gAlice->GetMCApp()->GetCurrentTrackNumber(),vol, hits); | |
1335 | } | |
1336 | } | |
1337 | //------------------------------------------------------------------- | |
1338 | void AliTOFv5T0::MaterialMixer(Float_t* p,Float_t* a,Float_t* m,Float_t* d,Float_t* s,Int_t n) { | |
1339 | // a[] atomic weights vector (in) | |
1340 | // (atoms present in more compound appear separately) | |
1341 | // m[] number of corresponding atoms in the mixture (in) | |
1342 | // d[] fraction of the compound relative to the corresponding atoms (in) | |
1343 | // s[] further possible weights " " " " (in) | |
1344 | Float_t t = 0.; | |
1345 | for (Int_t i = 0; i < n; ++i) { | |
1346 | p[i] = a[i]*m[i]*d[i]*s[i]; | |
1347 | t += p[i]; | |
1348 | } | |
1349 | for (Int_t i = 0; i < n; ++i) { | |
1350 | p[i] = p[i]/t; | |
1351 | // AliInfo(Form((\n weight[%i] = %f (,i,p[i])); | |
1352 | } | |
1353 | } |