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