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