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 // Class AliMUONSt2GeometryBuilderV2
19 // -------------------------------
20 // MUON Station2 coarse geometry construction class.
21 //********************************************************************
22 // Author: SANJOY PAL ,Prof. SUKALYAN CHATTOPADHAYAY [SINP, KOLKATA]
23 // & Dr.SHAKEEL AHMAD (AMU), INDIA
24 //********************************************************************
27 #include <TVirtualMC.h>
28 #include <TGeoMatrix.h>
29 #include <Riostream.h>
34 #include "AliMUONSt2GeometryBuilderV2.h"
36 #include "AliMUONConstants.h"
37 #include "AliMUONGeometryModule.h"
38 #include "AliMUONGeometryEnvelopeStore.h"
39 #include "AliMUONConstants.h"
42 ClassImp(AliMUONSt2GeometryBuilderV2)
44 //______________________________________________________________________________
45 AliMUONSt2GeometryBuilderV2::AliMUONSt2GeometryBuilderV2(AliMUON* muon)
46 : AliMUONVGeometryBuilder(2, 3),
49 // Standard constructor
53 //______________________________________________________________________________
54 AliMUONSt2GeometryBuilderV2::AliMUONSt2GeometryBuilderV2()
55 : AliMUONVGeometryBuilder(),
58 // Default constructor
62 //______________________________________________________________________________
63 AliMUONSt2GeometryBuilderV2::AliMUONSt2GeometryBuilderV2(const AliMUONSt2GeometryBuilderV2& rhs)
64 : AliMUONVGeometryBuilder(rhs)
66 // Protected copy constructor
68 AliFatal("Copy constructor is not implemented.");
71 //______________________________________________________________________________
72 AliMUONSt2GeometryBuilderV2::~AliMUONSt2GeometryBuilderV2() {
76 //______________________________________________________________________________
77 AliMUONSt2GeometryBuilderV2&
78 AliMUONSt2GeometryBuilderV2::operator = (const AliMUONSt2GeometryBuilderV2& rhs)
80 // Protected assignement operator
82 // check assignement to self
83 if (this == &rhs) return *this;
85 AliFatal("Assignment operator is not implemented.");
94 //______________________________________________________________________________
95 void AliMUONSt2GeometryBuilderV2::CreateGeometry()
97 // From AliMUONv1::CreateGeometry()
100 //********************************************************************
102 //********************************************************************
103 // indices 1 and 2 for first and second chambers in the station
104 // iChamber (first chamber) kept for other quanties than Z,
105 // assumed to be the same in both chambers
107 // AliMUONChamber* iChamber = &fMUON->Chamber(2);
108 // AliMUONChamber* iChamber1 = iChamber;
109 // AliMUONChamber* iChamber2 = &fMUON->Chamber(3);
112 // Get tracking medias Ids
113 Int_t *idtmed = fMUON->GetIdtmed()->GetArray()-1099;
114 Int_t idAir = idtmed[1100]; // medium 1
115 Int_t idGas = idtmed[1108]; // medium Ar-CO2 gas (80%+20%)
116 Int_t idPCB = idtmed[1122]; // medium FR4
117 Int_t idCU = idtmed[1110]; // medium copper
118 Int_t idRoha = idtmed[1113]; // medium roha cell
119 Int_t idPGF30= idtmed[1123]; // medium for Frame Eq.to Bakelite
120 Int_t idScru = idtmed[1128]; // screw material - Stainless Steel(18%Cr,9%Ni,Fe)
123 Int_t irot1, irot2, irot3, irot4, irot5, irot6;
125 fMUON->AliMatrix(irot1, 90., 13., 90., 103., 0., 0.); //+13deg in x-y Plane
126 fMUON->AliMatrix(irot2, 90., 34., 90., 124., 0., 0.); // +34deg in x-y plane
127 fMUON->AliMatrix(irot3, 90., 56., 90., 146., 0., 0.); // +56 deg in x-y plane
128 fMUON->AliMatrix(irot4, 90., 76., 90., 166., 0., 0.); // +76 deg in x-y plane
129 fMUON->AliMatrix(irot5, 90., 90., 90., 180., 0., 0.); // +90 deg in x-y plane
130 fMUON->AliMatrix(irot6, 90., 22.5, 90., 112.5, 0., 0.); //22.5 deg in x-y Plane
132 /*########################################################################################
133 Create volume for one Quadrant connsist two plane
134 ##########################################################################################*/
138 tpar1[2] = 6.55555/2;
143 gMC->Gsvolu("SQM3","TUBS", idAir, tpar1, 5);
144 gMC->Gsvolu("SQM4","TUBS", idAir, tpar1, 5);
148 //==================================================================================
149 // Plane - 1 L is used for one Plane while
151 //==================================================================================
153 //Thickness of variour parts
154 Float_t zcbb = 0.04; //cathode pcb
155 Float_t zcu = 0.004; // eff. cu in cathode pcb
156 Float_t zRoha = 2.5; // Rhocell
157 Float_t zmeb = 0.08; //Mech. exit board
158 Float_t zcu2 = 0.02; //Effective electronic exit board
159 //Z-positions of various parts--- in Plane-1
161 Float_t zpos_cbb = 0.25; // 2.5 mm => gap between anode & chatode plane
162 Float_t zpos_cu = zcbb;
163 Float_t zpos_Roha = zcu;
164 Float_t zpos_meb = zmeb;
165 Float_t zpos_cu2 = zcu2;
167 Float_t zpos_cbb_bar = zpos_cbb + zcbb/2.; //for segment 0 & 6
168 Float_t zpos_cubar = zcbb/2. + zcu/2.;
169 Float_t zpos_Roha_bar = zcu/2. + zRoha/2.;
170 Float_t zpos_meb_bar = zRoha/2. + zmeb/2.;
171 Float_t zpos_eeb_bar = zmeb/2. + zcu2/2.;
174 //Cathode PCB + Copper sheet + Rohacell + mech exit board + eff. electronic exit board
176 //Segment-0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
181 gMC->Gsvolu("CB0L", "BOX", idPCB, bpar_h, 3);
183 bpar_h[2] = zcu/2.; //Thickness of Copper sheet
184 gMC->Gsvolu("CU0L", "BOX", idCU, bpar_h, 3);
186 bpar_h[2] = zRoha/2.; //Thickness of Roha cell
187 gMC->Gsvolu("RH0L", "BOX", idRoha, bpar_h, 3);
189 bpar_h[0] = (100.6/2)-(0.9/2);
192 gMC->Gsvolu("MB0L", "BOX", idPCB, bpar_h, 3);
195 gMC->Gsvolu("EB0L", "BOX", idCU, bpar_h, 3);
197 //Segment-1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
206 pgpar[7] = pgpar[4] + zcbb;
209 gMC->Gsvolu("CB1L", "PGON", idPCB, pgpar, 10);
211 pgpar[7] = pgpar[4] + zcu; // Thickness of copper-sheet
212 gMC->Gsvolu("CU1L", "PGON", idCU, pgpar, 10);
214 pgpar[7] = pgpar[4] + zRoha; // Thickness of Roha cell
215 gMC->Gsvolu("RH1L", "PGON", idRoha, pgpar, 10);
217 pgpar[5] = 21.5; // radius of inner rib
219 pgpar[7] = pgpar[4] + zmeb;
222 gMC->Gsvolu("MB1L", "PGON", idPCB, pgpar, 10);
224 pgpar[7] = pgpar[4] + zcu2;
225 gMC->Gsvolu("EB1L", "PGON", idCU, pgpar, 10);
227 //Segment-2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
235 pgpar[7] = pgpar[4] +zcbb;
238 gMC->Gsvolu("CB2L", "PGON", idPCB, pgpar, 10);
240 pgpar[7] = pgpar[4] + zcu; // Thickness of copper-sheet
241 gMC->Gsvolu("CU2L", "PGON", idCU, pgpar, 10);
243 pgpar[7] = pgpar[4] + zRoha; // Thickness of Roha cell
244 gMC->Gsvolu("RH2L", "PGON", idRoha, pgpar, 10);
246 pgpar[5] = 21.5; // radius of inner rib
248 pgpar[7] = pgpar[4] + zmeb;
251 gMC->Gsvolu("MB2L", "PGON", idPCB, pgpar, 10);
253 pgpar[7] = pgpar[4] + zcu2;
254 gMC->Gsvolu("EB2L", "PGON", idCU, pgpar, 10);
256 //Segment-3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
264 pgpar[7] = pgpar[4] + zcbb;
267 gMC->Gsvolu("CB3L", "PGON", idPCB, pgpar, 10);
269 pgpar[7] = pgpar[4] + zcu; // Thickness of copper-sheet
270 gMC->Gsvolu("CU3L", "PGON", idCU, pgpar, 10);
272 pgpar[7] = pgpar[4] + zRoha; // Thickness of Roha cell
273 gMC->Gsvolu("RH3L", "PGON", idRoha, pgpar, 10);
275 pgpar[5] = 21.5; // radius of inner rib
277 pgpar[7] = pgpar[4] + zmeb;
280 gMC->Gsvolu("MB3L", "PGON", idPCB, pgpar, 10);
282 pgpar[7] = pgpar[4] + zcu2;
283 gMC->Gsvolu("EB3L", "PGON", idCU, pgpar, 10);
285 //Segment-4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
293 pgpar[7] = pgpar[4] + zcbb;
296 gMC->Gsvolu("CB4L", "PGON", idPCB, pgpar, 10);
298 pgpar[7] = pgpar[4] + zcu; // Thickness of copper-sheet
299 gMC->Gsvolu("CU4L", "PGON", idCU, pgpar, 10);
301 pgpar[7] = pgpar[4] + zRoha; // Thickness of Roha cell
302 gMC->Gsvolu("RH4L", "PGON", idRoha, pgpar, 10);
304 pgpar[5] = 21.5; // radius of inner rib
306 pgpar[7] = pgpar[4] + zmeb;
309 gMC->Gsvolu("MB4L", "PGON", idPCB, pgpar, 10);
311 pgpar[7] = pgpar[4] + zcu2;
312 gMC->Gsvolu("EB4L", "PGON", idCU, pgpar, 10);
314 //Segment-5 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
322 pgpar[7] = pgpar[4] + zcbb;
325 gMC->Gsvolu("CB5L", "PGON", idPCB, pgpar, 10);
327 pgpar[7] = pgpar[4] + zcu; // Thickness of copper-sheet
328 gMC->Gsvolu("CU5L", "PGON", idCU, pgpar, 10);
330 pgpar[7] = pgpar[4] + zRoha; // Thickness of Roha cell
331 gMC->Gsvolu("RH5L", "PGON", idRoha, pgpar, 10);
333 pgpar[5] = 21.5;// radius of inner rib
335 pgpar[7] = pgpar[4] + zmeb;
338 gMC->Gsvolu("MB5L", "PGON", idPCB, pgpar, 10);
340 pgpar[7] = pgpar[4] + zcu2;
341 gMC->Gsvolu("EB5L", "PGON", idCU, pgpar, 10);
343 //Segment-6 - vertical box ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
350 gMC->Gsvolu("CB6L", "BOX", idPCB, bpar_v, 3);
353 gMC->Gsvolu("CU6L", "BOX", idCU, bpar_v, 3);
355 bpar_v[2] = zRoha/2.;
356 gMC->Gsvolu("RH6L", "BOX", idRoha, bpar_v, 3);
359 bpar_v[1] = (97.9/2)-(0.9/2.);
361 gMC->Gsvolu("MB6L", "BOX", idPCB, bpar_v, 3);
364 gMC->Gsvolu("EB6L", "BOX", idCU, bpar_v, 3);
366 //...........................................................................................
367 //Positioning of Electronic exit board
368 gMC->Gspos("EB0L",1, "MB0L", 0.,0.,zpos_eeb_bar,0, "only");
369 gMC->Gspos("EB1L",1, "MB1L", 0.,0.,zpos_cu2,0, "only");
370 gMC->Gspos("EB2L",1, "MB2L", 0.,0.,zpos_cu2,0, "only");
371 gMC->Gspos("EB3L",1, "MB3L", 0.,0.,zpos_cu2,0, "only");
372 gMC->Gspos("EB4L",1, "MB4L", 0.,0.,zpos_cu2,0, "only");
373 gMC->Gspos("EB5L",1, "MB5L", 0.,0.,zpos_cu2,0, "only");
374 gMC->Gspos("EB6L",1, "MB6L", 0.,0.,zpos_eeb_bar,0, "only");
376 //Positioning of Mech. exit board
377 Float_t xpos_meb_hor = 1.10;
378 Float_t ypos_meb_hor = -0.60;
380 Float_t xpos_meb_ver = -0.60;
381 Float_t ypos_meb_ver = -0.35;
383 gMC->Gspos("MB0L",1, "RH0L", xpos_meb_hor,ypos_meb_hor,zpos_meb_bar,0, "only");
384 gMC->Gspos("MB1L",1, "RH1L", 0.,0.,zpos_meb,0, "only");
385 gMC->Gspos("MB2L",1, "RH2L", 0.,0.,zpos_meb,0, "only");
386 gMC->Gspos("MB3L",1, "RH3L", 0.,0.,zpos_meb,0, "only");
387 gMC->Gspos("MB4L",1, "RH4L", 0.,0.,zpos_meb,0, "only");
388 gMC->Gspos("MB5L",1, "RH5L", 0.,0.,zpos_meb,0, "only");
389 gMC->Gspos("MB6L",1, "RH6L", xpos_meb_ver,ypos_meb_ver,zpos_meb_bar,0, "only");
391 //Positioning Roha cell over copper sheet
392 gMC->Gspos("RH0L",1, "CU0L", 0.,0.,zpos_Roha_bar,0, "only");// box horizontal
393 gMC->Gspos("RH1L",1, "CU1L", 0.,0.,zpos_Roha,0, "only");
394 gMC->Gspos("RH2L",1, "CU2L", 0.,0.,zpos_Roha,0, "only");
395 gMC->Gspos("RH3L",1, "CU3L", 0.,0.,zpos_Roha,0, "only");
396 gMC->Gspos("RH4L",1, "CU4L", 0.,0.,zpos_Roha,0, "only");
397 gMC->Gspos("RH5L",1, "CU5L", 0.,0.,zpos_Roha,0, "only");
398 gMC->Gspos("RH6L",1, "CU6L", 0.,0.,zpos_Roha_bar,0, "only");
400 //Positioning Copper sheet over PCB
401 gMC->Gspos("CU0L",1, "CB0L", 0.,0.,zpos_cubar,0, "only");// box horizontal
402 gMC->Gspos("CU1L",1, "CB1L", 0.,0.,zpos_cu,0, "only");
403 gMC->Gspos("CU2L",1, "CB2L", 0.,0.,zpos_cu,0, "only");
404 gMC->Gspos("CU3L",1, "CB3L", 0.,0.,zpos_cu,0, "only");
405 gMC->Gspos("CU4L",1, "CB4L", 0.,0.,zpos_cu,0, "only");
406 gMC->Gspos("CU5L",1, "CB5L", 0.,0.,zpos_cu,0, "only");
407 gMC->Gspos("CU6L",1, "CB6L", 0.,0.,zpos_cubar,0, "only");
410 //Positioning the PCB
411 Float_t x_hor_pos = 95.5/2.+ 22.6; // 22.6 is inner radius of PCB
412 Float_t y_hor_pos = -(1.6/2); //
414 Float_t x_ver_pos = -(1.6/2); //
415 Float_t y_ver_pos = 95.5/2.+ 22.6; //
418 gMC->Gspos("CB0L",1, "SQM3", x_hor_pos,y_hor_pos,zpos_cbb_bar,0, "only");// box horizontal
419 gMC->Gspos("CB1L",1, "SQM3", 0.,0.,zpos_cbb,0, "only");
420 gMC->Gspos("CB2L",1, "SQM3", 0.,0.,zpos_cbb,irot1,"only");
421 gMC->Gspos("CB3L",1, "SQM3", 0.,0.,zpos_cbb,irot2, "only");
422 gMC->Gspos("CB4L",1, "SQM3", 0.,0.,zpos_cbb,irot3, "only");
423 gMC->Gspos("CB5L",1, "SQM3", 0.,0.,zpos_cbb,irot4, "only");
424 gMC->Gspos("CB6L",1, "SQM3", x_ver_pos,y_ver_pos,zpos_cbb_bar,0, "only");// box vertical
427 gMC->Gspos("CB0L",1, "SQM4", x_hor_pos,y_hor_pos,zpos_cbb_bar,0, "only");// box horizontal
428 gMC->Gspos("CB1L",1, "SQM4", 0.,0.,zpos_cbb,0, "only");
429 gMC->Gspos("CB2L",1, "SQM4", 0.,0.,zpos_cbb,irot1,"only");
430 gMC->Gspos("CB3L",1, "SQM4", 0.,0.,zpos_cbb,irot2, "only");
431 gMC->Gspos("CB4L",1, "SQM4", 0.,0.,zpos_cbb,irot3, "only");
432 gMC->Gspos("CB5L",1, "SQM4", 0.,0.,zpos_cbb,irot4, "only");
433 gMC->Gspos("CB6L",1, "SQM4", x_ver_pos,y_ver_pos,zpos_cbb,0, "only");// box vertical
435 //----------------------------------------------------------------------
437 //----------------------------------------------------------------------
439 Float_t frame1[3] ; //Index-1 is used for horizontal frame bar
440 frame1[0] = 100.6/2.; //and 2,3,4..... is used for the next frames
441 frame1[1] = 2.5/2.; //from hor. to the vertical
445 rib1[0] = frame1[0] - 0.9/2.;
449 Float_t xpos_fr1 = frame1[0] + 20.6;
450 Float_t ypos_fr1 = -3.7 + frame1[1] ;
451 Float_t zpos_fr1 = frame1[2];
453 Float_t xpos_rb1 = 0.9/2;
454 Float_t ypos_rb1 = -frame1[1] + rib1[1]+0.9;
455 Float_t zpos_rb1 = frame1[2] + rib1[2];
457 gMC->Gsvolu("FRHL", "BOX", idPGF30, frame1, 3); //Frame - 1
458 gMC->Gsvolu("RBHL", "BOX", idPGF30, rib1, 3); //Rib - 1
460 //Fixing Screws ...........................................
461 //---------screw parameters (on frame) M4 ------------------
462 //in this plane screw-length is taken eq. to thickness of frame/frame+rib
463 // the remaining of the actual size is adjusted in the other plane
471 s_head[0] = 0.0; // screw-head
475 Float_t xpos_h = 0.0;
476 Float_t ypos_h = 0.0;
477 Float_t zpos_h = spar[2] + s_head[2];
479 gMC->Gsvolu("SCHL","TUBE",idScru, spar,3); //screw-vertical part for Frame M4
480 gMC->Gsvolu("HDFL","TUBE",idScru, s_head,3); //screw-head
481 //positioning head over screws
482 gMC->Gspos("HDFL",1,"SCHL",xpos_h,ypos_h,zpos_h,0,"ONLY");//positioning Screw-head
485 Float_t xpos_s = frame1[0] - 0.4;
486 Float_t ypos_s = -frame1[1] + 0.4;
487 Float_t zpos_s = 0.0;
489 Int_t Tot_Scru1 = 21; //Total no. of Scru
490 for(Int_t nos1 = 0; nos1 < Tot_Scru1; nos1++)
492 gMC->Gspos("SCHL",nos1+1,"FRHL",xpos_s,ypos_s,zpos_s,0,"ONLY");
494 } // nos1 is no. of scru
496 gMC->Gspos("RBHL",1, "FRHL", xpos_rb1, ypos_rb1, zpos_rb1,0, "only");// Rib-1
497 // gMC->Gspos("FRHL",1, "SQM3", xpos_fr1, ypos_fr1, zpos_fr1,0, "only");// frame -1
498 // gMC->Gspos("FRHL",1, "SQM4", xpos_fr1, ypos_fr1, zpos_fr1,0, "only");// frame -1
500 //......................................................................................
506 frame2[2] = frame1[2];
508 Float_t xpos_fr2 = frame1[0] -frame2[0];
509 Float_t ypos_fr2 = frame2[1]+frame1[1] ;
510 Float_t zpos_fr2 = 0.;
514 rib2[1] = frame2[1]+0.6;
517 Float_t xpos_rb2 = frame2[0] - rib2[0];
518 Float_t ypos_rb2 = - 0.6/2;
519 Float_t zpos_rb2 = frame2[2] + rib2[2];
521 gMC->Gsvolu("FR1L", "BOX", idPGF30, frame2, 3); //Frame - 2
522 gMC->Gsvolu("RB1L", "BOX", idPGF30, rib2, 3); //Rib - 2
524 //Fixing Screws ...........................................
525 //screw parameters (on Ribs) M4 x 65
526 //Head size & positions remianing the same-----------
531 gMC->Gsvolu("SCRL","TUBE",idScru, spar2,3); //screw-vertical part for Rib m4 x 65
532 //positioning head over screws
533 Float_t xpos2_h = 0.0;
534 Float_t ypos2_h = 0.0;
535 Float_t zpos2_h = spar2[2] + s_head[2];
536 gMC->Gspos("HDFL",2,"SCRL",xpos2_h,ypos2_h,zpos2_h,0,"ONLY");//positioning Screw-head
538 Float_t xpos2_s = -rib2[0] + 0.4;
539 Float_t ypos2_s = -rib2[1] + 1.7;
540 Float_t zpos2_s = -frame2[2];
542 Int_t Tot_Scru2 = 6; // 6 screws
543 for(Int_t nos2 = 0; nos2 < Tot_Scru2; nos2++)
545 gMC->Gspos("SCRL",nos2+1,"RB1L",xpos2_s,ypos2_s,zpos2_s,0,"ONLY");
549 gMC->Gspos("RB1L",1, "FR1L", xpos_rb2, ypos_rb2, zpos_rb2,0, "only");
550 gMC->Gspos("FR1L",1, "FRHL", xpos_fr2, ypos_fr2, zpos_fr2,0, "only");
552 //......................................................................................
557 frame3[1] = 40.67/2.;
558 frame3[2] = frame1[2];
559 Float_t bend_ang = (22.5*PI/180.); //bending angle of frame-3 w.r.t frame-2
561 Float_t xpos_fr3 =-frame3[1]* sin(bend_ang);
562 Float_t ypos_fr3 = frame2[1]+(frame3[1]*cos(bend_ang)-frame3[0]* sin(bend_ang));
563 Float_t zpos_fr3 = 0.;
565 //Frame part extended inside
569 fr_ex[2] = frame1[2];
571 Float_t xpos_ex = -frame3[0] - fr_ex[0];
572 Float_t ypos_ex = 0.0;
573 Float_t zpos_ex = 0.0;
580 Float_t xpos_rb3 = frame3[0] - rib3[0];
581 Float_t ypos_rb3 = 0.0;
582 Float_t zpos_rb3 = frame3[2] + rib3[2];
584 gMC->Gsvolu("FR2L", "BOX", idPGF30, frame3, 3); //Frame - 3
585 gMC->Gsvolu("FEXL", "BOX", idPGF30, fr_ex, 3); //frame- extended part
586 gMC->Gsvolu("RB2L", "BOX", idPGF30, rib3, 3); //Rib - 3
588 Float_t xpos3_s = -rib3[0] + 0.4;
589 Float_t ypos3_s = -rib3[1] + 1.1;
590 Float_t zpos3_s = -frame3[2];
592 Int_t Tot_Scru3 = Tot_Scru2 + 9; //Toal screw on this rib is 9--index continues
593 for(Int_t nos3 = Tot_Scru2; nos3 < Tot_Scru3; nos3++)
595 gMC->Gspos("SCRL",nos3+1,"RB2L",xpos3_s,ypos3_s,zpos3_s,0,"ONLY");
599 gMC->Gspos("FEXL",1, "FR2L", xpos_ex, ypos_ex, zpos_ex,0, "only");
600 gMC->Gspos("RB2L",1, "FR2L", xpos_rb3, ypos_rb3, zpos_rb3,0, "only");
601 gMC->Gspos("FR2L",1, "FR1L", xpos_fr3, ypos_fr3, zpos_fr3,irot6, "only");
602 //......................................................................................
607 frame4[1] = 52.54/2.;
608 frame4[2] = frame1[2];
610 Float_t xpos_fr4 =-frame4[1]* sin(bend_ang);
611 Float_t ypos_fr4 = frame3[1]+(frame4[1]*cos(bend_ang)-frame4[0]* sin(bend_ang));
612 Float_t zpos_fr4 =0.;
619 Float_t xpos_rb4 = frame4[0] - rib4[0];
620 Float_t ypos_rb4 = 0.0;
621 Float_t zpos_rb4 = frame4[2] + rib4[2];
623 gMC->Gsvolu("FR3L", "BOX", idPGF30, frame4, 3); //Frame - 4
624 gMC->Gsvolu("RB3L", "BOX", idPGF30, rib4, 3); //Rib - 4
626 Float_t xpos4_s = -rib4[0] + 0.4;
627 Float_t ypos4_s = -rib4[1] + 4.33;
628 Float_t zpos4_s = -frame4[2];
630 Int_t Tot_Scru4 = Tot_Scru3 + 10; //Toal screw on this rib is 10--index continues
631 for(Int_t nos4 = Tot_Scru3; nos4 < Tot_Scru4; nos4++)
633 gMC->Gspos("SCRL",nos4+1,"RB3L",xpos4_s,ypos4_s,zpos4_s,0,"ONLY");
637 gMC->Gspos("RB3L",1, "FR3L", xpos_rb4, ypos_rb4, zpos_rb4,0, "only");
638 gMC->Gspos("FR3L",1, "FR2L", xpos_fr4, ypos_fr4, zpos_fr4,irot6, "only");
639 //......................................................................................
645 frame5[2] = frame1[2];
647 Float_t xpos_fr5 =-frame5[1]*sin(bend_ang);
648 Float_t ypos_fr5 = frame4[1]+(frame5[1]*cos(bend_ang)-frame5[0]* sin(bend_ang));
649 Float_t zpos_fr5 = 0.;
656 Float_t xpos_rb5 = frame5[0] - rib5[0];
657 Float_t ypos_rb5 = 0.0;
658 Float_t zpos_rb5 = frame5[2] + rib5[2];
660 gMC->Gsvolu("FR4L", "BOX", idPGF30, frame5, 3); //Frame - 5
661 gMC->Gsvolu("RB4L", "BOX", idPGF30, rib5, 3); //Rib - 5
663 Float_t xpos5_s = -rib5[0] + 0.4;
664 Float_t ypos5_s = -rib5[1] + 2.79;
665 Float_t zpos5_s = -frame5[2];
667 Int_t Tot_Scru5 = Tot_Scru4 + 8; //Toal screw on this rib is 8--index continues
668 for(Int_t nos5 = Tot_Scru4; nos5 < Tot_Scru5; nos5++)
670 gMC->Gspos("SCRL",nos5+1,"RB4L",xpos5_s,ypos5_s,zpos5_s,0,"ONLY");
674 gMC->Gspos("RB4L",1, "FR4L", xpos_rb5, ypos_rb5, zpos_rb5,0, "only");
675 gMC->Gspos("FR4L",1, "FR3L", xpos_fr5, ypos_fr5, zpos_fr5,irot6, "only");
676 //......................................................................................
681 frame6[1] = 30.84/2.;
682 frame6[2] = frame1[2];
684 Float_t xpos_fr6 = (-frame6[1]*sin(bend_ang))+0.5;
685 Float_t ypos_fr6 = frame5[1]+(frame6[1]*cos(bend_ang)-frame6[0]* sin(bend_ang));
686 Float_t zpos_fr6 = 0;
690 rib6[1] = frame6[1]+0.8;
693 Float_t xpos_rb6 = frame6[0] - rib6[0];
694 Float_t ypos_rb6 = 0.4;
695 Float_t zpos_rb6 = frame6[2] + rib6[2];
697 gMC->Gsvolu("FR5L", "BOX", idPGF30, frame6, 3); //Frame - 6
698 gMC->Gsvolu("RB5L", "BOX", idPGF30, rib6, 3); //Rib - 6
700 Float_t xpos6_s = -rib6[0] + 0.4;
701 Float_t ypos6_s = -rib6[1] + 1.36;
702 Float_t zpos6_s = -frame6[2];
704 Int_t Tot_Scru6 = Tot_Scru5 + 6; //Toal screw on this rib is 7--index continues
705 for(Int_t nos6 = Tot_Scru5; nos6 < Tot_Scru6; nos6++)
707 gMC->Gspos("SCRL",nos6+1,"RB5L",xpos6_s,ypos6_s,zpos6_s,0,"ONLY");
711 gMC->Gspos("RB5L",1, "FR5L", xpos_rb6, ypos_rb6, zpos_rb6,0, "only");
712 gMC->Gspos("FR5L",1, "FR4L", xpos_fr6, ypos_fr6, zpos_fr6,irot6, "only");
713 //......................................................................................
714 //Frame-7 Vertical frame
723 rib7[1] = frame7[1] - .9/2.;
726 Float_t xpos_fr7 = frame7[0] -3.7;
727 Float_t ypos_fr7 = frame7[1] +20.6;
728 Float_t zpos_fr7 = frame7[2];
730 Float_t xpos_rb7 = -frame7[0] + rib7[0]+0.9;
731 Float_t ypos_rb7 = .9/2.;
732 Float_t zpos_rb7 = frame7[2] + rib7[2];
734 gMC->Gsvolu("FRVL", "BOX", idPGF30, frame7, 3); //Frame - vertical
735 gMC->Gsvolu("RBVL", "BOX", idPGF30, rib7, 3); //Rib
737 //Fixing Screws-- screw parameter and screw-head are taken from horizontal frame bar
738 gMC->Gsvolu("SCVL","TUBE",idScru, spar,3); //screw-vertical part for Frame M4 x 25
739 //positioning head over screws
740 gMC->Gspos("HDFL",3,"SCVL",xpos_h,ypos_h,zpos_h,0,"ONLY");//positioning Screw-head
742 Float_t xposv_s = -frame7[0] + 0.4;
743 Float_t yposv_s = -frame7[1] + 0.4;
744 Float_t zposv_s = 0.0;
746 Int_t Tot_Scru_v = 20; //Total no. of Screws
747 for(Int_t nos_v = 0; nos_v < Tot_Scru_v; nos_v++)
749 gMC->Gspos("SCVL",nos_v+1,"FRVL",xposv_s,yposv_s,zposv_s,0,"ONLY");
751 } // nos2 is no. of scru
753 gMC->Gspos("RBVL",1, "FRVL", xpos_rb7, ypos_rb7, zpos_rb7,0, "only");
754 // gMC->Gspos("FRVL",1, "SQM3", xpos_fr7, ypos_fr7, zpos_fr7,0, "only");// frame vertical
755 // gMC->Gspos("FRVL",1, "SQM4", xpos_fr7, ypos_fr7, zpos_fr7,0, "only");// frame vertical
757 //......................................................................................
759 Float_t fr_c[5]; //semi-circular frame
766 Float_t xpos_frc = 0.0;
767 Float_t ypos_frc = 0.0;
768 Float_t zpos_frc = fr_c[2];
774 rib_c[3] = fr_c[3]-2.0;
775 rib_c[4] = fr_c[4]+2.0;
777 Float_t xpos_rc = 0.0;
778 Float_t ypos_rc = 0.0;
779 Float_t zpos_rc = fr_c[2] + rib_c[2];
781 gMC->Gsvolu("FRCL", "TUBS", idPGF30, fr_c, 5); //Frame - semi circular
782 gMC->Gsvolu("RBCL", "TUBS", idPGF30, rib_c, 5); //Rib
785 gMC->Gsvolu("SCYL","TUBE",idScru, spar,3); //screw-vertical part for extended part in -Y
786 gMC->Gsvolu("SCIL","TUBE",idScru, spar,3); //screw-vertical part
787 gMC->Gsvolu("SCXL","TUBE",idScru, spar,3); //screw-vertical part for extended part in -X
788 gMC->Gspos("HDFL",3,"SCIL",xpos_h,ypos_h,zpos_h,0,"ONLY");//positioning Screw-head
791 Float_t zpos_is2 = 0.0;
793 Float_t radius = fr_c[0] + 0.4 ; //inner radius + 0.4
794 Float_t arc = 3.667; // for 10-degree angle
795 for(Int_t i = 0; i<8; i++)
797 theta[i] = arc/radius;
798 Float_t xpos_is2 = radius * cos(theta[i]);
799 Float_t ypos_is2 = radius * sin(theta[i]);
800 gMC->Gspos("SCIL",i+1,"FRCL",xpos_is2, ypos_is2, zpos_is2,0,"ONLY");
806 gMC->Gspos("RBCL",1, "FRCL", xpos_rc, ypos_rc, zpos_rc,0, "only"); //Rib
808 gMC->Gspos("FRHL",1, "SQM3", xpos_fr1, ypos_fr1, zpos_fr1,0, "only");// frame -1
809 gMC->Gspos("FRHL",1, "SQM4", xpos_fr1, ypos_fr1, zpos_fr1,0, "only");// frame -1
811 gMC->Gspos("FRVL",1, "SQM3", xpos_fr7, ypos_fr7, zpos_fr7,0, "only");// frame vertical
812 gMC->Gspos("FRVL",1, "SQM4", xpos_fr7, ypos_fr7, zpos_fr7,0, "only");// frame vertical
814 gMC->Gspos("FRCL",1, "SQM3", xpos_frc, ypos_frc, zpos_frc,0, "only");// frame semi circular
815 gMC->Gspos("FRCL",1, "SQM4", xpos_frc, ypos_frc, zpos_frc,0, "only");// frame semi circular
817 //=============================================================================================
821 //=============================================================================================
823 //Cathode PCB + Copper sheet over PCB + Roha cell over copper sheet
829 gMC->Gsvolu("CB0R", "BOX", idPCB, bpar_h, 3);
831 bpar_h[2] = zcu/2.; //Thickness of Copper sheet
832 gMC->Gsvolu("CU0R", "BOX", idCU, bpar_h, 3);
834 bpar_h[2] = zRoha/2.; //Thickness of Roha cell
835 gMC->Gsvolu("RH0R", "BOX", idRoha, bpar_h, 3);
837 bpar_h[0] = (100.6/2)-(0.9/2);
840 gMC->Gsvolu("MB0R", "BOX", idPCB, bpar_h, 3);
843 gMC->Gsvolu("EB0R", "BOX", idCU, bpar_h, 3);
849 pgpar[7] = pgpar[4] - zcbb;
852 gMC->Gsvolu("CB1R", "PGON", idPCB, pgpar, 10);
854 pgpar[7] = pgpar[4] - zcu; // Thickness of copper-sheet
855 gMC->Gsvolu("CU1R", "PGON", idCU, pgpar, 10);
857 pgpar[7] = pgpar[4] - zRoha; // Thickness of Roha cell
858 gMC->Gsvolu("RH1R", "PGON", idRoha, pgpar, 10);
860 pgpar[5] = 21.5; // radius of inner rib
862 pgpar[7] = pgpar[4] - zmeb;
865 gMC->Gsvolu("MB1R", "PGON", idPCB, pgpar, 10);
867 pgpar[7] = pgpar[4] - zcu2;
868 gMC->Gsvolu("EB1R", "PGON", idCU, pgpar, 10);
875 pgpar[7] = pgpar[4] - zcbb;
878 gMC->Gsvolu("CB2R", "PGON", idPCB, pgpar, 10);
880 pgpar[7] = pgpar[4] - zcu; // Thickness of copper-sheet
881 gMC->Gsvolu("CU2R", "PGON", idCU, pgpar, 10);
883 pgpar[7] = pgpar[4] - zRoha; // Thickness of Roha cell
884 gMC->Gsvolu("RH2R", "PGON", idRoha, pgpar, 10);
886 pgpar[5] = 21.5; // radius of inner rib
888 pgpar[7] = pgpar[4] - zmeb;
891 gMC->Gsvolu("MB2R", "PGON", idPCB, pgpar, 10);
893 pgpar[7] = pgpar[4] - zcu2;
894 gMC->Gsvolu("EB2R", "PGON", idCU, pgpar, 10);
901 pgpar[7] = pgpar[4] - zcbb;
904 gMC->Gsvolu("CB3R", "PGON", idPCB, pgpar, 10);
906 pgpar[7] = pgpar[4] - zcu; // Thickness of copper-sheet
907 gMC->Gsvolu("CU3R", "PGON", idCU, pgpar, 10);
909 pgpar[7] = pgpar[4] - zRoha; // Thickness of Roha cell
910 gMC->Gsvolu("RH3R", "PGON", idRoha, pgpar, 10);
912 pgpar[5] = 21.5; // radius of inner rib
914 pgpar[7] = pgpar[4] - zmeb;
917 gMC->Gsvolu("MB3R", "PGON", idPCB, pgpar, 10);
919 pgpar[7] = pgpar[4] - zcu2;
920 gMC->Gsvolu("EB3R", "PGON", idCU, pgpar, 10);
927 pgpar[7] = pgpar[4] - zcbb;
930 gMC->Gsvolu("CB4R", "PGON", idPCB, pgpar, 10);
932 pgpar[7] = pgpar[4] - zcu; // Thickness of copper-sheet
933 gMC->Gsvolu("CU4R", "PGON", idCU, pgpar, 10);
935 pgpar[7] = pgpar[4] - zRoha; // Thickness of Roha cell
936 gMC->Gsvolu("RH4R", "PGON", idRoha, pgpar, 10);
938 pgpar[5] = 21.5; // radius of inner rib
940 pgpar[7] = pgpar[4] - zmeb;
943 gMC->Gsvolu("MB4R", "PGON", idPCB, pgpar, 10);
945 pgpar[7] = pgpar[4] - zcu2;
946 gMC->Gsvolu("EB4R", "PGON", idCU, pgpar, 10);
953 pgpar[7] = pgpar[4] - zcbb;
956 gMC->Gsvolu("CB5R", "PGON", idPCB, pgpar, 10);
958 pgpar[7] = pgpar[4] - zcu; // Thickness of copper-sheet
959 gMC->Gsvolu("CU5R", "PGON", idCU, pgpar, 10);
961 pgpar[7] = pgpar[4] - zRoha; // Thickness of Roha cell
962 gMC->Gsvolu("RH5R", "PGON", idRoha, pgpar, 10);
964 pgpar[5] = 21.5;// radius of inner rib
966 pgpar[7] = pgpar[4] - zmeb;
969 gMC->Gsvolu("MB5R", "PGON", idPCB, pgpar, 10);
971 pgpar[7] = pgpar[4] - zcu2;
972 gMC->Gsvolu("EB5R", "PGON", idCU, pgpar, 10);
974 //Segment-6 - vertical box
979 gMC->Gsvolu("CB6R", "BOX", idPCB, bpar_v, 3);
981 gMC->Gsvolu("CU6R", "BOX", idCU, bpar_v, 3);
983 bpar_v[2] = zRoha/2.;
984 gMC->Gsvolu("RH6R", "BOX", idRoha, bpar_v, 3);
987 bpar_v[1] = (97.9/2)-(0.9/2.);
989 gMC->Gsvolu("MB6R", "BOX", idPCB, bpar_v, 3);
992 gMC->Gsvolu("EB6R", "BOX", idCU, bpar_v, 3);
995 //...........................................................................................
996 //Positioning of Electronic exit board
997 gMC->Gspos("EB0R",1, "MB0R", 0.,0.,-zpos_eeb_bar,0, "only");
998 gMC->Gspos("EB1R",1, "MB1R", 0.,0.,-zpos_cu2,0, "only");
999 gMC->Gspos("EB2R",1, "MB2R", 0.,0.,-zpos_cu2,0, "only");
1000 gMC->Gspos("EB3R",1, "MB3R", 0.,0.,-zpos_cu2,0, "only");
1001 gMC->Gspos("EB4R",1, "MB4R", 0.,0.,-zpos_cu2,0, "only");
1002 gMC->Gspos("EB5R",1, "MB5R", 0.,0.,-zpos_cu2,0, "only");
1003 gMC->Gspos("EB6R",1, "MB6R", 0.,0.,-zpos_eeb_bar,0, "only");
1005 //Positioning of Mech. exit board
1007 ypos_meb_hor = -0.6;
1008 xpos_meb_ver = -0.6;
1009 ypos_meb_ver = -0.35;
1011 gMC->Gspos("MB0R",1, "RH0R", xpos_meb_hor,ypos_meb_hor,-zpos_meb_bar,0, "only");
1012 gMC->Gspos("MB1R",1, "RH1R", 0.,0.,-zpos_meb,0, "only");
1013 gMC->Gspos("MB2R",1, "RH2R", 0.,0.,-zpos_meb,0, "only");
1014 gMC->Gspos("MB3R",1, "RH3R", 0.,0.,-zpos_meb,0, "only");
1015 gMC->Gspos("MB4R",1, "RH4R", 0.,0.,-zpos_meb,0, "only");
1016 gMC->Gspos("MB5R",1, "RH5R", 0.,0.,-zpos_meb,0, "only");
1017 gMC->Gspos("MB6R",1, "RH6R", xpos_meb_ver,ypos_meb_ver,-zpos_meb_bar,0, "only");
1019 //Positioning Roha cell over copper sheet
1020 gMC->Gspos("RH0R",1, "CU0R", 0.,0.,-zpos_Roha_bar,0, "only");// box horizontal
1021 gMC->Gspos("RH1R",1, "CU1R", 0.,0.,-zpos_Roha,0, "only");
1022 gMC->Gspos("RH2R",1, "CU2R", 0.,0.,-zpos_Roha,0, "only");
1023 gMC->Gspos("RH3R",1, "CU3R", 0.,0.,-zpos_Roha,0, "only");
1024 gMC->Gspos("RH4R",1, "CU4R", 0.,0.,-zpos_Roha,0, "only");
1025 gMC->Gspos("RH5R",1, "CU5R", 0.,0.,-zpos_Roha,0, "only");
1026 gMC->Gspos("RH6R",1, "CU6R", 0.,0.,-zpos_Roha_bar,0, "only");
1028 //Positioning Copper sheet over PCB
1029 gMC->Gspos("CU0R",1, "CB0R", 0.,0.,-zpos_cubar,0, "only");// box horizontal
1030 gMC->Gspos("CU1R",1, "CB1R", 0.,0.,-zpos_cu,0, "only");
1031 gMC->Gspos("CU2R",1, "CB2R", 0.,0.,-zpos_cu,0, "only");
1032 gMC->Gspos("CU3R",1, "CB3R", 0.,0.,-zpos_cu,0, "only");
1033 gMC->Gspos("CU4R",1, "CB4R", 0.,0.,-zpos_cu,0, "only");
1034 gMC->Gspos("CU5R",1, "CB5R", 0.,0.,-zpos_cu,0, "only");
1035 gMC->Gspos("CU6R",1, "CB6R", 0.,0.,-zpos_cubar,0, "only");
1038 //Positioning the PCB
1039 x_hor_pos = 95.5/2.+ 22.6; // 22.6 is inner radius of PCB
1040 y_hor_pos = -(1.6/2); //
1042 x_ver_pos = -(1.6/2); //
1043 y_ver_pos = 95.5/2.+ 22.6;
1045 gMC->Gspos("CB0R",1, "SQM3", x_hor_pos,-bpar_h[1],-zpos_cbb_bar,0, "only");// box horizontal
1046 gMC->Gspos("CB1R",1, "SQM3", 0.,0.,-zpos_cbb,0, "only");
1047 gMC->Gspos("CB2R",1, "SQM3", 0.,0.,-zpos_cbb,irot1,"only");
1048 gMC->Gspos("CB3R",1, "SQM3", 0.,0.,-zpos_cbb,irot2, "only");
1049 gMC->Gspos("CB4R",1, "SQM3", 0.,0.,-zpos_cbb,irot3, "only");
1050 gMC->Gspos("CB5R",1, "SQM3", 0.,0.,-zpos_cbb,irot4, "only");
1051 gMC->Gspos("CB6R",1, "SQM3", x_ver_pos,y_ver_pos,-zpos_cbb_bar,0, "only");// box vertical
1053 gMC->Gspos("CB0R",1, "SQM4", x_hor_pos,-bpar_h[1],-zpos_cbb_bar,0, "only");// box horizontal
1054 gMC->Gspos("CB1R",1, "SQM4", 0.,0.,-zpos_cbb,0, "only");
1055 gMC->Gspos("CB2R",1, "SQM4", 0.,0.,-zpos_cbb,irot1,"only");
1056 gMC->Gspos("CB3R",1, "SQM4", 0.,0.,-zpos_cbb,irot2, "only");
1057 gMC->Gspos("CB4R",1, "SQM4", 0.,0.,-zpos_cbb,irot3, "only");
1058 gMC->Gspos("CB5R",1, "SQM4", 0.,0.,-zpos_cbb,irot4, "only");
1059 gMC->Gspos("CB6R",1, "SQM4", x_ver_pos,y_ver_pos,-zpos_cbb_bar,0, "only");// box vertical
1061 //----------------------------------------------------------------------
1063 //----------------------------------------------------------------------
1066 ypos_s = -frame1[1] + 0.4;
1067 zpos_fr1 = -frame1[2];
1069 zpos_rb1 = -(frame1[2] + rib1[2]);
1071 gMC->Gsvolu("FRHR", "BOX", idPGF30, frame1, 3); //Frame - 1 P2
1072 gMC->Gsvolu("RBHR", "BOX", idPGF30, rib1, 3); //Rib - 1 P2
1074 //Fixing Screws ...........................................
1076 zpos_h = -(spar[2] + s_head[2]);
1078 gMC->Gsvolu("SCHR","TUBE",idScru, spar,3); //screw-vertical part for Frame M4 x 25
1079 gMC->Gsvolu("HDFR","TUBE",idScru, s_head,3); //screw-head
1080 //positioning head over screws
1081 gMC->Gspos("HDFR",1,"SCHR",xpos_h,ypos_h,zpos_h,0,"ONLY");//positioning Screw-head
1085 xpos_s = frame1[0] - 0.4;
1087 Tot_Scru1 = 21; //Total no. of Scru
1088 for(Int_t nos1 = 0; nos1 < Tot_Scru1; nos1++)
1090 gMC->Gspos("SCHR",nos1+1,"FRHR",xpos_s,ypos_s,zpos_s,irot1,"ONLY");
1092 } // nos1 is no. of scru
1094 gMC->Gspos("RBHR",1,"FRHR",xpos_rb1,ypos_rb1,zpos_rb1,0, "only");
1095 gMC->Gspos("FRHR",1,"SQM3",xpos_fr1,ypos_fr1,zpos_fr1,0, "only");
1096 gMC->Gspos("FRHR",1,"SQM4",xpos_fr1,ypos_fr1,zpos_fr1,0, "only");
1098 //......................................................................................
1102 zpos_rb2 = -(frame2[2] + rib2[2]);
1104 gMC->Gsvolu("FR1R", "BOX", idPGF30, frame2, 3); //Frame - 2
1105 gMC->Gsvolu("RB1R", "BOX", idPGF30, rib2, 3); //Rib - 2
1107 //Fixing Screws ...........................................
1108 //---------screw parameters (on Ribs) M4
1111 gMC->Gsvolu("SCRR","TUBE",idScru, spar2,3); //screw-vertical part for Rib m4
1112 //positioning head over screws
1114 zpos2_h = -(spar2[2] + s_head[2]);
1115 gMC->Gspos("HDFR",2,"SCRR",xpos2_h,ypos2_h,zpos2_h,0,"ONLY");//positioning Screw-head
1117 ypos2_s = -rib2[1] + 1.7;
1118 zpos2_s = frame2[2];
1120 Tot_Scru2 = 6; // 6 screws
1121 for(Int_t nos2 = 0; nos2 < Tot_Scru2; nos2++)
1123 gMC->Gspos("SCRR",nos2+1,"RB1R",xpos2_s,ypos2_s,zpos2_s,0,"ONLY");
1127 gMC->Gspos("RB1R",1, "FR1R", xpos_rb2, ypos_rb2, zpos_rb2,0, "only");
1128 gMC->Gspos("FR1R",1, "FRHR", xpos_fr2, ypos_fr2, zpos_fr2,0, "only");
1130 //......................................................................................
1134 zpos_rb3 = -(frame3[2] + rib3[2]);
1136 gMC->Gsvolu("FR2R", "BOX", idPGF30, frame3, 3); //Frame - 3
1137 gMC->Gsvolu("FEXR", "BOX", idPGF30, fr_ex, 3); //frame- extended part
1138 gMC->Gsvolu("RB2R", "BOX", idPGF30, rib3, 3); //Rib - 3
1140 //Fixing Screws ...........................................
1141 ypos3_s = -rib3[1] + 1.1;
1142 zpos3_s = frame3[2];
1144 Tot_Scru3 = Tot_Scru2 + 9; //Toal screw on this rib is 9--index continues
1145 for(Int_t nos3 = Tot_Scru2; nos3 < Tot_Scru3; nos3++)
1147 gMC->Gspos("SCRR",nos3+1,"RB2R",xpos3_s,ypos3_s,zpos3_s,0,"ONLY");
1151 gMC->Gspos("FEXR",1, "FR2R", xpos_ex, ypos_ex, zpos_ex,0, "only");
1152 gMC->Gspos("RB2R",1, "FR2R", xpos_rb3, ypos_rb3, zpos_rb3,0, "only");
1153 gMC->Gspos("FR2R",1, "FR1R", xpos_fr3, ypos_fr3, zpos_fr3,irot6, "only");
1154 //......................................................................................
1158 zpos_rb4 = -(frame4[2] + rib4[2]);
1160 gMC->Gsvolu("FR3R", "BOX", idPGF30, frame4, 3); //Frame - 4
1161 gMC->Gsvolu("RB3R", "BOX", idPGF30, rib4, 3); //Rib - 4
1163 //Fixing Screws ...........................................
1165 ypos4_s = -rib4[1] + 4.33;
1166 zpos4_s = frame4[2];
1168 Tot_Scru4 = Tot_Scru3 + 10; //Toal screw on this rib is 10--index continues
1169 for(Int_t nos4 = Tot_Scru3; nos4 < Tot_Scru4; nos4++)
1171 gMC->Gspos("SCRR",nos4+1,"RB3R",xpos4_s,ypos4_s,zpos4_s,0,"ONLY");
1175 gMC->Gspos("RB3R",1, "FR3R", xpos_rb4, ypos_rb4, zpos_rb4,0, "only");
1176 gMC->Gspos("FR3R",1, "FR2R", xpos_fr4, ypos_fr4, zpos_fr4,irot6, "only");
1177 //......................................................................................
1180 zpos_rb5 = -(frame5[2] + rib5[2]);
1182 gMC->Gsvolu("FR4R", "BOX", idPGF30, frame5, 3); //Frame - 5
1183 gMC->Gsvolu("RB4R", "BOX", idPGF30, rib5, 3); //Rib - 5
1185 //Fixing Screws ...........................................
1187 ypos5_s = -rib5[1] + 2.79;
1188 zpos5_s = frame5[2];
1190 Tot_Scru5 = Tot_Scru4 + 8; //Toal screw on this rib is 8--index continues
1191 for(Int_t nos5 = Tot_Scru4; nos5 < Tot_Scru5; nos5++)
1193 gMC->Gspos("SCRR",nos5+1,"RB4R",xpos5_s,ypos5_s,zpos5_s,0,"ONLY");
1197 gMC->Gspos("RB4R",1, "FR4R", xpos_rb5, ypos_rb5, zpos_rb5,0, "only");
1198 gMC->Gspos("FR4R",1, "FR3R", xpos_fr5, ypos_fr5, zpos_fr5,irot6, "only");
1199 //......................................................................................
1202 zpos_rb6 = -(frame6[2] + rib6[2]);
1204 gMC->Gsvolu("FR5R", "BOX", idPGF30, frame6, 3); //Frame - 6
1205 gMC->Gsvolu("RB5R", "BOX", idPGF30, rib6, 3); //Rib - 6
1207 //Fixing Screws ...........................................
1209 ypos6_s = -rib6[1] + 1.36;
1210 zpos6_s = frame6[2];
1212 Tot_Scru6 = Tot_Scru5 + 6; //Toal screw on this rib is 7--index continues
1213 for(Int_t nos6 = Tot_Scru5; nos6 < Tot_Scru6; nos6++)
1215 gMC->Gspos("SCRR",nos6+1,"RB5R",xpos6_s,ypos6_s,zpos6_s,0,"ONLY");
1219 gMC->Gspos("RB5R",1, "FR5R", xpos_rb6, ypos_rb6, zpos_rb6,0, "only");
1220 gMC->Gspos("FR5R",1, "FR4R", xpos_fr6, ypos_fr6, zpos_fr6,irot6, "only");
1221 //......................................................................................
1223 //Frame-7 Vertical frame P2
1225 zpos_fr7 = -frame7[2];
1226 zpos_rb7 = -(frame7[2] + rib7[2]);
1228 gMC->Gsvolu("FRVR", "BOX", idPGF30, frame7, 3); //Frame - vertical
1229 gMC->Gsvolu("RBVR", "BOX", idPGF30, rib7, 3); //Rib
1231 //Fixing Screws-- screw parameter and screw-head are taken from horizontal frame bar
1232 gMC->Gsvolu("SCVR","TUBE",idScru, spar,3); //screw-vertical part for Frame M4
1233 //positioning head over screws
1234 gMC->Gspos("HDFR",3,"SCVR",xpos_h,ypos_h,zpos_h,0,"ONLY");//positioning Screw-head
1237 yposv_s = -frame7[1] + 0.4;
1240 Tot_Scru_v = 20; //Total no. of Screws
1241 for(Int_t nos_v = 0; nos_v < Tot_Scru_v; nos_v++)
1243 gMC->Gspos("SCVR",nos_v+1,"FRVR",xposv_s,yposv_s,zposv_s,0,"ONLY");
1247 gMC->Gspos("RBVR",1, "FRVR", xpos_rb7, ypos_rb7, zpos_rb7,0, "only");
1248 gMC->Gspos("FRVR",1, "SQM3", xpos_fr7, ypos_fr7, zpos_fr7,0, "only");// frame vertical
1249 gMC->Gspos("FRVR",1, "SQM4", xpos_fr7, ypos_fr7, zpos_fr7,0, "only");// frame vertical
1251 //......................................................................................
1254 zpos_frc = - fr_c[2];
1255 zpos_rc = -(fr_c[2] + rib_c[2]);
1257 gMC->Gsvolu("FRCR", "TUBS", idPGF30, fr_c, 5); //Frame - semi circular
1258 gMC->Gsvolu("RBCR", "TUBS", idPGF30, rib_c, 5); //Rib
1260 //Screws -------------------------------------------------------
1261 gMC->Gsvolu("SCYR","TUBE",idScru, spar,3); //screw-vertical part for extended part in -Y
1262 gMC->Gsvolu("SCIR","TUBE",idScru, spar,3); //screw-vertical part
1263 gMC->Gsvolu("SCXR","TUBE",idScru, spar,3); //screw-vertical part for extended part in -X
1264 gMC->Gspos("HDFR",3,"SCIR",xpos_h,ypos_h,zpos_h,0,"ONLY");//positioning Screw-head
1267 radius = fr_c[0] + 0.4 ; //inner radius + 0.4
1269 arc = 3.667; // for 10-degree angle
1270 for(Int_t i = 0; i<8; i++)
1272 theta[i] = arc/radius;
1273 Float_t xpos_is2 = radius * cos(theta[i]);
1274 Float_t ypos_is2 = radius * sin(theta[i]);
1275 gMC->Gspos("SCIR",i+1,"FRCR",xpos_is2, ypos_is2, zpos_is2,0,"ONLY");
1279 gMC->Gspos("RBCR",1, "FRCR", xpos_rc, ypos_rc, zpos_rc,0, "only"); //Rib
1280 gMC->Gspos("FRCR",1, "SQM3", xpos_frc, ypos_frc, zpos_frc,0, "only");// frame semi circular
1281 gMC->Gspos("FRCR",1, "SQM4", xpos_frc, ypos_frc, zpos_frc,0, "only");// frame semi circular
1284 //Plane 2 -----------------------------------------------------------------------------------
1286 //^^^^^^^^^^^^^^^^^^^^^^^^^ Sensitive volumes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1288 Float_t zsenv = 0.5; // distance between two cathode plane
1290 //Segment-0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1291 bpar_h[0] = 95.5/2.;
1293 bpar_h[2] = zsenv/2.;
1294 gMC->Gsvolu("C3G0", "BOX", idGas, bpar_h, 3);
1295 gMC->Gsvolu("C4G0", "BOX", idGas, bpar_h, 3);
1297 //Segment-1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1302 pgpar[4] = -zsenv/2.;
1305 pgpar[7] = zsenv/2.;
1306 pgpar[8] = pgpar[5];
1307 pgpar[9] = pgpar[6];
1308 gMC->Gsvolu("C3G1", "PGON", idGas, pgpar, 10);
1309 gMC->Gsvolu("C4G1", "PGON", idGas, pgpar, 10);
1311 //Segment-2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1316 pgpar[4] = -zsenv/2.;
1319 pgpar[7] = zsenv/2.;
1320 pgpar[8] = pgpar[5];
1321 pgpar[9] = pgpar[6];
1322 gMC->Gsvolu("C3G2", "PGON", idGas, pgpar, 10);
1323 gMC->Gsvolu("C4G2", "PGON", idGas, pgpar, 10);
1325 //Segment-3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1330 pgpar[4] = -zsenv/2.;
1333 pgpar[7] = zsenv/2.;
1334 pgpar[8] = pgpar[5];
1335 pgpar[9] = pgpar[6];
1336 gMC->Gsvolu("C3G3", "PGON", idGas, pgpar, 10);
1337 gMC->Gsvolu("C4G3", "PGON", idGas, pgpar, 10);
1339 //Segment-4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1344 pgpar[4] = -zsenv/2.;
1347 pgpar[7] = zsenv/2.;
1348 pgpar[8] = pgpar[5];
1349 pgpar[9] = pgpar[6];
1350 gMC->Gsvolu("C3G4", "PGON", idGas, pgpar, 10);
1351 gMC->Gsvolu("C4G4", "PGON", idGas, pgpar, 10);
1353 //Segment-5 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1358 pgpar[4] = -zsenv/2.;
1361 pgpar[7] = zsenv/2.;
1362 pgpar[8] = pgpar[5];
1363 pgpar[9] = pgpar[6];
1364 gMC->Gsvolu("C3G5", "PGON", idGas, pgpar, 10);
1365 gMC->Gsvolu("C4G5", "PGON", idGas, pgpar, 10);
1367 //Segment-6 - vertical box ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1369 bpar_v[0] = 2.16/2.;
1370 bpar_v[1] = 95.5/2.;
1371 bpar_v[2] = zsenv/2.;
1372 gMC->Gsvolu("C3G6", "BOX", idGas, bpar_v, 3);
1373 gMC->Gsvolu("C4G6", "BOX", idGas, bpar_v, 3);
1375 //...........................................................................................
1377 //Positioning the PCB
1378 x_hor_pos = 95.5/2.+ 22.6; // 22.6 is inner radius of PCB
1379 y_hor_pos = -(1.6/2); //
1381 x_ver_pos = -(1.6/2); //
1382 y_ver_pos = 95.5/2.+ 22.6;
1384 gMC->Gspos("C3G0",1, "SQM3", x_hor_pos,y_hor_pos,0.,0, "only");// box horizontal
1385 gMC->Gspos("C3G1",1, "SQM3", 0.,0.,0.,0, "only");
1386 gMC->Gspos("C3G2",1, "SQM3", 0.,0.,0.,irot1,"only");
1387 gMC->Gspos("C3G3",1, "SQM3", 0.,0.,0.,irot2, "only");
1388 gMC->Gspos("C3G4",1, "SQM3", 0.,0.,0.,irot3, "only");
1389 gMC->Gspos("C3G5",1, "SQM3", 0.,0.,0.,irot4, "only");
1390 gMC->Gspos("C3G6",1, "SQM3", x_ver_pos,y_ver_pos,0.,0, "only");// box vertical
1392 gMC->Gspos("C4G0",1, "SQM4", x_hor_pos,y_hor_pos,0.,0, "only");// box horizontal
1393 gMC->Gspos("C4G1",1, "SQM4", 0.,0.,0.,0, "only");
1394 gMC->Gspos("C4G2",1, "SQM4", 0.,0.,0.,irot1,"only");
1395 gMC->Gspos("C4G3",1, "SQM4", 0.,0.,0.,irot2, "only");
1396 gMC->Gspos("C4G4",1, "SQM4", 0.,0.,0.,irot3, "only");
1397 gMC->Gspos("C4G5",1, "SQM4", 0.,0.,0.,irot4, "only");
1398 gMC->Gspos("C4G6",1, "SQM4", x_ver_pos,y_ver_pos,0.,0, "only");// box vertical
1400 //^^^^^^^^^^^^^^^^^^^^^^^^^ Sensitive volumes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1403 //##################################################################################################
1404 // Positioning Quadrant in chamber#3 and chamber#4
1405 //##################################################################################################
1406 /******Transformations for Quadrant**********************************************
1407 || I => Quadrant I: no rotation
1409 II. || I. II => Quadrant II: Reflaction of Quadrant I in XZ plane
1410 || => TGeoRotation("Qrot2",90.,180.,90.,90.,180.,0.);
1412 || III => Quadrant III: 180 degree rotation of Quadrant I in XY plane
1413 III. || IV. => TGeoRotation("Qrot3",90.,180.,90.,90.,180.,0.);
1414 || IV => Quadrant IV:-180 degree rotation of Quadrant II in XY plane
1415 => TGeoRotation("Qrot4",90.,0.,90.,-90.,180.,0.);
1416 **********************************************************************************************/
1418 Int_t detElemId1 = 1; // quadrant I
1419 Int_t detElemId2 = 0; // quadrant II
1420 Int_t detElemId3 = 3; // quadrant III
1421 Int_t detElemId4 = 2; // quadrant IV
1423 Float_t half_chamber = zcbb + zcu + zRoha + zmeb + zcu2 + zsenv/2;
1424 // cout<< "\n half_chamber \t" << half_chamber << endl;
1425 // Float_t half_chamber =2.894;
1426 // Float_t half_chamber =3.5;
1428 // ------------------------------St2 Chamber3------------------------------------------------
1430 // GetEnvelopes(2)->AddEnvelope("S3M0", 300, true,TGeoTranslation(0.,0.,0.));
1431 GetEnvelopes(2)->AddEnvelope("SQM3", 300+detElemId1, 1, TGeoTranslation( 0., 0., - half_chamber));
1432 GetEnvelopes(2)->AddEnvelope("SQM3", 300+detElemId2, 2, TGeoTranslation( 0., 0., + half_chamber),
1433 TGeoRotation("Qrot3",90.,180.,90.,90.,180.,0.));
1434 GetEnvelopes(2)->AddEnvelope("SQM3", 300+detElemId3, 3, TGeoTranslation( 0., 0., - half_chamber),
1435 TGeoRotation("Qrot3",90.,180.,90.,270.,0.,0.));
1436 GetEnvelopes(2)->AddEnvelope("SQM3", 300+detElemId4, 4, TGeoTranslation( 0., 0., + half_chamber),
1437 TGeoRotation("Qrot4",90.,0.,90.,-90.,180.,0.));
1439 //--------------------------------St2 Chamber4-------------------------------------------------
1441 GetEnvelopes(3)->AddEnvelope("SQM4", 400+detElemId1, 1, TGeoTranslation( 0., 0., - half_chamber));
1442 GetEnvelopes(3)->AddEnvelope("SQM4", 400+detElemId2, 2, TGeoTranslation( 0., 0., + half_chamber),
1443 TGeoRotation("Qrot2",90.,180.,90.,90.,180.,0.));
1444 GetEnvelopes(3)->AddEnvelope("SQM4", 400+detElemId3, 3, TGeoTranslation( 0., 0., - half_chamber),
1445 TGeoRotation("Qrot3",90.,180.,90.,270.,0.,0.));
1446 GetEnvelopes(3)->AddEnvelope("SQM4", 400+detElemId4, 4, TGeoTranslation( 0., 0., + half_chamber),
1447 TGeoRotation("Qrot4",90.,0.,90.,-90.,180.,0.));
1449 //**********************************************************************************************
1453 //______________________________________________________________________________
1454 void AliMUONSt2GeometryBuilderV2::SetTransformations()
1456 // Defines the transformations for the station2 chambers.
1459 Double_t zpos1 = - AliMUONConstants::DefaultChamberZ(2);
1460 SetTranslation(2, TGeoTranslation(0., 0., zpos1));
1462 Double_t zpos2 = - AliMUONConstants::DefaultChamberZ(3);
1463 SetTranslation(3, TGeoTranslation(0., 0., zpos2));
1466 //______________________________________________________________________________
1467 void AliMUONSt2GeometryBuilderV2::SetSensitiveVolumes()
1469 // Defines the sensitive volumes for station2 chambers.
1472 GetGeometry(2)->SetSensitiveVolume("C3G0");
1473 GetGeometry(2)->SetSensitiveVolume("C3G1");
1474 GetGeometry(2)->SetSensitiveVolume("C3G2");
1475 GetGeometry(2)->SetSensitiveVolume("C3G3");
1476 GetGeometry(2)->SetSensitiveVolume("C3G4");
1477 GetGeometry(2)->SetSensitiveVolume("C3G5");
1478 GetGeometry(2)->SetSensitiveVolume("C3G6");
1480 GetGeometry(3)->SetSensitiveVolume("C4G0");
1481 GetGeometry(3)->SetSensitiveVolume("C4G1");
1482 GetGeometry(3)->SetSensitiveVolume("C4G2");
1483 GetGeometry(3)->SetSensitiveVolume("C4G3");
1484 GetGeometry(3)->SetSensitiveVolume("C4G4");
1485 GetGeometry(3)->SetSensitiveVolume("C4G5");
1486 GetGeometry(3)->SetSensitiveVolume("C4G6");