AliRoot Core  a565103 (a565103)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONSt2GeometryBuilderV2.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: The ALICE Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
7  * Permission to use, copy, modify and distribute this software and its *
8  * documentation strictly for non-commercial purposes is hereby granted *
9  * without fee, provided that the above copyright notice appears in all *
10  * copies and that both the copyright notice and this permission notice *
11  * appear in the supporting documentation. The authors make no claims *
12  * about the suitability of this software for any purpose. It is *
13  * provided "as is" without express or implied warranty. *
14  **************************************************************************/
15 
16 // $Id$
17 
18 //-----------------------------------------------------------------------------
19 // Class AliMUONSt2GeometryBuilderV2
20 // ---------------------------------
21 // MUON Station2 coarse geometry construction class.
22 // Author: SANJOY PAL ,Prof. SUKALYAN CHATTOPADHAYAY [SINP, KOLKATA]
23 // & Dr.SHAKEEL AHMAD (AMU), INDIA
24 //-----------------------------------------------------------------------------
25 
26 
27 #include <TVirtualMC.h>
28 #include <TGeoMatrix.h>
29 #include <Riostream.h>
30 #include <TArrayI.h>
31 
32 #include "AliRun.h"
33 #include "AliLog.h"
34 
36 #include "AliMUON.h"
37 #include "AliMUONConstants.h"
38 #include "AliMUONGeometryModule.h"
40 #include "AliMUONConstants.h"
41 
42 #define PI 3.14159
43 
47 
48 //______________________________________________________________________________
51  fMUON(muon)
52 {
54 
55 }
56 
57 //______________________________________________________________________________
60  fMUON(0)
61 {
63 }
64 
65 //______________________________________________________________________________
67 {
69 }
70 
71 //
72 // public methods
73 //
74 
75 //______________________________________________________________________________
77 {
79 
80 //
81 //********************************************************************
82 // Station 2 **
83 //********************************************************************
84  // indices 1 and 2 for first and second chambers in the station
85  // iChamber (first chamber) kept for other quanties than Z,
86  // assumed to be the same in both chambers
87 
88  // Get tracking medias Ids
89  Int_t *idtmed = fMUON->GetIdtmed()->GetArray()-1099;
90  Int_t idAir = idtmed[1100]; // medium 1
91  Int_t idGas = idtmed[1108]; // medium Ar-CO2 gas (80%+20%)
92  Int_t idPCB = idtmed[1122]; // medium FR4
93  Int_t idCU = idtmed[1110]; // medium copper
94  Int_t idRoha = idtmed[1113]; // medium roha cell
95  Int_t idPGF30= idtmed[1123]; // medium for Frame Eq.to Bakelite
96  //Int_t idScru = idtmed[1128]; // screw material - Stainless Steel(18%Cr,9%Ni,Fe)
97 
98 
99 
100 /*########################################################################################
101  Create volume for one Quadrant
102 ##########################################################################################*/
103  Float_t tpar1[5];
104  tpar1[0] = 20.55;
105  tpar1[1] = 123.5;
106  tpar1[2] = 6.8/2;
107  tpar1[3] = -12.0;
108  tpar1[4] = 102.0;
109 
110 
111  TVirtualMC::GetMC()->Gsvolu("SQM3","TUBS", idAir, tpar1, 5);
112  TVirtualMC::GetMC()->Gsvolu("SQM4","TUBS", idAir, tpar1, 5);
113 
114 
115 //==================================================================================
116 // Plane
117 //==================================================================================
118 
119 //Thickness of variour parts
120  Float_t zCu = 0.005; // eff. cu in cathode pcb
121  Float_t zCbb = 0.04; //cathode pcb
122  Float_t zRoha = 2.5; // Rhocell
123  Float_t zMeb = 0.04; //Mech. exit board //0.08
124  Float_t zEeb = 0.04; //Effective electronic readout board //0.02
125 
126  //starting Z-positions of various parts--- in Plane-1
127  Float_t zposCu = 0.25; // 2.5 mm => gap between anode & chatode plane
128  Float_t zposCbb = zposCu + zCu;
129  Float_t zposRoha = zposCbb + zCbb;
130  Float_t zposMeb = zposRoha + zRoha;
131  Float_t zposEeb = zposMeb + zMeb;
132 
133  Float_t zposCuBar = zposCu + zCu/2.; //for segment 0 & 6
134  Float_t zposCbbBar = zposCbb + zCbb/2.;
135  Float_t zposRohaBar = zposRoha + zRoha/2.;
136  Float_t zposMebBar = zposMeb + zMeb/2.;
137  Float_t zposEebBar = zposEeb + zEeb/2.;
138 
139 
140  //Cathode PCB + Copper sheet + Rohacell + mech exit board + eff. electronic exit board
141 
142  //Segment-0 ~~~Horizantal box ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
143  Float_t bparH[3];
144  bparH[0] = 95.5/2.; // extension beyond 0 deg in x direction // 94.5
145  bparH[1] = 1.2/2.; // extension beyond 0 deg in y direction (3.7[total extn] - 2.5[frame dim])
146  bparH[2] = zCu/2.; //Thickness of Copper sheet
147  TVirtualMC::GetMC()->Gsvolu("SCU0L", "BOX", idCU, bparH, 3);
148 
149  bparH[2] = zCbb/2.; // thickness of cathode sheet in z direction
150  TVirtualMC::GetMC()->Gsvolu("SCB0L", "BOX", idPCB, bparH, 3);
151 
152  bparH[2] = zRoha/2.; //Thickness of Roha cell
153  TVirtualMC::GetMC()->Gsvolu("SRH0L", "BOX", idRoha, bparH, 3);
154 
155  bparH[2] = zMeb/2; //Thickness of mechanical exit board
156  TVirtualMC::GetMC()->Gsvolu("SMB0L", "BOX", idPCB, bparH, 3);
157 
158  bparH[2] = zEeb/2; //Thickness of effective electronic exit board
159  TVirtualMC::GetMC()->Gsvolu("SEB0L", "BOX", idCU, bparH, 3);
160 
161  //Segment-1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
162  Float_t pgpar[10]; // polygon
163  pgpar[0] = 0.; // initial angle
164  pgpar[1] = 90.; // increment in angle starting from initial angle
165  pgpar[2] = 5; // number of side
166  pgpar[3] = 2.; // number of plane
167  pgpar[4] = -zCu/2.; // z-position of the first plane
168  pgpar[5] = 23.1; // innner radius first plane
169  pgpar[6] = 117.6; // outer radious first plane
170  pgpar[7] = zCu/2.; // z-position of the second plane
171  pgpar[8] = pgpar[5]; // innner radius of second plane
172  pgpar[9] = pgpar[6]; // outer radious of second plane
173  TVirtualMC::GetMC()->Gsvolu("SCU1L", "PGON", idCU, pgpar, 10);
174 
175  pgpar[4] = -zCbb/2.; // z-position of the first plane
176  pgpar[7] = zCbb/2.; // Thickness of copper-sheet
177  TVirtualMC::GetMC()->Gsvolu("SCB1L", "PGON", idPCB, pgpar, 10);
178 
179  pgpar[4] = -zRoha/2.; // Thickness of Roha cell
180  pgpar[7] = zRoha/2.; // Thickness of Roha cell
181  TVirtualMC::GetMC()->Gsvolu("SRH1L", "PGON", idRoha, pgpar, 10);
182 
183  pgpar[4] = -zMeb/2.; // Thickness of mechanical exit board
184  pgpar[7] = zMeb/2.; // Thickness of mechanical exit board
185  TVirtualMC::GetMC()->Gsvolu("SMB1L", "PGON", idPCB, pgpar, 10);
186 
187  pgpar[4] = -zEeb/2.; // Thickness of electronic readout board
188  pgpar[7] = zEeb/2.; // Thickness of electronic readout board
189  TVirtualMC::GetMC()->Gsvolu("SEB1L", "PGON", idCU, pgpar, 10);
190 
191 
192 //Segment-2 - vertical box (simalar to horizontal bar as in Segment 0)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
193 
194  Float_t bparV[3];
195 
196  bparV[0] = 1.0/2.;
197  bparV[1] = 95.5/2.; // 94.5
198  bparV[2] = zCu/2.;
199  TVirtualMC::GetMC()->Gsvolu("SCU2L", "BOX", idCU, bparV, 3);
200 
201  bparV[2] = zCbb/2.;
202  TVirtualMC::GetMC()->Gsvolu("SCB2L", "BOX", idPCB, bparV, 3);
203 
204 
205  bparV[2] = zRoha/2.;
206  TVirtualMC::GetMC()->Gsvolu("SRH2L", "BOX", idRoha, bparV, 3);
207 
208  bparV[2] = zMeb/2;
209  TVirtualMC::GetMC()->Gsvolu("SMB2L", "BOX", idPCB, bparV, 3);
210 
211  bparV[2] = zEeb/2;
212  TVirtualMC::GetMC()->Gsvolu("SEB2L", "BOX", idCU, bparV, 3);
213 
214  //....(Setting posion of Segment 0,1,2)..................................................................
215 
216  Float_t xposHorBox = bparH[0] + 23.1; // 23.1 = 20.6(inner radius of qrd) + 2.5 (width of frame)
217  Float_t yposHorBox = -bparH[1];
218 
219  Float_t xposVerBox = -bparV[0];
220  Float_t yposVerBox = bparV[1] + 23.1;
221 
222 
223  //Positioning the PCB
224 
225 
226  // chamber 3
227  TVirtualMC::GetMC()->Gspos("SCB0L",1, "SQM3",xposHorBox,yposHorBox,zposCbbBar,0, "ONLY");
228  TVirtualMC::GetMC()->Gspos("SCB1L",1, "SQM3", 0.0,0.0,zposCbbBar,0, "ONLY");
229  TVirtualMC::GetMC()->Gspos("SCB2L",1, "SQM3",xposVerBox,yposVerBox,zposCbbBar,0, "ONLY");
230 
231  TVirtualMC::GetMC()->Gspos("SCB0L",2, "SQM3",xposHorBox,yposHorBox,-zposCbbBar,0, "ONLY");
232  TVirtualMC::GetMC()->Gspos("SCB1L",2, "SQM3", 0.0,0.0,-zposCbbBar,0, "ONLY");
233  TVirtualMC::GetMC()->Gspos("SCB2L",2, "SQM3",xposVerBox,yposVerBox,-zposCbbBar,0, "ONLY");
234 
235  // chamber 4
236  TVirtualMC::GetMC()->Gspos("SCB0L",3, "SQM4",xposHorBox,yposHorBox,zposCbbBar,0, "ONLY");
237  TVirtualMC::GetMC()->Gspos("SCB1L",3, "SQM4", 0.0,0.0,zposCbbBar,0, "ONLY");
238  TVirtualMC::GetMC()->Gspos("SCB2L",3, "SQM4",xposVerBox,yposVerBox,zposCbbBar,0, "ONLY");
239 
240  TVirtualMC::GetMC()->Gspos("SCB0L",4, "SQM4",xposHorBox,yposHorBox,-zposCbbBar,0, "ONLY");
241  TVirtualMC::GetMC()->Gspos("SCB1L",4, "SQM4", 0.0,0.0,-zposCbbBar,0, "ONLY");
242  TVirtualMC::GetMC()->Gspos("SCB2L",4, "SQM4",xposVerBox,yposVerBox,-zposCbbBar,0, "ONLY");
243 
244 
245  //Positioning Copper sheet
246 
247  // chamber 3
248 
249  TVirtualMC::GetMC()->Gspos("SCU0L",1, "SQM3",xposHorBox,yposHorBox,zposCuBar,0, "ONLY");
250  TVirtualMC::GetMC()->Gspos("SCU1L",1, "SQM3", 0.0,0.0,zposCuBar,0, "ONLY");
251  TVirtualMC::GetMC()->Gspos("SCU2L",1, "SQM3",xposVerBox,yposVerBox,zposCuBar,0, "ONLY");
252 
253  TVirtualMC::GetMC()->Gspos("SCU0L",2, "SQM3",xposHorBox,yposHorBox,-zposCuBar,0, "ONLY");
254  TVirtualMC::GetMC()->Gspos("SCU1L",2, "SQM3", 0.0,0.0,-zposCuBar,0, "ONLY");
255  TVirtualMC::GetMC()->Gspos("SCU2L",2, "SQM3",xposVerBox,yposVerBox,-zposCuBar,0, "ONLY");
256 
257  // chamber 4
258  TVirtualMC::GetMC()->Gspos("SCU0L",3, "SQM4",xposHorBox,yposHorBox,zposCuBar,0, "ONLY");
259  TVirtualMC::GetMC()->Gspos("SCU1L",3, "SQM4", 0.0,0.0,zposCuBar,0, "ONLY");
260  TVirtualMC::GetMC()->Gspos("SCU2L",3, "SQM4",xposVerBox,yposVerBox,zposCuBar,0, "ONLY");
261 
262  TVirtualMC::GetMC()->Gspos("SCU0L",4, "SQM4",xposHorBox,yposHorBox,-zposCuBar,0, "ONLY");
263  TVirtualMC::GetMC()->Gspos("SCU1L",4, "SQM4", 0.0,0.0,-zposCuBar,0, "ONLY");
264  TVirtualMC::GetMC()->Gspos("SCU2L",4, "SQM4",xposVerBox,yposVerBox,-zposCuBar,0, "ONLY");
265 
266  //Positioning Roha cell
267 
268  // chamber 3
269 
270  TVirtualMC::GetMC()->Gspos("SRH0L",1, "SQM3",xposHorBox,yposHorBox,zposRohaBar,0, "ONLY");
271  TVirtualMC::GetMC()->Gspos("SRH1L",1, "SQM3", 0.0,0.0,zposRohaBar,0, "ONLY");
272  TVirtualMC::GetMC()->Gspos("SRH2L",1, "SQM3",xposVerBox,yposVerBox,zposRohaBar,0, "ONLY");
273 
274  TVirtualMC::GetMC()->Gspos("SRH0L",2, "SQM3",xposHorBox,yposHorBox,-zposRohaBar,0, "ONLY");
275  TVirtualMC::GetMC()->Gspos("SRH1L",2, "SQM3", 0.0,0.0,-zposRohaBar,0, "ONLY");
276  TVirtualMC::GetMC()->Gspos("SRH2L",2, "SQM3",xposVerBox,yposVerBox,-zposRohaBar,0, "ONLY");
277 
278  // chamber 4
279 
280  TVirtualMC::GetMC()->Gspos("SRH0L",3, "SQM4",xposHorBox,yposHorBox,zposRohaBar,0, "ONLY");
281  TVirtualMC::GetMC()->Gspos("SRH1L",3, "SQM4", 0.0,0.0,zposRohaBar,0, "ONLY");
282  TVirtualMC::GetMC()->Gspos("SRH2L",3, "SQM4",xposVerBox,yposVerBox,zposRohaBar,0, "ONLY");
283 
284  TVirtualMC::GetMC()->Gspos("SRH0L",4, "SQM4",xposHorBox,yposHorBox,-zposRohaBar,0, "ONLY");
285  TVirtualMC::GetMC()->Gspos("SRH1L",4, "SQM4", 0.0,0.0,-zposRohaBar,0, "ONLY");
286  TVirtualMC::GetMC()->Gspos("SRH2L",4, "SQM4",xposVerBox,yposVerBox,-zposRohaBar,0, "ONLY");
287 
288  //Positioning of Mech. exit board
289 
290  // chamber 3
291 
292  TVirtualMC::GetMC()->Gspos("SMB0L",1, "SQM3",xposHorBox,yposHorBox,zposMebBar,0, "ONLY");
293  TVirtualMC::GetMC()->Gspos("SMB1L",1, "SQM3", 0.0,0.0,zposMebBar,0, "ONLY");
294  TVirtualMC::GetMC()->Gspos("SMB2L",1, "SQM3",xposVerBox,yposVerBox,zposMebBar,0, "ONLY");
295 
296  TVirtualMC::GetMC()->Gspos("SMB0L",2, "SQM3",xposHorBox,yposHorBox,-zposMebBar,0, "ONLY");
297  TVirtualMC::GetMC()->Gspos("SMB1L",2, "SQM3", 0.0,0.0,-zposMebBar,0, "ONLY");
298  TVirtualMC::GetMC()->Gspos("SMB2L",2, "SQM3",xposVerBox,yposVerBox,-zposMebBar,0, "ONLY");
299  // chamber 4
300 
301  TVirtualMC::GetMC()->Gspos("SMB0L",3, "SQM4",xposHorBox,yposHorBox,zposMebBar,0, "ONLY");
302  TVirtualMC::GetMC()->Gspos("SMB1L",3, "SQM4", 0.0,0.0,zposMebBar,0, "ONLY");
303  TVirtualMC::GetMC()->Gspos("SMB2L",3, "SQM4",xposVerBox,yposVerBox,zposMebBar,0, "ONLY");
304 
305  TVirtualMC::GetMC()->Gspos("SMB0L",4, "SQM4",xposHorBox,yposHorBox,-zposMebBar,0, "ONLY");
306  TVirtualMC::GetMC()->Gspos("SMB1L",4, "SQM4", 0.0,0.0,-zposMebBar,0, "ONLY");
307  TVirtualMC::GetMC()->Gspos("SMB2L",4, "SQM4",xposVerBox,yposVerBox,-zposMebBar,0, "ONLY");
308 
309  //Positioning of Electronic exit board
310 
311 
312  // chamber 3
313 
314  TVirtualMC::GetMC()->Gspos("SEB0L",1, "SQM3",xposHorBox,yposHorBox,zposEebBar,0, "ONLY");
315  TVirtualMC::GetMC()->Gspos("SEB1L",1, "SQM3", 0.0,0.0,zposEebBar,0, "ONLY");
316  TVirtualMC::GetMC()->Gspos("SEB2L",1, "SQM3",xposVerBox,yposVerBox,zposEebBar,0, "ONLY");
317 
318  TVirtualMC::GetMC()->Gspos("SEB0L",2, "SQM3",xposHorBox,yposHorBox,-zposEebBar,0, "ONLY");
319  TVirtualMC::GetMC()->Gspos("SEB1L",2, "SQM3", 0.0,0.0,-zposEebBar,0, "ONLY");
320  TVirtualMC::GetMC()->Gspos("SEB2L",2, "SQM3",xposVerBox,yposVerBox,-zposEebBar,0, "ONLY");
321  // chamber 4
322 
323  TVirtualMC::GetMC()->Gspos("SEB0L",3, "SQM4",xposHorBox,yposHorBox,zposEebBar,0, "ONLY");
324  TVirtualMC::GetMC()->Gspos("SEB1L",3, "SQM4", 0.0,0.0,zposEebBar,0, "ONLY");
325  TVirtualMC::GetMC()->Gspos("SEB2L",3, "SQM4",xposVerBox,yposVerBox,zposEebBar,0, "ONLY");
326 
327  TVirtualMC::GetMC()->Gspos("SEB0L",4, "SQM4",xposHorBox,yposHorBox,-zposEebBar,0, "ONLY");
328  TVirtualMC::GetMC()->Gspos("SEB1L",4, "SQM4", 0.0,0.0,-zposEebBar,0, "ONLY");
329  TVirtualMC::GetMC()->Gspos("SEB2L",4, "SQM4",xposVerBox,yposVerBox,-zposEebBar,0, "ONLY");
330 
331 
332  //----------------------------------------------------------------------
333  // Frames
334  //----------------------------------------------------------------------
335  //Frame-1
336 
337  Float_t frame1[3] ;
338  frame1[0] = 101.0/2.; //100.6 = 94.5 + 2.5 + 3.6
339  frame1[1] = 2.5/2.;
340  frame1[2] = 5.0/2.;
341 
342  TVirtualMC::GetMC()->Gsvolu("SFRM1", "BOX", idPGF30, frame1, 3); //Frame - 1 // fill with pkk GF30
343 
344  Float_t arib1[3];
345  arib1[0] = frame1[0];
346  arib1[1] = 0.9/2.;
347  arib1[2] =(frame1[2]-0.95)/2.0;
348 
349  TVirtualMC::GetMC()->Gsvolu("SFRA1", "BOX", idAir, arib1, 3); // fill with air
350 
351  Float_t xposarib1 = 0;
352  Float_t yposarib1 = -frame1[1] + arib1[1];
353  Float_t zposarib1 = frame1[2] - arib1[2];
354 
355  TVirtualMC::GetMC()->Gspos("SFRA1",1, "SFRM1", xposarib1, yposarib1, zposarib1,0, "ONLY"); //replace pkk GF30 with air(b)
356  TVirtualMC::GetMC()->Gspos("SFRA1",2, "SFRM1", xposarib1, yposarib1, -zposarib1,0, "ONLY"); //replace pkk GF30 with air(nb)
357 
358  Float_t rrib1[3];
359  rrib1[0] = frame1[0];
360  rrib1[1] = 0.6/2.;
361  rrib1[2] =(frame1[2]-0.95)/2.0;
362 
363  TVirtualMC::GetMC()->Gsvolu("SFRR1", "BOX", idRoha, rrib1, 3); // fill with rohacell
364 
365  Float_t xposrrib1 = 0.0;
366  Float_t yposrrib1 = frame1[1] - rrib1[1];
367  Float_t zposrrib1 = frame1[2] - rrib1[2];
368 
369  TVirtualMC::GetMC()->Gspos("SFRR1",1, "SFRM1", xposrrib1, yposrrib1, zposrrib1,0, "ONLY");//replace pkk GF30 with rohacell
370  TVirtualMC::GetMC()->Gspos("SFRR1",2, "SFRM1", xposrrib1, yposrrib1, -zposrrib1,0, "ONLY");//replace pkk GF30 with rohacell
371 
372 
373  Float_t xposFr1 = frame1[0] + 20.6;
374  Float_t yposFr1 = -3.7 + frame1[1] ;
375  Float_t zposFr1 = 0.0;
376 
377  TVirtualMC::GetMC()->Gspos("SFRM1",1, "SQM3", xposFr1, yposFr1, zposFr1,0, "ONLY");// frame -1
378  TVirtualMC::GetMC()->Gspos("SFRM1",2, "SQM4", xposFr1, yposFr1, zposFr1,0, "ONLY");// frame -1
379 
380 
381  //......................................................................................
382  //Frame-2
383 
384  Float_t frame2[3];
385  frame2[0] = 4.0/2.;
386  frame2[1] = 1.2/2.;
387  frame2[2] = 5.0/2;
388 
389  TVirtualMC::GetMC()->Gsvolu("SFRM2", "BOX", idPGF30, frame2, 3); //Frame - 2
390 
391  Float_t rrib2[3];
392  rrib2[0] = frame2[0]-1.0/2.0;
393  rrib2[1] = frame2[1];
394  rrib2[2] =(frame2[2]-0.95)/2.0;
395 
396  TVirtualMC::GetMC()->Gsvolu("SFRR2", "BOX", idRoha, rrib2, 3);
397 
398  Float_t xposrrib2 = -1.0/2.0;
399  Float_t yposrrib2 = 0.0;
400  Float_t zposrrib2 = frame2[2] - rrib2[2];
401 
402  TVirtualMC::GetMC()->Gspos("SFRR2",1, "SFRM2", xposrrib2, yposrrib2, zposrrib2,0, "ONLY");//replace pkk GF30 with rohacell
403  TVirtualMC::GetMC()->Gspos("SFRR2",2, "SFRM2", xposrrib2, yposrrib2, -zposrrib2,0, "ONLY");//replace pkk GF30 with roha
404 
405 
406 
407  Float_t xposFr2 = frame2[0] + 117.6;
408  Float_t yposFr2 = -frame2[1];
409  Float_t zposFr2 = 0.0;
410 
411  TVirtualMC::GetMC()->Gspos("SFRM2",1, "SQM3", xposFr2, yposFr2, zposFr2,0, "MANY");//global positing of frame in SQM3
412  TVirtualMC::GetMC()->Gspos("SFRM2",2, "SQM4", xposFr2, yposFr2, zposFr2,0, "MANY");//global positing of frame in SQM4
413 
414 
415  //......................................................................................
416 
417  //Frame-3
418 
419  Float_t pgparFr3[10];
420  pgparFr3[0] = 0.;
421  pgparFr3[1] = 90.;
422  pgparFr3[2] = 5;
423  pgparFr3[3] = 2.;
424  pgparFr3[4] = 0.;
425  pgparFr3[5] = 117.6;
426  pgparFr3[6] = 121.6;
427  pgparFr3[7] = pgparFr3[4] + 5.0;
428  pgparFr3[8] = pgparFr3[5];
429  pgparFr3[9] = pgparFr3[6];
430 
431  TVirtualMC::GetMC()->Gsvolu("SFRM3", "PGON", idPGF30, pgparFr3, 10);
432 
433  Float_t pgparRrib3[10];
434  pgparRrib3[0] = 0.;
435  pgparRrib3[1] = 90.;
436  pgparRrib3[2] = 5;
437  pgparRrib3[3] = 2.;
438  pgparRrib3[4] = 0.;
439  pgparRrib3[5] = 117.6;
440  pgparRrib3[6] = 120.6;
441  pgparRrib3[7] = pgparRrib3[4] +1.55 ;
442  pgparRrib3[8] = pgparRrib3[5];
443  pgparRrib3[9] = pgparRrib3[6];
444 
445  TVirtualMC::GetMC()->Gsvolu("SFRR3", "PGON", idRoha, pgparRrib3, 10);
446 
447  Float_t xposrrib3 = 0.0;
448  Float_t yposrrib3 = 0.0;
449  Float_t zposrrib3 = 0.0;
450 
451  TVirtualMC::GetMC()->Gspos("SFRR3",1, "SFRM3", xposrrib3, yposrrib3, zposrrib3,0, "ONLY");
452 
453  zposrrib3 = 3.45;
454 
455  TVirtualMC::GetMC()->Gspos("SFRR3",2, "SFRM3", xposrrib3, yposrrib3, zposrrib3,0, "ONLY");
456 
457 
458 
459  Float_t xposFr3 = 0.0;
460  Float_t yposFr3 = 0.0;
461  Float_t zposFr3 = -frame1[2];
462 
463  TVirtualMC::GetMC()->Gspos("SFRM3",1, "SQM3", xposFr3, yposFr3, zposFr3,0, "ONLY");// frame -1
464  TVirtualMC::GetMC()->Gspos("SFRM3",2, "SQM4", xposFr3, yposFr3, zposFr3,0, "ONLY");// frame -1
465 
466 
467  //......................................................................................
468  //Frame-4
469 
470  Float_t frame4[3];
471  frame4[0] = 1.0/2.;
472  frame4[1] = 4.0/2.;
473  frame4[2] = frame1[2];
474 
475  TVirtualMC::GetMC()->Gsvolu("SFRM4", "BOX", idPGF30, frame4, 3);
476 
477  Float_t rrib4[3];
478  rrib4[0] = frame4[0];
479  rrib4[1] = frame4[1]-1.0/2;
480  rrib4[2] =(frame4[2]-0.95)/2.0;
481 
482  TVirtualMC::GetMC()->Gsvolu("SFRR4", "BOX", idRoha, rrib4, 3);
483 
484  Float_t xposrrib4 = 0.0;
485  Float_t yposrrib4 = -1.0/2;
486  Float_t zposrrib4 = frame4[2] - rrib4[2];
487 
488  TVirtualMC::GetMC()->Gspos("SFRR4",1, "SFRM4", xposrrib4, yposrrib4, zposrrib4,0, "ONLY");
489  TVirtualMC::GetMC()->Gspos("SFRR4",2, "SFRM4", xposrrib4, yposrrib4, -zposrrib4,0, "ONLY");
490 
491 
492 
493  Float_t xposFr4 = -frame4[0];
494  Float_t yposFr4 = -frame4[1] + 117.6;
495  Float_t zposFr4 = 0.0;
496 
497  TVirtualMC::GetMC()->Gspos("SFRM4",1, "SQM3", xposFr4, yposFr4, zposFr4,0, "MANY");
498  TVirtualMC::GetMC()->Gspos("SFRM4",2, "SQM4", xposFr4, yposFr4, zposFr4,0, "MANY");
499 
500 
501  //......................................................................................
502  //Frame-5
503  Float_t frame5[3] ;
504  frame5[0] = 2.7/2.;
505  frame5[1] = 101.0/2.;
506  frame5[2] = 5.0/2.;
507 
508  TVirtualMC::GetMC()->Gsvolu("SFRM5", "BOX", idPGF30, frame5, 3); //Frame - 1
509 
510  Float_t arib5[3];
511  arib5[0] = 0.9/2.0;
512  arib5[1] = frame5[1];
513  arib5[2] = (frame5[2]-0.95)/2.0;
514 
515  TVirtualMC::GetMC()->Gsvolu("SFRA5", "BOX", idAir, arib5, 3);
516 
517  Float_t xposarib5 = -frame5[0] + arib5[0];
518  Float_t yposarib5 = 0.0;
519  Float_t zposarib5 = frame5[2] - arib5[2];
520 
521  TVirtualMC::GetMC()->Gspos("SFRA5",1, "SFRM5", xposarib5, yposarib5, zposarib5,0, "ONLY");
522  TVirtualMC::GetMC()->Gspos("SFRA5",2, "SFRM5", xposarib5, yposarib5, -zposarib5,0, "ONLY");
523 
524  Float_t rrib5[3];
525  rrib5[0] = 0.8/2.0;
526  rrib5[1] = frame5[1];
527  rrib5[2] = (frame5[2]-0.95)/2.0;
528 
529  TVirtualMC::GetMC()->Gsvolu("SFRR5", "BOX", idRoha, rrib5, 3);
530 
531  Float_t xposrrib5 = frame5[0] - rrib5[0];
532  Float_t yposrrib5 = 0.0;
533  Float_t zposrrib5 = frame5[2] - rrib5[2];
534 
535  TVirtualMC::GetMC()->Gspos("SFRR5",1, "SFRM5", xposrrib5, yposrrib5, zposrrib5,0, "ONLY");
536  TVirtualMC::GetMC()->Gspos("SFRR5",2, "SFRM5", xposrrib5, yposrrib5, -zposrrib5,0, "ONLY");
537 
538  Float_t xposFr5 = -3.7 + frame5[0];
539  Float_t yposFr5 = frame5[1] + 20.6;
540  Float_t zposFr5 = 0.0;
541 
542  TVirtualMC::GetMC()->Gspos("SFRM5",1, "SQM3", xposFr5, yposFr5, zposFr5,0, "ONLY");
543  TVirtualMC::GetMC()->Gspos("SFRM5",2, "SQM4", xposFr5, yposFr5, zposFr5,0, "ONLY");
544 
545  //......................................................................................
546  //Frame -6
547 
548  Float_t frame6[3];
549  frame6[0] = 1.0/2.;
550  frame6[1] = 2.5/2.;
551  frame6[2] = frame1[2];
552 
553  TVirtualMC::GetMC()->Gsvolu("SFRM6", "BOX", idPGF30, frame6, 3);
554 
555  Float_t rrib6[3];
556  rrib6[0] = frame6[0];
557  rrib6[1] = 1.5/2.;
558  rrib6[2] =(frame2[2]-0.95)/2.0;
559 
560  TVirtualMC::GetMC()->Gsvolu("SFRR6", "BOX", idRoha, rrib6, 3);
561 
562  Float_t xposrrib6 = 0.0;
563  Float_t yposrrib6 = 1.0/2.0;
564  Float_t zposrrib6 = frame6[2] - rrib6[2];
565 
566  TVirtualMC::GetMC()->Gspos("SFRR6",1, "SFRM6", xposrrib6, yposrrib6, zposrrib6,0, "ONLY");
567  TVirtualMC::GetMC()->Gspos("SFRR6",2, "SFRM6", xposrrib6, yposrrib6, -zposrrib6,0, "ONLY");
568 
569 
570 
571  Float_t xposFr6 = -frame6[0];
572  Float_t yposFr6 = frame6[1] + 20.6;
573  Float_t zposFr6 = 0.0;
574 
575  TVirtualMC::GetMC()->Gspos("SFRM6",1, "SQM3", xposFr6, yposFr6, zposFr6,0, "ONLY");
576  TVirtualMC::GetMC()->Gspos("SFRM6",2, "SQM4", xposFr6, yposFr6, zposFr6,0, "ONLY");
577 
578 
579 //......................................................................................
580 //Frame - 7 inner pgon
581 
582  Float_t pgparFr7[10];
583  pgparFr7[0] = 0.;
584  pgparFr7[1] = 90.;
585  pgparFr7[2] = 5;
586  pgparFr7[3] = 2.;
587  pgparFr7[4] = 0.;
588  pgparFr7[5] = 20.6;
589  pgparFr7[6] = 23.1;
590  pgparFr7[7] = pgparFr7[4] + 5.0;
591  pgparFr7[8] = pgparFr7[5];
592  pgparFr7[9] = pgparFr7[6];
593 
594  TVirtualMC::GetMC()->Gsvolu("SFRM7", "PGON", idPGF30, pgparFr7, 10);
595 
596  Float_t pgparRrib7[10];
597  pgparRrib7[0] = 0.;
598  pgparRrib7[1] = 90.;
599  pgparRrib7[2] = 5;
600  pgparRrib7[3] = 2.;
601  pgparRrib7[4] = 0.;
602  pgparRrib7[5] = 21.6;
603  pgparRrib7[6] = 23.1;
604  pgparRrib7[7] = pgparRrib7[4] + 1.55;
605  pgparRrib7[8] = pgparRrib7[5];
606  pgparRrib7[9] = pgparRrib7[6];
607 
608  TVirtualMC::GetMC()->Gsvolu("SFRR7", "PGON", idRoha, pgparRrib7, 10);
609 
610  Float_t xposrrib7 = 0.0;
611  Float_t yposrrib7 = 0.0;
612  Float_t zposrrib7 = 0.0;
613 
614  TVirtualMC::GetMC()->Gspos("SFRR7",1, "SFRM7", xposrrib7, yposrrib7, zposrrib7,0, "ONLY");
615 
616  zposrrib7 = 3.45;
617 
618  TVirtualMC::GetMC()->Gspos("SFRR7",2, "SFRM7", xposrrib7, yposrrib7, zposrrib7,0, "ONLY");
619 
620  Float_t xposFr7 = 0.0;
621  Float_t yposFr7 = 0.0;
622  Float_t zposFr7 = -frame1[2];
623 
624  TVirtualMC::GetMC()->Gspos("SFRM7",1, "SQM3", xposFr7, yposFr7, zposFr7,0, "ONLY");
625  TVirtualMC::GetMC()->Gspos("SFRM7",2, "SQM4", xposFr7, yposFr7, zposFr7,0, "ONLY");
626 
627 
628  //......................................................................................
629  //Frame - 8
630 
631 
632  Float_t frame8[3] ;
633  frame8[0] = 2.5/2.0;
634  frame8[1] = 1.2/2.0;
635  frame8[2] = frame1[2];
636 
637  TVirtualMC::GetMC()->Gsvolu("SFRM8", "BOX", idPGF30, frame8, 3); //Frame - 2
638 
639  Float_t rrib8[3];
640  rrib8[0] = frame8[0]-1.0/2;
641  rrib8[1] = frame8[1];
642  rrib8[2] =(frame8[2]-0.95)/2.0;
643 
644  TVirtualMC::GetMC()->Gsvolu("SFRR8", "BOX", idRoha, rrib8, 3);
645 
646  Float_t xposrrib8 = -1.0/2;
647  Float_t yposrrib8 = 0.0;
648  Float_t zposrrib8 = frame8[2] - rrib8[2];
649 
650  TVirtualMC::GetMC()->Gspos("SFRR8",1, "SFRM8", xposrrib8, yposrrib8, zposrrib8,0, "ONLY");
651  TVirtualMC::GetMC()->Gspos("SFRR8",2, "SFRM8", xposrrib8, yposrrib8, -zposrrib8,0, "ONLY");
652 
653 
654 
655  Float_t xposFr8 = frame8[0] + 20.6;
656  Float_t yposFr8 = -frame8[1];
657  Float_t zposFr8 = 0.0;
658 
659  TVirtualMC::GetMC()->Gspos("SFRM8",1, "SQM3", xposFr8, yposFr8, zposFr8,0, "ONLY");
660  TVirtualMC::GetMC()->Gspos("SFRM8",2, "SQM4", xposFr8, yposFr8, zposFr8,0, "ONLY");
661 
662 
663 
664 
665  //^^^^^^^^^^^^^^^^^^^^^^^^^ Sensitive volumes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
666 
667  Float_t zsenv = 0.5; // distance between two cathode plane
668 
669  //Segment-0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
670  bparH[0] = 94.5/2.;
671  bparH[1] = 1.2/2.;
672  bparH[2] = zsenv/2.;
673  TVirtualMC::GetMC()->Gsvolu("SC3G0", "BOX", idGas, bparH, 3);
674  TVirtualMC::GetMC()->Gsvolu("SC4G0", "BOX", idGas, bparH, 3);
675 
676  //Segment-1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
677  pgpar[0] = 0.;
678  pgpar[1] = 90.;
679  pgpar[2] = 5;
680  pgpar[3] = 2.;
681  pgpar[4] = -zsenv/2.;
682  pgpar[5] = 23.1;
683  pgpar[6] = 117.6;
684  pgpar[7] = zsenv/2.;
685  pgpar[8] = pgpar[5];
686  pgpar[9] = pgpar[6];
687  TVirtualMC::GetMC()->Gsvolu("SC3G1", "PGON", idGas, pgpar, 10);
688  TVirtualMC::GetMC()->Gsvolu("SC4G1", "PGON", idGas, pgpar, 10);
689 
690 
691  //Segment-2 - vertical box ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
692 
693  bparV[0] = 1.0/2.;
694  bparV[1] = 95.5/2.;
695  bparV[2] = zsenv/2.;
696  TVirtualMC::GetMC()->Gsvolu("SC3G2", "BOX", idGas, bparV, 3);
697  TVirtualMC::GetMC()->Gsvolu("SC4G2", "BOX", idGas, bparV, 3);
698 
699  //...........................................................................................
700 
701  xposHorBox = bparH[0] + 23.1;
702  yposHorBox = -bparH[1];
703 
704  xposVerBox = -bparV[0];
705  yposVerBox = bparV[1] + 23.1;
706 
707  TVirtualMC::GetMC()->Gspos("SC3G0",1, "SQM3", xposHorBox,yposHorBox,0.,0, "ONLY");
708  TVirtualMC::GetMC()->Gspos("SC3G1",1, "SQM3", 0.,0.,0.,0, "ONLY");
709  TVirtualMC::GetMC()->Gspos("SC3G2",1, "SQM3", xposVerBox,yposVerBox,0.,0, "ONLY");
710 
711 
712  TVirtualMC::GetMC()->Gspos("SC4G0",1, "SQM4", xposHorBox,yposHorBox,0.,0, "ONLY");
713  TVirtualMC::GetMC()->Gspos("SC4G1",1, "SQM4", 0.,0.,0.,0, "ONLY");
714  TVirtualMC::GetMC()->Gspos("SC4G2",1, "SQM4", xposVerBox,yposVerBox,0.,0, "ONLY");
715 
716 
717  //^^^^^^^^^^^^^^^^^^^^^^^^^ Sensitive volumes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
718 
719 
720 
721 //##################################################################################################
722 // Positioning Quadrant in chamber#3 and chamber#4
723 //##################################################################################################
724 /******Transformations for Quadrant**********************************************
725  || I => Quadrant I: no rotation
726  ||
727  II. || I. II => Quadrant II: Reflaction of Quadrant I in XZ plane
728  || => TGeoRotation("Qrot2",90.,180.,90.,90.,180.,0.);
729 =============
730  || III => Quadrant III: 180 degree rotation of Quadrant I in XY plane
731  III. || IV. => TGeoRotation("Qrot3",90.,180.,90.,90.,180.,0.);
732  || IV => Quadrant IV:-180 degree rotation of Quadrant II in XY plane
733  => TGeoRotation("Qrot4",90.,0.,90.,-90.,180.,0.);
734 **********************************************************************************************/
735 
736  Int_t detElemId1 = 1; // quadrant I
737  Int_t detElemId2 = 0; // quadrant II
738  Int_t detElemId3 = 3; // quadrant III
739  Int_t detElemId4 = 2; // quadrant IV
740 
741  //Float_t halfChamber = zCbb + zCu + zRoha + zMeb + zEeb + zsenv/2;
742 // cout<< "\n half_chamber \t" << half_chamber << endl;
743 
744  Float_t halfChamber = tpar1[2];// tpar1[2] = 6.8/2;
745 
746 // ------------------------------St2 Chamber3------------------------------------------------
747 
748  // GetEnvelopes(2)->AddEnvelope("S3M0", 300, true,TGeoTranslation(0.,0.,0.));
749  GetEnvelopes(2)->AddEnvelope("SQM3", 300+detElemId1, 1, TGeoTranslation( 0., 0., - halfChamber));
750  GetEnvelopes(2)->AddEnvelope("SQM3", 300+detElemId2, 2, TGeoTranslation( 0., 0., + halfChamber),
751  TGeoRotation("Qrot3",90.,180.,90.,90.,180.,0.));
752  GetEnvelopes(2)->AddEnvelope("SQM3", 300+detElemId3, 3, TGeoTranslation( 0., 0., - halfChamber),
753  TGeoRotation("Qrot3",90.,180.,90.,270.,0.,0.));
754  GetEnvelopes(2)->AddEnvelope("SQM3", 300+detElemId4, 4, TGeoTranslation( 0., 0., + halfChamber),
755  TGeoRotation("Qrot4",90.,0.,90.,-90.,180.,0.));
756 
757 //--------------------------------St2 Chamber4-------------------------------------------------
758 
759  GetEnvelopes(3)->AddEnvelope("SQM4", 400+detElemId1, 1, TGeoTranslation( 0., 0., - halfChamber));
760  GetEnvelopes(3)->AddEnvelope("SQM4", 400+detElemId2, 2, TGeoTranslation( 0., 0., + halfChamber),
761  TGeoRotation("Qrot2",90.,180.,90.,90.,180.,0.));
762  GetEnvelopes(3)->AddEnvelope("SQM4", 400+detElemId3, 3, TGeoTranslation( 0., 0., - halfChamber),
763  TGeoRotation("Qrot3",90.,180.,90.,270.,0.,0.));
764  GetEnvelopes(3)->AddEnvelope("SQM4", 400+detElemId4, 4, TGeoTranslation( 0., 0., + halfChamber),
765  TGeoRotation("Qrot4",90.,0.,90.,-90.,180.,0.));
766 
767 //**********************************************************************************************
768 
769 }
770 //______________________________________________________________________________
772 {
774 
775  if (gAlice->GetModule("SHIL")) {
776  SetMotherVolume(2, "YOUT1");
777  SetMotherVolume(3, "YOUT1");
778  }
779 
780  // Define chamber volumes as virtual
781  SetVolume(2, "SC03", true);
782  SetVolume(3, "SC04", true);
783 }
784 
785 //______________________________________________________________________________
787 {
789 
790  Double_t zpos1 = - AliMUONConstants::DefaultChamberZ(2);
791  SetTranslation(2, TGeoTranslation(0., 0., zpos1));
792 
793  Double_t zpos2 = - AliMUONConstants::DefaultChamberZ(3);
794  SetTranslation(3, TGeoTranslation(0., 0., zpos2));
795 }
796 
797 //______________________________________________________________________________
799 {
801 
802  GetGeometry(2)->SetSensitiveVolume("SC3G0");
803  GetGeometry(2)->SetSensitiveVolume("SC3G1");
804  GetGeometry(2)->SetSensitiveVolume("SC3G2");
805 
806  GetGeometry(3)->SetSensitiveVolume("SC4G0");
807  GetGeometry(3)->SetSensitiveVolume("SC4G1");
808  GetGeometry(3)->SetSensitiveVolume("SC4G2");
809 }
810 
Abstract base class for geometry construction per module(s)
void SetMotherVolume(Int_t moduleId, const TString &volumeName)
AliDetector class for MUON subsystem providing simulation data management.
Definition: AliMUON.h:37
void SetSensitiveVolume(Int_t volId)
AliMUON * fMUON
the MUON detector class
void AddEnvelope(const TString &name, Int_t id, Bool_t isVirtual, const char *only="ONLY")
ClassImp(TPCGenInfo)
Definition: AliTPCCmpNG.C:254
void SetTranslation(Int_t moduleId, const TGeoTranslation &translation)
AliMUONGeometryModule * GetGeometry(Int_t moduleId) const
virtual void SetVolumes()
and eventually the mother volume name should be defined
AliRun * gAlice
MUON Station2 detailed geometry construction class.
AliMUONGeometryEnvelopeStore * GetEnvelopes(Int_t moduleId) const
AliMUON * muon()
void SetVolume(Int_t moduleId, const TString &volumeName, Bool_t isVirtual=false)
static Float_t * DefaultChamberZ()
Return pointer to array of positions.