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