Line data Source code
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 AliMUONSt2GeometryBuilder
20 : // -------------------------------
21 : // MUON Station2 coarse geometry construction class.
22 : // Extracted from AliMUONv1
23 : // Dummy version of station 2 with the right DE id (Ch. Finck)
24 : //-----------------------------------------------------------------------------
25 :
26 : #include <TVirtualMC.h>
27 : #include <TGeoMatrix.h>
28 : #include <TArrayI.h>
29 :
30 : #include "AliLog.h"
31 :
32 : #include "AliMUONSt2GeometryBuilder.h"
33 : #include "AliMUON.h"
34 : #include "AliMUONConstants.h"
35 : #include "AliMUONGeometryModule.h"
36 : #include "AliMUONGeometryEnvelopeStore.h"
37 :
38 : /// \cond CLASSIMP
39 16 : ClassImp(AliMUONSt2GeometryBuilder)
40 : /// \endcond
41 :
42 : //______________________________________________________________________________
43 : AliMUONSt2GeometryBuilder::AliMUONSt2GeometryBuilder(AliMUON* muon)
44 0 : : AliMUONVGeometryBuilder(2, 2),
45 0 : fMUON(muon)
46 0 : {
47 : /// Standard constructor
48 :
49 0 : }
50 :
51 : //______________________________________________________________________________
52 : AliMUONSt2GeometryBuilder::AliMUONSt2GeometryBuilder()
53 0 : : AliMUONVGeometryBuilder(),
54 0 : fMUON(0)
55 0 : {
56 : /// Default constructor
57 0 : }
58 :
59 :
60 : //______________________________________________________________________________
61 : AliMUONSt2GeometryBuilder::~AliMUONSt2GeometryBuilder()
62 0 : {
63 : /// Destructor
64 0 : }
65 :
66 : //
67 : // public methods
68 : //
69 :
70 : //______________________________________________________________________________
71 : void AliMUONSt2GeometryBuilder::CreateGeometry()
72 : {
73 : /// From AliMUONv1::CreateGeometry()
74 :
75 : //
76 : //********************************************************************
77 : // Station 2 **
78 : //********************************************************************
79 : // indices 1 and 2 for first and second chambers in the station
80 : // iChamber (first chamber) kept for other quanties than Z,
81 : // assumed to be the same in both chambers
82 :
83 : // Get tracking medias Ids
84 0 : Int_t *idtmed = fMUON->GetIdtmed()->GetArray()-1099;
85 0 : Int_t idAir= idtmed[1100]; // medium 1
86 : // Int_t idAlu1=idtmed[1103]; // medium 4
87 : // Int_t idAlu2=idtmed[1104]; // medium 5
88 0 : Int_t idGas=idtmed[1108]; // medium 9 = Ar-CO2 gas (80%+20%)
89 :
90 : const Float_t kDeltaQuad = 0.01;//2.6; dummy value til we find the good value
91 : const Float_t kDeltaZ = 6.5/2.;
92 :
93 : // Rotation matrices in the x-y plane
94 : // phi= 0 deg
95 0 : Int_t irot1;
96 0 : fMUON->AliMatrix(irot1, 90., 0., 90., 90., 0., 0.);
97 : // phi= 90 deg
98 0 : Int_t irot2;
99 0 : fMUON->AliMatrix(irot2, 90., 90., 90., 180., 0., 0.);
100 :
101 : // Half of the total thickness of frame crosses (including DAlu)
102 : // for each chamber in stations 1 and 2:
103 : // 3% of X0 of composite material,
104 : // but taken as Aluminium here, with same thickness in number of X0
105 : // Float_t dframez = 3. * 8.9 / 100;
106 : // DGas and DAlu not changed from standard values
107 : // Double_t zfpos=-(iChamber->DGas()+dframez+iChamber->DAlu())/2;
108 : // The same parameters are defined in builder for station 1
109 :
110 : // sensitive gas gap
111 : const Float_t kDGas = 0.5;
112 :
113 : // 3% radiation length of aluminum (X0=8.9 cm)
114 : // const Float_t kDAlu = 3.5 * 8.9 / 100.;
115 :
116 : // Mother volume
117 : // Outer excess and inner recess for mother volume radius
118 : // with respect to ROuter and RInner
119 : // Float_t dframep=.001; // Value for station 3 should be 6 ...
120 : // Width (RdPhi) of the frame crosses for stations 1 and 2 (cm)
121 : // Float_t dframep1=.001;
122 : // Float_t phi=2*TMath::Pi()/12/2;
123 : // The same parameters are defined in builder for station 1 (30deg)
124 :
125 0 : Float_t tpar[5];
126 : // Double_t dstation = (-iChamber2->Z()) - (-iChamber1->Z());
127 :
128 :
129 : Float_t posx, posy, posz;
130 : // Chamber Material represented by Alu sheet
131 0 : tpar[0]= AliMUONConstants::Rmin(1);
132 0 : tpar[1]= AliMUONConstants::Rmax(1);
133 0 : tpar[2] = kDGas/2;
134 0 : tpar[3] = 0.;
135 0 : tpar[4] = 90.;
136 :
137 : //
138 : // Sensitive volumes
139 0 : TVirtualMC::GetMC()->Gsvolu("S03G", "TUBS", idGas, tpar, 5);
140 0 : TVirtualMC::GetMC()->Gsvolu("S04G", "TUBS", idGas, tpar, 5);
141 :
142 : Int_t detElemId;
143 :
144 : posx = kDeltaQuad;
145 : posy = kDeltaQuad;
146 : posz = -kDeltaZ;
147 :
148 : detElemId = 301;
149 0 : TVirtualMC::GetMC()->Gsvolu("LE01", "TUBS", idAir, tpar, 5);
150 0 : GetEnvelopes(2)->AddEnvelope("LE01", detElemId, true, TGeoTranslation(posx, posy, posz),
151 0 : TGeoRotation("rot1",90,0,90,90,0,0) );
152 : detElemId = 401;
153 0 : TVirtualMC::GetMC()->Gsvolu("LF01", "TUBS", idAir, tpar, 5);
154 0 : GetEnvelopes(3)->AddEnvelope("LF01", detElemId, true, TGeoTranslation(posx, posy, posz),
155 0 : TGeoRotation("rot1",90,0,90,90,0,0) );
156 : detElemId = 300;
157 0 : TVirtualMC::GetMC()->Gsvolu("LE02", "TUBS", idAir, tpar, 5);
158 0 : GetEnvelopes(2)->AddEnvelope("LE02", detElemId, true, TGeoTranslation(-posx, posy,-posz),
159 0 : TGeoRotation("rot2",90,180,90,90,180,0) );
160 : detElemId = 400;
161 0 : TVirtualMC::GetMC()->Gsvolu("LF02", "TUBS", idAir, tpar, 5);
162 0 : GetEnvelopes(3)->AddEnvelope("LF02", detElemId, true, TGeoTranslation(-posx, posy,-posz),
163 0 : TGeoRotation("rot2",90,180,90,90,180,0) );
164 : detElemId = 302;
165 0 : TVirtualMC::GetMC()->Gsvolu("LE03", "TUBS", idAir, tpar, 5);
166 0 : GetEnvelopes(2)->AddEnvelope("LE03", detElemId, true, TGeoTranslation(posx, -posy, -posz),
167 0 : TGeoRotation("rot3",90,0,90,270,180,0) );
168 : detElemId = 402;
169 0 : TVirtualMC::GetMC()->Gsvolu("LF03", "TUBS", idAir, tpar, 5);
170 0 : GetEnvelopes(3)->AddEnvelope("LF03", detElemId, true, TGeoTranslation(posx, -posy, -posz),
171 0 : TGeoRotation("rot3",90,0,90,270,180,0) );
172 : detElemId = 303;
173 0 : TVirtualMC::GetMC()->Gsvolu("LE04", "TUBS", idAir, tpar, 5);
174 0 : GetEnvelopes(2)->AddEnvelope("LE04", detElemId, true, TGeoTranslation(-posx, -posy, posz),
175 0 : TGeoRotation("rot4",90,180,90,270,0,0) );
176 : detElemId = 403;
177 0 : TVirtualMC::GetMC()->Gsvolu("LF04", "TUBS", idAir, tpar, 5);
178 0 : GetEnvelopes(3)->AddEnvelope("LF04", detElemId, true, TGeoTranslation(-posx, -posy, posz),
179 0 : TGeoRotation("rot4",90,180,90,270,0,0) );
180 :
181 0 : GetEnvelopes(2)->AddEnvelopeConstituent("S03G", "LE01", 1);
182 0 : GetEnvelopes(3)->AddEnvelopeConstituent("S04G", "LF01", 1);
183 :
184 0 : GetEnvelopes(2)->AddEnvelopeConstituent("S03G", "LE02", 2);
185 0 : GetEnvelopes(3)->AddEnvelopeConstituent("S04G", "LF02", 2);
186 :
187 0 : GetEnvelopes(2)->AddEnvelopeConstituent("S03G", "LE03", 3);
188 0 : GetEnvelopes(3)->AddEnvelopeConstituent("S04G", "LF03", 3);
189 :
190 0 : GetEnvelopes(2)->AddEnvelopeConstituent("S03G", "LE04", 4);
191 0 : GetEnvelopes(3)->AddEnvelopeConstituent("S04G", "LF04", 4);
192 0 : }
193 :
194 : //______________________________________________________________________________
195 : void AliMUONSt2GeometryBuilder::SetVolumes()
196 : {
197 : /// Defines the volumes for the station2 chambers.
198 :
199 : // Define chamber volumes as virtual
200 0 : SetVolume(2, "SC03", true);
201 0 : SetVolume(3, "SC04", true);
202 0 : }
203 :
204 : //______________________________________________________________________________
205 : void AliMUONSt2GeometryBuilder::SetTransformations()
206 : {
207 : /// Defines the transformations for the station2 chambers.
208 :
209 0 : Double_t zpos1 = - AliMUONConstants::DefaultChamberZ(2);
210 0 : SetTranslation(2, TGeoTranslation(0., 0., zpos1));
211 :
212 0 : Double_t zpos2 = - AliMUONConstants::DefaultChamberZ(3);
213 0 : SetTranslation(3, TGeoTranslation(0., 0., zpos2));
214 0 : }
215 :
216 : //______________________________________________________________________________
217 : void AliMUONSt2GeometryBuilder::SetSensitiveVolumes()
218 : {
219 : /// Defines the sensitive volumes for station2 chambers.
220 :
221 0 : GetGeometry(2)->SetSensitiveVolume("S03G");
222 0 : GetGeometry(3)->SetSensitiveVolume("S04G");
223 0 : }
|