]>
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$ | |
b3a22d72 | 18 | Revision 1.11.4.4 2000/05/19 10:09:51 nilsen |
19 | fix for bug with HP and Sun unix + fix for event display in ITS-working branch | |
c9a71be1 | 20 | |
3a15a09e | 21 | Revision 1.11.4.3 2000/04/04 14:18:03 nilsen |
22 | Fixed volume error with vomule SFR5. Loop positioning this volume is now from | |
23 | <=23 (was <=24). This may not be the final version. | |
24 | ||
56d6a1ef | 25 | Revision 1.11.4.2 2000/03/04 23:46:02 nilsen |
26 | Fixed up the comments/documentation. | |
27 | ||
28 | Revision 1.11.4.1 2000/01/12 19:03:33 nilsen | |
29 | This is the version of the files after the merging done in December 1999. | |
30 | See the ReadMe110100.txt file for details | |
31 | ||
32 | Revision 1.11 1999/10/22 08:25:25 fca | |
33 | remove double definition of destructors | |
34 | ||
1e3deba7 | 35 | Revision 1.10 1999/10/22 08:16:49 fca |
36 | Correct destructors, thanks to I.Hrivnacova | |
37 | ||
5b8cc8df | 38 | Revision 1.9 1999/10/06 19:56:50 fca |
39 | Add destructor | |
40 | ||
1c1b73f8 | 41 | Revision 1.8 1999/10/05 08:05:09 fca |
42 | Minor corrections for uninitialised variables. | |
43 | ||
593d2ea1 | 44 | Revision 1.7 1999/09/29 09:24:20 fca |
45 | Introduction of the Copyright and cvs Log | |
46 | ||
4c039060 | 47 | */ |
48 | ||
fe4da5cc | 49 | /////////////////////////////////////////////////////////////////////////////// |
56d6a1ef | 50 | // |
51 | // Inner Traking System version 3 | |
52 | // This class contains the base procedures for the Inner Tracking System | |
53 | // | |
58005f18 | 54 | // Authors: R. Barbera, A. Morsch. |
55 | // version 3. | |
56 | // Created 1998. | |
57 | // | |
58 | // NOTE: THIS IS THE OLD detailed TP-like geometry of the ITS. THIS WILL NOT | |
59 | // WORK with the geometry or module classes or any analysis classes. You are | |
60 | // strongly encouraged to uses AliITSv5. | |
56d6a1ef | 61 | // |
fe4da5cc | 62 | /////////////////////////////////////////////////////////////////////////////// |
56d6a1ef | 63 | |
64 | // See AliITSv3::StepManager(). | |
65 | #define ALIITSPRINTGEOM 0 // default. don't print out gemetry information | |
66 | //#define ALIITSPRINTGEOM 1 // print out geometry information | |
67 | ||
fe4da5cc | 68 | #include <TMath.h> |
69 | #include <TRandom.h> | |
70 | #include <TVector.h> | |
c9a71be1 | 71 | #include <TGeometry.h> |
72 | #include <TNode.h> | |
73 | #include <TTUBE.h> | |
b3a22d72 | 74 | #include <TFile.h> // only required for Tracking function? |
75 | #include <TCanvas.h> | |
76 | #include <TObjArray.h> | |
77 | #include <TClonesArray.h> | |
c9a71be1 | 78 | |
79 | #include "AliMC.h" | |
80 | #include "AliConst.h" | |
81 | ||
58005f18 | 82 | #include "AliITShit.h" |
fe4da5cc | 83 | #include "AliITSv3.h" |
84 | #include "AliRun.h" | |
85 | ||
b3a22d72 | 86 | #include "AliMC.h" |
87 | #include "AliConst.h" | |
fe4da5cc | 88 | |
89 | ClassImp(AliITSv3) | |
90 | ||
91 | //_____________________________________________________________________________ | |
e8189707 | 92 | AliITSv3::AliITSv3() { |
56d6a1ef | 93 | //////////////////////////////////////////////////////////////////////// |
94 | // Standard default constructor for the ITS version 3. | |
95 | //////////////////////////////////////////////////////////////////////// | |
e8189707 | 96 | |
97 | fIdN = 6; | |
98 | fIdName = new TString[fIdN]; | |
99 | fIdName[0] = "ITS1"; | |
100 | fIdName[1] = "ITS2"; | |
101 | fIdName[2] = "ITS3"; | |
102 | fIdName[3] = "ITS4"; | |
103 | fIdName[4] = "ITS5"; | |
104 | fIdName[5] = "ITS6"; | |
105 | fIdSens = new Int_t[fIdN]; | |
106 | for (Int_t i=0;i<fIdN;i++) fIdSens[i]=fIdName[i].Length(); | |
593d2ea1 | 107 | fMinorVersionV3=1; |
fe4da5cc | 108 | } |
b3a22d72 | 109 | //____________________________________________________________________________ |
110 | AliITSv3::AliITSv3(const AliITSv3 &source){ | |
111 | //////////////////////////////////////////////////////////////////////// | |
112 | // Copy Constructor for ITS version 3. | |
113 | //////////////////////////////////////////////////////////////////////// | |
114 | if(&source == this) return; | |
e8189707 | 115 | printf("Not allowed to copy AliITSv3\n"); |
481937a6 | 116 | return; |
b3a22d72 | 117 | } |
118 | //_____________________________________________________________________________ | |
119 | AliITSv3& AliITSv3::operator=(const AliITSv3 &source){ | |
120 | //////////////////////////////////////////////////////////////////////// | |
121 | // Assignment operator for the ITS version 3. | |
122 | //////////////////////////////////////////////////////////////////////// | |
e8189707 | 123 | if(&source == this) return *this; |
124 | printf("Not allowed to copy AliITSv3\n"); | |
125 | return *this; | |
b3a22d72 | 126 | } |
5b8cc8df | 127 | //_____________________________________________________________________________ |
128 | AliITSv3::~AliITSv3() { | |
56d6a1ef | 129 | //////////////////////////////////////////////////////////////////////// |
130 | // Standard destructor for the ITS version 3. | |
131 | //////////////////////////////////////////////////////////////////////// | |
1c1b73f8 | 132 | } |
fe4da5cc | 133 | //_____________________________________________________________________________ |
58005f18 | 134 | AliITSv3::AliITSv3(const char *name, const char *title) : AliITS(name, title){ |
56d6a1ef | 135 | //////////////////////////////////////////////////////////////////////// |
136 | // Standard constructor for the ITS version 3. | |
137 | //////////////////////////////////////////////////////////////////////// | |
e8189707 | 138 | fIdN = 6; |
139 | fIdName = new TString[fIdN]; | |
140 | fIdName[0] = "ITS1"; | |
141 | fIdName[1] = "ITS2"; | |
142 | fIdName[2] = "ITS3"; | |
143 | fIdName[3] = "ITS4"; | |
144 | fIdName[4] = "ITS5"; | |
145 | fIdName[5] = "ITS6"; | |
146 | fIdSens = new Int_t[fIdN]; | |
147 | for (Int_t i=0;i<fIdN;i++) fIdSens[i]=fIdName[i].Length(); | |
593d2ea1 | 148 | fMinorVersionV3=1; |
b3a22d72 | 149 | }//__________________________________________________________________________ |
c9a71be1 | 150 | void AliITSv3::BuildGeometry(){ |
b3a22d72 | 151 | //////////////////////////////////////////////////////////////////////// |
152 | // Geometry builder for the ITS version 3. | |
153 | //////////////////////////////////////////////////////////////////////// | |
154 | TNode *node, *top; | |
e8189707 | 155 | const int kColorITS=kYellow; |
c9a71be1 | 156 | // |
b3a22d72 | 157 | top = gAlice->GetGeometry()->GetNode("alice"); |
c9a71be1 | 158 | |
159 | new TTUBE("S_layer1","Layer1 of ITS","void",3.9,3.9+0.05475,12.25); | |
b3a22d72 | 160 | top->cd(); |
161 | node = new TNode("Layer1","Layer1","S_layer1",0,0,0,""); | |
162 | node->SetLineColor(kColorITS); | |
163 | fNodes->Add(node); | |
c9a71be1 | 164 | |
165 | new TTUBE("S_layer2","Layer2 of ITS","void",7.6,7.6+0.05475,16.3); | |
b3a22d72 | 166 | top->cd(); |
167 | node = new TNode("Layer2","Layer2","S_layer2",0,0,0,""); | |
168 | node->SetLineColor(kColorITS); | |
169 | fNodes->Add(node); | |
c9a71be1 | 170 | |
171 | new TTUBE("S_layer3","Layer3 of ITS","void",14,14+0.05288,21.1); | |
b3a22d72 | 172 | top->cd(); |
173 | node = new TNode("Layer3","Layer3","S_layer3",0,0,0,""); | |
174 | node->SetLineColor(kColorITS); | |
175 | fNodes->Add(node); | |
c9a71be1 | 176 | |
177 | new TTUBE("S_layer4","Layer4 of ITS","void",24,24+0.05288,29.6); | |
b3a22d72 | 178 | top->cd(); |
179 | node = new TNode("Layer4","Layer4","S_layer4",0,0,0,""); | |
180 | node->SetLineColor(kColorITS); | |
181 | fNodes->Add(node); | |
c9a71be1 | 182 | |
183 | new TTUBE("S_layer5","Layer5 of ITS","void",40,40+0.05382,45.1); | |
b3a22d72 | 184 | top->cd(); |
185 | node = new TNode("Layer5","Layer5","S_layer5",0,0,0,""); | |
186 | node->SetLineColor(kColorITS); | |
187 | fNodes->Add(node); | |
c9a71be1 | 188 | |
189 | new TTUBE("S_layer6","Layer6 of ITS","void",45,45+0.05382,50.4); | |
b3a22d72 | 190 | top->cd(); |
191 | node = new TNode("Layer6","Layer6","S_layer6",0,0,0,""); | |
192 | node->SetLineColor(kColorITS); | |
193 | fNodes->Add(node); | |
c9a71be1 | 194 | } |
fe4da5cc | 195 | //_____________________________________________________________________________ |
58005f18 | 196 | void AliITSv3::CreateGeometry(){ |
56d6a1ef | 197 | //////////////////////////////////////////////////////////////////////// |
198 | // This routine creates and defines the version 3 geometry of the ITS. | |
199 | //////////////////////////////////////////////////////////////////////// | |
fe4da5cc | 200 | |
b3a22d72 | 201 | const Float_t kxx[14] = { 0.000, 0.000,-14.002, -6.288,-25.212,-16.292, |
58005f18 | 202 | -35.713,-26.401,-45.340,-36.772,-18.740,-12.814, |
203 | -14.358, 0.000}; | |
b3a22d72 | 204 | const Float_t kyy[14] = { 0.000, 27.056, 31.408, 25.019, 27.768, 22.664, |
58005f18 | 205 | 22.420, 18.727, 15.479, 13.680, -9.984, -6.175, |
206 | -3.775, 0.000 }; | |
b3a22d72 | 207 | const Float_t kxbeg[13] = { 0.000, -0.352,-12.055, -8.755,-23.035,-19.085, |
58005f18 | 208 | -33.362,-28.859,-42.774,-36.644,-18.352,-13.085, |
209 | -13.426 }; | |
b3a22d72 | 210 | const Float_t kybeg[13] = { 0.386, 27.165, 29.795, 25.377, 26.480, 22.632, |
58005f18 | 211 | 21.487, 18.305, 14.940, 13.509, -9.735, -5.755, |
212 | -3.53 }; | |
b3a22d72 | 213 | const Float_t kxend[13] = { 0.000,-11.588, -8.208,-22.709,-18.738,-33.184, |
58005f18 | 214 | -28.719,-42.756,-37.027,-19.002,-13.235,-13.837, |
215 | -.373 }; | |
b3a22d72 | 216 | const Float_t kyend[13] = { 26.688, 30.658, 26.609, 27.405, 23.935, 22.452, |
58005f18 | 217 | 19.646, 15.922, 13.733, -9.639, -6.446, -4.585, |
218 | -.098 }; | |
b3a22d72 | 219 | const Float_t kxarc[13] = { -0.500,-13.248,-13.505,-18.622,-37.171,-42.671, |
58005f18 | 220 | -28.977,-33.178,-19.094,-22.781, -8.655,-11.736, |
221 | -0.500 }; | |
b3a22d72 | 222 | const Float_t kyarc[13] = { 0.500, -4.093, -5.911, -9.200, 13.162, 15.543, |
58005f18 | 223 | 19.109, 22.066, 23.446, 27.024, 26.184, 30.294, |
224 | 26.802 }; | |
b3a22d72 | 225 | const Float_t krarc[13] = { 0.5,0.7,0.5,0.5,0.7,0.5,0.7, |
58005f18 | 226 | 0.5,0.7,0.5,0.7,0.5,0.5 }; |
b3a22d72 | 227 | const Float_t krr = 4.064516; |
228 | const Float_t ktteta = 63.00; | |
229 | const Float_t kpphi = -35.00; | |
230 | const Float_t kgteta = 87.78; | |
231 | const Double_t kdegrad = kPI/180.; | |
232 | const Double_t kraddeg = 180./kPI; | |
233 | const Double_t ktwopi = 2*kPI; | |
fe4da5cc | 234 | |
235 | Double_t biga, bigb; | |
58005f18 | 236 | Float_t dcei[3], dela[3], dchi[3], dpcb[3], darc[5], |
237 | dfra[10], dcer[3], dkap[3], dpla[3], | |
238 | xccc, yccc, aphi, dcop[3], dtra[3], dsil[3], | |
239 | atheta1011, dbus[3], dtub[3], dwat[3], | |
240 | depx[3], dits[3], atheta1314, atheta1213, atheta1112, | |
241 | dsup[3], xtra[8], ytra[8], ztra[8], dsrv[3]; | |
fe4da5cc | 242 | Double_t biga1, bigb1; |
58005f18 | 243 | Float_t runo, xpos, ypos, zpos, rtwo, aphi1, aphi2, |
244 | dtra1[3], dtra2[3], dtra3[3], | |
245 | dtra4[3], dbox1[3], dbox2[3]; | |
246 | Int_t jbox1, jbox2; | |
247 | Float_t xtra1[6], ytra1[6], ztra1[6]; | |
248 | Int_t i; | |
249 | Float_t xpos1, ypos1; | |
250 | Int_t j; | |
251 | Float_t angle, dcone[5], dtube[3], dpgon[10]; | |
252 | Float_t rzero, xzero, yzero; | |
fe4da5cc | 253 | Double_t coeffa, coeffb, coeffc; |
58005f18 | 254 | Int_t idrotm[5250]; |
255 | Float_t atheta, offset; | |
256 | Float_t offset1, offset2, dgh[15]; | |
257 | Float_t xcc, ycc, sep, atheta12, atheta23, atheta34, atheta45, atheta56, | |
258 | atheta67, atheta78, atheta89, xxm, dal1[3], dal2[3]; | |
259 | //Float_t yos; | |
260 | Float_t r1, r2, r3; | |
fe4da5cc | 261 | Double_t xcc1, ycc1, xcc2, ycc2; |
58005f18 | 262 | Float_t atheta910; |
b3a22d72 | 263 | const char knatra[][5] ={ "TR01","TR02","TR03","TR04", |
58005f18 | 264 | "TR05","TR06","TR07","TR08"}; |
b3a22d72 | 265 | const char knatra1[][5] ={"TR11","TR12","TR13","TR14", |
58005f18 | 266 | "TR15","TR16","TR17","TR18", |
267 | "TR19","TR20","TR21","TR22", | |
268 | "TR23","TR24","TR25","TR26"}; | |
b3a22d72 | 269 | const char knatra2[][5] ={"TR31","TR32","TR33","TR34","TR35","TR36"}; |
270 | const char knatra3[][5] ={"TR41","TR42","TR43","TR44","TR45","TR46"}; | |
271 | const char knatra4[][5] ={"TR51","TR52","TR53","TR54","TR55","TR56", | |
58005f18 | 272 | "TR57","TR58","TR59","TR60","TR61","TR62", |
273 | "TR63","TR64","TR65","TR66"}; | |
fe4da5cc | 274 | |
ad51aeb0 | 275 | Int_t *idtmed = fIdtmed->GetArray()-199; |
fe4da5cc | 276 | |
277 | // --- Define a ghost volume containing the whole ITS and fill it with air | |
278 | // or vacuum | |
279 | ||
58005f18 | 280 | dgh[0] = 0.0; |
281 | dgh[1] = 360.0; | |
282 | dgh[2] = 4.0; | |
283 | dgh[3] = -70.0; | |
284 | dgh[4] = 49.999; | |
285 | dgh[5] = 49.999; | |
286 | dgh[6] = -25.0; | |
287 | dgh[7] = 3.0; | |
288 | dgh[8] = 49.999; | |
289 | dgh[9] = 25.0; | |
290 | dgh[10] = 3.0; | |
fe4da5cc | 291 | dgh[11] = 49.999; |
58005f18 | 292 | dgh[12] = 70.0; |
fe4da5cc | 293 | dgh[13] = 49.999; |
294 | dgh[14] = 49.999; | |
cfce8870 | 295 | gMC->Gsvolu("ITSV", "PCON", idtmed[275], dgh, 15); |
fe4da5cc | 296 | |
297 | // --- Place the ghost volume in its mother volume (ALIC) and make it | |
298 | // invisible | |
299 | ||
cfce8870 | 300 | gMC->Gspos("ITSV", 1, "ALIC", 0., 0., 0., 0, "ONLY"); |
301 | gMC->Gsatt("ITSV", "SEEN", 0); | |
fe4da5cc | 302 | |
303 | //************************************************************************ | |
304 | //* * | |
305 | //* P I X E L S * | |
306 | //* =========== * | |
307 | //* * | |
308 | //************************************************************************ | |
309 | ||
310 | // GOTO 2345 ! skip ITS layer no. 1 and 2 | |
311 | ||
312 | // --- Define a ghost volume containing the Silicon Pixel Detectors | |
313 | // (layer #1 and #2) and fill it with air or vacuum | |
314 | ||
58005f18 | 315 | xxm = (49.999-3)/(70-25); |
316 | dgh[0] = 0.0; | |
317 | dgh[1] = 360.0; | |
318 | dgh[2] = 4.0; | |
319 | dgh[3] = -25.-(9.-3.01)/xxm; | |
320 | dgh[4] = 9.0; | |
321 | dgh[5] = 9.0; | |
322 | dgh[6] = -25.0; | |
323 | dgh[7] = 3.01; | |
324 | dgh[8] = 9.0; | |
325 | dgh[9] = 25.0; | |
fe4da5cc | 326 | dgh[10] = 3.01; |
58005f18 | 327 | dgh[11] = 9.0; |
fe4da5cc | 328 | dgh[12] = 25+(9-3.01)/xxm; |
58005f18 | 329 | dgh[13] = 9.0; |
330 | dgh[14] = 9.0; | |
cfce8870 | 331 | gMC->Gsvolu("IT12", "PCON", idtmed[275], dgh, 15); |
fe4da5cc | 332 | |
333 | // --- Place the ghost volume in its mother volume (ITSV) and make it | |
334 | // invisible | |
335 | ||
cfce8870 | 336 | gMC->Gspos("IT12", 1, "ITSV", 0., 0., 0., 0, "ONLY"); |
337 | gMC->Gsatt("IT12", "SEEN", 0); | |
fe4da5cc | 338 | |
339 | // --- Define a ghost volume containing a single element of layer #1 | |
340 | // and fill it with air or vacuum | |
341 | ||
342 | dbox1[0] = 0.005+0.01+0.0075; | |
343 | dbox1[1] = .79; | |
344 | dbox1[2] = 12.67; | |
cfce8870 | 345 | gMC->Gsvolu("IPV1", "BOX ", idtmed[203], dbox1, 3); |
fe4da5cc | 346 | |
58005f18 | 347 | //--Divide each element of layer #1 in three ladders along the beam direction |
348 | ||
cfce8870 | 349 | gMC->Gsdvn("IPB1", "IPV1", 3, 3); |
fe4da5cc | 350 | |
351 | // --- Make the ghost volumes invisible | |
352 | ||
cfce8870 | 353 | gMC->Gsatt("IPV1", "SEEN", 0); |
354 | gMC->Gsatt("IPB1", "SEEN", 0); | |
fe4da5cc | 355 | |
58005f18 | 356 | // --- Define a volume containing the chip of pixels (silicon, layer #1) |
357 | ||
358 | dchi[0] = 0.005; | |
359 | dchi[1] = 0.79; | |
fe4da5cc | 360 | dchi[2] = dbox1[2] / 3.; |
cfce8870 | 361 | gMC->Gsvolu("ICH1", "BOX ", idtmed[200], dchi, 3); |
fe4da5cc | 362 | |
363 | // --- Define a volume containing the bus of pixels (silicon, layer #1) | |
364 | ||
58005f18 | 365 | dbus[0] = 0.01; |
366 | dbus[1] = 0.64; | |
fe4da5cc | 367 | dbus[2] = 4.19; |
cfce8870 | 368 | gMC->Gsvolu("IBU1", "BOX ", idtmed[201], dbus, 3); |
fe4da5cc | 369 | |
370 | // --- Define a volume containing the sensitive part of pixels | |
371 | // (silicon, layer #1) | |
372 | ||
58005f18 | 373 | dits[0] = 0.0075; |
374 | dits[1] = 0.64; | |
fe4da5cc | 375 | dits[2] = 4.19; |
cfce8870 | 376 | gMC->Gsvolu("ITS1", "BOX ", idtmed[199], dits, 3); |
58005f18 | 377 | |
fe4da5cc | 378 | // --- Place the chip into its mother (IPB1) |
379 | ||
380 | xpos = dbox1[0] - dchi[0]; | |
58005f18 | 381 | ypos = 0.0; |
382 | zpos = 0.0; | |
cfce8870 | 383 | gMC->Gspos("ICH1", 1, "IPB1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 384 | |
385 | // --- Place the sensitive volume into its mother (IPB1) | |
386 | ||
387 | xpos = dbox1[0] - dchi[0] * 2. - dits[0]; | |
388 | ypos = dchi[1] - dits[1]; | |
389 | zpos = -(dchi[2] - dits[2]); | |
cfce8870 | 390 | gMC->Gspos("ITS1", 1, "IPB1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 391 | |
392 | // --- Place the bus into its mother (IPB1) | |
393 | ||
394 | xpos = dbox1[0] - dchi[0] * 2. - dits[0] * 2. - dbus[0]; | |
395 | ypos = dchi[1] - dbus[1]; | |
396 | zpos = -(dchi[2] - dbus[2]); | |
cfce8870 | 397 | gMC->Gspos("IBU1", 1, "IPB1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 398 | |
399 | // --- Define a ghost volume containing a single element of layer #2 | |
400 | // and fill it with air or vacuum | |
401 | ||
402 | dbox2[0] = 0.005+0.01+0.0075; | |
58005f18 | 403 | dbox2[1] = 0.79; |
fe4da5cc | 404 | dbox2[2] = 16.91; |
cfce8870 | 405 | gMC->Gsvolu("IPV2", "BOX ", idtmed[203], dbox2, 3); |
58005f18 | 406 | |
407 | //--Divide each element of layer #2 in four ladders along the beam direction | |
fe4da5cc | 408 | |
cfce8870 | 409 | gMC->Gsdvn("IPB2", "IPV2", 4, 3); |
fe4da5cc | 410 | |
411 | // --- Make the ghost volumes invisible | |
412 | ||
cfce8870 | 413 | gMC->Gsatt("IPV2", "SEEN", 0); |
414 | gMC->Gsatt("IPB2", "SEEN", 0); | |
fe4da5cc | 415 | |
416 | // --- Define a volume containing the chip of pixels (silicon, layer #2) | |
417 | ||
58005f18 | 418 | dchi[0] = 0.005; |
419 | dchi[1] = 0.79; | |
fe4da5cc | 420 | dchi[2] = dbox2[2] / 4.; |
cfce8870 | 421 | gMC->Gsvolu("ICH2", "BOX ", idtmed[200], dchi, 3); |
58005f18 | 422 | |
fe4da5cc | 423 | // --- Define a volume containing the bus of pixels (silicon, layer #2) |
424 | ||
58005f18 | 425 | dbus[0] = 0.01; |
426 | dbus[1] = 0.64; | |
fe4da5cc | 427 | dbus[2] = 4.19; |
cfce8870 | 428 | gMC->Gsvolu("IBU2", "BOX ", idtmed[201], dbus, 3); |
58005f18 | 429 | |
fe4da5cc | 430 | // --- Define a volume containing the sensitive part of pixels |
431 | // (silicon, layer #2) | |
432 | ||
58005f18 | 433 | dits[0] = 0.0075; |
434 | dits[1] = 0.64; | |
fe4da5cc | 435 | dits[2] = 4.19; |
cfce8870 | 436 | gMC->Gsvolu("ITS2", "BOX ", idtmed[199], dits, 3); |
58005f18 | 437 | |
fe4da5cc | 438 | // --- Place the chip into its mother (IPB2) |
439 | ||
440 | xpos = dbox1[0] - dbus[0] * 2. - dits[0] * 2. - dchi[0]; | |
58005f18 | 441 | ypos = 0.0; |
442 | zpos = 0.0; | |
cfce8870 | 443 | gMC->Gspos("ICH2", 1, "IPB2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 444 | |
445 | // --- Place the sensitive volume into its mother (IPB2) | |
446 | ||
447 | xpos = dbox1[0] - dbus[0] * 2. - dits[0]; | |
448 | ypos = -(dchi[1] - dits[1]); | |
449 | zpos = -(dchi[2] - dits[2]); | |
cfce8870 | 450 | gMC->Gspos("ITS2", 1, "IPB2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 451 | |
452 | // --- Place the bus into its mother (IPB2) | |
453 | ||
454 | xpos = dbox1[0] - dbus[0]; | |
455 | ypos = -(dchi[1] - dbus[1]); | |
456 | zpos = -(dchi[2] - dbus[2]); | |
cfce8870 | 457 | gMC->Gspos("IBU2", 1, "IPB2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 458 | |
459 | // --- Define a generic segment of an element of the mechanical support | |
460 | ||
58005f18 | 461 | dsup[0] = 0.0; |
462 | dsup[1] = 0.0; | |
463 | dsup[2] = 0.0; | |
cfce8870 | 464 | gMC->Gsvolu("SPIX", "BOX ", idtmed[202], dsup, 0); |
fe4da5cc | 465 | |
466 | // --- Define a generic arc of an element of the mechanical support | |
467 | ||
58005f18 | 468 | darc[0] = 0.0; |
469 | darc[1] = 0.0; | |
470 | darc[2] = 0.0; | |
cfce8870 | 471 | gMC->Gsvolu("SARC", "TUBS", idtmed[202], darc, 0); |
fe4da5cc | 472 | |
473 | // --- Define the mechanical supports of layers #1 and #2 and place the | |
474 | // elements of the layers in it | |
475 | ||
476 | jbox1 = 0; | |
477 | // counter over the number of elements of layer #1 ( | |
478 | jbox2 = 0; | |
479 | ||
480 | // counter over the number of elements of layer #2 ( | |
e8189707 | 481 | for (i = 1; i <= 10; ++i) { |
fe4da5cc | 482 | |
483 | // --- Place part # 1-2 (see sketch) | |
484 | ||
485 | // number of carbon fiber supports (see sketch) | |
486 | offset1 = -35.; | |
487 | dsup[0] = .01; | |
b3a22d72 | 488 | dsup[1] = TMath::Sqrt((kxend[0] - kxbeg[0]) * (kxend[0] - kxbeg[0]) + |
489 | (kyend[0] - kybeg[0]) * (kyend[0] - kybeg[0]) ) / 20.; | |
58005f18 | 490 | dsup[2] = 25.0; |
b3a22d72 | 491 | xcc = ( kxx[0] + kxx[1]) / 20.; |
492 | ycc = ( kyy[0] + kyy[1]) / 20.; | |
493 | xccc = (kxbeg[0] + kxend[0]) / 20.; | |
494 | yccc = (kybeg[0] + kyend[0]) / 20.; | |
495 | if (kxx[0] == kxx[1]) { | |
fe4da5cc | 496 | offset2 = 0.; |
497 | } else { | |
b3a22d72 | 498 | r1 = kyy[1] - kyy[0]; |
499 | r2 = kxx[1] - kxx[0]; | |
500 | offset2 = TMath::ATan2(r1, r2) * kraddeg - 90.; | |
501 | } // end if kxx[0] == kxx[1] | |
502 | aphi = (kpphi + (i-1) * 36.) * kdegrad; | |
503 | xzero = krr * TMath::Cos((ktteta + (i-1) * 36.) * kdegrad); | |
504 | yzero = krr * TMath::Sin((ktteta + (i-1) * 36.) * kdegrad); | |
58005f18 | 505 | xpos1 = xccc * TMath::Cos(aphi) - yccc * TMath::Sin(aphi) + xzero; |
506 | ypos1 = xccc * TMath::Sin(aphi) + yccc * TMath::Cos(aphi) + yzero; | |
b3a22d72 | 507 | xpos = xpos1 * TMath::Cos(kgteta * kdegrad) + |
508 | ypos1 * TMath::Sin(kgteta *kdegrad); | |
509 | ypos = -xpos1 * TMath::Sin(kgteta * kdegrad) + | |
510 | ypos1 * TMath::Cos(kgteta * kdegrad); | |
58005f18 | 511 | zpos = 0.0; |
b3a22d72 | 512 | atheta12 = (i-1) * 36. + offset1 + offset2 - kgteta; |
58005f18 | 513 | AliMatrix(idrotm[(i-1) * 13 + 1100], 90., atheta12, 90., |
514 | atheta12 + 90., 0., 0.); | |
515 | gMC->Gsposp("SPIX", (i-1) * 13 + 1, "IT12", xpos, ypos, zpos, | |
516 | idrotm[(i-1) * 13 + 1100], "ONLY", dsup, 3); | |
517 | ||
fe4da5cc | 518 | // --- Place part # 2-3 (see sketch) |
519 | ||
58005f18 | 520 | offset1 = -35.0; |
521 | dsup[0] = 0.01; | |
b3a22d72 | 522 | dsup[1] = TMath::Sqrt((kxend[1] - kxbeg[1]) * (kxend[1] - kxbeg[1]) + |
523 | (kyend[1] - kybeg[1]) * (kyend[1] - kybeg[1])) / 20.; | |
58005f18 | 524 | dsup[2] = 25.0; |
b3a22d72 | 525 | xcc = ( kxx[1] + kxx[2]) / 20.; |
526 | ycc = ( kyy[1] + kyy[2]) / 20.; | |
527 | xccc = (kxbeg[1] + kxend[1]) / 20.; | |
528 | yccc = (kybeg[1] + kyend[1]) / 20.; | |
529 | if (kxx[1] == kxx[2]) { | |
fe4da5cc | 530 | offset2 = 0.; |
531 | } else { | |
b3a22d72 | 532 | r1 = kyy[2] - kyy[1]; |
533 | r2 = kxx[2] - kxx[1]; | |
534 | offset2 = TMath::ATan2(r1, r2) * kraddeg - 90.; | |
535 | } // end if kxx[1] == kxx[2] | |
536 | aphi = (kpphi + (i-1) * 36.) * kdegrad; | |
537 | xzero = krr * TMath::Cos((ktteta + (i-1) * 36.) * kdegrad); | |
538 | yzero = krr * TMath::Sin((ktteta + (i-1) * 36.) * kdegrad); | |
58005f18 | 539 | xpos1 = xccc * TMath::Cos(aphi) - yccc * TMath::Sin(aphi) + xzero; |
540 | ypos1 = xccc * TMath::Sin(aphi) + yccc * TMath::Cos(aphi) + yzero; | |
b3a22d72 | 541 | xpos = xpos1 * TMath::Cos(kgteta * kdegrad) + |
542 | ypos1 * TMath::Sin(kgteta * kdegrad); | |
543 | ypos = -xpos1 * TMath::Sin(kgteta * kdegrad) + | |
544 | ypos1 * TMath::Cos(kgteta * kdegrad); | |
58005f18 | 545 | zpos = 0.0; |
b3a22d72 | 546 | atheta23 = (i-1) * 36. + offset1 + offset2 - kgteta; |
58005f18 | 547 | AliMatrix(idrotm[(i-1) * 13 + 1101], 90., atheta23, 90., |
548 | atheta23 + 90., 0., 0.); | |
549 | gMC->Gsposp("SPIX", (i-1) * 13 + 2, "IT12", xpos, ypos, zpos, | |
550 | idrotm[(i-1) * 13 + 1101], "ONLY", dsup, 3); | |
551 | ||
552 | // --- Place an element of layer #2 | |
553 | ||
b3a22d72 | 554 | biga = (kyy[2] - kyy[1]) / (kxx[2] - kxx[1]); |
555 | bigb = (kxx[2] * kyy[1] - kxx[1] * kyy[2]) / (kxx[2] - kxx[1]) / 10.; | |
fe4da5cc | 556 | coeffa = biga * biga + 1.; |
557 | coeffb = biga * bigb - biga * ycc - xcc; | |
58005f18 | 558 | coeffc = xcc * xcc + ycc * ycc - ycc * 2. * bigb + |
559 | bigb * bigb - 0.08964*0.08964; | |
560 | xcc1 = (-coeffb + TMath::Sqrt(coeffb * coeffb - coeffa * coeffc)) / | |
561 | coeffa; | |
fe4da5cc | 562 | ycc1 = biga * xcc1 + bigb; |
563 | biga1 = -1. / biga; | |
564 | bigb1 = xcc1 / biga + ycc1; | |
565 | coeffa = biga1 * biga1 + 1.; | |
566 | coeffb = biga1 * bigb1 - biga1 * ycc1 - xcc1; | |
58005f18 | 567 | coeffc = xcc1 * xcc1 + ycc1 * ycc1 - ycc1 * 2. * bigb1 + |
568 | bigb1 * bigb1 - (dsup[0] + dbox2[0]) * (dsup[0] + dbox2[0]); | |
569 | xcc2 = (-coeffb + TMath::Sqrt(coeffb * coeffb - coeffa * coeffc)) / | |
570 | coeffa; | |
571 | ycc2 = biga1 * xcc2 + bigb1; | |
572 | xpos1 = xcc2 * TMath::Cos(aphi) - ycc2 * TMath::Sin(aphi) + xzero; | |
573 | ypos1 = xcc2 * TMath::Sin(aphi) + ycc2 * TMath::Cos(aphi) + yzero; | |
b3a22d72 | 574 | xpos = xpos1 * TMath::Cos(kgteta * kdegrad) + |
575 | ypos1 * TMath::Sin(kgteta *kdegrad); | |
576 | ypos = -xpos1 * TMath::Sin(kgteta * kdegrad) + | |
577 | ypos1 * TMath::Cos(kgteta * kdegrad); | |
58005f18 | 578 | zpos = 0.0; |
fe4da5cc | 579 | ++jbox2; |
58005f18 | 580 | gMC->Gspos("IPV2", jbox2, "IT12", xpos, ypos, zpos, |
581 | idrotm[(i-1) * 13 + 1101], "ONLY"); | |
582 | ||
583 | // --- Place part # 3-4 (see sketch) | |
584 | ||
585 | offset1 = -35.0; | |
586 | dsup[0] = 0.01; | |
b3a22d72 | 587 | dsup[1] = TMath::Sqrt((kxend[2] - kxbeg[2]) * (kxend[2] - kxbeg[2]) + |
588 | (kyend[2] - kybeg[2]) * (kyend[2] - kybeg[2])) / 20.; | |
fe4da5cc | 589 | dsup[2] = 25.; |
b3a22d72 | 590 | xcc = (kxx[1] + kxx[2]) / 20.; |
591 | ycc = (kyy[1] + kyy[2]) / 20.; | |
592 | xccc = (kxbeg[2] + kxend[2]) / 20.; | |
593 | yccc = (kybeg[2] + kyend[2]) / 20.; | |
594 | if (kxx[2] == kxx[3]) { | |
fe4da5cc | 595 | offset2 = 0.; |
596 | } else { | |
b3a22d72 | 597 | r1 = kyy[3] - kyy[2]; |
598 | r2 = kxx[3] - kxx[2]; | |
599 | offset2 = TMath::ATan2(r1, r2) * kraddeg - 90.; | |
600 | } // end if kxx[2] == kxx[3] | |
601 | aphi = (kpphi + (i-1) * 36.) * kdegrad; | |
602 | xzero = krr * TMath::Cos((ktteta + (i-1) * 36.) * kdegrad); | |
603 | yzero = krr * TMath::Sin((ktteta + (i-1) * 36.) * kdegrad); | |
58005f18 | 604 | xpos1 = xccc * TMath::Cos(aphi) - yccc * TMath::Sin(aphi) + xzero; |
605 | ypos1 = xccc * TMath::Sin(aphi) + yccc * TMath::Cos(aphi) + yzero; | |
b3a22d72 | 606 | xpos = xpos1 * TMath::Cos(kgteta * kdegrad) + |
607 | ypos1 * TMath::Sin(kgteta *kdegrad); | |
608 | ypos = -xpos1 * TMath::Sin(kgteta * kdegrad) + | |
609 | ypos1 * TMath::Cos(kgteta * kdegrad); | |
58005f18 | 610 | zpos = 0.0; |
b3a22d72 | 611 | atheta34 = (i-1) * 36. + offset1 + offset2 - kgteta; |
58005f18 | 612 | AliMatrix(idrotm[(i-1) * 13 + 1102], 90., atheta34, 90., |
613 | atheta34 + 90., 0., 0.); | |
614 | gMC->Gsposp("SPIX", (i-1) * 13 + 3, "IT12", xpos, ypos, zpos, | |
615 | idrotm[(i-1) * 13 + 1102], "ONLY", dsup, 3); | |
616 | ||
617 | // --- Place part # 4-5 (see sketch) | |
618 | ||
619 | offset1 = -35.0; | |
620 | dsup[0] = 0.01; | |
b3a22d72 | 621 | dsup[1] = TMath::Sqrt((kxend[3] - kxbeg[3]) * (kxend[3] - kxbeg[3]) + |
622 | (kyend[3] - kybeg[3]) * (kyend[3] - kybeg[3])) / 20.; | |
58005f18 | 623 | dsup[2] = 25.0; |
b3a22d72 | 624 | xcc = ( kxx[3] + kxx[4]) / 20.; |
625 | ycc = ( kyy[3] + kyy[4]) / 20.; | |
626 | xccc = (kxbeg[3] + kxend[3]) / 20.; | |
627 | yccc = (kybeg[3] + kyend[3]) / 20.; | |
628 | if (kxx[3] == kxx[4]) { | |
fe4da5cc | 629 | offset2 = 0.; |
630 | } else { | |
b3a22d72 | 631 | r1 = kyy[4] - kyy[3]; |
632 | r2 = kxx[4] - kxx[3]; | |
633 | offset2 = TMath::ATan2(r1, r2) * kraddeg - 90.; | |
634 | } // end if kxx[3] == kxx[4] | |
635 | aphi = (kpphi + (i-1) * 36.) * kdegrad; | |
636 | xzero = krr * TMath::Cos((ktteta + (i-1) * 36.) * kdegrad); | |
637 | yzero = krr * TMath::Sin((ktteta + (i-1) * 36.) * kdegrad); | |
58005f18 | 638 | xpos1 = xccc * TMath::Cos(aphi) - yccc * TMath::Sin(aphi) + xzero; |
639 | ypos1 = xccc * TMath::Sin(aphi) + yccc * TMath::Cos(aphi) + yzero; | |
b3a22d72 | 640 | xpos = xpos1 * TMath::Cos(kgteta * kdegrad) + |
641 | ypos1 * TMath::Sin(kgteta *kdegrad); | |
642 | ypos = -xpos1 * TMath::Sin(kgteta * kdegrad) + | |
643 | ypos1 * TMath::Cos(kgteta * kdegrad); | |
58005f18 | 644 | zpos = 0.0; |
b3a22d72 | 645 | atheta45 = (i-1) * 36. + offset1 + offset2 - kgteta; |
58005f18 | 646 | AliMatrix(idrotm[(i-1) * 13 + 1103], 90., atheta45, 90., |
647 | atheta45 + 90., 0., 0.); | |
648 | gMC->Gsposp("SPIX", (i-1) * 13 + 4, "IT12", xpos, ypos, zpos, | |
649 | idrotm[(i-1) * 13 + 1103], "ONLY", dsup, 3); | |
650 | ||
651 | // --- Place an element of layer #2 | |
652 | ||
b3a22d72 | 653 | biga = (kyy[4] - kyy[3]) / (kxx[4] - kxx[3]); |
654 | bigb = (kxx[4] * kyy[3] - kxx[3] * kyy[4]) / (kxx[4] - kxx[3]) / 10.; | |
fe4da5cc | 655 | coeffa = biga * biga + 1.; |
656 | coeffb = biga * bigb - biga * ycc - xcc; | |
58005f18 | 657 | coeffc = xcc * xcc + ycc * ycc - ycc * 2. * bigb + |
658 | bigb * bigb - .014285030400000001; | |
659 | xcc1 = (-coeffb - TMath::Sqrt(coeffb * coeffb - coeffa * coeffc)) / | |
660 | coeffa; | |
fe4da5cc | 661 | ycc1 = biga * xcc1 + bigb; |
662 | biga1 = -1. / biga; | |
663 | bigb1 = xcc1 / biga + ycc1; | |
664 | coeffa = biga1 * biga1 + 1.; | |
665 | coeffb = biga1 * bigb1 - biga1 * ycc1 - xcc1; | |
58005f18 | 666 | coeffc = xcc1 * xcc1 + ycc1 * ycc1 - ycc1 * 2. * bigb1 + |
667 | bigb1 * bigb1 - (dsup[0] + dbox2[0]) * (dsup[0] + dbox2[0]); | |
668 | xcc2 = (-coeffb + TMath::Sqrt(coeffb * coeffb - coeffa * coeffc)) / | |
669 | coeffa; | |
670 | ycc2 = biga1 * xcc2 + bigb1; | |
671 | xpos1 = xcc2 * TMath::Cos(aphi) - ycc2 * TMath::Sin(aphi) + xzero; | |
672 | ypos1 = xcc2 * TMath::Sin(aphi) + ycc2 * TMath::Cos(aphi) + yzero; | |
b3a22d72 | 673 | xpos = xpos1 * TMath::Cos(kgteta * kdegrad) + |
674 | ypos1 * TMath::Sin(kgteta *kdegrad); | |
675 | ypos = -xpos1 * TMath::Sin(kgteta * kdegrad) + | |
676 | ypos1 * TMath::Cos(kgteta * kdegrad); | |
58005f18 | 677 | zpos = 0.0; |
fe4da5cc | 678 | ++jbox2; |
58005f18 | 679 | gMC->Gspos("IPV2", jbox2, "IT12", xpos, ypos, zpos, |
680 | idrotm[(i-1) * 13 + 1103], "ONLY"); | |
681 | ||
fe4da5cc | 682 | // --- Place part # 5-6 (see sketch) |
683 | ||
684 | offset1 = -35.; | |
685 | dsup[0] = .01; | |
b3a22d72 | 686 | dsup[1] = TMath::Sqrt((kxend[4] - kxbeg[4]) * (kxend[4] - kxbeg[4]) + |
687 | (kyend[4] - kybeg[4]) * (kyend[4] - kybeg[4])) / 20.; | |
fe4da5cc | 688 | dsup[2] = 25.; |
b3a22d72 | 689 | xcc = (kxx[4] + kxx[5]) / 20.; |
690 | ycc = (kyy[4] + kyy[5]) / 20.; | |
691 | xccc = (kxbeg[4] + kxend[4]) / 20.; | |
692 | yccc = (kybeg[4] + kyend[4]) / 20.; | |
693 | if (kxx[4] == kxx[5]) { | |
fe4da5cc | 694 | offset2 = 0.; |
695 | } else { | |
b3a22d72 | 696 | r1 = kyy[5] - kyy[4]; |
697 | r2 = kxx[5] - kxx[4]; | |
698 | offset2 = TMath::ATan2(r1, r2) * kraddeg - 90.; | |
fe4da5cc | 699 | } |
b3a22d72 | 700 | aphi = (kpphi + (i-1) * 36.) * kdegrad; |
701 | xzero = krr * TMath::Cos((ktteta + (i-1) * 36.) * kdegrad); | |
702 | yzero = krr * TMath::Sin((ktteta + (i-1) * 36.) * kdegrad); | |
58005f18 | 703 | xpos1 = xccc * TMath::Cos(aphi) - yccc * TMath::Sin(aphi) + xzero; |
704 | ypos1 = xccc * TMath::Sin(aphi) + yccc * TMath::Cos(aphi) + yzero; | |
b3a22d72 | 705 | xpos = xpos1 * TMath::Cos(kgteta * kdegrad) + |
706 | ypos1 * TMath::Sin(kgteta *kdegrad); | |
707 | ypos = -xpos1 * TMath::Sin(kgteta * kdegrad) + | |
708 | ypos1 * TMath::Cos(kgteta * kdegrad); | |
fe4da5cc | 709 | zpos = 0.; |
b3a22d72 | 710 | atheta56 = (i-1) * 36. + offset1 + offset2 - kgteta; |
58005f18 | 711 | AliMatrix(idrotm[(i-1) * 13 + 1104], 90., atheta56, 90., |
712 | atheta56 + 90., 0., 0.); | |
713 | gMC->Gsposp("SPIX", (i-1) * 13 + 5, "IT12", xpos, ypos, zpos, | |
714 | idrotm[(i-1) * 13 + 1104], "ONLY", dsup, 3); | |
715 | ||
fe4da5cc | 716 | // --- Place part # 6-7 (see sketch) |
717 | ||
58005f18 | 718 | offset1 = -35.0; |
719 | dsup[0] = 0.01; | |
b3a22d72 | 720 | dsup[1] = TMath::Sqrt((kxend[5] - kxbeg[5]) * (kxend[5] - kxbeg[5]) + |
721 | (kyend[5] - kybeg[5]) * (kyend[5] - kybeg[5])) / 20.; | |
58005f18 | 722 | dsup[2] = 25.0; |
b3a22d72 | 723 | xcc = (kxx[5] + kxx[6]) / 20.; |
724 | ycc = (kyy[5] + kyy[6]) / 20.; | |
725 | xccc = (kxbeg[5] + kxend[5]) / 20.; | |
726 | yccc = (kybeg[5] + kyend[5]) / 20.; | |
727 | if (kxx[5] == kxx[6]) { | |
fe4da5cc | 728 | offset2 = 0.; |
729 | } else { | |
b3a22d72 | 730 | r1 = kyy[6] - kyy[5]; |
731 | r2 = kxx[6] - kxx[5]; | |
732 | offset2 = TMath::ATan2(r1, r2) * kraddeg - 90.; | |
733 | } // end if kxx[5] == kxx[6] | |
734 | aphi = (kpphi + (i-1) * 36.) * kdegrad; | |
735 | xzero = krr * TMath::Cos((ktteta + (i-1) * 36.) * kdegrad); | |
736 | yzero = krr * TMath::Sin((ktteta + (i-1) * 36.) * kdegrad); | |
58005f18 | 737 | xpos1 = xccc * TMath::Cos(aphi) - yccc * TMath::Sin(aphi) + xzero; |
738 | ypos1 = xccc * TMath::Sin(aphi) + yccc * TMath::Cos(aphi) + yzero; | |
b3a22d72 | 739 | xpos = xpos1 * TMath::Cos(kgteta * kdegrad) + |
740 | ypos1 * TMath::Sin(kgteta *kdegrad); | |
741 | ypos = -xpos1 * TMath::Sin(kgteta * kdegrad) + | |
742 | ypos1 * TMath::Cos(kgteta * kdegrad); | |
fe4da5cc | 743 | zpos = 0.; |
b3a22d72 | 744 | atheta67 = (i-1) * 36. + offset1 + offset2 - kgteta; |
58005f18 | 745 | AliMatrix(idrotm[(i-1) * 13 + 1105], 90., atheta67, 90., |
746 | atheta67 + 90., 0., 0.); | |
747 | gMC->Gsposp("SPIX", (i-1) * 13 + 6, "IT12", xpos, ypos, zpos, | |
748 | idrotm[(i-1) * 13 + 1105], "ONLY", dsup, 3); | |
749 | ||
fe4da5cc | 750 | // --- Place an element of layer #2 |
751 | ||
b3a22d72 | 752 | biga = (kyy[6] - kyy[5]) / (kxx[6] - kxx[5]); |
753 | bigb = (kxx[6] * kyy[5] - kxx[5] * kyy[6]) / (kxx[6] - kxx[5]) / 10.; | |
fe4da5cc | 754 | coeffa = biga * biga + 1.; |
755 | coeffb = biga * bigb - biga * ycc - xcc; | |
58005f18 | 756 | coeffc = xcc * xcc + ycc * ycc - ycc * 2. * bigb + |
757 | bigb * bigb - .014285030400000001; | |
758 | xcc1 = (-coeffb - TMath::Sqrt(coeffb * coeffb - coeffa * coeffc)) / | |
759 | coeffa; | |
fe4da5cc | 760 | ycc1 = biga * xcc1 + bigb; |
761 | biga1 = -1. / biga; | |
762 | bigb1 = xcc1 / biga + ycc1; | |
763 | coeffa = biga1 * biga1 + 1.; | |
764 | coeffb = biga1 * bigb1 - biga1 * ycc1 - xcc1; | |
58005f18 | 765 | coeffc = xcc1 * xcc1 + ycc1 * ycc1 - ycc1 * 2. * bigb1 + |
766 | bigb1 * bigb1 - (dsup[0] + dbox2[0]) * (dsup[0] + dbox2[0]); | |
767 | xcc2 = (-coeffb - TMath::Sqrt(coeffb * coeffb - coeffa * coeffc)) / | |
768 | coeffa; | |
769 | ycc2 = biga1 * xcc2 + bigb1; | |
770 | xpos1 = xcc2 * TMath::Cos(aphi) - ycc2 * TMath::Sin(aphi) + xzero; | |
771 | ypos1 = xcc2 * TMath::Sin(aphi) + ycc2 * TMath::Cos(aphi) + yzero; | |
b3a22d72 | 772 | xpos = xpos1 * TMath::Cos(kgteta * kdegrad) + |
773 | ypos1 * TMath::Sin(kgteta *kdegrad); | |
774 | ypos = -xpos1 * TMath::Sin(kgteta * kdegrad) + | |
775 | ypos1 * TMath::Cos(kgteta * kdegrad); | |
58005f18 | 776 | zpos = 0.0; |
fe4da5cc | 777 | ++jbox2; |
58005f18 | 778 | gMC->Gspos("IPV2", jbox2, "IT12", xpos, ypos, zpos, |
779 | idrotm[(i-1) * 13 + 1105], "ONLY"); | |
fe4da5cc | 780 | |
781 | // --- Place part # 7-8 (see sketch) | |
782 | ||
783 | offset1 = -35.; | |
784 | dsup[0] = .01; | |
b3a22d72 | 785 | dsup[1] = TMath::Sqrt((kxend[6] - kxbeg[6]) * (kxend[6] - kxbeg[6]) + |
786 | (kyend[6] - kybeg[6]) * (kyend[6] - kybeg[6])) / 20.; | |
fe4da5cc | 787 | dsup[2] = 25.; |
b3a22d72 | 788 | xcc = (kxx[6] + kxx[7]) / 20.; |
789 | ycc = (kyy[6] + kyy[7]) / 20.; | |
790 | xccc = (kxbeg[6] + kxend[6]) / 20.; | |
791 | yccc = (kybeg[6] + kyend[6]) / 20.; | |
792 | if (kxx[6] == kxx[7]) { | |
fe4da5cc | 793 | offset2 = 0.; |
794 | } else { | |
b3a22d72 | 795 | r1 = kyy[7] - kyy[6]; |
796 | r2 = kxx[7] - kxx[6]; | |
797 | offset2 = TMath::ATan2(r1, r2) * kraddeg - 90.; | |
58005f18 | 798 | } // end if |
b3a22d72 | 799 | aphi = (kpphi + (i-1) * 36.) * kdegrad; |
800 | xzero = krr * TMath::Cos((ktteta + (i-1) * 36.) * kdegrad); | |
801 | yzero = krr * TMath::Sin((ktteta + (i-1) * 36.) * kdegrad); | |
58005f18 | 802 | xpos1 = xccc * TMath::Cos(aphi) - yccc * TMath::Sin(aphi) + xzero; |
803 | ypos1 = xccc * TMath::Sin(aphi) + yccc * TMath::Cos(aphi) + yzero; | |
b3a22d72 | 804 | xpos = xpos1 * TMath::Cos(kgteta * kdegrad) + |
805 | ypos1 * TMath::Sin(kgteta *kdegrad); | |
806 | ypos = -xpos1 * TMath::Sin(kgteta * kdegrad) + | |
807 | ypos1 * TMath::Cos(kgteta * kdegrad); | |
fe4da5cc | 808 | zpos = 0.; |
b3a22d72 | 809 | atheta78 = (i-1) * 36. + offset1 + offset2 - kgteta; |
58005f18 | 810 | AliMatrix(idrotm[(i-1) * 13 + 1106], 90., atheta78, 90., |
811 | atheta78 + 90., 0., 0.); | |
812 | gMC->Gsposp("SPIX", (i-1) * 13 + 7, "IT12", xpos, ypos, zpos, | |
813 | idrotm[(i-1) * 13 + 1106], "ONLY", dsup, 3); | |
fe4da5cc | 814 | |
815 | // --- Place part # 8-9 (see sketch) | |
816 | ||
817 | offset1 = -35.; | |
818 | dsup[0] = .01; | |
b3a22d72 | 819 | dsup[1] = TMath::Sqrt((kxend[7] - kxbeg[7]) * (kxend[7] - kxbeg[7]) + |
820 | (kyend[7] - kybeg[7]) * (kyend[7] - kybeg[7])) / 20.; | |
fe4da5cc | 821 | dsup[2] = 25.; |
b3a22d72 | 822 | xcc = (kxx[7] + kxx[8]) / 20.; |
823 | ycc = (kyy[7] + kyy[8]) / 20.; | |
824 | xccc = (kxbeg[7] + kxend[7]) / 20.; | |
825 | yccc = (kybeg[7] + kyend[7]) / 20.; | |
826 | if (kxx[1] == kxx[2]) { | |
fe4da5cc | 827 | offset2 = 0.; |
828 | } else { | |
b3a22d72 | 829 | r1 = kyy[8] - kyy[7]; |
830 | r2 = kxx[8] - kxx[7]; | |
831 | offset2 = TMath::ATan2(r1, r2) * kraddeg - 90.; | |
fe4da5cc | 832 | } |
b3a22d72 | 833 | aphi = (kpphi + (i-1) * 36.) * kdegrad; |
834 | xzero = krr * TMath::Cos((ktteta + (i-1) * 36.) * kdegrad); | |
835 | yzero = krr * TMath::Sin((ktteta + (i-1) * 36.) * kdegrad); | |
58005f18 | 836 | xpos1 = xccc * TMath::Cos(aphi) - yccc * TMath::Sin(aphi) + xzero; |
837 | ypos1 = xccc * TMath::Sin(aphi) + yccc * TMath::Cos(aphi) + yzero; | |
b3a22d72 | 838 | xpos = xpos1 * TMath::Cos(kgteta * kdegrad) + |
839 | ypos1 * TMath::Sin(kgteta *kdegrad); | |
840 | ypos = -xpos1 * TMath::Sin(kgteta * kdegrad) + | |
841 | ypos1 * TMath::Cos(kgteta * kdegrad); | |
fe4da5cc | 842 | zpos = 0.; |
b3a22d72 | 843 | atheta89 = (i-1) * 36. + offset1 + offset2 - kgteta; |
58005f18 | 844 | AliMatrix(idrotm[(i-1) * 13 + 1107], 90., atheta89, 90., |
845 | atheta89 + 90., 0., 0.); | |
846 | gMC->Gsposp("SPIX", (i-1) * 13 + 8, "IT12", xpos, ypos, zpos, | |
847 | idrotm[(i-1) * 13 + 1107], "ONLY", dsup, 3); | |
fe4da5cc | 848 | |
849 | // --- Place an element of layer #2 | |
850 | ||
b3a22d72 | 851 | biga = (kyy[8] - kyy[7]) / (kxx[8] - kxx[7]); |
852 | bigb = (kxx[8] * kyy[7] - kxx[7] * kyy[8]) / (kxx[8] - kxx[7]) / 10.; | |
fe4da5cc | 853 | coeffa = biga * biga + 1.; |
854 | coeffb = biga * bigb - biga * ycc - xcc; | |
58005f18 | 855 | coeffc = xcc * xcc + ycc * ycc - ycc * 2. * bigb + |
856 | bigb * bigb - .014285030400000001; | |
857 | xcc1 = (-coeffb - TMath::Sqrt(coeffb * coeffb - coeffa * coeffc)) / | |
858 | coeffa; | |
fe4da5cc | 859 | ycc1 = biga * xcc1 + bigb; |
860 | biga1 = -1. / biga; | |
861 | bigb1 = xcc1 / biga + ycc1; | |
862 | coeffa = biga1 * biga1 + 1.; | |
863 | coeffb = biga1 * bigb1 - biga1 * ycc1 - xcc1; | |
58005f18 | 864 | coeffc = xcc1 * xcc1 + ycc1 * ycc1 - ycc1 * 2. * bigb1 + |
865 | bigb1 * bigb1 - (dsup[0] + dbox2[0]) * (dsup[0] + dbox2[0]); | |
866 | xcc2 = (-coeffb - TMath::Sqrt(coeffb * coeffb - coeffa * coeffc)) / | |
867 | coeffa; | |
868 | ycc2 = biga1 * xcc2 + bigb1; | |
869 | xpos1 = xcc2 * TMath::Cos(aphi) - ycc2 * TMath::Sin(aphi) + xzero; | |
870 | ypos1 = xcc2 * TMath::Sin(aphi) + ycc2 * TMath::Cos(aphi) + yzero; | |
b3a22d72 | 871 | xpos = xpos1 * TMath::Cos(kgteta * kdegrad) + |
872 | ypos1 * TMath::Sin(kgteta *kdegrad); | |
873 | ypos = -xpos1 * TMath::Sin(kgteta * kdegrad) + | |
874 | ypos1 * TMath::Cos(kgteta * kdegrad); | |
58005f18 | 875 | zpos = 0.0; |
fe4da5cc | 876 | ++jbox2; |
58005f18 | 877 | gMC->Gspos("IPV2", jbox2, "IT12", xpos, ypos, zpos, |
878 | idrotm[(i-1) * 13 + 1107], "ONLY"); | |
879 | ||
fe4da5cc | 880 | // --- Place part # 9-10 (see sketch) |
881 | ||
882 | offset1 = -35.; | |
883 | dsup[0] = .01; | |
b3a22d72 | 884 | dsup[1] = TMath::Sqrt((kxend[8] - kxbeg[8]) * (kxend[8] - kxbeg[8]) + |
885 | (kyend[8] - kybeg[8]) * (kyend[8] - kybeg[8])) / 20.; | |
fe4da5cc | 886 | dsup[2] = 25.; |
b3a22d72 | 887 | xcc = (kxx[8] + kxx[9]) / 20.; |
888 | ycc = (kyy[8] + kyy[9]) / 20.; | |
889 | xccc = (kxbeg[8] + kxend[8]) / 20.; | |
890 | yccc = (kybeg[8] + kyend[8]) / 20.; | |
891 | if (kxx[8] == kxx[9]) { | |
fe4da5cc | 892 | offset2 = 0.; |
893 | } else { | |
b3a22d72 | 894 | r1 = kyy[9] - kyy[8]; |
895 | r2 = kxx[9] - kxx[8]; | |
896 | offset2 = TMath::ATan2(r1, r2) * kraddeg - 90.; | |
fe4da5cc | 897 | } |
b3a22d72 | 898 | aphi = (kpphi + (i-1) * 36.) * kdegrad; |
899 | xzero = krr * TMath::Cos((ktteta + (i-1) * 36.) * kdegrad); | |
900 | yzero = krr * TMath::Sin((ktteta + (i-1) * 36.) * kdegrad); | |
fe4da5cc | 901 | xpos1 = xccc * TMath::Cos(aphi) - yccc * TMath::Sin(aphi) + xzero; |
902 | ypos1 = xccc * TMath::Sin(aphi) + yccc * TMath::Cos(aphi) + yzero; | |
b3a22d72 | 903 | xpos = xpos1 * TMath::Cos(kgteta * kdegrad) + ypos1 * TMath::Sin(kgteta *kdegrad); |
904 | ypos = -xpos1 * TMath::Sin(kgteta * kdegrad) + ypos1 * TMath::Cos(kgteta * kdegrad); | |
fe4da5cc | 905 | zpos = 0.; |
b3a22d72 | 906 | atheta910 = (i-1) * 36. + offset1 + offset2 - kgteta; |
fe4da5cc | 907 | AliMatrix(idrotm[(i-1) * 13 + 1108], 90., atheta910, 90., atheta910 + 90., 0., 0.); |
cfce8870 | 908 | gMC->Gsposp("SPIX", (i-1) * 13 + 9, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1108], "ONLY", dsup, 3); |
fe4da5cc | 909 | |
910 | // --- Place part # 10-11 (see sketch) | |
911 | ||
912 | offset1 = -35.; | |
913 | dsup[0] = .01; | |
b3a22d72 | 914 | dsup[1] = TMath::Sqrt((kxend[9] - kxbeg[9]) * (kxend[9] - kxbeg[9]) + (kyend[9] - kybeg[9]) * (kyend[9] - kybeg[9])) / 20.; |
fe4da5cc | 915 | dsup[2] = 25.; |
b3a22d72 | 916 | xcc = (kxx[9] + kxx[10]) / 20.; |
917 | ycc = (kyy[9] + kyy[10]) / 20.; | |
918 | xccc = (kxbeg[9] + kxend[9]) / 20.; | |
919 | yccc = (kybeg[9] + kyend[9]) / 20.; | |
920 | if (kxx[9] == kxx[10]) { | |
fe4da5cc | 921 | offset2 = 0.; |
922 | } else { | |
b3a22d72 | 923 | r1 = kyy[10] - kyy[9]; |
924 | r2 = kxx[10] - kxx[9]; | |
925 | offset2 = TMath::ATan2(r1, r2) * kraddeg - 90.; | |
fe4da5cc | 926 | } |
b3a22d72 | 927 | aphi = (kpphi + (i-1) * 36.) * kdegrad; |
928 | xzero = krr * TMath::Cos((ktteta + (i-1) * 36.) * kdegrad); | |
929 | yzero = krr * TMath::Sin((ktteta + (i-1) * 36.) * kdegrad); | |
fe4da5cc | 930 | xpos1 = xccc * TMath::Cos(aphi) - yccc * TMath::Sin(aphi) + xzero; |
931 | ypos1 = xccc * TMath::Sin(aphi) + yccc * TMath::Cos(aphi) + yzero; | |
b3a22d72 | 932 | xpos = xpos1 * TMath::Cos(kgteta * kdegrad) + ypos1 * TMath::Sin(kgteta *kdegrad); |
933 | ypos = -xpos1 * TMath::Sin(kgteta * kdegrad) + ypos1 * TMath::Cos(kgteta * kdegrad); | |
fe4da5cc | 934 | zpos = 0.; |
b3a22d72 | 935 | atheta1011 = (i-1) * 36. + offset1 + offset2 - kgteta; |
fe4da5cc | 936 | AliMatrix(idrotm[(i-1) * 13 + 1109], 90., atheta1011, 90.,atheta1011 + 90., 0., 0.); |
cfce8870 | 937 | gMC->Gsposp("SPIX", (i-1) * 13 + 10, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1109], "ONLY", dsup, 3); |
fe4da5cc | 938 | |
939 | // --- Place part # 13-14 (see sketch) | |
940 | ||
941 | offset1 = -35.; | |
942 | dsup[0] = .01; | |
b3a22d72 | 943 | dsup[1] = TMath::Sqrt((kxend[12] - kxbeg[12]) * (kxend[12] - kxbeg[12]) + (kyend[12] - kybeg[12]) * (kyend[12] - kybeg[12])) / 20.; |
fe4da5cc | 944 | dsup[2] = 25.; |
b3a22d72 | 945 | xcc = (kxx[12] + kxx[13]) / 20.; |
946 | ycc = (kyy[12] + kyy[13]) / 20.; | |
947 | xccc = (kxbeg[12] + kxend[12]) / 20.; | |
948 | yccc = (kybeg[12] + kyend[12]) / 20.; | |
949 | if (kxx[12] == kxx[13]) { | |
fe4da5cc | 950 | offset2 = 0.; |
951 | } else { | |
b3a22d72 | 952 | r1 = kyy[12] - kyy[13]; |
953 | r2 = kxx[12] - kxx[13]; | |
954 | offset2 = TMath::ATan2(r1, r2) * kraddeg - 90.; | |
fe4da5cc | 955 | } |
b3a22d72 | 956 | aphi = (kpphi + (i-1) * 36.) * kdegrad; |
957 | xzero = krr * TMath::Cos((ktteta + (i-1) * 36.) * kdegrad); | |
958 | yzero = krr * TMath::Sin((ktteta + (i-1) * 36.) * kdegrad); | |
fe4da5cc | 959 | xpos1 = xccc * TMath::Cos(aphi) - yccc * TMath::Sin(aphi) + xzero; |
960 | ypos1 = xccc * TMath::Sin(aphi) + yccc * TMath::Cos(aphi) + yzero; | |
b3a22d72 | 961 | xpos = xpos1 * TMath::Cos(kgteta * kdegrad) + ypos1 * TMath::Sin(kgteta *kdegrad); |
962 | ypos = -xpos1 * TMath::Sin(kgteta * kdegrad) + ypos1 * TMath::Cos(kgteta * kdegrad); | |
fe4da5cc | 963 | zpos = 0.; |
b3a22d72 | 964 | atheta1314 = (i-1) * 36. + offset1 + offset2 - kgteta; |
fe4da5cc | 965 | AliMatrix(idrotm[(i-1) * 13 + 1112], 90., atheta1314, 90.,atheta1314 + 90., 0., 0.); |
cfce8870 | 966 | gMC->Gsposp("SPIX", (i-1) * 13 + 13, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1112], "ONLY", dsup, 3); |
fe4da5cc | 967 | |
968 | // --- Place an element of layer #1 | |
969 | ||
b3a22d72 | 970 | biga = (kyy[13] - kyy[12]) / (kxx[13] - kxx[12]); |
971 | bigb = (kxx[13] * kyy[12] - kxx[12] * kyy[13]) / (kxx[13] - kxx[12]) / 10.; | |
fe4da5cc | 972 | coeffa = biga * biga + 1.; |
973 | coeffb = biga * bigb - biga * ycc - xcc; | |
974 | coeffc = xcc * xcc + ycc * ycc - ycc * 2. * bigb + bigb * bigb - .050216328100000006; | |
975 | xcc1 = (-coeffb + TMath::Sqrt(coeffb * coeffb - coeffa * coeffc)) / coeffa; | |
976 | ycc1 = biga * xcc1 + bigb; | |
977 | biga1 = -1. / biga; | |
978 | bigb1 = xcc1 / biga + ycc1; | |
979 | coeffa = biga1 * biga1 + 1.; | |
980 | coeffb = biga1 * bigb1 - biga1 * ycc1 - xcc1; | |
981 | coeffc = xcc1 * xcc1 + ycc1 * ycc1 - ycc1 * 2. * bigb1 + bigb1 * bigb1 - (dsup[0] + dbox1[0]) * (dsup[0] + dbox1[0]); | |
982 | xcc2 = (-coeffb + TMath::Sqrt(coeffb * coeffb - coeffa * coeffc)) / coeffa; | |
983 | ycc2 = biga1 * xcc2 + bigb1; | |
984 | xpos1 = xcc2 * TMath::Cos(aphi) - ycc2 * TMath::Sin(aphi) + xzero; | |
985 | ypos1 = xcc2 * TMath::Sin(aphi) + ycc2 * TMath::Cos(aphi) + yzero; | |
b3a22d72 | 986 | xpos = xpos1 * TMath::Cos(kgteta * kdegrad) + ypos1 * TMath::Sin(kgteta *kdegrad); |
987 | ypos = -xpos1 * TMath::Sin(kgteta * kdegrad) + ypos1 * TMath::Cos(kgteta * kdegrad); | |
fe4da5cc | 988 | zpos = 0.; |
989 | ++jbox1; | |
cfce8870 | 990 | gMC->Gspos("IPV1", jbox1, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1112], "ONLY"); |
fe4da5cc | 991 | |
992 | // --- Place part # 12-13 (see sketch) | |
993 | ||
994 | offset1 = -35.; | |
995 | dsup[0] = .01; | |
b3a22d72 | 996 | dsup[1] = TMath::Sqrt((kxend[11] - kxbeg[11]) * (kxend[11] - kxbeg[11]) + (kyend[11] - kybeg[11]) * (kyend[11] - kybeg[11])) / 20.; |
fe4da5cc | 997 | dsup[2] = 25.; |
b3a22d72 | 998 | xcc = (kxx[11] + kxx[12]) / 20.; |
999 | ycc = (kyy[11] + kyy[12]) / 20.; | |
1000 | xccc = (kxbeg[11] + kxend[11]) / 20.; | |
1001 | yccc = (kybeg[11] + kyend[11]) / 20.; | |
1002 | if (kxx[11] == kxx[12]) { | |
fe4da5cc | 1003 | offset2 = 0.; |
1004 | } else { | |
b3a22d72 | 1005 | r1 = kyy[12] - kyy[11]; |
1006 | r2 = kxx[12] - kxx[11]; | |
1007 | offset2 = TMath::ATan2(r1, r2) * kraddeg - 90.; | |
fe4da5cc | 1008 | } |
b3a22d72 | 1009 | aphi = (kpphi + (i-1) * 36.) * kdegrad; |
1010 | xzero = krr * TMath::Cos((ktteta + (i-1) * 36.) * kdegrad); | |
1011 | yzero = krr * TMath::Sin((ktteta + (i-1) * 36.) * kdegrad); | |
fe4da5cc | 1012 | xpos1 = xccc * TMath::Cos(aphi) - yccc * TMath::Sin(aphi) + xzero; |
1013 | ypos1 = xccc * TMath::Sin(aphi) + yccc * TMath::Cos(aphi) + yzero; | |
b3a22d72 | 1014 | xpos = xpos1 * TMath::Cos(kgteta * kdegrad) + ypos1 * TMath::Sin(kgteta *kdegrad); |
1015 | ypos = -xpos1 * TMath::Sin(kgteta * kdegrad) + ypos1 * TMath::Cos(kgteta * kdegrad); | |
fe4da5cc | 1016 | zpos = 0.; |
b3a22d72 | 1017 | atheta1213 = (i-1) * 36. + offset1 + offset2 - kgteta; |
fe4da5cc | 1018 | AliMatrix(idrotm[(i-1) * 13 + 1111], 90., atheta1213, 90.,atheta1213 + 90., 0., 0.); |
cfce8870 | 1019 | gMC->Gsposp("SPIX", (i-1) * 13 + 12, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1111], "ONLY", dsup, 3); |
fe4da5cc | 1020 | |
1021 | // --- Place part # 11-12 (see sketch) | |
1022 | ||
1023 | offset1 = -35.; | |
1024 | dsup[0] = .01; | |
b3a22d72 | 1025 | dsup[1] = TMath::Sqrt((kxend[10] - kxbeg[10]) * (kxend[10] - kxbeg[10]) + (kyend[10] - kybeg[10]) * (kyend[10] - kybeg[10])) / 20.; |
fe4da5cc | 1026 | dsup[2] = 25.; |
b3a22d72 | 1027 | xcc = (kxx[10] + kxx[11]) / 20.; |
1028 | ycc = (kyy[10] + kyy[11]) / 20.; | |
1029 | xccc = (kxbeg[10] + kxend[10]) / 20.; | |
1030 | yccc = (kybeg[10] + kyend[10]) / 20.; | |
1031 | if (kxx[10] == kxx[11]) { | |
fe4da5cc | 1032 | offset2 = 0.; |
1033 | } else { | |
b3a22d72 | 1034 | r1 = kyy[11] - kyy[10]; |
1035 | r2 = kxx[11] - kxx[10]; | |
1036 | offset2 = TMath::ATan2(r1, r2) * kraddeg - 90.; | |
fe4da5cc | 1037 | } |
b3a22d72 | 1038 | aphi = (kpphi + (i-1) * 36.) * kdegrad; |
1039 | xzero = krr * TMath::Cos((ktteta + (i-1) * 36.) * kdegrad); | |
1040 | yzero = krr * TMath::Sin((ktteta + (i-1) * 36.) * kdegrad); | |
fe4da5cc | 1041 | xpos1 = xccc * TMath::Cos(aphi) - yccc * TMath::Sin(aphi) + xzero; |
1042 | ypos1 = xccc * TMath::Sin(aphi) + yccc * TMath::Cos(aphi) + yzero; | |
b3a22d72 | 1043 | xpos = xpos1 * TMath::Cos(kgteta * kdegrad) + ypos1 * TMath::Sin(kgteta *kdegrad); |
1044 | ypos = -xpos1 * TMath::Sin(kgteta * kdegrad) + ypos1 * TMath::Cos(kgteta * kdegrad); | |
fe4da5cc | 1045 | zpos = 0.; |
b3a22d72 | 1046 | atheta1112 = (i-1) * 36. + offset1 + offset2 - kgteta; |
fe4da5cc | 1047 | AliMatrix(idrotm[(i-1) * 13 + 1110], 270., atheta1112, 90., atheta1112 + 270., 0., 0.); |
cfce8870 | 1048 | gMC->Gsposp("SPIX", (i-1) * 13 + 11, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1110], "ONLY", dsup, 3); |
fe4da5cc | 1049 | |
1050 | // --- Place an element of layer #1 | |
1051 | ||
b3a22d72 | 1052 | biga = (kyy[11] - kyy[10]) / (kxx[11] - kxx[10]); |
1053 | bigb = (kxx[11] * kyy[10] - kxx[10] * kyy[11]) / (kxx[11] - kxx[10]) / 10.; | |
fe4da5cc | 1054 | coeffa = biga * biga + 1.; |
1055 | coeffb = biga * bigb - biga * ycc - xcc; | |
1056 | coeffc = xcc * xcc + ycc * ycc - ycc * 2. * bigb + bigb * bigb - .0035712576000000002; | |
1057 | xcc1 = (-coeffb + TMath::Sqrt(coeffb * coeffb - coeffa * coeffc)) / coeffa; | |
1058 | ycc1 = biga * xcc1 + bigb; | |
1059 | biga1 = -1. / biga; | |
1060 | bigb1 = xcc1 / biga + ycc1; | |
1061 | coeffa = biga1 * biga1 + 1.; | |
1062 | coeffb = biga1 * bigb1 - biga1 * ycc1 - xcc1; | |
1063 | coeffc = xcc1 * xcc1 + ycc1 * ycc1 - ycc1 * 2. * bigb1 + bigb1 * bigb1 - (dsup[0] + dbox1[0]) * (dsup[0] + dbox1[0]); | |
1064 | xcc2 = (-coeffb + TMath::Sqrt(coeffb * coeffb - coeffa * coeffc)) / coeffa; | |
1065 | ycc2 = biga1 * xcc2 + bigb1; | |
1066 | xpos1 = xcc2 * TMath::Cos(aphi) - ycc2 * TMath::Sin(aphi) + xzero; | |
1067 | ypos1 = xcc2 * TMath::Sin(aphi) + ycc2 * TMath::Cos(aphi) + yzero; | |
b3a22d72 | 1068 | xpos = xpos1 * TMath::Cos(kgteta * kdegrad) + ypos1 * TMath::Sin(kgteta *kdegrad); |
1069 | ypos = -xpos1 * TMath::Sin(kgteta * kdegrad) + ypos1 * TMath::Cos(kgteta * kdegrad); | |
fe4da5cc | 1070 | zpos = 0.; |
1071 | ++jbox1; | |
cfce8870 | 1072 | gMC->Gspos("IPV1", jbox1, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1110], "ONLY"); |
fe4da5cc | 1073 | |
1074 | // --- Place arc # 13 (between part 1-2 and part 2-3) (see sketch) | |
1075 | ||
b3a22d72 | 1076 | darc[0] = krarc[12] / 10. - .02; |
1077 | darc[1] = krarc[12] / 10.; | |
fe4da5cc | 1078 | darc[2] = 25.; |
1079 | darc[3] = atheta12 - (i-1) * 36.; | |
1080 | darc[4] = atheta23 - (i-1) * 36.; | |
b3a22d72 | 1081 | xcc = kxarc[12] / 10.; |
1082 | ycc = kyarc[12] / 10.; | |
1083 | aphi = (kpphi + (i-1) * 36.) * kdegrad; | |
1084 | xzero = krr * TMath::Cos((ktteta + (i-1) * 36.) * kdegrad); | |
1085 | yzero = krr * TMath::Sin((ktteta + (i-1) * 36.) * kdegrad); | |
fe4da5cc | 1086 | xpos1 = xcc * TMath::Cos(aphi) - ycc * TMath::Sin(aphi) + xzero; |
1087 | ypos1 = xcc * TMath::Sin(aphi) + ycc * TMath::Cos(aphi) + yzero; | |
b3a22d72 | 1088 | xpos = xpos1 * TMath::Cos(kgteta * kdegrad) + ypos1 * TMath::Sin(kgteta *kdegrad); |
1089 | ypos = -xpos1 * TMath::Sin(kgteta * kdegrad) + ypos1 * TMath::Cos(kgteta * kdegrad); | |
fe4da5cc | 1090 | zpos = 0.; |
cfce8870 | 1091 | gMC->Gsposp("SARC", (i-1) * 13 + 13, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1112], "ONLY", darc, 5); |
fe4da5cc | 1092 | |
1093 | // --- Place arc # 12 (between part 2-3 and part 3-4) (see sketch) | |
1094 | ||
b3a22d72 | 1095 | darc[0] = krarc[11] / 10. - .02; |
1096 | darc[1] = krarc[11] / 10.; | |
fe4da5cc | 1097 | darc[2] = 25.; |
1098 | darc[3] = atheta23 + 90. - (i-1) * 36.; | |
1099 | darc[4] = atheta34 + 90. - (i-1) * 36.; | |
b3a22d72 | 1100 | xcc = kxarc[11] / 10.; |
1101 | ycc = kyarc[11] / 10.; | |
1102 | aphi = (kpphi + (i-1) * 36.) * kdegrad; | |
1103 | xzero = krr * TMath::Cos((ktteta + (i-1) * 36.) * kdegrad); | |
1104 | yzero = krr * TMath::Sin((ktteta + (i-1) * 36.) * kdegrad); | |
fe4da5cc | 1105 | xpos1 = xcc * TMath::Cos(aphi) - ycc * TMath::Sin(aphi) + xzero; |
1106 | ypos1 = xcc * TMath::Sin(aphi) + ycc * TMath::Cos(aphi) + yzero; | |
b3a22d72 | 1107 | xpos = xpos1 * TMath::Cos(kgteta * kdegrad) + ypos1 * TMath::Sin(kgteta *kdegrad); |
1108 | ypos = -xpos1 * TMath::Sin(kgteta * kdegrad) + ypos1 * TMath::Cos(kgteta * kdegrad); | |
fe4da5cc | 1109 | zpos = 0.; |
cfce8870 | 1110 | gMC->Gsposp("SARC", (i-1) * 13 + 12, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1111], "ONLY", darc, 5); |
fe4da5cc | 1111 | |
1112 | // --- Place arc # 11 (between part 3-4 and part 4-5) (see sketch) | |
1113 | ||
b3a22d72 | 1114 | darc[0] = krarc[10] / 10. - .02; |
1115 | darc[1] = krarc[10] / 10.; | |
fe4da5cc | 1116 | darc[2] = 25.; |
1117 | darc[3] = atheta45 + 180. - (i-1) * 36.; | |
1118 | darc[4] = atheta34 + 180. - (i-1) * 36.; | |
b3a22d72 | 1119 | xcc = kxarc[10] / 10.; |
1120 | ycc = kyarc[10] / 10.; | |
1121 | aphi = (kpphi + (i-1) * 36.) * kdegrad; | |
1122 | xzero = krr * TMath::Cos((ktteta + (i-1) * 36.) * kdegrad); | |
1123 | yzero = krr * TMath::Sin((ktteta + (i-1) * 36.) * kdegrad); | |
fe4da5cc | 1124 | xpos1 = xcc * TMath::Cos(aphi) - ycc * TMath::Sin(aphi) + xzero; |
1125 | ypos1 = xcc * TMath::Sin(aphi) + ycc * TMath::Cos(aphi) + yzero; | |
b3a22d72 | 1126 | xpos = xpos1 * TMath::Cos(kgteta * kdegrad) + ypos1 * TMath::Sin(kgteta *kdegrad); |
1127 | ypos = -xpos1 * TMath::Sin(kgteta * kdegrad) + ypos1 * TMath::Cos(kgteta * kdegrad); | |
fe4da5cc | 1128 | zpos = 0.; |
cfce8870 | 1129 | gMC->Gsposp("SARC", (i-1) * 13 + 11, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1110], "ONLY", darc, 5); |
fe4da5cc | 1130 | |
1131 | // --- Place arc # 10 (between part 4-5 and part 5-6) (see sketch) | |
1132 | ||
b3a22d72 | 1133 | darc[0] = krarc[9] / 10. - .02; |
1134 | darc[1] = krarc[9] / 10.; | |
fe4da5cc | 1135 | darc[2] = 25.; |
1136 | darc[3] = atheta45 - 90. - (i-1) * 36.; | |
1137 | darc[4] = atheta56 - 90. - (i-1) * 36.; | |
b3a22d72 | 1138 | xcc = kxarc[9] / 10.; |
1139 | ycc = kyarc[9] / 10.; | |
1140 | aphi = (kpphi + (i-1) * 36.) * kdegrad; | |
1141 | xzero = krr * TMath::Cos((ktteta + (i-1) * 36.) * kdegrad); | |
1142 | yzero = krr * TMath::Sin((ktteta + (i-1) * 36.) * kdegrad); | |
fe4da5cc | 1143 | xpos1 = xcc * TMath::Cos(aphi) - ycc * TMath::Sin(aphi) + xzero; |
1144 | ypos1 = xcc * TMath::Sin(aphi) + ycc * TMath::Cos(aphi) + yzero; | |
b3a22d72 | 1145 | xpos = xpos1 * TMath::Cos(kgteta * kdegrad) + ypos1 * TMath::Sin(kgteta *kdegrad); |
1146 | ypos = -xpos1 * TMath::Sin(kgteta * kdegrad) + ypos1 * TMath::Cos(kgteta * kdegrad); | |
fe4da5cc | 1147 | zpos = 0.; |
cfce8870 | 1148 | gMC->Gsposp("SARC", (i-1) * 13 + 10, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1109], "ONLY", darc, 5); |
fe4da5cc | 1149 | |
1150 | // --- Place arc # 9 (between part 5-6 and part) (see sketch) | |
1151 | ||
b3a22d72 | 1152 | darc[0] = krarc[8] / 10. - .02; |
1153 | darc[1] = krarc[8] / 10.; | |
fe4da5cc | 1154 | darc[2] = 25.; |
1155 | darc[3] = atheta67 + 45. - (i-1) * 36.; | |
1156 | darc[4] = atheta56 + 45. - (i-1) * 36.; | |
b3a22d72 | 1157 | xcc = kxarc[8] / 10.; |
1158 | ycc = kyarc[8] / 10.; | |
1159 | aphi = (kpphi + (i-1) * 36.) * kdegrad; | |
1160 | xzero = krr * TMath::Cos((ktteta + (i-1) * 36.) * kdegrad); | |
1161 | yzero = krr * TMath::Sin((ktteta + (i-1) * 36.) * kdegrad); | |
fe4da5cc | 1162 | xpos1 = xcc * TMath::Cos(aphi) - ycc * TMath::Sin(aphi) + xzero; |
1163 | ypos1 = xcc * TMath::Sin(aphi) + ycc * TMath::Cos(aphi) + yzero; | |
b3a22d72 | 1164 | xpos = xpos1 * TMath::Cos(kgteta * kdegrad) + ypos1 * TMath::Sin(kgteta *kdegrad); |
1165 | ypos = -xpos1 * TMath::Sin(kgteta * kdegrad) + ypos1 * TMath::Cos(kgteta * kdegrad); | |
fe4da5cc | 1166 | zpos = 0.; |
cfce8870 | 1167 | gMC->Gsposp("SARC", (i-1) * 13 + 9, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1108], "ONLY", darc, 5); |
fe4da5cc | 1168 | |
1169 | // --- Place arc # 8 (between part 6-7 and part 7-8) (see sketch) | |
1170 | ||
b3a22d72 | 1171 | darc[0] = krarc[7] / 10. - .02; |
1172 | darc[1] = krarc[7] / 10.; | |
fe4da5cc | 1173 | darc[2] = 25.; |
1174 | darc[3] = atheta67 - (i-1) * 36.; | |
1175 | darc[4] = atheta78 - (i-1) * 36.; | |
b3a22d72 | 1176 | xcc = kxarc[7] / 10.; |
1177 | ycc = kyarc[7] / 10.; | |
1178 | aphi = (kpphi + (i-1) * 36.) * kdegrad; | |
1179 | xzero = krr * TMath::Cos((ktteta + (i-1) * 36.) * kdegrad); | |
1180 | yzero = krr * TMath::Sin((ktteta + (i-1) * 36.) * kdegrad); | |
fe4da5cc | 1181 | xpos1 = xcc * TMath::Cos(aphi) - ycc * TMath::Sin(aphi) + xzero; |
1182 | ypos1 = xcc * TMath::Sin(aphi) + ycc * TMath::Cos(aphi) + yzero; | |
b3a22d72 | 1183 | xpos = xpos1 * TMath::Cos(kgteta * kdegrad) + ypos1 * TMath::Sin(kgteta *kdegrad); |
1184 | ypos = -xpos1 * TMath::Sin(kgteta * kdegrad) + ypos1 * TMath::Cos(kgteta * kdegrad); | |
fe4da5cc | 1185 | zpos = 0.; |
cfce8870 | 1186 | gMC->Gsposp("SARC", (i-1) * 13 + 8, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1107], "ONLY", darc, 5); |
fe4da5cc | 1187 | |
1188 | // --- Place arc # 7 (between part 7-8 and part 8-9) (see sketch) | |
1189 | ||
b3a22d72 | 1190 | darc[0] = krarc[6] / 10. - .02; |
1191 | darc[1] = krarc[6] / 10.; | |
fe4da5cc | 1192 | darc[2] = 25.; |
1193 | darc[3] = atheta89 + 45. - (i-1) * 36.; | |
1194 | darc[4] = atheta78 + 45. - (i-1) * 36.; | |
b3a22d72 | 1195 | xcc = kxarc[6] / 10.; |
1196 | ycc = kyarc[6] / 10.; | |
1197 | aphi = (kpphi + (i-1) * 36.) * kdegrad; | |
1198 | xzero = krr * TMath::Cos((ktteta + (i-1) * 36.) * kdegrad); | |
1199 | yzero = krr * TMath::Sin((ktteta + (i-1) * 36.) * kdegrad); | |
fe4da5cc | 1200 | xpos1 = xcc * TMath::Cos(aphi) - ycc * TMath::Sin(aphi) + xzero; |
1201 | ypos1 = xcc * TMath::Sin(aphi) + ycc * TMath::Cos(aphi) + yzero; | |
b3a22d72 | 1202 | xpos = xpos1 * TMath::Cos(kgteta * kdegrad) + ypos1 * TMath::Sin(kgteta *kdegrad); |
1203 | ypos = -xpos1 * TMath::Sin(kgteta * kdegrad) + ypos1 * TMath::Cos(kgteta * kdegrad); | |
fe4da5cc | 1204 | zpos = 0.; |
cfce8870 | 1205 | gMC->Gsposp("SARC", (i-1) * 13 + 7, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1106], "ONLY", darc, 5); |
fe4da5cc | 1206 | |
1207 | // --- Place arc # 6 (between part 8-9 and part 9-10) (see sketch) | |
1208 | ||
b3a22d72 | 1209 | darc[0] = krarc[5] / 10. - .02; |
1210 | darc[1] = krarc[5] / 10.; | |
fe4da5cc | 1211 | darc[2] = 25.; |
1212 | darc[3] = atheta89 + 45. - (i-1) * 36.; | |
1213 | darc[4] = atheta910 + 45. - (i-1) * 36.; | |
b3a22d72 | 1214 | xcc = kxarc[5] / 10.; |
1215 | ycc = kyarc[5] / 10.; | |
1216 | aphi = (kpphi + (i-1) * 36.) * kdegrad; | |
1217 | xzero = krr * TMath::Cos((ktteta + (i-1) * 36.) * kdegrad); | |
1218 | yzero = krr * TMath::Sin((ktteta + (i-1) * 36.) * kdegrad); | |
fe4da5cc | 1219 | xpos1 = xcc * TMath::Cos(aphi) - ycc * TMath::Sin(aphi) + xzero; |
1220 | ypos1 = xcc * TMath::Sin(aphi) + ycc * TMath::Cos(aphi) + yzero; | |
b3a22d72 | 1221 | xpos = xpos1 * TMath::Cos(kgteta * kdegrad) + ypos1 * TMath::Sin(kgteta *kdegrad); |
1222 | ypos = -xpos1 * TMath::Sin(kgteta * kdegrad) + ypos1 * TMath::Cos(kgteta * kdegrad); | |
fe4da5cc | 1223 | zpos = 0.; |
cfce8870 | 1224 | gMC->Gsposp("SARC", (i-1) * 13 + 6, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1105], "ONLY", darc, 5); |
fe4da5cc | 1225 | |
1226 | // --- Place arc # 5 (between part 9-10 and part 10-11) | |
1227 | // (see sketch) | |
1228 | ||
b3a22d72 | 1229 | darc[0] = krarc[4] / 10. - .02; |
1230 | darc[1] = krarc[4] / 10.; | |
fe4da5cc | 1231 | darc[2] = 25.; |
1232 | darc[3] = atheta1011 + 45. - (i-1) * 36.; | |
1233 | darc[4] = atheta910 + 45. - (i-1) * 36.; | |
b3a22d72 | 1234 | xcc = kxarc[4] / 10.; |
1235 | ycc = kyarc[4] / 10.; | |
1236 | aphi = (kpphi + (i-1) * 36.) * kdegrad; | |
1237 | xzero = krr * TMath::Cos((ktteta + (i-1) * 36.) * kdegrad); | |
1238 | yzero = krr * TMath::Sin((ktteta + (i-1) * 36.) * kdegrad); | |
fe4da5cc | 1239 | xpos1 = xcc * TMath::Cos(aphi) - ycc * TMath::Sin(aphi) + xzero; |
1240 | ypos1 = xcc * TMath::Sin(aphi) + ycc * TMath::Cos(aphi) + yzero; | |
b3a22d72 | 1241 | xpos = xpos1 * TMath::Cos(kgteta * kdegrad) + ypos1 * TMath::Sin(kgteta *kdegrad); |
1242 | ypos = -xpos1 * TMath::Sin(kgteta * kdegrad) + ypos1 * TMath::Cos(kgteta * kdegrad); | |
fe4da5cc | 1243 | zpos = 0.; |
cfce8870 | 1244 | gMC->Gsposp("SARC", (i-1) * 13 + 5, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1104], "ONLY", darc, 5); |
fe4da5cc | 1245 | |
1246 | // --- Place arc # 4 (between part 10-11 and part 11-12) | |
1247 | // (see sketch) | |
1248 | ||
b3a22d72 | 1249 | darc[0] = krarc[3] / 10. - .02; |
1250 | darc[1] = krarc[3] / 10.; | |
fe4da5cc | 1251 | darc[2] = 25.; |
1252 | darc[3] = atheta1112 - 45. - (i-1) * 36.; | |
1253 | darc[4] = atheta1011 - 225. - (i-1) * 36.; | |
b3a22d72 | 1254 | xcc = kxarc[3] / 10.; |
1255 | ycc = kyarc[3] / 10.; | |
1256 | aphi = (kpphi + (i-1) * 36.) * kdegrad; | |
1257 | xzero = krr * TMath::Cos((ktteta + (i-1) * 36.) * kdegrad); | |
1258 | yzero = krr * TMath::Sin((ktteta + (i-1) * 36.) * kdegrad); | |
fe4da5cc | 1259 | xpos1 = xcc * TMath::Cos(aphi) - ycc * TMath::Sin(aphi) + xzero; |
1260 | ypos1 = xcc * TMath::Sin(aphi) + ycc * TMath::Cos(aphi) + yzero; | |
b3a22d72 | 1261 | xpos = xpos1 * TMath::Cos(kgteta * kdegrad) + ypos1 * TMath::Sin(kgteta *kdegrad); |
1262 | ypos = -xpos1 * TMath::Sin(kgteta * kdegrad) + ypos1 * TMath::Cos(kgteta * kdegrad); | |
fe4da5cc | 1263 | zpos = 0.; |
cfce8870 | 1264 | gMC->Gsposp("SARC", (i-1) * 13 + 4, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1103], "ONLY", darc, 5); |
fe4da5cc | 1265 | |
1266 | // --- Place arc # 3 (between part 11-12 and part 12-13) | |
1267 | // (see sketch) | |
1268 | ||
b3a22d72 | 1269 | darc[0] = krarc[2] / 10. - .02; |
1270 | darc[1] = krarc[2] / 10.; | |
fe4da5cc | 1271 | darc[2] = 25.; |
1272 | darc[3] = atheta1112 - 90. - (i-1) * 36.; | |
1273 | darc[4] = atheta1213 - 90. - (i-1) * 36.; | |
b3a22d72 | 1274 | xcc = kxarc[2] / 10.; |
1275 | ycc = kyarc[2] / 10.; | |
1276 | aphi = (kpphi + (i-1) * 36.) * kdegrad; | |
1277 | xzero = krr * TMath::Cos((ktteta + (i-1) * 36.) * kdegrad); | |
1278 | yzero = krr * TMath::Sin((ktteta + (i-1) * 36.) * kdegrad); | |
fe4da5cc | 1279 | xpos1 = xcc * TMath::Cos(aphi) - ycc * TMath::Sin(aphi) + xzero; |
1280 | ypos1 = xcc * TMath::Sin(aphi) + ycc * TMath::Cos(aphi) + yzero; | |
b3a22d72 | 1281 | xpos = xpos1 * TMath::Cos(kgteta * kdegrad) + ypos1 * TMath::Sin(kgteta *kdegrad); |
1282 | ypos = -xpos1 * TMath::Sin(kgteta * kdegrad) + ypos1 * TMath::Cos(kgteta * kdegrad); | |
fe4da5cc | 1283 | zpos = 0.; |
cfce8870 | 1284 | gMC->Gsposp("SARC", (i-1) * 13 + 3, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1102], "ONLY", darc, 5); |
fe4da5cc | 1285 | |
1286 | // --- Place arc # 2 (between part 12-13 and part 13-14) | |
1287 | // (see sketch) | |
1288 | ||
b3a22d72 | 1289 | darc[0] = krarc[1] / 10. - .02; |
1290 | darc[1] = krarc[1] / 10.; | |
fe4da5cc | 1291 | darc[2] = 25.; |
1292 | darc[3] = atheta1213 + 135. - (i-1) * 36.; | |
1293 | darc[4] = atheta1314 + 165. - (i-1) * 36.; | |
b3a22d72 | 1294 | xcc = kxarc[1] / 10.; |
1295 | ycc = kyarc[1] / 10.; | |
1296 | aphi = (kpphi + (i-1) * 36.) * kdegrad; | |
1297 | xzero = krr * TMath::Cos((ktteta + (i-1) * 36.) * kdegrad); | |
1298 | yzero = krr * TMath::Sin((ktteta + (i-1) * 36.) * kdegrad); | |
fe4da5cc | 1299 | xpos1 = xcc * TMath::Cos(aphi) - ycc * TMath::Sin(aphi) + xzero; |
1300 | ypos1 = xcc * TMath::Sin(aphi) + ycc * TMath::Cos(aphi) + yzero; | |
b3a22d72 | 1301 | xpos = xpos1 * TMath::Cos(kgteta * kdegrad) + ypos1 * TMath::Sin(kgteta *kdegrad); |
1302 | ypos = -xpos1 * TMath::Sin(kgteta * kdegrad) + ypos1 * TMath::Cos(kgteta * kdegrad); | |
fe4da5cc | 1303 | zpos = 0.; |
cfce8870 | 1304 | gMC->Gsposp("SARC", (i-1) * 13 + 2, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1101], "ONLY", darc, 5); |
fe4da5cc | 1305 | |
1306 | // --- Place arc # 1 (between part 13-14 and part 1-2) | |
1307 | // (see sketch) | |
1308 | ||
b3a22d72 | 1309 | darc[0] = krarc[0] / 10. - .02; |
1310 | darc[1] = krarc[0] / 10.; | |
fe4da5cc | 1311 | darc[2] = 25.; |
1312 | darc[3] = atheta12 + 45. - (i-1) * 36.; | |
1313 | darc[4] = atheta1314 - (i-1) * 36.; | |
b3a22d72 | 1314 | xcc = kxarc[0] / 10.; |
1315 | ycc = kyarc[0] / 10.; | |
1316 | aphi = (kpphi + (i-1) * 36.) * kdegrad; | |
1317 | xzero = krr * TMath::Cos((ktteta + (i-1) * 36.) * kdegrad); | |
1318 | yzero = krr * TMath::Sin((ktteta + (i-1) * 36.) * kdegrad); | |
fe4da5cc | 1319 | xpos1 = xcc * TMath::Cos(aphi) - ycc * TMath::Sin(aphi) + xzero; |
1320 | ypos1 = xcc * TMath::Sin(aphi) + ycc * TMath::Cos(aphi) + yzero; | |
b3a22d72 | 1321 | xpos = xpos1 * TMath::Cos(kgteta * kdegrad) + ypos1 * TMath::Sin(kgteta *kdegrad); |
1322 | ypos = -xpos1 * TMath::Sin(kgteta * kdegrad) + ypos1 * TMath::Cos(kgteta * kdegrad); | |
fe4da5cc | 1323 | zpos = 0.; |
cfce8870 | 1324 | gMC->Gsposp("SARC", (i-1) * 13 + 1, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1100], "ONLY", darc, 5); |
fe4da5cc | 1325 | |
1326 | } | |
1327 | //************************************************************************ | |
1328 | //* * | |
1329 | //* D R I F T S * | |
1330 | //* =========== * | |
1331 | //* * | |
1332 | //************************************************************************ | |
1333 | ||
1334 | // --- Define a ghost volume containing the Silicon Drift Detectors | |
1335 | // (layer #3 and #4) and fill it with air or vacuum | |
1336 | ||
1337 | xxm = (49.999-3.)/(70.-25.); | |
1338 | dgh[0] = 0; | |
1339 | dgh[1] = 360; | |
1340 | dgh[2] = 4; | |
1341 | dgh[3] = -25.-(9.-3.01)/xxm-(9.01-9.)/xxm-(27.-9.01)/xxm; | |
1342 | dgh[4] = 27.; | |
1343 | dgh[5] = 27.; | |
1344 | dgh[6] = -25.-(9.-3.01)/xxm-(9.01-9.)/xxm; | |
1345 | dgh[7] = 9.01; | |
1346 | dgh[8] = 27.; | |
1347 | dgh[9] = 25.+(9.-3.01)/xxm+(9.01-9.)/xxm; | |
1348 | dgh[10] = 9.01; | |
1349 | dgh[11] = 27.; | |
1350 | dgh[12] = 25.+(9.-3.01)/xxm+(9.01-9.)/xxm+(27.-9.01)/xxm; | |
1351 | dgh[13] = 27.; | |
1352 | dgh[14] = 27.; | |
cfce8870 | 1353 | gMC->Gsvolu("IT34", "PCON", idtmed[275], dgh, 15); |
fe4da5cc | 1354 | |
1355 | // --- Place the ghost volume in its mother volume (ITSV) and make it | |
1356 | // invisible | |
1357 | ||
cfce8870 | 1358 | gMC->Gspos("IT34", 1, "ITSV", 0., 0., 0., 0, "ONLY"); |
1359 | gMC->Gsatt("IT34", "SEEN", 0); | |
fe4da5cc | 1360 | |
1361 | // --- Layer #3 | |
1362 | ||
1363 | // GOTO 3456 ! skip ITS layer no. 3 | |
1364 | ||
1365 | //--- Define a ghost volume containing a single ladder of layer #3 (with the | |
1366 | // smaller lenght of ribs) and fill it with air or vacuum | |
1367 | ||
1368 | dbox1[0] = 0.5+(0.0172+0.03+0.0252+0.04+0.003); | |
1369 | dbox1[1] = 3.85; | |
1370 | // the widest element is the sensitive element | |
1371 | dbox1[2] = (8.7*5.-2.*1.+2.*0.1)/2.+2.*7.5; | |
1372 | // 7.5 cm is the lenght | |
cfce8870 | 1373 | gMC->Gsvolu("IDV1", "BOX ", idtmed[228], dbox1, 3); |
fe4da5cc | 1374 | |
1375 | // --- Make the ghost volume invisible | |
1376 | ||
cfce8870 | 1377 | gMC->Gsatt("IDV1", "SEEN", 0); |
fe4da5cc | 1378 | |
1379 | // --- Define a volume containing the sensitive part of drifts | |
1380 | // (silicon, layer #3) | |
1381 | ||
1382 | dits[0] = .0172; | |
1383 | // see material budget report by G. Feofilov | |
1384 | dits[1] = 3.85; | |
1385 | dits[2] = 4.35; | |
cfce8870 | 1386 | gMC->Gsvolu("ITS3", "BOX ", idtmed[224], dits, 3); |
fe4da5cc | 1387 | |
1388 | //--- Define the part of the (smaller) rib between two sensitive parts made of | |
1389 | // carbon (layer #3) | |
1390 | ||
1391 | dsup[0] = .5 - dits[0]; | |
1392 | dsup[1] = .01; | |
1393 | dsup[2] = (8.7*5.-2.*1.+2.*0.1)/2.+2.*7.5; | |
1394 | // 7.5 cm is the lenght | |
cfce8870 | 1395 | gMC->Gsvolu("IR11", "BOX ", idtmed[227], dsup, 3); |
fe4da5cc | 1396 | |
1397 | //--- Define the first part of the (smaller) rib between two sensitive parts | |
1398 | // made of aluminum (layer #3) | |
1399 | ||
1400 | dal1[0] = .5 - dits[0]; | |
1401 | dal1[1] = 0.00096/2.; | |
1402 | dal1[2] = (8.7*5.-2.*1.+2.*0.1)/2.+2.*7.5; | |
1403 | // 7.5 cm is the lenght | |
cfce8870 | 1404 | gMC->Gsvolu("IR12", "BOX ", idtmed[230], dal1, 3); |
fe4da5cc | 1405 | |
1406 | //--- Define the part of the (smaller) rib between two sensitive parts made of | |
1407 | // kapton (layer #3) | |
1408 | ||
1409 | dkap[0] = .5 - dits[0]; | |
1410 | dkap[1] = .01585; | |
1411 | dkap[2] = (8.7*5.-2.*1.+2.*0.1)/2.+2.*7.5; | |
1412 | // 7.5 cm is the lenght | |
cfce8870 | 1413 | gMC->Gsvolu("IR13", "BOX ", idtmed[236], dkap, 3); |
fe4da5cc | 1414 | |
1415 | //--- Define the second part of the (smaller) rib between two sensitive parts | |
1416 | // made of aluminum (layer #3) | |
1417 | ||
1418 | dal2[0] = .5 - dits[0]; | |
1419 | dal2[1] = 0.0027/2.; | |
1420 | dal2[2] = (8.7*5.-2.*1.+2.*0.1)/2.+2.*7.5; | |
1421 | // 7.5 cm is the lenght | |
cfce8870 | 1422 | gMC->Gsvolu("IR14", "BOX ", idtmed[230], dal2, 3); |
fe4da5cc | 1423 | |
1424 | // --- Define the part of the (smaller) rib between two sensitive parts | |
1425 | // made of silicon (the electronics) (layer #3) | |
1426 | ||
1427 | dchi[0] = .5 - dits[0]; | |
1428 | dchi[1] = 0.0071/2.; | |
1429 | dchi[2] = (8.7*5.-2.*1.+2.*0.1)/2.+2.*7.5; | |
1430 | // 7.5 cm is the lenght | |
cfce8870 | 1431 | gMC->Gsvolu("IR15", "BOX ", idtmed[225], dal2, 3); |
fe4da5cc | 1432 | |
1433 | // --- Define the part of the (smaller) rib between two sensitive parts | |
1434 | // made of water (the cooler) (layer #3) | |
1435 | ||
1436 | dwat[0] = .5 - dits[0]; | |
1437 | dwat[1] = 0.0093/2.; | |
1438 | dwat[2] = (8.7*5.-2.*1.+2.*0.1)/2.+2.*7.5; | |
1439 | // 7.5 cm is the lenght | |
cfce8870 | 1440 | gMC->Gsvolu("IR16", "BOX ", idtmed[231], dwat, 3); |
fe4da5cc | 1441 | |
1442 | //--- Define the third part of the (smaller) rib between two sensitive parts | |
1443 | // made of aluminum (the cooling tubes) (layer #3) | |
1444 | ||
1445 | dtub[0] = .5 - dits[0]; | |
1446 | dtub[1] = 0.00134/2.; | |
1447 | dtub[2] = (8.7*5.-2.*1.+2.*0.1)/2.+2.*7.5; | |
1448 | // 7.5 cm is the lenght | |
cfce8870 | 1449 | gMC->Gsvolu("IR17", "BOX ", idtmed[230], dtub, 3); |
fe4da5cc | 1450 | |
1451 | // --- Define the part of the end-ladder stuff made of PCB (layer #3) | |
1452 | ||
1453 | dpcb[0] = .03; | |
1454 | // twice the foreseen thickness | |
1455 | dpcb[1] = 3.5; | |
1456 | dpcb[2] = 7.5; | |
cfce8870 | 1457 | gMC->Gsvolu("IEL1", "BOX ", idtmed[233], dpcb, 3); |
fe4da5cc | 1458 | |
1459 | // --- Define the part of the end-ladder stuff made of copper (layer #3) | |
1460 | ||
1461 | dcop[0] = .0252; | |
1462 | // twice the foreseen thickness | |
1463 | dcop[1] = 3.5; | |
1464 | dcop[2] = 7.5; | |
cfce8870 | 1465 | gMC->Gsvolu("IEL2", "BOX ", idtmed[234], dcop, 3); |
fe4da5cc | 1466 | |
1467 | // --- Define the part of the end-ladder stuff made of ceramics (layer #3) | |
1468 | ||
1469 | dcer[0] = .04; | |
1470 | // twice the foreseen thickness | |
1471 | dcer[1] = 3.5; | |
1472 | dcer[2] = 7.5; | |
cfce8870 | 1473 | gMC->Gsvolu("IEL3", "BOX ", idtmed[235], dcer, 3); |
fe4da5cc | 1474 | |
1475 | // --- Define the part of the end-ladder stuff made of silicon (layer #3) | |
1476 | ||
1477 | dsil[0] = .003; | |
1478 | // twice the foreseen thickness | |
1479 | dsil[1] = 3.5; | |
1480 | dsil[2] = 7.5; | |
cfce8870 | 1481 | gMC->Gsvolu("IEL4", "BOX ", idtmed[226], dsil, 3); |
fe4da5cc | 1482 | |
1483 | //--- Place the sensitive part of the drifts (smaller ribs) into its mother | |
1484 | // (IDV1) | |
1485 | ||
1486 | ypos = 0.; | |
e8189707 | 1487 | for (j = 1; j <= 5; ++j) { |
fe4da5cc | 1488 | // odd elements are up and even elements are down |
1489 | if (j == 1) { | |
1490 | xpos = dbox1[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0] * 2. - dits[0]; | |
1491 | zpos = 0. - dits[2] + 1. - dits[2] * 2. - .1 - dits[2]; | |
1492 | } else if (j == 2) { | |
1493 | xpos = -dbox1[0] + dits[0]; | |
1494 | zpos = 0. - dits[2] + 1. - dits[2]; | |
1495 | } else if (j == 3) { | |
1496 | xpos = dbox1[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0] * 2. - dits[0]; | |
1497 | zpos = 0.; | |
1498 | } else if (j == 4) { | |
1499 | xpos = -dbox1[0] + dits[0]; | |
1500 | zpos = dits[2] + 0. - 1. + dits[2]; | |
1501 | } else if (j == 5) { | |
1502 | xpos = dbox1[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0] * 2. - dits[0]; | |
1503 | zpos = dits[2] + 0. - 1. + dits[2] * 2. + .1 + dits[2]; | |
1504 | } | |
cfce8870 | 1505 | gMC->Gspos("ITS3", j, "IDV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1506 | } |
1507 | ||
1508 | // --- Place the smaller ribs into their mother (IDV1) | |
1509 | ||
1510 | // --- Right ribs (just a matter of convention) | |
1511 | ||
1512 | xpos = .5 - dbox1[0] + dits[0]; | |
1513 | zpos = 0.; | |
1514 | ||
1515 | // --- Carbon | |
1516 | ||
1517 | ypos = 2.81; | |
cfce8870 | 1518 | gMC->Gspos("IR11", 1, "IDV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1519 | |
1520 | // --- Aluminum #1 | |
1521 | ||
1522 | ypos = dsup[1] + 2.81 + dal1[1]; | |
cfce8870 | 1523 | gMC->Gspos("IR12", 1, "IDV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1524 | |
1525 | // --- Kapton | |
1526 | ||
1527 | ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1]; | |
cfce8870 | 1528 | gMC->Gspos("IR13", 1, "IDV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1529 | |
1530 | // --- Aluminum #2 | |
1531 | ||
1532 | ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1]; | |
cfce8870 | 1533 | gMC->Gspos("IR14", 1, "IDV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1534 | |
1535 | // --- Silicon (chip) | |
1536 | ||
1537 | ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1]; | |
cfce8870 | 1538 | gMC->Gspos("IR15", 1, "IDV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1539 | |
1540 | // --- Water | |
1541 | ||
1542 | ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1] * 2. + dwat[1]; | |
cfce8870 | 1543 | gMC->Gspos("IR16", 1, "IDV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1544 | |
1545 | // --- Aluminum #3 | |
1546 | ||
1547 | ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1] * 2. + dwat[1] * 2. | |
1548 | + dtub[1]; | |
cfce8870 | 1549 | gMC->Gspos("IR17", 1, "IDV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1550 | |
1551 | // --- Right ribs (just a matter of convention) | |
1552 | ||
1553 | // --- Carbon | |
1554 | ||
1555 | ypos = -2.81; | |
cfce8870 | 1556 | gMC->Gspos("IR11", 2, "IDV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1557 | |
1558 | // --- Aluminum #1 | |
1559 | ||
1560 | ypos = -(dsup[1] + 2.81 + dal1[1]); | |
cfce8870 | 1561 | gMC->Gspos("IR12", 2, "IDV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1562 | |
1563 | // --- Kapton | |
1564 | ||
1565 | ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1]); | |
cfce8870 | 1566 | gMC->Gspos("IR13", 2, "IDV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1567 | |
1568 | // --- Aluminum #2 | |
1569 | ||
1570 | ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1]); | |
cfce8870 | 1571 | gMC->Gspos("IR14", 2, "IDV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1572 | |
1573 | // --- Silicon (chip) | |
1574 | ||
1575 | ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1]); | |
cfce8870 | 1576 | gMC->Gspos("IR15", 2, "IDV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1577 | |
1578 | // --- Water | |
1579 | ||
1580 | ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1] * 2. + dwat[1]); | |
cfce8870 | 1581 | gMC->Gspos("IR16", 2, "IDV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1582 | |
1583 | // --- Aluminum #3 | |
1584 | ||
1585 | ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * | |
1586 | 2. + dal2[1] * 2. + dchi[1] * 2. + dwat[1] * 2. + dtub[1]); | |
cfce8870 | 1587 | gMC->Gspos("IR17", 2, "IDV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1588 | |
1589 | // --- Place the end-ladder stuff into its mother (IDV1) | |
1590 | ||
1591 | ||
1592 | // --- Negative-Z end-ladder | |
1593 | ||
1594 | ypos = 0.; | |
1595 | zpos = -(8.7*5.-2.*1.+2.*0.1)/2.-7.5; | |
1596 | ||
1597 | // --- PCB | |
1598 | ||
1599 | xpos = dbox1[0] - dpcb[0]; | |
cfce8870 | 1600 | gMC->Gspos("IEL1", 1, "IDV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1601 | |
1602 | // --- Copper | |
1603 | ||
1604 | xpos = dbox1[0] - dpcb[0] * 2. - dcop[0]; | |
cfce8870 | 1605 | gMC->Gspos("IEL2", 1, "IDV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1606 | |
1607 | // --- Ceramics | |
1608 | ||
1609 | xpos = dbox1[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0]; | |
cfce8870 | 1610 | gMC->Gspos("IEL3", 1, "IDV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1611 | |
1612 | // --- Silicon (bus) | |
1613 | ||
1614 | xpos = dbox1[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0]; | |
cfce8870 | 1615 | gMC->Gspos("IEL4", 1, "IDV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1616 | |
1617 | // --- Positive-Z end-ladder | |
1618 | ||
1619 | ypos = 0.; | |
1620 | zpos = (8.7*5.-2.*1.+2.*0.1)/2.+7.5; | |
1621 | ||
1622 | // --- PCB | |
1623 | ||
1624 | xpos = dbox1[0] - dpcb[0]; | |
cfce8870 | 1625 | gMC->Gspos("IEL1", 2, "IDV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1626 | |
1627 | // --- Copper | |
1628 | ||
1629 | xpos = dbox1[0] - dpcb[0] * 2. - dcop[0]; | |
cfce8870 | 1630 | gMC->Gspos("IEL2", 2, "IDV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1631 | |
1632 | // --- Ceramics | |
1633 | ||
1634 | xpos = dbox1[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0]; | |
cfce8870 | 1635 | gMC->Gspos("IEL3", 2, "IDV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1636 | |
1637 | // --- Silicon (bus) | |
1638 | ||
1639 | xpos = dbox1[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0]; | |
cfce8870 | 1640 | gMC->Gspos("IEL4", 2, "IDV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1641 | |
1642 | //--- Define a ghost volume containing a single ladder of layer #3 (with the | |
1643 | // larger lenght of ribs) and fill it with air or vacuum | |
1644 | ||
1645 | dbox2[0] = 0.65+(0.0172+0.03+0.0252+0.04+0.003); | |
1646 | dbox2[1] = 3.85; | |
1647 | // the widest element is the sensitive element | |
1648 | dbox2[2] = (8.7*5.-2.*1.+2.*0.1)/2.+2.*7.5; | |
1649 | // 7.5 cm is the lenght | |
cfce8870 | 1650 | gMC->Gsvolu("IDV2", "BOX ", idtmed[228], dbox2, 3); |
fe4da5cc | 1651 | |
1652 | // --- Make the ghost volume invisible | |
1653 | ||
cfce8870 | 1654 | gMC->Gsatt("IDV2", "SEEN", 0); |
fe4da5cc | 1655 | |
1656 | //--- Define the part of the (larger) rib between two sensitive parts madeof | |
1657 | // carbon (layer #3) | |
1658 | ||
1659 | dsup[0] = .65 - dits[0]; | |
1660 | dsup[1] = .01; | |
1661 | dsup[2] = (8.7*5.-2.*1.+2.*0.1)/2.+2.*7.5; | |
1662 | // 7.5 cm is the lenght | |
cfce8870 | 1663 | gMC->Gsvolu("IR21", "BOX ", idtmed[227], dsup, 3); |
fe4da5cc | 1664 | |
1665 | //--- Define the first part of the (larger) rib between two sensitive parts | |
1666 | // made of aluminum (layer #3) | |
1667 | ||
1668 | dal1[0] = .65 - dits[0]; | |
1669 | dal1[1] = 0.00096/2.; | |
1670 | dal1[2] = (8.7*5.-2.*1.+2.*0.1)/2.+2.*7.5; | |
1671 | // 7.5 cm is the lenght | |
cfce8870 | 1672 | gMC->Gsvolu("IR22", "BOX ", idtmed[230], dal1, 3); |
fe4da5cc | 1673 | |
1674 | //--- Define the part of the (larger) rib between two sensitive parts madeof | |
1675 | // kapton (layer #3) | |
1676 | ||
1677 | dkap[0] = .65 - dits[0]; | |
1678 | dkap[1] = 0.0317/2.; | |
1679 | dkap[2] = (8.7*5.-2.*1.+2.*0.1)/2.+2.*7.5; | |
1680 | // 7.5 cm is the lenght | |
cfce8870 | 1681 | gMC->Gsvolu("IR23", "BOX ", idtmed[236], dkap, 3); |
fe4da5cc | 1682 | |
1683 | //--- Define the second part of the (larger) rib between two sensitive parts | |
1684 | // made of aluminum (layer #3) | |
1685 | ||
1686 | dal2[0] = .65 - dits[0]; | |
1687 | dal2[1] = 0.0027/2.; | |
1688 | dal2[2] = (8.7*5.-2.*1.+2.*0.1)/2.+2.*7.5; | |
1689 | // 7.5 cm is the lenght | |
cfce8870 | 1690 | gMC->Gsvolu("IR24", "BOX ", idtmed[230], dal2, 3); |
fe4da5cc | 1691 | |
1692 | // --- Define the part of the (larger) rib between two sensitive parts | |
1693 | // made of silicon (the electronics) (layer #3) | |
1694 | ||
1695 | dchi[0] = .65 - dits[0]; | |
1696 | dchi[1] = 0.0071/2.; | |
1697 | dchi[2] = (8.7*5.-2.*1.+2.*0.1)/2.+2.*7.5; | |
1698 | // 7.5 cm is the lenght | |
cfce8870 | 1699 | gMC->Gsvolu("IR25", "BOX ", idtmed[225], dal2, 3); |
fe4da5cc | 1700 | |
1701 | // --- Define the part of the (larger) rib between two sensitive parts | |
1702 | // made of water (the cooler) (layer #3) | |
1703 | ||
1704 | dwat[0] = .65 - dits[0]; | |
1705 | dwat[1] = 0.0093/2.; | |
1706 | dwat[2] = (8.7*5.-2.*1.+2.*0.1)/2.+2.*7.5; | |
1707 | // 7.5 cm is the lenght | |
cfce8870 | 1708 | gMC->Gsvolu("IR26", "BOX ", idtmed[231], dwat, 3); |
fe4da5cc | 1709 | |
1710 | //--- Define the third part of the (larger) rib between two sensitive parts | |
1711 | // made of aluminum (the cooling tubes) (layer #3) | |
1712 | ||
1713 | dtub[0] = .65 - dits[0]; | |
1714 | dtub[1] = 0.00134/2.; | |
1715 | dtub[2] = (8.7*5.-2.*1.+2.*0.1)/2.+2.*7.5; | |
1716 | // 7.5 cm is the lenght | |
cfce8870 | 1717 | gMC->Gsvolu("IR27", "BOX ", idtmed[230], dtub, 3); |
fe4da5cc | 1718 | |
1719 | //--- Place the sensitive part of the drifts (smaller ribs) into its mother | |
1720 | // (IDV2) | |
1721 | ||
1722 | ypos = 0.; | |
e8189707 | 1723 | for (j = 1; j <= 5; ++j) { |
fe4da5cc | 1724 | // odd element are up and even elements are down |
1725 | if (j == 1) { | |
1726 | xpos = dbox2[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0] * 2. - dits[0]; | |
1727 | zpos = 0. - dits[2] + 1. - dits[2] * 2. - .1 - dits[2]; | |
1728 | } else if (j == 2) { | |
1729 | xpos = -dbox2[0] + dits[0]; | |
1730 | zpos = 0. - dits[2] + 1. - dits[2]; | |
1731 | } else if (j == 3) { | |
1732 | xpos = dbox2[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0] * 2. - dits[0]; | |
1733 | zpos = 0.; | |
1734 | } else if (j == 4) { | |
1735 | xpos = -dbox2[0] + dits[0]; | |
1736 | zpos = dits[2] + 0. - 1. + dits[2]; | |
1737 | } else if (j == 5) { | |
1738 | xpos = dbox2[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0] * 2. - dits[0]; | |
1739 | zpos = dits[2] + 0. - 1. + dits[2] * 2. + .1 + dits[2]; | |
1740 | } | |
cfce8870 | 1741 | gMC->Gspos("ITS3", j, "IDV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1742 | } |
1743 | ||
1744 | // --- Place the larger ribs into their mother (IDV2) | |
1745 | ||
1746 | ||
1747 | // --- Right ribs (just a matter of convention) | |
1748 | ||
1749 | xpos = .65 - dbox2[0] + dits[0]; | |
1750 | zpos = 0.; | |
1751 | ||
1752 | // --- Carbon | |
1753 | ||
1754 | ypos = 2.81; | |
cfce8870 | 1755 | gMC->Gspos("IR21", 1, "IDV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1756 | |
1757 | // --- Aluminum #1 | |
1758 | ||
1759 | ypos = dsup[1] + 2.81 + dal1[1]; | |
cfce8870 | 1760 | gMC->Gspos("IR22", 1, "IDV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1761 | |
1762 | // --- Kapton | |
1763 | ||
1764 | ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1]; | |
cfce8870 | 1765 | gMC->Gspos("IR23", 1, "IDV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1766 | |
1767 | // --- Aluminum #2 | |
1768 | ||
1769 | ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1]; | |
cfce8870 | 1770 | gMC->Gspos("IR24", 1, "IDV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1771 | |
1772 | // --- Silicon (chip) | |
1773 | ||
1774 | ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1]; | |
cfce8870 | 1775 | gMC->Gspos("IR25", 1, "IDV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1776 | |
1777 | // --- Water | |
1778 | ||
1779 | ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1] * 2. + dwat[1]; | |
cfce8870 | 1780 | gMC->Gspos("IR26", 1, "IDV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1781 | |
1782 | // --- Aluminum #3 | |
1783 | ||
1784 | ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1] * 2. + dwat[1] * 2. + dtub[1]; | |
cfce8870 | 1785 | gMC->Gspos("IR27", 1, "IDV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1786 | |
1787 | // --- Right ribs (just a matter of convention) | |
1788 | ||
1789 | // --- Carbon | |
1790 | ||
1791 | ypos = -2.81; | |
cfce8870 | 1792 | gMC->Gspos("IR21", 2, "IDV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1793 | |
1794 | // --- Aluminum #1 | |
1795 | ||
1796 | ypos = -(dsup[1] + 2.81 + dal1[1]); | |
cfce8870 | 1797 | gMC->Gspos("IR22", 2, "IDV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1798 | |
1799 | // --- Kapton | |
1800 | ||
1801 | ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1]); | |
cfce8870 | 1802 | gMC->Gspos("IR23", 2, "IDV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1803 | |
1804 | // --- Aluminum #2 | |
1805 | ||
1806 | ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1]); | |
cfce8870 | 1807 | gMC->Gspos("IR24", 2, "IDV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1808 | |
1809 | // --- Silicon (chip) | |
1810 | ||
1811 | ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1]); | |
cfce8870 | 1812 | gMC->Gspos("IR25", 2, "IDV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1813 | |
1814 | // --- Water | |
1815 | ||
1816 | ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1] * 2. + dwat[1]); | |
cfce8870 | 1817 | gMC->Gspos("IR26", 2, "IDV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1818 | |
1819 | // --- Aluminum #3 | |
1820 | ||
1821 | ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1] * 2. + dwat[1] * 2. + dtub[1]); | |
cfce8870 | 1822 | gMC->Gspos("IR27", 2, "IDV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1823 | |
1824 | // --- Place the end-ladder stuff into its mother (IDV1) | |
1825 | ||
1826 | ||
1827 | // --- Negative-Z end-ladder | |
1828 | ||
1829 | ypos = 0.; | |
1830 | zpos = -(8.7*5.-2.*1.+2.*0.1)/2.-7.5; | |
1831 | ||
1832 | // --- PCB | |
1833 | ||
1834 | xpos = dbox2[0] - dpcb[0]; | |
cfce8870 | 1835 | gMC->Gspos("IEL1", 3, "IDV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1836 | |
1837 | // --- Copper | |
1838 | ||
1839 | xpos = dbox2[0] - dpcb[0] * 2. - dcop[0]; | |
cfce8870 | 1840 | gMC->Gspos("IEL2", 3, "IDV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1841 | |
1842 | // --- Ceramics | |
1843 | ||
1844 | xpos = dbox2[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0]; | |
cfce8870 | 1845 | gMC->Gspos("IEL3", 3, "IDV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1846 | |
1847 | // --- Silicon (bus) | |
1848 | ||
1849 | xpos = dbox2[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0]; | |
cfce8870 | 1850 | gMC->Gspos("IEL4", 3, "IDV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1851 | |
1852 | // --- Positive-Z end-ladder | |
1853 | ||
1854 | //yos = 0.; | |
1855 | zpos = (8.7*5.-2.*1.+2.*0.1)/2.+7.5; | |
1856 | ||
1857 | // --- PCB | |
1858 | ||
1859 | xpos = dbox2[0] - dpcb[0]; | |
cfce8870 | 1860 | gMC->Gspos("IEL1", 4, "IDV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1861 | |
1862 | // --- Copper | |
1863 | ||
1864 | xpos = dbox2[0] - dpcb[0] * 2. - dcop[0]; | |
cfce8870 | 1865 | gMC->Gspos("IEL2", 4, "IDV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1866 | |
1867 | // --- Ceramics | |
1868 | ||
1869 | xpos = dbox2[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0]; | |
cfce8870 | 1870 | gMC->Gspos("IEL3", 4, "IDV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1871 | |
1872 | // --- Silicon (bus) | |
1873 | ||
1874 | xpos = dbox2[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0]; | |
cfce8870 | 1875 | gMC->Gspos("IEL4", 4, "IDV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 1876 | |
1877 | //--- Place the ghost volumes containing the drift ladders of layer #3 in their | |
1878 | // mother volume (IT34) | |
1879 | // Odd elements have large ribs and even elements have small ribs | |
1880 | ||
e8189707 | 1881 | for (i = 1; i <= 12; ++i) { |
fe4da5cc | 1882 | atheta = (i-1) * 30.; |
1883 | AliMatrix(idrotm[i+1299], 90., atheta, 90., atheta + 90., 0.,0.); | |
1884 | if (i % 2 == 0) { | |
1885 | rzero = 14.; | |
b3a22d72 | 1886 | xpos = rzero * TMath::Cos((i-1) * ktwopi / 12.); |
1887 | ypos = rzero * TMath::Sin((i-1) * ktwopi / 12.); | |
fe4da5cc | 1888 | zpos = 0.; |
cfce8870 | 1889 | gMC->Gspos("IDV1", i, "IT34", xpos, ypos, zpos, idrotm[i+1299], "ONLY"); |
fe4da5cc | 1890 | } else { |
1891 | rzero = 13.85; | |
b3a22d72 | 1892 | xpos = rzero * TMath::Cos((i-1) * ktwopi / 12.); |
1893 | ypos = rzero * TMath::Sin((i-1) * ktwopi / 12.); | |
fe4da5cc | 1894 | zpos = 0.; |
cfce8870 | 1895 | gMC->Gspos("IDV2", i, "IT34", xpos, ypos, zpos, idrotm[i+1299], "ONLY"); |
fe4da5cc | 1896 | } |
1897 | } | |
1898 | ||
1899 | ||
1900 | // --- Layer #4 | |
1901 | ||
1902 | // GOTO 4567 ! skip ITS layer no. 4 | |
1903 | ||
1904 | //--- Define a ghost volume containing a single ladder of layer #4 (with the | |
1905 | // smaller lenght of ribs) and fill it with air or vacuum | |
1906 | ||
1907 | dbox1[0] = 0.5+(0.0172+0.03+0.0252+0.04+0.003); | |
1908 | dbox1[1] = 3.5; | |
1909 | // the widest element is the end-ladder stuff | |
1910 | dbox1[2] = (8.7*7.-2.*0.7-2.*1.3)/2.+2.*7.5; | |
1911 | // 7.5 cm is the lenght | |
cfce8870 | 1912 | gMC->Gsvolu("IDV3", "BOX ", idtmed[228], dbox1, 3); |
fe4da5cc | 1913 | |
1914 | // --- Make the ghost volume invisible | |
1915 | ||
cfce8870 | 1916 | gMC->Gsatt("IDV3", "SEEN", 0); |
fe4da5cc | 1917 | |
1918 | // --- Define a volume containing the sensitive part of drifts | |
1919 | // (silicon, layer #4) | |
1920 | ||
1921 | dits[0] = .0172; | |
1922 | // see material budget report by G. Feofilov | |
1923 | dits[1] = 3.125; | |
1924 | dits[2] = 4.35; | |
cfce8870 | 1925 | gMC->Gsvolu("ITS4", "BOX ", idtmed[224], dits, 3); |
fe4da5cc | 1926 | |
1927 | //--- Define the part of the (smaller) rib between two sensitive parts made of | |
1928 | // carbon (layer #4) | |
1929 | ||
1930 | dsup[0] = .5 - dits[0]; | |
1931 | dsup[1] = .01; | |
1932 | dsup[2] = (8.7*7.-2.*0.7-2.*1.3)/2.+2.*7.5; | |
1933 | // 7.5 cm is the lengh | |
cfce8870 | 1934 | gMC->Gsvolu("IR31", "BOX ", idtmed[227], dsup, 3); |
fe4da5cc | 1935 | |
1936 | //--- Define the first part of the (smaller) rib between two sensitive parts | |
1937 | // made of aluminum (layer #4) | |
1938 | ||
1939 | dal1[0] = .5 - dits[0]; | |
1940 | dal1[1] = 0.00096/2.; | |
1941 | dal1[2] = (8.7*7.-2.*0.7-2.*1.3)/2.+2.*7.5; | |
1942 | // 7.5 cm is the lengh | |
cfce8870 | 1943 | gMC->Gsvolu("IR32", "BOX ", idtmed[230], dal1, 3); |
fe4da5cc | 1944 | |
1945 | //--- Define the part of the (smaller) rib between two sensitive parts made of | |
1946 | // kapton (layer #4) | |
1947 | ||
1948 | dkap[0] = .5 - dits[0]; | |
1949 | dkap[1] = 0.0317/2.; | |
1950 | dkap[2] = (8.7*7.-2.*0.7-2.*1.3)/2.+2.*7.5; | |
1951 | // 7.5 cm is the lengh | |
cfce8870 | 1952 | gMC->Gsvolu("IR33", "BOX ", idtmed[236], dkap, 3); |
fe4da5cc | 1953 | |
1954 | //--- Define the second part of the (smaller) rib between two sensitive parts | |
1955 | // made of aluminum (layer #4) | |
1956 | ||
1957 | dal2[0] = .5 - dits[0]; | |
1958 | dal2[1] = 0.0027/2.; | |
1959 | dal2[2] = (8.7*7.-2.*0.7-2.*1.3)/2.+2.*7.5; | |
1960 | // 7.5 cm is the lengh | |
cfce8870 | 1961 | gMC->Gsvolu("IR34", "BOX ", idtmed[230], dal2, 3); |
fe4da5cc | 1962 | |
1963 | // --- Define the part of the (smaller) rib between two sensitive parts | |
1964 | // made of silicon (the electronics) (layer #4) | |
1965 | ||
1966 | dchi[0] = .5 - dits[0]; | |
1967 | dchi[1] = 0.0071/2.; | |
1968 | dchi[2] = (8.7*7.-2.*0.7-2.*1.3)/2.+2.*7.5; | |
1969 | // 7.5 cm is the lengh | |
cfce8870 | 1970 | gMC->Gsvolu("IR35", "BOX ", idtmed[225], dal2, 3); |
fe4da5cc | 1971 | |
1972 | // --- Define the part of the (smaller) rib between two sensitive parts | |
1973 | // made of water (the cooler) (layer #4) | |
1974 | ||
1975 | dwat[0] = .5 - dits[0]; | |
1976 | dwat[1] = 0.0093/2.; | |
1977 | dwat[2] = (8.7*7.-2.*0.7-2.*1.3)/2.+2.*7.5; | |
1978 | // 7.5 cm is the lenght | |
cfce8870 | 1979 | gMC->Gsvolu("IR36", "BOX ", idtmed[231], dwat, 3); |
fe4da5cc | 1980 | |
1981 | //--- Define the third part of the (smaller) rib between two sensitive parts | |
1982 | // made of aluminum (the cooling tubes) (layer #4) | |
1983 | ||
1984 | dtub[0] = .5 - dits[0]; | |
1985 | dtub[1] = 0.00134/2.; | |
1986 | dtub[2] = (8.7*7.-2.*0.7-2.*1.3)/2.+2.*7.5; | |
1987 | // 7.5 cm is the lengh | |
cfce8870 | 1988 | gMC->Gsvolu("IR37", "BOX ", idtmed[230], dtub, 3); |
fe4da5cc | 1989 | |
1990 | // --- Define the part of the end-ladder stuff made of PCB (layer #4) | |
1991 | ||
1992 | dpcb[0] = .03; | |
1993 | // twice the foreseen thickness | |
1994 | dpcb[1] = 3.5; | |
1995 | dpcb[2] = 7.5; | |
cfce8870 | 1996 | gMC->Gsvolu("IEL5", "BOX ", idtmed[233], dpcb, 3); |
fe4da5cc | 1997 | |
1998 | // --- Define the part of the end-ladder stuff made of copper (layer #4) | |
1999 | ||
2000 | dcop[0] = .0252; | |
2001 | // twice the foreseen thickness | |
2002 | dcop[1] = 3.5; | |
2003 | dcop[2] = 7.5; | |
cfce8870 | 2004 | gMC->Gsvolu("IEL6", "BOX ", idtmed[234], dcop, 3); |
fe4da5cc | 2005 | |
2006 | // --- Define the part of the end-ladder stuff made of ceramics (layer #4) | |
2007 | ||
2008 | dcer[0] = .04; | |
2009 | // twice the foreseen thickness | |
2010 | dcer[1] = 3.5; | |
2011 | dcer[2] = 7.5; | |
cfce8870 | 2012 | gMC->Gsvolu("IEL7", "BOX ", idtmed[235], dcer, 3); |
fe4da5cc | 2013 | |
2014 | // --- Define the part of the end-ladder stuff made of silicon (layer #4) | |
2015 | ||
2016 | dsil[0] = .003; | |
2017 | // twice the foreseen thickness | |
2018 | dsil[1] = 3.5; | |
2019 | dsil[2] = 7.5; | |
cfce8870 | 2020 | gMC->Gsvolu("IEL8", "BOX ", idtmed[226], dsil, 3); |
fe4da5cc | 2021 | |
2022 | //--- Place the sensitive part of the drifts (smaller ribs) into its mother | |
2023 | // (IDV3) | |
2024 | ||
2025 | ypos = 0.; | |
e8189707 | 2026 | for (j = 1; j <= 7; ++j) { |
fe4da5cc | 2027 | // odd elements are down and even elements are up |
2028 | if (j == 1) { | |
2029 | xpos = dbox1[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0] * 2. - dits[0]; | |
2030 | zpos = 0. - dits[2] + .7 - dits[2] * 2. + 0. - dits[2] * 2. + 1.3 - dits[2]; | |
2031 | } else if (j == 2) { | |
2032 | xpos = -dbox1[0] + dits[0]; | |
2033 | zpos = 0. - dits[2] + .7 - dits[2] * 2. + 0. - dits[2]; | |
2034 | } else if (j == 3) { | |
2035 | xpos = dbox1[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0] * 2. - dits[0]; | |
2036 | zpos = 0. - dits[2] + .7 - dits[2]; | |
2037 | } else if (j == 4) { | |
2038 | xpos = -dbox1[0] + dits[0]; | |
2039 | zpos = 0.; | |
2040 | } else if (j == 5) { | |
2041 | xpos = dbox1[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0] * 2. - dits[0]; | |
2042 | zpos = dits[2] + 0. - .7 + dits[2]; | |
2043 | } else if (j == 6) { | |
2044 | xpos = -dbox1[0] + dits[0]; | |
2045 | zpos = dits[2] + 0. - .7 + dits[2] * 2. + 0. + dits[2]; | |
2046 | } else if (j == 7) { | |
2047 | xpos = dbox1[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0] * 2. - dits[0]; | |
2048 | zpos = dits[2] + 0. - .7 + dits[2] * 2. + 0. + dits[2] * 2. - 1.3 + dits[2]; | |
2049 | } | |
cfce8870 | 2050 | gMC->Gspos("ITS4", j, "IDV3", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2051 | } |
2052 | ||
2053 | // --- Place the smaller ribs into their mother (IDV3) | |
2054 | ||
2055 | // --- Right ribs (just a matter of convention) | |
2056 | ||
2057 | xpos = .5 - dbox1[0] + dits[0]; | |
2058 | zpos = 0.; | |
2059 | ||
2060 | // --- Carbon | |
2061 | ||
2062 | ypos = 2.81; | |
cfce8870 | 2063 | gMC->Gspos("IR31", 1, "IDV3", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2064 | |
2065 | // --- Aluminum #1 | |
2066 | ||
2067 | ypos = dsup[1] + 2.81 + dal1[1]; | |
cfce8870 | 2068 | gMC->Gspos("IR32", 1, "IDV3", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2069 | |
2070 | // --- Kapton | |
2071 | ||
2072 | ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1]; | |
cfce8870 | 2073 | gMC->Gspos("IR33", 1, "IDV3", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2074 | |
2075 | // --- Aluminum #2 | |
2076 | ||
2077 | ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1]; | |
cfce8870 | 2078 | gMC->Gspos("IR34", 1, "IDV3", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2079 | |
2080 | // --- Silicon (chip) | |
2081 | ||
2082 | ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1]; | |
cfce8870 | 2083 | gMC->Gspos("IR35", 1, "IDV3", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2084 | |
2085 | // --- Water | |
2086 | ||
2087 | ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1] * 2. + dwat[1]; | |
cfce8870 | 2088 | gMC->Gspos("IR36", 1, "IDV3", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2089 | |
2090 | // --- Aluminum #3 | |
2091 | ||
2092 | ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1] * 2. + dwat[1] * 2. | |
2093 | + dtub[1]; | |
cfce8870 | 2094 | gMC->Gspos("IR37", 1, "IDV3", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2095 | |
2096 | // --- Right ribs (just a matter of convention) | |
2097 | ||
2098 | // --- Carbon | |
2099 | ||
2100 | ypos = -2.81; | |
cfce8870 | 2101 | gMC->Gspos("IR31", 2, "IDV3", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2102 | |
2103 | // --- Aluminum #1 | |
2104 | ||
2105 | ypos = -(dsup[1] + 2.81 + dal1[1]); | |
cfce8870 | 2106 | gMC->Gspos("IR32", 2, "IDV3", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2107 | |
2108 | // --- Kapton | |
2109 | ||
2110 | ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1]); | |
cfce8870 | 2111 | gMC->Gspos("IR33", 2, "IDV3", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2112 | |
2113 | // --- Aluminum #2 | |
2114 | ||
2115 | ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * | |
2116 | 2. + dal2[1]); | |
cfce8870 | 2117 | gMC->Gspos("IR34", 2, "IDV3", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2118 | |
2119 | // --- Silicon (chip) | |
2120 | ||
2121 | ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * | |
2122 | 2. + dal2[1] * 2. + dchi[1]); | |
cfce8870 | 2123 | gMC->Gspos("IR35", 2, "IDV3", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2124 | |
2125 | // --- Water | |
2126 | ||
2127 | ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * | |
2128 | 2. + dal2[1] * 2. + dchi[1] * 2. + dwat[1]); | |
cfce8870 | 2129 | gMC->Gspos("IR36", 2, "IDV3", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2130 | |
2131 | // --- Aluminum #3 | |
2132 | ||
2133 | ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * | |
2134 | 2. + dal2[1] * 2. + dchi[1] * 2. + dwat[1] * | |
2135 | 2. + dtub[1]); | |
cfce8870 | 2136 | gMC->Gspos("IR37", 2, "IDV3", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2137 | |
2138 | // --- Place the end-ladder stuff into its mother (IDV1) | |
2139 | ||
2140 | ||
2141 | // --- Negative-Z end-ladder | |
2142 | ||
2143 | ypos = 0.; | |
2144 | zpos = -(8.7*7.-2.*0.7-2.*1.3)/2.-7.5; | |
2145 | ||
2146 | // --- PCB | |
2147 | ||
2148 | xpos = dbox1[0] - dpcb[0]; | |
cfce8870 | 2149 | gMC->Gspos("IEL5", 1, "IDV3", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2150 | |
2151 | // --- Copper | |
2152 | ||
2153 | xpos = dbox1[0] - dpcb[0] * 2. - dcop[0]; | |
cfce8870 | 2154 | gMC->Gspos("IEL6", 1, "IDV3", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2155 | |
2156 | // --- Ceramics | |
2157 | ||
2158 | xpos = dbox1[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0]; | |
cfce8870 | 2159 | gMC->Gspos("IEL7", 1, "IDV3", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2160 | |
2161 | // --- Silicon (bus) | |
2162 | ||
2163 | xpos = dbox1[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0]; | |
cfce8870 | 2164 | gMC->Gspos("IEL8", 1, "IDV3", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2165 | |
2166 | // --- Positive-Z end-ladder | |
2167 | ||
2168 | ypos = 0.; | |
2169 | zpos = (8.7*7.-2.*0.7-2.*1.3)/2.-7.5; | |
2170 | ||
2171 | // --- PCB | |
2172 | ||
2173 | xpos = dbox1[0] - dpcb[0]; | |
cfce8870 | 2174 | gMC->Gspos("IEL5", 2, "IDV3", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2175 | |
2176 | // --- Copper | |
2177 | ||
2178 | xpos = dbox1[0] - dpcb[0] * 2. - dcop[0]; | |
cfce8870 | 2179 | gMC->Gspos("IEL6", 2, "IDV3", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2180 | |
2181 | // --- Ceramics | |
2182 | ||
2183 | xpos = dbox1[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0]; | |
cfce8870 | 2184 | gMC->Gspos("IEL7", 2, "IDV3", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2185 | |
2186 | // --- Silicon (bus) | |
2187 | ||
2188 | xpos = dbox1[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0]; | |
cfce8870 | 2189 | gMC->Gspos("IEL8", 2, "IDV3", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2190 | |
2191 | //--- Define a ghost volume containing a single ladder of layer #4 (with the | |
2192 | // larger lenght of ribs) and fill it with air or vacuum | |
2193 | ||
2194 | dbox2[0] = 0.65+(0.0172+0.03+0.0252+0.04+0.003); | |
2195 | dbox2[1] = 3.5; | |
2196 | // the widest element is the end-ladder stuff | |
2197 | dbox2[2] = (8.7*7.-2.*0.7-2.*1.3)/2.+2.*7.5; | |
2198 | // 7.5 cm is the lenght | |
cfce8870 | 2199 | gMC->Gsvolu("IDV4", "BOX ", idtmed[228], dbox2, 3); |
fe4da5cc | 2200 | |
2201 | // --- Make the ghost volume invisible | |
2202 | ||
cfce8870 | 2203 | gMC->Gsatt("IDV4", "SEEN", 0); |
fe4da5cc | 2204 | |
2205 | //--- Define the part of the (larger) rib between two sensitive parts madeof | |
2206 | // carbon (layer #4) | |
2207 | ||
2208 | dsup[0] = .65 - dits[0]; | |
2209 | dsup[1] = .01; | |
2210 | dsup[2] = (8.7*7.-2.*0.7-2.*1.3)/2.+2.*7.5; | |
2211 | // 7.5 cm is the lengh | |
cfce8870 | 2212 | gMC->Gsvolu("IR41", "BOX ", idtmed[227], dsup, 3); |
fe4da5cc | 2213 | |
2214 | //--- Define the first part of the (larger) rib between two sensitive parts | |
2215 | // made of aluminum (layer #4) | |
2216 | ||
2217 | dal1[0] = .65 - dits[0]; | |
2218 | dal1[1] = 0.00096/2.; | |
2219 | dal1[2] = (8.7*7.-2.*0.7-2.*1.3)/2.+2.*7.5; | |
2220 | // 7.5 cm is the lengh | |
cfce8870 | 2221 | gMC->Gsvolu("IR42", "BOX ", idtmed[230], dal1, 3); |
fe4da5cc | 2222 | |
2223 | //--- Define the part of the (larger) rib between two sensitive parts madeof | |
2224 | // kapton (layer #4) | |
2225 | ||
2226 | dkap[0] = .65 - dits[0]; | |
2227 | dkap[1] = 0.0317/2.; | |
2228 | dkap[2] = (8.7*7.-2.*0.7-2.*1.3)/2.+2.*7.5; | |
2229 | // 7.5 cm is the lengh | |
cfce8870 | 2230 | gMC->Gsvolu("IR43", "BOX ", idtmed[236], dkap, 3); |
fe4da5cc | 2231 | |
2232 | //--- Define the second part of the (larger) rib between two sensitive parts | |
2233 | // made of aluminum (layer #4) | |
2234 | ||
2235 | dal2[0] = .65 - dits[0]; | |
2236 | dal2[1] = 0.0027/2.; | |
2237 | dal2[2] = (8.7*7.-2.*0.7-2.*1.3)/2.+2.*7.5; | |
2238 | // 7.5 cm is the lengh | |
cfce8870 | 2239 | gMC->Gsvolu("IR44", "BOX ", idtmed[230], dal2, 3); |
fe4da5cc | 2240 | |
2241 | // --- Define the part of the (larger) rib between two sensitive parts | |
2242 | // made of silicon (the electronics) (layer #4) | |
2243 | ||
2244 | dchi[0] = .65 - dits[0]; | |
2245 | dchi[1] = 0.0071/2.; | |
2246 | dchi[2] = (8.7*7.-2.*0.7-2.*1.3)/2.+2.*7.5; | |
2247 | // 7.5 cm is the lengh | |
cfce8870 | 2248 | gMC->Gsvolu("IR45", "BOX ", idtmed[225], dal2, 3); |
fe4da5cc | 2249 | |
2250 | // --- Define the part of the (larger) rib between two sensitive parts | |
2251 | // made of water (the cooler) (layer #4) | |
2252 | ||
2253 | dwat[0] = .65 - dits[0]; | |
2254 | dwat[1] = 0.0093/2.; | |
2255 | dwat[2] = (8.7*7.-2.*0.7-2.*1.3)/2.+2.*7.5; | |
2256 | // 7.5 cm is the lengh | |
cfce8870 | 2257 | gMC->Gsvolu("IR46", "BOX ", idtmed[231], dwat, 3); |
fe4da5cc | 2258 | |
2259 | //--- Define the third part of the (larger) rib between two sensitive parts | |
2260 | // made of aluminum (the cooling tubes) (layer #4) | |
2261 | ||
2262 | dtub[0] = .65 - dits[0]; | |
2263 | dtub[1] = 0.00134/2.; | |
2264 | dtub[2] = (8.7*7.-2.*0.7-2.*1.3)/2.+2.*7.5; | |
2265 | // 7.5 cm is the lengh | |
cfce8870 | 2266 | gMC->Gsvolu("IR47", "BOX ", idtmed[230], dtub, 3); |
fe4da5cc | 2267 | |
2268 | //--- Place the sensitive part of the drifts (smaller ribs) into its mother | |
2269 | // (IDV4) | |
2270 | ||
2271 | ypos = 0.; | |
e8189707 | 2272 | for (j = 1; j <= 7; ++j) { |
fe4da5cc | 2273 | // odd elements are down and even elements are up |
2274 | if (j == 1) { | |
2275 | xpos = dbox2[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0] * 2. - dits[0]; | |
2276 | zpos = 0. - dits[2] + .7 - dits[2] * 2. + 0. - dits[2] * 2. + 1.3 - dits[2]; | |
2277 | } else if (j == 2) { | |
2278 | xpos = -dbox2[0] + dits[0]; | |
2279 | zpos = 0. - dits[2] + .7 - dits[2] * 2. + 0. - dits[2]; | |
2280 | } else if (j == 3) { | |
2281 | xpos = dbox2[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0] * 2. - dits[0]; | |
2282 | zpos = 0. - dits[2] + .7 - dits[2]; | |
2283 | } else if (j == 4) { | |
2284 | xpos = -dbox2[0] + dits[0]; | |
2285 | zpos = 0.; | |
2286 | } else if (j == 5) { | |
2287 | xpos = dbox2[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0] * 2. - dits[0]; | |
2288 | zpos = dits[2] + 0. - .7 + dits[2]; | |
2289 | } else if (j == 6) { | |
2290 | xpos = -dbox2[0] + dits[0]; | |
2291 | zpos = dits[2] + 0. - .7 + dits[2] * 2. + 0. + dits[2]; | |
2292 | } else if (j == 7) { | |
2293 | xpos = dbox2[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0] * 2. - dits[0]; | |
2294 | zpos = dits[2] + 0. - .7 + dits[2] * 2. + 0. + dits[2] * 2. - 1.3 + dits[2]; | |
2295 | } | |
cfce8870 | 2296 | gMC->Gspos("ITS4", j, "IDV4", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2297 | } |
2298 | ||
2299 | // --- Place the larger ribs into their mother (IDV4) | |
2300 | ||
2301 | ||
2302 | // --- Right ribs (just a matter of convention) | |
2303 | ||
2304 | xpos = .65 - dbox2[0] + dits[0]; | |
2305 | zpos = 0.; | |
2306 | ||
2307 | // --- Carbon | |
2308 | ||
2309 | ypos = 2.81; | |
cfce8870 | 2310 | gMC->Gspos("IR41", 1, "IDV4", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2311 | |
2312 | // --- Aluminum #1 | |
2313 | ||
2314 | ypos = dsup[1] + 2.81 + dal1[1]; | |
cfce8870 | 2315 | gMC->Gspos("IR42", 1, "IDV4", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2316 | |
2317 | // --- Kapton | |
2318 | ||
2319 | ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1]; | |
cfce8870 | 2320 | gMC->Gspos("IR43", 1, "IDV4", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2321 | |
2322 | // --- Aluminum #2 | |
2323 | ||
2324 | ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1]; | |
cfce8870 | 2325 | gMC->Gspos("IR44", 1, "IDV4", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2326 | |
2327 | // --- Silicon (chip) | |
2328 | ||
2329 | ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1]; | |
cfce8870 | 2330 | gMC->Gspos("IR45", 1, "IDV4", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2331 | |
2332 | // --- Water | |
2333 | ||
2334 | ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1] * 2. + dwat[1]; | |
cfce8870 | 2335 | gMC->Gspos("IR46", 1, "IDV4", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2336 | |
2337 | // --- Aluminum #3 | |
2338 | ||
2339 | ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1] * 2. + dwat[1] * 2. | |
2340 | + dtub[1]; | |
cfce8870 | 2341 | gMC->Gspos("IR47", 1, "IDV4", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2342 | |
2343 | // --- Right ribs (just a matter of convention) | |
2344 | ||
2345 | // --- Carbon | |
2346 | ||
2347 | ypos = -2.81; | |
cfce8870 | 2348 | gMC->Gspos("IR41", 2, "IDV4", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2349 | |
2350 | // --- Aluminum #1 | |
2351 | ||
2352 | ypos = -(dsup[1] + 2.81 + dal1[1]); | |
cfce8870 | 2353 | gMC->Gspos("IR42", 2, "IDV4", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2354 | |
2355 | // --- Kapton | |
2356 | ||
2357 | ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1]); | |
cfce8870 | 2358 | gMC->Gspos("IR43", 2, "IDV4", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2359 | |
2360 | // --- Aluminum #2 | |
2361 | ||
2362 | ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * | |
2363 | 2. + dal2[1]); | |
cfce8870 | 2364 | gMC->Gspos("IR44", 2, "IDV4", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2365 | |
2366 | // --- Silicon (chip) | |
2367 | ||
2368 | ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * | |
2369 | 2. + dal2[1] * 2. + dchi[1]); | |
cfce8870 | 2370 | gMC->Gspos("IR45", 2, "IDV4", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2371 | |
2372 | // --- Water | |
2373 | ||
2374 | ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * | |
2375 | 2. + dal2[1] * 2. + dchi[1] * 2. + dwat[1]); | |
cfce8870 | 2376 | gMC->Gspos("IR46", 2, "IDV4", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2377 | |
2378 | // --- Aluminum #3 | |
2379 | ||
2380 | ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * | |
2381 | 2. + dal2[1] * 2. + dchi[1] * 2. + dwat[1] * 2. + dtub[1]); | |
cfce8870 | 2382 | gMC->Gspos("IR47", 2, "IDV4", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2383 | |
2384 | // --- Place the end-ladder stuff into its mother (IDV1) | |
2385 | ||
2386 | ||
2387 | // --- Negative-Z end-ladder | |
2388 | ||
2389 | ypos = 0.; | |
2390 | zpos = -(8.7*7.-2.*0.7-2.*1.3)/2.-7.5; | |
2391 | ||
2392 | // --- PCB | |
2393 | ||
2394 | xpos = dbox2[0] - dpcb[0]; | |
cfce8870 | 2395 | gMC->Gspos("IEL5", 3, "IDV4", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2396 | |
2397 | // --- Copper | |
2398 | ||
2399 | xpos = dbox2[0] - dpcb[0] * 2. - dcop[0]; | |
cfce8870 | 2400 | gMC->Gspos("IEL6", 3, "IDV4", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2401 | |
2402 | // --- Ceramics | |
2403 | ||
2404 | xpos = dbox2[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0]; | |
cfce8870 | 2405 | gMC->Gspos("IEL7", 3, "IDV4", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2406 | |
2407 | // --- Silicon (bus) | |
2408 | ||
2409 | xpos = dbox2[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0]; | |
cfce8870 | 2410 | gMC->Gspos("IEL8", 3, "IDV4", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2411 | |
2412 | // --- Positive-Z end-ladder | |
2413 | ||
2414 | //yos = 0.; | |
2415 | zpos = (8.7*7.-2.*0.7-2.*1.3)/2.-7.5; | |
2416 | ||
2417 | // --- PCB | |
2418 | ||
2419 | xpos = dbox2[0] - dpcb[0]; | |
cfce8870 | 2420 | gMC->Gspos("IEL5", 4, "IDV4", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2421 | |
2422 | // --- Copper | |
2423 | ||
2424 | xpos = dbox2[0] - dpcb[0] * 2. - dcop[0]; | |
cfce8870 | 2425 | gMC->Gspos("IEL6", 4, "IDV4", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2426 | |
2427 | // --- Ceramics | |
2428 | ||
2429 | xpos = dbox2[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0]; | |
cfce8870 | 2430 | gMC->Gspos("IEL7", 4, "IDV4", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2431 | |
2432 | // --- Silicon (bus) | |
2433 | ||
2434 | xpos = dbox2[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0]; | |
cfce8870 | 2435 | gMC->Gspos("IEL8", 4, "IDV4", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2436 | |
2437 | //--- Place the ghost volumes containing the drift ladders of layer #4 in their | |
2438 | // mother volume (IT34) | |
2439 | // Odd elements have large ribs and even elements have small ribs | |
2440 | ||
e8189707 | 2441 | for (i = 1; i <= 24; ++i) { |
fe4da5cc | 2442 | atheta = (i-1) * 15.; |
2443 | AliMatrix(idrotm[i+1399], 90., atheta, 90., atheta + 90., 0.,0.); | |
2444 | if (i % 2 == 0) { | |
2445 | rzero = 23.5; | |
b3a22d72 | 2446 | xpos = rzero * TMath::Cos((i-1) * ktwopi / 24.); |
2447 | ypos = rzero * TMath::Sin((i-1) * ktwopi / 24.); | |
fe4da5cc | 2448 | zpos = 0.; |
cfce8870 | 2449 | gMC->Gspos("IDV3", i, "IT34", xpos, ypos, zpos, idrotm[i+1399], "ONLY"); |
fe4da5cc | 2450 | } else { |
2451 | rzero = (24.0+22.8)/2.; | |
b3a22d72 | 2452 | xpos = rzero * TMath::Cos((i-1) * ktwopi / 24.); |
2453 | ypos = rzero * TMath::Sin((i-1) * ktwopi / 24.); | |
fe4da5cc | 2454 | zpos = 0.; |
cfce8870 | 2455 | gMC->Gspos("IDV4", i, "IT34", xpos, ypos, zpos, idrotm[i+1399], "ONLY"); |
fe4da5cc | 2456 | } |
2457 | } | |
2458 | ||
2459 | //************************************************************************ | |
2460 | //* * | |
2461 | //* S T R I P S * | |
2462 | //* =========== * | |
2463 | //* * | |
2464 | //************************************************************************ | |
2465 | ||
2466 | // --- Define SSD with the 35+39 lay-out | |
2467 | ||
58005f18 | 2468 | if (fMinorVersionV3 < 3) { |
fe4da5cc | 2469 | |
2470 | //--- Define ghost volume containing the Strip Detectors and fill it with air | |
2471 | // or vacuum | |
2472 | ||
2473 | xxm = (49.999-3.)/(70.-25.); | |
2474 | dgh[0] = 0.; | |
2475 | dgh[1] = 360.; | |
2476 | dgh[2] = 4.; | |
2477 | dgh[3] = -25.-(9.-3.01)/xxm-(9.01-9.)/xxm-(27.-9.01)/xxm- | |
2478 | (37.-27)/xxm-(49.998-37.)/xxm; | |
2479 | dgh[4] = 49.998; | |
2480 | dgh[5] = 49.998; | |
2481 | dgh[6] = -25.-(9.-3.01)/xxm-(9.01-9.)/xxm-(27.-9.01)/xxm- | |
2482 | (37.-27)/xxm; | |
2483 | dgh[7] = 37.; | |
2484 | dgh[8] = 49.998; | |
2485 | dgh[9] = 25.+(9.-3.01)/xxm+(9.01-9.)/xxm+(27.-9.01)/xxm+ | |
2486 | (37.-27)/xxm; | |
2487 | dgh[10] = 37.; | |
2488 | dgh[11] = 49.998; | |
2489 | dgh[12] = 25.+(9.-3.01)/xxm+(9.01-9.)/xxm+(27.-9.01)/xxm+ | |
2490 | (37.-27)/xxm+(49.998-37.)/xxm; | |
2491 | dgh[13] = 49.998; | |
2492 | dgh[14] = 49.998; | |
cfce8870 | 2493 | gMC->Gsvolu("IT56", "PCON", idtmed[275], dgh, 15); |
2494 | gMC->Gspos("IT56", 1, "ITSV", 0., 0., 0., 0, "ONLY"); | |
2495 | gMC->Gsatt("IT56", "SEEN", 0); | |
fe4da5cc | 2496 | |
2497 | // --- Layer #5 | |
2498 | ||
2499 | // GOTO 5678 ! skip ITS layer no. 5 | |
2500 | ||
2501 | //--- Define a ghost volume containing a single ladder of layer #5 andfill | |
2502 | // it with air or vacuum | |
2503 | ||
2504 | dbox1[0] = (0.0600+2.*0.0150)/2.; | |
2505 | dbox1[1] = 3.75; | |
2506 | dbox1[2] = 90.22/2.; | |
cfce8870 | 2507 | gMC->Gsvolu("ISV1", "BOX ", idtmed[253], dbox1, 3); |
fe4da5cc | 2508 | |
2509 | // --- Make the ghost volume invisible | |
2510 | ||
cfce8870 | 2511 | gMC->Gsatt("ISV1", "SEEN", 0); |
fe4da5cc | 2512 | |
2513 | // --- Define a ghost volume containing the electronics and cooling of | |
2514 | // a single ladder of layer #5 and fill it with air or vacuum | |
2515 | ||
2516 | dsrv[0] = (TMath::Sqrt(3.) / 2. * 4.2 + .47 + .05) / 2.; | |
2517 | dsrv[1] = 3.75; | |
2518 | dsrv[2] = 90.22/2.; | |
cfce8870 | 2519 | gMC->Gsvolu("SSV1", "BOX ", idtmed[253], dsrv, 3); |
fe4da5cc | 2520 | |
2521 | // --- Make the ghost volume invisible | |
2522 | ||
cfce8870 | 2523 | gMC->Gsatt("SSV1", "SEEN", 0); |
fe4da5cc | 2524 | |
2525 | // --- Define a ghost volume containing the end-ladder stuff of | |
2526 | // a single ladder of layer #5 and fill it with air or vacuum | |
2527 | ||
2528 | dela[0] = 2.; | |
2529 | dela[1] = 3.5; | |
2530 | dela[2] = 4.; | |
cfce8870 | 2531 | gMC->Gsvolu("ELL5", "BOX ", idtmed[253], dela, 3); |
fe4da5cc | 2532 | |
2533 | // --- Make the ghost volume invisible | |
2534 | ||
cfce8870 | 2535 | gMC->Gsatt("ELL5", "SEEN", 0); |
fe4da5cc | 2536 | |
2537 | // --- Define a volume containing the sensitive part of the strips | |
2538 | // (silicon, layer #5) | |
2539 | ||
2540 | dits[0] = .015; | |
2541 | dits[1] = 3.75; | |
2542 | dits[2] = 2.1; | |
cfce8870 | 2543 | gMC->Gsvolu("ITS5", "BOX ", idtmed[249], dits, 3); |
fe4da5cc | 2544 | |
2545 | // --- Define a volume containing the electronics of the strips | |
2546 | // (silicon, layer #5) | |
2547 | ||
2548 | dchi[0] = .02; | |
2549 | dchi[1] = 3.4; | |
2550 | dchi[2] = .525; | |
cfce8870 | 2551 | gMC->Gsvolu("SCH5", "BOX ", idtmed[250], dchi, 3); |
fe4da5cc | 2552 | |
2553 | // --- Define the cooling tubes (aluminum, layer #5) | |
2554 | ||
2555 | dtub[0] = .09; | |
2556 | dtub[1] = dtub[0] + .01; | |
2557 | dtub[2] = 90.22/2.; | |
cfce8870 | 2558 | gMC->Gsvolu("STB5", "TUBE", idtmed[255], dtub, 3); |
fe4da5cc | 2559 | |
2560 | // --- Define the cooling fluid (water or freon, layer #5) | |
2561 | ||
2562 | dwat[0] = 0.; | |
2563 | dwat[1] = .09; | |
2564 | dwat[2] = 90.22/2.; | |
cfce8870 | 2565 | gMC->Gsvolu("SWT5", "TUBE", idtmed[256], dwat, 3); |
fe4da5cc | 2566 | // CALL GSVOLU('SWT5','TUBE',IDTMED(258),DWAT,3,IOUT) ! freon |
2567 | ||
2568 | //--- Define the (triangular) element of the heat bridge (carbon, layer #5) | |
2569 | ||
2570 | // water | |
2571 | dfra[0] = 120.; | |
2572 | dfra[1] = 360.; | |
2573 | dfra[2] = 3.; | |
2574 | dfra[3] = 2.; | |
2575 | dfra[4] = -.015; | |
2576 | dfra[5] = TMath::Sqrt(3.) * 4.2 / 6.; | |
2577 | dfra[6] = dfra[5] + .03; | |
2578 | dfra[7] = .015; | |
2579 | dfra[8] = dfra[5]; | |
2580 | dfra[9] = dfra[6]; | |
cfce8870 | 2581 | gMC->Gsvolu("SFR5", "PGON", idtmed[252], dfra, 10); |
fe4da5cc | 2582 | |
2583 | // --- Define the element connecting the triangles of the heat bridge | |
2584 | // (carbon, layer #5) | |
2585 | ||
2586 | dcei[0] = 0.; | |
2587 | dcei[1] = .03; | |
2588 | dcei[2] = 90.22/2.; | |
cfce8870 | 2589 | gMC->Gsvolu("SCE5", "TUBE", idtmed[252], dcei, 3); |
fe4da5cc | 2590 | |
2591 | // --- Define the part of the end-ladder stuff made of plastic (G10FR4) | |
2592 | // (layer #5) | |
2593 | ||
2594 | dpla[0] = (10./(8.*7.))/2.; | |
2595 | dpla[1] = 3.5; | |
2596 | dpla[2] = 4.; | |
cfce8870 | 2597 | gMC->Gsvolu("EPL5", "BOX ", idtmed[262], dpla, 3); |
fe4da5cc | 2598 | |
2599 | // --- Define the part of the end-ladder stuff made of copper (layer #5) | |
2600 | ||
2601 | dcop[0] = (2./(8.*7.))/2.; | |
2602 | dcop[1] = 3.5; | |
2603 | dcop[2] = 4.; | |
cfce8870 | 2604 | gMC->Gsvolu("ECU5", "BOX ", idtmed[259], dcop, 3); |
fe4da5cc | 2605 | |
2606 | // --- Define the part of the end-ladder stuff made of epoxy (layer #5) | |
2607 | ||
2608 | depx[0] = (30./(8.*7.))/2.; | |
2609 | depx[1] = 3.5; | |
2610 | depx[2] = 4.; | |
cfce8870 | 2611 | gMC->Gsvolu("EPX5", "BOX ", idtmed[262], depx, 3); |
fe4da5cc | 2612 | |
2613 | // --- Define the part of the end-ladder stuff made of silicon (bus) | |
2614 | // (layer #5) | |
2615 | ||
2616 | dsil[0] = (20./(8.*7.))/2.; | |
2617 | dsil[1] = 3.5; | |
2618 | dsil[2] = 4.; | |
cfce8870 | 2619 | gMC->Gsvolu("ESI5", "BOX ", idtmed[251], dsil, 3); |
fe4da5cc | 2620 | |
2621 | // --- Place the end-ladder stuff into its mother (ELL5) | |
2622 | ||
2623 | sep = (4. - (dpla[0] + dcop[0] + depx[0] + dsil[0]) * 2.) / 3.; | |
2624 | ypos = 0.; | |
2625 | zpos = 0.; | |
2626 | ||
2627 | // --- Plastic | |
2628 | ||
2629 | xpos = -dela[0] + dpla[0]; | |
cfce8870 | 2630 | gMC->Gspos("EPL5", 1, "ELL5", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2631 | |
2632 | // --- Copper | |
2633 | ||
2634 | xpos = -dela[0] + dpla[0] * 2. + sep + dcop[0]; | |
cfce8870 | 2635 | gMC->Gspos("ECU5", 1, "ELL5", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2636 | |
2637 | // --- Epoxy | |
2638 | ||
2639 | xpos = -dela[0] + dpla[0] * 2. + sep + dcop[0] * 2. + sep + depx[0]; | |
cfce8870 | 2640 | gMC->Gspos("EPX5", 1, "ELL5", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2641 | |
2642 | // --- Silicon (bus) | |
2643 | ||
2644 | xpos = -dela[0] + dpla[0] * 2. + sep + dcop[0] * 2. + sep + depx[0] * 2. + sep + dsil[0]; | |
cfce8870 | 2645 | gMC->Gspos("ESI5", 1, "ELL5", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2646 | |
2647 | // --- Place the sensitive part of the strips into its mother (ISV1) | |
2648 | ||
2649 | ypos = 0.; | |
e8189707 | 2650 | for (j = 1; j <= 23; ++j) { |
fe4da5cc | 2651 | if (j % 2 == 0) xpos = dbox1[0] - dits[0]; |
2652 | else xpos = -dbox1[0] + dits[0]; | |
2653 | zpos = ((j - 1) - 11.) * 3.91; | |
cfce8870 | 2654 | gMC->Gspos("ITS5", j, "ISV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2655 | } |
2656 | ||
2657 | // --- Place the electronics of the strips into its mother (SSV1) | |
2658 | ||
2659 | ypos = 0.; | |
e8189707 | 2660 | for (j = 1; j <= 23; ++j) { |
fe4da5cc | 2661 | if (j % 2 == 0) xpos = -dsrv[0] + .28; |
2662 | else xpos = -dsrv[0] + .28 - dits[0] * 2. - .03; | |
2663 | zpos = ((j - 1) - 11.) * 3.91 + .85; | |
cfce8870 | 2664 | gMC->Gspos("SCH5", j, "SSV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2665 | } |
2666 | ||
2667 | //--- Place the cooling tubes and the cooling fluid into their mother (SSV1) | |
2668 | ||
2669 | xpos = -dsrv[0] + .41; | |
2670 | zpos = 0.; | |
2671 | ||
2672 | // --- Left tube (just a matter of convention) | |
2673 | ||
2674 | ypos = -2.25-0.1; | |
cfce8870 | 2675 | gMC->Gspos("STB5", 1, "SSV1", xpos, ypos, zpos, 0, "ONLY"); |
2676 | gMC->Gspos("SWT5", 1, "SSV1", xpos, ypos, zpos, 0, "ONLY"); | |
fe4da5cc | 2677 | |
2678 | // --- Right tube (just a matter of convention) | |
2679 | ||
2680 | ypos = 2.25+0.1; | |
cfce8870 | 2681 | gMC->Gspos("STB5", 2, "SSV1", xpos, ypos, zpos, 0, "ONLY"); |
2682 | gMC->Gspos("SWT5", 2, "SSV1", xpos, ypos, zpos, 0, "ONLY"); | |
fe4da5cc | 2683 | |
2684 | // --- Place the heat bridge elements into their mother (SSV1) | |
2685 | ||
2686 | xpos = -dsrv[0] + .47 + TMath::Sqrt(3.) / 6. * 4.2; | |
2687 | ypos = 0.; | |
e8189707 | 2688 | for (j = 1; j <= 23; ++j) { // Loop was to 24. Changed to 23 to fit inside |
3a15a09e | 2689 | // volume SSV1. This is the same number of |
2690 | // elements as SCH5 above. Done Bjorn S. Nilsen | |
2691 | // April 4 2000. Error found by Ivana | |
2692 | // Hrivnacova March 29 2000. | |
fe4da5cc | 2693 | zpos = ((j - 1) - 11.) * 3.91 - -4.2/2.; |
cfce8870 | 2694 | gMC->Gspos("SFR5", j, "SSV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2695 | } |
2696 | ||
2697 | // --- Place the elements connecting the triangles of the heat bridge | |
2698 | // into their mother (SSV1) | |
2699 | ||
2700 | zpos = 0.; | |
2701 | ||
2702 | // --- Left element (just a matter of convention) | |
2703 | ||
2704 | xpos = -dsrv[0] + .47; | |
2705 | ypos = -(2.1+0.015); | |
cfce8870 | 2706 | gMC->Gspos("SCE5", 1, "SSV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2707 | |
2708 | // --- Right element | |
2709 | ||
2710 | xpos = -dsrv[0] + .47; | |
2711 | ypos = 2.1+0.015; | |
cfce8870 | 2712 | gMC->Gspos("SCE5", 2, "SSV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2713 | |
2714 | // --- Top element | |
2715 | ||
2716 | xpos = -dsrv[0] + .47 + TMath::Sqrt(3.) / 2. * 4.2 + .015; | |
2717 | ypos = 0.; | |
cfce8870 | 2718 | gMC->Gspos("SCE5", 3, "SSV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2719 | |
2720 | // --- Place the ghost volumes containing the strip ladders (ISV1), | |
2721 | // electronics/cooling (SSV1) and end-ladder stuff (ELL5) of layer #5 in | |
2722 | // their mother volume (IT56) | |
2723 | ||
2724 | offset1 = TMath::ATan2(.9, 40.); | |
2725 | offset2 = 5.2; | |
2726 | rzero = dbox1[0] + 40.; | |
2727 | runo = dbox1[0] * 2. + 40. + dsrv[0]; | |
2728 | rtwo = dbox1[0] * 2. + 40. + dela[0]; | |
e8189707 | 2729 | for (i = 1; i <= 35; ++i) { |
b3a22d72 | 2730 | atheta = (i-1) * ktwopi * kraddeg / 35. + offset2; |
fe4da5cc | 2731 | AliMatrix(idrotm[i+1499], 90., atheta, 90., atheta + 90., 0., 0.); |
2732 | ||
2733 | // --- Strip ladders | |
2734 | ||
b3a22d72 | 2735 | xpos = rzero * TMath::Cos((i-1) * ktwopi / 35. + offset1); |
2736 | ypos = rzero * TMath::Sin((i-1) * ktwopi / 35. + offset1); | |
fe4da5cc | 2737 | zpos = 0.; |
cfce8870 | 2738 | gMC->Gspos("ISV1", i, "IT56", xpos, ypos, zpos, idrotm[i+1499], "ONLY"); |
fe4da5cc | 2739 | |
2740 | // --- Electronics/cooling | |
2741 | ||
b3a22d72 | 2742 | xpos = runo * TMath::Cos((i-1) * ktwopi / 35. + offset1); |
2743 | ypos = runo * TMath::Sin((i-1) * ktwopi / 35. + offset1); | |
fe4da5cc | 2744 | zpos = 0.; |
cfce8870 | 2745 | gMC->Gspos("SSV1", i, "IT56", xpos, ypos, zpos, idrotm[i+1499], "ONLY"); |
fe4da5cc | 2746 | |
2747 | // --- End-ladders (nagative-Z and positive-Z) | |
2748 | ||
b3a22d72 | 2749 | xpos = rtwo * TMath::Cos((i-1) * ktwopi / 35. + offset1); |
2750 | ypos = rtwo * TMath::Sin((i-1) * ktwopi / 35. + offset1); | |
fe4da5cc | 2751 | zpos = -(dbox1[2] + dela[2] + 6.); |
cfce8870 | 2752 | gMC->Gspos("ELL5", i, "IT56", xpos, ypos, zpos, idrotm[i+1499], "ONLY"); |
fe4da5cc | 2753 | zpos = dbox1[2] + dela[2] + 6.; |
cfce8870 | 2754 | gMC->Gspos("ELL5", i + 35, "IT56", xpos, ypos, zpos, idrotm[i+1499], "ONLY"); |
fe4da5cc | 2755 | } |
2756 | ||
2757 | ||
2758 | // --- Layer #6 | |
2759 | ||
2760 | // GOTO 5778 ! skip ITS layer no. 6 | |
2761 | ||
2762 | //--- Define a ghost volume containing a single ladder of layer #6 andfill | |
2763 | // it with air or vacuum | |
2764 | ||
2765 | dbox2[0] = (0.0600+2.*0.0150)/2.; | |
2766 | dbox2[1] = 3.75; | |
2767 | dbox2[2] = 101.95/2.; | |
cfce8870 | 2768 | gMC->Gsvolu("ISV2", "BOX ", idtmed[253], dbox2, 3); |
fe4da5cc | 2769 | |
2770 | // --- Make the ghost volume invisible | |
2771 | ||
cfce8870 | 2772 | gMC->Gsatt("ISV2", "SEEN", 0); |
fe4da5cc | 2773 | |
2774 | // --- Define a ghost volume containing the electronics and cooling of | |
2775 | // a single ladder of layer #6 and fill it with air or vacuum | |
2776 | ||
2777 | dsrv[0] = (TMath::Sqrt(3.) / 2. * 4.2 + .47 + .05) / 2.; | |
2778 | dsrv[1] = 3.75; | |
2779 | dsrv[2] = 101.95/2.; | |
cfce8870 | 2780 | gMC->Gsvolu("SSV2", "BOX ", idtmed[253], dsrv, 3); |
fe4da5cc | 2781 | |
2782 | // --- Make the ghost volume invisible | |
2783 | ||
cfce8870 | 2784 | gMC->Gsatt("SSV2", "SEEN", 0); |
fe4da5cc | 2785 | |
2786 | // --- Define a ghost volume containing the end-ladder stuff of | |
2787 | // a single ladder of layer #6 and fill it with air or vacuum | |
2788 | ||
2789 | dela[0] = 2.; | |
2790 | dela[1] = 3.5; | |
2791 | dela[2] = 4.; | |
cfce8870 | 2792 | gMC->Gsvolu("ELL6", "BOX ", idtmed[253], dela, 3); |
fe4da5cc | 2793 | |
2794 | // --- Make the ghost volume invisible | |
2795 | ||
cfce8870 | 2796 | gMC->Gsatt("ELL6", "SEEN", 0); |
fe4da5cc | 2797 | |
2798 | // --- Define a volume containing the sensitive part of the strips | |
2799 | // (silicon, layer #6) | |
2800 | ||
2801 | dits[0] = .015; | |
2802 | dits[1] = 3.75; | |
2803 | dits[2] = 2.1; | |
cfce8870 | 2804 | gMC->Gsvolu("ITS6", "BOX ", idtmed[249], dits, 3); |
fe4da5cc | 2805 | |
2806 | // --- Define a volume containing the electronics of the strips | |
2807 | // (silicon, layer #6) | |
2808 | ||
2809 | dchi[0] = .02; | |
2810 | dchi[1] = 3.4; | |
2811 | dchi[2] = .525; | |
cfce8870 | 2812 | gMC->Gsvolu("SCH6", "BOX ", idtmed[250], dchi, 3); |
fe4da5cc | 2813 | |
2814 | // --- Define the cooling tubes (aluminum, layer #6) | |
2815 | ||
2816 | dtub[0] = .09; | |
2817 | dtub[1] = dtub[0] + .01; | |
2818 | dtub[2] = 101.95/2.; | |
cfce8870 | 2819 | gMC->Gsvolu("STB6", "TUBE", idtmed[255], dtub, 3); |
fe4da5cc | 2820 | |
2821 | // --- Define the cooling fluid (water or freon, layer #6) | |
2822 | ||
2823 | dwat[0] = 0.; | |
2824 | dwat[1] = .09; | |
2825 | dwat[2] = 101.95/2.; | |
cfce8870 | 2826 | gMC->Gsvolu("SWT6", "TUBE", idtmed[256], dwat, 3); |
fe4da5cc | 2827 | // CALL GSVOLU('SWT6','TUBE',IDTMED(258),DWAT,3,IOUT) ! freon |
2828 | ||
2829 | //--- Define the (triangular) element of the heat bridge (carbon, layer #6) | |
2830 | ||
2831 | // water | |
2832 | dfra[0] = 120.; | |
2833 | dfra[1] = 360.; | |
2834 | dfra[2] = 3.; | |
2835 | dfra[3] = 2.; | |
2836 | dfra[4] = -.015; | |
2837 | dfra[5] = TMath::Sqrt(3.) * 4.2 / 6.; | |
2838 | dfra[6] = dfra[5] + .03; | |
2839 | dfra[7] = .015; | |
2840 | dfra[8] = dfra[5]; | |
2841 | dfra[9] = dfra[6]; | |
cfce8870 | 2842 | gMC->Gsvolu("SFR6", "PGON", idtmed[252], dfra, 10); |
fe4da5cc | 2843 | |
2844 | // --- Define the element connecting the triangles of the heat bridge | |
2845 | // (carbon, layer #6) | |
2846 | ||
2847 | dcei[0] = 0.; | |
2848 | dcei[1] = .03; | |
2849 | dcei[2] = 101.95/2.; | |
cfce8870 | 2850 | gMC->Gsvolu("SCE6", "TUBE", idtmed[252], dcei, 3); |
fe4da5cc | 2851 | |
2852 | // --- Define the part of the end-ladder stuff made of plastic (G10FR4) | |
2853 | // (layer #6) | |
2854 | ||
2855 | dpla[0] = (10./(8.*7.))/2.; | |
2856 | dpla[1] = 3.5; | |
2857 | dpla[2] = 4.; | |
cfce8870 | 2858 | gMC->Gsvolu("EPL6", "BOX ", idtmed[262], dpla, 3); |
fe4da5cc | 2859 | |
2860 | // --- Define the part of the end-ladder stuff made of copper (layer #6) | |
2861 | ||
2862 | dcop[0] = (2./(8.*7.))/2.; | |
2863 | dcop[1] = 3.5; | |
2864 | dcop[2] = 4.; | |
cfce8870 | 2865 | gMC->Gsvolu("ECU6", "BOX ", idtmed[259], dcop, 3); |
fe4da5cc | 2866 | |
2867 | // --- Define the part of the end-ladder stuff made of epoxy (layer #6) | |
2868 | ||
2869 | depx[0] = (30./(8.*7.))/2.; | |
2870 | depx[1] = 3.5; | |
2871 | depx[2] = 4.; | |
cfce8870 | 2872 | gMC->Gsvolu("EPX6", "BOX ", idtmed[262], depx, 3); |
fe4da5cc | 2873 | |
2874 | // --- Define the part of the end-ladder stuff made of silicon (bus) | |
2875 | // (layer #6) | |
2876 | ||
2877 | dsil[0] = (20./(8.*7.))/2.; | |
2878 | dsil[1] = 3.5; | |
2879 | dsil[2] = 4.; | |
cfce8870 | 2880 | gMC->Gsvolu("ESI6", "BOX ", idtmed[251], dsil, 3); |
fe4da5cc | 2881 | |
2882 | // --- Place the end-ladder stuff into its mother (ELL5) | |
2883 | ||
2884 | sep = (4. - (dpla[0] + dcop[0] + depx[0] + dsil[0]) * 2.) / 3.; | |
2885 | ypos = 0.; | |
2886 | zpos = 0.; | |
2887 | ||
2888 | // --- Plastic | |
2889 | ||
2890 | xpos = -dela[0] + dpla[0]; | |
cfce8870 | 2891 | gMC->Gspos("EPL6", 1, "ELL6", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2892 | |
2893 | // --- Copper | |
2894 | ||
2895 | xpos = -dela[0] + dpla[0] * 2. + sep + dcop[0]; | |
cfce8870 | 2896 | gMC->Gspos("ECU6", 1, "ELL6", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2897 | |
2898 | // --- Epoxy | |
2899 | ||
2900 | xpos = -dela[0] + dpla[0] * 2. + sep + dcop[0] * 2. + sep + depx[0]; | |
cfce8870 | 2901 | gMC->Gspos("EPX6", 1, "ELL6", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2902 | |
2903 | // --- Silicon (bus) | |
2904 | ||
2905 | xpos = -dela[0] + dpla[0] * 2. + sep + dcop[0] * 2. + sep + depx[0] * 2. + sep + dsil[0]; | |
cfce8870 | 2906 | gMC->Gspos("ESI6", 1, "ELL6", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2907 | |
2908 | // --- Place the sensitive part of the strips into its mother (ISV2) | |
2909 | ||
2910 | ypos = 0.; | |
e8189707 | 2911 | for (j = 1; j <= 26; ++j) { |
fe4da5cc | 2912 | if (j % 2 == 0) xpos = dbox2[0] - dits[0]; |
2913 | else xpos = -dbox2[0] + dits[0]; | |
2914 | zpos = ((j - 1) - 12.) * 3.91 - 1.96; | |
cfce8870 | 2915 | gMC->Gspos("ITS6", j, "ISV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2916 | } |
2917 | ||
2918 | // --- Place the electronics of the strips into its mother (SSV2) | |
2919 | ||
2920 | ypos = 0.; | |
e8189707 | 2921 | for (j = 1; j <= 26; ++j) { |
fe4da5cc | 2922 | if (j % 2 == 0) xpos = -dsrv[0] + .28; |
2923 | else xpos = -dsrv[0] + .28 - dits[0] * 2. - .03; | |
2924 | zpos = ((j - 1) - 12.) * 3.91 - 1.96 + .85; | |
cfce8870 | 2925 | gMC->Gspos("SCH5", j, "SSV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2926 | } |
2927 | ||
2928 | //--- Place the cooling tubes and the cooling fluid into their mother (SSV1) | |
2929 | ||
2930 | xpos = -dsrv[0] + .41; | |
2931 | zpos = 0.; | |
2932 | ||
2933 | // --- Left tube (just a matter of convention) | |
2934 | ||
2935 | ypos = -2.25-0.1; | |
cfce8870 | 2936 | gMC->Gspos("STB6", 1, "SSV2", xpos, ypos, zpos, 0, "ONLY"); |
2937 | gMC->Gspos("SWT6", 1, "SSV2", xpos, ypos, zpos, 0, "ONLY"); | |
fe4da5cc | 2938 | |
2939 | // --- Right tube (just a matter of convention) | |
2940 | ||
2941 | ypos = 2.25+0.; | |
cfce8870 | 2942 | gMC->Gspos("STB6", 2, "SSV2", xpos, ypos, zpos, 0, "ONLY"); |
2943 | gMC->Gspos("SWT6", 2, "SSV2", xpos, ypos, zpos, 0, "ONLY"); | |
fe4da5cc | 2944 | |
2945 | // --- Place the heat bridge elements into their mother (SSV2) | |
2946 | ||
2947 | xpos = -dsrv[0] + .47 + TMath::Sqrt(3.) / 6. * 4.2; | |
2948 | ypos = 0.; | |
e8189707 | 2949 | for (j = 1; j <= 27; ++j) { |
fe4da5cc | 2950 | zpos = ((j - 1) - 12.) * 3.91 - 1.96 - 4.2/2.; |
cfce8870 | 2951 | gMC->Gspos("SFR6", j, "SSV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2952 | } |
2953 | ||
2954 | // --- Place the elements connecting the triangles of the heat bridge | |
2955 | // into their mother (SSV2) | |
2956 | ||
2957 | zpos = 0.; | |
2958 | ||
2959 | // --- Left element (just a matter of convention) | |
2960 | ||
2961 | xpos = -dsrv[0] + .47; | |
2962 | ypos = -(2.1+0.015); | |
cfce8870 | 2963 | gMC->Gspos("SCE6", 1, "SSV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2964 | |
2965 | // --- Right element | |
2966 | ||
2967 | xpos = -dsrv[0] + .47; | |
2968 | ypos = 2.1+0.015; | |
cfce8870 | 2969 | gMC->Gspos("SCE6", 2, "SSV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2970 | |
2971 | // --- Top element | |
2972 | ||
2973 | xpos = -dsrv[0] + .47 + TMath::Sqrt(3.) / 2. * 4.2 + .015; | |
2974 | ypos = 0.; | |
cfce8870 | 2975 | gMC->Gspos("SCE6", 3, "SSV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 2976 | |
2977 | // --- Place the ghost volumes containing the strip ladders (ISV2), | |
2978 | // electronics/cooling (SSV2) and end-ladder stuff (ELL6) of layer #6 in | |
2979 | // their mother volume (IT56) | |
2980 | ||
2981 | offset1 = TMath::ATan2(1., 45.); | |
2982 | offset2 = 5.2; | |
2983 | rzero = dbox2[0] + 45.; | |
2984 | runo = dbox2[0] * 2. + 45. + dsrv[0]; | |
2985 | rtwo = dbox2[0] * 2. + 45. + dela[0]; | |
e8189707 | 2986 | for (i = 1; i <= 39; ++i) { |
b3a22d72 | 2987 | atheta = (i-1) * ktwopi * kraddeg / 39. + offset2; |
fe4da5cc | 2988 | AliMatrix(idrotm[i+1599], 90., atheta, 90., atheta + 90., 0., 0.); |
2989 | ||
2990 | // --- Strip ladders | |
2991 | ||
b3a22d72 | 2992 | xpos = rzero * TMath::Cos((i-1) * ktwopi / 39. + offset1); |
2993 | ypos = rzero * TMath::Sin((i-1) * ktwopi / 39. + offset1); | |
fe4da5cc | 2994 | zpos = 0.; |
cfce8870 | 2995 | gMC->Gspos("ISV2", i, "IT56", xpos, ypos, zpos, idrotm[i+1599], "ONLY"); |
fe4da5cc | 2996 | |
2997 | // --- Electronics/cooling | |
2998 | ||
b3a22d72 | 2999 | xpos = runo * TMath::Cos((i-1) * ktwopi / 39. + offset1); |
3000 | ypos = runo * TMath::Sin((i-1) * ktwopi / 39. + offset1); | |
fe4da5cc | 3001 | zpos = 0.; |
cfce8870 | 3002 | gMC->Gspos("SSV2", i, "IT56", xpos, ypos, zpos, idrotm[i+1599], "ONLY"); |
fe4da5cc | 3003 | |
3004 | // --- End-ladders (nagative-Z and positive-Z) | |
3005 | ||
b3a22d72 | 3006 | xpos = rtwo * TMath::Cos((i-1) * ktwopi / 39. + offset1); |
3007 | ypos = rtwo * TMath::Sin((i-1) * ktwopi / 39. + offset1); | |
fe4da5cc | 3008 | zpos = -(dbox2[2] + dela[2] + 6.); |
cfce8870 | 3009 | gMC->Gspos("ELL6", i, "IT56", xpos, ypos, zpos, idrotm[i+1599], "ONLY"); |
fe4da5cc | 3010 | zpos = dbox2[2] + dela[2] + 6.; |
cfce8870 | 3011 | gMC->Gspos("ELL6", i + 39, "IT56", xpos, ypos, zpos, idrotm[i+1599], "ONLY"); |
fe4da5cc | 3012 | } |
3013 | //#ifdef NEVER | |
3014 | } | |
3015 | ||
3016 | // --- Define SSD with the 32+36 lay-out | |
3017 | ||
58005f18 | 3018 | if (fMinorVersionV3 >2 && fMinorVersionV3 < 6) { |
fe4da5cc | 3019 | |
3020 | //--- Define ghost volume containing the Strip Detectors and fill it with air | |
3021 | // or vacuum | |
3022 | ||
3023 | xxm = (49.999-3.)/(70.-25.); | |
3024 | dgh[0] = 0.; | |
3025 | dgh[1] = 360.; | |
3026 | dgh[2] = 4.; | |
3027 | dgh[3] = -25. - (9.-3.01) / xxm - (9.01-9.) / xxm - | |
3028 | (27.-9.01) / xxm - (36.-27.) / xxm - (49.998-36.) / xxm; | |
3029 | dgh[4] = 49.998; | |
3030 | dgh[5] = 49.998; | |
3031 | dgh[6] = -25. - (9.-3.01) / xxm - | |
3032 | (9.01-9.) / xxm - (27.-9.01) / xxm - (36.-27.) / xxm; | |
3033 | dgh[7] = 36.; | |
3034 | dgh[8] = 49.998; | |
3035 | dgh[9] = (9.-3.01) / xxm + 25. + | |
3036 | (9.01-9.) / xxm + (27.-9.01) / xxm + (36.-27.) / xxm; | |
3037 | dgh[10] = 36.; | |
3038 | dgh[11] = 49.998; | |
3039 | dgh[12] = (9.-3.01) / xxm + 25. + (9.01-9.) / xxm + | |
3040 | (27.-9.01) / xxm + (36.-27.) / xxm + (49.998-36.) / xxm; | |
3041 | dgh[13] = 49.998; | |
3042 | dgh[14] = 49.998; | |
cfce8870 | 3043 | gMC->Gsvolu("IT56", "PCON", idtmed[275], dgh, 15); |
3044 | gMC->Gspos("IT56", 1, "ITSV", 0., 0., 0., 0, "ONLY"); | |
3045 | gMC->Gsatt("IT56", "SEEN", 0); | |
fe4da5cc | 3046 | |
3047 | // --- Layer #5 | |
3048 | ||
3049 | // GOTO 6678 ! skip ITS layer no. 5 | |
3050 | ||
3051 | //--- Define a ghost volume containing a single ladder of layer #5 andfill | |
3052 | // it with air or vacuum | |
3053 | ||
3054 | dbox1[0] = (0.0600+2.*0.0150)/2.; | |
3055 | dbox1[1] = 3.75; | |
3056 | dbox1[2] = 86.31/2.; | |
cfce8870 | 3057 | gMC->Gsvolu("ISV1", "BOX ", idtmed[253], dbox1, 3); |
fe4da5cc | 3058 | |
3059 | // --- Make the ghost volume invisible | |
3060 | ||
cfce8870 | 3061 | gMC->Gsatt("ISV1", "SEEN", 0); |
fe4da5cc | 3062 | |
3063 | // --- Define a ghost volume containing the electronics and cooling of | |
3064 | // a single ladder of layer #5 and fill it with air or vacuum | |
3065 | ||
3066 | dsrv[0] = (TMath::Sqrt(3.) / 2. * 4.2 + .47 + .05) / 2.; | |
3067 | dsrv[1] = 3.75; | |
3068 | dsrv[2] = 86.31/2.; | |
cfce8870 | 3069 | gMC->Gsvolu("SSV1", "BOX ", idtmed[253], dsrv, 3); |
fe4da5cc | 3070 | |
3071 | // --- Make the ghost volume invisible | |
3072 | ||
cfce8870 | 3073 | gMC->Gsatt("SSV1", "SEEN", 0); |
fe4da5cc | 3074 | |
3075 | // --- Define a ghost volume containing the end-ladder stuff of | |
3076 | // a single ladder of layer #5 and fill it with air or vacuum | |
3077 | ||
3078 | dela[0] = 2.; | |
3079 | dela[1] = 3.5; | |
3080 | dela[2] = 4.; | |
cfce8870 | 3081 | gMC->Gsvolu("ELL5", "BOX ", idtmed[253], dela, 3); |
fe4da5cc | 3082 | |
3083 | // --- Make the ghost volume invisible | |
3084 | ||
cfce8870 | 3085 | gMC->Gsatt("ELL5", "SEEN", 0); |
fe4da5cc | 3086 | |
3087 | // --- Define a volume containing the sensitive part of the strips | |
3088 | // (silicon, layer #5) | |
3089 | ||
3090 | dits[0] = .015; | |
3091 | dits[1] = 3.75; | |
3092 | dits[2] = 2.1; | |
cfce8870 | 3093 | gMC->Gsvolu("ITS5", "BOX ", idtmed[249], dits, 3); |
fe4da5cc | 3094 | |
3095 | // --- Define a volume containing the electronics of the strips | |
3096 | // (silicon, layer #5) | |
3097 | ||
3098 | dchi[0] = .02; | |
3099 | dchi[1] = 3.4; | |
3100 | dchi[2] = .525; | |
cfce8870 | 3101 | gMC->Gsvolu("SCH5", "BOX ", idtmed[250], dchi, 3); |
fe4da5cc | 3102 | |
3103 | // --- Define the cooling tubes (aluminum, layer #5) | |
3104 | ||
3105 | dtub[0] = .09; | |
3106 | dtub[1] = dtub[0] + .01; | |
3107 | dtub[2] = 86.31/2.; | |
cfce8870 | 3108 | gMC->Gsvolu("STB5", "TUBE", idtmed[255], dtub, 3); |
fe4da5cc | 3109 | |
3110 | // --- Define the cooling fluid (water or freon, layer #5) | |
3111 | ||
3112 | dwat[0] = 0.; | |
3113 | dwat[1] = .09; | |
3114 | dwat[2] = 86.31/2.; | |
cfce8870 | 3115 | gMC->Gsvolu("SWT5", "TUBE", idtmed[256], dwat, 3); |
fe4da5cc | 3116 | // CALL GSVOLU('SWT5','TUBE',IDTMED(258),DWAT,3,IOUT) ! freon |
3117 | ||
3118 | //--- Define the (triangular) element of the heat bridge (carbon, layer #5) | |
3119 | ||
3120 | // water | |
3121 | dfra[0] = 120.; | |
3122 | dfra[1] = 360.; | |
3123 | dfra[2] = 3.; | |
3124 | dfra[3] = 2.; | |
3125 | dfra[4] = -.015; | |
3126 | dfra[5] = TMath::Sqrt(3.) * 4.2 / 6.; | |
3127 | dfra[6] = dfra[5] + .03; | |
3128 | dfra[7] = .015; | |
3129 | dfra[8] = dfra[5]; | |
3130 | dfra[9] = dfra[6]; | |
cfce8870 | 3131 | gMC->Gsvolu("SFR5", "PGON", idtmed[252], dfra, 10); |
fe4da5cc | 3132 | |
3133 | // --- Define the element connecting the triangles of the heat bridge | |
3134 | // (carbon, layer #5) | |
3135 | ||
3136 | dcei[0] = 0.; | |
3137 | dcei[1] = .03; | |
3138 | dcei[2] = 86.31/2.; | |
cfce8870 | 3139 | gMC->Gsvolu("SCE5", "TUBE", idtmed[252], dcei, 3); |
fe4da5cc | 3140 | |
3141 | // --- Define the part of the end-ladder stuff made of plastic (G10FR4) | |
3142 | // (layer #5) | |
3143 | ||
3144 | dpla[0] = (10./(8.*7.))/2; | |
3145 | dpla[1] = 3.5; | |
3146 | dpla[2] = 4.; | |
cfce8870 | 3147 | gMC->Gsvolu("EPL5", "BOX ", idtmed[262], dpla, 3); |
fe4da5cc | 3148 | |
3149 | // --- Define the part of the end-ladder stuff made of copper (layer #5) | |
3150 | ||
3151 | dcop[0] = (2./(8.*7.))/2; | |
3152 | dcop[1] = 3.5; | |
3153 | dcop[2] = 4.; | |
cfce8870 | 3154 | gMC->Gsvolu("ECU5", "BOX ", idtmed[259], dcop, 3); |
fe4da5cc | 3155 | |
3156 | // --- Define the part of the end-ladder stuff made of epoxy (layer #5) | |
3157 | ||
3158 | depx[0] = (30./(8.*7.))/2.; | |
3159 | depx[1] = 3.5; | |
3160 | depx[2] = 4.; | |
cfce8870 | 3161 | gMC->Gsvolu("EPX5", "BOX ", idtmed[262], depx, 3); |
fe4da5cc | 3162 | |
3163 | // --- Define the part of the end-ladder stuff made of silicon (bus) | |
3164 | // (layer #5) | |
3165 | ||
3166 | dsil[0] = (20./(8.*7.))/2.; | |
3167 | dsil[1] = 3.5; | |
3168 | dsil[2] = 4.; | |
cfce8870 | 3169 | gMC->Gsvolu("ESI5", "BOX ", idtmed[251], dsil, 3); |
fe4da5cc | 3170 | |
3171 | // --- Place the end-ladder stuff into its mother (ELL5) | |
3172 | ||
3173 | sep = (4. - (dpla[0] + dcop[0] + depx[0] + dsil[0]) * 2.) / 3.; | |
3174 | ypos = 0.; | |
3175 | zpos = 0.; | |
3176 | ||
3177 | // --- Plastic | |
3178 | ||
3179 | xpos = -dela[0] + dpla[0]; | |
cfce8870 | 3180 | gMC->Gspos("EPL5", 1, "ELL5", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 3181 | |
3182 | // --- Copper | |
3183 | ||
3184 | xpos = -dela[0] + dpla[0] * 2. + sep + dcop[0]; | |
cfce8870 | 3185 | gMC->Gspos("ECU5", 1, "ELL5", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 3186 | |
3187 | // --- Epoxy | |
3188 | ||
3189 | xpos = -dela[0] + dpla[0] * 2. + sep + dcop[0] * 2. + sep + depx[0]; | |
cfce8870 | 3190 | gMC->Gspos("EPX5", 1, "ELL5", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 3191 | |
3192 | // --- Silicon (bus) | |
3193 | ||
3194 | xpos = -dela[0] + dpla[0] * 2. + sep + dcop[0] * 2. + sep + depx[0] * 2. + sep + dsil[0]; | |
cfce8870 | 3195 | gMC->Gspos("ESI5", 1, "ELL5", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 3196 | |
3197 | // --- Place the sensitive part of the strips into its mother (ISV1) | |
3198 | ||
3199 | ypos = 0.; | |
e8189707 | 3200 | for (j = 1; j <= 22; ++j) { |
fe4da5cc | 3201 | if (j % 2 == 0) xpos = dbox1[0] - dits[0]; |
3202 | else xpos = -dbox1[0] + dits[0]; | |
3203 | zpos = ((j - 1) - 10.) * 3.91 - 1.96; | |
cfce8870 | 3204 | gMC->Gspos("ITS5", j, "ISV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 3205 | } |
3206 | ||
3207 | // --- Place the electronics of the strips into its mother (SSV1) | |
3208 | ||
3209 | ypos = 0.; | |
e8189707 | 3210 | for (j = 1; j <= 22; ++j) { |
fe4da5cc | 3211 | if (j % 2 == 0) xpos = -dsrv[0] + .28; |
3212 | else xpos = -dsrv[0] + .28 - dits[0] * 2. - .03; | |
3213 | zpos = ((j - 1) - 10.) * 3.91 - 1.96 + .85; | |
cfce8870 | 3214 | gMC->Gspos("SCH5", j, "SSV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 3215 | } |
3216 | ||
3217 | //--- Place the cooling tubes and the cooling fluid into their mother (SSV1) | |
3218 | ||
3219 | xpos = -dsrv[0] + .41; | |
3220 | zpos = 0.; | |
3221 | ||
3222 | // --- Left tube (just a matter of convention) | |
3223 | ||
3224 | ypos = -(2.25+0.1); | |
cfce8870 | 3225 | gMC->Gspos("STB5", 1, "SSV1", xpos, ypos, zpos, 0, "ONLY"); |
3226 | gMC->Gspos("SWT5", 1, "SSV1", xpos, ypos, zpos, 0, "ONLY"); | |
fe4da5cc | 3227 | |
3228 | // --- Right tube (just a matter of convention) | |
3229 | ||
3230 | ypos = (2.25+0.1); | |
cfce8870 | 3231 | gMC->Gspos("STB5", 2, "SSV1", xpos, ypos, zpos, 0, "ONLY"); |
3232 | gMC->Gspos("SWT5", 2, "SSV1", xpos, ypos, zpos, 0, "ONLY"); | |
fe4da5cc | 3233 | |
3234 | // --- Place the heat bridge elements into their mother (SSV1) | |
3235 | ||
3236 | xpos = -dsrv[0] + .47 + TMath::Sqrt(3.) / 6. * 4.2; | |
3237 | ypos = 0.; | |
e8189707 | 3238 | for (j = 1; j <= 23; ++j) { |
fe4da5cc | 3239 | zpos = ((j - 1) - 10.) * 3.91 - 1.96 - 4.2/2.; |
cfce8870 | 3240 | gMC->Gspos("SFR5", j, "SSV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 3241 | } |
3242 | ||
3243 | // --- Place the elements connecting the triangles of the heat bridge | |
3244 | // into their mother (SSV1) | |
3245 | ||
3246 | zpos = 0.; | |
3247 | ||
3248 | // --- Left element (just a matter of convention) | |
3249 | ||
3250 | xpos = -dsrv[0] + .47; | |
3251 | ypos = -(2.1+0.015); | |
cfce8870 | 3252 | gMC->Gspos("SCE5", 1, "SSV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 3253 | |
3254 | // --- Right element | |
3255 | ||
3256 | xpos = -dsrv[0] + .47; | |
3257 | ypos = (2.1+0.015); | |
cfce8870 | 3258 | gMC->Gspos("SCE5", 2, "SSV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 3259 | |
3260 | // --- Top element | |
3261 | ||
3262 | xpos = -dsrv[0] + .47 + TMath::Sqrt(3.) / 2. * 4.2 + .015; | |
3263 | ypos = 0.; | |
cfce8870 | 3264 | gMC->Gspos("SCE5", 3, "SSV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 3265 | |
3266 | // --- Place the ghost volumes containing the strip ladders (ISV1), | |
3267 | // electronics/cooling (SSV1) and end-ladder stuff (ELL5) of layer #5 in | |
3268 | // their mother volume (IT56) | |
3269 | ||
3270 | offset1 = TMath::ATan2(.8, 36.6); | |
3271 | offset2 = 5.2; | |
3272 | rzero = dbox1[0] + 36.6; | |
3273 | runo = dbox1[0] * 2. + 36.6 + dsrv[0]; | |
3274 | rtwo = dbox1[0] * 2. + 36.6 + dela[0]; | |
e8189707 | 3275 | for (i = 1; i <= 32; ++i) { |
b3a22d72 | 3276 | atheta = (i-1) * ktwopi * kraddeg / 32. + offset2; |
fe4da5cc | 3277 | AliMatrix(idrotm[i+1499], 90., atheta, 90., atheta + 90., 0., 0.); |
3278 | ||
3279 | // --- Strip ladders | |
3280 | ||
b3a22d72 | 3281 | xpos = rzero * TMath::Cos((i-1) * ktwopi / 32. + offset1); |
3282 | ypos = rzero * TMath::Sin((i-1) * ktwopi / 32. + offset1); | |
fe4da5cc | 3283 | zpos = 0.; |
cfce8870 | 3284 | gMC->Gspos("ISV1", i, "IT56", xpos, ypos, zpos, idrotm[i+1499], "ONLY"); |
fe4da5cc | 3285 | |
3286 | // --- Electronics/cooling | |
3287 | ||
b3a22d72 | 3288 | xpos = runo * TMath::Cos((i-1) * ktwopi / 32. + offset1); |
3289 | ypos = runo * TMath::Sin((i-1) * ktwopi / 32. + offset1); | |
fe4da5cc | 3290 | zpos = 0.; |
cfce8870 | 3291 | gMC->Gspos("SSV1", i, "IT56", xpos, ypos, zpos, idrotm[i+1499], "ONLY"); |
fe4da5cc | 3292 | |
3293 | // --- End-ladders (nagative-Z and positive-Z) | |
3294 | ||
b3a22d72 | 3295 | xpos = rtwo * TMath::Cos((i-1) * ktwopi / 32. + offset1); |
3296 | ypos = rtwo * TMath::Sin((i-1) * ktwopi / 32. + offset1); | |
fe4da5cc | 3297 | zpos = -(dbox1[2] + dela[2] + 6.); |
cfce8870 | 3298 | gMC->Gspos("ELL5", i, "IT56", xpos, ypos, zpos, idrotm[i+1499], "ONLY"); |
fe4da5cc | 3299 | zpos = dbox1[2] + dela[2] + 6.; |
cfce8870 | 3300 | gMC->Gspos("ELL5", i + 35, "IT56", xpos, ypos, zpos, idrotm[i+1499], "ONLY"); |
fe4da5cc | 3301 | } |
3302 | ||
3303 | ||
3304 | // --- Layer #6 | |
3305 | ||
3306 | // GOTO 6778 ! skip ITS layer no. 6 | |
3307 | ||
3308 | //--- Define a ghost volume containing a single ladder of layer #6 andfill | |
3309 | // it with air or vacuum | |
3310 | ||
3311 | dbox2[0] = (0.0600+2.*0.0150)/2.; | |
3312 | dbox2[1] = 3.75; | |
3313 | dbox2[2] = 94.13/2.; | |
cfce8870 | 3314 | gMC->Gsvolu("ISV2", "BOX ", idtmed[253], dbox2, 3); |
fe4da5cc | 3315 | |
3316 | // --- Make the ghost volume invisible | |
3317 | ||
cfce8870 | 3318 | gMC->Gsatt("ISV2", "SEEN", 0); |
fe4da5cc | 3319 | |
3320 | // --- Define a ghost volume containing the electronics and cooling of | |
3321 | // a single ladder of layer #6 and fill it with air or vacuum | |
3322 | ||
3323 | dsrv[0] = (TMath::Sqrt(3.) / 2. * 4.2 + .47 + .05) / 2.; | |
3324 | dsrv[1] = 3.75; | |
3325 | dsrv[2] = 94.13/2.; | |
cfce8870 | 3326 | gMC->Gsvolu("SSV2", "BOX ", idtmed[253], dsrv, 3); |
fe4da5cc | 3327 | |
3328 | // --- Make the ghost volume invisible | |
3329 | ||
cfce8870 | 3330 | gMC->Gsatt("SSV2", "SEEN", 0); |
fe4da5cc | 3331 | |
3332 | // --- Define a ghost volume containing the end-ladder stuff of | |
3333 | // a single ladder of layer #6 and fill it with air or vacuum | |
3334 | ||
3335 | dela[0] = 2.; | |
3336 | dela[1] = 3.5; | |
3337 | dela[2] = 4.; | |
cfce8870 | 3338 | gMC->Gsvolu("ELL6", "BOX ", idtmed[253], dela, 3); |
fe4da5cc | 3339 | |
3340 | // --- Make the ghost volume invisible | |
3341 | ||
cfce8870 | 3342 | gMC->Gsatt("ELL6", "SEEN", 0); |
fe4da5cc | 3343 | |
3344 | // --- Define a volume containing the sensitive part of the strips | |
3345 | // (silicon, layer #6) | |
3346 | ||
3347 | dits[0] = .015; | |
3348 | dits[1] = 3.75; | |
3349 | dits[2] = 2.1; | |
cfce8870 | 3350 | gMC->Gsvolu("ITS6", "BOX ", idtmed[249], dits, 3); |
fe4da5cc | 3351 | |
3352 | // --- Define a volume containing the electronics of the strips | |
3353 | // (silicon, layer #6) | |
3354 | ||
3355 | dchi[0] = .02; | |
3356 | dchi[1] = 3.4; | |
3357 | dchi[2] = .525; | |
cfce8870 | 3358 | gMC->Gsvolu("SCH6", "BOX ", idtmed[250], dchi, 3); |
fe4da5cc | 3359 | |
3360 | // --- Define the cooling tubes (aluminum, layer #6) | |
3361 | ||
3362 | dtub[0] = .09; | |
3363 | dtub[1] = dtub[0] + .01; | |
3364 | dtub[2] = 94.13/2.; | |
cfce8870 | 3365 | gMC->Gsvolu("STB6", "TUBE", idtmed[255], dtub, 3); |
fe4da5cc | 3366 | |
3367 | // --- Define the cooling fluid (water or freon, layer #6) | |
3368 | ||
3369 | dwat[0] = 0.; | |
3370 | dwat[1] = .09; | |
3371 | dwat[2] = 94.13/2.; | |
cfce8870 | 3372 | gMC->Gsvolu("SWT6", "TUBE", idtmed[256], dwat, 3); |
fe4da5cc | 3373 | // CALL GSVOLU('SWT6','TUBE',IDTMED(258),DWAT,3,IOUT) ! freon |
3374 | ||
3375 | //--- Define the (triangular) element of the heat bridge (carbon, layer #6) | |
3376 | ||
3377 | // water | |
3378 | dfra[0] = 120.; | |
3379 | dfra[1] = 360.; | |
3380 | dfra[2] = 3.; | |
3381 | dfra[3] = 2.; | |
3382 | dfra[4] = -.015; | |
3383 | dfra[5] = TMath::Sqrt(3.) * 4.2 / 6.; | |
3384 | dfra[6] = dfra[5] + .03; | |
3385 | dfra[7] = .015; | |
3386 | dfra[8] = dfra[5]; | |
3387 | dfra[9] = dfra[6]; | |
cfce8870 | 3388 | gMC->Gsvolu("SFR6", "PGON", idtmed[252], dfra, 10); |
fe4da5cc | 3389 | |
3390 | // --- Define the element connecting the triangles of the heat bridge | |
3391 | // (carbon, layer #6) | |
3392 | ||
3393 | dcei[0] = 0.; | |
3394 | dcei[1] = .03; | |
3395 | dcei[2] = 94.13/2.; | |
cfce8870 | 3396 | gMC->Gsvolu("SCE6", "TUBE", idtmed[252], dcei, 3); |
fe4da5cc | 3397 | |
3398 | // --- Define the part of the end-ladder stuff made of plastic (G10FR4) | |
3399 | // (layer #6) | |
3400 | ||
3401 | dpla[0] = (10./(8.*7.))/2; | |
3402 | dpla[1] = 3.5; | |
3403 | dpla[2] = 4.; | |
cfce8870 | 3404 | gMC->Gsvolu("EPL6", "BOX ", idtmed[262], dpla, 3); |
fe4da5cc | 3405 | |
3406 | // --- Define the part of the end-ladder stuff made of copper (layer #6) | |
3407 | ||
3408 | dcop[0] = (2./(8.*7.))/2; | |
3409 | dcop[1] = 3.5; | |
3410 | dcop[2] = 4.; | |
cfce8870 | 3411 | gMC->Gsvolu("ECU6", "BOX ", idtmed[259], dcop, 3); |
fe4da5cc | 3412 | |
3413 | // --- Define the part of the end-ladder stuff made of epoxy (layer #6) | |
3414 | ||
3415 | depx[0] = (30./(8.*7.))/2.; | |
3416 | depx[1] = 3.5; | |
3417 | depx[2] = 4.; | |
cfce8870 | 3418 | gMC->Gsvolu("EPX6", "BOX ", idtmed[262], depx, 3); |
fe4da5cc | 3419 | |
3420 | // --- Define the part of the end-ladder stuff made of silicon (bus) | |
3421 | // (layer #6) | |
3422 | ||
3423 | dsil[0] = (20./(8.*7.))/2.; | |
3424 | dsil[1] = 3.5; | |
3425 | dsil[2] = 4.; | |
cfce8870 | 3426 | gMC->Gsvolu("ESI6", "BOX ", idtmed[251], dsil, 3); |
fe4da5cc | 3427 | |
3428 | // --- Place the end-ladder stuff into its mother (ELL5) | |
3429 | ||
3430 | sep = (4. - (dpla[0] + dcop[0] + depx[0] + dsil[0]) * 2.) / 3.; | |
3431 | ypos = 0.; | |
3432 | zpos = 0.; | |
3433 | ||
3434 | // --- Plastic | |
3435 | ||
3436 | xpos = -dela[0] + dpla[0]; | |
cfce8870 | 3437 | gMC->Gspos("EPL6", 1, "ELL6", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 3438 | |
3439 | // --- Copper | |
3440 | ||
3441 | xpos = -dela[0] + dpla[0] * 2. + sep + dcop[0]; | |
cfce8870 | 3442 | gMC->Gspos("ECU6", 1, "ELL6", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 3443 | |
3444 | // --- Epoxy | |
3445 | ||
3446 | xpos = -dela[0] + dpla[0] * 2. + sep + dcop[0] * 2. + sep + depx[0]; | |
cfce8870 | 3447 | gMC->Gspos("EPX6", 1, "ELL6", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 3448 | |
3449 | // --- Silicon (bus) | |
3450 | ||
3451 | xpos = -dela[0] + dpla[0] * 2. + sep + dcop[0] * 2. + sep + depx[0] * 2. + sep + dsil[0]; | |
cfce8870 | 3452 | gMC->Gspos("ESI6", 1, "ELL6", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 3453 | |
3454 | // --- Place the sensitive part of the strips into its mother (ISV2) | |
3455 | ||
3456 | ypos = 0.; | |
e8189707 | 3457 | for (j = 1; j <= 24; ++j) { |
fe4da5cc | 3458 | if (j % 2 == 0) xpos = -dbox2[0] + dits[0]; |
3459 | else xpos = dbox2[0] - dits[0]; | |
3460 | zpos = ((j - 1) - 11.) * 3.91 - 1.96; | |
cfce8870 | 3461 | gMC->Gspos("ITS6", j, "ISV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 3462 | } |
3463 | ||
3464 | // --- Place the electronics of the strips into its mother (SSV2) | |
3465 | ||
3466 | ypos = 0.; | |
e8189707 | 3467 | for (j = 1; j <= 24; ++j) { |
fe4da5cc | 3468 | if (j % 2 == 0) xpos = -dsrv[0] + .28 - dits[0] * 2. - .03; |
3469 | else xpos = -dsrv[0] + .28; | |
3470 | zpos = ((j - 1) - 11.) * 3.91 - 1.96 + .85; | |
cfce8870 | 3471 | gMC->Gspos("SCH5", j, "SSV1", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 3472 | } |
3473 | ||
3474 | //--- Place the cooling tubes and the cooling fluid into their mother (SSV2) | |
3475 | ||
3476 | xpos = -dsrv[0] + .41; | |
3477 | zpos = 0.; | |
3478 | ||
3479 | // --- Left tube (just a matter of convention) | |
3480 | ||
3481 | ypos = -(2.25+0.1); | |
cfce8870 | 3482 | gMC->Gspos("STB6", 1, "SSV2", xpos, ypos, zpos, 0, "ONLY"); |
3483 | gMC->Gspos("SWT6", 1, "SSV2", xpos, ypos, zpos, 0, "ONLY"); | |
fe4da5cc | 3484 | |
3485 | // --- Right tube (just a matter of convention) | |
3486 | ||
3487 | ypos = (2.25+0.1); | |
cfce8870 | 3488 | gMC->Gspos("STB6", 2, "SSV2", xpos, ypos, zpos, 0, "ONLY"); |
3489 | gMC->Gspos("SWT6", 2, "SSV2", xpos, ypos, zpos, 0, "ONLY"); | |
fe4da5cc | 3490 | |
3491 | // --- Place the heat bridge elements into their mother (SSV2) | |
3492 | ||
3493 | xpos = -dsrv[0] + .47 + TMath::Sqrt(3.) / 6. * 4.2; | |
3494 | ypos = 0.; | |
e8189707 | 3495 | for (j = 1; j <= 25; ++j) { |
fe4da5cc | 3496 | zpos = ((j - 1) - 11.) * 3.91 - 1.96 - 4.2/2.; |
cfce8870 | 3497 | gMC->Gspos("SFR6", j, "SSV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 3498 | } |
3499 | ||
3500 | // --- Place the elements connecting the triangles of the heat bridge | |
3501 | // into their mother (SSV2) | |
3502 | ||
3503 | zpos = 0.; | |
3504 | ||
3505 | // --- Left element (just a matter of convention) | |
3506 | ||
3507 | xpos = -dsrv[0] + .47; | |
3508 | ypos = -(2.1+0.015); | |
cfce8870 | 3509 | gMC->Gspos("SCE6", 1, "SSV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 3510 | |
3511 | // --- Right element | |
3512 | ||
3513 | xpos = -dsrv[0] + .47; | |
3514 | ypos = (2.1+0.015); | |
cfce8870 | 3515 | gMC->Gspos("SCE6", 2, "SSV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 3516 | |
3517 | // --- Top element | |
3518 | ||
3519 | xpos = -dsrv[0] + .47 + TMath::Sqrt(3.) / 2. * 4.2 + .015; | |
3520 | ypos = 0.; | |
cfce8870 | 3521 | gMC->Gspos("SCE6", 3, "SSV2", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 3522 | |
3523 | // --- Place the ghost volumes containing the strip ladders (ISV2), | |
3524 | // electronics/cooling (SSV2) and end-ladder stuff (ELL6) of layer #6 in | |
3525 | // their mother volume (IT56) | |
3526 | ||
3527 | offset1 = TMath::ATan2(.9, 41.2); | |
3528 | offset2 = 5.2; | |
3529 | rzero = dbox2[0] + 41.2; | |
3530 | runo = dbox2[0] * 2. + 41.2 + dsrv[0]; | |
3531 | rtwo = dbox2[0] * 2. + 41.2 + dela[0]; | |
e8189707 | 3532 | for (i = 1; i <= 36; ++i) { |
b3a22d72 | 3533 | atheta = (i-1) * ktwopi * kraddeg / 36. + offset2; |
fe4da5cc | 3534 | AliMatrix(idrotm[i+1599], 90., atheta, 90., atheta + 90., 0., 0.); |
3535 | ||
3536 | // --- Strip ladders | |
3537 | ||
b3a22d72 | 3538 | xpos = rzero * TMath::Cos((i-1) * ktwopi / 36. + offset1); |
3539 | ypos = rzero * TMath::Sin((i-1) * ktwopi / 36. + offset1); | |
fe4da5cc | 3540 | zpos = 0.; |
cfce8870 | 3541 | gMC->Gspos("ISV2", i, "IT56", xpos, ypos, zpos, idrotm[i+1599], "ONLY"); |
fe4da5cc | 3542 | |
3543 | // --- Electronics/cooling | |
3544 | ||
b3a22d72 | 3545 | xpos = runo * TMath::Cos((i-1) * ktwopi / 36. + offset1); |
3546 | ypos = runo * TMath::Sin((i-1) * ktwopi / 36. + offset1); | |
fe4da5cc | 3547 | zpos = 0.; |
cfce8870 | 3548 | gMC->Gspos("SSV2", i, "IT56", xpos, ypos, zpos, idrotm[i+1599], "ONLY"); |
fe4da5cc | 3549 | |
3550 | // --- End-ladders (nagative-Z and positive-Z) | |
3551 | ||
b3a22d72 | 3552 | xpos = rtwo * TMath::Cos((i-1) * ktwopi / 36. + offset1); |
3553 | ypos = rtwo * TMath::Sin((i-1) * ktwopi / 36. + offset1); | |
fe4da5cc | 3554 | zpos = -(dbox2[2] + dela[2] + 6.); |
cfce8870 | 3555 | gMC->Gspos("ELL6", i, "IT56", xpos, ypos, zpos, idrotm[i+1599], "ONLY"); |
fe4da5cc | 3556 | zpos = dbox2[2] + dela[2] + 6.; |
cfce8870 | 3557 | gMC->Gspos("ELL6", i + 39, "IT56", xpos, ypos, zpos, idrotm[i+1599], "ONLY"); |
fe4da5cc | 3558 | } |
3559 | ||
3560 | ||
3561 | } | |
3562 | ||
3563 | //************************************************************************ | |
3564 | //* * | |
3565 | //* E N D - C A P S A N D F R A M E S * | |
3566 | //* ========================================= * | |
3567 | //* * | |
3568 | //************************************************************************ | |
3569 | ||
3570 | // --- Define a dummy cylinder for multiple scattering tests | |
3571 | ||
3572 | // GOTO 7890 ! skip dummy cylinder for multiple scatteringtests | |
3573 | ||
3574 | // DITS(1)=49. | |
3575 | // DITS(2)=DITS(1)+0.1 | |
3576 | // DITS(3)=60.3 | |
3577 | // CALL GSVOLU('ITST','TUBE',IDTMED(255),DITS,3,IOUT) | |
3578 | // CALL GSPOS('ITST',1,'ITSV',0.,0.,0.,0,'ONLY') | |
3579 | // 7890 CONTINUE | |
3580 | ||
3581 | // --- The 0.74% X0 outer wall (C) of the gas vessel at r=50cm --- | |
3582 | ||
3583 | // GOTO 8901 ! skip outer wall | |
3584 | ||
58005f18 | 3585 | if (fMinorVersionV3 == 0 || fMinorVersionV3 == 3) { |
fe4da5cc | 3586 | |
3587 | dits[0] = 49.9; | |
3588 | dits[1] = dits[0] + .06926; | |
3589 | dits[2] = dpcb[2] * 2. + 62.7 - 10.5; | |
3590 | // old value 60.3 | |
cfce8870 | 3591 | gMC->Gsvolu("ITSG", "TUBE", idtmed[274], dits, 3); |
3592 | gMC->Gspos("ITSG", 1, "ITSV", 0., 0., 0., 0, "ONLY"); | |
fe4da5cc | 3593 | } else { |
3594 | goto L8901; | |
3595 | } | |
3596 | L8901: | |
3597 | // --- The frame between the end-caps (octagonal lay-out) --- | |
3598 | ||
3599 | // GOTO 9012 ! skip octagonal frame | |
3600 | ||
58005f18 | 3601 | if (fMinorVersionV3 == 1) { |
fe4da5cc | 3602 | |
3603 | rzero = 34.; | |
3604 | dtra[0] = .92; | |
3605 | dtra[1] = 1.; | |
3606 | dtra[2] = dpcb[2] * 2. + 50.5 - 10.5; | |
3607 | dtra1[0] = .92; | |
3608 | dtra1[1] = 1.; | |
3609 | dtra1[2] = TMath::Sqrt(dtra[2] * dtra[2] + (55.4*55.4-50.5*50.5))/2.; | |
3610 | angle = 45.; | |
3611 | offset = angle / 2.; | |
e8189707 | 3612 | for (i = 0; i < 8; ++i) { |
b3a22d72 | 3613 | xtra[i] = rzero * TMath::Cos(i * angle * kdegrad); |
3614 | ytra[i] = rzero * TMath::Sin(i * angle * kdegrad); | |
fe4da5cc | 3615 | ztra[i] = 0.; |
b3a22d72 | 3616 | gMC->Gsvolu(knatra[i], "TUBE", idtmed[274], dtra, 3); |
3617 | gMC->Gspos(knatra[i], 1, "ITSV", xtra[i], ytra[i], ztra[i], 0, "ONLY"); | |
fe4da5cc | 3618 | } |
3619 | ||
3620 | atheta = 22.5; | |
b3a22d72 | 3621 | aphi1 = TMath::ACos(dtra[2] / TMath::Sqrt(dtra[2] * dtra[2] + (50.5 / cos(28.*kdegrad) * (50.5 / cos(28.*kdegrad))- 50.5*50.5))) * kraddeg; |
fe4da5cc | 3622 | aphi2 = 180. - aphi1; |
3623 | xpos = (xtra[0] + xtra[1]) / 2.; | |
3624 | ypos = (ytra[0] + ytra[1]) / 2.; | |
3625 | zpos = dtra[2] / 2.; | |
b3a22d72 | 3626 | gMC->Gsvolu(knatra1[0], "TUBE", idtmed[274], dtra1, 3); |
fe4da5cc | 3627 | r2 = atheta + 90.; |
3628 | r3 = atheta + 90.; | |
3629 | AliMatrix(idrotm[5100], 90., atheta, aphi1 + 90., r2, aphi1, r3); | |
b3a22d72 | 3630 | gMC->Gspos(knatra1[0], 1, "ITSV", xpos, ypos, zpos, idrotm[5100], "ONLY"); |
fe4da5cc | 3631 | zpos = -dtra[2] / 2.; |
b3a22d72 | 3632 | gMC->Gsvolu(knatra1[1], "TUBE", idtmed[274], dtra1, 3); |
fe4da5cc | 3633 | r2 = atheta + 90.; |
3634 | r3 = atheta + 90.; | |
3635 | AliMatrix(idrotm[5101], 90., atheta, aphi2 + 90., r2, aphi2, r3); | |
b3a22d72 | 3636 | gMC->Gspos(knatra1[1], 1, "ITSV", xpos, ypos, zpos, idrotm[5101], "ONLY"); |
fe4da5cc | 3637 | |
3638 | atheta = 67.5; | |
b3a22d72 | 3639 | aphi2 = TMath::ACos(dtra[2] / TMath::Sqrt(dtra[2] * dtra[2] + (50.5 / cos(28.*kdegrad) * (50.5 / cos(28.*kdegrad))- 50.5*50.5))) * kraddeg; |
fe4da5cc | 3640 | aphi1 = 180. - aphi2; |
3641 | xpos = (xtra[1] + xtra[2]) / 2.; | |
3642 | ypos = (ytra[1] + ytra[2]) / 2.; | |
3643 | zpos = dtra[2] / 2.; | |
b3a22d72 | 3644 | gMC->Gsvolu(knatra1[2], "TUBE", idtmed[274], dtra1, 3); |
fe4da5cc | 3645 | r2 = atheta + 90.; |
3646 | r3 = atheta + 90.; | |
3647 | AliMatrix(idrotm[5102], 90., atheta, aphi1 + 90., r2, aphi1, r3); | |
b3a22d72 | 3648 | gMC->Gspos(knatra1[2], 1, "ITSV", xpos, ypos, zpos, idrotm[5102], "ONLY"); |
fe4da5cc | 3649 | zpos = -dtra[2] / 2.; |
b3a22d72 | 3650 | gMC->Gsvolu(knatra1[3], "TUBE", idtmed[274], dtra1, 3); |
fe4da5cc | 3651 | r2 = atheta + 90.; |
3652 | r3 = atheta + 90.; | |
3653 | AliMatrix(idrotm[5103], 90., atheta, aphi2 + 90., r2, aphi2, r3); | |
b3a22d72 | 3654 | gMC->Gspos(knatra1[3], 1, "ITSV", xpos, ypos, zpos, idrotm[5103], "ONLY"); |
fe4da5cc | 3655 | |
3656 | atheta = 112.5; | |
b3a22d72 | 3657 | aphi1 = TMath::ACos(dtra[2] / TMath::Sqrt(dtra[2] * dtra[2] + (50.5 / cos(28.*kdegrad) * (50.5 / cos(28.*kdegrad))- 50.5*50.5))) * kraddeg; |
fe4da5cc | 3658 | aphi2 = 180. - aphi1; |
3659 | xpos = (xtra[2] + xtra[3]) / 2.; | |
3660 | ypos = (ytra[2] + ytra[3]) / 2.; | |
3661 | zpos = dtra[2] / 2.; | |
b3a22d72 | 3662 | gMC->Gsvolu(knatra1[4], "TUBE", idtmed[274], dtra1, 3); |
fe4da5cc | 3663 | r2 = atheta + 90.; |
3664 | r3 = atheta + 90.; | |
3665 | AliMatrix(idrotm[5104], 90., atheta, aphi1 + 90., r2, aphi1, r3); | |
b3a22d72 | 3666 | gMC->Gspos(knatra1[4], 1, "ITSV", xpos, ypos, zpos, idrotm[5104], "ONLY"); |
fe4da5cc | 3667 | zpos = -dtra[2] / 2.; |
b3a22d72 | 3668 | gMC->Gsvolu(knatra1[5], "TUBE", idtmed[274], dtra1, 3); |
fe4da5cc | 3669 | r2 = atheta + 90.; |
3670 | r3 = atheta + 90.; | |
3671 | AliMatrix(idrotm[5105], 90., atheta, aphi2 + 90., r2, aphi2, r3); | |
b3a22d72 | 3672 | gMC->Gspos(knatra1[5], 1, "ITSV", xpos, ypos, zpos, idrotm[5105], "ONLY"); |
fe4da5cc | 3673 | |
3674 | atheta = 157.5; | |
b3a22d72 | 3675 | aphi2 = TMath::ACos(dtra[2] / TMath::Sqrt(dtra[2] * dtra[2] + (50.5 / cos(28.*kdegrad) * (50.5 / cos(28.*kdegrad))- 50.5*50.5))) * kraddeg; |
fe4da5cc | 3676 | aphi1 = 180. - aphi2; |
3677 | xpos = (xtra[3] + xtra[4]) / 2.; | |
3678 | ypos = (ytra[3] + ytra[4]) / 2.; | |
3679 | zpos = dtra[2] / 2.; | |
b3a22d72 | 3680 | gMC->Gsvolu(knatra1[6], "TUBE", idtmed[274], dtra1, 3); |
fe4da5cc | 3681 | r2 = atheta + 90.; |
3682 | r3 = atheta + 90.; | |
3683 | AliMatrix(idrotm[5106], 90., atheta, aphi1 + 90., r2, aphi1, r3); | |
b3a22d72 | 3684 | gMC->Gspos(knatra1[6], 1, "ITSV", xpos, ypos, zpos, idrotm[5106], "ONLY"); |
fe4da5cc | 3685 | zpos = -dtra[2] / 2.; |
b3a22d72 | 3686 | gMC->Gsvolu(knatra1[7], "TUBE", idtmed[274], dtra1, 3); |
fe4da5cc | 3687 | r2 = atheta + 90.; |
3688 | r3 = atheta + 90.; | |
3689 | AliMatrix(idrotm[5107], 90., atheta, aphi2 + 90., r2, aphi2, r3); | |
b3a22d72 | 3690 | gMC->Gspos(knatra1[7], 1, "ITSV", xpos, ypos, zpos, idrotm[5107], "ONLY"); |
fe4da5cc | 3691 | |
3692 | atheta = 22.5; | |
b3a22d72 | 3693 | aphi2 = TMath::ACos(dtra[2] / TMath::Sqrt(dtra[2] * dtra[2] + (50.5 / cos(28.*kdegrad) * (50.5 / cos(28.*kdegrad))- 50.5*50.5))) * kraddeg; |
fe4da5cc | 3694 | aphi1 = 180. - aphi2; |
3695 | xpos = (xtra[4] + xtra[5]) / 2.; | |
3696 | ypos = (ytra[4] + ytra[5]) / 2.; | |
3697 | zpos = dtra[2] / 2.; | |
b3a22d72 | 3698 | gMC->Gsvolu(knatra1[8], "TUBE", idtmed[274], dtra1, 3); |
fe4da5cc | 3699 | r2 = atheta + 90.; |
3700 | r3 = atheta + 90.; | |
3701 | AliMatrix(idrotm[5108], 90., atheta, aphi1 + 90., r2, aphi1, r3); | |
b3a22d72 | 3702 | gMC->Gspos(knatra1[8], 1, "ITSV", xpos, ypos, zpos, idrotm[5108], "ONLY"); |
fe4da5cc | 3703 | zpos = -dtra[2] / 2.; |
b3a22d72 | 3704 | gMC->Gsvolu(knatra1[9], "TUBE", idtmed[274], dtra1, 3); |
fe4da5cc | 3705 | r2 = atheta + 90.; |
3706 | r3 = atheta + 90.; | |
3707 | AliMatrix(idrotm[5109], 90., atheta, aphi2 + 90., r2, aphi2, r3); | |
b3a22d72 | 3708 | gMC->Gspos(knatra1[9], 1, "ITSV", xpos, ypos, zpos, idrotm[5109], "ONLY"); |
fe4da5cc | 3709 | |
3710 | atheta = 67.5; | |
b3a22d72 | 3711 | aphi1 = TMath::ACos(dtra[2] / TMath::Sqrt(dtra[2] * dtra[2] + (50.5 / cos(28.*kdegrad) * (50.5 / cos(28.*kdegrad))- 50.5*50.5))) * kraddeg; |
fe4da5cc | 3712 | aphi2 = 180. - aphi1; |
3713 | xpos = (xtra[5] + xtra[6]) / 2.; | |
3714 | ypos = (ytra[5] + ytra[6]) / 2.; | |
3715 | zpos = dtra[2] / 2.; | |
b3a22d72 | 3716 | gMC->Gsvolu(knatra1[10], "TUBE", idtmed[274], dtra1, 3); |
fe4da5cc | 3717 | r2 = atheta + 90.; |
3718 | r3 = atheta + 90.; | |
3719 | AliMatrix(idrotm[5110], 90., atheta, aphi1 + 90., r2, aphi1, r3); | |
b3a22d72 | 3720 | gMC->Gspos(knatra1[10], 1, "ITSV", xpos, ypos, zpos, idrotm[5110], "ONLY"); |
fe4da5cc | 3721 | zpos = -dtra[2] / 2.; |
b3a22d72 | 3722 | gMC->Gsvolu(knatra1[11], "TUBE", idtmed[274], dtra1, 3); |
fe4da5cc | 3723 | r2 = atheta + 90.; |
3724 | r3 = atheta + 90.; | |
3725 | AliMatrix(idrotm[5111], 90., atheta, aphi2 + 90., r2, aphi2, r3); | |
b3a22d72 | 3726 | gMC->Gspos(knatra1[11], 1, "ITSV", xpos, ypos, zpos, idrotm[5111], "ONLY"); |
fe4da5cc | 3727 | |
3728 | atheta = 112.5; | |
b3a22d72 | 3729 | aphi2 = TMath::ACos(dtra[2] / TMath::Sqrt(dtra[2] * dtra[2] + (50.5 / cos(28.*kdegrad) * (50.5 / cos(28.*kdegrad))- 50.5*50.5))) * kraddeg; |
fe4da5cc | 3730 | aphi1 = 180. - aphi2; |
3731 | xpos = (xtra[6] + xtra[7]) / 2.; | |
3732 | ypos = (ytra[6] + ytra[7]) / 2.; | |
3733 | zpos = dtra[2] / 2.; | |
b3a22d72 | 3734 | gMC->Gsvolu(knatra1[12], "TUBE", idtmed[274], dtra1, 3); |
fe4da5cc | 3735 | r2 = atheta + 90.; |
3736 | r3 = atheta + 90.; | |
3737 | AliMatrix(idrotm[5112], 90., atheta, aphi1 + 90., r2, aphi1, r3); | |
b3a22d72 | 3738 | gMC->Gspos(knatra1[12], 1, "ITSV", xpos, ypos, zpos, idrotm[5112], "ONLY"); |
fe4da5cc | 3739 | zpos = -dtra[2] / 2.; |
b3a22d72 | 3740 | gMC->Gsvolu(knatra1[13], "TUBE", idtmed[274], dtra1, 3); |
fe4da5cc | 3741 | r2 = atheta + 90.; |
3742 | r3 = atheta + 90.; | |
3743 | AliMatrix(idrotm[5113], 90., atheta, aphi2 + 90., r2, aphi2, r3); | |
b3a22d72 | 3744 | gMC->Gspos(knatra1[13], 1, "ITSV", xpos, ypos, zpos, idrotm[5113], "ONLY"); |
fe4da5cc | 3745 | |
3746 | atheta = 157.5; | |
b3a22d72 | 3747 | aphi1 = TMath::ACos(dtra[2] / TMath::Sqrt(dtra[2] * dtra[2] + (50.5 / cos(28.*kdegrad) * (50.5 / cos(28.*kdegrad))- 50.5*50.5))) * kraddeg; |
fe4da5cc | 3748 | aphi2 = 180. - aphi1; |
3749 | xpos = (xtra[7] + xtra[0]) / 2.; | |
3750 | ypos = (ytra[7] + ytra[0]) / 2.; | |
3751 | zpos = dtra[2] / 2.; | |
b3a22d72 | 3752 | gMC->Gsvolu(knatra1[14], "TUBE", idtmed[274], dtra1, 3); |
fe4da5cc | 3753 | r2 = atheta + 90.; |
3754 | r3 = atheta + 90.; | |
3755 | AliMatrix(idrotm[5114], 90., atheta, aphi1 + 90., r2, aphi1, r3); | |
b3a22d72 | 3756 | gMC->Gspos(knatra1[14], 1, "ITSV", xpos, ypos, zpos, idrotm[5114], "ONLY"); |
fe4da5cc | 3757 | zpos = -dtra[2] / 2.; |
b3a22d72 | 3758 | gMC->Gsvolu(knatra1[15], "TUBE", idtmed[274], dtra1, 3); |
fe4da5cc | 3759 | r2 = atheta + 90.; |
3760 | r3 = atheta + 90.; | |
3761 | AliMatrix(idrotm[5115], 90., atheta, aphi2 + 90., r2, aphi2, r3); | |
b3a22d72 | 3762 | gMC->Gspos(knatra1[15], 1, "ITSV", xpos, ypos, zpos, idrotm[5115], "ONLY"); |
fe4da5cc | 3763 | |
3764 | ||
58005f18 | 3765 | } else if (fMinorVersionV3 == 4) { |
fe4da5cc | 3766 | |
3767 | ||
3768 | rzero = 34.; | |
3769 | dtra[0] = .92; | |
3770 | dtra[1] = 1.; | |
3771 | dtra[2] = dpcb[2] * 2. + 50.5 - 10.5; | |
3772 | dtra1[0] = .92; | |
3773 | dtra1[1] = 1.; | |
3774 | dtra1[2] = TMath::Sqrt(dtra[2] * dtra[2] + (55.4*55.4-50.5*50.5))/2.; | |
3775 | angle = 45.; | |
3776 | offset = angle / 2.; | |
e8189707 | 3777 | for (i = 0; i < 8; ++i) { |
b3a22d72 | 3778 | xtra[i] = rzero * TMath::Cos(i * angle * kdegrad); |
3779 | ytra[i] = rzero * TMath::Sin(i * angle * kdegrad); | |
fe4da5cc | 3780 | ztra[i] = 0.; |
b3a22d72 | 3781 | gMC->Gsvolu(knatra[i], "TUBE", idtmed[274], dtra, 3); |
3782 | gMC->Gspos(knatra[i], 1, "ITSV", xtra[i], ytra[i], ztra[i], 0, "ONLY"); | |
fe4da5cc | 3783 | } |
3784 | ||
3785 | atheta = 22.5; | |
b3a22d72 | 3786 | aphi1 = TMath::ACos(dtra[2] / TMath::Sqrt(dtra[2] * dtra[2] + (50.5 / cos(28.*kdegrad) * (50.5 / cos(28.*kdegrad))- 50.5*50.5))) * kraddeg; |
fe4da5cc | 3787 | aphi2 = 180. - aphi1; |
3788 | xpos = (xtra[0] + xtra[1]) / 2.; | |
3789 | ypos = (ytra[0] + ytra[1]) / 2.; | |
3790 | zpos = dtra[2] / 2.; | |
b3a22d72 | 3791 | gMC->Gsvolu(knatra1[0], "TUBE", idtmed[274], dtra1, 3); |
fe4da5cc | 3792 | r2 = atheta + 90.; |
3793 | r3 = atheta + 90.; | |
3794 | AliMatrix(idrotm[5100], 90., atheta, aphi1 + 90., r2, aphi1, r3); | |
b3a22d72 | 3795 | gMC->Gspos(knatra1[0], 1, "ITSV", xpos, ypos, zpos, idrotm[5100], "ONLY"); |
fe4da5cc | 3796 | zpos = -dtra[2] / 2.; |
b3a22d72 | 3797 | gMC->Gsvolu(knatra1[1], "TUBE", idtmed[274], dtra1, 3); |
fe4da5cc | 3798 | r2 = atheta + 90.; |
3799 | r3 = atheta + 90.; | |
3800 | AliMatrix(idrotm[5101], 90., atheta, aphi2 + 90., r2, aphi2, r3); | |
b3a22d72 | 3801 | gMC->Gspos(knatra1[1], 1, "ITSV", xpos, ypos, zpos, idrotm[5101], "ONLY"); |
fe4da5cc | 3802 | |
3803 | atheta = 67.5; | |
b3a22d72 | 3804 | aphi2 = TMath::ACos(dtra[2] / TMath::Sqrt(dtra[2] * dtra[2] + (50.5 / cos(28.*kdegrad) * (50.5 / cos(28.*kdegrad))- 50.5*50.5))) * kraddeg; |
fe4da5cc | 3805 | aphi1 = 180. - aphi2; |
3806 | xpos = (xtra[1] + xtra[2]) / 2.; | |
3807 | ypos = (ytra[1] + ytra[2]) / 2.; | |
3808 | zpos = dtra[2] / 2.; | |
b3a22d72 | 3809 | gMC->Gsvolu(knatra1[2], "TUBE", idtmed[274], dtra1, 3); |
fe4da5cc | 3810 | r2 = atheta + 90.; |
3811 | r3 = atheta + 90.; | |
3812 | AliMatrix(idrotm[5102], 90., atheta, aphi1 + 90., r2, aphi1, r3); | |
b3a22d72 | 3813 | gMC->Gspos(knatra1[2], 1, "ITSV", xpos, ypos, zpos, idrotm[5102], "ONLY"); |
fe4da5cc | 3814 | zpos = -dtra[2] / 2.; |
b3a22d72 | 3815 | gMC->Gsvolu(knatra1[3], "TUBE", idtmed[274], dtra1, 3); |
fe4da5cc | 3816 | r2 = atheta + 90.; |
3817 | r3 = atheta + 90.; | |
3818 | AliMatrix(idrotm[5103], 90., atheta, aphi2 + 90., r2, aphi2, r3); | |
b3a22d72 | 3819 | gMC->Gspos(knatra1[3], 1, "ITSV", xpos, ypos, zpos, idrotm[5103], "ONLY"); |
fe4da5cc | 3820 | |
3821 | atheta = 112.5; | |
b3a22d72 | 3822 | aphi1 = TMath::ACos(dtra[2] / TMath::Sqrt(dtra[2] * dtra[2] + (50.5 / cos(28.*kdegrad) * (50.5 / cos(28.*kdegrad))- 50.5*50.5))) * kraddeg; |
fe4da5cc | 3823 | aphi2 = 180. - aphi1; |
3824 | xpos = (xtra[2] + xtra[3]) / 2.; | |
3825 | ypos = (ytra[2] + ytra[3]) / 2.; | |
3826 | zpos = dtra[2] / 2.; | |
b3a22d72 | 3827 | gMC->Gsvolu(knatra1[4], "TUBE", idtmed[274], dtra1, 3); |
fe4da5cc | 3828 | r2 = atheta + 90.; |
3829 | r3 = atheta + 90.; | |
3830 | AliMatrix(idrotm[5104], 90., atheta, aphi1 + 90., r2, aphi1, r3); | |
b3a22d72 | 3831 | gMC->Gspos(knatra1[4], 1, "ITSV", xpos, ypos, zpos, idrotm[5104], "ONLY"); |
fe4da5cc | 3832 | zpos = -dtra[2] / 2.; |
b3a22d72 | 3833 | gMC->Gsvolu(knatra1[5], "TUBE", idtmed[274], dtra1, 3); |
fe4da5cc | 3834 | r2 = atheta + 90.; |
3835 | r3 = atheta + 90.; | |
3836 | AliMatrix(idrotm[5105], 90., atheta, aphi2 + 90., r2, aphi2, r3); | |
b3a22d72 | 3837 | gMC->Gspos(knatra1[5], 1, "ITSV", xpos, ypos, zpos, idrotm[5105], "ONLY"); |
fe4da5cc | 3838 | |
3839 | atheta = 157.5; | |
b3a22d72 | 3840 | aphi2 = TMath::ACos(dtra[2] / TMath::Sqrt(dtra[2] * dtra[2] + (50.5 / cos(28.*kdegrad) * (50.5 / cos(28.*kdegrad))- 50.5*50.5))) * kraddeg; |
fe4da5cc | 3841 | aphi1 = 180. - aphi2; |
3842 | xpos = (xtra[3] + xtra[4]) / 2.; | |
3843 | ypos = (ytra[3] + ytra[4]) / 2.; | |
3844 | zpos = dtra[2] / 2.; | |
b3a22d72 | 3845 | gMC->Gsvolu(knatra1[6], "TUBE", idtmed[274], dtra1, 3); |
fe4da5cc | 3846 | r2 = atheta + 90.; |
3847 | r3 = atheta + 90.; | |
3848 | AliMatrix(idrotm[5106], 90., atheta, aphi1 + 90., r2, aphi1, r3); | |
b3a22d72 | 3849 | gMC->Gspos(knatra1[6], 1, "ITSV", xpos, ypos, zpos, idrotm[5106], "ONLY"); |
fe4da5cc | 3850 | zpos = -dtra[2] / 2.; |
b3a22d72 | 3851 | gMC->Gsvolu(knatra1[7], "TUBE", idtmed[274], dtra1, 3); |
fe4da5cc | 3852 | r2 = atheta + 90.; |
3853 | r3 = atheta + 90.; | |
3854 | AliMatrix(idrotm[5107], 90., atheta, aphi2 + 90., r2, aphi2, r3); | |
b3a22d72 | 3855 | gMC->Gspos(knatra1[7], 1, "ITSV", xpos, ypos, zpos, idrotm[5107], "ONLY"); |
fe4da5cc | 3856 | |
3857 | atheta = 22.5; | |
b3a22d72 | 3858 | aphi2 = TMath::ACos(dtra[2] / TMath::Sqrt(dtra[2] * dtra[2] + (50.5 / cos(28.*kdegrad) * (50.5 / cos(28.*kdegrad))- 50.5*50.5))) * kraddeg; |
fe4da5cc | 3859 | aphi1 = 180. - aphi2; |
3860 | xpos = (xtra[4] + xtra[5]) / 2.; | |
3861 | ypos = (ytra[4] + ytra[5]) / 2.; | |
3862 | zpos = dtra[2] / 2.; | |
b3a22d72 | 3863 | gMC->Gsvolu(knatra1[8], "TUBE", idtmed[274], dtra1, 3); |
fe4da5cc | 3864 | r2 = atheta + 90.; |
3865 | r3 = atheta + 90.; | |
3866 | AliMatrix(idrotm[5108], 90., atheta, aphi1 + 90., r2, aphi1, r3); | |
b3a22d72 | 3867 | gMC->Gspos(knatra1[8], 1, "ITSV", xpos, ypos, zpos, idrotm[5108], "ONLY"); |
fe4da5cc | 3868 | zpos = -dtra[2] / 2.; |
b3a22d72 | 3869 | gMC->Gsvolu(knatra1[9], "TUBE", idtmed[274], dtra1, 3); |
fe4da5cc | 3870 | r2 = atheta + 90.; |
3871 | r3 = atheta + 90.; | |
3872 | AliMatrix(idrotm[5109], 90., atheta, aphi2 + 90., r2, aphi2, r3); | |
b3a22d72 | 3873 | gMC->Gspos(knatra1[9], 1, "ITSV", xpos, ypos, zpos, idrotm[5109], "ONLY"); |
fe4da5cc | 3874 | |
3875 | atheta = 67.5; | |
b3a22d72 | 3876 | aphi1 = TMath::ACos(dtra[2] / TMath::Sqrt(dtra[2] * dtra[2] + (50.5 / cos(28.*kdegrad) * (50.5 / cos(28.*kdegrad))- 50.5*50.5))) * kraddeg; |
fe4da5cc | 3877 | aphi2 = 180. - aphi1; |
3878 | xpos = (xtra[5] + xtra[6]) / 2.; | |
3879 | ypos = (ytra[5] + ytra[6]) / 2.; | |
3880 | zpos = dtra[2] / 2.; | |
b3a22d72 | 3881 | gMC->Gsvolu(knatra1[10], "TUBE", idtmed[274], dtra1, 3); |
fe4da5cc | 3882 | r2 = atheta + 90.; |
3883 | r3 = atheta + 90.; | |
3884 | AliMatrix(idrotm[5110], 90., atheta, aphi1 + 90., r2, aphi1, r3); | |
b3a22d72 | 3885 | gMC->Gspos(knatra1[10], 1, "ITSV", xpos, ypos, zpos, idrotm[5110], "ONLY"); |
fe4da5cc | 3886 | zpos = -dtra[2] / 2.; |
b3a22d72 | 3887 | gMC->Gsvolu(knatra1[11], "TUBE", idtmed[274], dtra1, 3); |
fe4da5cc | 3888 | r2 = atheta + 90.; |
3889 | r3 = atheta + 90.; | |
3890 | AliMatrix(idrotm[5111], 90., atheta, aphi2 + 90., r2, aphi2, r3); | |
b3a22d72 | 3891 | gMC->Gspos(knatra1[11], 1, "ITSV", xpos, ypos, zpos, idrotm[5111], "ONLY"); |
fe4da5cc | 3892 | |
3893 | atheta = 112.5; | |
b3a22d72 | 3894 | aphi2 = TMath::ACos(dtra[2] / TMath::Sqrt(dtra[2] * dtra[2] + (50.5 / cos(28.*kdegrad) * (50.5 / cos(28.*kdegrad))- 50.5*50.5))) * kraddeg; |
fe4da5cc | 3895 | aphi1 = 180. - aphi2; |
3896 | xpos = (xtra[6] + xtra[7]) / 2.; | |
3897 | ypos = (ytra[6] + ytra[7]) / 2.; | |
3898 | zpos = dtra[2] / 2.; | |
b3a22d72 | 3899 | gMC->Gsvolu(knatra1[12], "TUBE", idtmed[274], dtra1, 3); |
fe4da5cc | 3900 | r2 = atheta + 90.; |
3901 | r3 = atheta + 90.; | |
3902 | AliMatrix(idrotm[5112], 90., atheta, aphi1 + 90., r2, aphi1, r3); | |
b3a22d72 | 3903 | gMC->Gspos(knatra1[12], 1, "ITSV", xpos, ypos, zpos, idrotm[5112], "ONLY"); |
fe4da5cc | 3904 | zpos = -dtra[2] / 2.; |
b3a22d72 | 3905 | gMC->Gsvolu(knatra1[13], "TUBE", idtmed[274], dtra1, 3); |
fe4da5cc | 3906 | r2 = atheta + 90.; |
3907 | r3 = atheta + 90.; | |
3908 | AliMatrix(idrotm[5113], 90., atheta, aphi2 + 90., r2, aphi2, r3); | |
b3a22d72 | 3909 | gMC->Gspos(knatra1[13], 1, "ITSV", xpos, ypos, zpos, idrotm[5113], "ONLY"); |
fe4da5cc | 3910 | |
3911 | atheta = 157.5; | |
b3a22d72 | 3912 | aphi1 = TMath::ACos(dtra[2] / TMath::Sqrt(dtra[2] * dtra[2] + (50.5 / cos(28.*kdegrad) * (50.5 / cos(28.*kdegrad))- 50.5*50.5))) * kraddeg; |
fe4da5cc | 3913 | aphi2 = 180. - aphi1; |
3914 | xpos = (xtra[7] + xtra[0]) / 2.; | |
3915 | ypos = (ytra[7] + ytra[0]) / 2.; | |
3916 | zpos = dtra[2] / 2.; | |
b3a22d72 | 3917 | gMC->Gsvolu(knatra1[14], "TUBE", idtmed[274], dtra1, 3); |
fe4da5cc | 3918 | r2 = atheta + 90.; |
3919 | r3 = atheta + 90.; | |
3920 | AliMatrix(idrotm[5114], 90., atheta, aphi1 + 90., r2, aphi1, r3); | |
b3a22d72 | 3921 | gMC->Gspos(knatra1[14], 1, "ITSV", xpos, ypos, zpos, idrotm[5114], "ONLY"); |
fe4da5cc | 3922 | zpos = -dtra[2] / 2.; |
b3a22d72 | 3923 | gMC->Gsvolu(knatra1[15], "TUBE", idtmed[274], dtra1, 3); |
fe4da5cc | 3924 | r2 = atheta + 90.; |
3925 | r3 = atheta + 90.; | |
3926 | AliMatrix(idrotm[5115], 90., atheta, aphi2 + 90., r2, aphi2, r3); | |
b3a22d72 | 3927 | gMC->Gspos(knatra1[15], 1, "ITSV", xpos, ypos, zpos, idrotm[5115], "ONLY"); |
fe4da5cc | 3928 | } else { |
3929 | goto L9012; | |
3930 | } | |
3931 | ||
3932 | L9012: | |
3933 | // --- The frame between the end-caps (hexagonal lay-out) --- | |
3934 | ||
3935 | // GOTO 9123 ! skip hexagonal frame | |
3936 | ||
58005f18 | 3937 | if (fMinorVersionV3 == 2) { |
fe4da5cc | 3938 | |
3939 | rzero = 33.5; | |
3940 | dtra2[0] = .92; | |
3941 | dtra2[1] = 1.; | |
3942 | dtra2[2] = dpcb[2] * 2. + 50. - 10.5; | |
3943 | dtra3[0] = .92; | |
3944 | dtra3[1] = 1.; | |
3945 | dtra3[2] = 16.75; | |
3946 | dtra4[0] = .92; | |
3947 | dtra4[1] = 1.; | |
3948 | dtra4[2] = TMath::Sqrt(dtra2[2] * dtra2[2] + (59.9*59.9-50.*50.)) / 2.; | |
3949 | angle = 60.; | |
3950 | offset = angle / 2.; | |
e8189707 | 3951 | for (i = 0; i < 6; ++i) { |
b3a22d72 | 3952 | xtra1[i] = rzero * TMath::Cos((i * angle + offset) *kdegrad); |
3953 | ytra1[i] = rzero * TMath::Sin((i * angle + offset) *kdegrad); | |
fe4da5cc | 3954 | ztra1[i] = 0.; |
b3a22d72 | 3955 | gMC->Gsvolu(knatra2[i], "TUBE", idtmed[274], dtra2, 3); |
3956 | gMC->Gspos(knatra2[i], 1, "ITSV", xtra1[i], ytra1[i], ztra1[i], 0, "ONLY"); | |
fe4da5cc | 3957 | } |
3958 | ||
3959 | atheta = 60.; | |
3960 | aphi = 90.; | |
3961 | xpos = (xtra1[0] + xtra1[1]) / 2.; | |
3962 | ypos = (ytra1[0] + ytra1[1]) / 2.; | |
3963 | zpos = 0.; | |
b3a22d72 | 3964 | gMC->Gsvolu(knatra3[0], "TUBE", idtmed[274], dtra3, 3); |
fe4da5cc | 3965 | r2 = atheta + 90.; |
3966 | r3 = atheta + 90.; | |
3967 | AliMatrix(idrotm[5200], 90., atheta, aphi + 90., r2, aphi, r3); | |
b3a22d72 | 3968 | gMC->Gspos(knatra3[0], 1, "ITSV", xpos, ypos, zpos, idrotm[5200], "ONLY"); |
fe4da5cc | 3969 | |
3970 | atheta = 120.; | |
3971 | aphi = 90.; | |
3972 | xpos = (xtra1[1] + xtra1[2]) / 2.; | |
3973 | ypos = (ytra1[1] + ytra1[2]) / 2.; | |
3974 | zpos = 0.; | |
b3a22d72 | 3975 | gMC->Gsvolu(knatra3[1], "TUBE", idtmed[274], dtra3, 3); |
fe4da5cc | 3976 | r2 = atheta + 90.; |
3977 | r3 = atheta + 90.; | |
3978 | AliMatrix(idrotm[5201], 90., atheta, aphi + 90., r2, aphi, r3); | |
b3a22d72 | 3979 | gMC->Gspos(knatra3[1], 1, "ITSV", xpos, ypos, zpos, idrotm[5201], "ONLY"); |
fe4da5cc | 3980 | |
3981 | atheta = 180.; | |
3982 | aphi = 90.; | |
3983 | xpos = (xtra1[2] + xtra1[3]) / 2.; | |
3984 | ypos = (ytra1[2] + ytra1[3]) / 2.; | |
3985 | zpos = 0.; | |
b3a22d72 | 3986 | gMC->Gsvolu(knatra3[2], "TUBE", idtmed[274], dtra3, 3); |
fe4da5cc | 3987 | r2 = atheta + 90.; |
3988 | r3 = atheta + 90.; | |
3989 | AliMatrix(idrotm[5202], 90., atheta, aphi + 90., r2, aphi, r3); | |
b3a22d72 | 3990 | gMC->Gspos(knatra3[2], 1, "ITSV", xpos, ypos, zpos, idrotm[5202], "ONLY"); |
fe4da5cc | 3991 | |
3992 | atheta = 60.; | |
3993 | aphi = 90.; | |
3994 | xpos = (xtra1[3] + xtra1[4]) / 2.; | |
3995 | ypos = (ytra1[3] + ytra1[4]) / 2.; | |
3996 | zpos = 0.; | |
b3a22d72 | 3997 | gMC->Gsvolu(knatra3[3], "TUBE", idtmed[274], dtra3, 3); |
fe4da5cc | 3998 | r2 = atheta + 90.; |
3999 | r3 = atheta + 90.; | |
4000 | AliMatrix(idrotm[5203], 90., atheta, aphi + 90., r2, aphi, r3); | |
b3a22d72 | 4001 | gMC->Gspos(knatra3[3], 1, "ITSV", xpos, ypos, zpos, idrotm[5203], "ONLY"); |
fe4da5cc | 4002 | |
4003 | atheta = 120.; | |
4004 | aphi = 90.; | |
4005 | xpos = (xtra1[4] + xtra1[5]) / 2.; | |
4006 | ypos = (ytra1[4] + ytra1[5]) / 2.; | |
4007 | zpos = 0.; | |
b3a22d72 | 4008 | gMC->Gsvolu(knatra3[4], "TUBE", idtmed[274], dtra3, 3); |
fe4da5cc | 4009 | r2 = atheta + 90.; |
4010 | r3 = atheta + 90.; | |
4011 | AliMatrix(idrotm[5204], 90., atheta, aphi + 90., r2, aphi, r3); | |
b3a22d72 | 4012 | gMC->Gspos(knatra3[4], 1, "ITSV", xpos, ypos, zpos, idrotm[5204], "ONLY"); |
fe4da5cc | 4013 | |
4014 | atheta = 180.; | |
4015 | aphi = 90.; | |
4016 | xpos = (xtra1[5] + xtra1[0]) / 2.; | |
4017 | ypos = (ytra1[5] + ytra1[0]) / 2.; | |
4018 | zpos = 0.; | |
b3a22d72 | 4019 | gMC->Gsvolu(knatra3[5], "TUBE", idtmed[274], dtra3, 3); |
fe4da5cc | 4020 | r2 = atheta + 90.; |
4021 | r3 = atheta + 90.; | |
4022 | AliMatrix(idrotm[5205], 90., atheta, aphi + 90., r2, aphi, r3); | |
b3a22d72 | 4023 | gMC->Gspos(knatra3[5], 1, "ITSV", xpos, ypos, zpos, idrotm[5205], "ONLY"); |
fe4da5cc | 4024 | |
4025 | atheta = 60.; | |
b3a22d72 | 4026 | aphi2 = TMath::ACos(dtra2[2] / TMath::Sqrt(dtra2[2] * dtra2[2] + (50. / cos(34.*kdegrad) * (50. / cos(34.*kdegrad))- 50.*50.))) * kraddeg; |
fe4da5cc | 4027 | aphi1 = 180. - aphi2; |
4028 | xpos = (xtra1[0] + xtra1[1]) / 2.; | |
4029 | ypos = (ytra1[0] + ytra1[1]) / 2.; | |
4030 | zpos = dtra2[2] / 2.; | |
b3a22d72 | 4031 | gMC->Gsvolu(knatra4[0], "TUBE", idtmed[274], dtra4, 3); |
fe4da5cc | 4032 | r2 = atheta + 90.; |
4033 | r3 = atheta + 90.; | |
4034 | AliMatrix(idrotm[5210], 90., atheta, aphi1 + 90., r2, aphi1, r3); | |
b3a22d72 | 4035 | gMC->Gspos(knatra4[0], 1, "ITSV", xpos, ypos, zpos, idrotm[5210], "ONLY"); |
fe4da5cc | 4036 | zpos = -dtra2[2] / 2.; |
b3a22d72 | 4037 | gMC->Gsvolu(knatra4[1], "TUBE", idtmed[274], dtra4, 3); |
fe4da5cc | 4038 | r2 = atheta + 90.; |
4039 | r3 = atheta + 90.; | |
4040 | AliMatrix(idrotm[5211], 90., atheta, aphi2 + 90., r2, aphi2, r3); | |
b3a22d72 | 4041 | gMC->Gspos(knatra4[1], 1, "ITSV", xpos, ypos, zpos, idrotm[5211], "ONLY"); |
fe4da5cc | 4042 | |
4043 | atheta = 120.; | |
b3a22d72 | 4044 | aphi1 = TMath::ACos(dtra2[2] / TMath::Sqrt(dtra2[2] * dtra2[2] + (50. / cos(34.*kdegrad) * (50. / cos(34.*kdegrad))- 50.*50.))) * kraddeg; |
fe4da5cc | 4045 | aphi2 = 180. - aphi1; |
4046 | xpos = (xtra1[1] + xtra1[2]) / 2.; | |
4047 | ypos = (ytra1[1] + ytra1[2]) / 2.; | |
4048 | zpos = dtra2[2] / 2.; | |
b3a22d72 | 4049 | gMC->Gsvolu(knatra4[2], "TUBE", idtmed[274], dtra4, 3); |
fe4da5cc | 4050 | r2 = atheta + 90.; |
4051 | r3 = atheta + 90.; | |
4052 | AliMatrix(idrotm[5212], 90., atheta, aphi1 + 90., r2, aphi1, r3); | |
b3a22d72 | 4053 | gMC->Gspos(knatra4[2], 1, "ITSV", xpos, ypos, zpos, idrotm[5212], "ONLY"); |
fe4da5cc | 4054 | zpos = -dtra2[2] / 2.; |
b3a22d72 | 4055 | gMC->Gsvolu(knatra4[3], "TUBE", idtmed[274], dtra4, 3); |
fe4da5cc | 4056 | r2 = atheta + 90.; |
4057 | r3 = atheta + 90.; | |
4058 | AliMatrix(idrotm[5213], 90., atheta, aphi2 + 90., r2, aphi2, r3); | |
b3a22d72 | 4059 | gMC->Gspos(knatra4[3], 1, "ITSV", xpos, ypos, zpos, idrotm[5213], "ONLY"); |
fe4da5cc | 4060 | |
4061 | atheta = 180.; | |
b3a22d72 | 4062 | aphi2 = TMath::ACos(dtra2[2] / TMath::Sqrt(dtra2[2] * dtra2[2] + (50. / cos(34.*kdegrad) * (50. / cos(34.*kdegrad))- 50.*50.))) * kraddeg; |
fe4da5cc | 4063 | aphi1 = 180. - aphi2; |
4064 | xpos = (xtra1[2] + xtra1[3]) / 2.; | |
4065 | ypos = (ytra1[2] + ytra1[3]) / 2.; | |
4066 | zpos = dtra2[2] / 2.; | |
b3a22d72 | 4067 | gMC->Gsvolu(knatra4[4], "TUBE", idtmed[274], dtra4, 3); |
fe4da5cc | 4068 | r2 = atheta + 90.; |
4069 | r3 = atheta + 90.; | |
4070 | AliMatrix(idrotm[5214], 90., atheta, aphi1 + 90., r2, aphi1, r3); | |
b3a22d72 | 4071 | gMC->Gspos(knatra4[4], 1, "ITSV", xpos, ypos, zpos, idrotm[5214], "ONLY"); |
fe4da5cc | 4072 | zpos = -dtra2[2] / 2.; |
b3a22d72 | 4073 | gMC->Gsvolu(knatra4[5], "TUBE", idtmed[274], dtra4, 3); |
fe4da5cc | 4074 | r2 = atheta + 90.; |
4075 | r3 = atheta + 90.; | |
4076 | AliMatrix(idrotm[5215], 90., atheta, aphi2 + 90., r2, aphi2, r3); | |
b3a22d72 | 4077 | gMC->Gspos(knatra4[5], 1, "ITSV", xpos, ypos, zpos, idrotm[5215], "ONLY"); |
fe4da5cc | 4078 | atheta = 180.; |
b3a22d72 | 4079 | aphi1 = TMath::ACos(dtra2[2] / TMath::Sqrt(dtra2[2] * dtra2[2] + (50. / cos(34.*kdegrad) * (50. / cos(34.*kdegrad)) |
4080 | - 50.*50.))) * kraddeg; | |
fe4da5cc | 4081 | aphi2 = 180. - aphi1; |
4082 | xpos = (xtra1[2] + xtra1[3]) / 2.; | |
4083 | ypos = (ytra1[2] + ytra1[3]) / 2.; | |
4084 | zpos = dtra2[2] / 2.; | |
b3a22d72 | 4085 | gMC->Gsvolu(knatra4[6], "TUBE", idtmed[274], dtra4, 3); |
fe4da5cc | 4086 | r2 = atheta + 90.; |
4087 | r3 = atheta + 90.; | |
4088 | AliMatrix(idrotm[5216], 90., atheta, aphi1 + 90., r2, aphi1, r3); | |
b3a22d72 | 4089 | gMC->Gspos(knatra4[6], 1, "ITSV", xpos, ypos, zpos, idrotm[5216], "ONLY"); |
fe4da5cc | 4090 | zpos = -dtra2[2] / 2.; |
b3a22d72 | 4091 | gMC->Gsvolu(knatra4[7], "TUBE", idtmed[274], dtra4, 3); |
fe4da5cc | 4092 | r2 = atheta + 90.; |
4093 | r3 = atheta + 90.; | |
4094 | AliMatrix(idrotm[5217], 90., atheta, aphi2 + 90., r2, aphi2, r3); | |
b3a22d72 | 4095 | gMC->Gspos(knatra4[7], 1, "ITSV", xpos, ypos, zpos, idrotm[5217], "ONLY"); |
fe4da5cc | 4096 | |
4097 | atheta = 60.; | |
b3a22d72 | 4098 | aphi2 = TMath::ACos(dtra2[2] / TMath::Sqrt(dtra2[2] * dtra2[2] + (50. / cos(34.*kdegrad) * (50. / cos(34.*kdegrad))- 50.*50.))) * kraddeg; |
fe4da5cc | 4099 | aphi1 = 180. - aphi2; |
4100 | xpos = (xtra1[3] + xtra1[4]) / 2.; | |
4101 | ypos = (ytra1[3] + ytra1[4]) / 2.; | |
4102 | zpos = dtra2[2] / 2.; | |
b3a22d72 | 4103 | gMC->Gsvolu(knatra4[8], "TUBE", idtmed[274], dtra4, 3); |
fe4da5cc | 4104 | r2 = atheta + 90.; |
4105 | r3 = atheta + 90.; | |
4106 | AliMatrix(idrotm[5218], 90., atheta, aphi1 + 90., r2, aphi1, r3); | |
b3a22d72 | 4107 | gMC->Gspos(knatra4[8], 1, "ITSV", xpos, ypos, zpos, idrotm[5218], "ONLY"); |
fe4da5cc | 4108 | zpos = -dtra2[2] / 2.; |
b3a22d72 | 4109 | gMC->Gsvolu(knatra4[9], "TUBE", idtmed[274], dtra4, 3); |
fe4da5cc | 4110 | r2 = atheta + 90.; |
4111 | r3 = atheta + 90.; | |
4112 | AliMatrix(idrotm[5219], 90., atheta, aphi2 + 90., r2, aphi2, r3); | |
b3a22d72 | 4113 | gMC->Gspos(knatra4[9], 1, "ITSV", xpos, ypos, zpos, idrotm[5219], "ONLY"); |
fe4da5cc | 4114 | |
4115 | atheta = 120.; | |
b3a22d72 | 4116 | aphi1 = TMath::ACos(dtra2[2] / TMath::Sqrt(dtra2[2] * dtra2[2] + (50. / cos(34.*kdegrad) * (50. / cos(34.*kdegrad))- 50.*50.))) * kraddeg; |
fe4da5cc | 4117 | aphi2 = 180. - aphi1; |
4118 | xpos = (xtra1[4] + xtra1[5]) / 2.; | |
4119 | ypos = (ytra1[4] + ytra1[5]) / 2.; | |
4120 | zpos = dtra2[2] / 2.; | |
b3a22d72 | 4121 | gMC->Gsvolu(knatra4[10], "TUBE", idtmed[274], dtra4, 3); |
fe4da5cc | 4122 | r2 = atheta + 90.; |
4123 | r3 = atheta + 90.; | |
4124 | AliMatrix(idrotm[5220], 90., atheta, aphi1 + 90., r2, aphi1, r3); | |
b3a22d72 | 4125 | gMC->Gspos(knatra4[10], 1, "ITSV", xpos, ypos, zpos, idrotm[5220], "ONLY"); |
fe4da5cc | 4126 | zpos = -dtra2[2] / 2.; |
b3a22d72 | 4127 | gMC->Gsvolu(knatra4[11], "TUBE", idtmed[274], dtra4, 3); |
fe4da5cc | 4128 | r2 = atheta + 90.; |
4129 | r3 = atheta + 90.; | |
4130 | AliMatrix(idrotm[5221], 90., atheta, aphi2 + 90., r2, aphi2, r3); | |
b3a22d72 | 4131 | gMC->Gspos(knatra4[11], 1, "ITSV", xpos, ypos, zpos, idrotm[5221], "ONLY"); |
fe4da5cc | 4132 | |
4133 | atheta = 180.; | |
b3a22d72 | 4134 | aphi2 = TMath::ACos(dtra2[2] / TMath::Sqrt(dtra2[2] * dtra2[2] + (50. / cos(34.*kdegrad) * (50. / cos(34.*kdegrad))- 50.*50.))) * kraddeg; |
fe4da5cc | 4135 | aphi1 = 180. - aphi2; |
4136 | xpos = (xtra1[5] + xtra1[0]) / 2.; | |
4137 | ypos = (ytra1[5] + ytra1[0]) / 2.; | |
4138 | zpos = dtra2[2] / 2.; | |
b3a22d72 | 4139 | gMC->Gsvolu(knatra4[12], "TUBE", idtmed[274], dtra4, 3); |
fe4da5cc | 4140 | r2 = atheta + 90.; |
4141 | r3 = atheta + 90.; | |
4142 | AliMatrix(idrotm[5222], 90., atheta, aphi1 + 90., r2, aphi1, r3); | |
b3a22d72 | 4143 | gMC->Gspos(knatra4[12], 1, "ITSV", xpos, ypos, zpos, idrotm[5222], "ONLY"); |
fe4da5cc | 4144 | zpos = -dtra2[2] / 2.; |
b3a22d72 | 4145 | gMC->Gsvolu(knatra4[13], "TUBE", idtmed[274], dtra4, 3); |
fe4da5cc | 4146 | r2 = atheta + 90.; |
4147 | r3 = atheta + 90.; | |
4148 | AliMatrix(idrotm[5223], 90., atheta, aphi2 + 90., r2, aphi2, r3); | |
b3a22d72 | 4149 | gMC->Gspos(knatra4[13], 1, "ITSV", xpos, ypos, zpos, idrotm[5223], "ONLY"); |
fe4da5cc | 4150 | atheta = 180.; |
b3a22d72 | 4151 | aphi1 = TMath::ACos(dtra2[2] / TMath::Sqrt(dtra2[2] * dtra2[2] + (50. / cos(34.*kdegrad) * (50. / cos(34.*kdegrad))- 50.*50.))) * kraddeg; |
fe4da5cc | 4152 | aphi2 = 180. - aphi1; |
4153 | xpos = (xtra1[5] + xtra1[0]) / 2.; | |
4154 | ypos = (ytra1[5] + ytra1[0]) / 2.; | |
4155 | zpos = dtra2[2] / 2.; | |
b3a22d72 | 4156 | gMC->Gsvolu(knatra4[14], "TUBE", idtmed[274], dtra4, 3); |
fe4da5cc | 4157 | r2 = atheta + 90.; |
4158 | r3 = atheta + 90.; | |
4159 | AliMatrix(idrotm[5224], 90., atheta, aphi1 + 90., r2, aphi1, r3); | |
b3a22d72 | 4160 | gMC->Gspos(knatra4[14], 1, "ITSV", xpos, ypos, zpos, idrotm[5224], "ONLY"); |
fe4da5cc | 4161 | zpos = -dtra2[2] / 2.; |
b3a22d72 | 4162 | gMC->Gsvolu(knatra4[15], "TUBE", idtmed[274], dtra4, 3); |
fe4da5cc | 4163 | r2 = atheta + 90.; |
4164 | r3 = atheta + 90.; | |
4165 | AliMatrix(idrotm[5225], 90., atheta, aphi2 + 90., r2, aphi2, r3); | |
b3a22d72 | 4166 | gMC->Gspos(knatra4[15], 1, "ITSV", xpos, ypos, zpos, idrotm[5225], "ONLY"); |
fe4da5cc | 4167 | |
4168 | ||
58005f18 | 4169 | } else if (fMinorVersionV3 == 5) { |
fe4da5cc | 4170 | |
4171 | ||
4172 | rzero = 33.5; | |
4173 | dtra2[0] = .92; | |
4174 | dtra2[1] = 1.; | |
4175 | dtra2[2] = dpcb[2] * 2. + 50. - 10.5; | |
4176 | dtra3[0] = .92; | |
4177 | dtra3[1] = 1.; | |
4178 | dtra3[2] = 16.75; | |
4179 | dtra4[0] = .92; | |
4180 | dtra4[1] = 1.; | |
4181 | dtra4[2] = TMath::Sqrt(dtra2[2] * dtra2[2] + (59.9*59.9-50.*50.)) / 2.; | |
4182 | angle = 60.; | |
4183 | offset = angle / 2.; | |
e8189707 | 4184 | for (i = 0; i < 6; ++i) { |
b3a22d72 | 4185 | xtra1[i] = rzero * TMath::Cos((i * angle + offset) *kdegrad); |
4186 | ytra1[i] = rzero * TMath::Sin((i * angle + offset) *kdegrad); | |
fe4da5cc | 4187 | ztra1[i] = 0.; |
b3a22d72 | 4188 | gMC->Gsvolu(knatra2[i], "TUBE", idtmed[274], dtra2, 3); |
4189 | gMC->Gspos(knatra2[i], 1, "ITSV", xtra1[i], ytra1[i], ztra1[i], 0, "ONLY"); | |
fe4da5cc | 4190 | } |
4191 | ||
4192 | atheta = 60.; | |
4193 | aphi = 90.; | |
4194 | xpos = (xtra1[0] + xtra1[1]) / 2.; | |
4195 | ypos = (ytra1[0] + ytra1[1]) / 2.; | |
4196 | zpos = 0.; | |
b3a22d72 | 4197 | gMC->Gsvolu(knatra3[0], "TUBE", idtmed[274], dtra3, 3); |
fe4da5cc | 4198 | r2 = atheta + 90.; |
4199 | r3 = atheta + 90.; | |
4200 | AliMatrix(idrotm[5200], 90., atheta, aphi + 90., r2, aphi, r3); | |
b3a22d72 | 4201 | gMC->Gspos(knatra3[0], 1, "ITSV", xpos, ypos, zpos, idrotm[5200], "ONLY"); |
fe4da5cc | 4202 | |
4203 | atheta = 120.; | |
4204 | aphi = 90.; | |
4205 | xpos = (xtra1[1] + xtra1[2]) / 2.; | |
4206 | ypos = (ytra1[1] + ytra1[2]) / 2.; | |
4207 | zpos = 0.; | |
b3a22d72 | 4208 | gMC->Gsvolu(knatra3[1], "TUBE", idtmed[274], dtra3, 3); |
fe4da5cc | 4209 | r2 = atheta + 90.; |
4210 | r3 = atheta + 90.; | |
4211 | AliMatrix(idrotm[5201], 90., atheta, aphi + 90., r2, aphi, r3); | |
b3a22d72 | 4212 | gMC->Gspos(knatra3[1], 1, "ITSV", xpos, ypos, zpos, idrotm[5201], "ONLY"); |
fe4da5cc | 4213 | |
4214 | atheta = 180.; | |
4215 | aphi = 90.; | |
4216 | xpos = (xtra1[2] + xtra1[3]) / 2.; | |
4217 | ypos = (ytra1[2] + ytra1[3]) / 2.; | |
4218 | zpos = 0.; | |
b3a22d72 | 4219 | gMC->Gsvolu(knatra3[2], "TUBE", idtmed[274], dtra3, 3); |
fe4da5cc | 4220 | r2 = atheta + 90.; |
4221 | r3 = atheta + 90.; | |
4222 | AliMatrix(idrotm[5202], 90., atheta, aphi + 90., r2, aphi, r3); | |
b3a22d72 | 4223 | gMC->Gspos(knatra3[2], 1, "ITSV", xpos, ypos, zpos, idrotm[5202], "ONLY"); |
fe4da5cc | 4224 | |
4225 | atheta = 60.; | |
4226 | aphi = 90.; | |
4227 | xpos = (xtra1[3] + xtra1[4]) / 2.; | |
4228 | ypos = (ytra1[3] + ytra1[4]) / 2.; | |
4229 | zpos = 0.; | |
b3a22d72 | 4230 | gMC->Gsvolu(knatra3[3], "TUBE", idtmed[274], dtra3, 3); |
fe4da5cc | 4231 | r2 = atheta + 90.; |
4232 | r3 = atheta + 90.; | |
4233 | AliMatrix(idrotm[5203], 90., atheta, aphi + 90., r2, aphi, r3); | |
b3a22d72 | 4234 | gMC->Gspos(knatra3[3], 1, "ITSV", xpos, ypos, zpos, idrotm[5203], "ONLY"); |
fe4da5cc | 4235 | |
4236 | atheta = 120.; | |
4237 | aphi = 90.; | |
4238 | xpos = (xtra1[4] + xtra1[5]) / 2.; | |
4239 | ypos = (ytra1[4] + ytra1[5]) / 2.; | |
4240 | zpos = 0.; | |
b3a22d72 | 4241 | gMC->Gsvolu(knatra3[4], "TUBE", idtmed[274], dtra3, 3); |
fe4da5cc | 4242 | r2 = atheta + 90.; |
4243 | r3 = atheta + 90.; | |
4244 | AliMatrix(idrotm[5204], 90., atheta, aphi + 90., r2, aphi, r3); | |
b3a22d72 | 4245 | gMC->Gspos(knatra3[4], 1, "ITSV", xpos, ypos, zpos, idrotm[5204], "ONLY"); |
fe4da5cc | 4246 | |
4247 | atheta = 180.; | |
4248 | aphi = 90.; | |
4249 | xpos = (xtra1[5] + xtra1[0]) / 2.; | |
4250 | ypos = (ytra1[5] + ytra1[0]) / 2.; | |
4251 | zpos = 0.; | |
b3a22d72 | 4252 | gMC->Gsvolu(knatra3[5], "TUBE", idtmed[274], dtra3, 3); |
fe4da5cc | 4253 | r2 = atheta + 90.; |
4254 | r3 = atheta + 90.; | |
4255 | AliMatrix(idrotm[5205], 90., atheta, aphi + 90., r2, aphi, r3); | |
b3a22d72 | 4256 | gMC->Gspos(knatra3[5], 1, "ITSV", xpos, ypos, zpos, idrotm[5205], "ONLY"); |
fe4da5cc | 4257 | |
4258 | atheta = 60.; | |
b3a22d72 | 4259 | aphi2 = TMath::ACos(dtra2[2] / TMath::Sqrt(dtra2[2] * dtra2[2] + (50. / cos(34.*kdegrad) * (50. / cos(34.*kdegrad))- 50.*50.))) * kraddeg; |
fe4da5cc | 4260 | aphi1 = 180. - aphi2; |
4261 | xpos = (xtra1[0] + xtra1[1]) / 2.; | |
4262 | ypos = (ytra1[0] + ytra1[1]) / 2.; | |
4263 | zpos = dtra2[2] / 2.; | |
b3a22d72 | 4264 | gMC->Gsvolu(knatra4[0], "TUBE", idtmed[274], dtra4, 3); |
fe4da5cc | 4265 | r2 = atheta + 90.; |
4266 | r3 = atheta + 90.; | |
4267 | AliMatrix(idrotm[5210], 90., atheta, aphi1 + 90., r2, aphi1, r3); | |
b3a22d72 | 4268 | gMC->Gspos(knatra4[0], 1, "ITSV", xpos, ypos, zpos, idrotm[5210], "ONLY"); |
fe4da5cc | 4269 | zpos = -dtra2[2] / 2.; |
b3a22d72 | 4270 | gMC->Gsvolu(knatra4[1], "TUBE", idtmed[274], dtra4, 3); |
fe4da5cc | 4271 | r2 = atheta + 90.; |
4272 | r3 = atheta + 90.; | |
4273 | AliMatrix(idrotm[5211], 90., atheta, aphi2 + 90., r2, aphi2, r3); | |
b3a22d72 | 4274 | gMC->Gspos(knatra4[1], 1, "ITSV", xpos, ypos, zpos, idrotm[5211], "ONLY"); |
fe4da5cc | 4275 | |
4276 | atheta = 120.; | |
b3a22d72 | 4277 | aphi1 = TMath::ACos(dtra2[2] / TMath::Sqrt(dtra2[2] * dtra2[2] + (50. / cos(34.*kdegrad) * (50. / cos(34.*kdegrad))- 50.*50.))) * kraddeg; |
fe4da5cc | 4278 | aphi2 = 180. - aphi1; |
4279 | xpos = (xtra1[1] + xtra1[2]) / 2.; | |
4280 | ypos = (ytra1[1] + ytra1[2]) / 2.; | |
4281 | zpos = dtra2[2] / 2.; | |
b3a22d72 | 4282 | gMC->Gsvolu(knatra4[2], "TUBE", idtmed[274], dtra4, 3); |
fe4da5cc | 4283 | r2 = atheta + 90.; |
4284 | r3 = atheta + 90.; | |
4285 | AliMatrix(idrotm[5212], 90., atheta, aphi1 + 90., r2, aphi1, r3); | |
b3a22d72 | 4286 | gMC->Gspos(knatra4[2], 1, "ITSV", xpos, ypos, zpos, idrotm[5212], "ONLY"); |
fe4da5cc | 4287 | zpos = -dtra2[2] / 2.; |
b3a22d72 | 4288 | gMC->Gsvolu(knatra4[3], "TUBE", idtmed[274], dtra4, 3); |
fe4da5cc | 4289 | r2 = atheta + 90.; |
4290 | r3 = atheta + 90.; | |
4291 | AliMatrix(idrotm[5213], 90., atheta, aphi2 + 90., r2, aphi2, r3); | |
b3a22d72 | 4292 | gMC->Gspos(knatra4[3], 1, "ITSV", xpos, ypos, zpos, idrotm[5213], "ONLY"); |
fe4da5cc | 4293 | |
4294 | atheta = 180.; | |
b3a22d72 | 4295 | aphi2 = TMath::ACos(dtra2[2] / TMath::Sqrt(dtra2[2] * dtra2[2] + (50. / cos(34.*kdegrad) * (50. / cos(34.*kdegrad))- 50.*50.))) * kraddeg; |
fe4da5cc | 4296 | aphi1 = 180. - aphi2; |
4297 | xpos = (xtra1[2] + xtra1[3]) / 2.; | |
4298 | ypos = (ytra1[2] + ytra1[3]) / 2.; | |
4299 | zpos = dtra2[2] / 2.; | |
b3a22d72 | 4300 | gMC->Gsvolu(knatra4[4], "TUBE", idtmed[274], dtra4, 3); |
fe4da5cc | 4301 | r2 = atheta + 90.; |
4302 | r3 = atheta + 90.; | |
4303 | AliMatrix(idrotm[5214], 90., atheta, aphi1 + 90., r2, aphi1, r3); | |
b3a22d72 | 4304 | gMC->Gspos(knatra4[4], 1, "ITSV", xpos, ypos, zpos, idrotm[5214], "ONLY"); |
fe4da5cc | 4305 | zpos = -dtra2[2] / 2.; |
b3a22d72 | 4306 | gMC->Gsvolu(knatra4[5], "TUBE", idtmed[274], dtra4, 3); |
fe4da5cc | 4307 | r2 = atheta + 90.; |
4308 | r3 = atheta + 90.; | |
4309 | AliMatrix(idrotm[5215], 90., atheta, aphi2 + 90., r2, aphi2, r3); | |
b3a22d72 | 4310 | gMC->Gspos(knatra4[5], 1, "ITSV", xpos, ypos, zpos, idrotm[5215], "ONLY"); |
fe4da5cc | 4311 | atheta = 180.; |
b3a22d72 | 4312 | aphi1 = TMath::ACos(dtra2[2] / TMath::Sqrt(dtra2[2] * dtra2[2] + (50. / cos(34.*kdegrad) * (50. / cos(34.*kdegrad))- 50.*50.))) * kraddeg; |
fe4da5cc | 4313 | aphi2 = 180. - aphi1; |
4314 | xpos = (xtra1[2] + xtra1[3]) / 2.; | |
4315 | ypos = (ytra1[2] + ytra1[3]) / 2.; | |
4316 | zpos = dtra2[2] / 2.; | |
b3a22d72 | 4317 | gMC->Gsvolu(knatra4[6], "TUBE", idtmed[274], dtra4, 3); |
fe4da5cc | 4318 | r2 = atheta + 90.; |
4319 | r3 = atheta + 90.; | |
4320 | AliMatrix(idrotm[5216], 90., atheta, aphi1 + 90., r2, aphi1, r3); | |
b3a22d72 | 4321 | gMC->Gspos(knatra4[6], 1, "ITSV", xpos, ypos, zpos, idrotm[5216], "ONLY"); |
fe4da5cc | 4322 | zpos = -dtra2[2] / 2.; |
b3a22d72 | 4323 | gMC->Gsvolu(knatra4[7], "TUBE", idtmed[274], dtra4, 3); |
fe4da5cc | 4324 | r2 = atheta + 90.; |
4325 | r3 = atheta + 90.; | |
4326 | AliMatrix(idrotm[5217], 90., atheta, aphi2 + 90., r2, aphi2, r3); | |
b3a22d72 | 4327 | gMC->Gspos(knatra4[7], 1, "ITSV", xpos, ypos, zpos, idrotm[5217], "ONLY"); |
fe4da5cc | 4328 | |
4329 | atheta = 60.; | |
b3a22d72 | 4330 | aphi2 = TMath::ACos(dtra2[2] / TMath::Sqrt(dtra2[2] * dtra2[2] + (50. / cos(34.*kdegrad) * (50. / cos(34.*kdegrad))- 50.*50.))) * kraddeg; |
fe4da5cc | 4331 | aphi1 = 180. - aphi2; |
4332 | xpos = (xtra1[3] + xtra1[4]) / 2.; | |
4333 | ypos = (ytra1[3] + ytra1[4]) / 2.; | |
4334 | zpos = dtra2[2] / 2.; | |
b3a22d72 | 4335 | gMC->Gsvolu(knatra4[8], "TUBE", idtmed[274], dtra4, 3); |
fe4da5cc | 4336 | r2 = atheta + 90.; |
4337 | r3 = atheta + 90.; | |
4338 | AliMatrix(idrotm[5218], 90., atheta, aphi1 + 90., r2, aphi1, r3); | |
b3a22d72 | 4339 | gMC->Gspos(knatra4[8], 1, "ITSV", xpos, ypos, zpos, idrotm[5218], "ONLY"); |
fe4da5cc | 4340 | zpos = -dtra2[2] / 2.; |
b3a22d72 | 4341 | gMC->Gsvolu(knatra4[9], "TUBE", idtmed[274], dtra4, 3); |
fe4da5cc | 4342 | r2 = atheta + 90.; |
4343 | r3 = atheta + 90.; | |
4344 | AliMatrix(idrotm[5219], 90., atheta, aphi2 + 90., r2, aphi2, r3); | |
b3a22d72 | 4345 | gMC->Gspos(knatra4[9], 1, "ITSV", xpos, ypos, zpos, idrotm[5219], "ONLY"); |
fe4da5cc | 4346 | |
4347 | atheta = 120.; | |
b3a22d72 | 4348 | aphi1 = TMath::ACos(dtra2[2] / TMath::Sqrt(dtra2[2] * dtra2[2] + (50. / cos(34.*kdegrad) * (50. / cos(34.*kdegrad))- 50.*50.))) * kraddeg; |
fe4da5cc | 4349 | aphi2 = 180. - aphi1; |
4350 | xpos = (xtra1[4] + xtra1[5]) / 2.; | |
4351 | ypos = (ytra1[4] + ytra1[5]) / 2.; | |
4352 | zpos = dtra2[2] / 2.; | |
b3a22d72 | 4353 | gMC->Gsvolu(knatra4[10], "TUBE", idtmed[274], dtra4, 3); |
fe4da5cc | 4354 | r2 = atheta + 90.; |
4355 | r3 = atheta + 90.; | |
4356 | AliMatrix(idrotm[5220], 90., atheta, aphi1 + 90., r2, aphi1, r3); | |
b3a22d72 | 4357 | gMC->Gspos(knatra4[10], 1, "ITSV", xpos, ypos, zpos, idrotm[5220], "ONLY"); |
fe4da5cc | 4358 | zpos = -dtra2[2] / 2.; |
b3a22d72 | 4359 | gMC->Gsvolu(knatra4[11], "TUBE", idtmed[274], dtra4, 3); |
fe4da5cc | 4360 | r2 = atheta + 90.; |
4361 | r3 = atheta + 90.; | |
4362 | AliMatrix(idrotm[5221], 90., atheta, aphi2 + 90., r2, aphi2, r3); | |
b3a22d72 | 4363 | gMC->Gspos(knatra4[11], 1, "ITSV", xpos, ypos, zpos, idrotm[5221], "ONLY"); |
fe4da5cc | 4364 | |
4365 | atheta = 180.; | |
b3a22d72 | 4366 | aphi2 = TMath::ACos(dtra2[2] / TMath::Sqrt(dtra2[2] * dtra2[2] + (50. / cos(34.*kdegrad) * (50. / cos(34.*kdegrad))- 50.*50.))) * kraddeg; |
fe4da5cc | 4367 | aphi1 = 180. - aphi2; |
4368 | xpos = (xtra1[5] + xtra1[0]) / 2.; | |
4369 | ypos = (ytra1[5] + ytra1[0]) / 2.; | |
4370 | zpos = dtra2[2] / 2.; | |
b3a22d72 | 4371 | gMC->Gsvolu(knatra4[12], "TUBE", idtmed[274], dtra4, 3); |
fe4da5cc | 4372 | r2 = atheta + 90.; |
4373 | r3 = atheta + 90.; | |
4374 | AliMatrix(idrotm[5222], 90., atheta, aphi1 + 90., r2, aphi1, r3); | |
b3a22d72 | 4375 | gMC->Gspos(knatra4[12], 1, "ITSV", xpos, ypos, zpos, idrotm[5222], "ONLY"); |
fe4da5cc | 4376 | zpos = -dtra2[2] / 2.; |
b3a22d72 | 4377 | gMC->Gsvolu(knatra4[13], "TUBE", idtmed[274], dtra4, 3); |
fe4da5cc | 4378 | r2 = atheta + 90.; |
4379 | r3 = atheta + 90.; | |
4380 | AliMatrix(idrotm[5223], 90., atheta, aphi2 + 90., r2, aphi2, r3); | |
b3a22d72 | 4381 | gMC->Gspos(knatra4[13], 1, "ITSV", xpos, ypos, zpos, idrotm[5223], "ONLY"); |
fe4da5cc | 4382 | atheta = 180.; |
b3a22d72 | 4383 | aphi1 = TMath::ACos(dtra2[2] / TMath::Sqrt(dtra2[2] * dtra2[2] + (50. / cos(34.*kdegrad) * (50. / cos(34.*kdegrad))- 50.*50.))) * kraddeg; |
fe4da5cc | 4384 | aphi2 = 180. - aphi1; |
4385 | xpos = (xtra1[5] + xtra1[0]) / 2.; | |
4386 | ypos = (ytra1[5] + ytra1[0]) / 2.; | |
4387 | zpos = dtra2[2] / 2.; | |
b3a22d72 | 4388 | gMC->Gsvolu(knatra4[14], "TUBE", idtmed[274], dtra4, 3); |
fe4da5cc | 4389 | r2 = atheta + 90.; |
4390 | r3 = atheta + 90.; | |
4391 | AliMatrix(idrotm[5224], 90., atheta, aphi1 + 90., r2, aphi1, r3); | |
b3a22d72 | 4392 | gMC->Gspos(knatra4[14], 1, "ITSV", xpos, ypos, zpos, idrotm[5224], "ONLY"); |
fe4da5cc | 4393 | zpos = -dtra2[2] / 2.; |
b3a22d72 | 4394 | gMC->Gsvolu(knatra4[15], "TUBE", idtmed[274], dtra4, 3); |
fe4da5cc | 4395 | r2 = atheta + 90.; |
4396 | r3 = atheta + 90.; | |
4397 | AliMatrix(idrotm[5225], 90., atheta, aphi2 + 90., r2, aphi2, r3); | |
b3a22d72 | 4398 | gMC->Gspos(knatra4[15], 1, "ITSV", xpos, ypos, zpos, idrotm[5225], "ONLY"); |
fe4da5cc | 4399 | } else { |
4400 | goto L9123; | |
4401 | } | |
4402 | ||
4403 | L9123: | |
4404 | // --- Define the end-caps | |
4405 | ||
4406 | // GOTO 9234 ! skip both end-caps | |
4407 | ||
4408 | // --- Define the Z>0 end-cap | |
4409 | ||
4410 | // GOTO 9345 ! skip the Z>0 end-cap | |
4411 | ||
4412 | dcone[0] = 16.75; | |
4413 | dcone[1] = 12.; | |
4414 | dcone[2] = 12.02; | |
4415 | dcone[3] = (338.-3.)*455./(338.-3.-10.)/10.; | |
b3a22d72 | 4416 | dcone[4] = .02 / TMath::Cos(45.*kdegrad) + (338.-3.)*455./(338.-3.-10.)/10.; |
fe4da5cc | 4417 | xpos = 0.; |
4418 | ypos = 0.; | |
4419 | zpos = dpcb[2] * 2. + (583.+(338.-3.))/2./10. - 10.5; | |
4420 | // end-ladder electro | |
cfce8870 | 4421 | gMC->Gsvolu("RCON", "CONE", idtmed[274], dcone, 5); |
4422 | gMC->Gspos("RCON", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY"); | |
fe4da5cc | 4423 | |
b3a22d72 | 4424 | dtube[0] = .02 / TMath::Cos(45.*kdegrad) + (338.-3.)*455./(338.-3.-10.)/10.; |
fe4da5cc | 4425 | dtube[1] = 49.9; |
4426 | // In the Simonetti's drawings 52. In the TP 50. | |
4427 | dtube[2] = .15; | |
4428 | xpos = 0.; | |
4429 | ypos = 0.; | |
4430 | zpos = dpcb[2] * 2. + (583./2.+(338-1.5))/10. - 10.5; | |
4431 | // end-ladder electro | |
cfce8870 | 4432 | gMC->Gsvolu("RTB1", "TUBE", idtmed[274], dtube, 3); |
4433 | gMC->Gspos("RTB1", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY"); | |
fe4da5cc | 4434 | |
4435 | dtube[0] = 10.5; | |
4436 | dtube[1] = 12.; | |
4437 | dtube[2] = 26.8/2./10.; | |
4438 | xpos = 0.; | |
4439 | ypos = 0.; | |
4440 | zpos = dpcb[2] * 2. + (583./2.-89.+26.8/2.)/10. - 10.5; | |
4441 | // end-ladder elect | |
cfce8870 | 4442 | gMC->Gsvolu("RTB2", "TUBE", idtmed[274], dtube, 3); |
4443 | gMC->Gspos("RTB2", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY"); | |
fe4da5cc | 4444 | |
4445 | dpgon[0] = 15.; | |
4446 | dpgon[1] = 360.; | |
4447 | dpgon[2] = 12.; | |
4448 | dpgon[3] = 2.; | |
4449 | dpgon[4] = dpcb[2] * 2. + (583./2.-62.2)/10. - 10.5; | |
4450 | // end-ladder electron | |
4451 | dpgon[5] = 12.; | |
4452 | dpgon[6] = 13.5; | |
4453 | dpgon[7] = dpcb[2] * 2. + 583./2./10. - 10.5; | |
4454 | // end-ladder electronics | |
4455 | dpgon[8] = 12.; | |
4456 | dpgon[9] = 13.5; | |
4457 | xpos = 0.; | |
4458 | ypos = 0.; | |
4459 | zpos = 0.; | |
cfce8870 | 4460 | gMC->Gsvolu("RP03", "PGON", idtmed[274], dpgon, 10); |
4461 | gMC->Gspos("RP03", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY"); | |
fe4da5cc | 4462 | |
4463 | dpgon[0] = 7.5; | |
4464 | dpgon[1] = 360.; | |
4465 | dpgon[2] = 24.; | |
4466 | dpgon[3] = 2.; | |
4467 | dpgon[4] = dpcb[2] * 2. + (583./2.+(338.-273.))/10. - 10.5; | |
4468 | // end-ladder e | |
4469 | dpgon[5] = 21.; | |
4470 | dpgon[6] = 23.; | |
4471 | dpgon[7] = dpcb[2] * 2. + (583./2.+(338.-273.+15.))/10. - 10.5; | |
4472 | // end-ladde | |
4473 | dpgon[8] = 21.; | |
4474 | dpgon[9] = 23.; | |
4475 | xpos = 0.; | |
4476 | ypos = 0.; | |
4477 | zpos = 0.; | |
cfce8870 | 4478 | gMC->Gsvolu("RP04", "PGON", idtmed[274], dpgon, 10); |
4479 | gMC->Gspos("RP04", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY"); | |
fe4da5cc | 4480 | |
58005f18 | 4481 | if (fMinorVersionV3 < 3 ) { |
fe4da5cc | 4482 | offset2 = 5.2; |
4483 | dpgon[0] = offset2 + 360./(2.*35.); | |
4484 | dpgon[1] = 360.; | |
4485 | dpgon[2] = 35.; | |
4486 | dpgon[3] = 2.; | |
4487 | dpgon[4] = dpcb[2] * 2. + (583./2.+(338.-106.))/10. - 10.5; | |
4488 | // end-ladde | |
4489 | dpgon[5] = 37.7; | |
4490 | dpgon[6] = 40.; | |
4491 | dpgon[7] = dpcb[2] * 2. + (583./2.+(338.-106.+15.))/10. - 10.5; | |
4492 | // end-la | |
4493 | dpgon[8] = 37.7; | |
4494 | dpgon[9] = 40.; | |
4495 | xpos = 0.; | |
4496 | ypos = 0.; | |
4497 | zpos = 0.; | |
cfce8870 | 4498 | gMC->Gsvolu("RP05", "PGON", idtmed[274], dpgon, 10); |
4499 | gMC->Gspos("RP05", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY"); | |
fe4da5cc | 4500 | |
4501 | dpgon[0] = offset2 + 360./(2.*39.); | |
4502 | dpgon[1] = 360.; | |
4503 | dpgon[2] = 39.; | |
4504 | dpgon[3] = 2.; | |
4505 | dpgon[4] = dpcb[2] * 2. + (583./2.+(338.-56.))/10. - 10.5; | |
4506 | // end-ladder | |
4507 | dpgon[5] = 42.7; | |
4508 | dpgon[6] = 45.; | |
4509 | dpgon[7] = dpcb[2] * 2. + (583./2.+(338.-56.+15.))/10. - 10.5; | |
4510 | // end-la | |
4511 | dpgon[8] = 42.7; | |
4512 | dpgon[9] = 45.; | |
4513 | xpos = 0.; | |
4514 | ypos = 0.; | |
4515 | zpos = 0.; | |
cfce8870 | 4516 | gMC->Gsvolu("RP06", "PGON", idtmed[274], dpgon, 10); |
4517 | gMC->Gspos("RP06", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY"); | |
fe4da5cc | 4518 | } |
58005f18 | 4519 | if (fMinorVersionV3 > 2 && fMinorVersionV3 < 6) { |
fe4da5cc | 4520 | offset2 = 5.2; |
4521 | dpgon[0] = offset2 + 5.625; | |
4522 | dpgon[1] = 360.; | |
4523 | dpgon[2] = 32.; | |
4524 | dpgon[3] = 2.; | |
b3a22d72 | 4525 | dpgon[4] = (583./2.+(338.-106.))/10. - (40.-36.6) / TMath::Tan(45.*kdegrad) + dpcb[2] * 2. - 10.5; |
fe4da5cc | 4526 | // end-ladder electronics |
4527 | dpgon[5] = 34.3; | |
4528 | dpgon[6] = 36.6; | |
b3a22d72 | 4529 | dpgon[7] = (583./2.+(338.-106.+15.))/10. - (40.-36.6) / TMath::Tan(45.*kdegrad) + dpcb[2] * 2. - 10.5; |
fe4da5cc | 4530 | // end-ladder electr |
4531 | dpgon[8] = 34.3; | |
4532 | dpgon[9] = 36.6; | |
4533 | xpos = 0.; | |
4534 | ypos = 0.; | |
4535 | zpos = 0.; | |
cfce8870 | 4536 | gMC->Gsvolu("RP05", "PGON", idtmed[274], dpgon, 10); |
4537 | gMC->Gspos("RP05", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY"); | |
fe4da5cc | 4538 | |
4539 | dpgon[0] = offset2 + 5.; | |
4540 | dpgon[1] = 360.; | |
4541 | dpgon[2] = 36.; | |
4542 | dpgon[3] = 2.; | |
b3a22d72 | 4543 | dpgon[4] = (583./2.+(338.-56.))/10. - (45.-41.2) / TMath::Tan(45.*kdegrad) + dpcb[2] * 2. - 10.5; |
fe4da5cc | 4544 | // end-ladder electronics |
4545 | dpgon[5] = 38.9; | |
4546 | dpgon[6] = 41.2; | |
b3a22d72 | 4547 | dpgon[7] = (583./2.+(338.-56.+15.))/10. - (45.-41.2) / TMath::Tan(45.*kdegrad) + dpcb[2] * 2. - 10.5; |
fe4da5cc | 4548 | // end-ladder electr |
4549 | dpgon[8] = 38.9; | |
4550 | dpgon[9] = 41.2; | |
4551 | xpos = 0.; | |
4552 | ypos = 0.; | |
4553 | zpos = 0.; | |
cfce8870 | 4554 | gMC->Gsvolu("RP06", "PGON", idtmed[274], dpgon, 10); |
4555 | gMC->Gspos("RP06", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY"); | |
fe4da5cc | 4556 | } |
4557 | ||
4558 | // 9345 CONTINUE | |
4559 | ||
4560 | // --- Define the Z<0 end-cap | |
4561 | ||
4562 | // GOTO 9456 ! skip the Z<0 end-cap | |
4563 | ||
4564 | dcone[0] = 16.75; | |
4565 | dcone[1] = (338.-3.)*455./(338.-3.-10.)/10.; | |
b3a22d72 | 4566 | dcone[2] = .02 / TMath::Cos(45.*kdegrad) + (338.-3.)*455./(338.-3.-10.)/10.; |
fe4da5cc | 4567 | dcone[3] = 12.; |
4568 | dcone[4] = 12.02; | |
4569 | xpos = 0.; | |
4570 | ypos = 0.; | |
4571 | zpos = -(583.+(338.-3.))/2./10. - dpcb[2] * 2. + 10.5; | |
4572 | // end-ladder electr | |
cfce8870 | 4573 | gMC->Gsvolu("LCON", "CONE", idtmed[274], dcone, 5); |
fe4da5cc | 4574 | |
cfce8870 | 4575 | gMC->Gspos("LCON", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 4576 | |
b3a22d72 | 4577 | dtube[0] = .02 / TMath::Cos(45.*kdegrad) + (338.-3.)*455./(338.-3.-10.)/10.; |
fe4da5cc | 4578 | dtube[1] = 49.9; |
4579 | // In the Simonetti's drawings 52. In the TP 50. | |
4580 | dtube[2] = .15; | |
4581 | xpos = 0.; | |
4582 | ypos = 0.; | |
4583 | zpos = -(583./2.+(338-1.5))/10. - dpcb[2] * 2. + 10.5; | |
4584 | // end-ladder electr | |
cfce8870 | 4585 | gMC->Gsvolu("LTB1", "TUBE", idtmed[274], dtube, 3); |
fe4da5cc | 4586 | |
cfce8870 | 4587 | gMC->Gspos("LTB1", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 4588 | |
4589 | dtube[0] = 10.5; | |
4590 | dtube[1] = 12.; | |
4591 | dtube[2] = 26.8/2./10.; | |
4592 | xpos = 0.; | |
4593 | ypos = 0.; | |
4594 | zpos = -(583./2.-89.+26.8/2.)/10. - dpcb[2] * 2. + 10.5; | |
4595 | // end-ladder elec | |
cfce8870 | 4596 | gMC->Gsvolu("LTB2", "TUBE", idtmed[274], dtube, 3); |
fe4da5cc | 4597 | ; |
cfce8870 | 4598 | gMC->Gspos("LTB2", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY"); |
fe4da5cc | 4599 | |
4600 | dpgon[0] = 15.; | |
4601 | dpgon[1] = 360.; | |
4602 | dpgon[2] = 12.; | |
4603 | dpgon[3] = 2.; | |
4604 | dpgon[4] = -583./2./10. - dpcb[2] * 2. + 10.5; | |
4605 | // end-ladder electronics | |
4606 | dpgon[5] = 12.; | |
4607 | dpgon[6] = 13.5; | |
4608 | dpgon[7] = -(583./2.-62.2)/10. - dpcb[2] * 2. + 10.5; | |
4609 | // end-ladder electro | |
4610 | dpgon[8] = 12.; | |
4611 | dpgon[9] = 13.5; | |
4612 | xpos = 0.; | |
4613 | ypos = 0.; | |
4614 | zpos = 0.; | |
cfce8870 | 4615 | gMC->Gsvolu("LP03", "PGON", idtmed[274], dpgon, 10); |
4616 | gMC->Gspos("LP03", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY"); | |
fe4da5cc | 4617 | |
4618 | dpgon[0] = 7.5; | |
4619 | dpgon[1] = 360.; | |
4620 | dpgon[2] = 24.; | |
4621 | dpgon[3] = 2.; | |
4622 | dpgon[4] = -(583./2.+(338.-273.+15.))/10. - dpcb[2] * 2. + 10.5; | |
4623 | // end-ladd | |
4624 | dpgon[5] = 21.; | |
4625 | dpgon[6] = 23.; | |
4626 | dpgon[7] = -(583./2.+(338.-273.))/10. - dpcb[2] * 2. + 10.5; | |
4627 | // end-ladder | |
4628 | dpgon[8] = 21.; | |
4629 | dpgon[9] = 23.; | |
4630 | xpos = 0.; | |
4631 | ypos = 0.; | |
4632 | zpos = 0.; | |
cfce8870 | 4633 | gMC->Gsvolu("LP04", "PGON", idtmed[274], dpgon, 10); |
4634 | gMC->Gspos("LP04", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY"); | |
fe4da5cc | 4635 | |
58005f18 | 4636 | if (fMinorVersionV3 < 3) { |
fe4da5cc | 4637 | offset2 = 5.2; |
4638 | dpgon[0] = offset2 + 360./(2.*35.); | |
4639 | dpgon[1] = 360.; | |
4640 | dpgon[2] = 35.; | |
4641 | dpgon[3] = 2.; | |
4642 | dpgon[4] = -(583./2.+(338.-106.))/10. - dpcb[2] * 2. + 10.5; | |
4643 | // end-ladd | |
4644 | dpgon[5] = 37.7; | |
4645 | dpgon[6] = 40.; | |
4646 | dpgon[7] = -(583./2.+(338.-106.+15.))/10. - dpcb[2] * 2. + 10.5; | |
4647 | // end-l | |
4648 | dpgon[8] = 37.7; | |
4649 | dpgon[9] = 40.; | |
4650 | xpos = 0.; | |
4651 | ypos = 0.; | |
4652 | zpos = 0.; | |
cfce8870 | 4653 | gMC->Gsvolu("LP05", "PGON", idtmed[274], dpgon, 10); |
4654 | gMC->Gspos("LP05", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY"); | |
fe4da5cc | 4655 | |
4656 | dpgon[0] = offset2 + 360./(2.*39.); | |
4657 | dpgon[1] = 360.; | |
4658 | dpgon[2] = 39.; | |
4659 | dpgon[3] = 2.; | |
4660 | dpgon[4] = -(583./2.+(338.-56.))/10. - dpcb[2] * 2. + 10.5; | |
4661 | // end-ladde | |
4662 | dpgon[5] = 42.7; | |
4663 | dpgon[6] = 45.; | |
4664 | dpgon[7] = -(583./2.+(338.-56.+15.))/10. - dpcb[2] * 2. + 10.5; | |
4665 | // end-l | |
4666 | dpgon[8] = 42.7; | |
4667 | dpgon[9] = 45.; | |
4668 | xpos = 0.; | |
4669 | ypos = 0.; | |
4670 | zpos = 0.; | |
cfce8870 | 4671 | gMC->Gsvolu("LP06", "PGON", idtmed[274], dpgon, 10); |
4672 | gMC->Gspos("LP06", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY"); | |
fe4da5cc | 4673 | } |
58005f18 | 4674 | if (fMinorVersionV3 > 2 && fMinorVersionV3 < 6) { |
fe4da5cc | 4675 | offset2 = 5.2; |
4676 | dpgon[0] = offset2 + 5.625; | |
4677 | dpgon[1] = 360.; | |
4678 | dpgon[2] = 32.; | |
4679 | dpgon[3] = 2.; | |
b3a22d72 | 4680 | dpgon[4] = (40.-36.6) / TMath::Tan(45.*kdegrad) - (583./2.+(338.-106.))/10. - dpcb[2] * 2. + 10.5; |
fe4da5cc | 4681 | // end-ladder electronics |
4682 | dpgon[5] = 34.3; | |
4683 | dpgon[6] = 36.6; | |
b3a22d72 | 4684 | dpgon[7] = (40.-36.6) / TMath::Tan(45.*kdegrad) - (583./2.+(338.-106.+15.))/10. - dpcb[2] * 2. + 10.5; |
fe4da5cc | 4685 | // end-ladder electr |
4686 | dpgon[8] = 34.3; | |
4687 | dpgon[9] = 36.6; | |
4688 | xpos = 0.; | |
4689 | ypos = 0.; | |
4690 | zpos = 0.; | |
cfce8870 | 4691 | gMC->Gsvolu("LP05", "PGON", idtmed[274], dpgon, 10); |
4692 | gMC->Gspos("LP05", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY"); | |
fe4da5cc | 4693 | |
4694 | dpgon[0] = offset2 + 5.; | |
4695 | dpgon[1] = 360.; | |
4696 | dpgon[2] = 36.; | |
4697 | dpgon[3] = 2.; | |
b3a22d72 | 4698 | dpgon[4] = (45.-41.2) / TMath::Tan(45.*kdegrad) - (583./2.+(338.-56.))/10. - dpcb[2] * 2. + 10.5; |
fe4da5cc | 4699 | // end-ladder electronics |
4700 | dpgon[5] = 38.9; | |
4701 | dpgon[6] = 41.2; | |
b3a22d72 | 4702 | dpgon[7] = (45.-41.2) / TMath::Tan(45.*kdegrad) - (583./2.+(338.-56.+15.))/10. - dpcb[2] * 2. + 10.5; |
fe4da5cc | 4703 | // end-ladder electr |
4704 | dpgon[8] = 38.9; | |
4705 | dpgon[9] = 41.2; | |
4706 | xpos = 0.; | |
4707 | ypos = 0.; | |
4708 | zpos = 0.; | |
cfce8870 | 4709 | gMC->Gsvolu("LP06", "PGON", idtmed[274], dpgon, 10); |
4710 | gMC->Gspos("LP06", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY"); | |
fe4da5cc | 4711 | } |
4712 | ||
4713 | // 9456 CONTINUE | |
4714 | ||
4715 | ||
4716 | // --- Outputs the geometry tree in the EUCLID/CAD format | |
4717 | ||
4718 | if (fEuclidOut) { | |
cfce8870 | 4719 | gMC->WriteEuclid("ITSgeometry", "ITSV", 1, 5); |
fe4da5cc | 4720 | } |
58005f18 | 4721 | fMinorVersion = fMinorVersionV3; |
56d6a1ef | 4722 | } |
fe4da5cc | 4723 | //_____________________________________________________________________________ |
56d6a1ef | 4724 | void AliITSv3::CreateMaterials(){ |
4725 | //////////////////////////////////////////////////////////////////////// | |
c9a71be1 | 4726 | // |
4727 | // Create ITS materials | |
4728 | // This function defines the default materials used in the Geant | |
b3a22d72 | 4729 | // Monte Carlo simulations for the geometries AliITSv1 and AliITSv3. |
4730 | // In general it is automatically replaced by | |
c9a71be1 | 4731 | // the CreatMaterials routine defined in AliITSv?. Should the function |
4732 | // CreateMaterials not exist for the geometry version you are using this | |
4733 | // one is used. See the definition found in AliITSv5 or the other routine | |
4734 | // for a complete definition. | |
4735 | // | |
4736 | // Water H2O | |
4737 | Float_t awat[2] = { 1.00794,15.9994 }; | |
4738 | Float_t zwat[2] = { 1.,8. }; | |
4739 | Float_t wwat[2] = { 2.,1. }; | |
4740 | Float_t denswat = 1.; | |
4741 | // Freon | |
4742 | Float_t afre[2] = { 12.011,18.9984032 }; | |
4743 | Float_t zfre[2] = { 6.,9. }; | |
4744 | Float_t wfre[2] = { 5.,12. }; | |
4745 | Float_t densfre = 1.5; | |
4746 | // Ceramics | |
4747 | // 94.4% Al2O3 , 2.8% SiO2 , 2.3% MnO , 0.5% Cr2O3 | |
4748 | Float_t acer[5] = { 26.981539,15.9994,28.0855,54.93805,51.9961 }; | |
4749 | Float_t zcer[5] = { 13.,8.,14.,25., 24. }; | |
4750 | Float_t wcer[5] = { .49976,1.01233,.01307, .01782,.00342 }; | |
4751 | Float_t denscer = 3.6; | |
4752 | // | |
4753 | // 60% SiO2 , 40% G10FR4 | |
4754 | // PC board | |
4755 | Float_t apcb[3] = { 28.0855,15.9994,17.749 }; | |
4756 | Float_t zpcb[3] = { 14.,8.,8.875 }; | |
4757 | Float_t wpcb[3] = { .28,.32,.4 }; | |
4758 | Float_t denspcb = 1.8; | |
4759 | // POLYETHYL | |
4760 | Float_t apoly[2] = { 12.01,1. }; | |
4761 | Float_t zpoly[2] = { 6.,1. }; | |
4762 | Float_t wpoly[2] = { .33,.67 }; | |
4763 | // SERVICES | |
4764 | Float_t zserv[4] = { 1.,6.,26.,29. }; | |
4765 | Float_t aserv[4] = { 1.,12.,55.8,63.5 }; | |
4766 | Float_t wserv[4] = { .014,.086,.42,.48 }; | |
4767 | ||
b3a22d72 | 4768 | Int_t isxfld = gAlice->Field()->Integ(); |
4769 | Float_t sxmgmx = gAlice->Field()->Max(); | |
c9a71be1 | 4770 | |
4771 | ||
4772 | // --- Define the various materials for GEANT --- | |
4773 | ||
4774 | // 200-224 --> Silicon Pixel Detectors (detectors, chips, buses, cooling,..) | |
4775 | ||
4776 | AliMaterial(0, "SPD Si$", 28.0855, 14., 2.33, 9.36, 999); | |
4777 | AliMaterial(1, "SPD Si chip$", 28.0855, 14., 2.33, 9.36, 999); | |
4778 | AliMaterial(2, "SPD Si bus$", 28.0855, 14., 2.33, 9.36, 999); | |
4779 | AliMaterial(3, "SPD C$", 12.011, 6., 2.265,18.8, 999); | |
4780 | // v. dens | |
4781 | AliMaterial(4, "SPD Air$", 14.61, 7.3, .001205, 30423., 999); | |
4782 | AliMaterial(5, "SPD Vacuum$", 1e-16, 1e-16, 1e-16, 1e16, 1e16); | |
4783 | AliMaterial(6, "SPD Al$", 26.981539, 13., 2.6989, 8.9, 999); | |
4784 | AliMixture( 7, "SPD Water $", awat, zwat, denswat, -2, wwat); | |
4785 | AliMixture( 8, "SPD Freon$", afre, zfre, densfre, -2, wfre); | |
4786 | // ** | |
b3a22d72 | 4787 | AliMedium(0, "SPD Si$", 0, 1,isxfld,sxmgmx, 10., .01, .1, .003, .003); |
4788 | AliMedium(1, "SPD Si chip$", 1, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
4789 | AliMedium(2, "SPD Si bus$", 2, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
4790 | AliMedium(3, "SPD C$", 3, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
4791 | AliMedium(4, "SPD Air$", 4, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
4792 | AliMedium(5, "SPD Vacuum$", 5, 0,isxfld,sxmgmx, 10.,1.00, .1, .100,10.00); | |
4793 | AliMedium(6, "SPD Al$", 6, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
4794 | AliMedium(7, "SPD Water $", 7, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
4795 | AliMedium(8, "SPD Freon$", 8, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
c9a71be1 | 4796 | |
4797 | // 225-249 --> Silicon Drift Detectors (detectors, chips, buses, cooling,..) | |
4798 | ||
4799 | AliMaterial(25, "SDD Si$", 28.0855, 14., 2.33, 9.36, 999); | |
4800 | AliMaterial(26, "SDD Si chip$", 28.0855, 14., 2.33, 9.36, 999); | |
4801 | AliMaterial(27, "SDD Si bus$", 28.0855, 14., 2.33, 9.36, 999); | |
4802 | AliMaterial(28, "SDD C$", 12.011, 6., 2.265,18.8, 999); | |
4803 | // v. dens | |
4804 | AliMaterial(29, "SDD Air$", 14.61, 7.3, .001205, 30423., 999); | |
4805 | AliMaterial(30, "SDD Vacuum$", 1e-16, 1e-16, 1e-16, 1e16, 1e16); | |
4806 | AliMaterial(31, "SDD Al$", 26.981539, 13., 2.6989, 8.9, 999); | |
4807 | // After a call with ratios by number (negative number of elements), | |
4808 | // the ratio array is changed to the ratio by weight, so all successive | |
4809 | // calls with the same array must specify the number of elements as | |
4810 | // positive | |
4811 | AliMixture(32, "SDD Water $", awat, zwat, denswat, 2, wwat); | |
4812 | // After a call with ratios by number (negative number of elements), | |
4813 | // the ratio array is changed to the ratio by weight, so all successive | |
4814 | // calls with the same array must specify the number of elements as | |
4815 | // positive | |
4816 | AliMixture( 33, "SDD Freon$", afre, zfre, densfre, 2, wfre); | |
4817 | AliMixture( 34, "SDD PCB$", apcb, zpcb, denspcb, 3, wpcb); | |
4818 | AliMaterial(35, "SDD Copper$", 63.546, 29., 8.96, 1.43, 999); | |
4819 | AliMixture( 36, "SDD Ceramics$", acer, zcer, denscer, -5, wcer); | |
4820 | AliMaterial(37, "SDD Kapton$", 12.011, 6., 1.3, 31.27, 999); | |
4821 | // ** | |
4822 | // check A and Z | |
b3a22d72 | 4823 | AliMedium(25, "SDD Si$", 25, 1,isxfld,sxmgmx, 10., .01, .1, .003, .003); |
4824 | AliMedium(26, "SDD Si chip$", 26, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
4825 | AliMedium(27, "SDD Si bus$", 27, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
4826 | AliMedium(28, "SDD C$", 28, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
4827 | AliMedium(29, "SDD Air$", 29, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
4828 | AliMedium(30, "SDD Vacuum$", 30, 0,isxfld,sxmgmx, 10.,1.00, .1, .100,10.00); | |
4829 | AliMedium(31, "SDD Al$", 31, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
4830 | AliMedium(32, "SDD Water $", 32, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
4831 | AliMedium(33, "SDD Freon$", 33, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
4832 | AliMedium(34, "SDD PCB$", 34, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
4833 | AliMedium(35, "SDD Copper$", 35, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
4834 | AliMedium(36, "SDD Ceramics$",36, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
4835 | AliMedium(37, "SDD Kapton$", 37, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
c9a71be1 | 4836 | |
4837 | // 250-274 --> Silicon Strip Detectors (detectors, chips, buses, cooling,..) | |
4838 | ||
4839 | AliMaterial(50, "SSD Si$", 28.0855, 14., 2.33, 9.36, 999.); | |
4840 | AliMaterial(51, "SSD Si chip$", 28.0855, 14., 2.33, 9.36, 999.); | |
4841 | AliMaterial(52, "SSD Si bus$", 28.0855, 14., 2.33, 9.36, 999.); | |
4842 | AliMaterial(53, "SSD C$", 12.011, 6., 2.265,18.8, 999.); | |
4843 | // v. dens | |
4844 | AliMaterial(54, "SSD Air$", 14.61, 7.3, .001205, 30423., 999); | |
4845 | AliMaterial(55, "SSD Vacuum$", 1e-16, 1e-16, 1e-16, 1e16, 1e16); | |
4846 | AliMaterial(56, "SSD Al$", 26.981539, 13., 2.6989, 8.9, 999); | |
4847 | // After a call with ratios by number (negative number of elements), | |
4848 | // the ratio array is changed to the ratio by weight, so all successive | |
4849 | // calls with the same array must specify the number of elements as | |
4850 | // positive | |
4851 | AliMixture(57, "SSD Water $", awat, zwat, denswat, 2, wwat); | |
4852 | // After a call with ratios by number (negative number of elements), | |
4853 | // the ratio array is changed to the ratio by weight, so all successive | |
4854 | // calls with the same array must specify the number of elements as | |
4855 | // positive | |
4856 | AliMixture(58, "SSD Freon$", afre, zfre, densfre, 2, wfre); | |
4857 | AliMixture(59, "SSD PCB$", apcb, zpcb, denspcb, 3, wpcb); | |
4858 | AliMaterial(60, "SSD Copper$", 63.546, 29., 8.96, 1.43, 999.); | |
4859 | // After a call with ratios by number (negative number of elements), | |
4860 | // the ratio array is changed to the ratio by weight, so all successive | |
4861 | // calls with the same array must specify the number of elements as | |
4862 | // positive | |
4863 | AliMixture( 61, "SSD Ceramics$", acer, zcer, denscer, 5, wcer); | |
4864 | AliMaterial(62, "SSD Kapton$", 12.011, 6., 1.3, 31.27, 999.); | |
4865 | // check A and Z | |
4866 | AliMaterial(63, "SDD G10FR4$", 17.749, 8.875, 1.8, 21.822, 999.); | |
4867 | // ** | |
b3a22d72 | 4868 | AliMedium(50, "SSD Si$", 50, 1,isxfld,sxmgmx, 10., .01, .1, .003, .003); |
4869 | AliMedium(51, "SSD Si chip$", 51, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
4870 | AliMedium(52, "SSD Si bus$", 52, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
4871 | AliMedium(53, "SSD C$", 53, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
4872 | AliMedium(54, "SSD Air$", 54, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
4873 | AliMedium(55, "SSD Vacuum$", 55, 0,isxfld,sxmgmx, 10.,1.00, .1, .100,10.00); | |
4874 | AliMedium(56, "SSD Al$", 56, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
4875 | AliMedium(57, "SSD Water $", 57, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
4876 | AliMedium(58, "SSD Freon$", 58, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
4877 | AliMedium(59, "SSD PCB$", 59, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
4878 | AliMedium(60, "SSD Copper$", 60, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
4879 | AliMedium(61, "SSD Ceramics$",61, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
4880 | AliMedium(62, "SSD Kapton$", 62, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
4881 | AliMedium(63, "SSD G10FR4$", 63, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
c9a71be1 | 4882 | |
4883 | // 275-299 --> General (end-caps, frames, cooling, cables, etc.) | |
4884 | ||
4885 | AliMaterial(75, "GEN C$", 12.011, 6., 2.265, 18.8, 999.); | |
4886 | // verify density | |
4887 | AliMaterial(76, "GEN Air$", 14.61, 7.3, .001205, 30423., 999); | |
4888 | AliMaterial(77, "GEN Vacuum$", 1e-16, 1e-16, 1e-16, 1e16, 1e16); | |
4889 | AliMixture( 78, "GEN POLYETHYL$", apoly, zpoly, .95, -2, wpoly); | |
4890 | AliMixture( 79, "GEN SERVICES$", aserv, zserv, 4.68, 4, wserv); | |
4891 | AliMaterial(80, "GEN Copper$", 63.546, 29., 8.96, 1.43, 999.); | |
4892 | // After a call with ratios by number (negative number of elements), | |
4893 | // the ratio array is changed to the ratio by weight, so all successive | |
4894 | // calls with the same array must specify the number of elements as | |
4895 | // positive | |
4896 | AliMixture(81, "GEN Water $", awat, zwat, denswat, 2, wwat); | |
4897 | // ** | |
b3a22d72 | 4898 | AliMedium(75,"GEN C$", 75, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); |
4899 | AliMedium(76,"GEN Air$", 76, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
4900 | AliMedium(77,"GEN Vacuum$", 77, 0,isxfld,sxmgmx, 10., .10, .1, .100,10.00); | |
4901 | AliMedium(78,"GEN POLYETHYL$",78, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
4902 | AliMedium(79,"GEN SERVICES$", 79, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
4903 | AliMedium(80,"GEN Copper$", 80, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
4904 | AliMedium(81,"GEN Water $", 81, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003); | |
fe4da5cc | 4905 | } |
fe4da5cc | 4906 | //_____________________________________________________________________________ |
593d2ea1 | 4907 | void AliITSv3::Init(){ |
56d6a1ef | 4908 | //////////////////////////////////////////////////////////////////////// |
4909 | // Initialise the ITS after it has been created. | |
4910 | //////////////////////////////////////////////////////////////////////// | |
593d2ea1 | 4911 | |
593d2ea1 | 4912 | AliITS::Init(); |
4913 | fMajorVersion = 3; | |
4914 | fMinorVersion = fMinorVersionV3; | |
56d6a1ef | 4915 | } |
fe4da5cc | 4916 | //_____________________________________________________________________________ |
56d6a1ef | 4917 | void AliITSv3::StepManager(){ |
4918 | //////////////////////////////////////////////////////////////////////// | |
4919 | // Called for every step in the ITS, then calles the AliITShit class | |
4920 | // creator with the information to be recoreded about that hit. | |
4921 | // The value of the macro ALIITSPRINTGEOM if set to 1 will allow the | |
4922 | // printing of information to a file which can be used to create a .det | |
4923 | // file read in by the routine CreateGeometry(). If set to 0 or any other | |
4924 | // value except 1, the default behavior, then no such file is created nor | |
4925 | // it the extra variables and the like used in the printing allocated. | |
4926 | //////////////////////////////////////////////////////////////////////// | |
fe4da5cc | 4927 | Int_t copy, id; |
58005f18 | 4928 | Float_t hits[8]; |
4929 | Int_t vol[4]; | |
0a6d8768 | 4930 | TLorentzVector position, momentum; |
fe4da5cc | 4931 | TClonesArray &lhits = *fHits; |
56d6a1ef | 4932 | #if ALIITSPRINTGEOM==1 |
4933 | FILE *fp; | |
4934 | Int_t i; | |
4935 | Float_t xl[3],xt[3],angl[6]; | |
4936 | // Float_t par[20],att[20]; | |
4937 | Float_t mat[9]; | |
4938 | static Bool_t first=kTRUE,printit[6][50][50]; | |
4939 | if(first){ for(copy1=0;copy1<6;copy1++)for(copy2=0;copy2<50;copy2++) | |
4940 | for(id=0;id<50;id++) printit[copy1][copy2][id] = kTRUE; | |
4941 | first = kFALSE; | |
4942 | } | |
4943 | // end if first | |
4944 | #endif | |
fe4da5cc | 4945 | // |
58005f18 | 4946 | // Track status |
4947 | vol[3] = 0; | |
4948 | if(gMC->IsTrackInside()) vol[3] += 1; | |
4949 | if(gMC->IsTrackEntering()) vol[3] += 2; | |
4950 | if(gMC->IsTrackExiting()) vol[3] += 4; | |
4951 | if(gMC->IsTrackOut()) vol[3] += 8; | |
4952 | if(gMC->IsTrackDisappeared()) vol[3] += 16; | |
4953 | if(gMC->IsTrackStop()) vol[3] += 32; | |
4954 | if(gMC->IsTrackAlive()) vol[3] += 64; | |
4955 | // | |
4956 | // Fill hit structure. | |
56d6a1ef | 4957 | if(!(gMC->TrackCharge())) return; |
fe4da5cc | 4958 | // |
4959 | // Only entering charged tracks | |
58005f18 | 4960 | if((id=gMC->CurrentVolID(copy))==fIdSens[0]) { |
fe4da5cc | 4961 | vol[0]=1; |
0a6d8768 | 4962 | id=gMC->CurrentVolOffID(1,copy); |
fe4da5cc | 4963 | vol[1]=copy; |
0a6d8768 | 4964 | id=gMC->CurrentVolOffID(2,copy); |
fe4da5cc | 4965 | vol[2]=copy; |
58005f18 | 4966 | } else if(id==fIdSens[1]) { |
fe4da5cc | 4967 | vol[0]=2; |
0a6d8768 | 4968 | id=gMC->CurrentVolOffID(1,copy); |
fe4da5cc | 4969 | vol[1]=copy; |
0a6d8768 | 4970 | id=gMC->CurrentVolOffID(2,copy); |
fe4da5cc | 4971 | vol[2]=copy; |
58005f18 | 4972 | } else if(id==fIdSens[2]) { |
fe4da5cc | 4973 | vol[0]=3; |
4974 | vol[1]=copy; | |
0a6d8768 | 4975 | id=gMC->CurrentVolOffID(1,copy); |
fe4da5cc | 4976 | vol[2]=copy; |
58005f18 | 4977 | } else if(id==fIdSens[3]) { |
fe4da5cc | 4978 | vol[0]=4; |
4979 | vol[1]=copy; | |
0a6d8768 | 4980 | id=gMC->CurrentVolOffID(1,copy); |
fe4da5cc | 4981 | vol[2]=copy; |
58005f18 | 4982 | } else if(id==fIdSens[4]) { |
fe4da5cc | 4983 | vol[0]=5; |
4984 | vol[1]=copy; | |
0a6d8768 | 4985 | id=gMC->CurrentVolOffID(1,copy); |
fe4da5cc | 4986 | vol[2]=copy; |
58005f18 | 4987 | } else if(id==fIdSens[5]) { |
fe4da5cc | 4988 | vol[0]=6; |
4989 | vol[1]=copy; | |
0a6d8768 | 4990 | id=gMC->CurrentVolOffID(1,copy); |
fe4da5cc | 4991 | vol[2]=copy; |
4992 | } else return; | |
cfce8870 | 4993 | gMC->TrackPosition(position); |
4994 | gMC->TrackMomentum(momentum); | |
fe4da5cc | 4995 | hits[0]=position[0]; |
4996 | hits[1]=position[1]; | |
4997 | hits[2]=position[2]; | |
0a6d8768 | 4998 | hits[3]=momentum[0]; |
4999 | hits[4]=momentum[1]; | |
5000 | hits[5]=momentum[2]; | |
cfce8870 | 5001 | hits[6]=gMC->Edep(); |
58005f18 | 5002 | hits[7]=gMC->TrackTime(); |
fe4da5cc | 5003 | new(lhits[fNhits++]) AliITShit(fIshunt,gAlice->CurrentTrack(),vol,hits); |
56d6a1ef | 5004 | #if ALIITSPRINTGEOM==1 |
5005 | if(printit[vol[0]][vol[2]][vol[1]]){ | |
5006 | printit[vol[0]][vol[2]][vol[1]] = kFALSE; | |
5007 | xl[0] = xl[1] = xl[2] = 0.0; | |
5008 | gMC->Gdtom(xl,xt,1); | |
5009 | for(i=0;i<9;i++) mat[i] = 0.0; | |
5010 | mat[0] = mat[4] = mat[8] = 1.0; // default with identity matrix | |
5011 | xl[0] = 1.0; | |
5012 | xl[1] = xl[2] =0.0; | |
5013 | gMC->Gdtom(xl,&(mat[0]),2); | |
5014 | xl[1] = 1.0; | |
5015 | xl[0] = xl[2] =0.0; | |
5016 | gMC->Gdtom(xl,&(mat[3]),2); | |
5017 | xl[2] = 1.0; | |
5018 | xl[1] = xl[0] =0.0; | |
5019 | gMC->Gdtom(xl,&(mat[6]),2); | |
593d2ea1 | 5020 | |
56d6a1ef | 5021 | angl[0] = TMath::ACos(mat[2]); |
5022 | if(mat[2]==1.0) angl[0] = 0.0; | |
5023 | angl[1] = TMath::ATan2(mat[1],mat[0]); | |
5024 | if(angl[1]<0.0) angl[1] += 2.0*TMath::Pi(); | |
5025 | ||
5026 | angl[2] = TMath::ACos(mat[5]); | |
5027 | if(mat[5]==1.0) angl[2] = 0.0; | |
5028 | angl[3] = TMath::ATan2(mat[4],mat[3]); | |
5029 | if(angl[3]<0.0) angl[3] += 2.0*TMath::Pi(); | |
593d2ea1 | 5030 | |
56d6a1ef | 5031 | angl[4] = TMath::ACos(mat[8]); |
5032 | if(mat[8]==1.0) angl[4] = 0.0; | |
5033 | angl[5] = TMath::ATan2(mat[7],mat[6]); | |
5034 | if(angl[5]<0.0) angl[5] += 2.0*TMath::Pi(); | |
5035 | ||
5036 | for(i=0;i<6;i++) angl[i] *= 180.0/TMath::Pi(); // degrees | |
5037 | // i = gMC->CurrentVolID(copy); | |
5038 | // gMC->Gfpara(gMC->CurrentVolName(),copy,1,copy1,copy2,par,att); | |
5039 | fp = fopen("ITSgeometry_v5.det","a"); | |
5040 | fprintf(fp,"%2d %2d %2d %9e %9e %9e %9e %9e %9e %9e %9e %9e ", | |
5041 | vol[0],vol[2],vol[1], // layer ladder detector | |
5042 | xt[0],xt[1],xt[2], // Translation vector | |
5043 | angl[0],angl[1],angl[2],angl[3],angl[4],angl[5] // Geant rotaion | |
5044 | // angles (degrees) | |
5045 | ); | |
5046 | fprintf(fp,"%9e %9e %9e %9e %9e %9e %9e %9e %9e", | |
5047 | mat[0],mat[1],mat[2],mat[3],mat[4],mat[5],mat[6],mat[7],mat[8] | |
5048 | ); // Adding the rotation matrix. | |
5049 | fprintf(fp,"\n"); | |
5050 | fclose(fp); | |
5051 | } // end if printit[layer][ladder][detector] | |
5052 | #endif | |
5053 | } | |
5054 | //____________________________________________________________________________ | |
5055 | void AliITSv3::Streamer(TBuffer &R__b){ | |
5056 | //////////////////////////////////////////////////////////////////////// | |
5057 | // A dummy Streamer function for this class AliITSv3. By default it | |
5058 | // only streams the AliITS class as it is required. Since this class | |
5059 | // dosen't contain any "real" data to be saved, it doesn't. | |
5060 | //////////////////////////////////////////////////////////////////////// | |
b3a22d72 | 5061 | |
593d2ea1 | 5062 | if (R__b.IsReading()) { |
56d6a1ef | 5063 | Version_t R__v = R__b.ReadVersion(); |
5064 | if (R__v==1) { | |
5065 | AliITS::Streamer(R__b); | |
56d6a1ef | 5066 | }else{ |
e8189707 | 5067 | AliITS::Streamer(R__b); |
56d6a1ef | 5068 | } // end if |
593d2ea1 | 5069 | } else { |
5070 | R__b.WriteVersion(AliITSv3::IsA()); | |
5071 | AliITS::Streamer(R__b); | |
56d6a1ef | 5072 | } // end if R__b.IsReading() |
593d2ea1 | 5073 | } |
e8189707 | 5074 | |
5075 |