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 "AliMUONChamber.h"
37 #include "AliMUONGeometryModule.h"
38 #include "AliMUONGeometryEnvelopeStore.h"
39 #include "AliMUONConstants.h"
42 ClassImp(AliMUONSt2GeometryBuilderV2)
44 //______________________________________________________________________________
45 AliMUONSt2GeometryBuilderV2::AliMUONSt2GeometryBuilderV2(AliMUON* muon)
46 : AliMUONVGeometryBuilder("st2V2.dat",
47 muon->Chamber(2).GetGeometry(),
48 muon->Chamber(3).GetGeometry()),
51 // Standard constructor
55 //______________________________________________________________________________
56 AliMUONSt2GeometryBuilderV2::AliMUONSt2GeometryBuilderV2()
57 : AliMUONVGeometryBuilder(),
60 // Default constructor
64 //______________________________________________________________________________
65 AliMUONSt2GeometryBuilderV2::AliMUONSt2GeometryBuilderV2(const AliMUONSt2GeometryBuilderV2& rhs)
66 : AliMUONVGeometryBuilder(rhs)
68 // Protected copy constructor
70 AliFatal("Copy constructor is not implemented.");
73 //______________________________________________________________________________
74 AliMUONSt2GeometryBuilderV2::~AliMUONSt2GeometryBuilderV2() {
78 //______________________________________________________________________________
79 AliMUONSt2GeometryBuilderV2&
80 AliMUONSt2GeometryBuilderV2::operator = (const AliMUONSt2GeometryBuilderV2& rhs)
82 // Protected assignement operator
84 // check assignement to self
85 if (this == &rhs) return *this;
87 AliFatal("Assignment operator is not implemented.");
96 //______________________________________________________________________________
97 void AliMUONSt2GeometryBuilderV2::CreateGeometry()
99 // From AliMUONv1::CreateGeometry()
102 //********************************************************************
104 //********************************************************************
105 // indices 1 and 2 for first and second chambers in the station
106 // iChamber (first chamber) kept for other quanties than Z,
107 // assumed to be the same in both chambers
109 // AliMUONChamber* iChamber = &fMUON->Chamber(2);
110 // AliMUONChamber* iChamber1 = iChamber;
111 // AliMUONChamber* iChamber2 = &fMUON->Chamber(3);
114 // Get tracking medias Ids
115 Int_t *idtmed = fMUON->GetIdtmed()->GetArray()-1099;
116 Int_t idAir = idtmed[1100]; // medium 1
117 Int_t idGas = idtmed[1108]; // medium Ar-CO2 gas (80%+20%)
118 Int_t idPCB = idtmed[1122]; // medium FR4
119 Int_t idCU = idtmed[1110]; // medium copper
120 Int_t idRoha = idtmed[1113]; // medium roha cell
121 Int_t idPGF30= idtmed[1123]; // medium for Frame Eq.to Bakelite
122 Int_t idScru = idtmed[1128]; // screw material - Stainless Steel(18%Cr,9%Ni,Fe)
125 Int_t irot1, irot2, irot3, irot4, irot5, irot6;
127 fMUON->AliMatrix(irot1, 90., 13., 90., 103., 0., 0.); //+13deg in x-y Plane
128 fMUON->AliMatrix(irot2, 90., 34., 90., 124., 0., 0.); // +34deg in x-y plane
129 fMUON->AliMatrix(irot3, 90., 56., 90., 146., 0., 0.); // +56 deg in x-y plane
130 fMUON->AliMatrix(irot4, 90., 76., 90., 166., 0., 0.); // +76 deg in x-y plane
131 fMUON->AliMatrix(irot5, 90., 90., 90., 180., 0., 0.); // +90 deg in x-y plane
132 fMUON->AliMatrix(irot6, 90., 22.5, 90., 112.5, 0., 0.); //22.5 deg in x-y Plane
134 /*########################################################################################
135 Create volume for one Quadrant connsist two plane
136 ##########################################################################################*/
140 tpar1[2] = 6.55555/2;
145 gMC->Gsvolu("SQM3","TUBS", idAir, tpar1, 5);
146 gMC->Gsvolu("SQM4","TUBS", idAir, tpar1, 5);
150 //==================================================================================
151 // Plane - 1 L is used for one Plane while
153 //==================================================================================
155 //Thickness of variour parts
156 Float_t zcbb = 0.04; //cathode pcb
157 Float_t zcu = 0.004; // eff. cu in cathode pcb
158 Float_t zRoha = 2.5; // Rhocell
159 Float_t zmeb = 0.08; //Mech. exit board
160 Float_t zcu2 = 0.02; //Effective electronic exit board
161 //Z-positions of various parts--- in Plane-1
163 Float_t zpos_cbb = 0.25; // 2.5 mm => gap between anode & chatode plane
164 Float_t zpos_cu = zcbb;
165 Float_t zpos_Roha = zcu;
166 Float_t zpos_meb = zmeb;
167 Float_t zpos_cu2 = zcu2;
169 Float_t zpos_cbb_bar = zpos_cbb + zcbb/2.; //for segment 0 & 6
170 Float_t zpos_cubar = zcbb/2. + zcu/2.;
171 Float_t zpos_Roha_bar = zcu/2. + zRoha/2.;
172 Float_t zpos_meb_bar = zRoha/2. + zmeb/2.;
173 Float_t zpos_eeb_bar = zmeb/2. + zcu2/2.;
176 //Cathode PCB + Copper sheet + Rohacell + mech exit board + eff. electronic exit board
178 //Segment-0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
183 gMC->Gsvolu("CB0L", "BOX", idPCB, bpar_h, 3);
185 bpar_h[2] = zcu/2.; //Thickness of Copper sheet
186 gMC->Gsvolu("CU0L", "BOX", idCU, bpar_h, 3);
188 bpar_h[2] = zRoha/2.; //Thickness of Roha cell
189 gMC->Gsvolu("RH0L", "BOX", idRoha, bpar_h, 3);
191 bpar_h[0] = (100.6/2)-(0.9/2);
194 gMC->Gsvolu("MB0L", "BOX", idPCB, bpar_h, 3);
197 gMC->Gsvolu("EB0L", "BOX", idCU, bpar_h, 3);
199 //Segment-1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
208 pgpar[7] = pgpar[4] + zcbb;
211 gMC->Gsvolu("CB1L", "PGON", idPCB, pgpar, 10);
213 pgpar[7] = pgpar[4] + zcu; // Thickness of copper-sheet
214 gMC->Gsvolu("CU1L", "PGON", idCU, pgpar, 10);
216 pgpar[7] = pgpar[4] + zRoha; // Thickness of Roha cell
217 gMC->Gsvolu("RH1L", "PGON", idRoha, pgpar, 10);
219 pgpar[5] = 21.5; // radius of inner rib
221 pgpar[7] = pgpar[4] + zmeb;
224 gMC->Gsvolu("MB1L", "PGON", idPCB, pgpar, 10);
226 pgpar[7] = pgpar[4] + zcu2;
227 gMC->Gsvolu("EB1L", "PGON", idCU, pgpar, 10);
229 //Segment-2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
237 pgpar[7] = pgpar[4] +zcbb;
240 gMC->Gsvolu("CB2L", "PGON", idPCB, pgpar, 10);
242 pgpar[7] = pgpar[4] + zcu; // Thickness of copper-sheet
243 gMC->Gsvolu("CU2L", "PGON", idCU, pgpar, 10);
245 pgpar[7] = pgpar[4] + zRoha; // Thickness of Roha cell
246 gMC->Gsvolu("RH2L", "PGON", idRoha, pgpar, 10);
248 pgpar[5] = 21.5; // radius of inner rib
250 pgpar[7] = pgpar[4] + zmeb;
253 gMC->Gsvolu("MB2L", "PGON", idPCB, pgpar, 10);
255 pgpar[7] = pgpar[4] + zcu2;
256 gMC->Gsvolu("EB2L", "PGON", idCU, pgpar, 10);
258 //Segment-3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
266 pgpar[7] = pgpar[4] + zcbb;
269 gMC->Gsvolu("CB3L", "PGON", idPCB, pgpar, 10);
271 pgpar[7] = pgpar[4] + zcu; // Thickness of copper-sheet
272 gMC->Gsvolu("CU3L", "PGON", idCU, pgpar, 10);
274 pgpar[7] = pgpar[4] + zRoha; // Thickness of Roha cell
275 gMC->Gsvolu("RH3L", "PGON", idRoha, pgpar, 10);
277 pgpar[5] = 21.5; // radius of inner rib
279 pgpar[7] = pgpar[4] + zmeb;
282 gMC->Gsvolu("MB3L", "PGON", idPCB, pgpar, 10);
284 pgpar[7] = pgpar[4] + zcu2;
285 gMC->Gsvolu("EB3L", "PGON", idCU, pgpar, 10);
287 //Segment-4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
295 pgpar[7] = pgpar[4] + zcbb;
298 gMC->Gsvolu("CB4L", "PGON", idPCB, pgpar, 10);
300 pgpar[7] = pgpar[4] + zcu; // Thickness of copper-sheet
301 gMC->Gsvolu("CU4L", "PGON", idCU, pgpar, 10);
303 pgpar[7] = pgpar[4] + zRoha; // Thickness of Roha cell
304 gMC->Gsvolu("RH4L", "PGON", idRoha, pgpar, 10);
306 pgpar[5] = 21.5; // radius of inner rib
308 pgpar[7] = pgpar[4] + zmeb;
311 gMC->Gsvolu("MB4L", "PGON", idPCB, pgpar, 10);
313 pgpar[7] = pgpar[4] + zcu2;
314 gMC->Gsvolu("EB4L", "PGON", idCU, pgpar, 10);
316 //Segment-5 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
324 pgpar[7] = pgpar[4] + zcbb;
327 gMC->Gsvolu("CB5L", "PGON", idPCB, pgpar, 10);
329 pgpar[7] = pgpar[4] + zcu; // Thickness of copper-sheet
330 gMC->Gsvolu("CU5L", "PGON", idCU, pgpar, 10);
332 pgpar[7] = pgpar[4] + zRoha; // Thickness of Roha cell
333 gMC->Gsvolu("RH5L", "PGON", idRoha, pgpar, 10);
335 pgpar[5] = 21.5;// radius of inner rib
337 pgpar[7] = pgpar[4] + zmeb;
340 gMC->Gsvolu("MB5L", "PGON", idPCB, pgpar, 10);
342 pgpar[7] = pgpar[4] + zcu2;
343 gMC->Gsvolu("EB5L", "PGON", idCU, pgpar, 10);
345 //Segment-6 - vertical box ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
352 gMC->Gsvolu("CB6L", "BOX", idPCB, bpar_v, 3);
355 gMC->Gsvolu("CU6L", "BOX", idCU, bpar_v, 3);
357 bpar_v[2] = zRoha/2.;
358 gMC->Gsvolu("RH6L", "BOX", idRoha, bpar_v, 3);
361 bpar_v[1] = (97.9/2)-(0.9/2.);
363 gMC->Gsvolu("MB6L", "BOX", idPCB, bpar_v, 3);
366 gMC->Gsvolu("EB6L", "BOX", idCU, bpar_v, 3);
368 //...........................................................................................
369 //Positioning of Electronic exit board
370 gMC->Gspos("EB0L",1, "MB0L", 0.,0.,zpos_eeb_bar,0, "only");
371 gMC->Gspos("EB1L",1, "MB1L", 0.,0.,zpos_cu2,0, "only");
372 gMC->Gspos("EB2L",1, "MB2L", 0.,0.,zpos_cu2,0, "only");
373 gMC->Gspos("EB3L",1, "MB3L", 0.,0.,zpos_cu2,0, "only");
374 gMC->Gspos("EB4L",1, "MB4L", 0.,0.,zpos_cu2,0, "only");
375 gMC->Gspos("EB5L",1, "MB5L", 0.,0.,zpos_cu2,0, "only");
376 gMC->Gspos("EB6L",1, "MB6L", 0.,0.,zpos_eeb_bar,0, "only");
378 //Positioning of Mech. exit board
379 Float_t xpos_meb_hor = 1.10;
380 Float_t ypos_meb_hor = -0.60;
382 Float_t xpos_meb_ver = -0.60;
383 Float_t ypos_meb_ver = -0.35;
385 gMC->Gspos("MB0L",1, "RH0L", xpos_meb_hor,ypos_meb_hor,zpos_meb_bar,0, "only");
386 gMC->Gspos("MB1L",1, "RH1L", 0.,0.,zpos_meb,0, "only");
387 gMC->Gspos("MB2L",1, "RH2L", 0.,0.,zpos_meb,0, "only");
388 gMC->Gspos("MB3L",1, "RH3L", 0.,0.,zpos_meb,0, "only");
389 gMC->Gspos("MB4L",1, "RH4L", 0.,0.,zpos_meb,0, "only");
390 gMC->Gspos("MB5L",1, "RH5L", 0.,0.,zpos_meb,0, "only");
391 gMC->Gspos("MB6L",1, "RH6L", xpos_meb_ver,ypos_meb_ver,zpos_meb_bar,0, "only");
393 //Positioning Roha cell over copper sheet
394 gMC->Gspos("RH0L",1, "CU0L", 0.,0.,zpos_Roha_bar,0, "only");// box horizontal
395 gMC->Gspos("RH1L",1, "CU1L", 0.,0.,zpos_Roha,0, "only");
396 gMC->Gspos("RH2L",1, "CU2L", 0.,0.,zpos_Roha,0, "only");
397 gMC->Gspos("RH3L",1, "CU3L", 0.,0.,zpos_Roha,0, "only");
398 gMC->Gspos("RH4L",1, "CU4L", 0.,0.,zpos_Roha,0, "only");
399 gMC->Gspos("RH5L",1, "CU5L", 0.,0.,zpos_Roha,0, "only");
400 gMC->Gspos("RH6L",1, "CU6L", 0.,0.,zpos_Roha_bar,0, "only");
402 //Positioning Copper sheet over PCB
403 gMC->Gspos("CU0L",1, "CB0L", 0.,0.,zpos_cubar,0, "only");// box horizontal
404 gMC->Gspos("CU1L",1, "CB1L", 0.,0.,zpos_cu,0, "only");
405 gMC->Gspos("CU2L",1, "CB2L", 0.,0.,zpos_cu,0, "only");
406 gMC->Gspos("CU3L",1, "CB3L", 0.,0.,zpos_cu,0, "only");
407 gMC->Gspos("CU4L",1, "CB4L", 0.,0.,zpos_cu,0, "only");
408 gMC->Gspos("CU5L",1, "CB5L", 0.,0.,zpos_cu,0, "only");
409 gMC->Gspos("CU6L",1, "CB6L", 0.,0.,zpos_cubar,0, "only");
412 //Positioning the PCB
413 Float_t x_hor_pos = 95.5/2.+ 22.6; // 22.6 is inner radius of PCB
414 Float_t y_hor_pos = -(1.6/2); //
416 Float_t x_ver_pos = -(1.6/2); //
417 Float_t y_ver_pos = 95.5/2.+ 22.6; //
420 gMC->Gspos("CB0L",1, "SQM3", x_hor_pos,y_hor_pos,zpos_cbb_bar,0, "only");// box horizontal
421 gMC->Gspos("CB1L",1, "SQM3", 0.,0.,zpos_cbb,0, "only");
422 gMC->Gspos("CB2L",1, "SQM3", 0.,0.,zpos_cbb,irot1,"only");
423 gMC->Gspos("CB3L",1, "SQM3", 0.,0.,zpos_cbb,irot2, "only");
424 gMC->Gspos("CB4L",1, "SQM3", 0.,0.,zpos_cbb,irot3, "only");
425 gMC->Gspos("CB5L",1, "SQM3", 0.,0.,zpos_cbb,irot4, "only");
426 gMC->Gspos("CB6L",1, "SQM3", x_ver_pos,y_ver_pos,zpos_cbb_bar,0, "only");// box vertical
429 gMC->Gspos("CB0L",1, "SQM4", x_hor_pos,y_hor_pos,zpos_cbb_bar,0, "only");// box horizontal
430 gMC->Gspos("CB1L",1, "SQM4", 0.,0.,zpos_cbb,0, "only");
431 gMC->Gspos("CB2L",1, "SQM4", 0.,0.,zpos_cbb,irot1,"only");
432 gMC->Gspos("CB3L",1, "SQM4", 0.,0.,zpos_cbb,irot2, "only");
433 gMC->Gspos("CB4L",1, "SQM4", 0.,0.,zpos_cbb,irot3, "only");
434 gMC->Gspos("CB5L",1, "SQM4", 0.,0.,zpos_cbb,irot4, "only");
435 gMC->Gspos("CB6L",1, "SQM4", x_ver_pos,y_ver_pos,zpos_cbb,0, "only");// box vertical
437 //----------------------------------------------------------------------
439 //----------------------------------------------------------------------
441 Float_t frame1[3] ; //Index-1 is used for horizontal frame bar
442 frame1[0] = 100.6/2.; //and 2,3,4..... is used for the next frames
443 frame1[1] = 2.5/2.; //from hor. to the vertical
447 rib1[0] = frame1[0] - 0.9/2.;
451 Float_t xpos_fr1 = frame1[0] + 20.6;
452 Float_t ypos_fr1 = -3.7 + frame1[1] ;
453 Float_t zpos_fr1 = frame1[2];
455 Float_t xpos_rb1 = 0.9/2;
456 Float_t ypos_rb1 = -frame1[1] + rib1[1]+0.9;
457 Float_t zpos_rb1 = frame1[2] + rib1[2];
459 gMC->Gsvolu("FRHL", "BOX", idPGF30, frame1, 3); //Frame - 1
460 gMC->Gsvolu("RBHL", "BOX", idPGF30, rib1, 3); //Rib - 1
462 //Fixing Screws ...........................................
463 //---------screw parameters (on frame) M4 ------------------
464 //in this plane screw-length is taken eq. to thickness of frame/frame+rib
465 // the remaining of the actual size is adjusted in the other plane
473 s_head[0] = 0.0; // screw-head
477 Float_t xpos_h = 0.0;
478 Float_t ypos_h = 0.0;
479 Float_t zpos_h = spar[2] + s_head[2];
481 gMC->Gsvolu("SCHL","TUBE",idScru, spar,3); //screw-vertical part for Frame M4
482 gMC->Gsvolu("HDFL","TUBE",idScru, s_head,3); //screw-head
483 //positioning head over screws
484 gMC->Gspos("HDFL",1,"SCHL",xpos_h,ypos_h,zpos_h,0,"ONLY");//positioning Screw-head
487 Float_t xpos_s = frame1[0] - 0.4;
488 Float_t ypos_s = -frame1[1] + 0.4;
489 Float_t zpos_s = 0.0;
491 Int_t Tot_Scru1 = 21; //Total no. of Scru
492 for(Int_t nos1 = 0; nos1 < Tot_Scru1; nos1++)
494 gMC->Gspos("SCHL",nos1+1,"FRHL",xpos_s,ypos_s,zpos_s,0,"ONLY");
496 } // nos1 is no. of scru
498 gMC->Gspos("RBHL",1, "FRHL", xpos_rb1, ypos_rb1, zpos_rb1,0, "only");// Rib-1
499 // gMC->Gspos("FRHL",1, "SQM3", xpos_fr1, ypos_fr1, zpos_fr1,0, "only");// frame -1
500 // gMC->Gspos("FRHL",1, "SQM4", xpos_fr1, ypos_fr1, zpos_fr1,0, "only");// frame -1
502 //......................................................................................
508 frame2[2] = frame1[2];
510 Float_t xpos_fr2 = frame1[0] -frame2[0];
511 Float_t ypos_fr2 = frame2[1]+frame1[1] ;
512 Float_t zpos_fr2 = 0.;
516 rib2[1] = frame2[1]+0.6;
519 Float_t xpos_rb2 = frame2[0] - rib2[0];
520 Float_t ypos_rb2 = - 0.6/2;
521 Float_t zpos_rb2 = frame2[2] + rib2[2];
523 gMC->Gsvolu("FR1L", "BOX", idPGF30, frame2, 3); //Frame - 2
524 gMC->Gsvolu("RB1L", "BOX", idPGF30, rib2, 3); //Rib - 2
526 //Fixing Screws ...........................................
527 //screw parameters (on Ribs) M4 x 65
528 //Head size & positions remianing the same-----------
533 gMC->Gsvolu("SCRL","TUBE",idScru, spar2,3); //screw-vertical part for Rib m4 x 65
534 //positioning head over screws
535 Float_t xpos2_h = 0.0;
536 Float_t ypos2_h = 0.0;
537 Float_t zpos2_h = spar2[2] + s_head[2];
538 gMC->Gspos("HDFL",2,"SCRL",xpos2_h,ypos2_h,zpos2_h,0,"ONLY");//positioning Screw-head
540 Float_t xpos2_s = -rib2[0] + 0.4;
541 Float_t ypos2_s = -rib2[1] + 1.7;
542 Float_t zpos2_s = -frame2[2];
544 Int_t Tot_Scru2 = 6; // 6 screws
545 for(Int_t nos2 = 0; nos2 < Tot_Scru2; nos2++)
547 gMC->Gspos("SCRL",nos2+1,"RB1L",xpos2_s,ypos2_s,zpos2_s,0,"ONLY");
551 gMC->Gspos("RB1L",1, "FR1L", xpos_rb2, ypos_rb2, zpos_rb2,0, "only");
552 gMC->Gspos("FR1L",1, "FRHL", xpos_fr2, ypos_fr2, zpos_fr2,0, "only");
554 //......................................................................................
559 frame3[1] = 40.67/2.;
560 frame3[2] = frame1[2];
561 Float_t bend_ang = (22.5*PI/180.); //bending angle of frame-3 w.r.t frame-2
563 Float_t xpos_fr3 =-frame3[1]* sin(bend_ang);
564 Float_t ypos_fr3 = frame2[1]+(frame3[1]*cos(bend_ang)-frame3[0]* sin(bend_ang));
565 Float_t zpos_fr3 = 0.;
567 //Frame part extended inside
571 fr_ex[2] = frame1[2];
573 Float_t xpos_ex = -frame3[0] - fr_ex[0];
574 Float_t ypos_ex = 0.0;
575 Float_t zpos_ex = 0.0;
582 Float_t xpos_rb3 = frame3[0] - rib3[0];
583 Float_t ypos_rb3 = 0.0;
584 Float_t zpos_rb3 = frame3[2] + rib3[2];
586 gMC->Gsvolu("FR2L", "BOX", idPGF30, frame3, 3); //Frame - 3
587 gMC->Gsvolu("FEXL", "BOX", idPGF30, fr_ex, 3); //frame- extended part
588 gMC->Gsvolu("RB2L", "BOX", idPGF30, rib3, 3); //Rib - 3
590 Float_t xpos3_s = -rib3[0] + 0.4;
591 Float_t ypos3_s = -rib3[1] + 1.1;
592 Float_t zpos3_s = -frame3[2];
594 Int_t Tot_Scru3 = Tot_Scru2 + 9; //Toal screw on this rib is 9--index continues
595 for(Int_t nos3 = Tot_Scru2; nos3 < Tot_Scru3; nos3++)
597 gMC->Gspos("SCRL",nos3+1,"RB2L",xpos3_s,ypos3_s,zpos3_s,0,"ONLY");
601 gMC->Gspos("FEXL",1, "FR2L", xpos_ex, ypos_ex, zpos_ex,0, "only");
602 gMC->Gspos("RB2L",1, "FR2L", xpos_rb3, ypos_rb3, zpos_rb3,0, "only");
603 gMC->Gspos("FR2L",1, "FR1L", xpos_fr3, ypos_fr3, zpos_fr3,irot6, "only");
604 //......................................................................................
609 frame4[1] = 52.54/2.;
610 frame4[2] = frame1[2];
612 Float_t xpos_fr4 =-frame4[1]* sin(bend_ang);
613 Float_t ypos_fr4 = frame3[1]+(frame4[1]*cos(bend_ang)-frame4[0]* sin(bend_ang));
614 Float_t zpos_fr4 =0.;
621 Float_t xpos_rb4 = frame4[0] - rib4[0];
622 Float_t ypos_rb4 = 0.0;
623 Float_t zpos_rb4 = frame4[2] + rib4[2];
625 gMC->Gsvolu("FR3L", "BOX", idPGF30, frame4, 3); //Frame - 4
626 gMC->Gsvolu("RB3L", "BOX", idPGF30, rib4, 3); //Rib - 4
628 Float_t xpos4_s = -rib4[0] + 0.4;
629 Float_t ypos4_s = -rib4[1] + 4.33;
630 Float_t zpos4_s = -frame4[2];
632 Int_t Tot_Scru4 = Tot_Scru3 + 10; //Toal screw on this rib is 10--index continues
633 for(Int_t nos4 = Tot_Scru3; nos4 < Tot_Scru4; nos4++)
635 gMC->Gspos("SCRL",nos4+1,"RB3L",xpos4_s,ypos4_s,zpos4_s,0,"ONLY");
639 gMC->Gspos("RB3L",1, "FR3L", xpos_rb4, ypos_rb4, zpos_rb4,0, "only");
640 gMC->Gspos("FR3L",1, "FR2L", xpos_fr4, ypos_fr4, zpos_fr4,irot6, "only");
641 //......................................................................................
647 frame5[2] = frame1[2];
649 Float_t xpos_fr5 =-frame5[1]*sin(bend_ang);
650 Float_t ypos_fr5 = frame4[1]+(frame5[1]*cos(bend_ang)-frame5[0]* sin(bend_ang));
651 Float_t zpos_fr5 = 0.;
658 Float_t xpos_rb5 = frame5[0] - rib5[0];
659 Float_t ypos_rb5 = 0.0;
660 Float_t zpos_rb5 = frame5[2] + rib5[2];
662 gMC->Gsvolu("FR4L", "BOX", idPGF30, frame5, 3); //Frame - 5
663 gMC->Gsvolu("RB4L", "BOX", idPGF30, rib5, 3); //Rib - 5
665 Float_t xpos5_s = -rib5[0] + 0.4;
666 Float_t ypos5_s = -rib5[1] + 2.79;
667 Float_t zpos5_s = -frame5[2];
669 Int_t Tot_Scru5 = Tot_Scru4 + 8; //Toal screw on this rib is 8--index continues
670 for(Int_t nos5 = Tot_Scru4; nos5 < Tot_Scru5; nos5++)
672 gMC->Gspos("SCRL",nos5+1,"RB4L",xpos5_s,ypos5_s,zpos5_s,0,"ONLY");
676 gMC->Gspos("RB4L",1, "FR4L", xpos_rb5, ypos_rb5, zpos_rb5,0, "only");
677 gMC->Gspos("FR4L",1, "FR3L", xpos_fr5, ypos_fr5, zpos_fr5,irot6, "only");
678 //......................................................................................
683 frame6[1] = 30.84/2.;
684 frame6[2] = frame1[2];
686 Float_t xpos_fr6 = (-frame6[1]*sin(bend_ang))+0.5;
687 Float_t ypos_fr6 = frame5[1]+(frame6[1]*cos(bend_ang)-frame6[0]* sin(bend_ang));
688 Float_t zpos_fr6 = 0;
692 rib6[1] = frame6[1]+0.8;
695 Float_t xpos_rb6 = frame6[0] - rib6[0];
696 Float_t ypos_rb6 = 0.4;
697 Float_t zpos_rb6 = frame6[2] + rib6[2];
699 gMC->Gsvolu("FR5L", "BOX", idPGF30, frame6, 3); //Frame - 6
700 gMC->Gsvolu("RB5L", "BOX", idPGF30, rib6, 3); //Rib - 6
702 Float_t xpos6_s = -rib6[0] + 0.4;
703 Float_t ypos6_s = -rib6[1] + 1.36;
704 Float_t zpos6_s = -frame6[2];
706 Int_t Tot_Scru6 = Tot_Scru5 + 6; //Toal screw on this rib is 7--index continues
707 for(Int_t nos6 = Tot_Scru5; nos6 < Tot_Scru6; nos6++)
709 gMC->Gspos("SCRL",nos6+1,"RB5L",xpos6_s,ypos6_s,zpos6_s,0,"ONLY");
713 gMC->Gspos("RB5L",1, "FR5L", xpos_rb6, ypos_rb6, zpos_rb6,0, "only");
714 gMC->Gspos("FR5L",1, "FR4L", xpos_fr6, ypos_fr6, zpos_fr6,irot6, "only");
715 //......................................................................................
716 //Frame-7 Vertical frame
725 rib7[1] = frame7[1] - .9/2.;
728 Float_t xpos_fr7 = frame7[0] -3.7;
729 Float_t ypos_fr7 = frame7[1] +20.6;
730 Float_t zpos_fr7 = frame7[2];
732 Float_t xpos_rb7 = -frame7[0] + rib7[0]+0.9;
733 Float_t ypos_rb7 = .9/2.;
734 Float_t zpos_rb7 = frame7[2] + rib7[2];
736 gMC->Gsvolu("FRVL", "BOX", idPGF30, frame7, 3); //Frame - vertical
737 gMC->Gsvolu("RBVL", "BOX", idPGF30, rib7, 3); //Rib
739 //Fixing Screws-- screw parameter and screw-head are taken from horizontal frame bar
740 gMC->Gsvolu("SCVL","TUBE",idScru, spar,3); //screw-vertical part for Frame M4 x 25
741 //positioning head over screws
742 gMC->Gspos("HDFL",3,"SCVL",xpos_h,ypos_h,zpos_h,0,"ONLY");//positioning Screw-head
744 Float_t xposv_s = -frame7[0] + 0.4;
745 Float_t yposv_s = -frame7[1] + 0.4;
746 Float_t zposv_s = 0.0;
748 Int_t Tot_Scru_v = 20; //Total no. of Screws
749 for(Int_t nos_v = 0; nos_v < Tot_Scru_v; nos_v++)
751 gMC->Gspos("SCVL",nos_v+1,"FRVL",xposv_s,yposv_s,zposv_s,0,"ONLY");
753 } // nos2 is no. of scru
755 gMC->Gspos("RBVL",1, "FRVL", xpos_rb7, ypos_rb7, zpos_rb7,0, "only");
756 // gMC->Gspos("FRVL",1, "SQM3", xpos_fr7, ypos_fr7, zpos_fr7,0, "only");// frame vertical
757 // gMC->Gspos("FRVL",1, "SQM4", xpos_fr7, ypos_fr7, zpos_fr7,0, "only");// frame vertical
759 //......................................................................................
761 Float_t fr_c[5]; //semi-circular frame
768 Float_t xpos_frc = 0.0;
769 Float_t ypos_frc = 0.0;
770 Float_t zpos_frc = fr_c[2];
776 rib_c[3] = fr_c[3]-2.0;
777 rib_c[4] = fr_c[4]+2.0;
779 Float_t xpos_rc = 0.0;
780 Float_t ypos_rc = 0.0;
781 Float_t zpos_rc = fr_c[2] + rib_c[2];
783 gMC->Gsvolu("FRCL", "TUBS", idPGF30, fr_c, 5); //Frame - semi circular
784 gMC->Gsvolu("RBCL", "TUBS", idPGF30, rib_c, 5); //Rib
787 gMC->Gsvolu("SCYL","TUBE",idScru, spar,3); //screw-vertical part for extended part in -Y
788 gMC->Gsvolu("SCIL","TUBE",idScru, spar,3); //screw-vertical part
789 gMC->Gsvolu("SCXL","TUBE",idScru, spar,3); //screw-vertical part for extended part in -X
790 gMC->Gspos("HDFL",3,"SCIL",xpos_h,ypos_h,zpos_h,0,"ONLY");//positioning Screw-head
793 Float_t zpos_is2 = 0.0;
795 Float_t radius = fr_c[0] + 0.4 ; //inner radius + 0.4
796 Float_t arc = 3.667; // for 10-degree angle
797 for(Int_t i = 0; i<8; i++)
799 theta[i] = arc/radius;
800 Float_t xpos_is2 = radius * cos(theta[i]);
801 Float_t ypos_is2 = radius * sin(theta[i]);
802 gMC->Gspos("SCIL",i+1,"FRCL",xpos_is2, ypos_is2, zpos_is2,0,"ONLY");
808 gMC->Gspos("RBCL",1, "FRCL", xpos_rc, ypos_rc, zpos_rc,0, "only"); //Rib
810 gMC->Gspos("FRHL",1, "SQM3", xpos_fr1, ypos_fr1, zpos_fr1,0, "only");// frame -1
811 gMC->Gspos("FRHL",1, "SQM4", xpos_fr1, ypos_fr1, zpos_fr1,0, "only");// frame -1
813 gMC->Gspos("FRVL",1, "SQM3", xpos_fr7, ypos_fr7, zpos_fr7,0, "only");// frame vertical
814 gMC->Gspos("FRVL",1, "SQM4", xpos_fr7, ypos_fr7, zpos_fr7,0, "only");// frame vertical
816 gMC->Gspos("FRCL",1, "SQM3", xpos_frc, ypos_frc, zpos_frc,0, "only");// frame semi circular
817 gMC->Gspos("FRCL",1, "SQM4", xpos_frc, ypos_frc, zpos_frc,0, "only");// frame semi circular
819 //=============================================================================================
823 //=============================================================================================
825 //Cathode PCB + Copper sheet over PCB + Roha cell over copper sheet
831 gMC->Gsvolu("CB0R", "BOX", idPCB, bpar_h, 3);
833 bpar_h[2] = zcu/2.; //Thickness of Copper sheet
834 gMC->Gsvolu("CU0R", "BOX", idCU, bpar_h, 3);
836 bpar_h[2] = zRoha/2.; //Thickness of Roha cell
837 gMC->Gsvolu("RH0R", "BOX", idRoha, bpar_h, 3);
839 bpar_h[0] = (100.6/2)-(0.9/2);
842 gMC->Gsvolu("MB0R", "BOX", idPCB, bpar_h, 3);
845 gMC->Gsvolu("EB0R", "BOX", idCU, bpar_h, 3);
851 pgpar[7] = pgpar[4] - zcbb;
854 gMC->Gsvolu("CB1R", "PGON", idPCB, pgpar, 10);
856 pgpar[7] = pgpar[4] - zcu; // Thickness of copper-sheet
857 gMC->Gsvolu("CU1R", "PGON", idCU, pgpar, 10);
859 pgpar[7] = pgpar[4] - zRoha; // Thickness of Roha cell
860 gMC->Gsvolu("RH1R", "PGON", idRoha, pgpar, 10);
862 pgpar[5] = 21.5; // radius of inner rib
864 pgpar[7] = pgpar[4] - zmeb;
867 gMC->Gsvolu("MB1R", "PGON", idPCB, pgpar, 10);
869 pgpar[7] = pgpar[4] - zcu2;
870 gMC->Gsvolu("EB1R", "PGON", idCU, pgpar, 10);
877 pgpar[7] = pgpar[4] - zcbb;
880 gMC->Gsvolu("CB2R", "PGON", idPCB, pgpar, 10);
882 pgpar[7] = pgpar[4] - zcu; // Thickness of copper-sheet
883 gMC->Gsvolu("CU2R", "PGON", idCU, pgpar, 10);
885 pgpar[7] = pgpar[4] - zRoha; // Thickness of Roha cell
886 gMC->Gsvolu("RH2R", "PGON", idRoha, pgpar, 10);
888 pgpar[5] = 21.5; // radius of inner rib
890 pgpar[7] = pgpar[4] - zmeb;
893 gMC->Gsvolu("MB2R", "PGON", idPCB, pgpar, 10);
895 pgpar[7] = pgpar[4] - zcu2;
896 gMC->Gsvolu("EB2R", "PGON", idCU, pgpar, 10);
903 pgpar[7] = pgpar[4] - zcbb;
906 gMC->Gsvolu("CB3R", "PGON", idPCB, pgpar, 10);
908 pgpar[7] = pgpar[4] - zcu; // Thickness of copper-sheet
909 gMC->Gsvolu("CU3R", "PGON", idCU, pgpar, 10);
911 pgpar[7] = pgpar[4] - zRoha; // Thickness of Roha cell
912 gMC->Gsvolu("RH3R", "PGON", idRoha, pgpar, 10);
914 pgpar[5] = 21.5; // radius of inner rib
916 pgpar[7] = pgpar[4] - zmeb;
919 gMC->Gsvolu("MB3R", "PGON", idPCB, pgpar, 10);
921 pgpar[7] = pgpar[4] - zcu2;
922 gMC->Gsvolu("EB3R", "PGON", idCU, pgpar, 10);
929 pgpar[7] = pgpar[4] - zcbb;
932 gMC->Gsvolu("CB4R", "PGON", idPCB, pgpar, 10);
934 pgpar[7] = pgpar[4] - zcu; // Thickness of copper-sheet
935 gMC->Gsvolu("CU4R", "PGON", idCU, pgpar, 10);
937 pgpar[7] = pgpar[4] - zRoha; // Thickness of Roha cell
938 gMC->Gsvolu("RH4R", "PGON", idRoha, pgpar, 10);
940 pgpar[5] = 21.5; // radius of inner rib
942 pgpar[7] = pgpar[4] - zmeb;
945 gMC->Gsvolu("MB4R", "PGON", idPCB, pgpar, 10);
947 pgpar[7] = pgpar[4] - zcu2;
948 gMC->Gsvolu("EB4R", "PGON", idCU, pgpar, 10);
955 pgpar[7] = pgpar[4] - zcbb;
958 gMC->Gsvolu("CB5R", "PGON", idPCB, pgpar, 10);
960 pgpar[7] = pgpar[4] - zcu; // Thickness of copper-sheet
961 gMC->Gsvolu("CU5R", "PGON", idCU, pgpar, 10);
963 pgpar[7] = pgpar[4] - zRoha; // Thickness of Roha cell
964 gMC->Gsvolu("RH5R", "PGON", idRoha, pgpar, 10);
966 pgpar[5] = 21.5;// radius of inner rib
968 pgpar[7] = pgpar[4] - zmeb;
971 gMC->Gsvolu("MB5R", "PGON", idPCB, pgpar, 10);
973 pgpar[7] = pgpar[4] - zcu2;
974 gMC->Gsvolu("EB5R", "PGON", idCU, pgpar, 10);
976 //Segment-6 - vertical box
981 gMC->Gsvolu("CB6R", "BOX", idPCB, bpar_v, 3);
983 gMC->Gsvolu("CU6R", "BOX", idCU, bpar_v, 3);
985 bpar_v[2] = zRoha/2.;
986 gMC->Gsvolu("RH6R", "BOX", idRoha, bpar_v, 3);
989 bpar_v[1] = (97.9/2)-(0.9/2.);
991 gMC->Gsvolu("MB6R", "BOX", idPCB, bpar_v, 3);
994 gMC->Gsvolu("EB6R", "BOX", idCU, bpar_v, 3);
997 //...........................................................................................
998 //Positioning of Electronic exit board
999 gMC->Gspos("EB0R",1, "MB0R", 0.,0.,-zpos_eeb_bar,0, "only");
1000 gMC->Gspos("EB1R",1, "MB1R", 0.,0.,-zpos_cu2,0, "only");
1001 gMC->Gspos("EB2R",1, "MB2R", 0.,0.,-zpos_cu2,0, "only");
1002 gMC->Gspos("EB3R",1, "MB3R", 0.,0.,-zpos_cu2,0, "only");
1003 gMC->Gspos("EB4R",1, "MB4R", 0.,0.,-zpos_cu2,0, "only");
1004 gMC->Gspos("EB5R",1, "MB5R", 0.,0.,-zpos_cu2,0, "only");
1005 gMC->Gspos("EB6R",1, "MB6R", 0.,0.,-zpos_eeb_bar,0, "only");
1007 //Positioning of Mech. exit board
1009 ypos_meb_hor = -0.6;
1010 xpos_meb_ver = -0.6;
1011 ypos_meb_ver = -0.35;
1013 gMC->Gspos("MB0R",1, "RH0R", xpos_meb_hor,ypos_meb_hor,-zpos_meb_bar,0, "only");
1014 gMC->Gspos("MB1R",1, "RH1R", 0.,0.,-zpos_meb,0, "only");
1015 gMC->Gspos("MB2R",1, "RH2R", 0.,0.,-zpos_meb,0, "only");
1016 gMC->Gspos("MB3R",1, "RH3R", 0.,0.,-zpos_meb,0, "only");
1017 gMC->Gspos("MB4R",1, "RH4R", 0.,0.,-zpos_meb,0, "only");
1018 gMC->Gspos("MB5R",1, "RH5R", 0.,0.,-zpos_meb,0, "only");
1019 gMC->Gspos("MB6R",1, "RH6R", xpos_meb_ver,ypos_meb_ver,-zpos_meb_bar,0, "only");
1021 //Positioning Roha cell over copper sheet
1022 gMC->Gspos("RH0R",1, "CU0R", 0.,0.,-zpos_Roha_bar,0, "only");// box horizontal
1023 gMC->Gspos("RH1R",1, "CU1R", 0.,0.,-zpos_Roha,0, "only");
1024 gMC->Gspos("RH2R",1, "CU2R", 0.,0.,-zpos_Roha,0, "only");
1025 gMC->Gspos("RH3R",1, "CU3R", 0.,0.,-zpos_Roha,0, "only");
1026 gMC->Gspos("RH4R",1, "CU4R", 0.,0.,-zpos_Roha,0, "only");
1027 gMC->Gspos("RH5R",1, "CU5R", 0.,0.,-zpos_Roha,0, "only");
1028 gMC->Gspos("RH6R",1, "CU6R", 0.,0.,-zpos_Roha_bar,0, "only");
1030 //Positioning Copper sheet over PCB
1031 gMC->Gspos("CU0R",1, "CB0R", 0.,0.,-zpos_cubar,0, "only");// box horizontal
1032 gMC->Gspos("CU1R",1, "CB1R", 0.,0.,-zpos_cu,0, "only");
1033 gMC->Gspos("CU2R",1, "CB2R", 0.,0.,-zpos_cu,0, "only");
1034 gMC->Gspos("CU3R",1, "CB3R", 0.,0.,-zpos_cu,0, "only");
1035 gMC->Gspos("CU4R",1, "CB4R", 0.,0.,-zpos_cu,0, "only");
1036 gMC->Gspos("CU5R",1, "CB5R", 0.,0.,-zpos_cu,0, "only");
1037 gMC->Gspos("CU6R",1, "CB6R", 0.,0.,-zpos_cubar,0, "only");
1040 //Positioning the PCB
1041 x_hor_pos = 95.5/2.+ 22.6; // 22.6 is inner radius of PCB
1042 y_hor_pos = -(1.6/2); //
1044 x_ver_pos = -(1.6/2); //
1045 y_ver_pos = 95.5/2.+ 22.6;
1047 gMC->Gspos("CB0R",1, "SQM3", x_hor_pos,-bpar_h[1],-zpos_cbb_bar,0, "only");// box horizontal
1048 gMC->Gspos("CB1R",1, "SQM3", 0.,0.,-zpos_cbb,0, "only");
1049 gMC->Gspos("CB2R",1, "SQM3", 0.,0.,-zpos_cbb,irot1,"only");
1050 gMC->Gspos("CB3R",1, "SQM3", 0.,0.,-zpos_cbb,irot2, "only");
1051 gMC->Gspos("CB4R",1, "SQM3", 0.,0.,-zpos_cbb,irot3, "only");
1052 gMC->Gspos("CB5R",1, "SQM3", 0.,0.,-zpos_cbb,irot4, "only");
1053 gMC->Gspos("CB6R",1, "SQM3", x_ver_pos,y_ver_pos,-zpos_cbb_bar,0, "only");// box vertical
1055 gMC->Gspos("CB0R",1, "SQM4", x_hor_pos,-bpar_h[1],-zpos_cbb_bar,0, "only");// box horizontal
1056 gMC->Gspos("CB1R",1, "SQM4", 0.,0.,-zpos_cbb,0, "only");
1057 gMC->Gspos("CB2R",1, "SQM4", 0.,0.,-zpos_cbb,irot1,"only");
1058 gMC->Gspos("CB3R",1, "SQM4", 0.,0.,-zpos_cbb,irot2, "only");
1059 gMC->Gspos("CB4R",1, "SQM4", 0.,0.,-zpos_cbb,irot3, "only");
1060 gMC->Gspos("CB5R",1, "SQM4", 0.,0.,-zpos_cbb,irot4, "only");
1061 gMC->Gspos("CB6R",1, "SQM4", x_ver_pos,y_ver_pos,-zpos_cbb_bar,0, "only");// box vertical
1063 //----------------------------------------------------------------------
1065 //----------------------------------------------------------------------
1068 ypos_s = -frame1[1] + 0.4;
1069 zpos_fr1 = -frame1[2];
1071 zpos_rb1 = -(frame1[2] + rib1[2]);
1073 gMC->Gsvolu("FRHR", "BOX", idPGF30, frame1, 3); //Frame - 1 P2
1074 gMC->Gsvolu("RBHR", "BOX", idPGF30, rib1, 3); //Rib - 1 P2
1076 //Fixing Screws ...........................................
1078 zpos_h = -(spar[2] + s_head[2]);
1080 gMC->Gsvolu("SCHR","TUBE",idScru, spar,3); //screw-vertical part for Frame M4 x 25
1081 gMC->Gsvolu("HDFR","TUBE",idScru, s_head,3); //screw-head
1082 //positioning head over screws
1083 gMC->Gspos("HDFR",1,"SCHR",xpos_h,ypos_h,zpos_h,0,"ONLY");//positioning Screw-head
1087 xpos_s = frame1[0] - 0.4;
1089 Tot_Scru1 = 21; //Total no. of Scru
1090 for(Int_t nos1 = 0; nos1 < Tot_Scru1; nos1++)
1092 gMC->Gspos("SCHR",nos1+1,"FRHR",xpos_s,ypos_s,zpos_s,irot1,"ONLY");
1094 } // nos1 is no. of scru
1096 gMC->Gspos("RBHR",1,"FRHR",xpos_rb1,ypos_rb1,zpos_rb1,0, "only");
1097 gMC->Gspos("FRHR",1,"SQM3",xpos_fr1,ypos_fr1,zpos_fr1,0, "only");
1098 gMC->Gspos("FRHR",1,"SQM4",xpos_fr1,ypos_fr1,zpos_fr1,0, "only");
1100 //......................................................................................
1104 zpos_rb2 = -(frame2[2] + rib2[2]);
1106 gMC->Gsvolu("FR1R", "BOX", idPGF30, frame2, 3); //Frame - 2
1107 gMC->Gsvolu("RB1R", "BOX", idPGF30, rib2, 3); //Rib - 2
1109 //Fixing Screws ...........................................
1110 //---------screw parameters (on Ribs) M4
1113 gMC->Gsvolu("SCRR","TUBE",idScru, spar2,3); //screw-vertical part for Rib m4
1114 //positioning head over screws
1116 zpos2_h = -(spar2[2] + s_head[2]);
1117 gMC->Gspos("HDFR",2,"SCRR",xpos2_h,ypos2_h,zpos2_h,0,"ONLY");//positioning Screw-head
1119 ypos2_s = -rib2[1] + 1.7;
1120 zpos2_s = frame2[2];
1122 Tot_Scru2 = 6; // 6 screws
1123 for(Int_t nos2 = 0; nos2 < Tot_Scru2; nos2++)
1125 gMC->Gspos("SCRR",nos2+1,"RB1R",xpos2_s,ypos2_s,zpos2_s,0,"ONLY");
1129 gMC->Gspos("RB1R",1, "FR1R", xpos_rb2, ypos_rb2, zpos_rb2,0, "only");
1130 gMC->Gspos("FR1R",1, "FRHR", xpos_fr2, ypos_fr2, zpos_fr2,0, "only");
1132 //......................................................................................
1136 zpos_rb3 = -(frame3[2] + rib3[2]);
1138 gMC->Gsvolu("FR2R", "BOX", idPGF30, frame3, 3); //Frame - 3
1139 gMC->Gsvolu("FEXR", "BOX", idPGF30, fr_ex, 3); //frame- extended part
1140 gMC->Gsvolu("RB2R", "BOX", idPGF30, rib3, 3); //Rib - 3
1142 //Fixing Screws ...........................................
1143 ypos3_s = -rib3[1] + 1.1;
1144 zpos3_s = frame3[2];
1146 Tot_Scru3 = Tot_Scru2 + 9; //Toal screw on this rib is 9--index continues
1147 for(Int_t nos3 = Tot_Scru2; nos3 < Tot_Scru3; nos3++)
1149 gMC->Gspos("SCRR",nos3+1,"RB2R",xpos3_s,ypos3_s,zpos3_s,0,"ONLY");
1153 gMC->Gspos("FEXR",1, "FR2R", xpos_ex, ypos_ex, zpos_ex,0, "only");
1154 gMC->Gspos("RB2R",1, "FR2R", xpos_rb3, ypos_rb3, zpos_rb3,0, "only");
1155 gMC->Gspos("FR2R",1, "FR1R", xpos_fr3, ypos_fr3, zpos_fr3,irot6, "only");
1156 //......................................................................................
1160 zpos_rb4 = -(frame4[2] + rib4[2]);
1162 gMC->Gsvolu("FR3R", "BOX", idPGF30, frame4, 3); //Frame - 4
1163 gMC->Gsvolu("RB3R", "BOX", idPGF30, rib4, 3); //Rib - 4
1165 //Fixing Screws ...........................................
1167 ypos4_s = -rib4[1] + 4.33;
1168 zpos4_s = frame4[2];
1170 Tot_Scru4 = Tot_Scru3 + 10; //Toal screw on this rib is 10--index continues
1171 for(Int_t nos4 = Tot_Scru3; nos4 < Tot_Scru4; nos4++)
1173 gMC->Gspos("SCRR",nos4+1,"RB3R",xpos4_s,ypos4_s,zpos4_s,0,"ONLY");
1177 gMC->Gspos("RB3R",1, "FR3R", xpos_rb4, ypos_rb4, zpos_rb4,0, "only");
1178 gMC->Gspos("FR3R",1, "FR2R", xpos_fr4, ypos_fr4, zpos_fr4,irot6, "only");
1179 //......................................................................................
1182 zpos_rb5 = -(frame5[2] + rib5[2]);
1184 gMC->Gsvolu("FR4R", "BOX", idPGF30, frame5, 3); //Frame - 5
1185 gMC->Gsvolu("RB4R", "BOX", idPGF30, rib5, 3); //Rib - 5
1187 //Fixing Screws ...........................................
1189 ypos5_s = -rib5[1] + 2.79;
1190 zpos5_s = frame5[2];
1192 Tot_Scru5 = Tot_Scru4 + 8; //Toal screw on this rib is 8--index continues
1193 for(Int_t nos5 = Tot_Scru4; nos5 < Tot_Scru5; nos5++)
1195 gMC->Gspos("SCRR",nos5+1,"RB4R",xpos5_s,ypos5_s,zpos5_s,0,"ONLY");
1199 gMC->Gspos("RB4R",1, "FR4R", xpos_rb5, ypos_rb5, zpos_rb5,0, "only");
1200 gMC->Gspos("FR4R",1, "FR3R", xpos_fr5, ypos_fr5, zpos_fr5,irot6, "only");
1201 //......................................................................................
1204 zpos_rb6 = -(frame6[2] + rib6[2]);
1206 gMC->Gsvolu("FR5R", "BOX", idPGF30, frame6, 3); //Frame - 6
1207 gMC->Gsvolu("RB5R", "BOX", idPGF30, rib6, 3); //Rib - 6
1209 //Fixing Screws ...........................................
1211 ypos6_s = -rib6[1] + 1.36;
1212 zpos6_s = frame6[2];
1214 Tot_Scru6 = Tot_Scru5 + 6; //Toal screw on this rib is 7--index continues
1215 for(Int_t nos6 = Tot_Scru5; nos6 < Tot_Scru6; nos6++)
1217 gMC->Gspos("SCRR",nos6+1,"RB5R",xpos6_s,ypos6_s,zpos6_s,0,"ONLY");
1221 gMC->Gspos("RB5R",1, "FR5R", xpos_rb6, ypos_rb6, zpos_rb6,0, "only");
1222 gMC->Gspos("FR5R",1, "FR4R", xpos_fr6, ypos_fr6, zpos_fr6,irot6, "only");
1223 //......................................................................................
1225 //Frame-7 Vertical frame P2
1227 zpos_fr7 = -frame7[2];
1228 zpos_rb7 = -(frame7[2] + rib7[2]);
1230 gMC->Gsvolu("FRVR", "BOX", idPGF30, frame7, 3); //Frame - vertical
1231 gMC->Gsvolu("RBVR", "BOX", idPGF30, rib7, 3); //Rib
1233 //Fixing Screws-- screw parameter and screw-head are taken from horizontal frame bar
1234 gMC->Gsvolu("SCVR","TUBE",idScru, spar,3); //screw-vertical part for Frame M4
1235 //positioning head over screws
1236 gMC->Gspos("HDFR",3,"SCVR",xpos_h,ypos_h,zpos_h,0,"ONLY");//positioning Screw-head
1239 yposv_s = -frame7[1] + 0.4;
1242 Tot_Scru_v = 20; //Total no. of Screws
1243 for(Int_t nos_v = 0; nos_v < Tot_Scru_v; nos_v++)
1245 gMC->Gspos("SCVR",nos_v+1,"FRVR",xposv_s,yposv_s,zposv_s,0,"ONLY");
1249 gMC->Gspos("RBVR",1, "FRVR", xpos_rb7, ypos_rb7, zpos_rb7,0, "only");
1250 gMC->Gspos("FRVR",1, "SQM3", xpos_fr7, ypos_fr7, zpos_fr7,0, "only");// frame vertical
1251 gMC->Gspos("FRVR",1, "SQM4", xpos_fr7, ypos_fr7, zpos_fr7,0, "only");// frame vertical
1253 //......................................................................................
1256 zpos_frc = - fr_c[2];
1257 zpos_rc = -(fr_c[2] + rib_c[2]);
1259 gMC->Gsvolu("FRCR", "TUBS", idPGF30, fr_c, 5); //Frame - semi circular
1260 gMC->Gsvolu("RBCR", "TUBS", idPGF30, rib_c, 5); //Rib
1262 //Screws -------------------------------------------------------
1263 gMC->Gsvolu("SCYR","TUBE",idScru, spar,3); //screw-vertical part for extended part in -Y
1264 gMC->Gsvolu("SCIR","TUBE",idScru, spar,3); //screw-vertical part
1265 gMC->Gsvolu("SCXR","TUBE",idScru, spar,3); //screw-vertical part for extended part in -X
1266 gMC->Gspos("HDFR",3,"SCIR",xpos_h,ypos_h,zpos_h,0,"ONLY");//positioning Screw-head
1269 radius = fr_c[0] + 0.4 ; //inner radius + 0.4
1271 arc = 3.667; // for 10-degree angle
1272 for(Int_t i = 0; i<8; i++)
1274 theta[i] = arc/radius;
1275 Float_t xpos_is2 = radius * cos(theta[i]);
1276 Float_t ypos_is2 = radius * sin(theta[i]);
1277 gMC->Gspos("SCIR",i+1,"FRCR",xpos_is2, ypos_is2, zpos_is2,0,"ONLY");
1281 gMC->Gspos("RBCR",1, "FRCR", xpos_rc, ypos_rc, zpos_rc,0, "only"); //Rib
1282 gMC->Gspos("FRCR",1, "SQM3", xpos_frc, ypos_frc, zpos_frc,0, "only");// frame semi circular
1283 gMC->Gspos("FRCR",1, "SQM4", xpos_frc, ypos_frc, zpos_frc,0, "only");// frame semi circular
1286 //Plane 2 -----------------------------------------------------------------------------------
1288 //^^^^^^^^^^^^^^^^^^^^^^^^^ Sensitive volumes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1290 Float_t zsenv = 0.5; // distance between two cathode plane
1292 //Segment-0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1293 bpar_h[0] = 95.5/2.;
1295 bpar_h[2] = zsenv/2.;
1296 gMC->Gsvolu("C3G0", "BOX", idGas, bpar_h, 3);
1297 gMC->Gsvolu("C4G0", "BOX", idGas, bpar_h, 3);
1299 //Segment-1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1304 pgpar[4] = -zsenv/2.;
1307 pgpar[7] = zsenv/2.;
1308 pgpar[8] = pgpar[5];
1309 pgpar[9] = pgpar[6];
1310 gMC->Gsvolu("C3G1", "PGON", idGas, pgpar, 10);
1311 gMC->Gsvolu("C4G1", "PGON", idGas, pgpar, 10);
1313 //Segment-2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1318 pgpar[4] = -zsenv/2.;
1321 pgpar[7] = zsenv/2.;
1322 pgpar[8] = pgpar[5];
1323 pgpar[9] = pgpar[6];
1324 gMC->Gsvolu("C3G2", "PGON", idGas, pgpar, 10);
1325 gMC->Gsvolu("C4G2", "PGON", idGas, pgpar, 10);
1327 //Segment-3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1332 pgpar[4] = -zsenv/2.;
1335 pgpar[7] = zsenv/2.;
1336 pgpar[8] = pgpar[5];
1337 pgpar[9] = pgpar[6];
1338 gMC->Gsvolu("C3G3", "PGON", idGas, pgpar, 10);
1339 gMC->Gsvolu("C4G3", "PGON", idGas, pgpar, 10);
1341 //Segment-4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1346 pgpar[4] = -zsenv/2.;
1349 pgpar[7] = zsenv/2.;
1350 pgpar[8] = pgpar[5];
1351 pgpar[9] = pgpar[6];
1352 gMC->Gsvolu("C3G4", "PGON", idGas, pgpar, 10);
1353 gMC->Gsvolu("C4G4", "PGON", idGas, pgpar, 10);
1355 //Segment-5 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1360 pgpar[4] = -zsenv/2.;
1363 pgpar[7] = zsenv/2.;
1364 pgpar[8] = pgpar[5];
1365 pgpar[9] = pgpar[6];
1366 gMC->Gsvolu("C3G5", "PGON", idGas, pgpar, 10);
1367 gMC->Gsvolu("C4G5", "PGON", idGas, pgpar, 10);
1369 //Segment-6 - vertical box ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1371 bpar_v[0] = 2.16/2.;
1372 bpar_v[1] = 95.5/2.;
1373 bpar_v[2] = zsenv/2.;
1374 gMC->Gsvolu("C3G6", "BOX", idGas, bpar_v, 3);
1375 gMC->Gsvolu("C4G6", "BOX", idGas, bpar_v, 3);
1377 //...........................................................................................
1379 //Positioning the PCB
1380 x_hor_pos = 95.5/2.+ 22.6; // 22.6 is inner radius of PCB
1381 y_hor_pos = -(1.6/2); //
1383 x_ver_pos = -(1.6/2); //
1384 y_ver_pos = 95.5/2.+ 22.6;
1386 gMC->Gspos("C3G0",1, "SQM3", x_hor_pos,y_hor_pos,0.,0, "only");// box horizontal
1387 gMC->Gspos("C3G1",1, "SQM3", 0.,0.,0.,0, "only");
1388 gMC->Gspos("C3G2",1, "SQM3", 0.,0.,0.,irot1,"only");
1389 gMC->Gspos("C3G3",1, "SQM3", 0.,0.,0.,irot2, "only");
1390 gMC->Gspos("C3G4",1, "SQM3", 0.,0.,0.,irot3, "only");
1391 gMC->Gspos("C3G5",1, "SQM3", 0.,0.,0.,irot4, "only");
1392 gMC->Gspos("C3G6",1, "SQM3", x_ver_pos,y_ver_pos,0.,0, "only");// box vertical
1394 gMC->Gspos("C4G0",1, "SQM4", x_hor_pos,y_hor_pos,0.,0, "only");// box horizontal
1395 gMC->Gspos("C4G1",1, "SQM4", 0.,0.,0.,0, "only");
1396 gMC->Gspos("C4G2",1, "SQM4", 0.,0.,0.,irot1,"only");
1397 gMC->Gspos("C4G3",1, "SQM4", 0.,0.,0.,irot2, "only");
1398 gMC->Gspos("C4G4",1, "SQM4", 0.,0.,0.,irot3, "only");
1399 gMC->Gspos("C4G5",1, "SQM4", 0.,0.,0.,irot4, "only");
1400 gMC->Gspos("C4G6",1, "SQM4", x_ver_pos,y_ver_pos,0.,0, "only");// box vertical
1402 //^^^^^^^^^^^^^^^^^^^^^^^^^ Sensitive volumes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1405 //##################################################################################################
1406 // Positioning Quadrant in chamber#3 and chamber#4
1407 //##################################################################################################
1408 /******Transformations for Quadrant**********************************************
1409 || I => Quadrant I: no rotation
1411 II. || I. II => Quadrant II: Reflaction of Quadrant I in XZ plane
1412 || => TGeoRotation("Qrot2",90.,180.,90.,90.,180.,0.);
1414 || III => Quadrant III: 180 degree rotation of Quadrant I in XY plane
1415 III. || IV. => TGeoRotation("Qrot3",90.,180.,90.,90.,180.,0.);
1416 || IV => Quadrant IV:-180 degree rotation of Quadrant II in XY plane
1417 => TGeoRotation("Qrot4",90.,0.,90.,-90.,180.,0.);
1418 **********************************************************************************************/
1420 Int_t detElemId1 = 0; // quadrant I
1421 Int_t detElemId2 = 51; // quadrant II
1422 Int_t detElemId3 = 50; // quadrant III
1423 Int_t detElemId4 = 1; // quadrant IV
1425 Float_t half_chamber = zcbb + zcu + zRoha + zmeb + zcu2 + zsenv/2;
1426 // cout<< "\n half_chamber \t" << half_chamber << endl;
1427 // Float_t half_chamber =2.894;
1428 // Float_t half_chamber =3.5;
1430 // ------------------------------St2 Chamber3------------------------------------------------
1432 // GetEnvelopes(2)->AddEnvelope("S3M0", 300, true,TGeoTranslation(0.,0.,0.));
1433 GetEnvelopes(2)->AddEnvelope("SQM3", 300+detElemId1, 1, TGeoTranslation( 0., 0., - half_chamber));
1434 GetEnvelopes(2)->AddEnvelope("SQM3", 300+detElemId2, 2, TGeoTranslation( 0., 0., + half_chamber),
1435 TGeoRotation("Qrot3",90.,180.,90.,90.,180.,0.));
1436 GetEnvelopes(2)->AddEnvelope("SQM3", 300+detElemId3, 3, TGeoTranslation( 0., 0., - half_chamber),
1437 TGeoRotation("Qrot3",90.,180.,90.,270.,0.,0.));
1438 GetEnvelopes(2)->AddEnvelope("SQM3", 300+detElemId4, 4, TGeoTranslation( 0., 0., + half_chamber),
1439 TGeoRotation("Qrot4",90.,0.,90.,-90.,180.,0.));
1441 //--------------------------------St2 Chamber4-------------------------------------------------
1443 GetEnvelopes(3)->AddEnvelope("SQM4", 400+detElemId1, 1, TGeoTranslation( 0., 0., - half_chamber));
1444 GetEnvelopes(3)->AddEnvelope("SQM4", 400+detElemId2, 2, TGeoTranslation( 0., 0., + half_chamber),
1445 TGeoRotation("Qrot2",90.,180.,90.,90.,180.,0.));
1446 GetEnvelopes(3)->AddEnvelope("SQM4", 400+detElemId3, 3, TGeoTranslation( 0., 0., - half_chamber),
1447 TGeoRotation("Qrot3",90.,180.,90.,270.,0.,0.));
1448 GetEnvelopes(3)->AddEnvelope("SQM4", 400+detElemId4, 4, TGeoTranslation( 0., 0., + half_chamber),
1449 TGeoRotation("Qrot4",90.,0.,90.,-90.,180.,0.));
1451 //**********************************************************************************************
1455 //______________________________________________________________________________
1456 void AliMUONSt2GeometryBuilderV2::SetTransformations()
1458 // Defines the transformations for the station2 chambers.
1461 AliMUONChamber* iChamber1 = &fMUON->Chamber(2);
1462 Double_t zpos1 = - iChamber1->Z();
1463 iChamber1->GetGeometry()
1464 ->SetTranslation(TGeoTranslation(0., 0., zpos1));
1466 AliMUONChamber* iChamber2 = &fMUON->Chamber(3);
1467 Double_t zpos2 = - iChamber2->Z();
1468 iChamber2->GetGeometry()
1469 ->SetTranslation(TGeoTranslation(0., 0., zpos2));
1472 //______________________________________________________________________________
1473 void AliMUONSt2GeometryBuilderV2::SetSensitiveVolumes()
1475 // Defines the sensitive volumes for station2 chambers.
1478 GetGeometry(2)->SetSensitiveVolume("C3G0");
1479 GetGeometry(2)->SetSensitiveVolume("C3G1");
1480 GetGeometry(2)->SetSensitiveVolume("C3G2");
1481 GetGeometry(2)->SetSensitiveVolume("C3G3");
1482 GetGeometry(2)->SetSensitiveVolume("C3G4");
1483 GetGeometry(2)->SetSensitiveVolume("C3G5");
1484 GetGeometry(2)->SetSensitiveVolume("C3G6");
1486 GetGeometry(3)->SetSensitiveVolume("C4G0");
1487 GetGeometry(3)->SetSensitiveVolume("C4G1");
1488 GetGeometry(3)->SetSensitiveVolume("C4G2");
1489 GetGeometry(3)->SetSensitiveVolume("C4G3");
1490 GetGeometry(3)->SetSensitiveVolume("C4G4");
1491 GetGeometry(3)->SetSensitiveVolume("C4G5");
1492 GetGeometry(3)->SetSensitiveVolume("C4G6");