]>
Commit | Line | Data |
---|---|---|
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 | /* $Id$ */ | |
17 | ||
18 | /////////////////////////////////////////////////////////////////////////////// | |
19 | // | |
20 | // This class contains the functions for version 2 of the Time Of Flight // | |
21 | // detector. // | |
22 | // | |
23 | // VERSION WITH 5 MODULES AND TILTED STRIPS | |
24 | // | |
25 | // HOLES FOR PHOS AND RICH DETECTOR | |
26 | // | |
27 | // !Not Official version! | |
28 | // | |
29 | // Requested by Andreas Morsch to have TOFv2 full compliant | |
30 | // with FRAME version 0 | |
31 | // | |
32 | // Author: | |
33 | ||
34 | // Fabrizio Pierella | |
35 | // University of Bologna - Italy | |
36 | // | |
37 | // | |
38 | //Begin_Html | |
39 | /* | |
40 | <img src="picts/AliTOFv2FHolesClass.gif"> | |
41 | */ | |
42 | //End_Html | |
43 | // // | |
44 | /////////////////////////////////////////////////////////////////////////////// | |
45 | ||
46 | #include <Riostream.h> | |
47 | #include <stdlib.h> | |
48 | ||
49 | #include <TBRIK.h> | |
50 | #include <TGeometry.h> | |
51 | #include <TLorentzVector.h> | |
52 | #include <TNode.h> | |
53 | #include <TObject.h> | |
54 | #include <TVirtualMC.h> | |
55 | ||
56 | #include "AliConst.h" | |
57 | #include "AliMagF.h" | |
58 | #include "AliRun.h" | |
59 | #include "AliTOFv2FHoles.h" | |
60 | ||
61 | ClassImp(AliTOFv2FHoles) | |
62 | ||
63 | //_____________________________________________________________________________ | |
64 | AliTOFv2FHoles::AliTOFv2FHoles() | |
65 | { | |
66 | // | |
67 | // Default constructor | |
68 | // | |
69 | } | |
70 | ||
71 | //_____________________________________________________________________________ | |
72 | AliTOFv2FHoles::AliTOFv2FHoles(const char *name, const char *title) | |
73 | : AliTOF(name,title) | |
74 | { | |
75 | // | |
76 | // Standard constructor | |
77 | // | |
78 | // | |
79 | // Check that FRAME is there otherwise we have no place where to | |
80 | // put TOF | |
81 | AliModule* frame=gAlice->GetModule("FRAME"); | |
82 | if(!frame) { | |
83 | Error("Ctor","TOF needs FRAME to be present\n"); | |
84 | exit(1); | |
85 | } else | |
86 | if(frame->IsVersion()!=0) { | |
87 | Error("Ctor","FRAME version 0 needed with this version of TOF\n"); | |
88 | exit(1); | |
89 | } | |
90 | } | |
91 | ||
92 | //____________________________________________________________________________ | |
93 | ||
94 | void AliTOFv2FHoles::BuildGeometry() | |
95 | { | |
96 | // | |
97 | // Build TOF ROOT geometry for the ALICE event display | |
98 | // | |
99 | TNode *node, *top; | |
100 | const int kColorTOF = 27; | |
101 | ||
102 | // Find top TNODE | |
103 | top = gAlice->GetGeometry()->GetNode("alice"); | |
104 | ||
105 | // Position the different copies | |
106 | const Float_t krTof =(fRmax+fRmin)/2; | |
107 | const Float_t khTof = fRmax-fRmin; | |
108 | const Int_t kNTof = fNTof; | |
109 | const Float_t kPi = TMath::Pi(); | |
110 | const Float_t kangle = 2*kPi/kNTof; | |
111 | Float_t ang; | |
112 | ||
113 | // fixing parameters as requested by FRAME v0 (Morsch 16-10-2001) | |
114 | //Float_t zlenA = 124.; // cm (A module length) original size 106. enlarged | |
115 | Float_t zlenB = 154.; // cm (B module length) original size 141. enlarged | |
116 | Float_t zlenC = 159.5; // cm (C module length) original size 175.5 reduced | |
117 | Float_t ztof0 = 375.5; // total half-length of a TOF sector original size 371.5cm | |
118 | ||
119 | Float_t zOffsetC = ztof0 - zlenC*0.5; | |
120 | Float_t zOffsetB = ztof0 - zlenC - zlenB*0.5; | |
121 | Float_t zOffsetA = 0.00; | |
122 | ||
123 | // Define TOF basic volume | |
124 | ||
125 | char nodeName0[6], nodeName1[6], nodeName2[6]; | |
126 | char nodeName3[6], nodeName4[6], rotMatNum[6]; | |
127 | ||
128 | new TBRIK("S_TOF_C","TOF box","void", | |
129 | fStripLn*0.5,khTof*0.5,fZlenC*0.5); | |
130 | new TBRIK("S_TOF_B","TOF box","void", | |
131 | fStripLn*0.5,khTof*0.5,fZlenB*0.5); | |
132 | new TBRIK("S_TOF_A","TOF box","void", | |
133 | fStripLn*0.5,khTof*0.5,fZlenA*0.5); | |
134 | ||
135 | for (Int_t nodeNum=1;nodeNum<19;nodeNum++){ | |
136 | ||
137 | if (nodeNum<10) { | |
138 | sprintf(rotMatNum,"rot50%i",nodeNum); | |
139 | sprintf(nodeName0,"FTO00%i",nodeNum); | |
140 | sprintf(nodeName1,"FTO10%i",nodeNum); | |
141 | sprintf(nodeName2,"FTO20%i",nodeNum); | |
142 | sprintf(nodeName3,"FTO30%i",nodeNum); | |
143 | sprintf(nodeName4,"FTO40%i",nodeNum); | |
144 | } | |
145 | if (nodeNum>9) { | |
146 | sprintf(rotMatNum,"rot5%i",nodeNum); | |
147 | sprintf(nodeName0,"FTO0%i",nodeNum); | |
148 | sprintf(nodeName1,"FTO1%i",nodeNum); | |
149 | sprintf(nodeName2,"FTO2%i",nodeNum); | |
150 | sprintf(nodeName3,"FTO3%i",nodeNum); | |
151 | sprintf(nodeName4,"FTO4%i",nodeNum); | |
152 | } | |
153 | ||
154 | new TRotMatrix(rotMatNum,rotMatNum,90,-20*nodeNum,90,90-20*nodeNum,0,0); | |
155 | ang = (4.5-nodeNum) * kangle; | |
156 | ||
157 | top->cd(); | |
158 | node = new TNode(nodeName0,nodeName0,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),zOffsetC,rotMatNum); | |
159 | node->SetLineColor(kColorTOF); | |
160 | fNodes->Add(node); | |
161 | ||
162 | top->cd(); | |
163 | node = new TNode(nodeName1,nodeName1,"S_TOF_C",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-zOffsetC,rotMatNum); | |
164 | node->SetLineColor(kColorTOF); | |
165 | fNodes->Add(node); | |
166 | if (nodeNum !=1 && nodeNum!=17 && nodeNum !=18) | |
167 | { | |
168 | top->cd(); | |
169 | node = new TNode(nodeName2,nodeName2,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),zOffsetB,rotMatNum); | |
170 | node->SetLineColor(kColorTOF); | |
171 | fNodes->Add(node); | |
172 | ||
173 | top->cd(); | |
174 | node = new TNode(nodeName3,nodeName3,"S_TOF_B",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),-zOffsetB,rotMatNum); | |
175 | node->SetLineColor(kColorTOF); | |
176 | fNodes->Add(node); | |
177 | } // Holes for RICH detector | |
178 | ||
179 | if ((nodeNum<7 || nodeNum>11) && nodeNum !=1 && nodeNum!=17 && nodeNum !=18) | |
180 | { | |
181 | top->cd(); | |
182 | node = new TNode(nodeName4,nodeName4,"S_TOF_A",krTof*TMath::Cos(ang),krTof*TMath::Sin(ang),zOffsetA,rotMatNum); | |
183 | node->SetLineColor(kColorTOF); | |
184 | fNodes->Add(node); | |
185 | } // Holes for PHOS detector (+ Holes for RICH detector, central part) | |
186 | } // end loop on nodeNum | |
187 | } | |
188 | ||
189 | ||
190 | //_____________________________________________________________________________ | |
191 | void AliTOFv2FHoles::CreateGeometry() | |
192 | { | |
193 | // | |
194 | // Create geometry for Time Of Flight version 0 | |
195 | // | |
196 | //Begin_Html | |
197 | /* | |
198 | <img src="picts/AliTOFv2FHoles.gif"> | |
199 | */ | |
200 | //End_Html | |
201 | // | |
202 | // Creates common geometry | |
203 | // | |
204 | AliTOF::CreateGeometry(); | |
205 | } | |
206 | ||
207 | //_____________________________________________________________________________ | |
208 | void AliTOFv2FHoles::TOFpc(Float_t xtof, Float_t ytof, Float_t zlenC, | |
209 | Float_t zlenB, Float_t zlenA, Float_t ztof0) | |
210 | { | |
211 | // | |
212 | // Definition of the Time Of Fligh Resistive Plate Chambers | |
213 | // xFLT, yFLT, zFLT - sizes of TOF modules (large) | |
214 | ||
215 | Float_t ycoor, zcoor; | |
216 | Float_t par[3]; | |
217 | Int_t *idtmed = fIdtmed->GetArray()-499; | |
218 | Int_t idrotm[100]; | |
219 | Int_t nrot = 0; | |
220 | Float_t hTof = fRmax-fRmin; | |
221 | ||
222 | Float_t radius = fRmin+2.;//cm | |
223 | ||
224 | // fixing parameters as requested by FRAME v0 (Morsch 16-10-2001) | |
225 | zlenA = 124.; // cm (A module length) original size 106. enlarged | |
226 | zlenB = 154.; // cm (B module length) original size 141. enlarged | |
227 | zlenC = 159.5; // cm (C module length) original size 175.5 reduced | |
228 | ztof0 = 375.5; // total half-length of a TOF sector original size 371.5cm | |
229 | ||
230 | ||
231 | par[0] = xtof * 0.5; | |
232 | par[1] = ytof * 0.5; | |
233 | par[2] = zlenC * 0.5; | |
234 | gMC->Gsvolu("FTOC", "BOX ", idtmed[506], par, 3); | |
235 | par[2] = zlenB * 0.5; | |
236 | gMC->Gsvolu("FTOB", "BOX ", idtmed[506], par, 3); | |
237 | par[2] = zlenA * 0.5; | |
238 | gMC->Gsvolu("FTOA", "BOX ", idtmed[506], par, 3); | |
239 | ||
240 | ||
241 | // Positioning of modules | |
242 | ||
243 | Float_t zcor1 = ztof0 - zlenC*0.5; | |
244 | Float_t zcor2 = ztof0 - zlenC - zlenB*0.5; | |
245 | Float_t zcor3 = 0.00; | |
246 | Float_t zcor4 = 156.75 - zlenC*0.5; | |
247 | Float_t zcor5 = -156.75 + zlenB*0.5; | |
248 | ||
249 | AliMatrix(idrotm[0], 90., 0., 0., 0., 90,-90.); | |
250 | AliMatrix(idrotm[1], 90.,180., 0., 0., 90, 90.); | |
251 | gMC->Gspos("FTOC", 1, "BTO1", 0, zcor1, 0, idrotm[0], "ONLY"); | |
252 | gMC->Gspos("FTOC", 2, "BTO1", 0, -zcor1, 0, idrotm[1], "ONLY"); | |
253 | gMC->Gspos("FTOC", 1, "BTO2", 0, zcor4, 0, idrotm[0], "ONLY"); | |
254 | gMC->Gspos("FTOC", 1, "BTO3", 0, 0., 0, idrotm[0], "ONLY"); | |
255 | ||
256 | gMC->Gspos("FTOB", 1, "BTO1", 0, zcor2, 0, idrotm[0], "ONLY"); | |
257 | gMC->Gspos("FTOB", 2, "BTO1", 0, -zcor2, 0, idrotm[1], "ONLY"); | |
258 | gMC->Gspos("FTOB", 1, "BTO2", 0, zcor5, 0, idrotm[0], "ONLY"); | |
259 | ||
260 | gMC->Gspos("FTOA", 0, "BTO1", 0, zcor3, 0, idrotm[0], "ONLY"); | |
261 | ||
262 | Float_t db = 0.5;//cm | |
263 | Float_t xFLT, xFST, yFLT, zFLTA, zFLTB, zFLTC; | |
264 | ||
265 | xFLT = fStripLn; | |
266 | yFLT = ytof; | |
267 | zFLTA = zlenA; | |
268 | zFLTB = zlenB; | |
269 | zFLTC = zlenC; | |
270 | ||
271 | xFST = xFLT-fDeadBndX*2; //cm | |
272 | ||
273 | // Sizes of MRPC pads | |
274 | ||
275 | Float_t yPad = 0.505; //cm | |
276 | ||
277 | // Large not sensitive volumes with Insensitive Freon | |
278 | par[0] = xFLT*0.5; | |
279 | par[1] = yFLT*0.5; | |
280 | ||
281 | if(fDebug) | |
282 | cout <<ClassName() | |
283 | <<": ************************* TOF geometry **************************" | |
284 | <<endl; | |
285 | ||
286 | par[2] = (zFLTA *0.5); | |
287 | gMC->Gsvolu("FLTA", "BOX ", idtmed[512], par, 3); // Insensitive Freon | |
288 | gMC->Gspos ("FLTA", 0, "FTOA", 0., 0., 0., 0, "ONLY"); | |
289 | ||
290 | par[2] = (zFLTB * 0.5); | |
291 | gMC->Gsvolu("FLTB", "BOX ", idtmed[512], par, 3); // Insensitive Freon | |
292 | gMC->Gspos ("FLTB", 0, "FTOB", 0., 0., 0., 0, "ONLY"); | |
293 | ||
294 | par[2] = (zFLTC * 0.5); | |
295 | gMC->Gsvolu("FLTC", "BOX ", idtmed[512], par, 3); // Insensitive Freon | |
296 | gMC->Gspos ("FLTC", 0, "FTOC", 0., 0., 0., 0, "ONLY"); | |
297 | ||
298 | ///// Layers of Aluminum before and after detector ///// | |
299 | ///// Aluminum Box for Modules (1.8 mm thickness) ///// | |
300 | ///// lateral walls not simulated for the time being | |
301 | //const Float_t khAlWall = 0.18; | |
302 | // fp to be checked | |
303 | const Float_t khAlWall = 0.11; | |
304 | par[0] = xFLT*0.5; | |
305 | par[1] = khAlWall/2.;//cm | |
306 | ycoor = -yFLT/2 + par[1]; | |
307 | par[2] = (zFLTA *0.5); | |
308 | gMC->Gsvolu("FALA", "BOX ", idtmed[508], par, 3); // Alluminium | |
309 | gMC->Gspos ("FALA", 1, "FLTA", 0., ycoor, 0., 0, "ONLY"); | |
310 | gMC->Gspos ("FALA", 2, "FLTA", 0.,-ycoor, 0., 0, "ONLY"); | |
311 | par[2] = (zFLTB *0.5); | |
312 | gMC->Gsvolu("FALB", "BOX ", idtmed[508], par, 3); // Alluminium | |
313 | gMC->Gspos ("FALB", 1, "FLTB", 0., ycoor, 0., 0, "ONLY"); | |
314 | gMC->Gspos ("FALB", 2, "FLTB", 0.,-ycoor, 0., 0, "ONLY"); | |
315 | par[2] = (zFLTC *0.5); | |
316 | gMC->Gsvolu("FALC", "BOX ", idtmed[508], par, 3); // Alluminium | |
317 | gMC->Gspos ("FALC", 1, "FLTC", 0., ycoor, 0., 0, "ONLY"); | |
318 | gMC->Gspos ("FALC", 2, "FLTC", 0.,-ycoor, 0., 0, "ONLY"); | |
319 | ||
320 | ///////////////// Detector itself ////////////////////// | |
321 | ||
322 | const Float_t kdeadBound = fDeadBndZ; //cm non-sensitive between the pad edge | |
323 | //and the boundary of the strip | |
324 | const Int_t knx = fNpadX; // number of pads along x | |
325 | const Int_t knz = fNpadZ; // number of pads along z | |
326 | const Float_t kspace = fSpace; //cm distance from the front plate of the box | |
327 | ||
328 | Float_t zSenStrip = fZpad*fNpadZ;//cm | |
329 | Float_t stripWidth = zSenStrip + 2*kdeadBound; | |
330 | ||
331 | par[0] = xFLT*0.5; | |
332 | par[1] = yPad*0.5; | |
333 | par[2] = stripWidth*0.5; | |
334 | ||
335 | // new description for strip volume -double stack strip- | |
336 | // -- all constants are expressed in cm | |
337 | // heigth of different layers | |
338 | const Float_t khhony = 0.8 ; // heigth of HONY Layer | |
339 | const Float_t khpcby = 0.08 ; // heigth of PCB Layer | |
340 | const Float_t khmyly = 0.035 ; // heigth of MYLAR Layer | |
341 | const Float_t khgraphy = 0.02 ; // heigth of GRAPHITE Layer | |
342 | const Float_t khglasseiy = 0.135; // 0.6 Ext. Glass + 1.1 i.e. (Int. Glass/2) (mm) | |
343 | const Float_t khsensmy = 0.11 ; // heigth of Sensitive Freon Mixture | |
344 | const Float_t kwsensmz = 2*3.5 ; // cm | |
345 | const Float_t klsensmx = 48*2.5; // cm | |
346 | const Float_t kwpadz = 3.5; // cm z dimension of the FPAD volume | |
347 | const Float_t klpadx = 2.5; // cm x dimension of the FPAD volume | |
348 | ||
349 | // heigth of the FSTR Volume (the strip volume) | |
350 | const Float_t khstripy = 2*khhony+3*khpcby+4*(khmyly+khgraphy+khglasseiy)+2*khsensmy; | |
351 | // width of the FSTR Volume (the strip volume) | |
352 | const Float_t kwstripz = 10.; | |
353 | // length of the FSTR Volume (the strip volume) | |
354 | const Float_t klstripx = 122.; | |
355 | ||
356 | Float_t parfp[3]={klstripx*0.5,khstripy*0.5,kwstripz*0.5}; | |
357 | // coordinates of the strip center in the strip reference frame; used for positioning | |
358 | // internal strip volumes | |
359 | Float_t posfp[3]={0.,0.,0.}; | |
360 | ||
361 | ||
362 | // FSTR volume definition and filling this volume with non sensitive Gas Mixture | |
363 | gMC->Gsvolu("FSTR","BOX",idtmed[512],parfp,3); | |
364 | //-- HONY Layer definition | |
365 | // parfp[0] = -1; | |
366 | parfp[1] = khhony*0.5; | |
367 | // parfp[2] = -1; | |
368 | gMC->Gsvolu("FHON","BOX",idtmed[503],parfp,3); | |
369 | // positioning 2 HONY Layers on FSTR volume | |
370 | ||
371 | posfp[1]=-khstripy*0.5+parfp[1]; | |
372 | gMC->Gspos("FHON",1,"FSTR",0., posfp[1],0.,0,"ONLY"); | |
373 | gMC->Gspos("FHON",2,"FSTR",0.,-posfp[1],0.,0,"ONLY"); | |
374 | ||
375 | //-- PCB Layer definition | |
376 | parfp[1] = khpcby*0.5; | |
377 | gMC->Gsvolu("FPCB","BOX",idtmed[504],parfp,3); | |
378 | // positioning 2 PCB Layers on FSTR volume | |
379 | posfp[1]=-khstripy*0.5+khhony+parfp[1]; | |
380 | gMC->Gspos("FPCB",1,"FSTR",0., posfp[1],0.,0,"ONLY"); | |
381 | gMC->Gspos("FPCB",2,"FSTR",0.,-posfp[1],0.,0,"ONLY"); | |
382 | // positioning the central PCB layer | |
383 | gMC->Gspos("FPCB",3,"FSTR",0.,0.,0.,0,"ONLY"); | |
384 | ||
385 | //-- MYLAR Layer definition | |
386 | parfp[1] = khmyly*0.5; | |
387 | gMC->Gsvolu("FMYL","BOX",idtmed[511],parfp,3); | |
388 | // positioning 2 MYLAR Layers on FSTR volume | |
389 | posfp[1] = -khstripy*0.5+khhony+khpcby+parfp[1]; | |
390 | gMC->Gspos("FMYL",1,"FSTR",0., posfp[1],0.,0,"ONLY"); | |
391 | gMC->Gspos("FMYL",2,"FSTR",0.,-posfp[1],0.,0,"ONLY"); | |
392 | // adding further 2 MYLAR Layers on FSTR volume | |
393 | posfp[1] = khpcby*0.5+parfp[1]; | |
394 | gMC->Gspos("FMYL",3,"FSTR",0., posfp[1],0.,0,"ONLY"); | |
395 | gMC->Gspos("FMYL",4,"FSTR",0.,-posfp[1],0.,0,"ONLY"); | |
396 | ||
397 | ||
398 | //-- Graphite Layer definition | |
399 | parfp[1] = khgraphy*0.5; | |
400 | gMC->Gsvolu("FGRP","BOX",idtmed[502],parfp,3); | |
401 | // positioning 2 Graphite Layers on FSTR volume | |
402 | posfp[1] = -khstripy*0.5+khhony+khpcby+khmyly+parfp[1]; | |
403 | gMC->Gspos("FGRP",1,"FSTR",0., posfp[1],0.,0,"ONLY"); | |
404 | gMC->Gspos("FGRP",2,"FSTR",0.,-posfp[1],0.,0,"ONLY"); | |
405 | // adding further 2 Graphite Layers on FSTR volume | |
406 | posfp[1] = khpcby*0.5+khmyly+parfp[1]; | |
407 | gMC->Gspos("FGRP",3,"FSTR",0., posfp[1],0.,0,"ONLY"); | |
408 | gMC->Gspos("FGRP",4,"FSTR",0.,-posfp[1],0.,0,"ONLY"); | |
409 | ||
410 | ||
411 | //-- Glass (EXT. +Semi INT.) Layer definition | |
412 | parfp[1] = khglasseiy*0.5; | |
413 | gMC->Gsvolu("FGLA","BOX",idtmed[514],parfp,3); | |
414 | // positioning 2 Glass Layers on FSTR volume | |
415 | posfp[1] = -khstripy*0.5+khhony+khpcby+khmyly+khgraphy+parfp[1]; | |
416 | gMC->Gspos("FGLA",1,"FSTR",0., posfp[1],0.,0,"ONLY"); | |
417 | gMC->Gspos("FGLA",2,"FSTR",0.,-posfp[1],0.,0,"ONLY"); | |
418 | // adding further 2 Glass Layers on FSTR volume | |
419 | posfp[1] = khpcby*0.5+khmyly+khgraphy+parfp[1]; | |
420 | gMC->Gspos("FGLA",3,"FSTR",0., posfp[1],0.,0,"ONLY"); | |
421 | gMC->Gspos("FGLA",4,"FSTR",0.,-posfp[1],0.,0,"ONLY"); | |
422 | ||
423 | ||
424 | //-- Sensitive Mixture Layer definition | |
425 | parfp[0] = klsensmx*0.5; | |
426 | parfp[1] = khsensmy*0.5; | |
427 | parfp[2] = kwsensmz*0.5; | |
428 | gMC->Gsvolu("FSEN","BOX",idtmed[513],parfp,3); | |
429 | gMC->Gsvolu("FNSE","BOX",idtmed[512],parfp,3); | |
430 | // positioning 2 gas Layers on FSTR volume | |
431 | // the upper is insensitive freon | |
432 | // while the remaining is sensitive | |
433 | posfp[1] = khpcby*0.5+khmyly+khgraphy+khglasseiy+parfp[1]; | |
434 | gMC->Gspos("FNSE",0,"FSTR", 0., posfp[1],0.,0,"ONLY"); | |
435 | gMC->Gspos("FSEN",0,"FSTR", 0.,-posfp[1],0.,0,"ONLY"); | |
436 | ||
437 | // dividing FSEN along z in knz=2 and along x in knx=48 | |
438 | gMC->Gsdvn("FSEZ","FSEN",knz,3); | |
439 | gMC->Gsdvn("FSEX","FSEZ",knx,1); | |
440 | ||
441 | // FPAD volume definition | |
442 | parfp[0] = klpadx*0.5; | |
443 | parfp[1] = khsensmy*0.5; | |
444 | parfp[2] = kwpadz*0.5; | |
445 | gMC->Gsvolu("FPAD","BOX",idtmed[513],parfp,3); | |
446 | // positioning the FPAD volumes on previous divisions | |
447 | gMC->Gspos("FPAD",0,"FSEX",0.,0.,0.,0,"ONLY"); | |
448 | ||
449 | //// Positioning the Strips (FSTR) in the FLT volumes ///// | |
450 | ||
451 | // Plate A (Central) | |
452 | ||
453 | Float_t t = zFLTC+zFLTB+zFLTA*0.5+ 2*db;//Half Width of Barrel | |
454 | ||
455 | Float_t gap = fGapA+1.; //cm updated distance between the strip axis | |
456 | // 1 cm is a special value exclusively for AliTOFv2FHoles geometry | |
457 | Float_t zpos = 0; | |
458 | Float_t ang = 0; | |
459 | Int_t i=1,j=1; | |
460 | nrot = 0; | |
461 | zcoor = 0; | |
462 | ycoor = -14.5 + kspace ; //2 cm over front plate | |
463 | ||
464 | AliMatrix (idrotm[0], 90., 0.,90.,90.,0., 90.); | |
465 | gMC->Gspos("FSTR",j,"FLTA",0.,ycoor, 0.,idrotm[0],"ONLY"); | |
466 | ||
467 | if(fDebug>=1) { | |
468 | printf("%s: %f, St. %2i, Pl.3 ",ClassName(),ang*kRaddeg,i); | |
469 | printf("%s: y = %f, z = %f, zpos = %f \n",ClassName(),ycoor,zcoor,zpos); | |
470 | } | |
471 | ||
472 | zcoor -= zSenStrip; | |
473 | j++; | |
474 | Int_t upDown = -1; // upDown=-1 -> Upper strip | |
475 | // upDown=+1 -> Lower strip | |
476 | do{ | |
477 | ang = atan(zcoor/radius); | |
478 | ang *= kRaddeg; | |
479 | AliMatrix (idrotm[nrot], 90., 0.,90.-ang,90.,-ang, 90.); | |
480 | AliMatrix (idrotm[nrot+1],90.,180.,90.+ang,90., ang, 90.); | |
481 | ang /= kRaddeg; | |
482 | ycoor = -14.5+ kspace; //2 cm over front plate | |
483 | ycoor += (1-(upDown+1)/2)*gap; | |
484 | gMC->Gspos("FSTR",j ,"FLTA",0.,ycoor, zcoor,idrotm[nrot], "ONLY"); | |
485 | gMC->Gspos("FSTR",j+1,"FLTA",0.,ycoor,-zcoor,idrotm[nrot+1],"ONLY"); | |
486 | ||
487 | if(fDebug>=1) { | |
488 | printf("%s: %f, St. %2i, Pl.3 ",ClassName(),ang*kRaddeg,i); | |
489 | printf("%s: y = %f, z = %f, zpos = %f \n",ClassName(),ycoor,zcoor,zpos); | |
490 | } | |
491 | ||
492 | j += 2; | |
493 | upDown*= -1; // Alternate strips | |
494 | zcoor = zcoor-(zSenStrip/2)/TMath::Cos(ang)- | |
495 | upDown*gap*TMath::Tan(ang)- | |
496 | (zSenStrip/2)/TMath::Cos(ang); | |
497 | } while (zcoor-(stripWidth/2)*TMath::Cos(ang)>-t+zFLTC+zFLTB+db*2); | |
498 | ||
499 | zcoor = zcoor+(zSenStrip/2)/TMath::Cos(ang)+ | |
500 | upDown*gap*TMath::Tan(ang)+ | |
501 | (zSenStrip/2)/TMath::Cos(ang); | |
502 | ||
503 | gap = fGapB; | |
504 | zcoor = zcoor-(zSenStrip/2)/TMath::Cos(ang)- | |
505 | upDown*gap*TMath::Tan(ang)- | |
506 | (zSenStrip/2)/TMath::Cos(ang); | |
507 | ||
508 | ang = atan(zcoor/radius); | |
509 | ang *= kRaddeg; | |
510 | AliMatrix (idrotm[nrot], 90., 0.,90.-ang,90.,-ang, 90.); | |
511 | AliMatrix (idrotm[nrot+1],90.,180.,90.+ang,90., ang, 90.); | |
512 | ang /= kRaddeg; | |
513 | ||
514 | ycoor = -14.5+ kspace; //2 cm over front plate | |
515 | ycoor += (1-(upDown+1)/2)*gap; | |
516 | ||
517 | /* for FRAME v0 | |
518 | gMC->Gspos("FSTR",j ,"FLTA",0.,ycoor, zcoor,idrotm[nrot], "ONLY"); | |
519 | gMC->Gspos("FSTR",j+1,"FLTA",0.,ycoor,-zcoor,idrotm[nrot+1],"ONLY"); | |
520 | */ | |
521 | ||
522 | if(fDebug>=1) { | |
523 | printf("%s: %f, St. %2i, Pl.3 ",ClassName(),ang*kRaddeg,i); | |
524 | printf("%s: y = %f, z = %f, zpos = %f \n",ClassName(),ycoor,zcoor,zpos); | |
525 | } | |
526 | ||
527 | ycoor = -hTof/2.+ kspace;//2 cm over front plate | |
528 | ||
529 | // Plate B | |
530 | ||
531 | nrot = 0; | |
532 | i=1; | |
533 | upDown = 1; | |
534 | Float_t deadRegion = 1.0;//cm | |
535 | ||
536 | zpos = zcoor - (zSenStrip/2)/TMath::Cos(ang)- | |
537 | upDown*gap*TMath::Tan(ang)- | |
538 | (zSenStrip/2)/TMath::Cos(ang)- | |
539 | deadRegion/TMath::Cos(ang); | |
540 | ||
541 | ang = atan(zpos/radius); | |
542 | ang *= kRaddeg; | |
543 | AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.); | |
544 | ang /= kRaddeg; | |
545 | ycoor = -hTof*0.5+ kspace ; //2 cm over front plate | |
546 | ycoor += (1-(upDown+1)/2)*gap; | |
547 | zcoor = zpos+(zFLTA*0.5+zFLTB*0.5+db); // Moves to the system of the modulus FLTB | |
548 | gMC->Gspos("FSTR",i, "FLTB", 0., ycoor, zcoor,idrotm[nrot], "ONLY"); | |
549 | ||
550 | if(fDebug>=1) { | |
551 | printf("%s: %f, St. %2i, Pl.4 ",ClassName(),ang*kRaddeg,i); | |
552 | printf("%s: y = %f, z = %f, zpos = %f \n",ClassName(),ycoor,zcoor,zpos); | |
553 | } | |
554 | ||
555 | i++; | |
556 | upDown*=-1; | |
557 | ||
558 | do { | |
559 | zpos = zpos - (zSenStrip/2)/TMath::Cos(ang)- | |
560 | upDown*gap*TMath::Tan(ang)- | |
561 | (zSenStrip/2)/TMath::Cos(ang); | |
562 | ang = atan(zpos/radius); | |
563 | ang *= kRaddeg; | |
564 | AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.); | |
565 | ang /= kRaddeg; | |
566 | ycoor = -hTof*0.5+ kspace ; //2 cm over front plate | |
567 | ycoor += (1-(upDown+1)/2)*gap; | |
568 | zcoor = zpos+(zFLTA*0.5+zFLTB*0.5+db); // Moves to the system of the modulus FLTB | |
569 | gMC->Gspos("FSTR",i, "FLTB", 0., ycoor, zcoor,idrotm[nrot], "ONLY"); | |
570 | ||
571 | if(fDebug>=1) { | |
572 | printf("%s: %f, St. %2i, Pl.4 ",ClassName(),ang*kRaddeg,i); | |
573 | printf("%s: y = %f, z = %f, zpos = %f \n",ClassName(),ycoor,zcoor,zpos); | |
574 | } | |
575 | ||
576 | upDown*=-1; | |
577 | i++; | |
578 | } while (TMath::Abs(ang*kRaddeg)<22.5); | |
579 | //till we reach a tilting angle of 22.5 degrees | |
580 | ||
581 | ycoor = -hTof*0.5+ kspace ; //2 cm over front plate | |
582 | zpos = zpos - zSenStrip/TMath::Cos(ang); | |
583 | // this avoid overlaps in between outer strips in plate B | |
584 | Float_t deltaMovingUp=0.8; // [cm] | |
585 | //Float_t deltaMovingDown=-0.0; // [cm] special value for AliTOFv2FHoles | |
586 | ||
587 | do { | |
588 | ang = atan(zpos/radius); | |
589 | ang *= kRaddeg; | |
590 | AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.); | |
591 | ang /= kRaddeg; | |
592 | zcoor = zpos+(zFLTB/2+zFLTA/2+db); | |
593 | gMC->Gspos("FSTR",i, "FLTB", 0., ycoor+deltaMovingUp, zcoor,idrotm[nrot], "ONLY"); | |
594 | deltaMovingUp+=0.8; // update delta moving toward the end of the plate | |
595 | zpos = zpos - zSenStrip/TMath::Cos(ang); | |
596 | if(fDebug>=1) { | |
597 | printf("%s: %f, St. %2i, Pl.4 ",ClassName(),ang*kRaddeg,i); | |
598 | printf("%s: y = %f, z = %f, zpos = %f \n",ClassName(),ycoor,zcoor,zpos); | |
599 | } | |
600 | i++; | |
601 | ||
602 | } while (zpos-stripWidth*0.5/TMath::Cos(ang)>-t+zFLTC+db); | |
603 | ||
604 | // Plate C | |
605 | ||
606 | zpos = zpos + zSenStrip/TMath::Cos(ang); | |
607 | ||
608 | zpos = zpos - (zSenStrip/2)/TMath::Cos(ang)+ | |
609 | gap*TMath::Tan(ang)- | |
610 | (zSenStrip/2)/TMath::Cos(ang); | |
611 | ||
612 | nrot = 0; | |
613 | i=0; | |
614 | Float_t deltaGap=-2.5; // [cm] update distance from strip center and plate | |
615 | ycoor= -hTof*0.5+kspace+gap+deltaGap; | |
616 | ||
617 | do { | |
618 | i++; | |
619 | ang = atan(zpos/radius); | |
620 | ang *= kRaddeg; | |
621 | AliMatrix (idrotm[nrot], 90., 0., 90.-ang,90.,ang, 270.); | |
622 | ang /= kRaddeg; | |
623 | zcoor = zpos+(zFLTC*0.5+zFLTB+zFLTA*0.5+db*2); | |
624 | if (i!=1) | |
625 | gMC->Gspos("FSTR",i, "FLTC", 0., ycoor, zcoor,idrotm[nrot], "ONLY"); | |
626 | ||
627 | if(fDebug>=1) { | |
628 | printf("%s: %f, St. %2i, Pl.5 ",ClassName(),ang*kRaddeg,i); | |
629 | printf("%s: y = %f, z = %f, zpos = %f \n",ClassName(),ycoor,zcoor,zpos); | |
630 | } | |
631 | ||
632 | zpos = zpos - zSenStrip/TMath::Cos(ang); | |
633 | } while (zpos-stripWidth*TMath::Cos(ang)*0.5>-t); | |
634 | ||
635 | ||
636 | ////////// Layers after strips ///////////////// | |
637 | // Al Layer thickness (2.3mm) factor 0.7 | |
638 | ||
639 | Float_t overSpace = fOverSpc;//cm | |
640 | ||
641 | par[0] = xFLT*0.5; | |
642 | par[1] = 0.115*0.7; // factor 0.7 | |
643 | par[2] = (zFLTA *0.5); | |
644 | ycoor = -yFLT/2 + overSpace + par[1]; | |
645 | gMC->Gsvolu("FPEA", "BOX ", idtmed[508], par, 3); // Al | |
646 | gMC->Gspos ("FPEA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY"); | |
647 | par[2] = (zFLTB *0.5); | |
648 | gMC->Gsvolu("FPEB", "BOX ", idtmed[508], par, 3); // Al | |
649 | gMC->Gspos ("FPEB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY"); | |
650 | par[2] = (zFLTC *0.5); | |
651 | gMC->Gsvolu("FPEC", "BOX ", idtmed[508], par, 3); // Al | |
652 | gMC->Gspos ("FPEC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY"); | |
653 | ||
654 | ||
655 | // plexiglass thickness: 1.5 mm ; factor 0.3 | |
656 | ycoor += par[1]; | |
657 | par[0] = xFLT*0.5; | |
658 | par[1] = 0.075*0.3; // factor 0.3 | |
659 | par[2] = (zFLTA *0.5); | |
660 | ycoor += par[1]; | |
661 | gMC->Gsvolu("FECA", "BOX ", idtmed[505], par, 3); // Plexigl. | |
662 | gMC->Gspos ("FECA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY"); | |
663 | par[2] = (zFLTB *0.5); | |
664 | gMC->Gsvolu("FECB", "BOX ", idtmed[505], par, 3); // Plexigl. | |
665 | gMC->Gspos ("FECB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY"); | |
666 | par[2] = (zFLTC *0.5); | |
667 | gMC->Gsvolu("FECC", "BOX ", idtmed[505], par, 3); // Plexigl. | |
668 | gMC->Gspos ("FECC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY"); | |
669 | ||
670 | // frame of Air | |
671 | ycoor += par[1]; | |
672 | par[0] = xFLT*0.5; | |
673 | par[1] = (yFLT/2-ycoor-khAlWall)*0.5; // Aluminum layer considered (0.18 cm) | |
674 | par[2] = (zFLTA *0.5); | |
675 | ycoor += par[1]; | |
676 | gMC->Gsvolu("FAIA", "BOX ", idtmed[500], par, 3); // Air | |
677 | gMC->Gspos ("FAIA", 0, "FLTA", 0., ycoor, 0., 0, "ONLY"); | |
678 | par[2] = (zFLTB *0.5); | |
679 | gMC->Gsvolu("FAIB", "BOX ", idtmed[500], par, 3); // Air | |
680 | gMC->Gspos ("FAIB", 0, "FLTB", 0., ycoor, 0., 0, "ONLY"); | |
681 | par[2] = (zFLTC *0.5); | |
682 | gMC->Gsvolu("FAIC", "BOX ", idtmed[500], par, 3); // Air | |
683 | gMC->Gspos ("FAIC", 0, "FLTC", 0., ycoor, 0., 0, "ONLY"); | |
684 | ||
685 | ||
686 | // start with cards and cooling tubes | |
687 | // finally, cards, cooling tubes and layer for thermal dispersion | |
688 | // 3 volumes | |
689 | // card volume definition | |
690 | ||
691 | // see GEOM200 in GEANT manual | |
692 | AliMatrix(idrotm[98], 90., 0., 90., 90., 0., 0.); // 0 deg | |
693 | ||
694 | Float_t cardpar[3]; | |
695 | cardpar[0]= 61.; | |
696 | cardpar[1]= 5.; | |
697 | cardpar[2]= 0.1; | |
698 | gMC->Gsvolu("FCAR", "BOX ", idtmed[504], cardpar, 3); // PCB Card | |
699 | //alu plate volume definition | |
700 | cardpar[1]= 3.5; | |
701 | cardpar[2]= 0.05; | |
702 | gMC->Gsvolu("FALP", "BOX ", idtmed[508], cardpar, 3); // Alu Plate | |
703 | ||
704 | ||
705 | // central module positioning (FAIA) | |
706 | Float_t cardpos[3], aplpos2, stepforcardA=6.89; | |
707 | cardpos[0]= 0.; | |
708 | cardpos[1]= -0.5; | |
709 | cardpos[2]= -62.; | |
710 | Float_t aplpos1 = -2.; | |
711 | Int_t icard; | |
712 | for (icard=0; icard<17; ++icard) { | |
713 | cardpos[2]= cardpos[2]+stepforcardA; | |
714 | aplpos2 = cardpos[2]+0.15; | |
715 | gMC->Gspos("FCAR",icard,"FAIA",cardpos[0],cardpos[1],cardpos[2],idrotm[98],"ONLY"); | |
716 | gMC->Gspos("FALP",icard,"FAIA",cardpos[0],aplpos1,aplpos2,idrotm[98],"ONLY"); | |
717 | ||
718 | } | |
719 | ||
720 | ||
721 | // intermediate module positioning (FAIB) | |
722 | Float_t stepforcardB= 7.05; | |
723 | cardpos[2]= -70.5; | |
724 | for (icard=0; icard<19; ++icard) { | |
725 | cardpos[2]= cardpos[2]+stepforcardB; | |
726 | aplpos2 = cardpos[2]+0.15; | |
727 | gMC->Gspos("FCAR",icard,"FAIB",cardpos[0],cardpos[1],cardpos[2],idrotm[98],"ONLY"); | |
728 | gMC->Gspos("FALP",icard,"FAIB",cardpos[0],aplpos1,aplpos2,idrotm[98],"ONLY"); | |
729 | } | |
730 | ||
731 | ||
732 | // outer module positioning (FAIC) | |
733 | Float_t stepforcardC= 8.45238; | |
734 | cardpos[2]= -79.75; | |
735 | for (icard=0; icard<17; ++icard) { | |
736 | cardpos[2]= cardpos[2]+stepforcardC; | |
737 | aplpos2 = cardpos[2]+0.15; | |
738 | gMC->Gspos("FCAR",icard,"FAIC",cardpos[0],cardpos[1],cardpos[2],idrotm[98],"ONLY"); | |
739 | gMC->Gspos("FALP",icard,"FAIC",cardpos[0],aplpos1,aplpos2,idrotm[98],"ONLY"); | |
740 | } | |
741 | ||
742 | // tube volume definition | |
743 | Float_t tubepar[3]; | |
744 | tubepar[0]= 0.; | |
745 | tubepar[1]= 0.4; | |
746 | tubepar[2]= 61.; | |
747 | gMC->Gsvolu("FTUB", "TUBE", idtmed[516], tubepar, 3); // cooling tubes (steel) | |
748 | tubepar[0]= 0.; | |
749 | tubepar[1]= 0.35; | |
750 | tubepar[2]= 61.; | |
751 | gMC->Gsvolu("FITU", "TUBE", idtmed[515], tubepar, 3); // cooling water | |
752 | // positioning water tube into the steel one | |
753 | gMC->Gspos("FITU",1,"FTUB",0.,0.,0.,0,"ONLY"); | |
754 | ||
755 | ||
756 | // rotation matrix | |
757 | AliMatrix(idrotm[99], 180., 90., 90., 90., 90., 0.); | |
758 | // central module positioning (FAIA) | |
759 | Float_t tubepos[3], tdis=0.6; | |
760 | tubepos[0]= 0.; | |
761 | tubepos[1]= cardpos[1]; | |
762 | tubepos[2]= -62.+tdis; | |
763 | // tub1pos = 5.; | |
764 | Int_t itub; | |
765 | for (itub=0; itub<17; ++itub) { | |
766 | tubepos[2]= tubepos[2]+stepforcardA; | |
767 | gMC->Gspos("FTUB",itub,"FAIA",tubepos[0],tubepos[1],tubepos[2],idrotm[99], | |
768 | "ONLY"); | |
769 | } | |
770 | ||
771 | ||
772 | // intermediate module positioning (FAIB) | |
773 | tubepos[2]= -70.5+tdis; | |
774 | for (itub=0; itub<19; ++itub) { | |
775 | tubepos[2]= tubepos[2]+stepforcardB; | |
776 | gMC->Gspos("FTUB",itub,"FAIB",tubepos[0],tubepos[1],tubepos[2],idrotm[99], | |
777 | "ONLY"); | |
778 | } | |
779 | ||
780 | // outer module positioning (FAIC) | |
781 | tubepos[2]= -79.75+tdis; | |
782 | for (itub=0; itub<17; ++itub) { | |
783 | tubepos[2]= tubepos[2]+stepforcardC; | |
784 | gMC->Gspos("FTUB",itub,"FAIC",tubepos[0],tubepos[1],tubepos[2],idrotm[99], | |
785 | "ONLY"); | |
786 | } | |
787 | ||
788 | } | |
789 | ||
790 | //_____________________________________________________________________________ | |
791 | void AliTOFv2FHoles::DrawModule() const | |
792 | { | |
793 | // | |
794 | // Draw a shaded view of the Time Of Flight version 2 | |
795 | // | |
796 | // Set everything unseen | |
797 | gMC->Gsatt("*", "seen", -1); | |
798 | // | |
799 | // Set ALIC mother transparent | |
800 | gMC->Gsatt("ALIC","SEEN",0); | |
801 | // | |
802 | // Set the volumes visible | |
803 | gMC->Gsatt("ALIC","SEEN",0); | |
804 | ||
805 | gMC->Gsatt("FTOA","SEEN",1); | |
806 | gMC->Gsatt("FTOB","SEEN",1); | |
807 | gMC->Gsatt("FTOC","SEEN",1); | |
808 | gMC->Gsatt("FLTA","SEEN",1); | |
809 | gMC->Gsatt("FLTB","SEEN",1); | |
810 | gMC->Gsatt("FLTC","SEEN",1); | |
811 | gMC->Gsatt("FPLA","SEEN",1); | |
812 | gMC->Gsatt("FPLB","SEEN",1); | |
813 | gMC->Gsatt("FPLC","SEEN",1); | |
814 | gMC->Gsatt("FSTR","SEEN",1); | |
815 | gMC->Gsatt("FPEA","SEEN",1); | |
816 | gMC->Gsatt("FPEB","SEEN",1); | |
817 | gMC->Gsatt("FPEC","SEEN",1); | |
818 | ||
819 | gMC->Gsatt("FLZ1","SEEN",0); | |
820 | gMC->Gsatt("FLZ2","SEEN",0); | |
821 | gMC->Gsatt("FLZ3","SEEN",0); | |
822 | gMC->Gsatt("FLX1","SEEN",0); | |
823 | gMC->Gsatt("FLX2","SEEN",0); | |
824 | gMC->Gsatt("FLX3","SEEN",0); | |
825 | gMC->Gsatt("FPAD","SEEN",0); | |
826 | ||
827 | gMC->Gdopt("hide", "on"); | |
828 | gMC->Gdopt("shad", "on"); | |
829 | gMC->Gsatt("*", "fill", 7); | |
830 | gMC->SetClipBox("."); | |
831 | gMC->SetClipBox("*", 0, 1000, -1000, 1000, -1000, 1000); | |
832 | gMC->DefaultRange(); | |
833 | gMC->Gdraw("alic", 40, 30, 0, 12, 9.5, .02, .02); | |
834 | gMC->Gdhead(1111, "Time Of Flight"); | |
835 | gMC->Gdman(18, 4, "MAN"); | |
836 | gMC->Gdopt("hide","off"); | |
837 | } | |
838 | //_____________________________________________________________________________ | |
839 | void AliTOFv2FHoles::DrawDetectorModules() | |
840 | { | |
841 | // | |
842 | // Draw a shaded view of the TOF detector version 2 | |
843 | // | |
844 | ||
845 | //Set ALIC mother transparent | |
846 | gMC->Gsatt("ALIC","SEEN",0); | |
847 | ||
848 | // | |
849 | //Set volumes visible | |
850 | // | |
851 | //=====> Level 1 | |
852 | // Level 1 for TOF volumes | |
853 | gMC->Gsatt("B077","seen",0); | |
854 | ||
855 | ||
856 | //==========> Level 2 | |
857 | // Level 2 | |
858 | gMC->Gsatt("B076","seen",-1); // all B076 sub-levels skipped - | |
859 | gMC->Gsatt("B071","seen",0); | |
860 | gMC->Gsatt("B074","seen",0); | |
861 | gMC->Gsatt("B075","seen",0); | |
862 | gMC->Gsatt("B080","seen",0); // B080 does not has sub-level | |
863 | ||
864 | ||
865 | // Level 2 of B071 | |
866 | gMC->Gsatt("B063","seen",-1); // all B063 sub-levels skipped - | |
867 | gMC->Gsatt("B065","seen",-1); // all B065 sub-levels skipped - | |
868 | gMC->Gsatt("B067","seen",-1); // all B067 sub-levels skipped - | |
869 | gMC->Gsatt("B069","seen",-1); // all B069 sub-levels skipped - | |
870 | gMC->Gsatt("B056","seen",0); // B056 does not has sub-levels - | |
871 | gMC->Gsatt("B059","seen",-1); // all B059 sub-levels skipped - | |
872 | gMC->Gsatt("B072","seen",-1); // all B072 sub-levels skipped - | |
873 | gMC->Gsatt("BTR1","seen",0); // BTR1 do not have sub-levels - | |
874 | gMC->Gsatt("BTO1","seen",0); | |
875 | ||
876 | ||
877 | // Level 2 of B074 | |
878 | gMC->Gsatt("BTR2","seen",0); // BTR2 does not has sub-levels - | |
879 | gMC->Gsatt("BTO2","seen",0); | |
880 | ||
881 | // Level 2 of B075 | |
882 | gMC->Gsatt("BTR3","seen",0); // BTR3 do not have sub-levels - | |
883 | gMC->Gsatt("BTO3","seen",0); | |
884 | ||
885 | // ==================> Level 3 | |
886 | // Level 3 of B071 / Level 2 of BTO1 | |
887 | gMC->Gsatt("FTOC","seen",-2); | |
888 | gMC->Gsatt("FTOB","seen",-2); | |
889 | gMC->Gsatt("FTOA","seen",-2); | |
890 | ||
891 | // Level 3 of B074 / Level 2 of BTO2 | |
892 | // -> cfr previous settings | |
893 | ||
894 | // Level 3 of B075 / Level 2 of BTO3 | |
895 | // -> cfr previous settings | |
896 | ||
897 | gMC->Gdopt("hide","on"); | |
898 | gMC->Gdopt("shad","on"); | |
899 | gMC->Gsatt("*", "fill", 5); | |
900 | gMC->SetClipBox("."); | |
901 | gMC->SetClipBox("*", 0, 1000, 0, 1000, 0, 1000); | |
902 | gMC->DefaultRange(); | |
903 | gMC->Gdraw("alic", 45, 40, 0, 10, 10, .015, .015); | |
904 | gMC->Gdhead(1111,"TOF detector V1"); | |
905 | gMC->Gdman(18, 4, "MAN"); | |
906 | gMC->Gdopt("hide","off"); | |
907 | } | |
908 | ||
909 | //_____________________________________________________________________________ | |
910 | void AliTOFv2FHoles::DrawDetectorStrips() | |
911 | { | |
912 | // | |
913 | // Draw a shaded view of the TOF strips for version 2 | |
914 | // | |
915 | ||
916 | //Set ALIC mother transparent | |
917 | gMC->Gsatt("ALIC","SEEN",0); | |
918 | ||
919 | // | |
920 | //Set volumes visible | |
921 | //=====> Level 1 | |
922 | // Level 1 for TOF volumes | |
923 | gMC->Gsatt("B077","seen",0); | |
924 | ||
925 | //==========> Level 2 | |
926 | // Level 2 | |
927 | gMC->Gsatt("B076","seen",-1); // all B076 sub-levels skipped - | |
928 | gMC->Gsatt("B071","seen",0); | |
929 | gMC->Gsatt("B074","seen",0); | |
930 | gMC->Gsatt("B075","seen",0); | |
931 | gMC->Gsatt("B080","seen",0); // B080 does not has sub-level | |
932 | ||
933 | // Level 2 of B071 | |
934 | gMC->Gsatt("B063","seen",-1); // all B063 sub-levels skipped - | |
935 | gMC->Gsatt("B065","seen",-1); // all B065 sub-levels skipped - | |
936 | gMC->Gsatt("B067","seen",-1); // all B067 sub-levels skipped - | |
937 | gMC->Gsatt("B069","seen",-1); // all B069 sub-levels skipped - | |
938 | gMC->Gsatt("B056","seen",0); // B056 does not has sub-levels - | |
939 | gMC->Gsatt("B059","seen",-1); // all B059 sub-levels skipped - | |
940 | gMC->Gsatt("B072","seen",-1); // all B072 sub-levels skipped - | |
941 | gMC->Gsatt("BTR1","seen",0); // BTR1 do not have sub-levels - | |
942 | gMC->Gsatt("BTO1","seen",0); | |
943 | ||
944 | // ==================> Level 3 | |
945 | // Level 3 of B071 / Level 2 of BTO1 | |
946 | gMC->Gsatt("FTOC","seen",0); | |
947 | gMC->Gsatt("FTOB","seen",0); | |
948 | gMC->Gsatt("FTOA","seen",0); | |
949 | ||
950 | // Level 3 of B074 / Level 2 of BTO2 | |
951 | // -> cfr previous settings | |
952 | ||
953 | // Level 3 of B075 / Level 2 of BTO3 | |
954 | // -> cfr previous settings | |
955 | ||
956 | ||
957 | // ==========================> Level 4 | |
958 | // Level 4 of B071 / Level 3 of BTO1 / Level 2 of FTOC | |
959 | gMC->Gsatt("FLTC","seen",0); | |
960 | // Level 4 of B071 / Level 3 of BTO1 / Level 2 of FTOB | |
961 | gMC->Gsatt("FLTB","seen",0); | |
962 | // Level 4 of B071 / Level 3 of BTO1 / Level 2 of FTOA | |
963 | gMC->Gsatt("FLTA","seen",0); | |
964 | ||
965 | // Level 4 of B074 / Level 3 of BTO2 / Level 2 of FTOC | |
966 | // -> cfr previous settings | |
967 | // Level 4 of B074 / Level 3 of BTO2 / Level 2 of FTOB | |
968 | // -> cfr previous settings | |
969 | ||
970 | // Level 4 of B075 / Level 3 of BTO3 / Level 2 of FTOC | |
971 | // -> cfr previous settings | |
972 | ||
973 | //======================================> Level 5 | |
974 | // Level 5 of B071 / Level 4 of BTO1 / Level 3 of FTOC / Level 2 of FLTC | |
975 | gMC->Gsatt("FALC","seen",0); // no children for FALC | |
976 | gMC->Gsatt("FSTR","seen",-2); | |
977 | gMC->Gsatt("FPEC","seen",0); // no children for FPEC | |
978 | gMC->Gsatt("FECC","seen",0); // no children for FECC | |
979 | gMC->Gsatt("FWAC","seen",0); // no children for FWAC | |
980 | gMC->Gsatt("FAIC","seen",0); // no children for FAIC | |
981 | ||
982 | // Level 5 of B071 / Level 4 of BTO1 / Level 3 of FTOB / Level 2 of FLTB | |
983 | gMC->Gsatt("FALB","seen",0); // no children for FALB | |
984 | //--> gMC->Gsatt("FSTR","seen",-2); | |
985 | ||
986 | ||
987 | // -> cfr previous settings | |
988 | gMC->Gsatt("FPEB","seen",0); // no children for FPEB | |
989 | gMC->Gsatt("FECB","seen",0); // no children for FECB | |
990 | gMC->Gsatt("FWAB","seen",0); // no children for FWAB | |
991 | gMC->Gsatt("FAIB","seen",0); // no children for FAIB | |
992 | ||
993 | // Level 5 of B071 / Level 4 of BTO1 / Level 3 of FTOA / Level 2 of FLTA | |
994 | gMC->Gsatt("FALA","seen",0); // no children for FALB | |
995 | //--> gMC->Gsatt("FSTR","seen",-2); | |
996 | // -> cfr previous settings | |
997 | gMC->Gsatt("FPEA","seen",0); // no children for FPEA | |
998 | gMC->Gsatt("FECA","seen",0); // no children for FECA | |
999 | gMC->Gsatt("FWAA","seen",0); // no children for FWAA | |
1000 | gMC->Gsatt("FAIA","seen",0); // no children for FAIA | |
1001 | ||
1002 | // Level 2 of B074 | |
1003 | gMC->Gsatt("BTR2","seen",0); // BTR2 does not has sub-levels - | |
1004 | gMC->Gsatt("BTO2","seen",0); | |
1005 | ||
1006 | // Level 2 of B075 | |
1007 | gMC->Gsatt("BTR3","seen",0); // BTR3 do not have sub-levels - | |
1008 | gMC->Gsatt("BTO3","seen",0); | |
1009 | ||
1010 | // for others Level 5, cfr. previous settings | |
1011 | ||
1012 | gMC->Gdopt("hide","on"); | |
1013 | gMC->Gdopt("shad","on"); | |
1014 | gMC->Gsatt("*", "fill", 5); | |
1015 | gMC->SetClipBox("."); | |
1016 | gMC->SetClipBox("*", 0, 1000, 0, 1000, 0, 1000); | |
1017 | gMC->DefaultRange(); | |
1018 | gMC->Gdraw("alic", 45, 40, 0, 10, 10, .015, .015); | |
1019 | gMC->Gdhead(1111,"TOF Strips V1"); | |
1020 | gMC->Gdman(18, 4, "MAN"); | |
1021 | gMC->Gdopt("hide","off"); | |
1022 | } | |
1023 | ||
1024 | //_____________________________________________________________________________ | |
1025 | void AliTOFv2FHoles::CreateMaterials() | |
1026 | { | |
1027 | // | |
1028 | // Define materials for the Time Of Flight | |
1029 | // | |
1030 | AliTOF::CreateMaterials(); | |
1031 | } | |
1032 | ||
1033 | //_____________________________________________________________________________ | |
1034 | void AliTOFv2FHoles::Init() | |
1035 | { | |
1036 | // | |
1037 | // Initialise the detector after the geometry has been defined | |
1038 | // | |
1039 | if(fDebug) { | |
1040 | printf("%s: **************************************" | |
1041 | " TOF " | |
1042 | "**************************************\n",ClassName()); | |
1043 | printf("\n%s: Version 2 of TOF initialing, " | |
1044 | "TOF with holes for PHOS and RICH \n",ClassName()); | |
1045 | } | |
1046 | ||
1047 | AliTOF::Init(); | |
1048 | ||
1049 | fIdFTOA = gMC->VolId("FTOA"); | |
1050 | fIdFTOB = gMC->VolId("FTOB"); | |
1051 | fIdFTOC = gMC->VolId("FTOC"); | |
1052 | fIdFLTA = gMC->VolId("FLTA"); | |
1053 | fIdFLTB = gMC->VolId("FLTB"); | |
1054 | fIdFLTC = gMC->VolId("FLTC"); | |
1055 | ||
1056 | if(fDebug) { | |
1057 | printf("%s: **************************************" | |
1058 | " TOF " | |
1059 | "**************************************\n",ClassName()); | |
1060 | } | |
1061 | } | |
1062 | ||
1063 | //_____________________________________________________________________________ | |
1064 | void AliTOFv2FHoles::StepManager() | |
1065 | { | |
1066 | // | |
1067 | // Procedure called at each step in the Time Of Flight | |
1068 | // | |
1069 | TLorentzVector mom, pos; | |
1070 | Float_t xm[3],pm[3],xpad[3],ppad[3]; | |
1071 | Float_t hits[13],phi,phid,z; | |
1072 | Int_t vol[5]; | |
1073 | Int_t sector, plate, padx, padz, strip; | |
1074 | Int_t copy, padzid, padxid, stripid, i; | |
1075 | Int_t *idtmed = fIdtmed->GetArray()-499; | |
1076 | Float_t incidenceAngle; | |
1077 | ||
1078 | if(gMC->GetMedium()==idtmed[513] && | |
1079 | gMC->IsTrackEntering() && gMC->TrackCharge() | |
1080 | && gMC->CurrentVolID(copy)==fIdSens) | |
1081 | { | |
1082 | // getting information about hit volumes | |
1083 | ||
1084 | padzid=gMC->CurrentVolOffID(2,copy); | |
1085 | padz=copy; | |
1086 | ||
1087 | padxid=gMC->CurrentVolOffID(1,copy); | |
1088 | padx=copy; | |
1089 | ||
1090 | stripid=gMC->CurrentVolOffID(4,copy); | |
1091 | strip=copy; | |
1092 | ||
1093 | gMC->TrackPosition(pos); | |
1094 | gMC->TrackMomentum(mom); | |
1095 | ||
1096 | // Double_t NormPos=1./pos.Rho(); | |
1097 | Double_t normMom=1./mom.Rho(); | |
1098 | ||
1099 | // getting the cohordinates in pad ref system | |
1100 | xm[0] = (Float_t)pos.X(); | |
1101 | xm[1] = (Float_t)pos.Y(); | |
1102 | xm[2] = (Float_t)pos.Z(); | |
1103 | ||
1104 | pm[0] = (Float_t)mom.X()*normMom; | |
1105 | pm[1] = (Float_t)mom.Y()*normMom; | |
1106 | pm[2] = (Float_t)mom.Z()*normMom; | |
1107 | ||
1108 | gMC->Gmtod(xm,xpad,1); | |
1109 | gMC->Gmtod(pm,ppad,2); | |
1110 | ||
1111 | incidenceAngle = TMath::ACos(ppad[1])*kRaddeg; | |
1112 | ||
1113 | z = pos[2]; | |
1114 | ||
1115 | plate = 0; | |
1116 | ||
1117 | /* to be changed | |
1118 | if (TMath::Abs(z) <= fZlenA*0.5) plate = 3; | |
1119 | if (z < (fZlenA*0.5+fZlenB) && | |
1120 | z > fZlenA*0.5) plate = 4; | |
1121 | if (z >-(fZlenA*0.5+fZlenB) && | |
1122 | z < -fZlenA*0.5) plate = 2; | |
1123 | if (z > (fZlenA*0.5+fZlenB)) plate = 5; | |
1124 | if (z <-(fZlenA*0.5+fZlenB)) plate = 1; | |
1125 | end to be changed */ | |
1126 | ||
1127 | if (TMath::Abs(z) <= 124.*0.5) plate = 3; | |
1128 | if (z < (124.*0.5+154.) && | |
1129 | z > 124.*0.5) plate = 4; | |
1130 | if (z >-(124.*0.5+154.) && | |
1131 | z < -124.*0.5) plate = 2; | |
1132 | if (z > (124.*0.5+154.)) plate = 5; | |
1133 | if (z <-(124.*0.5+154.)) plate = 1; | |
1134 | ||
1135 | ||
1136 | phi = pos.Phi(); | |
1137 | phid = phi*kRaddeg+180.; | |
1138 | sector = Int_t (phid/20.); | |
1139 | sector++; | |
1140 | ||
1141 | for(i=0;i<3;++i) { | |
1142 | hits[i] = pos[i]; | |
1143 | hits[i+3] = pm[i]; | |
1144 | } | |
1145 | ||
1146 | hits[6] = mom.Rho(); | |
1147 | hits[7] = pos[3]; | |
1148 | hits[8] = xpad[0]; | |
1149 | hits[9] = xpad[1]; | |
1150 | hits[10]= xpad[2]; | |
1151 | hits[11]= incidenceAngle; | |
1152 | hits[12]= gMC->Edep(); | |
1153 | ||
1154 | vol[0]= sector; | |
1155 | vol[1]= plate; | |
1156 | vol[2]= strip; | |
1157 | vol[3]= padx; | |
1158 | vol[4]= padz; | |
1159 | ||
1160 | AddHit(gAlice->GetCurrentTrackNumber(),vol, hits); | |
1161 | } | |
1162 | } |