]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONSt2GeometryBuilder.cxx
aa3237b9163f1e442b3343fb6966fb1f353a16ee
[u/mrichter/AliRoot.git] / MUON / AliMUONSt2GeometryBuilder.cxx
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 // Class AliMUONSt2GeometryBuilder
19 // -------------------------------
20 // MUON Station2 coarse geometry construction class.
21 // Extracted from AliMUONv1
22 // by Ivana Hrivnacova, IPN Orsay
23 // Included in AliRoot 2004/01/23
24
25 #include <TVirtualMC.h>
26 #include <TGeoMatrix.h>
27
28 #include "AliMUONSt2GeometryBuilder.h"
29 #include "AliMUON.h"
30 #include "AliMUONChamber.h"
31 #include "AliMUONChamberGeometry.h"
32 #include "AliMUONGeometryEnvelopeStore.h"
33 #include "AliLog.h"
34
35 ClassImp(AliMUONSt2GeometryBuilder)
36
37 //______________________________________________________________________________
38 AliMUONSt2GeometryBuilder::AliMUONSt2GeometryBuilder(AliMUON* muon)
39  : AliMUONVGeometryBuilder("st2.dat",
40                            &muon->Chamber(2), &muon->Chamber(3)),
41    fMUON(muon)
42 {
43 // Standard constructor
44
45 }
46
47 //______________________________________________________________________________
48 AliMUONSt2GeometryBuilder::AliMUONSt2GeometryBuilder()
49  : AliMUONVGeometryBuilder(),
50    fMUON(0)
51 {
52 // Default constructor
53 }
54
55
56 //______________________________________________________________________________
57 AliMUONSt2GeometryBuilder::AliMUONSt2GeometryBuilder(const AliMUONSt2GeometryBuilder& rhs)
58   : AliMUONVGeometryBuilder(rhs)
59 {
60 // Protected copy constructor
61
62   AliFatal("Copy constructor is not implemented.");
63 }
64
65 //______________________________________________________________________________
66 AliMUONSt2GeometryBuilder::~AliMUONSt2GeometryBuilder() {
67 //
68 }
69
70 //______________________________________________________________________________
71 AliMUONSt2GeometryBuilder& 
72 AliMUONSt2GeometryBuilder::operator = (const AliMUONSt2GeometryBuilder& rhs) 
73 {
74 // Protected assignement operator
75
76   // check assignement to self
77   if (this == &rhs) return *this;
78
79   AliFatal("Assignment operator is not implemented.");
80     
81   return *this;  
82 }
83
84 //
85 // public methods
86 //
87
88 //______________________________________________________________________________
89 void AliMUONSt2GeometryBuilder::CreateGeometry() 
90 {
91 // From AliMUONv1::CreateGeometry()
92
93 //
94 //********************************************************************
95 //                            Station 2                             **
96 //********************************************************************
97      // indices 1 and 2 for first and second chambers in the station
98      // iChamber (first chamber) kept for other quanties than Z,
99      // assumed to be the same in both chambers
100
101      // Get tracking medias Ids     
102      Int_t *idtmed = fMUON->GetIdtmed()->GetArray()-1099;
103      Int_t idAir= idtmed[1100]; // medium 1
104      Int_t idAlu1=idtmed[1103]; // medium 4
105      Int_t idAlu2=idtmed[1104]; // medium 5
106      Int_t idGas=idtmed[1108];  // medium 9 = Ar-CO2 gas (80%+20%)
107      Bool_t frameCrosses=kTRUE;     
108
109      // Rotation matrices in the x-y plane  
110      // phi= 0 deg
111      Int_t irot1;
112      fMUON->AliMatrix(irot1,  90.,   0., 90.,  90., 0., 0.);
113      // phi= 90 deg
114      Int_t irot2;
115      fMUON->AliMatrix(irot2,  90.,  90., 90., 180., 0., 0.);
116
117      AliMUONChamber* iChamber = GetChamber(2);
118      AliMUONChamber* iChamber1 = iChamber;
119      AliMUONChamber* iChamber2 = GetChamber(3);
120      
121      // Half of the total thickness of frame crosses (including DAlu)
122      // for each chamber in stations 1 and 2:
123      // 3% of X0 of composite material,
124      // but taken as Aluminium here, with same thickness in number of X0
125      Float_t dframez = 3. * 8.9 / 100;
126      // DGas and DAlu not changed from standard values
127      Double_t zfpos=-(iChamber->DGas()+dframez+iChamber->DAlu())/2;
128              // The same parameters are defined in builder for station 1 
129      
130      // Mother volume
131      // Outer excess and inner recess for mother volume radius
132      // with respect to ROuter and RInner
133      Float_t dframep=.001; // Value for station 3 should be 6 ...
134      // Width (RdPhi) of the frame crosses for stations 1 and 2 (cm)
135      // Float_t dframep1=.001;
136      Float_t phi=2*TMath::Pi()/12/2;
137              // The same parameters are defined in builder for station 1 
138
139      Float_t tpar[3];
140      Double_t dstation = (-iChamber2->Z()) - (-iChamber1->Z());
141      tpar[0] = iChamber->RInner()-dframep; 
142      tpar[1] = (iChamber->ROuter()+dframep)/TMath::Cos(phi);
143      tpar[2] = dstation/5;
144
145      gMC->Gsvolu("S03M", "TUBE", idAir, tpar, 3);
146      gMC->Gsvolu("S04M", "TUBE", idAir, tpar, 3);
147
148      // CHANGED
149      //gMC->Gspos("S03M", 1, "ALIC", 0., 0., zpos1 , 0, "ONLY");
150      //gMC->Gspos("S04M", 1, "ALIC", 0., 0., zpos2 , 0, "ONLY");
151
152      GetEnvelopes(2)->AddEnvelope("S03M", 300, false);
153      GetEnvelopes(3)->AddEnvelope("S04M", 400, false);
154      
155      gMC->Gsbool("S03M", "L3DO");
156      gMC->Gsbool("S03M", "L3O1");
157      gMC->Gsbool("S03M", "L3O2");
158      gMC->Gsbool("S04M", "L3DO");
159      gMC->Gsbool("S04M", "L3O1");
160      gMC->Gsbool("S04M", "L3O2");
161
162 // // Aluminium frames
163 // // Outer frames
164 //      pgpar[0] = 360/12/2;
165 //      pgpar[1] = 360.;
166 //      pgpar[2] = 12.;
167 //      pgpar[3] =   2;
168 //      pgpar[4] = -dframez/2;
169 //      pgpar[5] = iChamber->ROuter();
170 //      pgpar[6] = pgpar[5]+dframep;
171 //      pgpar[7] = +dframez/2;
172 //      pgpar[8] = pgpar[5];
173 //      pgpar[9] = pgpar[6];
174 //      gMC->Gsvolu("S03O", "PGON", idAlu1, pgpar, 10);
175 //      gMC->Gsvolu("S04O", "PGON", idAlu1, pgpar, 10);
176 //      gMC->Gspos("S03O",1,"S03M", 0.,0.,-zfpos,  0,"ONLY");
177 //      gMC->Gspos("S03O",2,"S03M", 0.,0.,+zfpos,  0,"ONLY");
178 //      gMC->Gspos("S04O",1,"S04M", 0.,0.,-zfpos,  0,"ONLY");
179 //      gMC->Gspos("S04O",2,"S04M", 0.,0.,+zfpos,  0,"ONLY");
180 // //
181 // // Inner frame
182 //      tpar[0]= iChamber->RInner()-dframep;
183 //      tpar[1]= iChamber->RInner();
184 //      tpar[2]= dframez/2;
185 //      gMC->Gsvolu("S03I", "TUBE", idAlu1, tpar, 3);
186 //      gMC->Gsvolu("S04I", "TUBE", idAlu1, tpar, 3);
187
188 //      gMC->Gspos("S03I",1,"S03M", 0.,0.,-zfpos,  0,"ONLY");
189 //      gMC->Gspos("S03I",2,"S03M", 0.,0.,+zfpos,  0,"ONLY");
190 //      gMC->Gspos("S04I",1,"S04M", 0.,0.,-zfpos,  0,"ONLY");
191 //      gMC->Gspos("S04I",2,"S04M", 0.,0.,+zfpos,  0,"ONLY");
192 //
193 // Frame Crosses
194      if (frameCrosses) {
195          // outside gas
196          // security for inside mother volume
197  
198          // ADDED !! Repeated     
199          Float_t dframep1 = 11.0;
200          Float_t dframez = 3. * 8.9 / 100;
201
202          Float_t bpar[3];
203          bpar[0] = (iChamber->ROuter() - iChamber->RInner())
204            * TMath::Cos(TMath::ASin(dframep1 /
205                                    (iChamber->ROuter() - iChamber->RInner())))
206            / 2.0;
207          bpar[1] = dframep1/2;
208          // total thickness will be (4 * bpar[2]) for each chamber,
209          // which has to be equal to (2 * dframez) - DAlu
210          bpar[2] = (2.0 * dframez - iChamber->DAlu()) / 4.0;
211          gMC->Gsvolu("S03B", "BOX", idAlu1, bpar, 3);
212          gMC->Gsvolu("S04B", "BOX", idAlu1, bpar, 3);
213          
214          gMC->Gspos("S03B",1,"S03M", +iChamber->RInner()+bpar[0] , 0,-zfpos, 
215                     irot1,"ONLY");
216          gMC->Gspos("S03B",2,"S03M", -iChamber->RInner()-bpar[0] , 0,-zfpos, 
217                     irot1,"ONLY");
218          gMC->Gspos("S03B",3,"S03M", 0, +iChamber->RInner()+bpar[0] ,-zfpos, 
219                     irot2,"ONLY");
220          gMC->Gspos("S03B",4,"S03M", 0, -iChamber->RInner()-bpar[0] ,-zfpos, 
221                     irot2,"ONLY");
222          gMC->Gspos("S03B",5,"S03M", +iChamber->RInner()+bpar[0] , 0,+zfpos, 
223                     irot1,"ONLY");
224          gMC->Gspos("S03B",6,"S03M", -iChamber->RInner()-bpar[0] , 0,+zfpos, 
225                     irot1,"ONLY");
226          gMC->Gspos("S03B",7,"S03M", 0, +iChamber->RInner()+bpar[0] ,+zfpos, 
227                     irot2,"ONLY");
228          gMC->Gspos("S03B",8,"S03M", 0, -iChamber->RInner()-bpar[0] ,+zfpos, 
229                     irot2,"ONLY");
230          
231          gMC->Gspos("S04B",1,"S04M", +iChamber->RInner()+bpar[0] , 0,-zfpos, 
232                     irot1,"ONLY");
233          gMC->Gspos("S04B",2,"S04M", -iChamber->RInner()-bpar[0] , 0,-zfpos, 
234                     irot1,"ONLY");
235          gMC->Gspos("S04B",3,"S04M", 0, +iChamber->RInner()+bpar[0] ,-zfpos, 
236                     irot2,"ONLY");
237          gMC->Gspos("S04B",4,"S04M", 0, -iChamber->RInner()-bpar[0] ,-zfpos, 
238                     irot2,"ONLY");
239          gMC->Gspos("S04B",5,"S04M", +iChamber->RInner()+bpar[0] , 0,+zfpos, 
240                     irot1,"ONLY");
241          gMC->Gspos("S04B",6,"S04M", -iChamber->RInner()-bpar[0] , 0,+zfpos, 
242                     irot1,"ONLY");
243          gMC->Gspos("S04B",7,"S04M", 0, +iChamber->RInner()+bpar[0] ,+zfpos, 
244                     irot2,"ONLY");
245          gMC->Gspos("S04B",8,"S04M", 0, -iChamber->RInner()-bpar[0] ,+zfpos, 
246                     irot2,"ONLY");
247      }
248 //
249 //   Chamber Material represented by Alu sheet
250      tpar[0]= iChamber->RInner();
251      tpar[1]= iChamber->ROuter();
252      tpar[2] = (iChamber->DGas()+iChamber->DAlu())/2;
253      gMC->Gsvolu("S03A", "TUBE", idAlu2, tpar, 3);
254      gMC->Gsvolu("S04A", "TUBE", idAlu2, tpar, 3);
255      gMC->Gspos("S03A", 1, "S03M", 0., 0., 0.,  0, "ONLY");
256      gMC->Gspos("S04A", 1, "S04M", 0., 0., 0.,  0, "ONLY");
257 //     
258 //   Sensitive volumes
259      // tpar[2] = iChamber->DGas();
260      tpar[2] = iChamber->DGas()/2;
261      gMC->Gsvolu("S03G", "TUBE", idGas, tpar, 3);
262      gMC->Gsvolu("S04G", "TUBE", idGas, tpar, 3);
263      gMC->Gspos("S03G", 1, "S03A", 0., 0., 0.,  0, "ONLY");
264      gMC->Gspos("S04G", 1, "S04A", 0., 0., 0.,  0, "ONLY");
265 //
266 // Frame Crosses to be placed inside gas 
267      // NONE: chambers are sensitive everywhere
268 //      if (frameCrosses) {
269
270 //       dr = (iChamber->ROuter() - iChamber->RInner());
271 //       bpar[0] = TMath::Sqrt(dr*dr-dframep1*dframep1/4)/2;
272 //       bpar[1] = dframep1/2;
273 //       bpar[2] = iChamber->DGas()/2;
274 //       gMC->Gsvolu("S03F", "BOX", idAlu1, bpar, 3);
275 //       gMC->Gsvolu("S04F", "BOX", idAlu1, bpar, 3);
276          
277 //       gMC->Gspos("S03F",1,"S03G", +iChamber->RInner()+bpar[0] , 0, 0, 
278 //                  irot1,"ONLY");
279 //       gMC->Gspos("S03F",2,"S03G", -iChamber->RInner()-bpar[0] , 0, 0, 
280 //                  irot1,"ONLY");
281 //       gMC->Gspos("S03F",3,"S03G", 0, +iChamber->RInner()+bpar[0] , 0, 
282 //                  irot2,"ONLY");
283 //       gMC->Gspos("S03F",4,"S03G", 0, -iChamber->RInner()-bpar[0] , 0, 
284 //                  irot2,"ONLY");
285          
286 //       gMC->Gspos("S04F",1,"S04G", +iChamber->RInner()+bpar[0] , 0, 0, 
287 //                  irot1,"ONLY");
288 //       gMC->Gspos("S04F",2,"S04G", -iChamber->RInner()-bpar[0] , 0, 0, 
289 //                  irot1,"ONLY");
290 //       gMC->Gspos("S04F",3,"S04G", 0, +iChamber->RInner()+bpar[0] , 0, 
291 //                  irot2,"ONLY");
292 //       gMC->Gspos("S04F",4,"S04G", 0, -iChamber->RInner()-bpar[0] , 0, 
293 //                  irot2,"ONLY");
294 //      }
295 /*
296      iChamber1 = iChamber = (AliMUONChamber*) (*fChambers)[2];
297      iChamber2 =(AliMUONChamber*) (*fChambers)[3];
298      zpos1=iChamber1->Z(); 
299      zpos2=iChamber2->Z();
300      dstation = zpos2 - zpos1;
301      // DGas and DAlu not changed from standard values
302      zfpos=-(iChamber->DGas()+dframez+iChamber->DAlu())/2;
303      
304 //
305 //   Mother volume
306      tpar[0] = iChamber->RInner()-dframep; 
307      tpar[1] = (iChamber->ROuter()+dframep)/TMath::Cos(phi);
308      tpar[2] = dstation/5;
309
310      gMC->Gsvolu("S03M", "TUBE", idAir, tpar, 3);
311      gMC->Gsvolu("S04M", "TUBE", idAir, tpar, 3);
312      gMC->Gspos("S03M", 1, "ALIC", 0., 0., zpos1 , 0, "ONLY");
313      gMC->Gspos("S04M", 1, "ALIC", 0., 0., zpos2 , 0, "ONLY");
314      gMC->Gsbool("S03M", "L3DO");
315      gMC->Gsbool("S03M", "L3O1");
316      gMC->Gsbool("S03M", "L3O2");
317      gMC->Gsbool("S04M", "L3DO");
318      gMC->Gsbool("S04M", "L3O1");
319      gMC->Gsbool("S04M", "L3O2");
320
321 // // Aluminium frames
322 // // Outer frames
323 //      pgpar[0] = 360/12/2;
324 //      pgpar[1] = 360.;
325 //      pgpar[2] = 12.;
326 //      pgpar[3] =   2;
327 //      pgpar[4] = -dframez/2;
328 //      pgpar[5] = iChamber->ROuter();
329 //      pgpar[6] = pgpar[5]+dframep;
330 //      pgpar[7] = +dframez/2;
331 //      pgpar[8] = pgpar[5];
332 //      pgpar[9] = pgpar[6];
333 //      gMC->Gsvolu("S03O", "PGON", idAlu1, pgpar, 10);
334 //      gMC->Gsvolu("S04O", "PGON", idAlu1, pgpar, 10);
335 //      gMC->Gspos("S03O",1,"S03M", 0.,0.,-zfpos,  0,"ONLY");
336 //      gMC->Gspos("S03O",2,"S03M", 0.,0.,+zfpos,  0,"ONLY");
337 //      gMC->Gspos("S04O",1,"S04M", 0.,0.,-zfpos,  0,"ONLY");
338 //      gMC->Gspos("S04O",2,"S04M", 0.,0.,+zfpos,  0,"ONLY");
339 // //
340 // // Inner frame
341 //      tpar[0]= iChamber->RInner()-dframep;
342 //      tpar[1]= iChamber->RInner();
343 //      tpar[2]= dframez/2;
344 //      gMC->Gsvolu("S03I", "TUBE", idAlu1, tpar, 3);
345 //      gMC->Gsvolu("S04I", "TUBE", idAlu1, tpar, 3);
346
347 //      gMC->Gspos("S03I",1,"S03M", 0.,0.,-zfpos,  0,"ONLY");
348 //      gMC->Gspos("S03I",2,"S03M", 0.,0.,+zfpos,  0,"ONLY");
349 //      gMC->Gspos("S04I",1,"S04M", 0.,0.,-zfpos,  0,"ONLY");
350 //      gMC->Gspos("S04I",2,"S04M", 0.,0.,+zfpos,  0,"ONLY");
351 //
352 // Frame Crosses
353      if (frameCrosses) {
354          // outside gas
355          // security for inside mother volume
356          bpar[0] = (iChamber->ROuter() - iChamber->RInner())
357            * TMath::Cos(TMath::ASin(dframep1 /
358                                    (iChamber->ROuter() - iChamber->RInner())))
359            / 2.0;
360          bpar[1] = dframep1/2;
361          // total thickness will be (4 * bpar[2]) for each chamber,
362          // which has to be equal to (2 * dframez) - DAlu
363          bpar[2] = (2.0 * dframez - iChamber->DAlu()) / 4.0;
364          gMC->Gsvolu("S03B", "BOX", idAlu1, bpar, 3);
365          gMC->Gsvolu("S04B", "BOX", idAlu1, bpar, 3);
366          
367          gMC->Gspos("S03B",1,"S03M", +iChamber->RInner()+bpar[0] , 0,-zfpos, 
368                     irot1,"ONLY");
369          gMC->Gspos("S03B",2,"S03M", -iChamber->RInner()-bpar[0] , 0,-zfpos, 
370                     irot1,"ONLY");
371          gMC->Gspos("S03B",3,"S03M", 0, +iChamber->RInner()+bpar[0] ,-zfpos, 
372                     irot2,"ONLY");
373          gMC->Gspos("S03B",4,"S03M", 0, -iChamber->RInner()-bpar[0] ,-zfpos, 
374                     irot2,"ONLY");
375          gMC->Gspos("S03B",5,"S03M", +iChamber->RInner()+bpar[0] , 0,+zfpos, 
376                     irot1,"ONLY");
377          gMC->Gspos("S03B",6,"S03M", -iChamber->RInner()-bpar[0] , 0,+zfpos, 
378                     irot1,"ONLY");
379          gMC->Gspos("S03B",7,"S03M", 0, +iChamber->RInner()+bpar[0] ,+zfpos, 
380                     irot2,"ONLY");
381          gMC->Gspos("S03B",8,"S03M", 0, -iChamber->RInner()-bpar[0] ,+zfpos, 
382                     irot2,"ONLY");
383          
384          gMC->Gspos("S04B",1,"S04M", +iChamber->RInner()+bpar[0] , 0,-zfpos, 
385                     irot1,"ONLY");
386          gMC->Gspos("S04B",2,"S04M", -iChamber->RInner()-bpar[0] , 0,-zfpos, 
387                     irot1,"ONLY");
388          gMC->Gspos("S04B",3,"S04M", 0, +iChamber->RInner()+bpar[0] ,-zfpos, 
389                     irot2,"ONLY");
390          gMC->Gspos("S04B",4,"S04M", 0, -iChamber->RInner()-bpar[0] ,-zfpos, 
391                     irot2,"ONLY");
392          gMC->Gspos("S04B",5,"S04M", +iChamber->RInner()+bpar[0] , 0,+zfpos, 
393                     irot1,"ONLY");
394          gMC->Gspos("S04B",6,"S04M", -iChamber->RInner()-bpar[0] , 0,+zfpos, 
395                     irot1,"ONLY");
396          gMC->Gspos("S04B",7,"S04M", 0, +iChamber->RInner()+bpar[0] ,+zfpos, 
397                     irot2,"ONLY");
398          gMC->Gspos("S04B",8,"S04M", 0, -iChamber->RInner()-bpar[0] ,+zfpos, 
399                     irot2,"ONLY");
400      }
401 //
402 //   Chamber Material represented by Alu sheet
403      tpar[0]= iChamber->RInner();
404      tpar[1]= iChamber->ROuter();
405      tpar[2] = (iChamber->DGas()+iChamber->DAlu())/2;
406      gMC->Gsvolu("S03A", "TUBE", idAlu2, tpar, 3);
407      gMC->Gsvolu("S04A", "TUBE", idAlu2, tpar, 3);
408      gMC->Gspos("S03A", 1, "S03M", 0., 0., 0.,  0, "ONLY");
409      gMC->Gspos("S04A", 1, "S04M", 0., 0., 0.,  0, "ONLY");
410 //     
411 //   Sensitive volumes
412      // tpar[2] = iChamber->DGas();
413      tpar[2] = iChamber->DGas()/2;
414      gMC->Gsvolu("S03G", "TUBE", idGas, tpar, 3);
415      gMC->Gsvolu("S04G", "TUBE", idGas, tpar, 3);
416      gMC->Gspos("S03G", 1, "S03A", 0., 0., 0.,  0, "ONLY");
417      gMC->Gspos("S04G", 1, "S04A", 0., 0., 0.,  0, "ONLY");
418 //
419 // Frame Crosses to be placed inside gas 
420      // NONE: chambers are sensitive everywhere
421 //      if (frameCrosses) {
422
423 //       dr = (iChamber->ROuter() - iChamber->RInner());
424 //       bpar[0] = TMath::Sqrt(dr*dr-dframep1*dframep1/4)/2;
425 //       bpar[1] = dframep1/2;
426 //       bpar[2] = iChamber->DGas()/2;
427 //       gMC->Gsvolu("S03F", "BOX", idAlu1, bpar, 3);
428 //       gMC->Gsvolu("S04F", "BOX", idAlu1, bpar, 3);
429          
430 //       gMC->Gspos("S03F",1,"S03G", +iChamber->RInner()+bpar[0] , 0, 0, 
431 //                  irot1,"ONLY");
432 //       gMC->Gspos("S03F",2,"S03G", -iChamber->RInner()-bpar[0] , 0, 0, 
433 //                  irot1,"ONLY");
434 //       gMC->Gspos("S03F",3,"S03G", 0, +iChamber->RInner()+bpar[0] , 0, 
435 //                  irot2,"ONLY");
436 //       gMC->Gspos("S03F",4,"S03G", 0, -iChamber->RInner()-bpar[0] , 0, 
437 //                  irot2,"ONLY");
438          
439 //       gMC->Gspos("S04F",1,"S04G", +iChamber->RInner()+bpar[0] , 0, 0, 
440 //                  irot1,"ONLY");
441 //       gMC->Gspos("S04F",2,"S04G", -iChamber->RInner()-bpar[0] , 0, 0, 
442 //                  irot1,"ONLY");
443 //       gMC->Gspos("S04F",3,"S04G", 0, +iChamber->RInner()+bpar[0] , 0, 
444 //                  irot2,"ONLY");
445 //       gMC->Gspos("S04F",4,"S04G", 0, -iChamber->RInner()-bpar[0] , 0, 
446 //                  irot2,"ONLY");
447 //      }
448      }
449 */
450 }
451
452 //______________________________________________________________________________
453 void AliMUONSt2GeometryBuilder::SetTransformations()
454 {
455 // Defines the transformations for the station2 chambers.
456 // ---
457
458   AliMUONChamber* iChamber1 = GetChamber(2);
459   Double_t zpos1 = - iChamber1->Z(); 
460   iChamber1->GetGeometry()
461     ->SetTranslation(TGeoTranslation(0., 0., zpos1));
462
463   AliMUONChamber* iChamber2 = GetChamber(3);
464   Double_t zpos2 = - iChamber2->Z(); 
465   iChamber2->GetGeometry()
466     ->SetTranslation(TGeoTranslation(0., 0., zpos2));
467 }
468
469 //______________________________________________________________________________
470 void AliMUONSt2GeometryBuilder::SetSensitiveVolumes()
471 {
472 // Defines the sensitive volumes for station2 chambers.
473 // ---
474
475   GetChamber(2)->GetGeometry()->SetSensitiveVolume("S03G");
476   GetChamber(3)->GetGeometry()->SetSensitiveVolume("S04G");
477 }