1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 Revision 1.11.4.3 2000/04/04 14:18:03 nilsen
19 Fixed volume error with vomule SFR5. Loop positioning this volume is now from
20 <=23 (was <=24). This may not be the final version.
22 Revision 1.11.4.2 2000/03/04 23:46:02 nilsen
23 Fixed up the comments/documentation.
25 Revision 1.11.4.1 2000/01/12 19:03:33 nilsen
26 This is the version of the files after the merging done in December 1999.
27 See the ReadMe110100.txt file for details
29 Revision 1.11 1999/10/22 08:25:25 fca
30 remove double definition of destructors
32 Revision 1.10 1999/10/22 08:16:49 fca
33 Correct destructors, thanks to I.Hrivnacova
35 Revision 1.9 1999/10/06 19:56:50 fca
38 Revision 1.8 1999/10/05 08:05:09 fca
39 Minor corrections for uninitialised variables.
41 Revision 1.7 1999/09/29 09:24:20 fca
42 Introduction of the Copyright and cvs Log
46 ///////////////////////////////////////////////////////////////////////////////
48 // Inner Traking System version 3
49 // This class contains the base procedures for the Inner Tracking System
51 // Authors: R. Barbera, A. Morsch.
55 // NOTE: THIS IS THE OLD detailed TP-like geometry of the ITS. THIS WILL NOT
56 // WORK with the geometry or module classes or any analysis classes. You are
57 // strongly encouraged to uses AliITSv5.
59 ///////////////////////////////////////////////////////////////////////////////
61 // See AliITSv3::StepManager().
62 #define ALIITSPRINTGEOM 0 // default. don't print out gemetry information
63 //#define ALIITSPRINTGEOM 1 // print out geometry information
68 #include "AliITShit.h"
77 //_____________________________________________________________________________
78 AliITSv3::AliITSv3() {
79 ////////////////////////////////////////////////////////////////////////
80 // Standard default constructor for the ITS version 3.
81 ////////////////////////////////////////////////////////////////////////
83 fId3Name = new char*[fId3N];
92 //_____________________________________________________________________________
93 AliITSv3::~AliITSv3() {
94 ////////////////////////////////////////////////////////////////////////
95 // Standard destructor for the ITS version 3.
96 ////////////////////////////////////////////////////////////////////////
100 //_____________________________________________________________________________
101 AliITSv3::AliITSv3(const char *name, const char *title) : AliITS(name, title){
102 ////////////////////////////////////////////////////////////////////////
103 // Standard constructor for the ITS version 3.
104 ////////////////////////////////////////////////////////////////////////
106 fId3Name = new char*[fId3N];
107 fId3Name[0] = "ITS1";
108 fId3Name[1] = "ITS2";
109 fId3Name[2] = "ITS3";
110 fId3Name[3] = "ITS4";
111 fId3Name[4] = "ITS5";
112 fId3Name[5] = "ITS6";
116 //_____________________________________________________________________________
117 void AliITSv3::CreateGeometry(){
118 ////////////////////////////////////////////////////////////////////////
119 // This routine creates and defines the version 3 geometry of the ITS.
120 ////////////////////////////////////////////////////////////////////////
122 const Float_t xx[14] = { 0.000, 0.000,-14.002, -6.288,-25.212,-16.292,
123 -35.713,-26.401,-45.340,-36.772,-18.740,-12.814,
125 const Float_t yy[14] = { 0.000, 27.056, 31.408, 25.019, 27.768, 22.664,
126 22.420, 18.727, 15.479, 13.680, -9.984, -6.175,
128 const Float_t xbeg[13] = { 0.000, -0.352,-12.055, -8.755,-23.035,-19.085,
129 -33.362,-28.859,-42.774,-36.644,-18.352,-13.085,
131 const Float_t ybeg[13] = { 0.386, 27.165, 29.795, 25.377, 26.480, 22.632,
132 21.487, 18.305, 14.940, 13.509, -9.735, -5.755,
134 const Float_t xend[13] = { 0.000,-11.588, -8.208,-22.709,-18.738,-33.184,
135 -28.719,-42.756,-37.027,-19.002,-13.235,-13.837,
137 const Float_t yend[13] = { 26.688, 30.658, 26.609, 27.405, 23.935, 22.452,
138 19.646, 15.922, 13.733, -9.639, -6.446, -4.585,
140 const Float_t xarc[13] = { -0.500,-13.248,-13.505,-18.622,-37.171,-42.671,
141 -28.977,-33.178,-19.094,-22.781, -8.655,-11.736,
143 const Float_t yarc[13] = { 0.500, -4.093, -5.911, -9.200, 13.162, 15.543,
144 19.109, 22.066, 23.446, 27.024, 26.184, 30.294,
146 const Float_t rarc[13] = { 0.5,0.7,0.5,0.5,0.7,0.5,0.7,
147 0.5,0.7,0.5,0.7,0.5,0.5 };
148 const Float_t rr = 4.064516;
149 const Float_t tteta = 63.00;
150 const Float_t pphi = -35.00;
151 const Float_t gteta = 87.78;
152 const Double_t degrad = kPI/180.;
153 const Double_t raddeg = 180./kPI;
154 const Double_t twopi = 2*kPI;
157 Float_t dcei[3], dela[3], dchi[3], dpcb[3], darc[5],
158 dfra[10], dcer[3], dkap[3], dpla[3],
159 xccc, yccc, aphi, dcop[3], dtra[3], dsil[3],
160 atheta1011, dbus[3], dtub[3], dwat[3],
161 depx[3], dits[3], atheta1314, atheta1213, atheta1112,
162 dsup[3], xtra[8], ytra[8], ztra[8], dsrv[3];
163 Double_t biga1, bigb1;
164 Float_t runo, xpos, ypos, zpos, rtwo, aphi1, aphi2,
165 dtra1[3], dtra2[3], dtra3[3],
166 dtra4[3], dbox1[3], dbox2[3];
168 Float_t xtra1[6], ytra1[6], ztra1[6];
170 Float_t xpos1, ypos1;
172 Float_t angle, dcone[5], dtube[3], dpgon[10];
173 Float_t rzero, xzero, yzero;
174 Double_t coeffa, coeffb, coeffc;
176 Float_t atheta, offset;
177 Float_t offset1, offset2, dgh[15];
178 Float_t xcc, ycc, sep, atheta12, atheta23, atheta34, atheta45, atheta56,
179 atheta67, atheta78, atheta89, xxm, dal1[3], dal2[3];
182 Double_t xcc1, ycc1, xcc2, ycc2;
184 const char natra[][5] ={ "TR01","TR02","TR03","TR04",
185 "TR05","TR06","TR07","TR08"};
186 const char natra1[][5] ={"TR11","TR12","TR13","TR14",
187 "TR15","TR16","TR17","TR18",
188 "TR19","TR20","TR21","TR22",
189 "TR23","TR24","TR25","TR26"};
190 const char natra2[][5] ={"TR31","TR32","TR33","TR34","TR35","TR36"};
191 const char natra3[][5] ={"TR41","TR42","TR43","TR44","TR45","TR46"};
192 const char natra4[][5] ={"TR51","TR52","TR53","TR54","TR55","TR56",
193 "TR57","TR58","TR59","TR60","TR61","TR62",
194 "TR63","TR64","TR65","TR66"};
196 Int_t *idtmed = fIdtmed->GetArray()-199;
198 // --- Define a ghost volume containing the whole ITS and fill it with air
216 gMC->Gsvolu("ITSV", "PCON", idtmed[275], dgh, 15);
218 // --- Place the ghost volume in its mother volume (ALIC) and make it
221 gMC->Gspos("ITSV", 1, "ALIC", 0., 0., 0., 0, "ONLY");
222 gMC->Gsatt("ITSV", "SEEN", 0);
224 //************************************************************************
229 //************************************************************************
231 // GOTO 2345 ! skip ITS layer no. 1 and 2
233 // --- Define a ghost volume containing the Silicon Pixel Detectors
234 // (layer #1 and #2) and fill it with air or vacuum
236 xxm = (49.999-3)/(70-25);
240 dgh[3] = -25.-(9.-3.01)/xxm;
249 dgh[12] = 25+(9-3.01)/xxm;
252 gMC->Gsvolu("IT12", "PCON", idtmed[275], dgh, 15);
254 // --- Place the ghost volume in its mother volume (ITSV) and make it
257 gMC->Gspos("IT12", 1, "ITSV", 0., 0., 0., 0, "ONLY");
258 gMC->Gsatt("IT12", "SEEN", 0);
260 // --- Define a ghost volume containing a single element of layer #1
261 // and fill it with air or vacuum
263 dbox1[0] = 0.005+0.01+0.0075;
266 gMC->Gsvolu("IPV1", "BOX ", idtmed[203], dbox1, 3);
268 //--Divide each element of layer #1 in three ladders along the beam direction
270 gMC->Gsdvn("IPB1", "IPV1", 3, 3);
272 // --- Make the ghost volumes invisible
274 gMC->Gsatt("IPV1", "SEEN", 0);
275 gMC->Gsatt("IPB1", "SEEN", 0);
277 // --- Define a volume containing the chip of pixels (silicon, layer #1)
281 dchi[2] = dbox1[2] / 3.;
282 gMC->Gsvolu("ICH1", "BOX ", idtmed[200], dchi, 3);
284 // --- Define a volume containing the bus of pixels (silicon, layer #1)
289 gMC->Gsvolu("IBU1", "BOX ", idtmed[201], dbus, 3);
291 // --- Define a volume containing the sensitive part of pixels
292 // (silicon, layer #1)
297 gMC->Gsvolu("ITS1", "BOX ", idtmed[199], dits, 3);
299 // --- Place the chip into its mother (IPB1)
301 xpos = dbox1[0] - dchi[0];
304 gMC->Gspos("ICH1", 1, "IPB1", xpos, ypos, zpos, 0, "ONLY");
306 // --- Place the sensitive volume into its mother (IPB1)
308 xpos = dbox1[0] - dchi[0] * 2. - dits[0];
309 ypos = dchi[1] - dits[1];
310 zpos = -(dchi[2] - dits[2]);
311 gMC->Gspos("ITS1", 1, "IPB1", xpos, ypos, zpos, 0, "ONLY");
313 // --- Place the bus into its mother (IPB1)
315 xpos = dbox1[0] - dchi[0] * 2. - dits[0] * 2. - dbus[0];
316 ypos = dchi[1] - dbus[1];
317 zpos = -(dchi[2] - dbus[2]);
318 gMC->Gspos("IBU1", 1, "IPB1", xpos, ypos, zpos, 0, "ONLY");
320 // --- Define a ghost volume containing a single element of layer #2
321 // and fill it with air or vacuum
323 dbox2[0] = 0.005+0.01+0.0075;
326 gMC->Gsvolu("IPV2", "BOX ", idtmed[203], dbox2, 3);
328 //--Divide each element of layer #2 in four ladders along the beam direction
330 gMC->Gsdvn("IPB2", "IPV2", 4, 3);
332 // --- Make the ghost volumes invisible
334 gMC->Gsatt("IPV2", "SEEN", 0);
335 gMC->Gsatt("IPB2", "SEEN", 0);
337 // --- Define a volume containing the chip of pixels (silicon, layer #2)
341 dchi[2] = dbox2[2] / 4.;
342 gMC->Gsvolu("ICH2", "BOX ", idtmed[200], dchi, 3);
344 // --- Define a volume containing the bus of pixels (silicon, layer #2)
349 gMC->Gsvolu("IBU2", "BOX ", idtmed[201], dbus, 3);
351 // --- Define a volume containing the sensitive part of pixels
352 // (silicon, layer #2)
357 gMC->Gsvolu("ITS2", "BOX ", idtmed[199], dits, 3);
359 // --- Place the chip into its mother (IPB2)
361 xpos = dbox1[0] - dbus[0] * 2. - dits[0] * 2. - dchi[0];
364 gMC->Gspos("ICH2", 1, "IPB2", xpos, ypos, zpos, 0, "ONLY");
366 // --- Place the sensitive volume into its mother (IPB2)
368 xpos = dbox1[0] - dbus[0] * 2. - dits[0];
369 ypos = -(dchi[1] - dits[1]);
370 zpos = -(dchi[2] - dits[2]);
371 gMC->Gspos("ITS2", 1, "IPB2", xpos, ypos, zpos, 0, "ONLY");
373 // --- Place the bus into its mother (IPB2)
375 xpos = dbox1[0] - dbus[0];
376 ypos = -(dchi[1] - dbus[1]);
377 zpos = -(dchi[2] - dbus[2]);
378 gMC->Gspos("IBU2", 1, "IPB2", xpos, ypos, zpos, 0, "ONLY");
380 // --- Define a generic segment of an element of the mechanical support
385 gMC->Gsvolu("SPIX", "BOX ", idtmed[202], dsup, 0);
387 // --- Define a generic arc of an element of the mechanical support
392 gMC->Gsvolu("SARC", "TUBS", idtmed[202], darc, 0);
394 // --- Define the mechanical supports of layers #1 and #2 and place the
395 // elements of the layers in it
398 // counter over the number of elements of layer #1 (
401 // counter over the number of elements of layer #2 (
402 for (i = 1; i <= 10; ++i) {
404 // --- Place part # 1-2 (see sketch)
406 // number of carbon fiber supports (see sketch)
409 dsup[1] = TMath::Sqrt((xend[0] - xbeg[0]) * (xend[0] - xbeg[0]) +
410 (yend[0] - ybeg[0]) * (yend[0] - ybeg[0]) ) / 20.;
412 xcc = ( xx[0] + xx[1]) / 20.;
413 ycc = ( yy[0] + yy[1]) / 20.;
414 xccc = (xbeg[0] + xend[0]) / 20.;
415 yccc = (ybeg[0] + yend[0]) / 20.;
416 if (xx[0] == xx[1]) {
421 offset2 = TMath::ATan2(r1, r2) * raddeg - 90.;
422 } // end if xx[0] == xx[1]
423 aphi = (pphi + (i-1) * 36.) * degrad;
424 xzero = rr * TMath::Cos((tteta + (i-1) * 36.) * degrad);
425 yzero = rr * TMath::Sin((tteta + (i-1) * 36.) * degrad);
426 xpos1 = xccc * TMath::Cos(aphi) - yccc * TMath::Sin(aphi) + xzero;
427 ypos1 = xccc * TMath::Sin(aphi) + yccc * TMath::Cos(aphi) + yzero;
428 xpos = xpos1 * TMath::Cos(gteta * degrad) +
429 ypos1 * TMath::Sin(gteta *degrad);
430 ypos = -xpos1 * TMath::Sin(gteta * degrad) +
431 ypos1 * TMath::Cos(gteta * degrad);
433 atheta12 = (i-1) * 36. + offset1 + offset2 - gteta;
434 AliMatrix(idrotm[(i-1) * 13 + 1100], 90., atheta12, 90.,
435 atheta12 + 90., 0., 0.);
436 gMC->Gsposp("SPIX", (i-1) * 13 + 1, "IT12", xpos, ypos, zpos,
437 idrotm[(i-1) * 13 + 1100], "ONLY", dsup, 3);
439 // --- Place part # 2-3 (see sketch)
443 dsup[1] = TMath::Sqrt((xend[1] - xbeg[1]) * (xend[1] - xbeg[1]) +
444 (yend[1] - ybeg[1]) * (yend[1] - ybeg[1])) / 20.;
446 xcc = ( xx[1] + xx[2]) / 20.;
447 ycc = ( yy[1] + yy[2]) / 20.;
448 xccc = (xbeg[1] + xend[1]) / 20.;
449 yccc = (ybeg[1] + yend[1]) / 20.;
450 if (xx[1] == xx[2]) {
455 offset2 = TMath::ATan2(r1, r2) * raddeg - 90.;
456 } // end if xx[1] == xx[2]
457 aphi = (pphi + (i-1) * 36.) * degrad;
458 xzero = rr * TMath::Cos((tteta + (i-1) * 36.) * degrad);
459 yzero = rr * TMath::Sin((tteta + (i-1) * 36.) * degrad);
460 xpos1 = xccc * TMath::Cos(aphi) - yccc * TMath::Sin(aphi) + xzero;
461 ypos1 = xccc * TMath::Sin(aphi) + yccc * TMath::Cos(aphi) + yzero;
462 xpos = xpos1 * TMath::Cos(gteta * degrad) +
463 ypos1 * TMath::Sin(gteta * degrad);
464 ypos = -xpos1 * TMath::Sin(gteta * degrad) +
465 ypos1 * TMath::Cos(gteta * degrad);
467 atheta23 = (i-1) * 36. + offset1 + offset2 - gteta;
468 AliMatrix(idrotm[(i-1) * 13 + 1101], 90., atheta23, 90.,
469 atheta23 + 90., 0., 0.);
470 gMC->Gsposp("SPIX", (i-1) * 13 + 2, "IT12", xpos, ypos, zpos,
471 idrotm[(i-1) * 13 + 1101], "ONLY", dsup, 3);
473 // --- Place an element of layer #2
475 biga = (yy[2] - yy[1]) / (xx[2] - xx[1]);
476 bigb = (xx[2] * yy[1] - xx[1] * yy[2]) / (xx[2] - xx[1]) / 10.;
477 coeffa = biga * biga + 1.;
478 coeffb = biga * bigb - biga * ycc - xcc;
479 coeffc = xcc * xcc + ycc * ycc - ycc * 2. * bigb +
480 bigb * bigb - 0.08964*0.08964;
481 xcc1 = (-coeffb + TMath::Sqrt(coeffb * coeffb - coeffa * coeffc)) /
483 ycc1 = biga * xcc1 + bigb;
485 bigb1 = xcc1 / biga + ycc1;
486 coeffa = biga1 * biga1 + 1.;
487 coeffb = biga1 * bigb1 - biga1 * ycc1 - xcc1;
488 coeffc = xcc1 * xcc1 + ycc1 * ycc1 - ycc1 * 2. * bigb1 +
489 bigb1 * bigb1 - (dsup[0] + dbox2[0]) * (dsup[0] + dbox2[0]);
490 xcc2 = (-coeffb + TMath::Sqrt(coeffb * coeffb - coeffa * coeffc)) /
492 ycc2 = biga1 * xcc2 + bigb1;
493 xpos1 = xcc2 * TMath::Cos(aphi) - ycc2 * TMath::Sin(aphi) + xzero;
494 ypos1 = xcc2 * TMath::Sin(aphi) + ycc2 * TMath::Cos(aphi) + yzero;
495 xpos = xpos1 * TMath::Cos(gteta * degrad) +
496 ypos1 * TMath::Sin(gteta *degrad);
497 ypos = -xpos1 * TMath::Sin(gteta * degrad) +
498 ypos1 * TMath::Cos(gteta * degrad);
501 gMC->Gspos("IPV2", jbox2, "IT12", xpos, ypos, zpos,
502 idrotm[(i-1) * 13 + 1101], "ONLY");
504 // --- Place part # 3-4 (see sketch)
508 dsup[1] = TMath::Sqrt((xend[2] - xbeg[2]) * (xend[2] - xbeg[2]) +
509 (yend[2] - ybeg[2]) * (yend[2] - ybeg[2])) / 20.;
511 xcc = (xx[1] + xx[2]) / 20.;
512 ycc = (yy[1] + yy[2]) / 20.;
513 xccc = (xbeg[2] + xend[2]) / 20.;
514 yccc = (ybeg[2] + yend[2]) / 20.;
515 if (xx[2] == xx[3]) {
520 offset2 = TMath::ATan2(r1, r2) * raddeg - 90.;
521 } // end if xx[2] == xx[3]
522 aphi = (pphi + (i-1) * 36.) * degrad;
523 xzero = rr * TMath::Cos((tteta + (i-1) * 36.) * degrad);
524 yzero = rr * TMath::Sin((tteta + (i-1) * 36.) * degrad);
525 xpos1 = xccc * TMath::Cos(aphi) - yccc * TMath::Sin(aphi) + xzero;
526 ypos1 = xccc * TMath::Sin(aphi) + yccc * TMath::Cos(aphi) + yzero;
527 xpos = xpos1 * TMath::Cos(gteta * degrad) +
528 ypos1 * TMath::Sin(gteta *degrad);
529 ypos = -xpos1 * TMath::Sin(gteta * degrad) +
530 ypos1 * TMath::Cos(gteta * degrad);
532 atheta34 = (i-1) * 36. + offset1 + offset2 - gteta;
533 AliMatrix(idrotm[(i-1) * 13 + 1102], 90., atheta34, 90.,
534 atheta34 + 90., 0., 0.);
535 gMC->Gsposp("SPIX", (i-1) * 13 + 3, "IT12", xpos, ypos, zpos,
536 idrotm[(i-1) * 13 + 1102], "ONLY", dsup, 3);
538 // --- Place part # 4-5 (see sketch)
542 dsup[1] = TMath::Sqrt((xend[3] - xbeg[3]) * (xend[3] - xbeg[3]) +
543 (yend[3] - ybeg[3]) * (yend[3] - ybeg[3])) / 20.;
545 xcc = ( xx[3] + xx[4]) / 20.;
546 ycc = ( yy[3] + yy[4]) / 20.;
547 xccc = (xbeg[3] + xend[3]) / 20.;
548 yccc = (ybeg[3] + yend[3]) / 20.;
549 if (xx[3] == xx[4]) {
554 offset2 = TMath::ATan2(r1, r2) * raddeg - 90.;
555 } // end if xx[3] == xx[4]
556 aphi = (pphi + (i-1) * 36.) * degrad;
557 xzero = rr * TMath::Cos((tteta + (i-1) * 36.) * degrad);
558 yzero = rr * TMath::Sin((tteta + (i-1) * 36.) * degrad);
559 xpos1 = xccc * TMath::Cos(aphi) - yccc * TMath::Sin(aphi) + xzero;
560 ypos1 = xccc * TMath::Sin(aphi) + yccc * TMath::Cos(aphi) + yzero;
561 xpos = xpos1 * TMath::Cos(gteta * degrad) +
562 ypos1 * TMath::Sin(gteta *degrad);
563 ypos = -xpos1 * TMath::Sin(gteta * degrad) +
564 ypos1 * TMath::Cos(gteta * degrad);
566 atheta45 = (i-1) * 36. + offset1 + offset2 - gteta;
567 AliMatrix(idrotm[(i-1) * 13 + 1103], 90., atheta45, 90.,
568 atheta45 + 90., 0., 0.);
569 gMC->Gsposp("SPIX", (i-1) * 13 + 4, "IT12", xpos, ypos, zpos,
570 idrotm[(i-1) * 13 + 1103], "ONLY", dsup, 3);
572 // --- Place an element of layer #2
574 biga = (yy[4] - yy[3]) / (xx[4] - xx[3]);
575 bigb = (xx[4] * yy[3] - xx[3] * yy[4]) / (xx[4] - xx[3]) / 10.;
576 coeffa = biga * biga + 1.;
577 coeffb = biga * bigb - biga * ycc - xcc;
578 coeffc = xcc * xcc + ycc * ycc - ycc * 2. * bigb +
579 bigb * bigb - .014285030400000001;
580 xcc1 = (-coeffb - TMath::Sqrt(coeffb * coeffb - coeffa * coeffc)) /
582 ycc1 = biga * xcc1 + bigb;
584 bigb1 = xcc1 / biga + ycc1;
585 coeffa = biga1 * biga1 + 1.;
586 coeffb = biga1 * bigb1 - biga1 * ycc1 - xcc1;
587 coeffc = xcc1 * xcc1 + ycc1 * ycc1 - ycc1 * 2. * bigb1 +
588 bigb1 * bigb1 - (dsup[0] + dbox2[0]) * (dsup[0] + dbox2[0]);
589 xcc2 = (-coeffb + TMath::Sqrt(coeffb * coeffb - coeffa * coeffc)) /
591 ycc2 = biga1 * xcc2 + bigb1;
592 xpos1 = xcc2 * TMath::Cos(aphi) - ycc2 * TMath::Sin(aphi) + xzero;
593 ypos1 = xcc2 * TMath::Sin(aphi) + ycc2 * TMath::Cos(aphi) + yzero;
594 xpos = xpos1 * TMath::Cos(gteta * degrad) +
595 ypos1 * TMath::Sin(gteta *degrad);
596 ypos = -xpos1 * TMath::Sin(gteta * degrad) +
597 ypos1 * TMath::Cos(gteta * degrad);
600 gMC->Gspos("IPV2", jbox2, "IT12", xpos, ypos, zpos,
601 idrotm[(i-1) * 13 + 1103], "ONLY");
603 // --- Place part # 5-6 (see sketch)
607 dsup[1] = TMath::Sqrt((xend[4] - xbeg[4]) * (xend[4] - xbeg[4]) +
608 (yend[4] - ybeg[4]) * (yend[4] - ybeg[4])) / 20.;
610 xcc = (xx[4] + xx[5]) / 20.;
611 ycc = (yy[4] + yy[5]) / 20.;
612 xccc = (xbeg[4] + xend[4]) / 20.;
613 yccc = (ybeg[4] + yend[4]) / 20.;
614 if (xx[4] == xx[5]) {
619 offset2 = TMath::ATan2(r1, r2) * raddeg - 90.;
621 aphi = (pphi + (i-1) * 36.) * degrad;
622 xzero = rr * TMath::Cos((tteta + (i-1) * 36.) * degrad);
623 yzero = rr * TMath::Sin((tteta + (i-1) * 36.) * degrad);
624 xpos1 = xccc * TMath::Cos(aphi) - yccc * TMath::Sin(aphi) + xzero;
625 ypos1 = xccc * TMath::Sin(aphi) + yccc * TMath::Cos(aphi) + yzero;
626 xpos = xpos1 * TMath::Cos(gteta * degrad) +
627 ypos1 * TMath::Sin(gteta *degrad);
628 ypos = -xpos1 * TMath::Sin(gteta * degrad) +
629 ypos1 * TMath::Cos(gteta * degrad);
631 atheta56 = (i-1) * 36. + offset1 + offset2 - gteta;
632 AliMatrix(idrotm[(i-1) * 13 + 1104], 90., atheta56, 90.,
633 atheta56 + 90., 0., 0.);
634 gMC->Gsposp("SPIX", (i-1) * 13 + 5, "IT12", xpos, ypos, zpos,
635 idrotm[(i-1) * 13 + 1104], "ONLY", dsup, 3);
637 // --- Place part # 6-7 (see sketch)
641 dsup[1] = TMath::Sqrt((xend[5] - xbeg[5]) * (xend[5] - xbeg[5]) +
642 (yend[5] - ybeg[5]) * (yend[5] - ybeg[5])) / 20.;
644 xcc = (xx[5] + xx[6]) / 20.;
645 ycc = (yy[5] + yy[6]) / 20.;
646 xccc = (xbeg[5] + xend[5]) / 20.;
647 yccc = (ybeg[5] + yend[5]) / 20.;
648 if (xx[5] == xx[6]) {
653 offset2 = TMath::ATan2(r1, r2) * raddeg - 90.;
654 } // end if xx[5] == xx[6]
655 aphi = (pphi + (i-1) * 36.) * degrad;
656 xzero = rr * TMath::Cos((tteta + (i-1) * 36.) * degrad);
657 yzero = rr * TMath::Sin((tteta + (i-1) * 36.) * degrad);
658 xpos1 = xccc * TMath::Cos(aphi) - yccc * TMath::Sin(aphi) + xzero;
659 ypos1 = xccc * TMath::Sin(aphi) + yccc * TMath::Cos(aphi) + yzero;
660 xpos = xpos1 * TMath::Cos(gteta * degrad) +
661 ypos1 * TMath::Sin(gteta *degrad);
662 ypos = -xpos1 * TMath::Sin(gteta * degrad) +
663 ypos1 * TMath::Cos(gteta * degrad);
665 atheta67 = (i-1) * 36. + offset1 + offset2 - gteta;
666 AliMatrix(idrotm[(i-1) * 13 + 1105], 90., atheta67, 90.,
667 atheta67 + 90., 0., 0.);
668 gMC->Gsposp("SPIX", (i-1) * 13 + 6, "IT12", xpos, ypos, zpos,
669 idrotm[(i-1) * 13 + 1105], "ONLY", dsup, 3);
671 // --- Place an element of layer #2
673 biga = (yy[6] - yy[5]) / (xx[6] - xx[5]);
674 bigb = (xx[6] * yy[5] - xx[5] * yy[6]) / (xx[6] - xx[5]) / 10.;
675 coeffa = biga * biga + 1.;
676 coeffb = biga * bigb - biga * ycc - xcc;
677 coeffc = xcc * xcc + ycc * ycc - ycc * 2. * bigb +
678 bigb * bigb - .014285030400000001;
679 xcc1 = (-coeffb - TMath::Sqrt(coeffb * coeffb - coeffa * coeffc)) /
681 ycc1 = biga * xcc1 + bigb;
683 bigb1 = xcc1 / biga + ycc1;
684 coeffa = biga1 * biga1 + 1.;
685 coeffb = biga1 * bigb1 - biga1 * ycc1 - xcc1;
686 coeffc = xcc1 * xcc1 + ycc1 * ycc1 - ycc1 * 2. * bigb1 +
687 bigb1 * bigb1 - (dsup[0] + dbox2[0]) * (dsup[0] + dbox2[0]);
688 xcc2 = (-coeffb - TMath::Sqrt(coeffb * coeffb - coeffa * coeffc)) /
690 ycc2 = biga1 * xcc2 + bigb1;
691 xpos1 = xcc2 * TMath::Cos(aphi) - ycc2 * TMath::Sin(aphi) + xzero;
692 ypos1 = xcc2 * TMath::Sin(aphi) + ycc2 * TMath::Cos(aphi) + yzero;
693 xpos = xpos1 * TMath::Cos(gteta * degrad) +
694 ypos1 * TMath::Sin(gteta *degrad);
695 ypos = -xpos1 * TMath::Sin(gteta * degrad) +
696 ypos1 * TMath::Cos(gteta * degrad);
699 gMC->Gspos("IPV2", jbox2, "IT12", xpos, ypos, zpos,
700 idrotm[(i-1) * 13 + 1105], "ONLY");
702 // --- Place part # 7-8 (see sketch)
706 dsup[1] = TMath::Sqrt((xend[6] - xbeg[6]) * (xend[6] - xbeg[6]) +
707 (yend[6] - ybeg[6]) * (yend[6] - ybeg[6])) / 20.;
709 xcc = (xx[6] + xx[7]) / 20.;
710 ycc = (yy[6] + yy[7]) / 20.;
711 xccc = (xbeg[6] + xend[6]) / 20.;
712 yccc = (ybeg[6] + yend[6]) / 20.;
713 if (xx[6] == xx[7]) {
718 offset2 = TMath::ATan2(r1, r2) * raddeg - 90.;
720 aphi = (pphi + (i-1) * 36.) * degrad;
721 xzero = rr * TMath::Cos((tteta + (i-1) * 36.) * degrad);
722 yzero = rr * TMath::Sin((tteta + (i-1) * 36.) * degrad);
723 xpos1 = xccc * TMath::Cos(aphi) - yccc * TMath::Sin(aphi) + xzero;
724 ypos1 = xccc * TMath::Sin(aphi) + yccc * TMath::Cos(aphi) + yzero;
725 xpos = xpos1 * TMath::Cos(gteta * degrad) +
726 ypos1 * TMath::Sin(gteta *degrad);
727 ypos = -xpos1 * TMath::Sin(gteta * degrad) +
728 ypos1 * TMath::Cos(gteta * degrad);
730 atheta78 = (i-1) * 36. + offset1 + offset2 - gteta;
731 AliMatrix(idrotm[(i-1) * 13 + 1106], 90., atheta78, 90.,
732 atheta78 + 90., 0., 0.);
733 gMC->Gsposp("SPIX", (i-1) * 13 + 7, "IT12", xpos, ypos, zpos,
734 idrotm[(i-1) * 13 + 1106], "ONLY", dsup, 3);
736 // --- Place part # 8-9 (see sketch)
740 dsup[1] = TMath::Sqrt((xend[7] - xbeg[7]) * (xend[7] - xbeg[7]) +
741 (yend[7] - ybeg[7]) * (yend[7] - ybeg[7])) / 20.;
743 xcc = (xx[7] + xx[8]) / 20.;
744 ycc = (yy[7] + yy[8]) / 20.;
745 xccc = (xbeg[7] + xend[7]) / 20.;
746 yccc = (ybeg[7] + yend[7]) / 20.;
747 if (xx[1] == xx[2]) {
752 offset2 = TMath::ATan2(r1, r2) * raddeg - 90.;
754 aphi = (pphi + (i-1) * 36.) * degrad;
755 xzero = rr * TMath::Cos((tteta + (i-1) * 36.) * degrad);
756 yzero = rr * TMath::Sin((tteta + (i-1) * 36.) * degrad);
757 xpos1 = xccc * TMath::Cos(aphi) - yccc * TMath::Sin(aphi) + xzero;
758 ypos1 = xccc * TMath::Sin(aphi) + yccc * TMath::Cos(aphi) + yzero;
759 xpos = xpos1 * TMath::Cos(gteta * degrad) +
760 ypos1 * TMath::Sin(gteta *degrad);
761 ypos = -xpos1 * TMath::Sin(gteta * degrad) +
762 ypos1 * TMath::Cos(gteta * degrad);
764 atheta89 = (i-1) * 36. + offset1 + offset2 - gteta;
765 AliMatrix(idrotm[(i-1) * 13 + 1107], 90., atheta89, 90.,
766 atheta89 + 90., 0., 0.);
767 gMC->Gsposp("SPIX", (i-1) * 13 + 8, "IT12", xpos, ypos, zpos,
768 idrotm[(i-1) * 13 + 1107], "ONLY", dsup, 3);
770 // --- Place an element of layer #2
772 biga = (yy[8] - yy[7]) / (xx[8] - xx[7]);
773 bigb = (xx[8] * yy[7] - xx[7] * yy[8]) / (xx[8] - xx[7]) / 10.;
774 coeffa = biga * biga + 1.;
775 coeffb = biga * bigb - biga * ycc - xcc;
776 coeffc = xcc * xcc + ycc * ycc - ycc * 2. * bigb +
777 bigb * bigb - .014285030400000001;
778 xcc1 = (-coeffb - TMath::Sqrt(coeffb * coeffb - coeffa * coeffc)) /
780 ycc1 = biga * xcc1 + bigb;
782 bigb1 = xcc1 / biga + ycc1;
783 coeffa = biga1 * biga1 + 1.;
784 coeffb = biga1 * bigb1 - biga1 * ycc1 - xcc1;
785 coeffc = xcc1 * xcc1 + ycc1 * ycc1 - ycc1 * 2. * bigb1 +
786 bigb1 * bigb1 - (dsup[0] + dbox2[0]) * (dsup[0] + dbox2[0]);
787 xcc2 = (-coeffb - TMath::Sqrt(coeffb * coeffb - coeffa * coeffc)) /
789 ycc2 = biga1 * xcc2 + bigb1;
790 xpos1 = xcc2 * TMath::Cos(aphi) - ycc2 * TMath::Sin(aphi) + xzero;
791 ypos1 = xcc2 * TMath::Sin(aphi) + ycc2 * TMath::Cos(aphi) + yzero;
792 xpos = xpos1 * TMath::Cos(gteta * degrad) +
793 ypos1 * TMath::Sin(gteta *degrad);
794 ypos = -xpos1 * TMath::Sin(gteta * degrad) +
795 ypos1 * TMath::Cos(gteta * degrad);
798 gMC->Gspos("IPV2", jbox2, "IT12", xpos, ypos, zpos,
799 idrotm[(i-1) * 13 + 1107], "ONLY");
801 // --- Place part # 9-10 (see sketch)
805 dsup[1] = TMath::Sqrt((xend[8] - xbeg[8]) * (xend[8] - xbeg[8]) +
806 (yend[8] - ybeg[8]) * (yend[8] - ybeg[8])) / 20.;
808 xcc = (xx[8] + xx[9]) / 20.;
809 ycc = (yy[8] + yy[9]) / 20.;
810 xccc = (xbeg[8] + xend[8]) / 20.;
811 yccc = (ybeg[8] + yend[8]) / 20.;
812 if (xx[8] == xx[9]) {
817 offset2 = TMath::ATan2(r1, r2) * raddeg - 90.;
819 aphi = (pphi + (i-1) * 36.) * degrad;
820 xzero = rr * TMath::Cos((tteta + (i-1) * 36.) * degrad);
821 yzero = rr * TMath::Sin((tteta + (i-1) * 36.) * degrad);
822 xpos1 = xccc * TMath::Cos(aphi) - yccc * TMath::Sin(aphi) + xzero;
823 ypos1 = xccc * TMath::Sin(aphi) + yccc * TMath::Cos(aphi) + yzero;
824 xpos = xpos1 * TMath::Cos(gteta * degrad) + ypos1 * TMath::Sin(gteta *degrad);
825 ypos = -xpos1 * TMath::Sin(gteta * degrad) + ypos1 * TMath::Cos(gteta * degrad);
827 atheta910 = (i-1) * 36. + offset1 + offset2 - gteta;
828 AliMatrix(idrotm[(i-1) * 13 + 1108], 90., atheta910, 90., atheta910 + 90., 0., 0.);
829 gMC->Gsposp("SPIX", (i-1) * 13 + 9, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1108], "ONLY", dsup, 3);
831 // --- Place part # 10-11 (see sketch)
835 dsup[1] = TMath::Sqrt((xend[9] - xbeg[9]) * (xend[9] - xbeg[9]) + (yend[9] - ybeg[9]) * (yend[9] - ybeg[9])) / 20.;
837 xcc = (xx[9] + xx[10]) / 20.;
838 ycc = (yy[9] + yy[10]) / 20.;
839 xccc = (xbeg[9] + xend[9]) / 20.;
840 yccc = (ybeg[9] + yend[9]) / 20.;
841 if (xx[9] == xx[10]) {
846 offset2 = TMath::ATan2(r1, r2) * raddeg - 90.;
848 aphi = (pphi + (i-1) * 36.) * degrad;
849 xzero = rr * TMath::Cos((tteta + (i-1) * 36.) * degrad);
850 yzero = rr * TMath::Sin((tteta + (i-1) * 36.) * degrad);
851 xpos1 = xccc * TMath::Cos(aphi) - yccc * TMath::Sin(aphi) + xzero;
852 ypos1 = xccc * TMath::Sin(aphi) + yccc * TMath::Cos(aphi) + yzero;
853 xpos = xpos1 * TMath::Cos(gteta * degrad) + ypos1 * TMath::Sin(gteta *degrad);
854 ypos = -xpos1 * TMath::Sin(gteta * degrad) + ypos1 * TMath::Cos(gteta * degrad);
856 atheta1011 = (i-1) * 36. + offset1 + offset2 - gteta;
857 AliMatrix(idrotm[(i-1) * 13 + 1109], 90., atheta1011, 90.,atheta1011 + 90., 0., 0.);
858 gMC->Gsposp("SPIX", (i-1) * 13 + 10, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1109], "ONLY", dsup, 3);
860 // --- Place part # 13-14 (see sketch)
864 dsup[1] = TMath::Sqrt((xend[12] - xbeg[12]) * (xend[12] - xbeg[12]) + (yend[12] - ybeg[12]) * (yend[12] - ybeg[12])) / 20.;
866 xcc = (xx[12] + xx[13]) / 20.;
867 ycc = (yy[12] + yy[13]) / 20.;
868 xccc = (xbeg[12] + xend[12]) / 20.;
869 yccc = (ybeg[12] + yend[12]) / 20.;
870 if (xx[12] == xx[13]) {
873 r1 = yy[12] - yy[13];
874 r2 = xx[12] - xx[13];
875 offset2 = TMath::ATan2(r1, r2) * raddeg - 90.;
877 aphi = (pphi + (i-1) * 36.) * degrad;
878 xzero = rr * TMath::Cos((tteta + (i-1) * 36.) * degrad);
879 yzero = rr * TMath::Sin((tteta + (i-1) * 36.) * degrad);
880 xpos1 = xccc * TMath::Cos(aphi) - yccc * TMath::Sin(aphi) + xzero;
881 ypos1 = xccc * TMath::Sin(aphi) + yccc * TMath::Cos(aphi) + yzero;
882 xpos = xpos1 * TMath::Cos(gteta * degrad) + ypos1 * TMath::Sin(gteta *degrad);
883 ypos = -xpos1 * TMath::Sin(gteta * degrad) + ypos1 * TMath::Cos(gteta * degrad);
885 atheta1314 = (i-1) * 36. + offset1 + offset2 - gteta;
886 AliMatrix(idrotm[(i-1) * 13 + 1112], 90., atheta1314, 90.,atheta1314 + 90., 0., 0.);
887 gMC->Gsposp("SPIX", (i-1) * 13 + 13, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1112], "ONLY", dsup, 3);
889 // --- Place an element of layer #1
891 biga = (yy[13] - yy[12]) / (xx[13] - xx[12]);
892 bigb = (xx[13] * yy[12] - xx[12] * yy[13]) / (xx[13] - xx[12]) / 10.;
893 coeffa = biga * biga + 1.;
894 coeffb = biga * bigb - biga * ycc - xcc;
895 coeffc = xcc * xcc + ycc * ycc - ycc * 2. * bigb + bigb * bigb - .050216328100000006;
896 xcc1 = (-coeffb + TMath::Sqrt(coeffb * coeffb - coeffa * coeffc)) / coeffa;
897 ycc1 = biga * xcc1 + bigb;
899 bigb1 = xcc1 / biga + ycc1;
900 coeffa = biga1 * biga1 + 1.;
901 coeffb = biga1 * bigb1 - biga1 * ycc1 - xcc1;
902 coeffc = xcc1 * xcc1 + ycc1 * ycc1 - ycc1 * 2. * bigb1 + bigb1 * bigb1 - (dsup[0] + dbox1[0]) * (dsup[0] + dbox1[0]);
903 xcc2 = (-coeffb + TMath::Sqrt(coeffb * coeffb - coeffa * coeffc)) / coeffa;
904 ycc2 = biga1 * xcc2 + bigb1;
905 xpos1 = xcc2 * TMath::Cos(aphi) - ycc2 * TMath::Sin(aphi) + xzero;
906 ypos1 = xcc2 * TMath::Sin(aphi) + ycc2 * TMath::Cos(aphi) + yzero;
907 xpos = xpos1 * TMath::Cos(gteta * degrad) + ypos1 * TMath::Sin(gteta *degrad);
908 ypos = -xpos1 * TMath::Sin(gteta * degrad) + ypos1 * TMath::Cos(gteta * degrad);
911 gMC->Gspos("IPV1", jbox1, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1112], "ONLY");
913 // --- Place part # 12-13 (see sketch)
917 dsup[1] = TMath::Sqrt((xend[11] - xbeg[11]) * (xend[11] - xbeg[11]) + (yend[11] - ybeg[11]) * (yend[11] - ybeg[11])) / 20.;
919 xcc = (xx[11] + xx[12]) / 20.;
920 ycc = (yy[11] + yy[12]) / 20.;
921 xccc = (xbeg[11] + xend[11]) / 20.;
922 yccc = (ybeg[11] + yend[11]) / 20.;
923 if (xx[11] == xx[12]) {
926 r1 = yy[12] - yy[11];
927 r2 = xx[12] - xx[11];
928 offset2 = TMath::ATan2(r1, r2) * raddeg - 90.;
930 aphi = (pphi + (i-1) * 36.) * degrad;
931 xzero = rr * TMath::Cos((tteta + (i-1) * 36.) * degrad);
932 yzero = rr * TMath::Sin((tteta + (i-1) * 36.) * degrad);
933 xpos1 = xccc * TMath::Cos(aphi) - yccc * TMath::Sin(aphi) + xzero;
934 ypos1 = xccc * TMath::Sin(aphi) + yccc * TMath::Cos(aphi) + yzero;
935 xpos = xpos1 * TMath::Cos(gteta * degrad) + ypos1 * TMath::Sin(gteta *degrad);
936 ypos = -xpos1 * TMath::Sin(gteta * degrad) + ypos1 * TMath::Cos(gteta * degrad);
938 atheta1213 = (i-1) * 36. + offset1 + offset2 - gteta;
939 AliMatrix(idrotm[(i-1) * 13 + 1111], 90., atheta1213, 90.,atheta1213 + 90., 0., 0.);
940 gMC->Gsposp("SPIX", (i-1) * 13 + 12, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1111], "ONLY", dsup, 3);
942 // --- Place part # 11-12 (see sketch)
946 dsup[1] = TMath::Sqrt((xend[10] - xbeg[10]) * (xend[10] - xbeg[10]) + (yend[10] - ybeg[10]) * (yend[10] - ybeg[10])) / 20.;
948 xcc = (xx[10] + xx[11]) / 20.;
949 ycc = (yy[10] + yy[11]) / 20.;
950 xccc = (xbeg[10] + xend[10]) / 20.;
951 yccc = (ybeg[10] + yend[10]) / 20.;
952 if (xx[10] == xx[11]) {
955 r1 = yy[11] - yy[10];
956 r2 = xx[11] - xx[10];
957 offset2 = TMath::ATan2(r1, r2) * raddeg - 90.;
959 aphi = (pphi + (i-1) * 36.) * degrad;
960 xzero = rr * TMath::Cos((tteta + (i-1) * 36.) * degrad);
961 yzero = rr * TMath::Sin((tteta + (i-1) * 36.) * degrad);
962 xpos1 = xccc * TMath::Cos(aphi) - yccc * TMath::Sin(aphi) + xzero;
963 ypos1 = xccc * TMath::Sin(aphi) + yccc * TMath::Cos(aphi) + yzero;
964 xpos = xpos1 * TMath::Cos(gteta * degrad) + ypos1 * TMath::Sin(gteta *degrad);
965 ypos = -xpos1 * TMath::Sin(gteta * degrad) + ypos1 * TMath::Cos(gteta * degrad);
967 atheta1112 = (i-1) * 36. + offset1 + offset2 - gteta;
968 AliMatrix(idrotm[(i-1) * 13 + 1110], 270., atheta1112, 90., atheta1112 + 270., 0., 0.);
969 gMC->Gsposp("SPIX", (i-1) * 13 + 11, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1110], "ONLY", dsup, 3);
971 // --- Place an element of layer #1
973 biga = (yy[11] - yy[10]) / (xx[11] - xx[10]);
974 bigb = (xx[11] * yy[10] - xx[10] * yy[11]) / (xx[11] - xx[10]) / 10.;
975 coeffa = biga * biga + 1.;
976 coeffb = biga * bigb - biga * ycc - xcc;
977 coeffc = xcc * xcc + ycc * ycc - ycc * 2. * bigb + bigb * bigb - .0035712576000000002;
978 xcc1 = (-coeffb + TMath::Sqrt(coeffb * coeffb - coeffa * coeffc)) / coeffa;
979 ycc1 = biga * xcc1 + bigb;
981 bigb1 = xcc1 / biga + ycc1;
982 coeffa = biga1 * biga1 + 1.;
983 coeffb = biga1 * bigb1 - biga1 * ycc1 - xcc1;
984 coeffc = xcc1 * xcc1 + ycc1 * ycc1 - ycc1 * 2. * bigb1 + bigb1 * bigb1 - (dsup[0] + dbox1[0]) * (dsup[0] + dbox1[0]);
985 xcc2 = (-coeffb + TMath::Sqrt(coeffb * coeffb - coeffa * coeffc)) / coeffa;
986 ycc2 = biga1 * xcc2 + bigb1;
987 xpos1 = xcc2 * TMath::Cos(aphi) - ycc2 * TMath::Sin(aphi) + xzero;
988 ypos1 = xcc2 * TMath::Sin(aphi) + ycc2 * TMath::Cos(aphi) + yzero;
989 xpos = xpos1 * TMath::Cos(gteta * degrad) + ypos1 * TMath::Sin(gteta *degrad);
990 ypos = -xpos1 * TMath::Sin(gteta * degrad) + ypos1 * TMath::Cos(gteta * degrad);
993 gMC->Gspos("IPV1", jbox1, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1110], "ONLY");
995 // --- Place arc # 13 (between part 1-2 and part 2-3) (see sketch)
997 darc[0] = rarc[12] / 10. - .02;
998 darc[1] = rarc[12] / 10.;
1000 darc[3] = atheta12 - (i-1) * 36.;
1001 darc[4] = atheta23 - (i-1) * 36.;
1002 xcc = xarc[12] / 10.;
1003 ycc = yarc[12] / 10.;
1004 aphi = (pphi + (i-1) * 36.) * degrad;
1005 xzero = rr * TMath::Cos((tteta + (i-1) * 36.) * degrad);
1006 yzero = rr * TMath::Sin((tteta + (i-1) * 36.) * degrad);
1007 xpos1 = xcc * TMath::Cos(aphi) - ycc * TMath::Sin(aphi) + xzero;
1008 ypos1 = xcc * TMath::Sin(aphi) + ycc * TMath::Cos(aphi) + yzero;
1009 xpos = xpos1 * TMath::Cos(gteta * degrad) + ypos1 * TMath::Sin(gteta *degrad);
1010 ypos = -xpos1 * TMath::Sin(gteta * degrad) + ypos1 * TMath::Cos(gteta * degrad);
1012 gMC->Gsposp("SARC", (i-1) * 13 + 13, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1112], "ONLY", darc, 5);
1014 // --- Place arc # 12 (between part 2-3 and part 3-4) (see sketch)
1016 darc[0] = rarc[11] / 10. - .02;
1017 darc[1] = rarc[11] / 10.;
1019 darc[3] = atheta23 + 90. - (i-1) * 36.;
1020 darc[4] = atheta34 + 90. - (i-1) * 36.;
1021 xcc = xarc[11] / 10.;
1022 ycc = yarc[11] / 10.;
1023 aphi = (pphi + (i-1) * 36.) * degrad;
1024 xzero = rr * TMath::Cos((tteta + (i-1) * 36.) * degrad);
1025 yzero = rr * TMath::Sin((tteta + (i-1) * 36.) * degrad);
1026 xpos1 = xcc * TMath::Cos(aphi) - ycc * TMath::Sin(aphi) + xzero;
1027 ypos1 = xcc * TMath::Sin(aphi) + ycc * TMath::Cos(aphi) + yzero;
1028 xpos = xpos1 * TMath::Cos(gteta * degrad) + ypos1 * TMath::Sin(gteta *degrad);
1029 ypos = -xpos1 * TMath::Sin(gteta * degrad) + ypos1 * TMath::Cos(gteta * degrad);
1031 gMC->Gsposp("SARC", (i-1) * 13 + 12, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1111], "ONLY", darc, 5);
1033 // --- Place arc # 11 (between part 3-4 and part 4-5) (see sketch)
1035 darc[0] = rarc[10] / 10. - .02;
1036 darc[1] = rarc[10] / 10.;
1038 darc[3] = atheta45 + 180. - (i-1) * 36.;
1039 darc[4] = atheta34 + 180. - (i-1) * 36.;
1040 xcc = xarc[10] / 10.;
1041 ycc = yarc[10] / 10.;
1042 aphi = (pphi + (i-1) * 36.) * degrad;
1043 xzero = rr * TMath::Cos((tteta + (i-1) * 36.) * degrad);
1044 yzero = rr * TMath::Sin((tteta + (i-1) * 36.) * degrad);
1045 xpos1 = xcc * TMath::Cos(aphi) - ycc * TMath::Sin(aphi) + xzero;
1046 ypos1 = xcc * TMath::Sin(aphi) + ycc * TMath::Cos(aphi) + yzero;
1047 xpos = xpos1 * TMath::Cos(gteta * degrad) + ypos1 * TMath::Sin(gteta *degrad);
1048 ypos = -xpos1 * TMath::Sin(gteta * degrad) + ypos1 * TMath::Cos(gteta * degrad);
1050 gMC->Gsposp("SARC", (i-1) * 13 + 11, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1110], "ONLY", darc, 5);
1052 // --- Place arc # 10 (between part 4-5 and part 5-6) (see sketch)
1054 darc[0] = rarc[9] / 10. - .02;
1055 darc[1] = rarc[9] / 10.;
1057 darc[3] = atheta45 - 90. - (i-1) * 36.;
1058 darc[4] = atheta56 - 90. - (i-1) * 36.;
1059 xcc = xarc[9] / 10.;
1060 ycc = yarc[9] / 10.;
1061 aphi = (pphi + (i-1) * 36.) * degrad;
1062 xzero = rr * TMath::Cos((tteta + (i-1) * 36.) * degrad);
1063 yzero = rr * TMath::Sin((tteta + (i-1) * 36.) * degrad);
1064 xpos1 = xcc * TMath::Cos(aphi) - ycc * TMath::Sin(aphi) + xzero;
1065 ypos1 = xcc * TMath::Sin(aphi) + ycc * TMath::Cos(aphi) + yzero;
1066 xpos = xpos1 * TMath::Cos(gteta * degrad) + ypos1 * TMath::Sin(gteta *degrad);
1067 ypos = -xpos1 * TMath::Sin(gteta * degrad) + ypos1 * TMath::Cos(gteta * degrad);
1069 gMC->Gsposp("SARC", (i-1) * 13 + 10, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1109], "ONLY", darc, 5);
1071 // --- Place arc # 9 (between part 5-6 and part) (see sketch)
1073 darc[0] = rarc[8] / 10. - .02;
1074 darc[1] = rarc[8] / 10.;
1076 darc[3] = atheta67 + 45. - (i-1) * 36.;
1077 darc[4] = atheta56 + 45. - (i-1) * 36.;
1078 xcc = xarc[8] / 10.;
1079 ycc = yarc[8] / 10.;
1080 aphi = (pphi + (i-1) * 36.) * degrad;
1081 xzero = rr * TMath::Cos((tteta + (i-1) * 36.) * degrad);
1082 yzero = rr * TMath::Sin((tteta + (i-1) * 36.) * degrad);
1083 xpos1 = xcc * TMath::Cos(aphi) - ycc * TMath::Sin(aphi) + xzero;
1084 ypos1 = xcc * TMath::Sin(aphi) + ycc * TMath::Cos(aphi) + yzero;
1085 xpos = xpos1 * TMath::Cos(gteta * degrad) + ypos1 * TMath::Sin(gteta *degrad);
1086 ypos = -xpos1 * TMath::Sin(gteta * degrad) + ypos1 * TMath::Cos(gteta * degrad);
1088 gMC->Gsposp("SARC", (i-1) * 13 + 9, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1108], "ONLY", darc, 5);
1090 // --- Place arc # 8 (between part 6-7 and part 7-8) (see sketch)
1092 darc[0] = rarc[7] / 10. - .02;
1093 darc[1] = rarc[7] / 10.;
1095 darc[3] = atheta67 - (i-1) * 36.;
1096 darc[4] = atheta78 - (i-1) * 36.;
1097 xcc = xarc[7] / 10.;
1098 ycc = yarc[7] / 10.;
1099 aphi = (pphi + (i-1) * 36.) * degrad;
1100 xzero = rr * TMath::Cos((tteta + (i-1) * 36.) * degrad);
1101 yzero = rr * TMath::Sin((tteta + (i-1) * 36.) * degrad);
1102 xpos1 = xcc * TMath::Cos(aphi) - ycc * TMath::Sin(aphi) + xzero;
1103 ypos1 = xcc * TMath::Sin(aphi) + ycc * TMath::Cos(aphi) + yzero;
1104 xpos = xpos1 * TMath::Cos(gteta * degrad) + ypos1 * TMath::Sin(gteta *degrad);
1105 ypos = -xpos1 * TMath::Sin(gteta * degrad) + ypos1 * TMath::Cos(gteta * degrad);
1107 gMC->Gsposp("SARC", (i-1) * 13 + 8, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1107], "ONLY", darc, 5);
1109 // --- Place arc # 7 (between part 7-8 and part 8-9) (see sketch)
1111 darc[0] = rarc[6] / 10. - .02;
1112 darc[1] = rarc[6] / 10.;
1114 darc[3] = atheta89 + 45. - (i-1) * 36.;
1115 darc[4] = atheta78 + 45. - (i-1) * 36.;
1116 xcc = xarc[6] / 10.;
1117 ycc = yarc[6] / 10.;
1118 aphi = (pphi + (i-1) * 36.) * degrad;
1119 xzero = rr * TMath::Cos((tteta + (i-1) * 36.) * degrad);
1120 yzero = rr * TMath::Sin((tteta + (i-1) * 36.) * degrad);
1121 xpos1 = xcc * TMath::Cos(aphi) - ycc * TMath::Sin(aphi) + xzero;
1122 ypos1 = xcc * TMath::Sin(aphi) + ycc * TMath::Cos(aphi) + yzero;
1123 xpos = xpos1 * TMath::Cos(gteta * degrad) + ypos1 * TMath::Sin(gteta *degrad);
1124 ypos = -xpos1 * TMath::Sin(gteta * degrad) + ypos1 * TMath::Cos(gteta * degrad);
1126 gMC->Gsposp("SARC", (i-1) * 13 + 7, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1106], "ONLY", darc, 5);
1128 // --- Place arc # 6 (between part 8-9 and part 9-10) (see sketch)
1130 darc[0] = rarc[5] / 10. - .02;
1131 darc[1] = rarc[5] / 10.;
1133 darc[3] = atheta89 + 45. - (i-1) * 36.;
1134 darc[4] = atheta910 + 45. - (i-1) * 36.;
1135 xcc = xarc[5] / 10.;
1136 ycc = yarc[5] / 10.;
1137 aphi = (pphi + (i-1) * 36.) * degrad;
1138 xzero = rr * TMath::Cos((tteta + (i-1) * 36.) * degrad);
1139 yzero = rr * TMath::Sin((tteta + (i-1) * 36.) * degrad);
1140 xpos1 = xcc * TMath::Cos(aphi) - ycc * TMath::Sin(aphi) + xzero;
1141 ypos1 = xcc * TMath::Sin(aphi) + ycc * TMath::Cos(aphi) + yzero;
1142 xpos = xpos1 * TMath::Cos(gteta * degrad) + ypos1 * TMath::Sin(gteta *degrad);
1143 ypos = -xpos1 * TMath::Sin(gteta * degrad) + ypos1 * TMath::Cos(gteta * degrad);
1145 gMC->Gsposp("SARC", (i-1) * 13 + 6, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1105], "ONLY", darc, 5);
1147 // --- Place arc # 5 (between part 9-10 and part 10-11)
1150 darc[0] = rarc[4] / 10. - .02;
1151 darc[1] = rarc[4] / 10.;
1153 darc[3] = atheta1011 + 45. - (i-1) * 36.;
1154 darc[4] = atheta910 + 45. - (i-1) * 36.;
1155 xcc = xarc[4] / 10.;
1156 ycc = yarc[4] / 10.;
1157 aphi = (pphi + (i-1) * 36.) * degrad;
1158 xzero = rr * TMath::Cos((tteta + (i-1) * 36.) * degrad);
1159 yzero = rr * TMath::Sin((tteta + (i-1) * 36.) * degrad);
1160 xpos1 = xcc * TMath::Cos(aphi) - ycc * TMath::Sin(aphi) + xzero;
1161 ypos1 = xcc * TMath::Sin(aphi) + ycc * TMath::Cos(aphi) + yzero;
1162 xpos = xpos1 * TMath::Cos(gteta * degrad) + ypos1 * TMath::Sin(gteta *degrad);
1163 ypos = -xpos1 * TMath::Sin(gteta * degrad) + ypos1 * TMath::Cos(gteta * degrad);
1165 gMC->Gsposp("SARC", (i-1) * 13 + 5, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1104], "ONLY", darc, 5);
1167 // --- Place arc # 4 (between part 10-11 and part 11-12)
1170 darc[0] = rarc[3] / 10. - .02;
1171 darc[1] = rarc[3] / 10.;
1173 darc[3] = atheta1112 - 45. - (i-1) * 36.;
1174 darc[4] = atheta1011 - 225. - (i-1) * 36.;
1175 xcc = xarc[3] / 10.;
1176 ycc = yarc[3] / 10.;
1177 aphi = (pphi + (i-1) * 36.) * degrad;
1178 xzero = rr * TMath::Cos((tteta + (i-1) * 36.) * degrad);
1179 yzero = rr * TMath::Sin((tteta + (i-1) * 36.) * degrad);
1180 xpos1 = xcc * TMath::Cos(aphi) - ycc * TMath::Sin(aphi) + xzero;
1181 ypos1 = xcc * TMath::Sin(aphi) + ycc * TMath::Cos(aphi) + yzero;
1182 xpos = xpos1 * TMath::Cos(gteta * degrad) + ypos1 * TMath::Sin(gteta *degrad);
1183 ypos = -xpos1 * TMath::Sin(gteta * degrad) + ypos1 * TMath::Cos(gteta * degrad);
1185 gMC->Gsposp("SARC", (i-1) * 13 + 4, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1103], "ONLY", darc, 5);
1187 // --- Place arc # 3 (between part 11-12 and part 12-13)
1190 darc[0] = rarc[2] / 10. - .02;
1191 darc[1] = rarc[2] / 10.;
1193 darc[3] = atheta1112 - 90. - (i-1) * 36.;
1194 darc[4] = atheta1213 - 90. - (i-1) * 36.;
1195 xcc = xarc[2] / 10.;
1196 ycc = yarc[2] / 10.;
1197 aphi = (pphi + (i-1) * 36.) * degrad;
1198 xzero = rr * TMath::Cos((tteta + (i-1) * 36.) * degrad);
1199 yzero = rr * TMath::Sin((tteta + (i-1) * 36.) * degrad);
1200 xpos1 = xcc * TMath::Cos(aphi) - ycc * TMath::Sin(aphi) + xzero;
1201 ypos1 = xcc * TMath::Sin(aphi) + ycc * TMath::Cos(aphi) + yzero;
1202 xpos = xpos1 * TMath::Cos(gteta * degrad) + ypos1 * TMath::Sin(gteta *degrad);
1203 ypos = -xpos1 * TMath::Sin(gteta * degrad) + ypos1 * TMath::Cos(gteta * degrad);
1205 gMC->Gsposp("SARC", (i-1) * 13 + 3, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1102], "ONLY", darc, 5);
1207 // --- Place arc # 2 (between part 12-13 and part 13-14)
1210 darc[0] = rarc[1] / 10. - .02;
1211 darc[1] = rarc[1] / 10.;
1213 darc[3] = atheta1213 + 135. - (i-1) * 36.;
1214 darc[4] = atheta1314 + 165. - (i-1) * 36.;
1215 xcc = xarc[1] / 10.;
1216 ycc = yarc[1] / 10.;
1217 aphi = (pphi + (i-1) * 36.) * degrad;
1218 xzero = rr * TMath::Cos((tteta + (i-1) * 36.) * degrad);
1219 yzero = rr * TMath::Sin((tteta + (i-1) * 36.) * degrad);
1220 xpos1 = xcc * TMath::Cos(aphi) - ycc * TMath::Sin(aphi) + xzero;
1221 ypos1 = xcc * TMath::Sin(aphi) + ycc * TMath::Cos(aphi) + yzero;
1222 xpos = xpos1 * TMath::Cos(gteta * degrad) + ypos1 * TMath::Sin(gteta *degrad);
1223 ypos = -xpos1 * TMath::Sin(gteta * degrad) + ypos1 * TMath::Cos(gteta * degrad);
1225 gMC->Gsposp("SARC", (i-1) * 13 + 2, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1101], "ONLY", darc, 5);
1227 // --- Place arc # 1 (between part 13-14 and part 1-2)
1230 darc[0] = rarc[0] / 10. - .02;
1231 darc[1] = rarc[0] / 10.;
1233 darc[3] = atheta12 + 45. - (i-1) * 36.;
1234 darc[4] = atheta1314 - (i-1) * 36.;
1235 xcc = xarc[0] / 10.;
1236 ycc = yarc[0] / 10.;
1237 aphi = (pphi + (i-1) * 36.) * degrad;
1238 xzero = rr * TMath::Cos((tteta + (i-1) * 36.) * degrad);
1239 yzero = rr * TMath::Sin((tteta + (i-1) * 36.) * degrad);
1240 xpos1 = xcc * TMath::Cos(aphi) - ycc * TMath::Sin(aphi) + xzero;
1241 ypos1 = xcc * TMath::Sin(aphi) + ycc * TMath::Cos(aphi) + yzero;
1242 xpos = xpos1 * TMath::Cos(gteta * degrad) + ypos1 * TMath::Sin(gteta *degrad);
1243 ypos = -xpos1 * TMath::Sin(gteta * degrad) + ypos1 * TMath::Cos(gteta * degrad);
1245 gMC->Gsposp("SARC", (i-1) * 13 + 1, "IT12", xpos, ypos, zpos, idrotm[(i-1) * 13 + 1100], "ONLY", darc, 5);
1248 //************************************************************************
1253 //************************************************************************
1255 // --- Define a ghost volume containing the Silicon Drift Detectors
1256 // (layer #3 and #4) and fill it with air or vacuum
1258 xxm = (49.999-3.)/(70.-25.);
1262 dgh[3] = -25.-(9.-3.01)/xxm-(9.01-9.)/xxm-(27.-9.01)/xxm;
1265 dgh[6] = -25.-(9.-3.01)/xxm-(9.01-9.)/xxm;
1268 dgh[9] = 25.+(9.-3.01)/xxm+(9.01-9.)/xxm;
1271 dgh[12] = 25.+(9.-3.01)/xxm+(9.01-9.)/xxm+(27.-9.01)/xxm;
1274 gMC->Gsvolu("IT34", "PCON", idtmed[275], dgh, 15);
1276 // --- Place the ghost volume in its mother volume (ITSV) and make it
1279 gMC->Gspos("IT34", 1, "ITSV", 0., 0., 0., 0, "ONLY");
1280 gMC->Gsatt("IT34", "SEEN", 0);
1284 // GOTO 3456 ! skip ITS layer no. 3
1286 //--- Define a ghost volume containing a single ladder of layer #3 (with the
1287 // smaller lenght of ribs) and fill it with air or vacuum
1289 dbox1[0] = 0.5+(0.0172+0.03+0.0252+0.04+0.003);
1291 // the widest element is the sensitive element
1292 dbox1[2] = (8.7*5.-2.*1.+2.*0.1)/2.+2.*7.5;
1293 // 7.5 cm is the lenght
1294 gMC->Gsvolu("IDV1", "BOX ", idtmed[228], dbox1, 3);
1296 // --- Make the ghost volume invisible
1298 gMC->Gsatt("IDV1", "SEEN", 0);
1300 // --- Define a volume containing the sensitive part of drifts
1301 // (silicon, layer #3)
1304 // see material budget report by G. Feofilov
1307 gMC->Gsvolu("ITS3", "BOX ", idtmed[224], dits, 3);
1309 //--- Define the part of the (smaller) rib between two sensitive parts made of
1310 // carbon (layer #3)
1312 dsup[0] = .5 - dits[0];
1314 dsup[2] = (8.7*5.-2.*1.+2.*0.1)/2.+2.*7.5;
1315 // 7.5 cm is the lenght
1316 gMC->Gsvolu("IR11", "BOX ", idtmed[227], dsup, 3);
1318 //--- Define the first part of the (smaller) rib between two sensitive parts
1319 // made of aluminum (layer #3)
1321 dal1[0] = .5 - dits[0];
1322 dal1[1] = 0.00096/2.;
1323 dal1[2] = (8.7*5.-2.*1.+2.*0.1)/2.+2.*7.5;
1324 // 7.5 cm is the lenght
1325 gMC->Gsvolu("IR12", "BOX ", idtmed[230], dal1, 3);
1327 //--- Define the part of the (smaller) rib between two sensitive parts made of
1328 // kapton (layer #3)
1330 dkap[0] = .5 - dits[0];
1332 dkap[2] = (8.7*5.-2.*1.+2.*0.1)/2.+2.*7.5;
1333 // 7.5 cm is the lenght
1334 gMC->Gsvolu("IR13", "BOX ", idtmed[236], dkap, 3);
1336 //--- Define the second part of the (smaller) rib between two sensitive parts
1337 // made of aluminum (layer #3)
1339 dal2[0] = .5 - dits[0];
1340 dal2[1] = 0.0027/2.;
1341 dal2[2] = (8.7*5.-2.*1.+2.*0.1)/2.+2.*7.5;
1342 // 7.5 cm is the lenght
1343 gMC->Gsvolu("IR14", "BOX ", idtmed[230], dal2, 3);
1345 // --- Define the part of the (smaller) rib between two sensitive parts
1346 // made of silicon (the electronics) (layer #3)
1348 dchi[0] = .5 - dits[0];
1349 dchi[1] = 0.0071/2.;
1350 dchi[2] = (8.7*5.-2.*1.+2.*0.1)/2.+2.*7.5;
1351 // 7.5 cm is the lenght
1352 gMC->Gsvolu("IR15", "BOX ", idtmed[225], dal2, 3);
1354 // --- Define the part of the (smaller) rib between two sensitive parts
1355 // made of water (the cooler) (layer #3)
1357 dwat[0] = .5 - dits[0];
1358 dwat[1] = 0.0093/2.;
1359 dwat[2] = (8.7*5.-2.*1.+2.*0.1)/2.+2.*7.5;
1360 // 7.5 cm is the lenght
1361 gMC->Gsvolu("IR16", "BOX ", idtmed[231], dwat, 3);
1363 //--- Define the third part of the (smaller) rib between two sensitive parts
1364 // made of aluminum (the cooling tubes) (layer #3)
1366 dtub[0] = .5 - dits[0];
1367 dtub[1] = 0.00134/2.;
1368 dtub[2] = (8.7*5.-2.*1.+2.*0.1)/2.+2.*7.5;
1369 // 7.5 cm is the lenght
1370 gMC->Gsvolu("IR17", "BOX ", idtmed[230], dtub, 3);
1372 // --- Define the part of the end-ladder stuff made of PCB (layer #3)
1375 // twice the foreseen thickness
1378 gMC->Gsvolu("IEL1", "BOX ", idtmed[233], dpcb, 3);
1380 // --- Define the part of the end-ladder stuff made of copper (layer #3)
1383 // twice the foreseen thickness
1386 gMC->Gsvolu("IEL2", "BOX ", idtmed[234], dcop, 3);
1388 // --- Define the part of the end-ladder stuff made of ceramics (layer #3)
1391 // twice the foreseen thickness
1394 gMC->Gsvolu("IEL3", "BOX ", idtmed[235], dcer, 3);
1396 // --- Define the part of the end-ladder stuff made of silicon (layer #3)
1399 // twice the foreseen thickness
1402 gMC->Gsvolu("IEL4", "BOX ", idtmed[226], dsil, 3);
1404 //--- Place the sensitive part of the drifts (smaller ribs) into its mother
1408 for (j = 1; j <= 5; ++j) {
1409 // odd elements are up and even elements are down
1411 xpos = dbox1[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0] * 2. - dits[0];
1412 zpos = 0. - dits[2] + 1. - dits[2] * 2. - .1 - dits[2];
1413 } else if (j == 2) {
1414 xpos = -dbox1[0] + dits[0];
1415 zpos = 0. - dits[2] + 1. - dits[2];
1416 } else if (j == 3) {
1417 xpos = dbox1[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0] * 2. - dits[0];
1419 } else if (j == 4) {
1420 xpos = -dbox1[0] + dits[0];
1421 zpos = dits[2] + 0. - 1. + dits[2];
1422 } else if (j == 5) {
1423 xpos = dbox1[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0] * 2. - dits[0];
1424 zpos = dits[2] + 0. - 1. + dits[2] * 2. + .1 + dits[2];
1426 gMC->Gspos("ITS3", j, "IDV1", xpos, ypos, zpos, 0, "ONLY");
1429 // --- Place the smaller ribs into their mother (IDV1)
1431 // --- Right ribs (just a matter of convention)
1433 xpos = .5 - dbox1[0] + dits[0];
1439 gMC->Gspos("IR11", 1, "IDV1", xpos, ypos, zpos, 0, "ONLY");
1443 ypos = dsup[1] + 2.81 + dal1[1];
1444 gMC->Gspos("IR12", 1, "IDV1", xpos, ypos, zpos, 0, "ONLY");
1448 ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1];
1449 gMC->Gspos("IR13", 1, "IDV1", xpos, ypos, zpos, 0, "ONLY");
1453 ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1];
1454 gMC->Gspos("IR14", 1, "IDV1", xpos, ypos, zpos, 0, "ONLY");
1456 // --- Silicon (chip)
1458 ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1];
1459 gMC->Gspos("IR15", 1, "IDV1", xpos, ypos, zpos, 0, "ONLY");
1463 ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1] * 2. + dwat[1];
1464 gMC->Gspos("IR16", 1, "IDV1", xpos, ypos, zpos, 0, "ONLY");
1468 ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1] * 2. + dwat[1] * 2.
1470 gMC->Gspos("IR17", 1, "IDV1", xpos, ypos, zpos, 0, "ONLY");
1472 // --- Right ribs (just a matter of convention)
1477 gMC->Gspos("IR11", 2, "IDV1", xpos, ypos, zpos, 0, "ONLY");
1481 ypos = -(dsup[1] + 2.81 + dal1[1]);
1482 gMC->Gspos("IR12", 2, "IDV1", xpos, ypos, zpos, 0, "ONLY");
1486 ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1]);
1487 gMC->Gspos("IR13", 2, "IDV1", xpos, ypos, zpos, 0, "ONLY");
1491 ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1]);
1492 gMC->Gspos("IR14", 2, "IDV1", xpos, ypos, zpos, 0, "ONLY");
1494 // --- Silicon (chip)
1496 ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1]);
1497 gMC->Gspos("IR15", 2, "IDV1", xpos, ypos, zpos, 0, "ONLY");
1501 ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1] * 2. + dwat[1]);
1502 gMC->Gspos("IR16", 2, "IDV1", xpos, ypos, zpos, 0, "ONLY");
1506 ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] *
1507 2. + dal2[1] * 2. + dchi[1] * 2. + dwat[1] * 2. + dtub[1]);
1508 gMC->Gspos("IR17", 2, "IDV1", xpos, ypos, zpos, 0, "ONLY");
1510 // --- Place the end-ladder stuff into its mother (IDV1)
1513 // --- Negative-Z end-ladder
1516 zpos = -(8.7*5.-2.*1.+2.*0.1)/2.-7.5;
1520 xpos = dbox1[0] - dpcb[0];
1521 gMC->Gspos("IEL1", 1, "IDV1", xpos, ypos, zpos, 0, "ONLY");
1525 xpos = dbox1[0] - dpcb[0] * 2. - dcop[0];
1526 gMC->Gspos("IEL2", 1, "IDV1", xpos, ypos, zpos, 0, "ONLY");
1530 xpos = dbox1[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0];
1531 gMC->Gspos("IEL3", 1, "IDV1", xpos, ypos, zpos, 0, "ONLY");
1533 // --- Silicon (bus)
1535 xpos = dbox1[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0];
1536 gMC->Gspos("IEL4", 1, "IDV1", xpos, ypos, zpos, 0, "ONLY");
1538 // --- Positive-Z end-ladder
1541 zpos = (8.7*5.-2.*1.+2.*0.1)/2.+7.5;
1545 xpos = dbox1[0] - dpcb[0];
1546 gMC->Gspos("IEL1", 2, "IDV1", xpos, ypos, zpos, 0, "ONLY");
1550 xpos = dbox1[0] - dpcb[0] * 2. - dcop[0];
1551 gMC->Gspos("IEL2", 2, "IDV1", xpos, ypos, zpos, 0, "ONLY");
1555 xpos = dbox1[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0];
1556 gMC->Gspos("IEL3", 2, "IDV1", xpos, ypos, zpos, 0, "ONLY");
1558 // --- Silicon (bus)
1560 xpos = dbox1[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0];
1561 gMC->Gspos("IEL4", 2, "IDV1", xpos, ypos, zpos, 0, "ONLY");
1563 //--- Define a ghost volume containing a single ladder of layer #3 (with the
1564 // larger lenght of ribs) and fill it with air or vacuum
1566 dbox2[0] = 0.65+(0.0172+0.03+0.0252+0.04+0.003);
1568 // the widest element is the sensitive element
1569 dbox2[2] = (8.7*5.-2.*1.+2.*0.1)/2.+2.*7.5;
1570 // 7.5 cm is the lenght
1571 gMC->Gsvolu("IDV2", "BOX ", idtmed[228], dbox2, 3);
1573 // --- Make the ghost volume invisible
1575 gMC->Gsatt("IDV2", "SEEN", 0);
1577 //--- Define the part of the (larger) rib between two sensitive parts madeof
1578 // carbon (layer #3)
1580 dsup[0] = .65 - dits[0];
1582 dsup[2] = (8.7*5.-2.*1.+2.*0.1)/2.+2.*7.5;
1583 // 7.5 cm is the lenght
1584 gMC->Gsvolu("IR21", "BOX ", idtmed[227], dsup, 3);
1586 //--- Define the first part of the (larger) rib between two sensitive parts
1587 // made of aluminum (layer #3)
1589 dal1[0] = .65 - dits[0];
1590 dal1[1] = 0.00096/2.;
1591 dal1[2] = (8.7*5.-2.*1.+2.*0.1)/2.+2.*7.5;
1592 // 7.5 cm is the lenght
1593 gMC->Gsvolu("IR22", "BOX ", idtmed[230], dal1, 3);
1595 //--- Define the part of the (larger) rib between two sensitive parts madeof
1596 // kapton (layer #3)
1598 dkap[0] = .65 - dits[0];
1599 dkap[1] = 0.0317/2.;
1600 dkap[2] = (8.7*5.-2.*1.+2.*0.1)/2.+2.*7.5;
1601 // 7.5 cm is the lenght
1602 gMC->Gsvolu("IR23", "BOX ", idtmed[236], dkap, 3);
1604 //--- Define the second part of the (larger) rib between two sensitive parts
1605 // made of aluminum (layer #3)
1607 dal2[0] = .65 - dits[0];
1608 dal2[1] = 0.0027/2.;
1609 dal2[2] = (8.7*5.-2.*1.+2.*0.1)/2.+2.*7.5;
1610 // 7.5 cm is the lenght
1611 gMC->Gsvolu("IR24", "BOX ", idtmed[230], dal2, 3);
1613 // --- Define the part of the (larger) rib between two sensitive parts
1614 // made of silicon (the electronics) (layer #3)
1616 dchi[0] = .65 - dits[0];
1617 dchi[1] = 0.0071/2.;
1618 dchi[2] = (8.7*5.-2.*1.+2.*0.1)/2.+2.*7.5;
1619 // 7.5 cm is the lenght
1620 gMC->Gsvolu("IR25", "BOX ", idtmed[225], dal2, 3);
1622 // --- Define the part of the (larger) rib between two sensitive parts
1623 // made of water (the cooler) (layer #3)
1625 dwat[0] = .65 - dits[0];
1626 dwat[1] = 0.0093/2.;
1627 dwat[2] = (8.7*5.-2.*1.+2.*0.1)/2.+2.*7.5;
1628 // 7.5 cm is the lenght
1629 gMC->Gsvolu("IR26", "BOX ", idtmed[231], dwat, 3);
1631 //--- Define the third part of the (larger) rib between two sensitive parts
1632 // made of aluminum (the cooling tubes) (layer #3)
1634 dtub[0] = .65 - dits[0];
1635 dtub[1] = 0.00134/2.;
1636 dtub[2] = (8.7*5.-2.*1.+2.*0.1)/2.+2.*7.5;
1637 // 7.5 cm is the lenght
1638 gMC->Gsvolu("IR27", "BOX ", idtmed[230], dtub, 3);
1640 //--- Place the sensitive part of the drifts (smaller ribs) into its mother
1644 for (j = 1; j <= 5; ++j) {
1645 // odd element are up and even elements are down
1647 xpos = dbox2[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0] * 2. - dits[0];
1648 zpos = 0. - dits[2] + 1. - dits[2] * 2. - .1 - dits[2];
1649 } else if (j == 2) {
1650 xpos = -dbox2[0] + dits[0];
1651 zpos = 0. - dits[2] + 1. - dits[2];
1652 } else if (j == 3) {
1653 xpos = dbox2[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0] * 2. - dits[0];
1655 } else if (j == 4) {
1656 xpos = -dbox2[0] + dits[0];
1657 zpos = dits[2] + 0. - 1. + dits[2];
1658 } else if (j == 5) {
1659 xpos = dbox2[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0] * 2. - dits[0];
1660 zpos = dits[2] + 0. - 1. + dits[2] * 2. + .1 + dits[2];
1662 gMC->Gspos("ITS3", j, "IDV2", xpos, ypos, zpos, 0, "ONLY");
1665 // --- Place the larger ribs into their mother (IDV2)
1668 // --- Right ribs (just a matter of convention)
1670 xpos = .65 - dbox2[0] + dits[0];
1676 gMC->Gspos("IR21", 1, "IDV2", xpos, ypos, zpos, 0, "ONLY");
1680 ypos = dsup[1] + 2.81 + dal1[1];
1681 gMC->Gspos("IR22", 1, "IDV2", xpos, ypos, zpos, 0, "ONLY");
1685 ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1];
1686 gMC->Gspos("IR23", 1, "IDV2", xpos, ypos, zpos, 0, "ONLY");
1690 ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1];
1691 gMC->Gspos("IR24", 1, "IDV2", xpos, ypos, zpos, 0, "ONLY");
1693 // --- Silicon (chip)
1695 ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1];
1696 gMC->Gspos("IR25", 1, "IDV2", xpos, ypos, zpos, 0, "ONLY");
1700 ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1] * 2. + dwat[1];
1701 gMC->Gspos("IR26", 1, "IDV2", xpos, ypos, zpos, 0, "ONLY");
1705 ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1] * 2. + dwat[1] * 2. + dtub[1];
1706 gMC->Gspos("IR27", 1, "IDV2", xpos, ypos, zpos, 0, "ONLY");
1708 // --- Right ribs (just a matter of convention)
1713 gMC->Gspos("IR21", 2, "IDV2", xpos, ypos, zpos, 0, "ONLY");
1717 ypos = -(dsup[1] + 2.81 + dal1[1]);
1718 gMC->Gspos("IR22", 2, "IDV2", xpos, ypos, zpos, 0, "ONLY");
1722 ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1]);
1723 gMC->Gspos("IR23", 2, "IDV2", xpos, ypos, zpos, 0, "ONLY");
1727 ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1]);
1728 gMC->Gspos("IR24", 2, "IDV2", xpos, ypos, zpos, 0, "ONLY");
1730 // --- Silicon (chip)
1732 ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1]);
1733 gMC->Gspos("IR25", 2, "IDV2", xpos, ypos, zpos, 0, "ONLY");
1737 ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1] * 2. + dwat[1]);
1738 gMC->Gspos("IR26", 2, "IDV2", xpos, ypos, zpos, 0, "ONLY");
1742 ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1] * 2. + dwat[1] * 2. + dtub[1]);
1743 gMC->Gspos("IR27", 2, "IDV2", xpos, ypos, zpos, 0, "ONLY");
1745 // --- Place the end-ladder stuff into its mother (IDV1)
1748 // --- Negative-Z end-ladder
1751 zpos = -(8.7*5.-2.*1.+2.*0.1)/2.-7.5;
1755 xpos = dbox2[0] - dpcb[0];
1756 gMC->Gspos("IEL1", 3, "IDV2", xpos, ypos, zpos, 0, "ONLY");
1760 xpos = dbox2[0] - dpcb[0] * 2. - dcop[0];
1761 gMC->Gspos("IEL2", 3, "IDV2", xpos, ypos, zpos, 0, "ONLY");
1765 xpos = dbox2[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0];
1766 gMC->Gspos("IEL3", 3, "IDV2", xpos, ypos, zpos, 0, "ONLY");
1768 // --- Silicon (bus)
1770 xpos = dbox2[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0];
1771 gMC->Gspos("IEL4", 3, "IDV1", xpos, ypos, zpos, 0, "ONLY");
1773 // --- Positive-Z end-ladder
1776 zpos = (8.7*5.-2.*1.+2.*0.1)/2.+7.5;
1780 xpos = dbox2[0] - dpcb[0];
1781 gMC->Gspos("IEL1", 4, "IDV2", xpos, ypos, zpos, 0, "ONLY");
1785 xpos = dbox2[0] - dpcb[0] * 2. - dcop[0];
1786 gMC->Gspos("IEL2", 4, "IDV2", xpos, ypos, zpos, 0, "ONLY");
1790 xpos = dbox2[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0];
1791 gMC->Gspos("IEL3", 4, "IDV2", xpos, ypos, zpos, 0, "ONLY");
1793 // --- Silicon (bus)
1795 xpos = dbox2[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0];
1796 gMC->Gspos("IEL4", 4, "IDV2", xpos, ypos, zpos, 0, "ONLY");
1798 //--- Place the ghost volumes containing the drift ladders of layer #3 in their
1799 // mother volume (IT34)
1800 // Odd elements have large ribs and even elements have small ribs
1802 for (i = 1; i <= 12; ++i) {
1803 atheta = (i-1) * 30.;
1804 AliMatrix(idrotm[i+1299], 90., atheta, 90., atheta + 90., 0.,0.);
1807 xpos = rzero * TMath::Cos((i-1) * twopi / 12.);
1808 ypos = rzero * TMath::Sin((i-1) * twopi / 12.);
1810 gMC->Gspos("IDV1", i, "IT34", xpos, ypos, zpos, idrotm[i+1299], "ONLY");
1813 xpos = rzero * TMath::Cos((i-1) * twopi / 12.);
1814 ypos = rzero * TMath::Sin((i-1) * twopi / 12.);
1816 gMC->Gspos("IDV2", i, "IT34", xpos, ypos, zpos, idrotm[i+1299], "ONLY");
1823 // GOTO 4567 ! skip ITS layer no. 4
1825 //--- Define a ghost volume containing a single ladder of layer #4 (with the
1826 // smaller lenght of ribs) and fill it with air or vacuum
1828 dbox1[0] = 0.5+(0.0172+0.03+0.0252+0.04+0.003);
1830 // the widest element is the end-ladder stuff
1831 dbox1[2] = (8.7*7.-2.*0.7-2.*1.3)/2.+2.*7.5;
1832 // 7.5 cm is the lenght
1833 gMC->Gsvolu("IDV3", "BOX ", idtmed[228], dbox1, 3);
1835 // --- Make the ghost volume invisible
1837 gMC->Gsatt("IDV3", "SEEN", 0);
1839 // --- Define a volume containing the sensitive part of drifts
1840 // (silicon, layer #4)
1843 // see material budget report by G. Feofilov
1846 gMC->Gsvolu("ITS4", "BOX ", idtmed[224], dits, 3);
1848 //--- Define the part of the (smaller) rib between two sensitive parts made of
1849 // carbon (layer #4)
1851 dsup[0] = .5 - dits[0];
1853 dsup[2] = (8.7*7.-2.*0.7-2.*1.3)/2.+2.*7.5;
1854 // 7.5 cm is the lengh
1855 gMC->Gsvolu("IR31", "BOX ", idtmed[227], dsup, 3);
1857 //--- Define the first part of the (smaller) rib between two sensitive parts
1858 // made of aluminum (layer #4)
1860 dal1[0] = .5 - dits[0];
1861 dal1[1] = 0.00096/2.;
1862 dal1[2] = (8.7*7.-2.*0.7-2.*1.3)/2.+2.*7.5;
1863 // 7.5 cm is the lengh
1864 gMC->Gsvolu("IR32", "BOX ", idtmed[230], dal1, 3);
1866 //--- Define the part of the (smaller) rib between two sensitive parts made of
1867 // kapton (layer #4)
1869 dkap[0] = .5 - dits[0];
1870 dkap[1] = 0.0317/2.;
1871 dkap[2] = (8.7*7.-2.*0.7-2.*1.3)/2.+2.*7.5;
1872 // 7.5 cm is the lengh
1873 gMC->Gsvolu("IR33", "BOX ", idtmed[236], dkap, 3);
1875 //--- Define the second part of the (smaller) rib between two sensitive parts
1876 // made of aluminum (layer #4)
1878 dal2[0] = .5 - dits[0];
1879 dal2[1] = 0.0027/2.;
1880 dal2[2] = (8.7*7.-2.*0.7-2.*1.3)/2.+2.*7.5;
1881 // 7.5 cm is the lengh
1882 gMC->Gsvolu("IR34", "BOX ", idtmed[230], dal2, 3);
1884 // --- Define the part of the (smaller) rib between two sensitive parts
1885 // made of silicon (the electronics) (layer #4)
1887 dchi[0] = .5 - dits[0];
1888 dchi[1] = 0.0071/2.;
1889 dchi[2] = (8.7*7.-2.*0.7-2.*1.3)/2.+2.*7.5;
1890 // 7.5 cm is the lengh
1891 gMC->Gsvolu("IR35", "BOX ", idtmed[225], dal2, 3);
1893 // --- Define the part of the (smaller) rib between two sensitive parts
1894 // made of water (the cooler) (layer #4)
1896 dwat[0] = .5 - dits[0];
1897 dwat[1] = 0.0093/2.;
1898 dwat[2] = (8.7*7.-2.*0.7-2.*1.3)/2.+2.*7.5;
1899 // 7.5 cm is the lenght
1900 gMC->Gsvolu("IR36", "BOX ", idtmed[231], dwat, 3);
1902 //--- Define the third part of the (smaller) rib between two sensitive parts
1903 // made of aluminum (the cooling tubes) (layer #4)
1905 dtub[0] = .5 - dits[0];
1906 dtub[1] = 0.00134/2.;
1907 dtub[2] = (8.7*7.-2.*0.7-2.*1.3)/2.+2.*7.5;
1908 // 7.5 cm is the lengh
1909 gMC->Gsvolu("IR37", "BOX ", idtmed[230], dtub, 3);
1911 // --- Define the part of the end-ladder stuff made of PCB (layer #4)
1914 // twice the foreseen thickness
1917 gMC->Gsvolu("IEL5", "BOX ", idtmed[233], dpcb, 3);
1919 // --- Define the part of the end-ladder stuff made of copper (layer #4)
1922 // twice the foreseen thickness
1925 gMC->Gsvolu("IEL6", "BOX ", idtmed[234], dcop, 3);
1927 // --- Define the part of the end-ladder stuff made of ceramics (layer #4)
1930 // twice the foreseen thickness
1933 gMC->Gsvolu("IEL7", "BOX ", idtmed[235], dcer, 3);
1935 // --- Define the part of the end-ladder stuff made of silicon (layer #4)
1938 // twice the foreseen thickness
1941 gMC->Gsvolu("IEL8", "BOX ", idtmed[226], dsil, 3);
1943 //--- Place the sensitive part of the drifts (smaller ribs) into its mother
1947 for (j = 1; j <= 7; ++j) {
1948 // odd elements are down and even elements are up
1950 xpos = dbox1[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0] * 2. - dits[0];
1951 zpos = 0. - dits[2] + .7 - dits[2] * 2. + 0. - dits[2] * 2. + 1.3 - dits[2];
1952 } else if (j == 2) {
1953 xpos = -dbox1[0] + dits[0];
1954 zpos = 0. - dits[2] + .7 - dits[2] * 2. + 0. - dits[2];
1955 } else if (j == 3) {
1956 xpos = dbox1[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0] * 2. - dits[0];
1957 zpos = 0. - dits[2] + .7 - dits[2];
1958 } else if (j == 4) {
1959 xpos = -dbox1[0] + dits[0];
1961 } else if (j == 5) {
1962 xpos = dbox1[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0] * 2. - dits[0];
1963 zpos = dits[2] + 0. - .7 + dits[2];
1964 } else if (j == 6) {
1965 xpos = -dbox1[0] + dits[0];
1966 zpos = dits[2] + 0. - .7 + dits[2] * 2. + 0. + dits[2];
1967 } else if (j == 7) {
1968 xpos = dbox1[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0] * 2. - dits[0];
1969 zpos = dits[2] + 0. - .7 + dits[2] * 2. + 0. + dits[2] * 2. - 1.3 + dits[2];
1971 gMC->Gspos("ITS4", j, "IDV3", xpos, ypos, zpos, 0, "ONLY");
1974 // --- Place the smaller ribs into their mother (IDV3)
1976 // --- Right ribs (just a matter of convention)
1978 xpos = .5 - dbox1[0] + dits[0];
1984 gMC->Gspos("IR31", 1, "IDV3", xpos, ypos, zpos, 0, "ONLY");
1988 ypos = dsup[1] + 2.81 + dal1[1];
1989 gMC->Gspos("IR32", 1, "IDV3", xpos, ypos, zpos, 0, "ONLY");
1993 ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1];
1994 gMC->Gspos("IR33", 1, "IDV3", xpos, ypos, zpos, 0, "ONLY");
1998 ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1];
1999 gMC->Gspos("IR34", 1, "IDV3", xpos, ypos, zpos, 0, "ONLY");
2001 // --- Silicon (chip)
2003 ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1];
2004 gMC->Gspos("IR35", 1, "IDV3", xpos, ypos, zpos, 0, "ONLY");
2008 ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1] * 2. + dwat[1];
2009 gMC->Gspos("IR36", 1, "IDV3", xpos, ypos, zpos, 0, "ONLY");
2013 ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1] * 2. + dwat[1] * 2.
2015 gMC->Gspos("IR37", 1, "IDV3", xpos, ypos, zpos, 0, "ONLY");
2017 // --- Right ribs (just a matter of convention)
2022 gMC->Gspos("IR31", 2, "IDV3", xpos, ypos, zpos, 0, "ONLY");
2026 ypos = -(dsup[1] + 2.81 + dal1[1]);
2027 gMC->Gspos("IR32", 2, "IDV3", xpos, ypos, zpos, 0, "ONLY");
2031 ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1]);
2032 gMC->Gspos("IR33", 2, "IDV3", xpos, ypos, zpos, 0, "ONLY");
2036 ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] *
2038 gMC->Gspos("IR34", 2, "IDV3", xpos, ypos, zpos, 0, "ONLY");
2040 // --- Silicon (chip)
2042 ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] *
2043 2. + dal2[1] * 2. + dchi[1]);
2044 gMC->Gspos("IR35", 2, "IDV3", xpos, ypos, zpos, 0, "ONLY");
2048 ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] *
2049 2. + dal2[1] * 2. + dchi[1] * 2. + dwat[1]);
2050 gMC->Gspos("IR36", 2, "IDV3", xpos, ypos, zpos, 0, "ONLY");
2054 ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] *
2055 2. + dal2[1] * 2. + dchi[1] * 2. + dwat[1] *
2057 gMC->Gspos("IR37", 2, "IDV3", xpos, ypos, zpos, 0, "ONLY");
2059 // --- Place the end-ladder stuff into its mother (IDV1)
2062 // --- Negative-Z end-ladder
2065 zpos = -(8.7*7.-2.*0.7-2.*1.3)/2.-7.5;
2069 xpos = dbox1[0] - dpcb[0];
2070 gMC->Gspos("IEL5", 1, "IDV3", xpos, ypos, zpos, 0, "ONLY");
2074 xpos = dbox1[0] - dpcb[0] * 2. - dcop[0];
2075 gMC->Gspos("IEL6", 1, "IDV3", xpos, ypos, zpos, 0, "ONLY");
2079 xpos = dbox1[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0];
2080 gMC->Gspos("IEL7", 1, "IDV3", xpos, ypos, zpos, 0, "ONLY");
2082 // --- Silicon (bus)
2084 xpos = dbox1[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0];
2085 gMC->Gspos("IEL8", 1, "IDV3", xpos, ypos, zpos, 0, "ONLY");
2087 // --- Positive-Z end-ladder
2090 zpos = (8.7*7.-2.*0.7-2.*1.3)/2.-7.5;
2094 xpos = dbox1[0] - dpcb[0];
2095 gMC->Gspos("IEL5", 2, "IDV3", xpos, ypos, zpos, 0, "ONLY");
2099 xpos = dbox1[0] - dpcb[0] * 2. - dcop[0];
2100 gMC->Gspos("IEL6", 2, "IDV3", xpos, ypos, zpos, 0, "ONLY");
2104 xpos = dbox1[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0];
2105 gMC->Gspos("IEL7", 2, "IDV3", xpos, ypos, zpos, 0, "ONLY");
2107 // --- Silicon (bus)
2109 xpos = dbox1[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0];
2110 gMC->Gspos("IEL8", 2, "IDV3", xpos, ypos, zpos, 0, "ONLY");
2112 //--- Define a ghost volume containing a single ladder of layer #4 (with the
2113 // larger lenght of ribs) and fill it with air or vacuum
2115 dbox2[0] = 0.65+(0.0172+0.03+0.0252+0.04+0.003);
2117 // the widest element is the end-ladder stuff
2118 dbox2[2] = (8.7*7.-2.*0.7-2.*1.3)/2.+2.*7.5;
2119 // 7.5 cm is the lenght
2120 gMC->Gsvolu("IDV4", "BOX ", idtmed[228], dbox2, 3);
2122 // --- Make the ghost volume invisible
2124 gMC->Gsatt("IDV4", "SEEN", 0);
2126 //--- Define the part of the (larger) rib between two sensitive parts madeof
2127 // carbon (layer #4)
2129 dsup[0] = .65 - dits[0];
2131 dsup[2] = (8.7*7.-2.*0.7-2.*1.3)/2.+2.*7.5;
2132 // 7.5 cm is the lengh
2133 gMC->Gsvolu("IR41", "BOX ", idtmed[227], dsup, 3);
2135 //--- Define the first part of the (larger) rib between two sensitive parts
2136 // made of aluminum (layer #4)
2138 dal1[0] = .65 - dits[0];
2139 dal1[1] = 0.00096/2.;
2140 dal1[2] = (8.7*7.-2.*0.7-2.*1.3)/2.+2.*7.5;
2141 // 7.5 cm is the lengh
2142 gMC->Gsvolu("IR42", "BOX ", idtmed[230], dal1, 3);
2144 //--- Define the part of the (larger) rib between two sensitive parts madeof
2145 // kapton (layer #4)
2147 dkap[0] = .65 - dits[0];
2148 dkap[1] = 0.0317/2.;
2149 dkap[2] = (8.7*7.-2.*0.7-2.*1.3)/2.+2.*7.5;
2150 // 7.5 cm is the lengh
2151 gMC->Gsvolu("IR43", "BOX ", idtmed[236], dkap, 3);
2153 //--- Define the second part of the (larger) rib between two sensitive parts
2154 // made of aluminum (layer #4)
2156 dal2[0] = .65 - dits[0];
2157 dal2[1] = 0.0027/2.;
2158 dal2[2] = (8.7*7.-2.*0.7-2.*1.3)/2.+2.*7.5;
2159 // 7.5 cm is the lengh
2160 gMC->Gsvolu("IR44", "BOX ", idtmed[230], dal2, 3);
2162 // --- Define the part of the (larger) rib between two sensitive parts
2163 // made of silicon (the electronics) (layer #4)
2165 dchi[0] = .65 - dits[0];
2166 dchi[1] = 0.0071/2.;
2167 dchi[2] = (8.7*7.-2.*0.7-2.*1.3)/2.+2.*7.5;
2168 // 7.5 cm is the lengh
2169 gMC->Gsvolu("IR45", "BOX ", idtmed[225], dal2, 3);
2171 // --- Define the part of the (larger) rib between two sensitive parts
2172 // made of water (the cooler) (layer #4)
2174 dwat[0] = .65 - dits[0];
2175 dwat[1] = 0.0093/2.;
2176 dwat[2] = (8.7*7.-2.*0.7-2.*1.3)/2.+2.*7.5;
2177 // 7.5 cm is the lengh
2178 gMC->Gsvolu("IR46", "BOX ", idtmed[231], dwat, 3);
2180 //--- Define the third part of the (larger) rib between two sensitive parts
2181 // made of aluminum (the cooling tubes) (layer #4)
2183 dtub[0] = .65 - dits[0];
2184 dtub[1] = 0.00134/2.;
2185 dtub[2] = (8.7*7.-2.*0.7-2.*1.3)/2.+2.*7.5;
2186 // 7.5 cm is the lengh
2187 gMC->Gsvolu("IR47", "BOX ", idtmed[230], dtub, 3);
2189 //--- Place the sensitive part of the drifts (smaller ribs) into its mother
2193 for (j = 1; j <= 7; ++j) {
2194 // odd elements are down and even elements are up
2196 xpos = dbox2[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0] * 2. - dits[0];
2197 zpos = 0. - dits[2] + .7 - dits[2] * 2. + 0. - dits[2] * 2. + 1.3 - dits[2];
2198 } else if (j == 2) {
2199 xpos = -dbox2[0] + dits[0];
2200 zpos = 0. - dits[2] + .7 - dits[2] * 2. + 0. - dits[2];
2201 } else if (j == 3) {
2202 xpos = dbox2[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0] * 2. - dits[0];
2203 zpos = 0. - dits[2] + .7 - dits[2];
2204 } else if (j == 4) {
2205 xpos = -dbox2[0] + dits[0];
2207 } else if (j == 5) {
2208 xpos = dbox2[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0] * 2. - dits[0];
2209 zpos = dits[2] + 0. - .7 + dits[2];
2210 } else if (j == 6) {
2211 xpos = -dbox2[0] + dits[0];
2212 zpos = dits[2] + 0. - .7 + dits[2] * 2. + 0. + dits[2];
2213 } else if (j == 7) {
2214 xpos = dbox2[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0] * 2. - dits[0];
2215 zpos = dits[2] + 0. - .7 + dits[2] * 2. + 0. + dits[2] * 2. - 1.3 + dits[2];
2217 gMC->Gspos("ITS4", j, "IDV4", xpos, ypos, zpos, 0, "ONLY");
2220 // --- Place the larger ribs into their mother (IDV4)
2223 // --- Right ribs (just a matter of convention)
2225 xpos = .65 - dbox2[0] + dits[0];
2231 gMC->Gspos("IR41", 1, "IDV4", xpos, ypos, zpos, 0, "ONLY");
2235 ypos = dsup[1] + 2.81 + dal1[1];
2236 gMC->Gspos("IR42", 1, "IDV4", xpos, ypos, zpos, 0, "ONLY");
2240 ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1];
2241 gMC->Gspos("IR43", 1, "IDV4", xpos, ypos, zpos, 0, "ONLY");
2245 ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1];
2246 gMC->Gspos("IR44", 1, "IDV4", xpos, ypos, zpos, 0, "ONLY");
2248 // --- Silicon (chip)
2250 ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1];
2251 gMC->Gspos("IR45", 1, "IDV4", xpos, ypos, zpos, 0, "ONLY");
2255 ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1] * 2. + dwat[1];
2256 gMC->Gspos("IR46", 1, "IDV4", xpos, ypos, zpos, 0, "ONLY");
2260 ypos = dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] * 2. + dal2[1] * 2. + dchi[1] * 2. + dwat[1] * 2.
2262 gMC->Gspos("IR47", 1, "IDV4", xpos, ypos, zpos, 0, "ONLY");
2264 // --- Right ribs (just a matter of convention)
2269 gMC->Gspos("IR41", 2, "IDV4", xpos, ypos, zpos, 0, "ONLY");
2273 ypos = -(dsup[1] + 2.81 + dal1[1]);
2274 gMC->Gspos("IR42", 2, "IDV4", xpos, ypos, zpos, 0, "ONLY");
2278 ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1]);
2279 gMC->Gspos("IR43", 2, "IDV4", xpos, ypos, zpos, 0, "ONLY");
2283 ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] *
2285 gMC->Gspos("IR44", 2, "IDV4", xpos, ypos, zpos, 0, "ONLY");
2287 // --- Silicon (chip)
2289 ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] *
2290 2. + dal2[1] * 2. + dchi[1]);
2291 gMC->Gspos("IR45", 2, "IDV4", xpos, ypos, zpos, 0, "ONLY");
2295 ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] *
2296 2. + dal2[1] * 2. + dchi[1] * 2. + dwat[1]);
2297 gMC->Gspos("IR46", 2, "IDV4", xpos, ypos, zpos, 0, "ONLY");
2301 ypos = -(dsup[1] + 2.81 + dal1[1] * 2. + dkap[1] *
2302 2. + dal2[1] * 2. + dchi[1] * 2. + dwat[1] * 2. + dtub[1]);
2303 gMC->Gspos("IR47", 2, "IDV4", xpos, ypos, zpos, 0, "ONLY");
2305 // --- Place the end-ladder stuff into its mother (IDV1)
2308 // --- Negative-Z end-ladder
2311 zpos = -(8.7*7.-2.*0.7-2.*1.3)/2.-7.5;
2315 xpos = dbox2[0] - dpcb[0];
2316 gMC->Gspos("IEL5", 3, "IDV4", xpos, ypos, zpos, 0, "ONLY");
2320 xpos = dbox2[0] - dpcb[0] * 2. - dcop[0];
2321 gMC->Gspos("IEL6", 3, "IDV4", xpos, ypos, zpos, 0, "ONLY");
2325 xpos = dbox2[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0];
2326 gMC->Gspos("IEL7", 3, "IDV4", xpos, ypos, zpos, 0, "ONLY");
2328 // --- Silicon (bus)
2330 xpos = dbox2[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0];
2331 gMC->Gspos("IEL8", 3, "IDV4", xpos, ypos, zpos, 0, "ONLY");
2333 // --- Positive-Z end-ladder
2336 zpos = (8.7*7.-2.*0.7-2.*1.3)/2.-7.5;
2340 xpos = dbox2[0] - dpcb[0];
2341 gMC->Gspos("IEL5", 4, "IDV4", xpos, ypos, zpos, 0, "ONLY");
2345 xpos = dbox2[0] - dpcb[0] * 2. - dcop[0];
2346 gMC->Gspos("IEL6", 4, "IDV4", xpos, ypos, zpos, 0, "ONLY");
2350 xpos = dbox2[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0];
2351 gMC->Gspos("IEL7", 4, "IDV4", xpos, ypos, zpos, 0, "ONLY");
2353 // --- Silicon (bus)
2355 xpos = dbox2[0] - dpcb[0] * 2. - dcop[0] * 2. - dcer[0] * 2. - dsil[0];
2356 gMC->Gspos("IEL8", 4, "IDV4", xpos, ypos, zpos, 0, "ONLY");
2358 //--- Place the ghost volumes containing the drift ladders of layer #4 in their
2359 // mother volume (IT34)
2360 // Odd elements have large ribs and even elements have small ribs
2362 for (i = 1; i <= 24; ++i) {
2363 atheta = (i-1) * 15.;
2364 AliMatrix(idrotm[i+1399], 90., atheta, 90., atheta + 90., 0.,0.);
2367 xpos = rzero * TMath::Cos((i-1) * twopi / 24.);
2368 ypos = rzero * TMath::Sin((i-1) * twopi / 24.);
2370 gMC->Gspos("IDV3", i, "IT34", xpos, ypos, zpos, idrotm[i+1399], "ONLY");
2372 rzero = (24.0+22.8)/2.;
2373 xpos = rzero * TMath::Cos((i-1) * twopi / 24.);
2374 ypos = rzero * TMath::Sin((i-1) * twopi / 24.);
2376 gMC->Gspos("IDV4", i, "IT34", xpos, ypos, zpos, idrotm[i+1399], "ONLY");
2380 //************************************************************************
2385 //************************************************************************
2387 // --- Define SSD with the 35+39 lay-out
2389 if (fMinorVersionV3 < 3) {
2391 //--- Define ghost volume containing the Strip Detectors and fill it with air
2394 xxm = (49.999-3.)/(70.-25.);
2398 dgh[3] = -25.-(9.-3.01)/xxm-(9.01-9.)/xxm-(27.-9.01)/xxm-
2399 (37.-27)/xxm-(49.998-37.)/xxm;
2402 dgh[6] = -25.-(9.-3.01)/xxm-(9.01-9.)/xxm-(27.-9.01)/xxm-
2406 dgh[9] = 25.+(9.-3.01)/xxm+(9.01-9.)/xxm+(27.-9.01)/xxm+
2410 dgh[12] = 25.+(9.-3.01)/xxm+(9.01-9.)/xxm+(27.-9.01)/xxm+
2411 (37.-27)/xxm+(49.998-37.)/xxm;
2414 gMC->Gsvolu("IT56", "PCON", idtmed[275], dgh, 15);
2415 gMC->Gspos("IT56", 1, "ITSV", 0., 0., 0., 0, "ONLY");
2416 gMC->Gsatt("IT56", "SEEN", 0);
2420 // GOTO 5678 ! skip ITS layer no. 5
2422 //--- Define a ghost volume containing a single ladder of layer #5 andfill
2423 // it with air or vacuum
2425 dbox1[0] = (0.0600+2.*0.0150)/2.;
2427 dbox1[2] = 90.22/2.;
2428 gMC->Gsvolu("ISV1", "BOX ", idtmed[253], dbox1, 3);
2430 // --- Make the ghost volume invisible
2432 gMC->Gsatt("ISV1", "SEEN", 0);
2434 // --- Define a ghost volume containing the electronics and cooling of
2435 // a single ladder of layer #5 and fill it with air or vacuum
2437 dsrv[0] = (TMath::Sqrt(3.) / 2. * 4.2 + .47 + .05) / 2.;
2440 gMC->Gsvolu("SSV1", "BOX ", idtmed[253], dsrv, 3);
2442 // --- Make the ghost volume invisible
2444 gMC->Gsatt("SSV1", "SEEN", 0);
2446 // --- Define a ghost volume containing the end-ladder stuff of
2447 // a single ladder of layer #5 and fill it with air or vacuum
2452 gMC->Gsvolu("ELL5", "BOX ", idtmed[253], dela, 3);
2454 // --- Make the ghost volume invisible
2456 gMC->Gsatt("ELL5", "SEEN", 0);
2458 // --- Define a volume containing the sensitive part of the strips
2459 // (silicon, layer #5)
2464 gMC->Gsvolu("ITS5", "BOX ", idtmed[249], dits, 3);
2466 // --- Define a volume containing the electronics of the strips
2467 // (silicon, layer #5)
2472 gMC->Gsvolu("SCH5", "BOX ", idtmed[250], dchi, 3);
2474 // --- Define the cooling tubes (aluminum, layer #5)
2477 dtub[1] = dtub[0] + .01;
2479 gMC->Gsvolu("STB5", "TUBE", idtmed[255], dtub, 3);
2481 // --- Define the cooling fluid (water or freon, layer #5)
2486 gMC->Gsvolu("SWT5", "TUBE", idtmed[256], dwat, 3);
2487 // CALL GSVOLU('SWT5','TUBE',IDTMED(258),DWAT,3,IOUT) ! freon
2489 //--- Define the (triangular) element of the heat bridge (carbon, layer #5)
2497 dfra[5] = TMath::Sqrt(3.) * 4.2 / 6.;
2498 dfra[6] = dfra[5] + .03;
2502 gMC->Gsvolu("SFR5", "PGON", idtmed[252], dfra, 10);
2504 // --- Define the element connecting the triangles of the heat bridge
2505 // (carbon, layer #5)
2510 gMC->Gsvolu("SCE5", "TUBE", idtmed[252], dcei, 3);
2512 // --- Define the part of the end-ladder stuff made of plastic (G10FR4)
2515 dpla[0] = (10./(8.*7.))/2.;
2518 gMC->Gsvolu("EPL5", "BOX ", idtmed[262], dpla, 3);
2520 // --- Define the part of the end-ladder stuff made of copper (layer #5)
2522 dcop[0] = (2./(8.*7.))/2.;
2525 gMC->Gsvolu("ECU5", "BOX ", idtmed[259], dcop, 3);
2527 // --- Define the part of the end-ladder stuff made of epoxy (layer #5)
2529 depx[0] = (30./(8.*7.))/2.;
2532 gMC->Gsvolu("EPX5", "BOX ", idtmed[262], depx, 3);
2534 // --- Define the part of the end-ladder stuff made of silicon (bus)
2537 dsil[0] = (20./(8.*7.))/2.;
2540 gMC->Gsvolu("ESI5", "BOX ", idtmed[251], dsil, 3);
2542 // --- Place the end-ladder stuff into its mother (ELL5)
2544 sep = (4. - (dpla[0] + dcop[0] + depx[0] + dsil[0]) * 2.) / 3.;
2550 xpos = -dela[0] + dpla[0];
2551 gMC->Gspos("EPL5", 1, "ELL5", xpos, ypos, zpos, 0, "ONLY");
2555 xpos = -dela[0] + dpla[0] * 2. + sep + dcop[0];
2556 gMC->Gspos("ECU5", 1, "ELL5", xpos, ypos, zpos, 0, "ONLY");
2560 xpos = -dela[0] + dpla[0] * 2. + sep + dcop[0] * 2. + sep + depx[0];
2561 gMC->Gspos("EPX5", 1, "ELL5", xpos, ypos, zpos, 0, "ONLY");
2563 // --- Silicon (bus)
2565 xpos = -dela[0] + dpla[0] * 2. + sep + dcop[0] * 2. + sep + depx[0] * 2. + sep + dsil[0];
2566 gMC->Gspos("ESI5", 1, "ELL5", xpos, ypos, zpos, 0, "ONLY");
2568 // --- Place the sensitive part of the strips into its mother (ISV1)
2571 for (j = 1; j <= 23; ++j) {
2572 if (j % 2 == 0) xpos = dbox1[0] - dits[0];
2573 else xpos = -dbox1[0] + dits[0];
2574 zpos = ((j - 1) - 11.) * 3.91;
2575 gMC->Gspos("ITS5", j, "ISV1", xpos, ypos, zpos, 0, "ONLY");
2578 // --- Place the electronics of the strips into its mother (SSV1)
2581 for (j = 1; j <= 23; ++j) {
2582 if (j % 2 == 0) xpos = -dsrv[0] + .28;
2583 else xpos = -dsrv[0] + .28 - dits[0] * 2. - .03;
2584 zpos = ((j - 1) - 11.) * 3.91 + .85;
2585 gMC->Gspos("SCH5", j, "SSV1", xpos, ypos, zpos, 0, "ONLY");
2588 //--- Place the cooling tubes and the cooling fluid into their mother (SSV1)
2590 xpos = -dsrv[0] + .41;
2593 // --- Left tube (just a matter of convention)
2596 gMC->Gspos("STB5", 1, "SSV1", xpos, ypos, zpos, 0, "ONLY");
2597 gMC->Gspos("SWT5", 1, "SSV1", xpos, ypos, zpos, 0, "ONLY");
2599 // --- Right tube (just a matter of convention)
2602 gMC->Gspos("STB5", 2, "SSV1", xpos, ypos, zpos, 0, "ONLY");
2603 gMC->Gspos("SWT5", 2, "SSV1", xpos, ypos, zpos, 0, "ONLY");
2605 // --- Place the heat bridge elements into their mother (SSV1)
2607 xpos = -dsrv[0] + .47 + TMath::Sqrt(3.) / 6. * 4.2;
2609 for (j = 1; j <= 23; ++j) { // Loop was to 24. Changed to 23 to fit inside
2610 // volume SSV1. This is the same number of
2611 // elements as SCH5 above. Done Bjorn S. Nilsen
2612 // April 4 2000. Error found by Ivana
2613 // Hrivnacova March 29 2000.
2614 zpos = ((j - 1) - 11.) * 3.91 - -4.2/2.;
2615 gMC->Gspos("SFR5", j, "SSV1", xpos, ypos, zpos, 0, "ONLY");
2618 // --- Place the elements connecting the triangles of the heat bridge
2619 // into their mother (SSV1)
2623 // --- Left element (just a matter of convention)
2625 xpos = -dsrv[0] + .47;
2626 ypos = -(2.1+0.015);
2627 gMC->Gspos("SCE5", 1, "SSV1", xpos, ypos, zpos, 0, "ONLY");
2629 // --- Right element
2631 xpos = -dsrv[0] + .47;
2633 gMC->Gspos("SCE5", 2, "SSV1", xpos, ypos, zpos, 0, "ONLY");
2637 xpos = -dsrv[0] + .47 + TMath::Sqrt(3.) / 2. * 4.2 + .015;
2639 gMC->Gspos("SCE5", 3, "SSV1", xpos, ypos, zpos, 0, "ONLY");
2641 // --- Place the ghost volumes containing the strip ladders (ISV1),
2642 // electronics/cooling (SSV1) and end-ladder stuff (ELL5) of layer #5 in
2643 // their mother volume (IT56)
2645 offset1 = TMath::ATan2(.9, 40.);
2647 rzero = dbox1[0] + 40.;
2648 runo = dbox1[0] * 2. + 40. + dsrv[0];
2649 rtwo = dbox1[0] * 2. + 40. + dela[0];
2650 for (i = 1; i <= 35; ++i) {
2651 atheta = (i-1) * twopi * raddeg / 35. + offset2;
2652 AliMatrix(idrotm[i+1499], 90., atheta, 90., atheta + 90., 0., 0.);
2654 // --- Strip ladders
2656 xpos = rzero * TMath::Cos((i-1) * twopi / 35. + offset1);
2657 ypos = rzero * TMath::Sin((i-1) * twopi / 35. + offset1);
2659 gMC->Gspos("ISV1", i, "IT56", xpos, ypos, zpos, idrotm[i+1499], "ONLY");
2661 // --- Electronics/cooling
2663 xpos = runo * TMath::Cos((i-1) * twopi / 35. + offset1);
2664 ypos = runo * TMath::Sin((i-1) * twopi / 35. + offset1);
2666 gMC->Gspos("SSV1", i, "IT56", xpos, ypos, zpos, idrotm[i+1499], "ONLY");
2668 // --- End-ladders (nagative-Z and positive-Z)
2670 xpos = rtwo * TMath::Cos((i-1) * twopi / 35. + offset1);
2671 ypos = rtwo * TMath::Sin((i-1) * twopi / 35. + offset1);
2672 zpos = -(dbox1[2] + dela[2] + 6.);
2673 gMC->Gspos("ELL5", i, "IT56", xpos, ypos, zpos, idrotm[i+1499], "ONLY");
2674 zpos = dbox1[2] + dela[2] + 6.;
2675 gMC->Gspos("ELL5", i + 35, "IT56", xpos, ypos, zpos, idrotm[i+1499], "ONLY");
2681 // GOTO 5778 ! skip ITS layer no. 6
2683 //--- Define a ghost volume containing a single ladder of layer #6 andfill
2684 // it with air or vacuum
2686 dbox2[0] = (0.0600+2.*0.0150)/2.;
2688 dbox2[2] = 101.95/2.;
2689 gMC->Gsvolu("ISV2", "BOX ", idtmed[253], dbox2, 3);
2691 // --- Make the ghost volume invisible
2693 gMC->Gsatt("ISV2", "SEEN", 0);
2695 // --- Define a ghost volume containing the electronics and cooling of
2696 // a single ladder of layer #6 and fill it with air or vacuum
2698 dsrv[0] = (TMath::Sqrt(3.) / 2. * 4.2 + .47 + .05) / 2.;
2700 dsrv[2] = 101.95/2.;
2701 gMC->Gsvolu("SSV2", "BOX ", idtmed[253], dsrv, 3);
2703 // --- Make the ghost volume invisible
2705 gMC->Gsatt("SSV2", "SEEN", 0);
2707 // --- Define a ghost volume containing the end-ladder stuff of
2708 // a single ladder of layer #6 and fill it with air or vacuum
2713 gMC->Gsvolu("ELL6", "BOX ", idtmed[253], dela, 3);
2715 // --- Make the ghost volume invisible
2717 gMC->Gsatt("ELL6", "SEEN", 0);
2719 // --- Define a volume containing the sensitive part of the strips
2720 // (silicon, layer #6)
2725 gMC->Gsvolu("ITS6", "BOX ", idtmed[249], dits, 3);
2727 // --- Define a volume containing the electronics of the strips
2728 // (silicon, layer #6)
2733 gMC->Gsvolu("SCH6", "BOX ", idtmed[250], dchi, 3);
2735 // --- Define the cooling tubes (aluminum, layer #6)
2738 dtub[1] = dtub[0] + .01;
2739 dtub[2] = 101.95/2.;
2740 gMC->Gsvolu("STB6", "TUBE", idtmed[255], dtub, 3);
2742 // --- Define the cooling fluid (water or freon, layer #6)
2746 dwat[2] = 101.95/2.;
2747 gMC->Gsvolu("SWT6", "TUBE", idtmed[256], dwat, 3);
2748 // CALL GSVOLU('SWT6','TUBE',IDTMED(258),DWAT,3,IOUT) ! freon
2750 //--- Define the (triangular) element of the heat bridge (carbon, layer #6)
2758 dfra[5] = TMath::Sqrt(3.) * 4.2 / 6.;
2759 dfra[6] = dfra[5] + .03;
2763 gMC->Gsvolu("SFR6", "PGON", idtmed[252], dfra, 10);
2765 // --- Define the element connecting the triangles of the heat bridge
2766 // (carbon, layer #6)
2770 dcei[2] = 101.95/2.;
2771 gMC->Gsvolu("SCE6", "TUBE", idtmed[252], dcei, 3);
2773 // --- Define the part of the end-ladder stuff made of plastic (G10FR4)
2776 dpla[0] = (10./(8.*7.))/2.;
2779 gMC->Gsvolu("EPL6", "BOX ", idtmed[262], dpla, 3);
2781 // --- Define the part of the end-ladder stuff made of copper (layer #6)
2783 dcop[0] = (2./(8.*7.))/2.;
2786 gMC->Gsvolu("ECU6", "BOX ", idtmed[259], dcop, 3);
2788 // --- Define the part of the end-ladder stuff made of epoxy (layer #6)
2790 depx[0] = (30./(8.*7.))/2.;
2793 gMC->Gsvolu("EPX6", "BOX ", idtmed[262], depx, 3);
2795 // --- Define the part of the end-ladder stuff made of silicon (bus)
2798 dsil[0] = (20./(8.*7.))/2.;
2801 gMC->Gsvolu("ESI6", "BOX ", idtmed[251], dsil, 3);
2803 // --- Place the end-ladder stuff into its mother (ELL5)
2805 sep = (4. - (dpla[0] + dcop[0] + depx[0] + dsil[0]) * 2.) / 3.;
2811 xpos = -dela[0] + dpla[0];
2812 gMC->Gspos("EPL6", 1, "ELL6", xpos, ypos, zpos, 0, "ONLY");
2816 xpos = -dela[0] + dpla[0] * 2. + sep + dcop[0];
2817 gMC->Gspos("ECU6", 1, "ELL6", xpos, ypos, zpos, 0, "ONLY");
2821 xpos = -dela[0] + dpla[0] * 2. + sep + dcop[0] * 2. + sep + depx[0];
2822 gMC->Gspos("EPX6", 1, "ELL6", xpos, ypos, zpos, 0, "ONLY");
2824 // --- Silicon (bus)
2826 xpos = -dela[0] + dpla[0] * 2. + sep + dcop[0] * 2. + sep + depx[0] * 2. + sep + dsil[0];
2827 gMC->Gspos("ESI6", 1, "ELL6", xpos, ypos, zpos, 0, "ONLY");
2829 // --- Place the sensitive part of the strips into its mother (ISV2)
2832 for (j = 1; j <= 26; ++j) {
2833 if (j % 2 == 0) xpos = dbox2[0] - dits[0];
2834 else xpos = -dbox2[0] + dits[0];
2835 zpos = ((j - 1) - 12.) * 3.91 - 1.96;
2836 gMC->Gspos("ITS6", j, "ISV2", xpos, ypos, zpos, 0, "ONLY");
2839 // --- Place the electronics of the strips into its mother (SSV2)
2842 for (j = 1; j <= 26; ++j) {
2843 if (j % 2 == 0) xpos = -dsrv[0] + .28;
2844 else xpos = -dsrv[0] + .28 - dits[0] * 2. - .03;
2845 zpos = ((j - 1) - 12.) * 3.91 - 1.96 + .85;
2846 gMC->Gspos("SCH5", j, "SSV2", xpos, ypos, zpos, 0, "ONLY");
2849 //--- Place the cooling tubes and the cooling fluid into their mother (SSV1)
2851 xpos = -dsrv[0] + .41;
2854 // --- Left tube (just a matter of convention)
2857 gMC->Gspos("STB6", 1, "SSV2", xpos, ypos, zpos, 0, "ONLY");
2858 gMC->Gspos("SWT6", 1, "SSV2", xpos, ypos, zpos, 0, "ONLY");
2860 // --- Right tube (just a matter of convention)
2863 gMC->Gspos("STB6", 2, "SSV2", xpos, ypos, zpos, 0, "ONLY");
2864 gMC->Gspos("SWT6", 2, "SSV2", xpos, ypos, zpos, 0, "ONLY");
2866 // --- Place the heat bridge elements into their mother (SSV2)
2868 xpos = -dsrv[0] + .47 + TMath::Sqrt(3.) / 6. * 4.2;
2870 for (j = 1; j <= 27; ++j) {
2871 zpos = ((j - 1) - 12.) * 3.91 - 1.96 - 4.2/2.;
2872 gMC->Gspos("SFR6", j, "SSV2", xpos, ypos, zpos, 0, "ONLY");
2875 // --- Place the elements connecting the triangles of the heat bridge
2876 // into their mother (SSV2)
2880 // --- Left element (just a matter of convention)
2882 xpos = -dsrv[0] + .47;
2883 ypos = -(2.1+0.015);
2884 gMC->Gspos("SCE6", 1, "SSV2", xpos, ypos, zpos, 0, "ONLY");
2886 // --- Right element
2888 xpos = -dsrv[0] + .47;
2890 gMC->Gspos("SCE6", 2, "SSV2", xpos, ypos, zpos, 0, "ONLY");
2894 xpos = -dsrv[0] + .47 + TMath::Sqrt(3.) / 2. * 4.2 + .015;
2896 gMC->Gspos("SCE6", 3, "SSV2", xpos, ypos, zpos, 0, "ONLY");
2898 // --- Place the ghost volumes containing the strip ladders (ISV2),
2899 // electronics/cooling (SSV2) and end-ladder stuff (ELL6) of layer #6 in
2900 // their mother volume (IT56)
2902 offset1 = TMath::ATan2(1., 45.);
2904 rzero = dbox2[0] + 45.;
2905 runo = dbox2[0] * 2. + 45. + dsrv[0];
2906 rtwo = dbox2[0] * 2. + 45. + dela[0];
2907 for (i = 1; i <= 39; ++i) {
2908 atheta = (i-1) * twopi * raddeg / 39. + offset2;
2909 AliMatrix(idrotm[i+1599], 90., atheta, 90., atheta + 90., 0., 0.);
2911 // --- Strip ladders
2913 xpos = rzero * TMath::Cos((i-1) * twopi / 39. + offset1);
2914 ypos = rzero * TMath::Sin((i-1) * twopi / 39. + offset1);
2916 gMC->Gspos("ISV2", i, "IT56", xpos, ypos, zpos, idrotm[i+1599], "ONLY");
2918 // --- Electronics/cooling
2920 xpos = runo * TMath::Cos((i-1) * twopi / 39. + offset1);
2921 ypos = runo * TMath::Sin((i-1) * twopi / 39. + offset1);
2923 gMC->Gspos("SSV2", i, "IT56", xpos, ypos, zpos, idrotm[i+1599], "ONLY");
2925 // --- End-ladders (nagative-Z and positive-Z)
2927 xpos = rtwo * TMath::Cos((i-1) * twopi / 39. + offset1);
2928 ypos = rtwo * TMath::Sin((i-1) * twopi / 39. + offset1);
2929 zpos = -(dbox2[2] + dela[2] + 6.);
2930 gMC->Gspos("ELL6", i, "IT56", xpos, ypos, zpos, idrotm[i+1599], "ONLY");
2931 zpos = dbox2[2] + dela[2] + 6.;
2932 gMC->Gspos("ELL6", i + 39, "IT56", xpos, ypos, zpos, idrotm[i+1599], "ONLY");
2937 // --- Define SSD with the 32+36 lay-out
2939 if (fMinorVersionV3 >2 && fMinorVersionV3 < 6) {
2941 //--- Define ghost volume containing the Strip Detectors and fill it with air
2944 xxm = (49.999-3.)/(70.-25.);
2948 dgh[3] = -25. - (9.-3.01) / xxm - (9.01-9.) / xxm -
2949 (27.-9.01) / xxm - (36.-27.) / xxm - (49.998-36.) / xxm;
2952 dgh[6] = -25. - (9.-3.01) / xxm -
2953 (9.01-9.) / xxm - (27.-9.01) / xxm - (36.-27.) / xxm;
2956 dgh[9] = (9.-3.01) / xxm + 25. +
2957 (9.01-9.) / xxm + (27.-9.01) / xxm + (36.-27.) / xxm;
2960 dgh[12] = (9.-3.01) / xxm + 25. + (9.01-9.) / xxm +
2961 (27.-9.01) / xxm + (36.-27.) / xxm + (49.998-36.) / xxm;
2964 gMC->Gsvolu("IT56", "PCON", idtmed[275], dgh, 15);
2965 gMC->Gspos("IT56", 1, "ITSV", 0., 0., 0., 0, "ONLY");
2966 gMC->Gsatt("IT56", "SEEN", 0);
2970 // GOTO 6678 ! skip ITS layer no. 5
2972 //--- Define a ghost volume containing a single ladder of layer #5 andfill
2973 // it with air or vacuum
2975 dbox1[0] = (0.0600+2.*0.0150)/2.;
2977 dbox1[2] = 86.31/2.;
2978 gMC->Gsvolu("ISV1", "BOX ", idtmed[253], dbox1, 3);
2980 // --- Make the ghost volume invisible
2982 gMC->Gsatt("ISV1", "SEEN", 0);
2984 // --- Define a ghost volume containing the electronics and cooling of
2985 // a single ladder of layer #5 and fill it with air or vacuum
2987 dsrv[0] = (TMath::Sqrt(3.) / 2. * 4.2 + .47 + .05) / 2.;
2990 gMC->Gsvolu("SSV1", "BOX ", idtmed[253], dsrv, 3);
2992 // --- Make the ghost volume invisible
2994 gMC->Gsatt("SSV1", "SEEN", 0);
2996 // --- Define a ghost volume containing the end-ladder stuff of
2997 // a single ladder of layer #5 and fill it with air or vacuum
3002 gMC->Gsvolu("ELL5", "BOX ", idtmed[253], dela, 3);
3004 // --- Make the ghost volume invisible
3006 gMC->Gsatt("ELL5", "SEEN", 0);
3008 // --- Define a volume containing the sensitive part of the strips
3009 // (silicon, layer #5)
3014 gMC->Gsvolu("ITS5", "BOX ", idtmed[249], dits, 3);
3016 // --- Define a volume containing the electronics of the strips
3017 // (silicon, layer #5)
3022 gMC->Gsvolu("SCH5", "BOX ", idtmed[250], dchi, 3);
3024 // --- Define the cooling tubes (aluminum, layer #5)
3027 dtub[1] = dtub[0] + .01;
3029 gMC->Gsvolu("STB5", "TUBE", idtmed[255], dtub, 3);
3031 // --- Define the cooling fluid (water or freon, layer #5)
3036 gMC->Gsvolu("SWT5", "TUBE", idtmed[256], dwat, 3);
3037 // CALL GSVOLU('SWT5','TUBE',IDTMED(258),DWAT,3,IOUT) ! freon
3039 //--- Define the (triangular) element of the heat bridge (carbon, layer #5)
3047 dfra[5] = TMath::Sqrt(3.) * 4.2 / 6.;
3048 dfra[6] = dfra[5] + .03;
3052 gMC->Gsvolu("SFR5", "PGON", idtmed[252], dfra, 10);
3054 // --- Define the element connecting the triangles of the heat bridge
3055 // (carbon, layer #5)
3060 gMC->Gsvolu("SCE5", "TUBE", idtmed[252], dcei, 3);
3062 // --- Define the part of the end-ladder stuff made of plastic (G10FR4)
3065 dpla[0] = (10./(8.*7.))/2;
3068 gMC->Gsvolu("EPL5", "BOX ", idtmed[262], dpla, 3);
3070 // --- Define the part of the end-ladder stuff made of copper (layer #5)
3072 dcop[0] = (2./(8.*7.))/2;
3075 gMC->Gsvolu("ECU5", "BOX ", idtmed[259], dcop, 3);
3077 // --- Define the part of the end-ladder stuff made of epoxy (layer #5)
3079 depx[0] = (30./(8.*7.))/2.;
3082 gMC->Gsvolu("EPX5", "BOX ", idtmed[262], depx, 3);
3084 // --- Define the part of the end-ladder stuff made of silicon (bus)
3087 dsil[0] = (20./(8.*7.))/2.;
3090 gMC->Gsvolu("ESI5", "BOX ", idtmed[251], dsil, 3);
3092 // --- Place the end-ladder stuff into its mother (ELL5)
3094 sep = (4. - (dpla[0] + dcop[0] + depx[0] + dsil[0]) * 2.) / 3.;
3100 xpos = -dela[0] + dpla[0];
3101 gMC->Gspos("EPL5", 1, "ELL5", xpos, ypos, zpos, 0, "ONLY");
3105 xpos = -dela[0] + dpla[0] * 2. + sep + dcop[0];
3106 gMC->Gspos("ECU5", 1, "ELL5", xpos, ypos, zpos, 0, "ONLY");
3110 xpos = -dela[0] + dpla[0] * 2. + sep + dcop[0] * 2. + sep + depx[0];
3111 gMC->Gspos("EPX5", 1, "ELL5", xpos, ypos, zpos, 0, "ONLY");
3113 // --- Silicon (bus)
3115 xpos = -dela[0] + dpla[0] * 2. + sep + dcop[0] * 2. + sep + depx[0] * 2. + sep + dsil[0];
3116 gMC->Gspos("ESI5", 1, "ELL5", xpos, ypos, zpos, 0, "ONLY");
3118 // --- Place the sensitive part of the strips into its mother (ISV1)
3121 for (j = 1; j <= 22; ++j) {
3122 if (j % 2 == 0) xpos = dbox1[0] - dits[0];
3123 else xpos = -dbox1[0] + dits[0];
3124 zpos = ((j - 1) - 10.) * 3.91 - 1.96;
3125 gMC->Gspos("ITS5", j, "ISV1", xpos, ypos, zpos, 0, "ONLY");
3128 // --- Place the electronics of the strips into its mother (SSV1)
3131 for (j = 1; j <= 22; ++j) {
3132 if (j % 2 == 0) xpos = -dsrv[0] + .28;
3133 else xpos = -dsrv[0] + .28 - dits[0] * 2. - .03;
3134 zpos = ((j - 1) - 10.) * 3.91 - 1.96 + .85;
3135 gMC->Gspos("SCH5", j, "SSV1", xpos, ypos, zpos, 0, "ONLY");
3138 //--- Place the cooling tubes and the cooling fluid into their mother (SSV1)
3140 xpos = -dsrv[0] + .41;
3143 // --- Left tube (just a matter of convention)
3146 gMC->Gspos("STB5", 1, "SSV1", xpos, ypos, zpos, 0, "ONLY");
3147 gMC->Gspos("SWT5", 1, "SSV1", xpos, ypos, zpos, 0, "ONLY");
3149 // --- Right tube (just a matter of convention)
3152 gMC->Gspos("STB5", 2, "SSV1", xpos, ypos, zpos, 0, "ONLY");
3153 gMC->Gspos("SWT5", 2, "SSV1", xpos, ypos, zpos, 0, "ONLY");
3155 // --- Place the heat bridge elements into their mother (SSV1)
3157 xpos = -dsrv[0] + .47 + TMath::Sqrt(3.) / 6. * 4.2;
3159 for (j = 1; j <= 23; ++j) {
3160 zpos = ((j - 1) - 10.) * 3.91 - 1.96 - 4.2/2.;
3161 gMC->Gspos("SFR5", j, "SSV1", xpos, ypos, zpos, 0, "ONLY");
3164 // --- Place the elements connecting the triangles of the heat bridge
3165 // into their mother (SSV1)
3169 // --- Left element (just a matter of convention)
3171 xpos = -dsrv[0] + .47;
3172 ypos = -(2.1+0.015);
3173 gMC->Gspos("SCE5", 1, "SSV1", xpos, ypos, zpos, 0, "ONLY");
3175 // --- Right element
3177 xpos = -dsrv[0] + .47;
3179 gMC->Gspos("SCE5", 2, "SSV1", xpos, ypos, zpos, 0, "ONLY");
3183 xpos = -dsrv[0] + .47 + TMath::Sqrt(3.) / 2. * 4.2 + .015;
3185 gMC->Gspos("SCE5", 3, "SSV1", xpos, ypos, zpos, 0, "ONLY");
3187 // --- Place the ghost volumes containing the strip ladders (ISV1),
3188 // electronics/cooling (SSV1) and end-ladder stuff (ELL5) of layer #5 in
3189 // their mother volume (IT56)
3191 offset1 = TMath::ATan2(.8, 36.6);
3193 rzero = dbox1[0] + 36.6;
3194 runo = dbox1[0] * 2. + 36.6 + dsrv[0];
3195 rtwo = dbox1[0] * 2. + 36.6 + dela[0];
3196 for (i = 1; i <= 32; ++i) {
3197 atheta = (i-1) * twopi * raddeg / 32. + offset2;
3198 AliMatrix(idrotm[i+1499], 90., atheta, 90., atheta + 90., 0., 0.);
3200 // --- Strip ladders
3202 xpos = rzero * TMath::Cos((i-1) * twopi / 32. + offset1);
3203 ypos = rzero * TMath::Sin((i-1) * twopi / 32. + offset1);
3205 gMC->Gspos("ISV1", i, "IT56", xpos, ypos, zpos, idrotm[i+1499], "ONLY");
3207 // --- Electronics/cooling
3209 xpos = runo * TMath::Cos((i-1) * twopi / 32. + offset1);
3210 ypos = runo * TMath::Sin((i-1) * twopi / 32. + offset1);
3212 gMC->Gspos("SSV1", i, "IT56", xpos, ypos, zpos, idrotm[i+1499], "ONLY");
3214 // --- End-ladders (nagative-Z and positive-Z)
3216 xpos = rtwo * TMath::Cos((i-1) * twopi / 32. + offset1);
3217 ypos = rtwo * TMath::Sin((i-1) * twopi / 32. + offset1);
3218 zpos = -(dbox1[2] + dela[2] + 6.);
3219 gMC->Gspos("ELL5", i, "IT56", xpos, ypos, zpos, idrotm[i+1499], "ONLY");
3220 zpos = dbox1[2] + dela[2] + 6.;
3221 gMC->Gspos("ELL5", i + 35, "IT56", xpos, ypos, zpos, idrotm[i+1499], "ONLY");
3227 // GOTO 6778 ! skip ITS layer no. 6
3229 //--- Define a ghost volume containing a single ladder of layer #6 andfill
3230 // it with air or vacuum
3232 dbox2[0] = (0.0600+2.*0.0150)/2.;
3234 dbox2[2] = 94.13/2.;
3235 gMC->Gsvolu("ISV2", "BOX ", idtmed[253], dbox2, 3);
3237 // --- Make the ghost volume invisible
3239 gMC->Gsatt("ISV2", "SEEN", 0);
3241 // --- Define a ghost volume containing the electronics and cooling of
3242 // a single ladder of layer #6 and fill it with air or vacuum
3244 dsrv[0] = (TMath::Sqrt(3.) / 2. * 4.2 + .47 + .05) / 2.;
3247 gMC->Gsvolu("SSV2", "BOX ", idtmed[253], dsrv, 3);
3249 // --- Make the ghost volume invisible
3251 gMC->Gsatt("SSV2", "SEEN", 0);
3253 // --- Define a ghost volume containing the end-ladder stuff of
3254 // a single ladder of layer #6 and fill it with air or vacuum
3259 gMC->Gsvolu("ELL6", "BOX ", idtmed[253], dela, 3);
3261 // --- Make the ghost volume invisible
3263 gMC->Gsatt("ELL6", "SEEN", 0);
3265 // --- Define a volume containing the sensitive part of the strips
3266 // (silicon, layer #6)
3271 gMC->Gsvolu("ITS6", "BOX ", idtmed[249], dits, 3);
3273 // --- Define a volume containing the electronics of the strips
3274 // (silicon, layer #6)
3279 gMC->Gsvolu("SCH6", "BOX ", idtmed[250], dchi, 3);
3281 // --- Define the cooling tubes (aluminum, layer #6)
3284 dtub[1] = dtub[0] + .01;
3286 gMC->Gsvolu("STB6", "TUBE", idtmed[255], dtub, 3);
3288 // --- Define the cooling fluid (water or freon, layer #6)
3293 gMC->Gsvolu("SWT6", "TUBE", idtmed[256], dwat, 3);
3294 // CALL GSVOLU('SWT6','TUBE',IDTMED(258),DWAT,3,IOUT) ! freon
3296 //--- Define the (triangular) element of the heat bridge (carbon, layer #6)
3304 dfra[5] = TMath::Sqrt(3.) * 4.2 / 6.;
3305 dfra[6] = dfra[5] + .03;
3309 gMC->Gsvolu("SFR6", "PGON", idtmed[252], dfra, 10);
3311 // --- Define the element connecting the triangles of the heat bridge
3312 // (carbon, layer #6)
3317 gMC->Gsvolu("SCE6", "TUBE", idtmed[252], dcei, 3);
3319 // --- Define the part of the end-ladder stuff made of plastic (G10FR4)
3322 dpla[0] = (10./(8.*7.))/2;
3325 gMC->Gsvolu("EPL6", "BOX ", idtmed[262], dpla, 3);
3327 // --- Define the part of the end-ladder stuff made of copper (layer #6)
3329 dcop[0] = (2./(8.*7.))/2;
3332 gMC->Gsvolu("ECU6", "BOX ", idtmed[259], dcop, 3);
3334 // --- Define the part of the end-ladder stuff made of epoxy (layer #6)
3336 depx[0] = (30./(8.*7.))/2.;
3339 gMC->Gsvolu("EPX6", "BOX ", idtmed[262], depx, 3);
3341 // --- Define the part of the end-ladder stuff made of silicon (bus)
3344 dsil[0] = (20./(8.*7.))/2.;
3347 gMC->Gsvolu("ESI6", "BOX ", idtmed[251], dsil, 3);
3349 // --- Place the end-ladder stuff into its mother (ELL5)
3351 sep = (4. - (dpla[0] + dcop[0] + depx[0] + dsil[0]) * 2.) / 3.;
3357 xpos = -dela[0] + dpla[0];
3358 gMC->Gspos("EPL6", 1, "ELL6", xpos, ypos, zpos, 0, "ONLY");
3362 xpos = -dela[0] + dpla[0] * 2. + sep + dcop[0];
3363 gMC->Gspos("ECU6", 1, "ELL6", xpos, ypos, zpos, 0, "ONLY");
3367 xpos = -dela[0] + dpla[0] * 2. + sep + dcop[0] * 2. + sep + depx[0];
3368 gMC->Gspos("EPX6", 1, "ELL6", xpos, ypos, zpos, 0, "ONLY");
3370 // --- Silicon (bus)
3372 xpos = -dela[0] + dpla[0] * 2. + sep + dcop[0] * 2. + sep + depx[0] * 2. + sep + dsil[0];
3373 gMC->Gspos("ESI6", 1, "ELL6", xpos, ypos, zpos, 0, "ONLY");
3375 // --- Place the sensitive part of the strips into its mother (ISV2)
3378 for (j = 1; j <= 24; ++j) {
3379 if (j % 2 == 0) xpos = -dbox2[0] + dits[0];
3380 else xpos = dbox2[0] - dits[0];
3381 zpos = ((j - 1) - 11.) * 3.91 - 1.96;
3382 gMC->Gspos("ITS6", j, "ISV2", xpos, ypos, zpos, 0, "ONLY");
3385 // --- Place the electronics of the strips into its mother (SSV2)
3388 for (j = 1; j <= 24; ++j) {
3389 if (j % 2 == 0) xpos = -dsrv[0] + .28 - dits[0] * 2. - .03;
3390 else xpos = -dsrv[0] + .28;
3391 zpos = ((j - 1) - 11.) * 3.91 - 1.96 + .85;
3392 gMC->Gspos("SCH5", j, "SSV1", xpos, ypos, zpos, 0, "ONLY");
3395 //--- Place the cooling tubes and the cooling fluid into their mother (SSV2)
3397 xpos = -dsrv[0] + .41;
3400 // --- Left tube (just a matter of convention)
3403 gMC->Gspos("STB6", 1, "SSV2", xpos, ypos, zpos, 0, "ONLY");
3404 gMC->Gspos("SWT6", 1, "SSV2", xpos, ypos, zpos, 0, "ONLY");
3406 // --- Right tube (just a matter of convention)
3409 gMC->Gspos("STB6", 2, "SSV2", xpos, ypos, zpos, 0, "ONLY");
3410 gMC->Gspos("SWT6", 2, "SSV2", xpos, ypos, zpos, 0, "ONLY");
3412 // --- Place the heat bridge elements into their mother (SSV2)
3414 xpos = -dsrv[0] + .47 + TMath::Sqrt(3.) / 6. * 4.2;
3416 for (j = 1; j <= 25; ++j) {
3417 zpos = ((j - 1) - 11.) * 3.91 - 1.96 - 4.2/2.;
3418 gMC->Gspos("SFR6", j, "SSV2", xpos, ypos, zpos, 0, "ONLY");
3421 // --- Place the elements connecting the triangles of the heat bridge
3422 // into their mother (SSV2)
3426 // --- Left element (just a matter of convention)
3428 xpos = -dsrv[0] + .47;
3429 ypos = -(2.1+0.015);
3430 gMC->Gspos("SCE6", 1, "SSV2", xpos, ypos, zpos, 0, "ONLY");
3432 // --- Right element
3434 xpos = -dsrv[0] + .47;
3436 gMC->Gspos("SCE6", 2, "SSV2", xpos, ypos, zpos, 0, "ONLY");
3440 xpos = -dsrv[0] + .47 + TMath::Sqrt(3.) / 2. * 4.2 + .015;
3442 gMC->Gspos("SCE6", 3, "SSV2", xpos, ypos, zpos, 0, "ONLY");
3444 // --- Place the ghost volumes containing the strip ladders (ISV2),
3445 // electronics/cooling (SSV2) and end-ladder stuff (ELL6) of layer #6 in
3446 // their mother volume (IT56)
3448 offset1 = TMath::ATan2(.9, 41.2);
3450 rzero = dbox2[0] + 41.2;
3451 runo = dbox2[0] * 2. + 41.2 + dsrv[0];
3452 rtwo = dbox2[0] * 2. + 41.2 + dela[0];
3453 for (i = 1; i <= 36; ++i) {
3454 atheta = (i-1) * twopi * raddeg / 36. + offset2;
3455 AliMatrix(idrotm[i+1599], 90., atheta, 90., atheta + 90., 0., 0.);
3457 // --- Strip ladders
3459 xpos = rzero * TMath::Cos((i-1) * twopi / 36. + offset1);
3460 ypos = rzero * TMath::Sin((i-1) * twopi / 36. + offset1);
3462 gMC->Gspos("ISV2", i, "IT56", xpos, ypos, zpos, idrotm[i+1599], "ONLY");
3464 // --- Electronics/cooling
3466 xpos = runo * TMath::Cos((i-1) * twopi / 36. + offset1);
3467 ypos = runo * TMath::Sin((i-1) * twopi / 36. + offset1);
3469 gMC->Gspos("SSV2", i, "IT56", xpos, ypos, zpos, idrotm[i+1599], "ONLY");
3471 // --- End-ladders (nagative-Z and positive-Z)
3473 xpos = rtwo * TMath::Cos((i-1) * twopi / 36. + offset1);
3474 ypos = rtwo * TMath::Sin((i-1) * twopi / 36. + offset1);
3475 zpos = -(dbox2[2] + dela[2] + 6.);
3476 gMC->Gspos("ELL6", i, "IT56", xpos, ypos, zpos, idrotm[i+1599], "ONLY");
3477 zpos = dbox2[2] + dela[2] + 6.;
3478 gMC->Gspos("ELL6", i + 39, "IT56", xpos, ypos, zpos, idrotm[i+1599], "ONLY");
3484 //************************************************************************
3486 //* E N D - C A P S A N D F R A M E S *
3487 //* ========================================= *
3489 //************************************************************************
3491 // --- Define a dummy cylinder for multiple scattering tests
3493 // GOTO 7890 ! skip dummy cylinder for multiple scatteringtests
3496 // DITS(2)=DITS(1)+0.1
3498 // CALL GSVOLU('ITST','TUBE',IDTMED(255),DITS,3,IOUT)
3499 // CALL GSPOS('ITST',1,'ITSV',0.,0.,0.,0,'ONLY')
3502 // --- The 0.74% X0 outer wall (C) of the gas vessel at r=50cm ---
3504 // GOTO 8901 ! skip outer wall
3506 if (fMinorVersionV3 == 0 || fMinorVersionV3 == 3) {
3509 dits[1] = dits[0] + .06926;
3510 dits[2] = dpcb[2] * 2. + 62.7 - 10.5;
3512 gMC->Gsvolu("ITSG", "TUBE", idtmed[274], dits, 3);
3513 gMC->Gspos("ITSG", 1, "ITSV", 0., 0., 0., 0, "ONLY");
3518 // --- The frame between the end-caps (octagonal lay-out) ---
3520 // GOTO 9012 ! skip octagonal frame
3522 if (fMinorVersionV3 == 1) {
3527 dtra[2] = dpcb[2] * 2. + 50.5 - 10.5;
3530 dtra1[2] = TMath::Sqrt(dtra[2] * dtra[2] + (55.4*55.4-50.5*50.5))/2.;
3532 offset = angle / 2.;
3533 for (i = 0; i < 8; ++i) {
3534 xtra[i] = rzero * TMath::Cos(i * angle * degrad);
3535 ytra[i] = rzero * TMath::Sin(i * angle * degrad);
3537 gMC->Gsvolu(natra[i], "TUBE", idtmed[274], dtra, 3);
3538 gMC->Gspos(natra[i], 1, "ITSV", xtra[i], ytra[i], ztra[i], 0, "ONLY");
3542 aphi1 = TMath::ACos(dtra[2] / TMath::Sqrt(dtra[2] * dtra[2] + (50.5 / cos(28.*degrad) * (50.5 / cos(28.*degrad))- 50.5*50.5))) * raddeg;
3543 aphi2 = 180. - aphi1;
3544 xpos = (xtra[0] + xtra[1]) / 2.;
3545 ypos = (ytra[0] + ytra[1]) / 2.;
3546 zpos = dtra[2] / 2.;
3547 gMC->Gsvolu(natra1[0], "TUBE", idtmed[274], dtra1, 3);
3550 AliMatrix(idrotm[5100], 90., atheta, aphi1 + 90., r2, aphi1, r3);
3551 gMC->Gspos(natra1[0], 1, "ITSV", xpos, ypos, zpos, idrotm[5100], "ONLY");
3552 zpos = -dtra[2] / 2.;
3553 gMC->Gsvolu(natra1[1], "TUBE", idtmed[274], dtra1, 3);
3556 AliMatrix(idrotm[5101], 90., atheta, aphi2 + 90., r2, aphi2, r3);
3557 gMC->Gspos(natra1[1], 1, "ITSV", xpos, ypos, zpos, idrotm[5101], "ONLY");
3560 aphi2 = TMath::ACos(dtra[2] / TMath::Sqrt(dtra[2] * dtra[2] + (50.5 / cos(28.*degrad) * (50.5 / cos(28.*degrad))- 50.5*50.5))) * raddeg;
3561 aphi1 = 180. - aphi2;
3562 xpos = (xtra[1] + xtra[2]) / 2.;
3563 ypos = (ytra[1] + ytra[2]) / 2.;
3564 zpos = dtra[2] / 2.;
3565 gMC->Gsvolu(natra1[2], "TUBE", idtmed[274], dtra1, 3);
3568 AliMatrix(idrotm[5102], 90., atheta, aphi1 + 90., r2, aphi1, r3);
3569 gMC->Gspos(natra1[2], 1, "ITSV", xpos, ypos, zpos, idrotm[5102], "ONLY");
3570 zpos = -dtra[2] / 2.;
3571 gMC->Gsvolu(natra1[3], "TUBE", idtmed[274], dtra1, 3);
3574 AliMatrix(idrotm[5103], 90., atheta, aphi2 + 90., r2, aphi2, r3);
3575 gMC->Gspos(natra1[3], 1, "ITSV", xpos, ypos, zpos, idrotm[5103], "ONLY");
3578 aphi1 = TMath::ACos(dtra[2] / TMath::Sqrt(dtra[2] * dtra[2] + (50.5 / cos(28.*degrad) * (50.5 / cos(28.*degrad))- 50.5*50.5))) * raddeg;
3579 aphi2 = 180. - aphi1;
3580 xpos = (xtra[2] + xtra[3]) / 2.;
3581 ypos = (ytra[2] + ytra[3]) / 2.;
3582 zpos = dtra[2] / 2.;
3583 gMC->Gsvolu(natra1[4], "TUBE", idtmed[274], dtra1, 3);
3586 AliMatrix(idrotm[5104], 90., atheta, aphi1 + 90., r2, aphi1, r3);
3587 gMC->Gspos(natra1[4], 1, "ITSV", xpos, ypos, zpos, idrotm[5104], "ONLY");
3588 zpos = -dtra[2] / 2.;
3589 gMC->Gsvolu(natra1[5], "TUBE", idtmed[274], dtra1, 3);
3592 AliMatrix(idrotm[5105], 90., atheta, aphi2 + 90., r2, aphi2, r3);
3593 gMC->Gspos(natra1[5], 1, "ITSV", xpos, ypos, zpos, idrotm[5105], "ONLY");
3596 aphi2 = TMath::ACos(dtra[2] / TMath::Sqrt(dtra[2] * dtra[2] + (50.5 / cos(28.*degrad) * (50.5 / cos(28.*degrad))- 50.5*50.5))) * raddeg;
3597 aphi1 = 180. - aphi2;
3598 xpos = (xtra[3] + xtra[4]) / 2.;
3599 ypos = (ytra[3] + ytra[4]) / 2.;
3600 zpos = dtra[2] / 2.;
3601 gMC->Gsvolu(natra1[6], "TUBE", idtmed[274], dtra1, 3);
3604 AliMatrix(idrotm[5106], 90., atheta, aphi1 + 90., r2, aphi1, r3);
3605 gMC->Gspos(natra1[6], 1, "ITSV", xpos, ypos, zpos, idrotm[5106], "ONLY");
3606 zpos = -dtra[2] / 2.;
3607 gMC->Gsvolu(natra1[7], "TUBE", idtmed[274], dtra1, 3);
3610 AliMatrix(idrotm[5107], 90., atheta, aphi2 + 90., r2, aphi2, r3);
3611 gMC->Gspos(natra1[7], 1, "ITSV", xpos, ypos, zpos, idrotm[5107], "ONLY");
3614 aphi2 = TMath::ACos(dtra[2] / TMath::Sqrt(dtra[2] * dtra[2] + (50.5 / cos(28.*degrad) * (50.5 / cos(28.*degrad))- 50.5*50.5))) * raddeg;
3615 aphi1 = 180. - aphi2;
3616 xpos = (xtra[4] + xtra[5]) / 2.;
3617 ypos = (ytra[4] + ytra[5]) / 2.;
3618 zpos = dtra[2] / 2.;
3619 gMC->Gsvolu(natra1[8], "TUBE", idtmed[274], dtra1, 3);
3622 AliMatrix(idrotm[5108], 90., atheta, aphi1 + 90., r2, aphi1, r3);
3623 gMC->Gspos(natra1[8], 1, "ITSV", xpos, ypos, zpos, idrotm[5108], "ONLY");
3624 zpos = -dtra[2] / 2.;
3625 gMC->Gsvolu(natra1[9], "TUBE", idtmed[274], dtra1, 3);
3628 AliMatrix(idrotm[5109], 90., atheta, aphi2 + 90., r2, aphi2, r3);
3629 gMC->Gspos(natra1[9], 1, "ITSV", xpos, ypos, zpos, idrotm[5109], "ONLY");
3632 aphi1 = TMath::ACos(dtra[2] / TMath::Sqrt(dtra[2] * dtra[2] + (50.5 / cos(28.*degrad) * (50.5 / cos(28.*degrad))- 50.5*50.5))) * raddeg;
3633 aphi2 = 180. - aphi1;
3634 xpos = (xtra[5] + xtra[6]) / 2.;
3635 ypos = (ytra[5] + ytra[6]) / 2.;
3636 zpos = dtra[2] / 2.;
3637 gMC->Gsvolu(natra1[10], "TUBE", idtmed[274], dtra1, 3);
3640 AliMatrix(idrotm[5110], 90., atheta, aphi1 + 90., r2, aphi1, r3);
3641 gMC->Gspos(natra1[10], 1, "ITSV", xpos, ypos, zpos, idrotm[5110], "ONLY");
3642 zpos = -dtra[2] / 2.;
3643 gMC->Gsvolu(natra1[11], "TUBE", idtmed[274], dtra1, 3);
3646 AliMatrix(idrotm[5111], 90., atheta, aphi2 + 90., r2, aphi2, r3);
3647 gMC->Gspos(natra1[11], 1, "ITSV", xpos, ypos, zpos, idrotm[5111], "ONLY");
3650 aphi2 = TMath::ACos(dtra[2] / TMath::Sqrt(dtra[2] * dtra[2] + (50.5 / cos(28.*degrad) * (50.5 / cos(28.*degrad))- 50.5*50.5))) * raddeg;
3651 aphi1 = 180. - aphi2;
3652 xpos = (xtra[6] + xtra[7]) / 2.;
3653 ypos = (ytra[6] + ytra[7]) / 2.;
3654 zpos = dtra[2] / 2.;
3655 gMC->Gsvolu(natra1[12], "TUBE", idtmed[274], dtra1, 3);
3658 AliMatrix(idrotm[5112], 90., atheta, aphi1 + 90., r2, aphi1, r3);
3659 gMC->Gspos(natra1[12], 1, "ITSV", xpos, ypos, zpos, idrotm[5112], "ONLY");
3660 zpos = -dtra[2] / 2.;
3661 gMC->Gsvolu(natra1[13], "TUBE", idtmed[274], dtra1, 3);
3664 AliMatrix(idrotm[5113], 90., atheta, aphi2 + 90., r2, aphi2, r3);
3665 gMC->Gspos(natra1[13], 1, "ITSV", xpos, ypos, zpos, idrotm[5113], "ONLY");
3668 aphi1 = TMath::ACos(dtra[2] / TMath::Sqrt(dtra[2] * dtra[2] + (50.5 / cos(28.*degrad) * (50.5 / cos(28.*degrad))- 50.5*50.5))) * raddeg;
3669 aphi2 = 180. - aphi1;
3670 xpos = (xtra[7] + xtra[0]) / 2.;
3671 ypos = (ytra[7] + ytra[0]) / 2.;
3672 zpos = dtra[2] / 2.;
3673 gMC->Gsvolu(natra1[14], "TUBE", idtmed[274], dtra1, 3);
3676 AliMatrix(idrotm[5114], 90., atheta, aphi1 + 90., r2, aphi1, r3);
3677 gMC->Gspos(natra1[14], 1, "ITSV", xpos, ypos, zpos, idrotm[5114], "ONLY");
3678 zpos = -dtra[2] / 2.;
3679 gMC->Gsvolu(natra1[15], "TUBE", idtmed[274], dtra1, 3);
3682 AliMatrix(idrotm[5115], 90., atheta, aphi2 + 90., r2, aphi2, r3);
3683 gMC->Gspos(natra1[15], 1, "ITSV", xpos, ypos, zpos, idrotm[5115], "ONLY");
3686 } else if (fMinorVersionV3 == 4) {
3692 dtra[2] = dpcb[2] * 2. + 50.5 - 10.5;
3695 dtra1[2] = TMath::Sqrt(dtra[2] * dtra[2] + (55.4*55.4-50.5*50.5))/2.;
3697 offset = angle / 2.;
3698 for (i = 0; i < 8; ++i) {
3699 xtra[i] = rzero * TMath::Cos(i * angle * degrad);
3700 ytra[i] = rzero * TMath::Sin(i * angle * degrad);
3702 gMC->Gsvolu(natra[i], "TUBE", idtmed[274], dtra, 3);
3703 gMC->Gspos(natra[i], 1, "ITSV", xtra[i], ytra[i], ztra[i], 0, "ONLY");
3707 aphi1 = TMath::ACos(dtra[2] / TMath::Sqrt(dtra[2] * dtra[2] + (50.5 / cos(28.*degrad) * (50.5 / cos(28.*degrad))- 50.5*50.5))) * raddeg;
3708 aphi2 = 180. - aphi1;
3709 xpos = (xtra[0] + xtra[1]) / 2.;
3710 ypos = (ytra[0] + ytra[1]) / 2.;
3711 zpos = dtra[2] / 2.;
3712 gMC->Gsvolu(natra1[0], "TUBE", idtmed[274], dtra1, 3);
3715 AliMatrix(idrotm[5100], 90., atheta, aphi1 + 90., r2, aphi1, r3);
3716 gMC->Gspos(natra1[0], 1, "ITSV", xpos, ypos, zpos, idrotm[5100], "ONLY");
3717 zpos = -dtra[2] / 2.;
3718 gMC->Gsvolu(natra1[1], "TUBE", idtmed[274], dtra1, 3);
3721 AliMatrix(idrotm[5101], 90., atheta, aphi2 + 90., r2, aphi2, r3);
3722 gMC->Gspos(natra1[1], 1, "ITSV", xpos, ypos, zpos, idrotm[5101], "ONLY");
3725 aphi2 = TMath::ACos(dtra[2] / TMath::Sqrt(dtra[2] * dtra[2] + (50.5 / cos(28.*degrad) * (50.5 / cos(28.*degrad))- 50.5*50.5))) * raddeg;
3726 aphi1 = 180. - aphi2;
3727 xpos = (xtra[1] + xtra[2]) / 2.;
3728 ypos = (ytra[1] + ytra[2]) / 2.;
3729 zpos = dtra[2] / 2.;
3730 gMC->Gsvolu(natra1[2], "TUBE", idtmed[274], dtra1, 3);
3733 AliMatrix(idrotm[5102], 90., atheta, aphi1 + 90., r2, aphi1, r3);
3734 gMC->Gspos(natra1[2], 1, "ITSV", xpos, ypos, zpos, idrotm[5102], "ONLY");
3735 zpos = -dtra[2] / 2.;
3736 gMC->Gsvolu(natra1[3], "TUBE", idtmed[274], dtra1, 3);
3739 AliMatrix(idrotm[5103], 90., atheta, aphi2 + 90., r2, aphi2, r3);
3740 gMC->Gspos(natra1[3], 1, "ITSV", xpos, ypos, zpos, idrotm[5103], "ONLY");
3743 aphi1 = TMath::ACos(dtra[2] / TMath::Sqrt(dtra[2] * dtra[2] + (50.5 / cos(28.*degrad) * (50.5 / cos(28.*degrad))- 50.5*50.5))) * raddeg;
3744 aphi2 = 180. - aphi1;
3745 xpos = (xtra[2] + xtra[3]) / 2.;
3746 ypos = (ytra[2] + ytra[3]) / 2.;
3747 zpos = dtra[2] / 2.;
3748 gMC->Gsvolu(natra1[4], "TUBE", idtmed[274], dtra1, 3);
3751 AliMatrix(idrotm[5104], 90., atheta, aphi1 + 90., r2, aphi1, r3);
3752 gMC->Gspos(natra1[4], 1, "ITSV", xpos, ypos, zpos, idrotm[5104], "ONLY");
3753 zpos = -dtra[2] / 2.;
3754 gMC->Gsvolu(natra1[5], "TUBE", idtmed[274], dtra1, 3);
3757 AliMatrix(idrotm[5105], 90., atheta, aphi2 + 90., r2, aphi2, r3);
3758 gMC->Gspos(natra1[5], 1, "ITSV", xpos, ypos, zpos, idrotm[5105], "ONLY");
3761 aphi2 = TMath::ACos(dtra[2] / TMath::Sqrt(dtra[2] * dtra[2] + (50.5 / cos(28.*degrad) * (50.5 / cos(28.*degrad))- 50.5*50.5))) * raddeg;
3762 aphi1 = 180. - aphi2;
3763 xpos = (xtra[3] + xtra[4]) / 2.;
3764 ypos = (ytra[3] + ytra[4]) / 2.;
3765 zpos = dtra[2] / 2.;
3766 gMC->Gsvolu(natra1[6], "TUBE", idtmed[274], dtra1, 3);
3769 AliMatrix(idrotm[5106], 90., atheta, aphi1 + 90., r2, aphi1, r3);
3770 gMC->Gspos(natra1[6], 1, "ITSV", xpos, ypos, zpos, idrotm[5106], "ONLY");
3771 zpos = -dtra[2] / 2.;
3772 gMC->Gsvolu(natra1[7], "TUBE", idtmed[274], dtra1, 3);
3775 AliMatrix(idrotm[5107], 90., atheta, aphi2 + 90., r2, aphi2, r3);
3776 gMC->Gspos(natra1[7], 1, "ITSV", xpos, ypos, zpos, idrotm[5107], "ONLY");
3779 aphi2 = TMath::ACos(dtra[2] / TMath::Sqrt(dtra[2] * dtra[2] + (50.5 / cos(28.*degrad) * (50.5 / cos(28.*degrad))- 50.5*50.5))) * raddeg;
3780 aphi1 = 180. - aphi2;
3781 xpos = (xtra[4] + xtra[5]) / 2.;
3782 ypos = (ytra[4] + ytra[5]) / 2.;
3783 zpos = dtra[2] / 2.;
3784 gMC->Gsvolu(natra1[8], "TUBE", idtmed[274], dtra1, 3);
3787 AliMatrix(idrotm[5108], 90., atheta, aphi1 + 90., r2, aphi1, r3);
3788 gMC->Gspos(natra1[8], 1, "ITSV", xpos, ypos, zpos, idrotm[5108], "ONLY");
3789 zpos = -dtra[2] / 2.;
3790 gMC->Gsvolu(natra1[9], "TUBE", idtmed[274], dtra1, 3);
3793 AliMatrix(idrotm[5109], 90., atheta, aphi2 + 90., r2, aphi2, r3);
3794 gMC->Gspos(natra1[9], 1, "ITSV", xpos, ypos, zpos, idrotm[5109], "ONLY");
3797 aphi1 = TMath::ACos(dtra[2] / TMath::Sqrt(dtra[2] * dtra[2] + (50.5 / cos(28.*degrad) * (50.5 / cos(28.*degrad))- 50.5*50.5))) * raddeg;
3798 aphi2 = 180. - aphi1;
3799 xpos = (xtra[5] + xtra[6]) / 2.;
3800 ypos = (ytra[5] + ytra[6]) / 2.;
3801 zpos = dtra[2] / 2.;
3802 gMC->Gsvolu(natra1[10], "TUBE", idtmed[274], dtra1, 3);
3805 AliMatrix(idrotm[5110], 90., atheta, aphi1 + 90., r2, aphi1, r3);
3806 gMC->Gspos(natra1[10], 1, "ITSV", xpos, ypos, zpos, idrotm[5110], "ONLY");
3807 zpos = -dtra[2] / 2.;
3808 gMC->Gsvolu(natra1[11], "TUBE", idtmed[274], dtra1, 3);
3811 AliMatrix(idrotm[5111], 90., atheta, aphi2 + 90., r2, aphi2, r3);
3812 gMC->Gspos(natra1[11], 1, "ITSV", xpos, ypos, zpos, idrotm[5111], "ONLY");
3815 aphi2 = TMath::ACos(dtra[2] / TMath::Sqrt(dtra[2] * dtra[2] + (50.5 / cos(28.*degrad) * (50.5 / cos(28.*degrad))- 50.5*50.5))) * raddeg;
3816 aphi1 = 180. - aphi2;
3817 xpos = (xtra[6] + xtra[7]) / 2.;
3818 ypos = (ytra[6] + ytra[7]) / 2.;
3819 zpos = dtra[2] / 2.;
3820 gMC->Gsvolu(natra1[12], "TUBE", idtmed[274], dtra1, 3);
3823 AliMatrix(idrotm[5112], 90., atheta, aphi1 + 90., r2, aphi1, r3);
3824 gMC->Gspos(natra1[12], 1, "ITSV", xpos, ypos, zpos, idrotm[5112], "ONLY");
3825 zpos = -dtra[2] / 2.;
3826 gMC->Gsvolu(natra1[13], "TUBE", idtmed[274], dtra1, 3);
3829 AliMatrix(idrotm[5113], 90., atheta, aphi2 + 90., r2, aphi2, r3);
3830 gMC->Gspos(natra1[13], 1, "ITSV", xpos, ypos, zpos, idrotm[5113], "ONLY");
3833 aphi1 = TMath::ACos(dtra[2] / TMath::Sqrt(dtra[2] * dtra[2] + (50.5 / cos(28.*degrad) * (50.5 / cos(28.*degrad))- 50.5*50.5))) * raddeg;
3834 aphi2 = 180. - aphi1;
3835 xpos = (xtra[7] + xtra[0]) / 2.;
3836 ypos = (ytra[7] + ytra[0]) / 2.;
3837 zpos = dtra[2] / 2.;
3838 gMC->Gsvolu(natra1[14], "TUBE", idtmed[274], dtra1, 3);
3841 AliMatrix(idrotm[5114], 90., atheta, aphi1 + 90., r2, aphi1, r3);
3842 gMC->Gspos(natra1[14], 1, "ITSV", xpos, ypos, zpos, idrotm[5114], "ONLY");
3843 zpos = -dtra[2] / 2.;
3844 gMC->Gsvolu(natra1[15], "TUBE", idtmed[274], dtra1, 3);
3847 AliMatrix(idrotm[5115], 90., atheta, aphi2 + 90., r2, aphi2, r3);
3848 gMC->Gspos(natra1[15], 1, "ITSV", xpos, ypos, zpos, idrotm[5115], "ONLY");
3854 // --- The frame between the end-caps (hexagonal lay-out) ---
3856 // GOTO 9123 ! skip hexagonal frame
3858 if (fMinorVersionV3 == 2) {
3863 dtra2[2] = dpcb[2] * 2. + 50. - 10.5;
3869 dtra4[2] = TMath::Sqrt(dtra2[2] * dtra2[2] + (59.9*59.9-50.*50.)) / 2.;
3871 offset = angle / 2.;
3872 for (i = 0; i < 6; ++i) {
3873 xtra1[i] = rzero * TMath::Cos((i * angle + offset) *degrad);
3874 ytra1[i] = rzero * TMath::Sin((i * angle + offset) *degrad);
3876 gMC->Gsvolu(natra2[i], "TUBE", idtmed[274], dtra2, 3);
3877 gMC->Gspos(natra2[i], 1, "ITSV", xtra1[i], ytra1[i], ztra1[i], 0, "ONLY");
3882 xpos = (xtra1[0] + xtra1[1]) / 2.;
3883 ypos = (ytra1[0] + ytra1[1]) / 2.;
3885 gMC->Gsvolu(natra3[0], "TUBE", idtmed[274], dtra3, 3);
3888 AliMatrix(idrotm[5200], 90., atheta, aphi + 90., r2, aphi, r3);
3889 gMC->Gspos(natra3[0], 1, "ITSV", xpos, ypos, zpos, idrotm[5200], "ONLY");
3893 xpos = (xtra1[1] + xtra1[2]) / 2.;
3894 ypos = (ytra1[1] + ytra1[2]) / 2.;
3896 gMC->Gsvolu(natra3[1], "TUBE", idtmed[274], dtra3, 3);
3899 AliMatrix(idrotm[5201], 90., atheta, aphi + 90., r2, aphi, r3);
3900 gMC->Gspos(natra3[1], 1, "ITSV", xpos, ypos, zpos, idrotm[5201], "ONLY");
3904 xpos = (xtra1[2] + xtra1[3]) / 2.;
3905 ypos = (ytra1[2] + ytra1[3]) / 2.;
3907 gMC->Gsvolu(natra3[2], "TUBE", idtmed[274], dtra3, 3);
3910 AliMatrix(idrotm[5202], 90., atheta, aphi + 90., r2, aphi, r3);
3911 gMC->Gspos(natra3[2], 1, "ITSV", xpos, ypos, zpos, idrotm[5202], "ONLY");
3915 xpos = (xtra1[3] + xtra1[4]) / 2.;
3916 ypos = (ytra1[3] + ytra1[4]) / 2.;
3918 gMC->Gsvolu(natra3[3], "TUBE", idtmed[274], dtra3, 3);
3921 AliMatrix(idrotm[5203], 90., atheta, aphi + 90., r2, aphi, r3);
3922 gMC->Gspos(natra3[3], 1, "ITSV", xpos, ypos, zpos, idrotm[5203], "ONLY");
3926 xpos = (xtra1[4] + xtra1[5]) / 2.;
3927 ypos = (ytra1[4] + ytra1[5]) / 2.;
3929 gMC->Gsvolu(natra3[4], "TUBE", idtmed[274], dtra3, 3);
3932 AliMatrix(idrotm[5204], 90., atheta, aphi + 90., r2, aphi, r3);
3933 gMC->Gspos(natra3[4], 1, "ITSV", xpos, ypos, zpos, idrotm[5204], "ONLY");
3937 xpos = (xtra1[5] + xtra1[0]) / 2.;
3938 ypos = (ytra1[5] + ytra1[0]) / 2.;
3940 gMC->Gsvolu(natra3[5], "TUBE", idtmed[274], dtra3, 3);
3943 AliMatrix(idrotm[5205], 90., atheta, aphi + 90., r2, aphi, r3);
3944 gMC->Gspos(natra3[5], 1, "ITSV", xpos, ypos, zpos, idrotm[5205], "ONLY");
3947 aphi2 = TMath::ACos(dtra2[2] / TMath::Sqrt(dtra2[2] * dtra2[2] + (50. / cos(34.*degrad) * (50. / cos(34.*degrad))- 50.*50.))) * raddeg;
3948 aphi1 = 180. - aphi2;
3949 xpos = (xtra1[0] + xtra1[1]) / 2.;
3950 ypos = (ytra1[0] + ytra1[1]) / 2.;
3951 zpos = dtra2[2] / 2.;
3952 gMC->Gsvolu(natra4[0], "TUBE", idtmed[274], dtra4, 3);
3955 AliMatrix(idrotm[5210], 90., atheta, aphi1 + 90., r2, aphi1, r3);
3956 gMC->Gspos(natra4[0], 1, "ITSV", xpos, ypos, zpos, idrotm[5210], "ONLY");
3957 zpos = -dtra2[2] / 2.;
3958 gMC->Gsvolu(natra4[1], "TUBE", idtmed[274], dtra4, 3);
3961 AliMatrix(idrotm[5211], 90., atheta, aphi2 + 90., r2, aphi2, r3);
3962 gMC->Gspos(natra4[1], 1, "ITSV", xpos, ypos, zpos, idrotm[5211], "ONLY");
3965 aphi1 = TMath::ACos(dtra2[2] / TMath::Sqrt(dtra2[2] * dtra2[2] + (50. / cos(34.*degrad) * (50. / cos(34.*degrad))- 50.*50.))) * raddeg;
3966 aphi2 = 180. - aphi1;
3967 xpos = (xtra1[1] + xtra1[2]) / 2.;
3968 ypos = (ytra1[1] + ytra1[2]) / 2.;
3969 zpos = dtra2[2] / 2.;
3970 gMC->Gsvolu(natra4[2], "TUBE", idtmed[274], dtra4, 3);
3973 AliMatrix(idrotm[5212], 90., atheta, aphi1 + 90., r2, aphi1, r3);
3974 gMC->Gspos(natra4[2], 1, "ITSV", xpos, ypos, zpos, idrotm[5212], "ONLY");
3975 zpos = -dtra2[2] / 2.;
3976 gMC->Gsvolu(natra4[3], "TUBE", idtmed[274], dtra4, 3);
3979 AliMatrix(idrotm[5213], 90., atheta, aphi2 + 90., r2, aphi2, r3);
3980 gMC->Gspos(natra4[3], 1, "ITSV", xpos, ypos, zpos, idrotm[5213], "ONLY");
3983 aphi2 = TMath::ACos(dtra2[2] / TMath::Sqrt(dtra2[2] * dtra2[2] + (50. / cos(34.*degrad) * (50. / cos(34.*degrad))- 50.*50.))) * raddeg;
3984 aphi1 = 180. - aphi2;
3985 xpos = (xtra1[2] + xtra1[3]) / 2.;
3986 ypos = (ytra1[2] + ytra1[3]) / 2.;
3987 zpos = dtra2[2] / 2.;
3988 gMC->Gsvolu(natra4[4], "TUBE", idtmed[274], dtra4, 3);
3991 AliMatrix(idrotm[5214], 90., atheta, aphi1 + 90., r2, aphi1, r3);
3992 gMC->Gspos(natra4[4], 1, "ITSV", xpos, ypos, zpos, idrotm[5214], "ONLY");
3993 zpos = -dtra2[2] / 2.;
3994 gMC->Gsvolu(natra4[5], "TUBE", idtmed[274], dtra4, 3);
3997 AliMatrix(idrotm[5215], 90., atheta, aphi2 + 90., r2, aphi2, r3);
3998 gMC->Gspos(natra4[5], 1, "ITSV", xpos, ypos, zpos, idrotm[5215], "ONLY");
4000 aphi1 = TMath::ACos(dtra2[2] / TMath::Sqrt(dtra2[2] * dtra2[2] + (50. / cos(34.*degrad) * (50. / cos(34.*degrad))
4001 - 50.*50.))) * raddeg;
4002 aphi2 = 180. - aphi1;
4003 xpos = (xtra1[2] + xtra1[3]) / 2.;
4004 ypos = (ytra1[2] + ytra1[3]) / 2.;
4005 zpos = dtra2[2] / 2.;
4006 gMC->Gsvolu(natra4[6], "TUBE", idtmed[274], dtra4, 3);
4009 AliMatrix(idrotm[5216], 90., atheta, aphi1 + 90., r2, aphi1, r3);
4010 gMC->Gspos(natra4[6], 1, "ITSV", xpos, ypos, zpos, idrotm[5216], "ONLY");
4011 zpos = -dtra2[2] / 2.;
4012 gMC->Gsvolu(natra4[7], "TUBE", idtmed[274], dtra4, 3);
4015 AliMatrix(idrotm[5217], 90., atheta, aphi2 + 90., r2, aphi2, r3);
4016 gMC->Gspos(natra4[7], 1, "ITSV", xpos, ypos, zpos, idrotm[5217], "ONLY");
4019 aphi2 = TMath::ACos(dtra2[2] / TMath::Sqrt(dtra2[2] * dtra2[2] + (50. / cos(34.*degrad) * (50. / cos(34.*degrad))- 50.*50.))) * raddeg;
4020 aphi1 = 180. - aphi2;
4021 xpos = (xtra1[3] + xtra1[4]) / 2.;
4022 ypos = (ytra1[3] + ytra1[4]) / 2.;
4023 zpos = dtra2[2] / 2.;
4024 gMC->Gsvolu(natra4[8], "TUBE", idtmed[274], dtra4, 3);
4027 AliMatrix(idrotm[5218], 90., atheta, aphi1 + 90., r2, aphi1, r3);
4028 gMC->Gspos(natra4[8], 1, "ITSV", xpos, ypos, zpos, idrotm[5218], "ONLY");
4029 zpos = -dtra2[2] / 2.;
4030 gMC->Gsvolu(natra4[9], "TUBE", idtmed[274], dtra4, 3);
4033 AliMatrix(idrotm[5219], 90., atheta, aphi2 + 90., r2, aphi2, r3);
4034 gMC->Gspos(natra4[9], 1, "ITSV", xpos, ypos, zpos, idrotm[5219], "ONLY");
4037 aphi1 = TMath::ACos(dtra2[2] / TMath::Sqrt(dtra2[2] * dtra2[2] + (50. / cos(34.*degrad) * (50. / cos(34.*degrad))- 50.*50.))) * raddeg;
4038 aphi2 = 180. - aphi1;
4039 xpos = (xtra1[4] + xtra1[5]) / 2.;
4040 ypos = (ytra1[4] + ytra1[5]) / 2.;
4041 zpos = dtra2[2] / 2.;
4042 gMC->Gsvolu(natra4[10], "TUBE", idtmed[274], dtra4, 3);
4045 AliMatrix(idrotm[5220], 90., atheta, aphi1 + 90., r2, aphi1, r3);
4046 gMC->Gspos(natra4[10], 1, "ITSV", xpos, ypos, zpos, idrotm[5220], "ONLY");
4047 zpos = -dtra2[2] / 2.;
4048 gMC->Gsvolu(natra4[11], "TUBE", idtmed[274], dtra4, 3);
4051 AliMatrix(idrotm[5221], 90., atheta, aphi2 + 90., r2, aphi2, r3);
4052 gMC->Gspos(natra4[11], 1, "ITSV", xpos, ypos, zpos, idrotm[5221], "ONLY");
4055 aphi2 = TMath::ACos(dtra2[2] / TMath::Sqrt(dtra2[2] * dtra2[2] + (50. / cos(34.*degrad) * (50. / cos(34.*degrad))- 50.*50.))) * raddeg;
4056 aphi1 = 180. - aphi2;
4057 xpos = (xtra1[5] + xtra1[0]) / 2.;
4058 ypos = (ytra1[5] + ytra1[0]) / 2.;
4059 zpos = dtra2[2] / 2.;
4060 gMC->Gsvolu(natra4[12], "TUBE", idtmed[274], dtra4, 3);
4063 AliMatrix(idrotm[5222], 90., atheta, aphi1 + 90., r2, aphi1, r3);
4064 gMC->Gspos(natra4[12], 1, "ITSV", xpos, ypos, zpos, idrotm[5222], "ONLY");
4065 zpos = -dtra2[2] / 2.;
4066 gMC->Gsvolu(natra4[13], "TUBE", idtmed[274], dtra4, 3);
4069 AliMatrix(idrotm[5223], 90., atheta, aphi2 + 90., r2, aphi2, r3);
4070 gMC->Gspos(natra4[13], 1, "ITSV", xpos, ypos, zpos, idrotm[5223], "ONLY");
4072 aphi1 = TMath::ACos(dtra2[2] / TMath::Sqrt(dtra2[2] * dtra2[2] + (50. / cos(34.*degrad) * (50. / cos(34.*degrad))- 50.*50.))) * raddeg;
4073 aphi2 = 180. - aphi1;
4074 xpos = (xtra1[5] + xtra1[0]) / 2.;
4075 ypos = (ytra1[5] + ytra1[0]) / 2.;
4076 zpos = dtra2[2] / 2.;
4077 gMC->Gsvolu(natra4[14], "TUBE", idtmed[274], dtra4, 3);
4080 AliMatrix(idrotm[5224], 90., atheta, aphi1 + 90., r2, aphi1, r3);
4081 gMC->Gspos(natra4[14], 1, "ITSV", xpos, ypos, zpos, idrotm[5224], "ONLY");
4082 zpos = -dtra2[2] / 2.;
4083 gMC->Gsvolu(natra4[15], "TUBE", idtmed[274], dtra4, 3);
4086 AliMatrix(idrotm[5225], 90., atheta, aphi2 + 90., r2, aphi2, r3);
4087 gMC->Gspos(natra4[15], 1, "ITSV", xpos, ypos, zpos, idrotm[5225], "ONLY");
4090 } else if (fMinorVersionV3 == 5) {
4096 dtra2[2] = dpcb[2] * 2. + 50. - 10.5;
4102 dtra4[2] = TMath::Sqrt(dtra2[2] * dtra2[2] + (59.9*59.9-50.*50.)) / 2.;
4104 offset = angle / 2.;
4105 for (i = 0; i < 6; ++i) {
4106 xtra1[i] = rzero * TMath::Cos((i * angle + offset) *degrad);
4107 ytra1[i] = rzero * TMath::Sin((i * angle + offset) *degrad);
4109 gMC->Gsvolu(natra2[i], "TUBE", idtmed[274], dtra2, 3);
4110 gMC->Gspos(natra2[i], 1, "ITSV", xtra1[i], ytra1[i], ztra1[i], 0, "ONLY");
4115 xpos = (xtra1[0] + xtra1[1]) / 2.;
4116 ypos = (ytra1[0] + ytra1[1]) / 2.;
4118 gMC->Gsvolu(natra3[0], "TUBE", idtmed[274], dtra3, 3);
4121 AliMatrix(idrotm[5200], 90., atheta, aphi + 90., r2, aphi, r3);
4122 gMC->Gspos(natra3[0], 1, "ITSV", xpos, ypos, zpos, idrotm[5200], "ONLY");
4126 xpos = (xtra1[1] + xtra1[2]) / 2.;
4127 ypos = (ytra1[1] + ytra1[2]) / 2.;
4129 gMC->Gsvolu(natra3[1], "TUBE", idtmed[274], dtra3, 3);
4132 AliMatrix(idrotm[5201], 90., atheta, aphi + 90., r2, aphi, r3);
4133 gMC->Gspos(natra3[1], 1, "ITSV", xpos, ypos, zpos, idrotm[5201], "ONLY");
4137 xpos = (xtra1[2] + xtra1[3]) / 2.;
4138 ypos = (ytra1[2] + ytra1[3]) / 2.;
4140 gMC->Gsvolu(natra3[2], "TUBE", idtmed[274], dtra3, 3);
4143 AliMatrix(idrotm[5202], 90., atheta, aphi + 90., r2, aphi, r3);
4144 gMC->Gspos(natra3[2], 1, "ITSV", xpos, ypos, zpos, idrotm[5202], "ONLY");
4148 xpos = (xtra1[3] + xtra1[4]) / 2.;
4149 ypos = (ytra1[3] + ytra1[4]) / 2.;
4151 gMC->Gsvolu(natra3[3], "TUBE", idtmed[274], dtra3, 3);
4154 AliMatrix(idrotm[5203], 90., atheta, aphi + 90., r2, aphi, r3);
4155 gMC->Gspos(natra3[3], 1, "ITSV", xpos, ypos, zpos, idrotm[5203], "ONLY");
4159 xpos = (xtra1[4] + xtra1[5]) / 2.;
4160 ypos = (ytra1[4] + ytra1[5]) / 2.;
4162 gMC->Gsvolu(natra3[4], "TUBE", idtmed[274], dtra3, 3);
4165 AliMatrix(idrotm[5204], 90., atheta, aphi + 90., r2, aphi, r3);
4166 gMC->Gspos(natra3[4], 1, "ITSV", xpos, ypos, zpos, idrotm[5204], "ONLY");
4170 xpos = (xtra1[5] + xtra1[0]) / 2.;
4171 ypos = (ytra1[5] + ytra1[0]) / 2.;
4173 gMC->Gsvolu(natra3[5], "TUBE", idtmed[274], dtra3, 3);
4176 AliMatrix(idrotm[5205], 90., atheta, aphi + 90., r2, aphi, r3);
4177 gMC->Gspos(natra3[5], 1, "ITSV", xpos, ypos, zpos, idrotm[5205], "ONLY");
4180 aphi2 = TMath::ACos(dtra2[2] / TMath::Sqrt(dtra2[2] * dtra2[2] + (50. / cos(34.*degrad) * (50. / cos(34.*degrad))- 50.*50.))) * raddeg;
4181 aphi1 = 180. - aphi2;
4182 xpos = (xtra1[0] + xtra1[1]) / 2.;
4183 ypos = (ytra1[0] + ytra1[1]) / 2.;
4184 zpos = dtra2[2] / 2.;
4185 gMC->Gsvolu(natra4[0], "TUBE", idtmed[274], dtra4, 3);
4188 AliMatrix(idrotm[5210], 90., atheta, aphi1 + 90., r2, aphi1, r3);
4189 gMC->Gspos(natra4[0], 1, "ITSV", xpos, ypos, zpos, idrotm[5210], "ONLY");
4190 zpos = -dtra2[2] / 2.;
4191 gMC->Gsvolu(natra4[1], "TUBE", idtmed[274], dtra4, 3);
4194 AliMatrix(idrotm[5211], 90., atheta, aphi2 + 90., r2, aphi2, r3);
4195 gMC->Gspos(natra4[1], 1, "ITSV", xpos, ypos, zpos, idrotm[5211], "ONLY");
4198 aphi1 = TMath::ACos(dtra2[2] / TMath::Sqrt(dtra2[2] * dtra2[2] + (50. / cos(34.*degrad) * (50. / cos(34.*degrad))- 50.*50.))) * raddeg;
4199 aphi2 = 180. - aphi1;
4200 xpos = (xtra1[1] + xtra1[2]) / 2.;
4201 ypos = (ytra1[1] + ytra1[2]) / 2.;
4202 zpos = dtra2[2] / 2.;
4203 gMC->Gsvolu(natra4[2], "TUBE", idtmed[274], dtra4, 3);
4206 AliMatrix(idrotm[5212], 90., atheta, aphi1 + 90., r2, aphi1, r3);
4207 gMC->Gspos(natra4[2], 1, "ITSV", xpos, ypos, zpos, idrotm[5212], "ONLY");
4208 zpos = -dtra2[2] / 2.;
4209 gMC->Gsvolu(natra4[3], "TUBE", idtmed[274], dtra4, 3);
4212 AliMatrix(idrotm[5213], 90., atheta, aphi2 + 90., r2, aphi2, r3);
4213 gMC->Gspos(natra4[3], 1, "ITSV", xpos, ypos, zpos, idrotm[5213], "ONLY");
4216 aphi2 = TMath::ACos(dtra2[2] / TMath::Sqrt(dtra2[2] * dtra2[2] + (50. / cos(34.*degrad) * (50. / cos(34.*degrad))- 50.*50.))) * raddeg;
4217 aphi1 = 180. - aphi2;
4218 xpos = (xtra1[2] + xtra1[3]) / 2.;
4219 ypos = (ytra1[2] + ytra1[3]) / 2.;
4220 zpos = dtra2[2] / 2.;
4221 gMC->Gsvolu(natra4[4], "TUBE", idtmed[274], dtra4, 3);
4224 AliMatrix(idrotm[5214], 90., atheta, aphi1 + 90., r2, aphi1, r3);
4225 gMC->Gspos(natra4[4], 1, "ITSV", xpos, ypos, zpos, idrotm[5214], "ONLY");
4226 zpos = -dtra2[2] / 2.;
4227 gMC->Gsvolu(natra4[5], "TUBE", idtmed[274], dtra4, 3);
4230 AliMatrix(idrotm[5215], 90., atheta, aphi2 + 90., r2, aphi2, r3);
4231 gMC->Gspos(natra4[5], 1, "ITSV", xpos, ypos, zpos, idrotm[5215], "ONLY");
4233 aphi1 = TMath::ACos(dtra2[2] / TMath::Sqrt(dtra2[2] * dtra2[2] + (50. / cos(34.*degrad) * (50. / cos(34.*degrad))- 50.*50.))) * raddeg;
4234 aphi2 = 180. - aphi1;
4235 xpos = (xtra1[2] + xtra1[3]) / 2.;
4236 ypos = (ytra1[2] + ytra1[3]) / 2.;
4237 zpos = dtra2[2] / 2.;
4238 gMC->Gsvolu(natra4[6], "TUBE", idtmed[274], dtra4, 3);
4241 AliMatrix(idrotm[5216], 90., atheta, aphi1 + 90., r2, aphi1, r3);
4242 gMC->Gspos(natra4[6], 1, "ITSV", xpos, ypos, zpos, idrotm[5216], "ONLY");
4243 zpos = -dtra2[2] / 2.;
4244 gMC->Gsvolu(natra4[7], "TUBE", idtmed[274], dtra4, 3);
4247 AliMatrix(idrotm[5217], 90., atheta, aphi2 + 90., r2, aphi2, r3);
4248 gMC->Gspos(natra4[7], 1, "ITSV", xpos, ypos, zpos, idrotm[5217], "ONLY");
4251 aphi2 = TMath::ACos(dtra2[2] / TMath::Sqrt(dtra2[2] * dtra2[2] + (50. / cos(34.*degrad) * (50. / cos(34.*degrad))- 50.*50.))) * raddeg;
4252 aphi1 = 180. - aphi2;
4253 xpos = (xtra1[3] + xtra1[4]) / 2.;
4254 ypos = (ytra1[3] + ytra1[4]) / 2.;
4255 zpos = dtra2[2] / 2.;
4256 gMC->Gsvolu(natra4[8], "TUBE", idtmed[274], dtra4, 3);
4259 AliMatrix(idrotm[5218], 90., atheta, aphi1 + 90., r2, aphi1, r3);
4260 gMC->Gspos(natra4[8], 1, "ITSV", xpos, ypos, zpos, idrotm[5218], "ONLY");
4261 zpos = -dtra2[2] / 2.;
4262 gMC->Gsvolu(natra4[9], "TUBE", idtmed[274], dtra4, 3);
4265 AliMatrix(idrotm[5219], 90., atheta, aphi2 + 90., r2, aphi2, r3);
4266 gMC->Gspos(natra4[9], 1, "ITSV", xpos, ypos, zpos, idrotm[5219], "ONLY");
4269 aphi1 = TMath::ACos(dtra2[2] / TMath::Sqrt(dtra2[2] * dtra2[2] + (50. / cos(34.*degrad) * (50. / cos(34.*degrad))- 50.*50.))) * raddeg;
4270 aphi2 = 180. - aphi1;
4271 xpos = (xtra1[4] + xtra1[5]) / 2.;
4272 ypos = (ytra1[4] + ytra1[5]) / 2.;
4273 zpos = dtra2[2] / 2.;
4274 gMC->Gsvolu(natra4[10], "TUBE", idtmed[274], dtra4, 3);
4277 AliMatrix(idrotm[5220], 90., atheta, aphi1 + 90., r2, aphi1, r3);
4278 gMC->Gspos(natra4[10], 1, "ITSV", xpos, ypos, zpos, idrotm[5220], "ONLY");
4279 zpos = -dtra2[2] / 2.;
4280 gMC->Gsvolu(natra4[11], "TUBE", idtmed[274], dtra4, 3);
4283 AliMatrix(idrotm[5221], 90., atheta, aphi2 + 90., r2, aphi2, r3);
4284 gMC->Gspos(natra4[11], 1, "ITSV", xpos, ypos, zpos, idrotm[5221], "ONLY");
4287 aphi2 = TMath::ACos(dtra2[2] / TMath::Sqrt(dtra2[2] * dtra2[2] + (50. / cos(34.*degrad) * (50. / cos(34.*degrad))- 50.*50.))) * raddeg;
4288 aphi1 = 180. - aphi2;
4289 xpos = (xtra1[5] + xtra1[0]) / 2.;
4290 ypos = (ytra1[5] + ytra1[0]) / 2.;
4291 zpos = dtra2[2] / 2.;
4292 gMC->Gsvolu(natra4[12], "TUBE", idtmed[274], dtra4, 3);
4295 AliMatrix(idrotm[5222], 90., atheta, aphi1 + 90., r2, aphi1, r3);
4296 gMC->Gspos(natra4[12], 1, "ITSV", xpos, ypos, zpos, idrotm[5222], "ONLY");
4297 zpos = -dtra2[2] / 2.;
4298 gMC->Gsvolu(natra4[13], "TUBE", idtmed[274], dtra4, 3);
4301 AliMatrix(idrotm[5223], 90., atheta, aphi2 + 90., r2, aphi2, r3);
4302 gMC->Gspos(natra4[13], 1, "ITSV", xpos, ypos, zpos, idrotm[5223], "ONLY");
4304 aphi1 = TMath::ACos(dtra2[2] / TMath::Sqrt(dtra2[2] * dtra2[2] + (50. / cos(34.*degrad) * (50. / cos(34.*degrad))- 50.*50.))) * raddeg;
4305 aphi2 = 180. - aphi1;
4306 xpos = (xtra1[5] + xtra1[0]) / 2.;
4307 ypos = (ytra1[5] + ytra1[0]) / 2.;
4308 zpos = dtra2[2] / 2.;
4309 gMC->Gsvolu(natra4[14], "TUBE", idtmed[274], dtra4, 3);
4312 AliMatrix(idrotm[5224], 90., atheta, aphi1 + 90., r2, aphi1, r3);
4313 gMC->Gspos(natra4[14], 1, "ITSV", xpos, ypos, zpos, idrotm[5224], "ONLY");
4314 zpos = -dtra2[2] / 2.;
4315 gMC->Gsvolu(natra4[15], "TUBE", idtmed[274], dtra4, 3);
4318 AliMatrix(idrotm[5225], 90., atheta, aphi2 + 90., r2, aphi2, r3);
4319 gMC->Gspos(natra4[15], 1, "ITSV", xpos, ypos, zpos, idrotm[5225], "ONLY");
4325 // --- Define the end-caps
4327 // GOTO 9234 ! skip both end-caps
4329 // --- Define the Z>0 end-cap
4331 // GOTO 9345 ! skip the Z>0 end-cap
4336 dcone[3] = (338.-3.)*455./(338.-3.-10.)/10.;
4337 dcone[4] = .02 / TMath::Cos(45.*degrad) + (338.-3.)*455./(338.-3.-10.)/10.;
4340 zpos = dpcb[2] * 2. + (583.+(338.-3.))/2./10. - 10.5;
4341 // end-ladder electro
4342 gMC->Gsvolu("RCON", "CONE", idtmed[274], dcone, 5);
4343 gMC->Gspos("RCON", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY");
4345 dtube[0] = .02 / TMath::Cos(45.*degrad) + (338.-3.)*455./(338.-3.-10.)/10.;
4347 // In the Simonetti's drawings 52. In the TP 50.
4351 zpos = dpcb[2] * 2. + (583./2.+(338-1.5))/10. - 10.5;
4352 // end-ladder electro
4353 gMC->Gsvolu("RTB1", "TUBE", idtmed[274], dtube, 3);
4354 gMC->Gspos("RTB1", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY");
4358 dtube[2] = 26.8/2./10.;
4361 zpos = dpcb[2] * 2. + (583./2.-89.+26.8/2.)/10. - 10.5;
4363 gMC->Gsvolu("RTB2", "TUBE", idtmed[274], dtube, 3);
4364 gMC->Gspos("RTB2", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY");
4370 dpgon[4] = dpcb[2] * 2. + (583./2.-62.2)/10. - 10.5;
4371 // end-ladder electron
4374 dpgon[7] = dpcb[2] * 2. + 583./2./10. - 10.5;
4375 // end-ladder electronics
4381 gMC->Gsvolu("RP03", "PGON", idtmed[274], dpgon, 10);
4382 gMC->Gspos("RP03", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY");
4388 dpgon[4] = dpcb[2] * 2. + (583./2.+(338.-273.))/10. - 10.5;
4392 dpgon[7] = dpcb[2] * 2. + (583./2.+(338.-273.+15.))/10. - 10.5;
4399 gMC->Gsvolu("RP04", "PGON", idtmed[274], dpgon, 10);
4400 gMC->Gspos("RP04", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY");
4402 if (fMinorVersionV3 < 3 ) {
4404 dpgon[0] = offset2 + 360./(2.*35.);
4408 dpgon[4] = dpcb[2] * 2. + (583./2.+(338.-106.))/10. - 10.5;
4412 dpgon[7] = dpcb[2] * 2. + (583./2.+(338.-106.+15.))/10. - 10.5;
4419 gMC->Gsvolu("RP05", "PGON", idtmed[274], dpgon, 10);
4420 gMC->Gspos("RP05", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY");
4422 dpgon[0] = offset2 + 360./(2.*39.);
4426 dpgon[4] = dpcb[2] * 2. + (583./2.+(338.-56.))/10. - 10.5;
4430 dpgon[7] = dpcb[2] * 2. + (583./2.+(338.-56.+15.))/10. - 10.5;
4437 gMC->Gsvolu("RP06", "PGON", idtmed[274], dpgon, 10);
4438 gMC->Gspos("RP06", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY");
4440 if (fMinorVersionV3 > 2 && fMinorVersionV3 < 6) {
4442 dpgon[0] = offset2 + 5.625;
4446 dpgon[4] = (583./2.+(338.-106.))/10. - (40.-36.6) / TMath::Tan(45.*degrad) + dpcb[2] * 2. - 10.5;
4447 // end-ladder electronics
4450 dpgon[7] = (583./2.+(338.-106.+15.))/10. - (40.-36.6) / TMath::Tan(45.*degrad) + dpcb[2] * 2. - 10.5;
4451 // end-ladder electr
4457 gMC->Gsvolu("RP05", "PGON", idtmed[274], dpgon, 10);
4458 gMC->Gspos("RP05", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY");
4460 dpgon[0] = offset2 + 5.;
4464 dpgon[4] = (583./2.+(338.-56.))/10. - (45.-41.2) / TMath::Tan(45.*degrad) + dpcb[2] * 2. - 10.5;
4465 // end-ladder electronics
4468 dpgon[7] = (583./2.+(338.-56.+15.))/10. - (45.-41.2) / TMath::Tan(45.*degrad) + dpcb[2] * 2. - 10.5;
4469 // end-ladder electr
4475 gMC->Gsvolu("RP06", "PGON", idtmed[274], dpgon, 10);
4476 gMC->Gspos("RP06", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY");
4481 // --- Define the Z<0 end-cap
4483 // GOTO 9456 ! skip the Z<0 end-cap
4486 dcone[1] = (338.-3.)*455./(338.-3.-10.)/10.;
4487 dcone[2] = .02 / TMath::Cos(45.*degrad) + (338.-3.)*455./(338.-3.-10.)/10.;
4492 zpos = -(583.+(338.-3.))/2./10. - dpcb[2] * 2. + 10.5;
4493 // end-ladder electr
4494 gMC->Gsvolu("LCON", "CONE", idtmed[274], dcone, 5);
4496 gMC->Gspos("LCON", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY");
4498 dtube[0] = .02 / TMath::Cos(45.*degrad) + (338.-3.)*455./(338.-3.-10.)/10.;
4500 // In the Simonetti's drawings 52. In the TP 50.
4504 zpos = -(583./2.+(338-1.5))/10. - dpcb[2] * 2. + 10.5;
4505 // end-ladder electr
4506 gMC->Gsvolu("LTB1", "TUBE", idtmed[274], dtube, 3);
4508 gMC->Gspos("LTB1", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY");
4512 dtube[2] = 26.8/2./10.;
4515 zpos = -(583./2.-89.+26.8/2.)/10. - dpcb[2] * 2. + 10.5;
4517 gMC->Gsvolu("LTB2", "TUBE", idtmed[274], dtube, 3);
4519 gMC->Gspos("LTB2", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY");
4525 dpgon[4] = -583./2./10. - dpcb[2] * 2. + 10.5;
4526 // end-ladder electronics
4529 dpgon[7] = -(583./2.-62.2)/10. - dpcb[2] * 2. + 10.5;
4530 // end-ladder electro
4536 gMC->Gsvolu("LP03", "PGON", idtmed[274], dpgon, 10);
4537 gMC->Gspos("LP03", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY");
4543 dpgon[4] = -(583./2.+(338.-273.+15.))/10. - dpcb[2] * 2. + 10.5;
4547 dpgon[7] = -(583./2.+(338.-273.))/10. - dpcb[2] * 2. + 10.5;
4554 gMC->Gsvolu("LP04", "PGON", idtmed[274], dpgon, 10);
4555 gMC->Gspos("LP04", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY");
4557 if (fMinorVersionV3 < 3) {
4559 dpgon[0] = offset2 + 360./(2.*35.);
4563 dpgon[4] = -(583./2.+(338.-106.))/10. - dpcb[2] * 2. + 10.5;
4567 dpgon[7] = -(583./2.+(338.-106.+15.))/10. - dpcb[2] * 2. + 10.5;
4574 gMC->Gsvolu("LP05", "PGON", idtmed[274], dpgon, 10);
4575 gMC->Gspos("LP05", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY");
4577 dpgon[0] = offset2 + 360./(2.*39.);
4581 dpgon[4] = -(583./2.+(338.-56.))/10. - dpcb[2] * 2. + 10.5;
4585 dpgon[7] = -(583./2.+(338.-56.+15.))/10. - dpcb[2] * 2. + 10.5;
4592 gMC->Gsvolu("LP06", "PGON", idtmed[274], dpgon, 10);
4593 gMC->Gspos("LP06", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY");
4595 if (fMinorVersionV3 > 2 && fMinorVersionV3 < 6) {
4597 dpgon[0] = offset2 + 5.625;
4601 dpgon[4] = (40.-36.6) / TMath::Tan(45.*degrad) - (583./2.+(338.-106.))/10. - dpcb[2] * 2. + 10.5;
4602 // end-ladder electronics
4605 dpgon[7] = (40.-36.6) / TMath::Tan(45.*degrad) - (583./2.+(338.-106.+15.))/10. - dpcb[2] * 2. + 10.5;
4606 // end-ladder electr
4612 gMC->Gsvolu("LP05", "PGON", idtmed[274], dpgon, 10);
4613 gMC->Gspos("LP05", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY");
4615 dpgon[0] = offset2 + 5.;
4619 dpgon[4] = (45.-41.2) / TMath::Tan(45.*degrad) - (583./2.+(338.-56.))/10. - dpcb[2] * 2. + 10.5;
4620 // end-ladder electronics
4623 dpgon[7] = (45.-41.2) / TMath::Tan(45.*degrad) - (583./2.+(338.-56.+15.))/10. - dpcb[2] * 2. + 10.5;
4624 // end-ladder electr
4630 gMC->Gsvolu("LP06", "PGON", idtmed[274], dpgon, 10);
4631 gMC->Gspos("LP06", 1, "ITSV", xpos, ypos, zpos, 0, "ONLY");
4637 // --- Outputs the geometry tree in the EUCLID/CAD format
4640 gMC->WriteEuclid("ITSgeometry", "ITSV", 1, 5);
4642 fMinorVersion = fMinorVersionV3;
4644 //_____________________________________________________________________________
4645 void AliITSv3::CreateMaterials(){
4646 ////////////////////////////////////////////////////////////////////////
4647 // Create Materials for ITS as defined in AliITS::CreateMaterials().
4648 ////////////////////////////////////////////////////////////////////////
4649 AliITS::CreateMaterials();
4651 //_____________________________________________________________________________
4652 void AliITSv3::Init(){
4653 ////////////////////////////////////////////////////////////////////////
4654 // Initialise the ITS after it has been created.
4655 ////////////////////////////////////////////////////////////////////////
4659 fIdName = new char*[fIdN];
4660 fIdSens = new Int_t[fIdN];
4661 for(i=0;i<fId3N;i++) {
4662 l = strlen(fId3Name[i]);
4663 fIdName[i] = new char[l+1];
4664 for(j=0;j<l;j++) fIdName[i][j] = fId3Name[i][j];
4665 fIdName[i][l] = '\0'; // Null terminate this string.
4670 fMinorVersion = fMinorVersionV3;
4672 //_____________________________________________________________________________
4673 void AliITSv3::StepManager(){
4674 ////////////////////////////////////////////////////////////////////////
4675 // Called for every step in the ITS, then calles the AliITShit class
4676 // creator with the information to be recoreded about that hit.
4677 // The value of the macro ALIITSPRINTGEOM if set to 1 will allow the
4678 // printing of information to a file which can be used to create a .det
4679 // file read in by the routine CreateGeometry(). If set to 0 or any other
4680 // value except 1, the default behavior, then no such file is created nor
4681 // it the extra variables and the like used in the printing allocated.
4682 ////////////////////////////////////////////////////////////////////////
4686 TLorentzVector position, momentum;
4687 TClonesArray &lhits = *fHits;
4688 #if ALIITSPRINTGEOM==1
4691 Float_t xl[3],xt[3],angl[6];
4692 // Float_t par[20],att[20];
4694 static Bool_t first=kTRUE,printit[6][50][50];
4695 if(first){ for(copy1=0;copy1<6;copy1++)for(copy2=0;copy2<50;copy2++)
4696 for(id=0;id<50;id++) printit[copy1][copy2][id] = kTRUE;
4704 if(gMC->IsTrackInside()) vol[3] += 1;
4705 if(gMC->IsTrackEntering()) vol[3] += 2;
4706 if(gMC->IsTrackExiting()) vol[3] += 4;
4707 if(gMC->IsTrackOut()) vol[3] += 8;
4708 if(gMC->IsTrackDisappeared()) vol[3] += 16;
4709 if(gMC->IsTrackStop()) vol[3] += 32;
4710 if(gMC->IsTrackAlive()) vol[3] += 64;
4712 // Fill hit structure.
4713 if(!(gMC->TrackCharge())) return;
4715 // Only entering charged tracks
4716 if((id=gMC->CurrentVolID(copy))==fIdSens[0]) {
4718 id=gMC->CurrentVolOffID(1,copy);
4720 id=gMC->CurrentVolOffID(2,copy);
4722 } else if(id==fIdSens[1]) {
4724 id=gMC->CurrentVolOffID(1,copy);
4726 id=gMC->CurrentVolOffID(2,copy);
4728 } else if(id==fIdSens[2]) {
4731 id=gMC->CurrentVolOffID(1,copy);
4733 } else if(id==fIdSens[3]) {
4736 id=gMC->CurrentVolOffID(1,copy);
4738 } else if(id==fIdSens[4]) {
4741 id=gMC->CurrentVolOffID(1,copy);
4743 } else if(id==fIdSens[5]) {
4746 id=gMC->CurrentVolOffID(1,copy);
4749 gMC->TrackPosition(position);
4750 gMC->TrackMomentum(momentum);
4751 hits[0]=position[0];
4752 hits[1]=position[1];
4753 hits[2]=position[2];
4754 hits[3]=momentum[0];
4755 hits[4]=momentum[1];
4756 hits[5]=momentum[2];
4757 hits[6]=gMC->Edep();
4758 hits[7]=gMC->TrackTime();
4759 new(lhits[fNhits++]) AliITShit(fIshunt,gAlice->CurrentTrack(),vol,hits);
4760 #if ALIITSPRINTGEOM==1
4761 if(printit[vol[0]][vol[2]][vol[1]]){
4762 printit[vol[0]][vol[2]][vol[1]] = kFALSE;
4763 xl[0] = xl[1] = xl[2] = 0.0;
4764 gMC->Gdtom(xl,xt,1);
4765 for(i=0;i<9;i++) mat[i] = 0.0;
4766 mat[0] = mat[4] = mat[8] = 1.0; // default with identity matrix
4769 gMC->Gdtom(xl,&(mat[0]),2);
4772 gMC->Gdtom(xl,&(mat[3]),2);
4775 gMC->Gdtom(xl,&(mat[6]),2);
4777 angl[0] = TMath::ACos(mat[2]);
4778 if(mat[2]==1.0) angl[0] = 0.0;
4779 angl[1] = TMath::ATan2(mat[1],mat[0]);
4780 if(angl[1]<0.0) angl[1] += 2.0*TMath::Pi();
4782 angl[2] = TMath::ACos(mat[5]);
4783 if(mat[5]==1.0) angl[2] = 0.0;
4784 angl[3] = TMath::ATan2(mat[4],mat[3]);
4785 if(angl[3]<0.0) angl[3] += 2.0*TMath::Pi();
4787 angl[4] = TMath::ACos(mat[8]);
4788 if(mat[8]==1.0) angl[4] = 0.0;
4789 angl[5] = TMath::ATan2(mat[7],mat[6]);
4790 if(angl[5]<0.0) angl[5] += 2.0*TMath::Pi();
4792 for(i=0;i<6;i++) angl[i] *= 180.0/TMath::Pi(); // degrees
4793 // i = gMC->CurrentVolID(copy);
4794 // gMC->Gfpara(gMC->CurrentVolName(),copy,1,copy1,copy2,par,att);
4795 fp = fopen("ITSgeometry_v5.det","a");
4796 fprintf(fp,"%2d %2d %2d %9e %9e %9e %9e %9e %9e %9e %9e %9e ",
4797 vol[0],vol[2],vol[1], // layer ladder detector
4798 xt[0],xt[1],xt[2], // Translation vector
4799 angl[0],angl[1],angl[2],angl[3],angl[4],angl[5] // Geant rotaion
4802 fprintf(fp,"%9e %9e %9e %9e %9e %9e %9e %9e %9e",
4803 mat[0],mat[1],mat[2],mat[3],mat[4],mat[5],mat[6],mat[7],mat[8]
4804 ); // Adding the rotation matrix.
4807 } // end if printit[layer][ladder][detector]
4810 //____________________________________________________________________________
4811 void AliITSv3::Streamer(TBuffer &R__b){
4812 ////////////////////////////////////////////////////////////////////////
4813 // A dummy Streamer function for this class AliITSv3. By default it
4814 // only streams the AliITS class as it is required. Since this class
4815 // dosen't contain any "real" data to be saved, it doesn't.
4816 ////////////////////////////////////////////////////////////////////////
4817 if (R__b.IsReading()) {
4818 Version_t R__v = R__b.ReadVersion();
4820 AliITS::Streamer(R__b);
4821 // This information does not need to be read. It is "hard wired"
4822 // into this class via its creators.
4824 //R__b.ReadArray(fId3Name);
4828 R__b.WriteVersion(AliITSv3::IsA());
4829 AliITS::Streamer(R__b);
4830 // This information does not need to be saved. It is "hard wired"
4831 // into this class via its creators.
4833 //R__b.WriteArray(fId3Name, __COUNTER__);
4834 } // end if R__b.IsReading()