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