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