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