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