]>
Commit | Line | Data |
---|---|---|
e118b27e | 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 AliMUONSlatGeometryBuilder | |
19 | // ------------------------------- | |
20 | // Abstract base class for geometry construction per chamber. | |
21 | // | |
f4a7360f | 22 | |
2057e0cc | 23 | |
24 | ||
c10e6eaf | 25 | // This Builder is designed according to the enveloppe methode. The basic idea is to be able to allow moves |
26 | // of the slats on the support panels. | |
27 | // Those moves can be described with a simple set of parameters. The next step should be now to describe all | |
28 | // the slats and their places by a unique | |
29 | // class, which would make the SlatBuilder far more compact since now only three parameters can define a slat | |
30 | // and its position, like: | |
2057e0cc | 31 | // * Bool_t rounded_shape_slat |
32 | // * Float_t slat_length | |
33 | // * Float_t slat_number or Float_t slat_position | |
34 | ||
d1cd2474 | 35 | #include <TVirtualMC.h> |
d1cd2474 | 36 | #include <TGeoMatrix.h> |
30178c30 | 37 | #include <Riostream.h> |
d1cd2474 | 38 | |
e118b27e | 39 | #include "AliRun.h" |
40 | #include "AliLog.h" | |
41 | ||
d1cd2474 | 42 | #include "AliMUONSlatGeometryBuilder.h" |
43 | #include "AliMUON.h" | |
44 | #include "AliMUONChamber.h" | |
e118b27e | 45 | #include "AliMUONGeometryModule.h" |
a432117a | 46 | #include "AliMUONGeometryEnvelopeStore.h" |
e516b01d | 47 | #include "AliMUONConstants.h" |
d1cd2474 | 48 | |
49 | ClassImp(AliMUONSlatGeometryBuilder) | |
50 | ||
d1cd2474 | 51 | |
52 | //______________________________________________________________________________ | |
53 | AliMUONSlatGeometryBuilder::AliMUONSlatGeometryBuilder(AliMUON* muon) | |
a432117a | 54 | : AliMUONVGeometryBuilder("slat.dat", |
e118b27e | 55 | muon->Chamber(4).GetGeometry(), |
56 | muon->Chamber(5).GetGeometry(), | |
57 | muon->Chamber(6).GetGeometry(), | |
58 | muon->Chamber(7).GetGeometry(), | |
59 | muon->Chamber(8).GetGeometry(), | |
60 | muon->Chamber(9).GetGeometry()), | |
d1cd2474 | 61 | fMUON(muon) |
62 | { | |
63 | // Standard constructor | |
64 | ||
65 | } | |
66 | ||
67 | //______________________________________________________________________________ | |
68 | AliMUONSlatGeometryBuilder::AliMUONSlatGeometryBuilder() | |
69 | : AliMUONVGeometryBuilder(), | |
70 | fMUON(0) | |
71 | { | |
72 | // Default constructor | |
73 | } | |
74 | ||
75 | ||
76 | //______________________________________________________________________________ | |
77 | AliMUONSlatGeometryBuilder::AliMUONSlatGeometryBuilder(const AliMUONSlatGeometryBuilder& rhs) | |
78 | : AliMUONVGeometryBuilder(rhs) | |
79 | { | |
8c343c7c | 80 | AliFatal("Copy constructor is not implemented."); |
d1cd2474 | 81 | } |
82 | ||
83 | //______________________________________________________________________________ | |
84 | AliMUONSlatGeometryBuilder::~AliMUONSlatGeometryBuilder() { | |
85 | // | |
86 | } | |
87 | ||
88 | //______________________________________________________________________________ | |
89 | AliMUONSlatGeometryBuilder& | |
90 | AliMUONSlatGeometryBuilder::operator = (const AliMUONSlatGeometryBuilder& rhs) | |
91 | { | |
92 | // check assignement to self | |
93 | if (this == &rhs) return *this; | |
94 | ||
8c343c7c | 95 | AliFatal("Assignment operator is not implemented."); |
d1cd2474 | 96 | |
97 | return *this; | |
98 | } | |
99 | ||
100 | // | |
101 | // public methods | |
102 | // | |
103 | ||
104 | //______________________________________________________________________________ | |
105 | void AliMUONSlatGeometryBuilder::CreateGeometry() | |
106 | { | |
e516b01d | 107 | // CreateGeometry is the method containing all the informations concerning Stations 345 geometry. |
108 | // It includes description and placements of support panels and slats. | |
109 | // The code comes directly from what was written in AliMUONv1.cxx before, with modifications concerning | |
110 | // the use of Enveloppe method to place the Geant volumes. | |
111 | // Now, few changes would allow the creation of a Slat methode where slat could be described by few parameters, | |
112 | // and this builder would then be dedicated only to the | |
113 | // placements of the slats. Those modifications could shorten the Station 345 geometry by a non-negligeable factor... | |
d1cd2474 | 114 | |
e516b01d | 115 | Int_t *idtmed = fMUON->GetIdtmed()->GetArray()-1099; |
116 | ||
117 | Float_t angle; | |
118 | Float_t *dum=0; | |
119 | ||
120 | // define the id of tracking media: | |
121 | Int_t idAir = idtmed[1100]; // medium 1 | |
122 | Int_t idGas = idtmed[1108]; // medium 9 = Ar-CO2 gas (80%+20%) | |
123 | Int_t idCopper = idtmed[1110]; | |
124 | Int_t idG10 = idtmed[1111]; | |
125 | Int_t idCarbon = idtmed[1112]; | |
126 | Int_t idRoha = idtmed[1113]; | |
127 | Int_t idNomex = idtmed[1114]; // honey comb | |
128 | Int_t idNoryl = idtmed[1115]; | |
129 | Int_t idNomexB = idtmed[1116]; // bulk material | |
130 | ||
131 | // sensitive area: 40*40 cm**2 | |
132 | const Float_t kSensLength = 40.; | |
133 | const Float_t kSensHeight = 40.; | |
1c334adf | 134 | const Float_t kSensWidth = AliMUONConstants::Pitch()*2;// 0.5 cm, according to TDR fig 2.120 |
e516b01d | 135 | const Int_t kSensMaterial = idGas; |
136 | // const Float_t kYoverlap = 1.5; | |
137 | ||
138 | // PCB dimensions in cm; width: 30 mum copper | |
139 | const Float_t kPcbLength = kSensLength; | |
140 | const Float_t kPcbHeight = 58.; // updated Ch. Finck | |
141 | const Float_t kPcbWidth = 0.003; | |
142 | const Int_t kPcbMaterial = idCopper; | |
143 | ||
144 | // Insulating material: 220 mum G10 fiber glued to pcb | |
145 | const Float_t kInsuLength = kPcbLength; | |
146 | const Float_t kInsuHeight = kPcbHeight; | |
147 | const Float_t kInsuWidth = 0.022; // updated Ch. Finck | |
148 | const Int_t kInsuMaterial = idG10; | |
149 | ||
150 | // Carbon fiber panels: 200mum carbon/epoxy skin | |
151 | const Float_t kCarbonWidth = 0.020; | |
152 | const Int_t kCarbonMaterial = idCarbon; | |
153 | ||
154 | // Nomex (honey comb) between the two panel carbon skins | |
155 | const Float_t kNomexLength = kSensLength; | |
156 | const Float_t kNomexHeight = kSensHeight; | |
157 | const Float_t kNomexWidth = 0.8; // updated Ch. Finck | |
158 | const Int_t kNomexMaterial = idNomex; | |
159 | ||
160 | // Bulk Nomex under panel sandwich Ch. Finck | |
161 | const Float_t kNomexBWidth = 0.025; | |
162 | const Int_t kNomexBMaterial = idNomexB; | |
163 | ||
164 | // Panel sandwich 0.02 carbon*2 + 0.8 nomex | |
165 | const Float_t kPanelLength = kSensLength; | |
166 | const Float_t kPanelHeight = kSensHeight; | |
167 | const Float_t kPanelWidth = 2 * kCarbonWidth + kNomexWidth; | |
168 | ||
f4a7360f | 169 | // Frame along the rounded (spacers) slats |
170 | const Float_t kRframeHeight = 2.00; | |
171 | ||
e516b01d | 172 | // spacer around the slat: 2 sticks along length,2 along height |
173 | // H: the horizontal ones | |
174 | const Float_t kHframeLength = kPcbLength; | |
175 | const Float_t kHframeHeight = 1.95; // updated Ch. Finck | |
176 | const Float_t kHframeWidth = kSensWidth; | |
177 | const Int_t kHframeMaterial = idNoryl; | |
178 | ||
179 | // V: the vertical ones; vertical spacers | |
180 | const Float_t kVframeLength = 2.5; | |
181 | const Float_t kVframeHeight = kSensHeight + kHframeHeight; | |
182 | const Float_t kVframeWidth = kSensWidth; | |
183 | const Int_t kVframeMaterial = idNoryl; | |
184 | ||
185 | // B: the horizontal border filled with rohacell: ok Ch. Finck | |
186 | const Float_t kBframeLength = kHframeLength; | |
187 | const Float_t kBframeHeight = (kPcbHeight - kSensHeight)/2. - kHframeHeight; | |
188 | const Float_t kBframeWidth = kHframeWidth; | |
189 | const Int_t kBframeMaterial = idRoha; | |
190 | ||
191 | // NULOC: 30 mum copper + 200 mum vetronite (same radiation length as 14mum copper) for electronics | |
192 | const Float_t kNulocLength = 2.5; | |
193 | const Float_t kNulocHeight = kBframeHeight; | |
194 | const Float_t kNulocWidth = 0.0030 + 0.0014; // equivalent copper width of vetronite; | |
195 | const Int_t kNulocMaterial = idCopper; | |
196 | ||
197 | // Slat parameters | |
198 | const Float_t kSlatHeight = kPcbHeight; | |
199 | const Float_t kSlatWidth = kSensWidth + 2.*(kPcbWidth + kInsuWidth + kPanelWidth | |
200 | + kNomexBWidth); //replaced rohacell with Nomex Ch. Finck | |
201 | const Int_t kSlatMaterial = idAir; | |
202 | const Float_t kDslatLength = -1.25; // position of the slat respect to the beam plane (half vertical spacer) Ch. Finck | |
203 | Float_t zSlat = AliMUONConstants::DzSlat();// implemented Ch. Finck | |
204 | Float_t dzCh = AliMUONConstants::DzCh(); | |
205 | ||
206 | Float_t spar[3]; | |
207 | Int_t i, j; | |
208 | Int_t detElemId; | |
209 | ||
210 | // the panel volume contains the nomex | |
211 | Float_t panelpar[3] = { kPanelLength/2., kPanelHeight/2., kPanelWidth/2. }; | |
212 | Float_t nomexpar[3] = { kNomexLength/2., kNomexHeight/2., kNomexWidth/2. }; | |
213 | Float_t twidth = kPanelWidth + kNomexBWidth; | |
214 | Float_t nomexbpar[3] = {kNomexLength/2., kNomexHeight/2.,twidth/2. };// bulk nomex | |
215 | ||
216 | // insulating material contains PCB-> gas | |
217 | twidth = 2*(kInsuWidth + kPcbWidth) + kSensWidth ; | |
218 | Float_t insupar[3] = {kInsuLength/2., kInsuHeight/2., twidth/2. }; | |
219 | twidth -= 2 * kInsuWidth; | |
220 | Float_t pcbpar[3] = {kPcbLength/2., kPcbHeight/2., twidth/2. }; | |
221 | Float_t senspar[3] = {kSensLength/2., kSensHeight/2., kSensWidth/2. }; | |
222 | Float_t theight = 2 * kHframeHeight + kSensHeight; | |
223 | Float_t hFramepar[3] = {kHframeLength/2., theight/2., kHframeWidth/2.}; | |
224 | Float_t bFramepar[3] = {kBframeLength/2., kBframeHeight/2., kBframeWidth/2.}; | |
225 | Float_t vFramepar[3] = {kVframeLength/2., kVframeHeight/2., kVframeWidth/2.}; | |
226 | Float_t nulocpar[3] = {kNulocLength/2., kNulocHeight/2., kNulocWidth/2.}; | |
227 | ||
228 | Float_t xx; | |
229 | Float_t xxmax = (kBframeLength - kNulocLength)/2.; | |
230 | Int_t index=0; | |
d1cd2474 | 231 | |
e516b01d | 232 | AliMUONChamber *iChamber, *iChamber1, *iChamber2; |
d12a7158 | 233 | |
e516b01d | 234 | Int_t* fStations = new Int_t[5]; |
235 | for (Int_t i=0; i<5; i++) fStations[i] = 1; | |
236 | fStations[2] = 1; | |
237 | ||
238 | if (fStations[2]) | |
d1cd2474 | 239 | { |
e516b01d | 240 | //******************************************************************** |
e118b27e | 241 | // Station 3 ** |
242 | //******************************************************************** | |
243 | // indices 1 and 2 for first and second chambers in the station | |
244 | // iChamber (first chamber) kept for other quanties than Z, | |
245 | // assumed to be the same in both chambers | |
e516b01d | 246 | |
e118b27e | 247 | iChamber = &fMUON->Chamber(4); |
e516b01d | 248 | iChamber1 = iChamber; |
e118b27e | 249 | iChamber2 = &fMUON->Chamber(5); |
d1cd2474 | 250 | |
e516b01d | 251 | //iChamber1->GetGeometry()->SetDebug(kTRUE); |
252 | //iChamber2->GetGeometry()->SetDebug(kTRUE); | |
e118b27e | 253 | |
e516b01d | 254 | if (gAlice->GetModule("DIPO")) { |
255 | // if DIPO is preset, the whole station will be placed in DDIP volume | |
256 | iChamber1->GetGeometry()->SetMotherVolume("DDIP"); | |
257 | iChamber2->GetGeometry()->SetMotherVolume("DDIP"); | |
258 | } | |
259 | ||
6ffd4cb7 | 260 | if (!gAlice->GetModule("DIPO")) { |
261 | // Mother volume for each chamber in st3 are only defined if Dipole volue is there. | |
262 | // Outer excess and inner recess for mother volume radius | |
263 | // with respect to ROuter and RInner | |
f4a7360f | 264 | Float_t dframep_in = kRframeHeight; |
265 | Float_t dframep_out= kVframeLength + 37.0; // Additional 37 cm gap is needed to wrap the corners of the slats | |
6ffd4cb7 | 266 | Float_t tpar[3]; |
267 | Double_t dstation = ( (-iChamber2->Z()) - (-iChamber1->Z()) ) /2.1; | |
268 | tpar[0] = iChamber1->RInner()-dframep_in; | |
269 | tpar[1] = (iChamber1->ROuter()+dframep_out); | |
270 | tpar[2] = dstation; | |
271 | gMC->Gsvolu("CH05", "TUBE", idAir, tpar, 3); | |
272 | gMC->Gsvolu("CH06", "TUBE", idAir, tpar, 3); | |
273 | iChamber1->GetGeometry()->SetVolume("CH05"); | |
274 | iChamber2->GetGeometry()->SetVolume("CH06"); | |
275 | } | |
e516b01d | 276 | // volumes for slat geometry (xx=5,..,10 chamber id): |
277 | // Sxx0 Sxx1 Sxx2 Sxx3 --> Slat Mother volumes | |
278 | // SxxG --> Sensitive volume (gas) | |
279 | // SxxP --> PCB (copper) | |
280 | // SxxI --> Insulator (G10) | |
281 | // SxxC --> Carbon panel | |
282 | // SxxN --> Nomex comb | |
283 | // SxxX --> Nomex bulk | |
284 | // SxxH, SxxV --> Horizontal and Vertical frames (Noryl) | |
285 | // SB5x --> Volumes for the 35 cm long PCB | |
286 | // slat dimensions: slat is a MOTHER volume!!! made of air | |
287 | ||
288 | // only for chamber 5: slat 1 has a PCB shorter by 5cm! | |
289 | ||
290 | Float_t tlength = 35.; | |
291 | Float_t panelpar2[3] = { tlength/2., panelpar[1], panelpar[2]}; | |
292 | Float_t nomexpar2[3] = { tlength/2., nomexpar[1], nomexpar[2]}; | |
293 | Float_t nomexbpar2[3] = { tlength/2., nomexbpar[1], nomexbpar[2]}; | |
294 | Float_t insupar2[3] = { tlength/2., insupar[1], insupar[2]}; | |
295 | Float_t pcbpar2[3] = { tlength/2., pcbpar[1], pcbpar[2]}; | |
296 | Float_t senspar2[3] = { tlength/2., senspar[1], senspar[2]}; | |
297 | Float_t hFramepar2[3] = { tlength/2., hFramepar[1], hFramepar[2]}; | |
298 | Float_t bFramepar2[3] = { tlength/2., bFramepar[1], bFramepar[2]}; | |
299 | Float_t *dum=0; | |
300 | Float_t pcbDLength3 = (kPcbLength - tlength); | |
301 | ||
302 | const Int_t kNslats3 = 5; // number of slats per quadrant | |
303 | const Int_t kNPCB3[kNslats3] = {4, 4, 4, 3, 2}; // n PCB per slat | |
304 | const Float_t kXpos3[kNslats3] = {0., 0., 0., 0., 0.};//{31., 0., 0., 0., 0.}; | |
305 | const Float_t kYpos3[kNslats3] = {0, 37.8, 37.7, 37.3, 33.7}; | |
306 | Float_t slatLength3[kNslats3]; | |
307 | ||
308 | // create and position the slat (mother) volumes | |
309 | ||
310 | char idSlatCh5[5]; | |
311 | char idSlatCh6[5]; | |
312 | Float_t xSlat3; | |
313 | Float_t ySlat3 = 0; | |
314 | Float_t angle = 0.; | |
315 | Float_t spar2[3]; | |
316 | for (i = 0; i < kNslats3; i++){ | |
317 | ||
318 | slatLength3[i] = kPcbLength * kNPCB3[i] + 2.* kVframeLength; | |
319 | xSlat3 = slatLength3[i]/2. + kDslatLength + kXpos3[i]; | |
320 | ySlat3 += kYpos3[i]; | |
321 | ||
322 | spar[0] = slatLength3[i]/2.; | |
323 | spar[1] = kSlatHeight/2.; | |
324 | spar[2] = kSlatWidth/2.; | |
325 | // take away 5 cm from the first slat in chamber 5 | |
7ddb761c | 326 | if (i == 0 || i == 1 || i == 2) { // 1 pcb is shortened by 5cm |
e516b01d | 327 | spar2[0] = spar[0] - pcbDLength3/2.; |
328 | } else { | |
329 | spar2[0] = spar[0]; | |
330 | } | |
331 | spar2[1] = spar[1]; | |
332 | spar2[2] = spar[2]; | |
333 | Float_t dzCh3 = dzCh; | |
334 | Float_t zSlat3 = (i%2 ==0)? -zSlat : zSlat; // seems not that zSlat3 = zSlat4 & 5 refering to plan PQ7EN345-6 ? | |
335 | ||
e856ab99 | 336 | sprintf(idSlatCh5,"LA%d",i+kNslats3-1); |
e516b01d | 337 | gMC->Gsvolu(idSlatCh5,"BOX",kSlatMaterial,spar2,3); |
e856ab99 | 338 | detElemId = 509 - (i + kNslats3-1-4); |
e516b01d | 339 | GetEnvelopes(4)->AddEnvelope(idSlatCh5, detElemId, true, TGeoTranslation(xSlat3, ySlat3, -zSlat3 + dzCh3), |
340 | TGeoRotation("rot1",90,angle,90,90+angle,0,0) ); | |
341 | ||
342 | sprintf(idSlatCh5,"LA%d",3*kNslats3-2+i); | |
343 | gMC->Gsvolu(idSlatCh5,"BOX",kSlatMaterial,spar2,3); | |
e856ab99 | 344 | detElemId = 500 + (i + kNslats3-1-4); |
e516b01d | 345 | GetEnvelopes(4)->AddEnvelope(idSlatCh5, detElemId, true, TGeoTranslation(-xSlat3, ySlat3, zSlat3 - dzCh3), |
346 | TGeoRotation("rot2",90,180+angle,90,90+angle,180,0) ); | |
347 | ||
348 | if (i > 0) { | |
349 | sprintf(idSlatCh5,"LA%d",kNslats3-1-i); | |
350 | gMC->Gsvolu(idSlatCh5,"BOX",kSlatMaterial,spar2,3); | |
e856ab99 | 351 | detElemId = 509 + (i + kNslats3-1-4); |
e516b01d | 352 | GetEnvelopes(4)->AddEnvelope(idSlatCh5, detElemId, true, TGeoTranslation(xSlat3, -ySlat3, -zSlat3 + dzCh3), |
353 | TGeoRotation("rot3",90,angle,90,270+angle,180,0) ); | |
354 | ||
355 | sprintf(idSlatCh5,"LA%d",3*kNslats3-2-i); | |
356 | gMC->Gsvolu(idSlatCh5,"BOX",kSlatMaterial,spar2,3); | |
e856ab99 | 357 | detElemId = 518 - (i + kNslats3-1-4); |
e516b01d | 358 | GetEnvelopes(4)->AddEnvelope(idSlatCh5, detElemId, true, TGeoTranslation(-xSlat3, -ySlat3, zSlat3 - dzCh3), |
359 | TGeoRotation("rot4",90,180+angle,90,270+angle,0,0) ); | |
360 | } | |
361 | ||
362 | sprintf(idSlatCh6,"LB%d",kNslats3-1+i); | |
363 | gMC->Gsvolu(idSlatCh6,"BOX",kSlatMaterial,spar,3); | |
e856ab99 | 364 | detElemId = 609 - (i + kNslats3-1-4); |
e516b01d | 365 | GetEnvelopes(5)->AddEnvelope(idSlatCh6, detElemId, true, TGeoTranslation(xSlat3, ySlat3, -zSlat3 + dzCh3), |
366 | TGeoRotation("rot5",90,angle,90,90+angle,0,0) ); | |
367 | sprintf(idSlatCh6,"LB%d",3*kNslats3-2+i); | |
368 | gMC->Gsvolu(idSlatCh6,"BOX",kSlatMaterial,spar,3); | |
e856ab99 | 369 | detElemId = 600 + (i + kNslats3-1-4); |
e516b01d | 370 | GetEnvelopes(5)->AddEnvelope(idSlatCh6, detElemId, true, TGeoTranslation(-xSlat3, ySlat3, zSlat3 - dzCh3), |
371 | TGeoRotation("rot6",90,180+angle,90,90+angle,180,0) ); | |
372 | ||
373 | if (i > 0) { | |
374 | sprintf(idSlatCh6,"LB%d",kNslats3-1-i); | |
375 | gMC->Gsvolu(idSlatCh6,"BOX",kSlatMaterial,spar,3); | |
e856ab99 | 376 | detElemId = 609 + (i + kNslats3-1-4); |
e516b01d | 377 | GetEnvelopes(5)->AddEnvelope(idSlatCh6, detElemId, true, TGeoTranslation(xSlat3, -ySlat3, -zSlat3 + dzCh3), |
378 | TGeoRotation("rot7",90,angle,90,270+angle,180,0) ); | |
379 | ||
380 | sprintf(idSlatCh6,"LB%d",3*kNslats3-2-i); | |
381 | gMC->Gsvolu(idSlatCh6,"BOX",kSlatMaterial,spar,3); | |
e856ab99 | 382 | detElemId = 618 - (i + kNslats3-1-4); |
e516b01d | 383 | GetEnvelopes(5)->AddEnvelope(idSlatCh6, detElemId, true, TGeoTranslation(-xSlat3, -ySlat3, zSlat3 - dzCh3), |
384 | TGeoRotation("rot8",90,180+angle,90,270+angle,0,0) ); | |
385 | } | |
386 | } | |
d1cd2474 | 387 | |
e516b01d | 388 | // create the panel volume |
d1cd2474 | 389 | |
e516b01d | 390 | gMC->Gsvolu("S05C","BOX",kCarbonMaterial,panelpar,3); |
391 | gMC->Gsvolu("SB5C","BOX",kCarbonMaterial,panelpar2,3); | |
392 | gMC->Gsvolu("S06C","BOX",kCarbonMaterial,panelpar,3); | |
4846c3ab | 393 | |
e516b01d | 394 | // create the nomex volume (honey comb) |
d1cd2474 | 395 | |
e516b01d | 396 | gMC->Gsvolu("S05N","BOX",kNomexMaterial,nomexpar,3); |
397 | gMC->Gsvolu("SB5N","BOX",kNomexMaterial,nomexpar2,3); | |
398 | gMC->Gsvolu("S06N","BOX",kNomexMaterial,nomexpar,3); | |
4846c3ab | 399 | |
e516b01d | 400 | // create the nomex volume (bulk) |
401 | ||
402 | gMC->Gsvolu("S05X","BOX",kNomexBMaterial,nomexbpar,3); | |
403 | gMC->Gsvolu("SB5X","BOX",kNomexBMaterial,nomexbpar2,3); | |
404 | gMC->Gsvolu("S06X","BOX",kNomexBMaterial,nomexbpar,3); | |
d1cd2474 | 405 | |
e516b01d | 406 | // create the insulating material volume |
407 | ||
408 | gMC->Gsvolu("S05I","BOX",kInsuMaterial,insupar,3); | |
409 | gMC->Gsvolu("SB5I","BOX",kInsuMaterial,insupar2,3); | |
410 | gMC->Gsvolu("S06I","BOX",kInsuMaterial,insupar,3); | |
4846c3ab | 411 | |
e516b01d | 412 | // create the PCB volume |
d1cd2474 | 413 | |
e516b01d | 414 | gMC->Gsvolu("S05P","BOX",kPcbMaterial,pcbpar,3); |
415 | gMC->Gsvolu("SB5P","BOX",kPcbMaterial,pcbpar2,3); | |
416 | gMC->Gsvolu("S06P","BOX",kPcbMaterial,pcbpar,3); | |
d1cd2474 | 417 | |
e516b01d | 418 | // create the sensitive volumes, |
4846c3ab | 419 | |
e516b01d | 420 | gMC->Gsvolu("S05G","BOX",kSensMaterial,dum,0); |
421 | gMC->Gsvolu("S06G","BOX",kSensMaterial,dum,0); | |
d1cd2474 | 422 | |
e516b01d | 423 | // create the vertical frame volume |
d1cd2474 | 424 | |
e516b01d | 425 | gMC->Gsvolu("S05V","BOX",kVframeMaterial,vFramepar,3); |
426 | gMC->Gsvolu("S06V","BOX",kVframeMaterial,vFramepar,3); | |
d1cd2474 | 427 | |
e516b01d | 428 | // create the horizontal frame volume |
d1cd2474 | 429 | |
e516b01d | 430 | gMC->Gsvolu("S05H","BOX",kHframeMaterial,hFramepar,3); |
431 | gMC->Gsvolu("SB5H","BOX",kHframeMaterial,hFramepar2,3); | |
432 | gMC->Gsvolu("S06H","BOX",kHframeMaterial,hFramepar,3); | |
4846c3ab | 433 | |
e516b01d | 434 | // create the horizontal border volume |
d1cd2474 | 435 | |
e516b01d | 436 | gMC->Gsvolu("S05B","BOX",kBframeMaterial,bFramepar,3); |
437 | gMC->Gsvolu("SB5B","BOX",kBframeMaterial,bFramepar2,3); | |
438 | gMC->Gsvolu("S06B","BOX",kBframeMaterial,bFramepar,3); | |
4846c3ab | 439 | |
e516b01d | 440 | index = 0; |
441 | for (i = 0; i<kNslats3; i++){ | |
442 | for (Int_t quadrant = 1; quadrant <= 4; quadrant++) { | |
443 | ||
444 | if (i == 0 && quadrant == 2) continue; | |
445 | if (i == 0 && quadrant == 4) continue; | |
446 | ||
447 | sprintf(idSlatCh5,"LA%d",ConvertSlatNum(i,quadrant,kNslats3-1)); | |
448 | sprintf(idSlatCh6,"LB%d",ConvertSlatNum(i,quadrant,kNslats3-1)); | |
449 | Float_t xvFrame = (slatLength3[i] - kVframeLength)/2.; | |
450 | Float_t xvFrame2 = xvFrame; | |
451 | ||
452 | if (i == 0 || i == 1 || i == 2) xvFrame2 -= pcbDLength3/2.; | |
453 | ||
454 | // position the vertical frames | |
455 | if ( i > 2) { | |
456 | GetEnvelopes(4)->AddEnvelopeConstituent("S05V", idSlatCh5, | |
457 | (2*i-1)*10+quadrant,TGeoTranslation(xvFrame,0.,0.)); | |
458 | GetEnvelopes(4)->AddEnvelopeConstituent("S05V", idSlatCh5, | |
459 | (2*i)*10+quadrant,TGeoTranslation(-xvFrame,0.,0.)); | |
460 | GetEnvelopes(5)->AddEnvelopeConstituent("S06V", idSlatCh6, | |
461 | (2*i-1)*10+quadrant,TGeoTranslation(xvFrame,0.,0.)); | |
462 | GetEnvelopes(5)->AddEnvelopeConstituent("S06V", idSlatCh6, | |
463 | (2*i)*10+quadrant,TGeoTranslation(-xvFrame,0.,0.)); | |
464 | } | |
465 | ||
466 | if (i == 2) { | |
467 | GetEnvelopes(4)->AddEnvelopeConstituent("S05V", idSlatCh5, | |
468 | (2*i-1)*10+quadrant,TGeoTranslation(xvFrame2,0.,0.)); | |
469 | GetEnvelopes(4)->AddEnvelopeConstituent("S05V", idSlatCh5, | |
470 | (2*i)*10+quadrant,TGeoTranslation(-xvFrame,0.,0.)); | |
471 | GetEnvelopes(5)->AddEnvelopeConstituent("S06V", idSlatCh6, | |
472 | (2*i-1)*10+quadrant,TGeoTranslation(xvFrame,0.,0.)); | |
473 | GetEnvelopes(5)->AddEnvelopeConstituent("S06V", idSlatCh6, | |
474 | (2*i)*10+quadrant,TGeoTranslation(-xvFrame,0.,0.)); | |
475 | } | |
476 | ||
477 | if (i == 0 || i == 1) { // no rounded spacer for the moment (Ch. Finck) | |
478 | GetEnvelopes(4)->AddEnvelopeConstituent("S05V", idSlatCh5, | |
479 | (2*i-1)*10+quadrant,TGeoTranslation(xvFrame2,0.,0.)); | |
480 | GetEnvelopes(5)->AddEnvelopeConstituent("S06V", idSlatCh6, | |
481 | (2*i-1)*10+quadrant,TGeoTranslation(xvFrame,0.,0.)); | |
482 | } | |
483 | ||
484 | // position the panels and the insulating material | |
485 | for (j = 0; j < kNPCB3[i]; j++){ | |
486 | if (i == 1 && j == 0) continue; | |
487 | if (i == 0 && j == 0) continue; | |
488 | index++; | |
489 | Float_t xx = kSensLength * (-kNPCB3[i]/2. + j + 0.5); | |
490 | Float_t xx2 = xx - pcbDLength3/2.; | |
d1cd2474 | 491 | |
e516b01d | 492 | Float_t zPanel = spar[2] - nomexbpar[2]; |
493 | ||
494 | if ( (i == 0 || i == 1 || i == 2) && j == kNPCB3[i]-1) { // 1 pcb is shortened by 5cm | |
495 | GetEnvelopes(4)->AddEnvelopeConstituent("SB5X", idSlatCh5, 2*index-1,TGeoTranslation(xx2,0.,zPanel)); | |
496 | GetEnvelopes(4)->AddEnvelopeConstituent("SB5X", idSlatCh5, 2*index,TGeoTranslation(xx2,0.,-zPanel)); | |
497 | GetEnvelopes(4)->AddEnvelopeConstituent("SB5I", idSlatCh5, index,TGeoTranslation(xx2,0.,0.)); | |
498 | } else { | |
499 | GetEnvelopes(4)->AddEnvelopeConstituent("S05X", idSlatCh5, 2*index-1,TGeoTranslation(xx,0.,zPanel)); | |
500 | GetEnvelopes(4)->AddEnvelopeConstituent("S05X", idSlatCh5, 2*index,TGeoTranslation(xx,0.,-zPanel)); | |
501 | GetEnvelopes(4)->AddEnvelopeConstituent("S05I", idSlatCh5, index,TGeoTranslation(xx,0.,0.)); | |
502 | } | |
503 | GetEnvelopes(5)->AddEnvelopeConstituent("S06X", idSlatCh6, 2*index-1,TGeoTranslation(xx,0.,zPanel)); | |
504 | GetEnvelopes(5)->AddEnvelopeConstituent("S06X", idSlatCh6, 2*index,TGeoTranslation(xx,0.,-zPanel)); | |
505 | GetEnvelopes(5)->AddEnvelopeConstituent("S06I", idSlatCh6, index,TGeoTranslation(xx,0.,0.)); | |
d1cd2474 | 506 | |
e516b01d | 507 | } |
508 | } | |
509 | } | |
510 | ||
511 | // position the nomex volume inside the panel volume | |
512 | gMC->Gspos("S05N",1,"S05C",0.,0.,0.,0,"ONLY"); | |
513 | gMC->Gspos("SB5N",1,"SB5C",0.,0.,0.,0,"ONLY"); | |
514 | gMC->Gspos("S06N",1,"S06C",0.,0.,0.,0,"ONLY"); | |
4846c3ab | 515 | |
e516b01d | 516 | // position panel volume inside the bulk nomex material volume |
517 | gMC->Gspos("S05C",1,"S05X",0.,0.,kNomexBWidth/2.,0,"ONLY"); | |
518 | gMC->Gspos("SB5C",1,"SB5X",0.,0.,kNomexBWidth/2.,0,"ONLY"); | |
519 | gMC->Gspos("S06C",1,"S06X",0.,0.,kNomexBWidth/2.,0,"ONLY"); | |
520 | ||
521 | // position the PCB volume inside the insulating material volume | |
522 | gMC->Gspos("S05P",1,"S05I",0.,0.,0.,0,"ONLY"); | |
523 | gMC->Gspos("SB5P",1,"SB5I",0.,0.,0.,0,"ONLY"); | |
524 | gMC->Gspos("S06P",1,"S06I",0.,0.,0.,0,"ONLY"); | |
4846c3ab | 525 | |
e516b01d | 526 | // position the horizontal frame volume inside the PCB volume |
527 | gMC->Gspos("S05H",1,"S05P",0.,0.,0.,0,"ONLY"); | |
528 | gMC->Gspos("SB5H",1,"SB5P",0.,0.,0.,0,"ONLY"); | |
529 | gMC->Gspos("S06H",1,"S06P",0.,0.,0.,0,"ONLY"); | |
4846c3ab | 530 | |
e516b01d | 531 | // position the sensitive volume inside the horizontal frame volume |
532 | gMC->Gsposp("S05G",1,"S05H",0.,0.,0.,0,"ONLY",senspar,3); | |
533 | gMC->Gsposp("S05G",1,"SB5H",0.,0.,0.,0,"ONLY",senspar2,3); | |
534 | gMC->Gsposp("S06G",1,"S06H",0.,0.,0.,0,"ONLY",senspar,3); | |
4846c3ab | 535 | |
536 | ||
e516b01d | 537 | // position the border volumes inside the PCB volume |
538 | Float_t yborder = ( kPcbHeight - kBframeHeight ) / 2.; | |
539 | gMC->Gspos("S05B",1,"S05P",0., yborder,0.,0,"ONLY"); | |
540 | gMC->Gspos("S05B",2,"S05P",0.,-yborder,0.,0,"ONLY"); | |
541 | gMC->Gspos("SB5B",1,"SB5P",0., yborder,0.,0,"ONLY"); | |
542 | gMC->Gspos("SB5B",2,"SB5P",0.,-yborder,0.,0,"ONLY"); | |
543 | ||
544 | gMC->Gspos("S06B",1,"S06P",0., yborder,0.,0,"ONLY"); | |
545 | gMC->Gspos("S06B",2,"S06P",0.,-yborder,0.,0,"ONLY"); | |
4846c3ab | 546 | |
e516b01d | 547 | // create the NULOC volume and position it in the horizontal frame |
548 | gMC->Gsvolu("S05E","BOX",kNulocMaterial,nulocpar,3); | |
549 | gMC->Gsvolu("S06E","BOX",kNulocMaterial,nulocpar,3); | |
550 | index = 0; | |
551 | Float_t xxmax2 = xxmax - pcbDLength3/2.; | |
552 | for (xx = -xxmax; xx <= xxmax; xx += 2*kNulocLength) { | |
553 | index++; | |
554 | gMC->Gspos("S05E",2*index-1,"S05B", xx, 0.,-kBframeWidth/2. + kNulocWidth/2, 0, "ONLY"); | |
555 | gMC->Gspos("S05E",2*index ,"S05B", xx, 0., kBframeWidth/2. - kNulocWidth/2, 0, "ONLY"); | |
556 | gMC->Gspos("S06E",2*index-1,"S06B", xx, 0.,-kBframeWidth/2. + kNulocWidth/2, 0, "ONLY"); | |
557 | gMC->Gspos("S06E",2*index ,"S06B", xx, 0., kBframeWidth/2.- kNulocWidth/2, 0, "ONLY"); | |
558 | if (xx > -xxmax2 && xx< xxmax2) { | |
559 | gMC->Gspos("S05E",2*index-1,"SB5B", xx, 0.,-kBframeWidth/2.+ kNulocWidth/2, 0, "ONLY"); | |
560 | gMC->Gspos("S05E",2*index ,"SB5B", xx, 0., kBframeWidth/2.- kNulocWidth/2, 0, "ONLY"); | |
561 | } | |
562 | } | |
563 | ||
564 | // position the volumes approximating the circular section of the pipe | |
565 | Float_t epsilon = 0.001; | |
566 | Int_t ndiv = 6; | |
567 | Int_t imax = 1; | |
568 | Double_t divpar[3]; | |
569 | Double_t dydiv = kSensHeight/ndiv; | |
570 | Double_t ydiv = (kSensHeight - dydiv)/2.; | |
f4a7360f | 571 | Double_t rmin = iChamber1->RInner();// Same radius for both chamber in St3 |
e516b01d | 572 | Double_t xdiv = 0.; |
573 | Float_t xvol; | |
574 | Float_t yvol; | |
575 | ||
576 | for (Int_t idiv = 0; idiv < ndiv; idiv++){ | |
577 | ydiv += dydiv; | |
578 | xdiv = 0.; | |
6f7aa53f | 579 | if (ydiv < rmin) xdiv = rmin * TMath::Sin( TMath::ACos((ydiv-dydiv/2.)/rmin) ); |
e516b01d | 580 | divpar[0] = (kPcbLength - xdiv)/2.; |
581 | divpar[1] = dydiv/2. - epsilon; | |
582 | divpar[2] = kSensWidth/2.; | |
583 | xvol = (kPcbLength + xdiv)/2.; | |
584 | yvol = ydiv; | |
585 | ||
586 | // Volumes close to the beam pipe for slat i=1 so 4 slats per chamber | |
587 | for (Int_t quadrant = 1; quadrant <= 4; quadrant++) { | |
588 | sprintf(idSlatCh5,"LA%d",ConvertSlatNum(1,quadrant,kNslats3-1)); | |
589 | sprintf(idSlatCh6,"LB%d",ConvertSlatNum(1,quadrant,kNslats3-1)); | |
590 | ||
591 | GetEnvelopes(4)->AddEnvelopeConstituentParam("S05G", idSlatCh5, quadrant*100+imax+4*idiv+1, | |
592 | TGeoTranslation(xvol-(kPcbLength * kNPCB3[1]/2.),yvol-kPcbLength,0.),3,divpar); | |
593 | ||
594 | GetEnvelopes(5)->AddEnvelopeConstituentParam("S06G", idSlatCh6, quadrant*100+imax+4*idiv+1, | |
595 | TGeoTranslation(xvol-(kPcbLength * kNPCB3[1]/2.),yvol-kPcbLength,0.),3,divpar); | |
596 | } | |
597 | } | |
598 | ||
599 | // Volumes close to the beam pipe for slat i=0 so 2 slats per chamber (central slat for station 3) | |
600 | // Gines Martinez, Subatech sep 04 | |
601 | // 9 box volumes are used to define the PCB closed to the beam pipe of the slat 122000SR1 of chamber 5 and 6 of St3 | |
602 | // Accordingly to plan PQ-LAT-SR1 of CEA-DSM-DAPNIA-SIS/BE ph HARDY 8-Oct-2002 | |
603 | // Rmin = 31.5 cm | |
f4a7360f | 604 | rmin = iChamber1->RInner(); // Same radius for both chamber in St3 |
e516b01d | 605 | ndiv = 9; |
606 | dydiv = kSensHeight/ndiv; // Vertical size of the box volume approximating the rounded PCB | |
607 | ydiv = -kSensHeight/2 + dydiv/2.; // Initializing vertical position of the volume from bottom | |
608 | xdiv = 0.; // Initializing horizontal position of the box volumes | |
609 | ||
610 | for (Int_t idiv = 0; idiv < ndiv; idiv++){ | |
611 | xdiv = TMath::Abs( rmin * TMath::Sin( TMath::ACos(ydiv/rmin) ) ); | |
612 | divpar[0] = (kPcbLength - xdiv)/2.; // Dimension of the box volume | |
613 | divpar[1] = dydiv/2. - epsilon; | |
614 | divpar[2] = kSensWidth/2.; | |
615 | xvol = (kPcbLength + xdiv)/2.; //2D traslition for positionning of box volume | |
616 | yvol = ydiv; | |
617 | Int_t side; | |
618 | for (side = 1; side <= 2; side++) { | |
619 | sprintf(idSlatCh5,"LA%d",4); | |
620 | sprintf(idSlatCh6,"LB%d",4); | |
621 | if(side == 2) { | |
622 | sprintf(idSlatCh5,"LA%d",13); | |
623 | sprintf(idSlatCh6,"LB%d",13); | |
624 | } | |
625 | GetEnvelopes(4)->AddEnvelopeConstituentParam("S05G", idSlatCh5,500+side*100+imax+4*idiv+1, | |
626 | TGeoTranslation(xvol-(kPcbLength * kNPCB3[0]/2.),yvol,0.),3,divpar); | |
627 | ||
628 | GetEnvelopes(5)->AddEnvelopeConstituentParam("S06G", idSlatCh6,500+side*100+imax+4*idiv+1, | |
629 | TGeoTranslation(xvol-(kPcbLength * kNPCB3[0]/2.),yvol,0.),3,divpar); | |
630 | } | |
631 | ydiv += dydiv; // Going from bottom to top | |
632 | } | |
633 | // cout << "Geometry for Station 3...... done" << endl; | |
d1cd2474 | 634 | } |
635 | ||
e516b01d | 636 | if (fStations[3]) { |
d1cd2474 | 637 | |
638 | ||
e516b01d | 639 | // //******************************************************************** |
640 | // // Station 4 ** | |
641 | // //******************************************************************** | |
642 | // // indices 1 and 2 for first and second chambers in the station | |
643 | // // iChamber (first chamber) kept for other quanties than Z, | |
644 | // // assumed to be the same in both chambers | |
645 | // corrected geometry (JP. Cussonneau, Ch. Finck) | |
d1cd2474 | 646 | |
e118b27e | 647 | iChamber = &fMUON->Chamber(6); |
e516b01d | 648 | iChamber1 = iChamber; |
e118b27e | 649 | iChamber2 = &fMUON->Chamber(7); |
e516b01d | 650 | |
651 | const Int_t kNslats4 = 7; // number of slats per quadrant | |
652 | const Int_t kNPCB4[kNslats4] = {5, 6, 5, 5, 4, 3, 2}; // n PCB per slat | |
653 | const Float_t kXpos4[kNslats4] = {38.2, 0., 0., 0., 0., 0., 0.}; | |
654 | const Float_t kYpos41[kNslats4] = {0., 38.2, 34.40, 36.60, 29.3, 37.0, 28.6}; | |
655 | const Float_t kYpos42[kNslats4] = {0., 38.2, 37.85, 37.55, 29.4, 37.0, 28.6}; | |
656 | ||
657 | Float_t slatLength4[kNslats4]; | |
658 | ||
6ffd4cb7 | 659 | |
660 | // Mother volume for each chamber | |
661 | // Outer excess and inner recess for mother volume radius | |
662 | // with respect to ROuter and RInner | |
f4a7360f | 663 | Float_t dframep_in = kRframeHeight; |
664 | Float_t dframep_out= kVframeLength + 40.0; // Additional 30 cm gap is needed to wrap the corners of the slats | |
6ffd4cb7 | 665 | Float_t tpar[3]; |
666 | Double_t dstation = ( (-iChamber2->Z()) - (-iChamber1->Z()) ) /2.1; | |
667 | tpar[0] = iChamber1->RInner()-dframep_in; | |
668 | tpar[1] = (iChamber1->ROuter()+dframep_out); | |
669 | tpar[2] = dstation; | |
670 | gMC->Gsvolu("CH07", "TUBE", idAir, tpar, 3); | |
671 | gMC->Gsvolu("CH08", "TUBE", idAir, tpar, 3); | |
672 | iChamber1->GetGeometry()->SetVolume("CH07"); | |
673 | iChamber2->GetGeometry()->SetVolume("CH08"); | |
674 | ||
e516b01d | 675 | // create and position the slat (mother) volumes |
676 | ||
677 | char idSlatCh7[5]; | |
678 | char idSlatCh8[5]; | |
679 | Float_t xSlat4; | |
680 | Float_t ySlat41 = 0; | |
681 | Float_t ySlat42 = 0; | |
682 | ||
683 | angle = 0.; | |
684 | ||
685 | for (i = 0; i<kNslats4; i++){ | |
686 | slatLength4[i] = kPcbLength * kNPCB4[i] + 2. * kVframeLength; | |
687 | xSlat4 = slatLength4[i]/2. + kDslatLength + kXpos4[i]; | |
688 | ySlat41 += kYpos41[i]; | |
689 | ySlat42 += kYpos42[i]; | |
690 | ||
691 | spar[0] = slatLength4[i]/2.; | |
692 | spar[1] = kSlatHeight/2.; | |
693 | spar[2] = kSlatWidth/2.; | |
694 | Float_t dzCh4 = dzCh; | |
695 | Float_t zSlat4 = (i%2 ==0)? -zSlat : zSlat; | |
696 | ||
697 | sprintf(idSlatCh7,"LC%d",kNslats4-1+i); | |
698 | gMC->Gsvolu(idSlatCh7,"BOX",kSlatMaterial,spar,3); | |
e856ab99 | 699 | detElemId = 713 - (i + kNslats4-1-6); |
e516b01d | 700 | GetEnvelopes(6)->AddEnvelope(idSlatCh7, detElemId, true, TGeoTranslation(xSlat4, ySlat41, -zSlat4 + dzCh4), |
701 | TGeoRotation("rot1",90,angle,90,90+angle,0,0) ); | |
702 | ||
703 | sprintf(idSlatCh7,"LC%d",3*kNslats4-2+i); | |
704 | gMC->Gsvolu(idSlatCh7,"BOX",kSlatMaterial,spar,3); | |
e856ab99 | 705 | detElemId = 700 + (i + kNslats4-1-6); |
e516b01d | 706 | GetEnvelopes(6)->AddEnvelope(idSlatCh7, detElemId, true, TGeoTranslation(-xSlat4, ySlat41, zSlat4 - dzCh4), |
707 | TGeoRotation("rot2",90,180+angle,90,90+angle,180,0) ); | |
d1cd2474 | 708 | |
e516b01d | 709 | if (i > 0) { |
710 | sprintf(idSlatCh7,"LC%d",kNslats4-1-i); | |
711 | gMC->Gsvolu(idSlatCh7,"BOX",kSlatMaterial,spar,3); | |
e856ab99 | 712 | detElemId = 713 + (i + kNslats4-1-6); |
e516b01d | 713 | GetEnvelopes(6)->AddEnvelope(idSlatCh7, detElemId, true, TGeoTranslation(xSlat4, -ySlat41, -zSlat4 + dzCh4), |
714 | TGeoRotation("rot3",90,angle,90,270+angle,180,0) ); | |
715 | ||
716 | sprintf(idSlatCh7,"LC%d",3*kNslats4-2-i); | |
e856ab99 | 717 | detElemId = 726 - (i + kNslats4-1-6); |
e516b01d | 718 | gMC->Gsvolu(idSlatCh7,"BOX",kSlatMaterial,spar,3); |
719 | GetEnvelopes(6)->AddEnvelope(idSlatCh7, detElemId, true, | |
720 | TGeoTranslation(-xSlat4, -ySlat41, zSlat4 - dzCh4), | |
721 | TGeoRotation("rot4",90,180+angle,90,270+angle,0,0) ); | |
722 | } | |
723 | ||
724 | sprintf(idSlatCh8,"LD%d",kNslats4-1+i); | |
725 | gMC->Gsvolu(idSlatCh8,"BOX",kSlatMaterial,spar,3); | |
e856ab99 | 726 | detElemId = 813 - (i + kNslats4-1-6); |
e516b01d | 727 | GetEnvelopes(7)->AddEnvelope(idSlatCh8, detElemId, true, TGeoTranslation(xSlat4, ySlat42, -zSlat4 + dzCh4), |
728 | TGeoRotation("rot5",90,angle,90,90+angle,0,0) ); | |
729 | ||
730 | sprintf(idSlatCh8,"LD%d",3*kNslats4-2+i); | |
e856ab99 | 731 | detElemId = 800 + (i + kNslats4-1-6); |
e516b01d | 732 | gMC->Gsvolu(idSlatCh8,"BOX",kSlatMaterial,spar,3); |
733 | GetEnvelopes(7)->AddEnvelope(idSlatCh8, detElemId, true, TGeoTranslation(-xSlat4, ySlat42, zSlat4 - dzCh4), | |
734 | TGeoRotation("rot6",90,180+angle,90,90+angle,180,0) ); | |
735 | if (i > 0) { | |
736 | sprintf(idSlatCh8,"LD%d",kNslats4-1-i); | |
e856ab99 | 737 | detElemId = 813 + (i + kNslats4-1-6); |
e516b01d | 738 | gMC->Gsvolu(idSlatCh8,"BOX",kSlatMaterial,spar,3); |
739 | GetEnvelopes(7)->AddEnvelope(idSlatCh8, detElemId, true, TGeoTranslation(xSlat4, -ySlat42, -zSlat4 + dzCh4), | |
740 | TGeoRotation("rot7",90,angle,90,270+angle,180,0) ); | |
741 | sprintf(idSlatCh8,"LD%d",3*kNslats4-2-i); | |
e856ab99 | 742 | detElemId = 826 - (i + kNslats4-1-6); |
e516b01d | 743 | gMC->Gsvolu(idSlatCh8,"BOX",kSlatMaterial,spar,3); |
744 | GetEnvelopes(7)->AddEnvelope(idSlatCh8, detElemId, true, TGeoTranslation(-xSlat4, -ySlat42, zSlat4 - dzCh4), | |
745 | TGeoRotation("rot8",90,180+angle,90,270+angle,0,0) ); | |
746 | } | |
747 | } | |
d1cd2474 | 748 | |
e516b01d | 749 | // create the panel volume |
d1cd2474 | 750 | |
e516b01d | 751 | gMC->Gsvolu("S07C","BOX",kCarbonMaterial,panelpar,3); |
752 | gMC->Gsvolu("S08C","BOX",kCarbonMaterial,panelpar,3); | |
d1cd2474 | 753 | |
e516b01d | 754 | // create the nomex volume |
d1cd2474 | 755 | |
e516b01d | 756 | gMC->Gsvolu("S07N","BOX",kNomexMaterial,nomexpar,3); |
757 | gMC->Gsvolu("S08N","BOX",kNomexMaterial,nomexpar,3); | |
d1cd2474 | 758 | |
d1cd2474 | 759 | |
e516b01d | 760 | // create the nomex volume (bulk) |
d1cd2474 | 761 | |
e516b01d | 762 | gMC->Gsvolu("S07X","BOX",kNomexBMaterial,nomexbpar,3); |
763 | gMC->Gsvolu("S08X","BOX",kNomexBMaterial,nomexbpar,3); | |
d1cd2474 | 764 | |
e516b01d | 765 | // create the insulating material volume |
766 | ||
767 | gMC->Gsvolu("S07I","BOX",kInsuMaterial,insupar,3); | |
768 | gMC->Gsvolu("S08I","BOX",kInsuMaterial,insupar,3); | |
769 | ||
770 | // create the PCB volume | |
771 | ||
772 | gMC->Gsvolu("S07P","BOX",kPcbMaterial,pcbpar,3); | |
773 | gMC->Gsvolu("S08P","BOX",kPcbMaterial,pcbpar,3); | |
d1cd2474 | 774 | |
e516b01d | 775 | // create the sensitive volumes, |
776 | ||
777 | gMC->Gsvolu("S07G","BOX",kSensMaterial,dum,0); | |
778 | gMC->Gsvolu("S08G","BOX",kSensMaterial,dum,0); | |
779 | ||
780 | // create the vertical frame volume | |
781 | ||
782 | gMC->Gsvolu("S07V","BOX",kVframeMaterial,vFramepar,3); | |
783 | gMC->Gsvolu("S08V","BOX",kVframeMaterial,vFramepar,3); | |
784 | ||
785 | // create the horizontal frame volume | |
786 | ||
787 | gMC->Gsvolu("S07H","BOX",kHframeMaterial,hFramepar,3); | |
788 | gMC->Gsvolu("S08H","BOX",kHframeMaterial,hFramepar,3); | |
789 | ||
790 | // create the horizontal border volume | |
791 | ||
792 | gMC->Gsvolu("S07B","BOX",kBframeMaterial,bFramepar,3); | |
793 | gMC->Gsvolu("S08B","BOX",kBframeMaterial,bFramepar,3); | |
794 | ||
795 | index = 0; | |
796 | for (i = 0; i < kNslats4; i++){ | |
797 | for (Int_t quadrant = 1; quadrant <= 4; quadrant++) { | |
798 | ||
799 | if (i == 0 && quadrant == 2) continue; | |
800 | if (i == 0 && quadrant == 4) continue; | |
801 | ||
802 | sprintf(idSlatCh7,"LC%d",ConvertSlatNum(i,quadrant,kNslats4-1)); | |
803 | sprintf(idSlatCh8,"LD%d",ConvertSlatNum(i,quadrant,kNslats4-1)); | |
804 | Float_t xvFrame = (slatLength4[i] - kVframeLength)/2.; | |
805 | ||
806 | // position the vertical frames | |
807 | if (i != 1) { | |
808 | GetEnvelopes(6)->AddEnvelopeConstituent("S07V", idSlatCh7, (2*i-1)*10+quadrant,TGeoTranslation(xvFrame,0.,0.)); | |
809 | GetEnvelopes(6)->AddEnvelopeConstituent("S07V", idSlatCh7, (2*i)*10+quadrant,TGeoTranslation(-xvFrame,0.,0.)); | |
810 | GetEnvelopes(7)->AddEnvelopeConstituent("S08V", idSlatCh8, (2*i-1)*10+quadrant,TGeoTranslation(xvFrame,0.,0.)); | |
811 | GetEnvelopes(7)->AddEnvelopeConstituent("S08V", idSlatCh8, (2*i)*10+quadrant,TGeoTranslation(-xvFrame,0.,0.)); | |
812 | } else { // no rounded spacer yet | |
813 | GetEnvelopes(6)->AddEnvelopeConstituent("S07V", idSlatCh7, (2*i-1)*10+quadrant,TGeoTranslation(xvFrame,0.,0.)); | |
814 | // GetEnvelopes(6)->AddEnvelopeConstituent("S07V", idSlatCh7, (2*i)*10+quadrant,TGeoTranslation(-xvFrame,0.,0.)); | |
815 | GetEnvelopes(7)->AddEnvelopeConstituent("S08V", idSlatCh8, (2*i-1)*10+quadrant,TGeoTranslation(xvFrame,0.,0.)); | |
816 | // GetEnvelopes(7)->AddEnvelopeConstituent("S08V", idSlatCh8, (2*i)*10+quadrant,TGeoTranslation(-xvFrame,0.,0.)); | |
817 | } | |
818 | // position the panels and the insulating material | |
819 | for (j = 0; j < kNPCB4[i]; j++){ | |
820 | if (i == 1 && j == 0) continue; | |
821 | index++; | |
822 | Float_t xx = kSensLength * (-kNPCB4[i]/2.+j+.5); | |
823 | ||
824 | Float_t zPanel = spar[2] - nomexbpar[2]; | |
825 | GetEnvelopes(6)->AddEnvelopeConstituent("S07X", idSlatCh7, 2*index-1,TGeoTranslation(xx,0.,zPanel)); | |
826 | GetEnvelopes(6)->AddEnvelopeConstituent("S07X", idSlatCh7, 2*index,TGeoTranslation(xx,0.,-zPanel)); | |
827 | GetEnvelopes(6)->AddEnvelopeConstituent("S07I", idSlatCh7, index,TGeoTranslation(xx,0.,0.)); | |
828 | GetEnvelopes(7)->AddEnvelopeConstituent("S08X", idSlatCh8, 2*index-1,TGeoTranslation(xx,0.,zPanel)); | |
829 | GetEnvelopes(7)->AddEnvelopeConstituent("S08X", idSlatCh8, 2*index,TGeoTranslation(xx,0.,-zPanel)); | |
830 | GetEnvelopes(7)->AddEnvelopeConstituent("S08I", idSlatCh8, index,TGeoTranslation(xx,0.,0.)); | |
831 | } | |
832 | } | |
833 | } | |
834 | ||
835 | // position the nomex volume inside the panel volume | |
836 | gMC->Gspos("S07N",1,"S07C",0.,0.,0.,0,"ONLY"); | |
837 | gMC->Gspos("S08N",1,"S08C",0.,0.,0.,0,"ONLY"); | |
838 | ||
839 | // position panel volume inside the bulk nomex material volume | |
840 | gMC->Gspos("S07C",1,"S07X",0.,0.,kNomexBWidth/2.,0,"ONLY"); | |
841 | gMC->Gspos("S08C",1,"S08X",0.,0.,kNomexBWidth/2.,0,"ONLY"); | |
842 | ||
843 | // position the PCB volume inside the insulating material volume | |
844 | gMC->Gspos("S07P",1,"S07I",0.,0.,0.,0,"ONLY"); | |
845 | gMC->Gspos("S08P",1,"S08I",0.,0.,0.,0,"ONLY"); | |
846 | ||
847 | // position the horizontal frame volume inside the PCB volume | |
848 | gMC->Gspos("S07H",1,"S07P",0.,0.,0.,0,"ONLY"); | |
849 | gMC->Gspos("S08H",1,"S08P",0.,0.,0.,0,"ONLY"); | |
850 | ||
851 | // position the sensitive volume inside the horizontal frame volume | |
852 | gMC->Gsposp("S07G",1,"S07H",0.,0.,0.,0,"ONLY",senspar,3); | |
853 | gMC->Gsposp("S08G",1,"S08H",0.,0.,0.,0,"ONLY",senspar,3); | |
854 | ||
855 | // position the border volumes inside the PCB volume | |
856 | Float_t yborder = ( kPcbHeight - kBframeHeight ) / 2.; | |
857 | gMC->Gspos("S07B",1,"S07P",0., yborder,0.,0,"ONLY"); | |
858 | gMC->Gspos("S07B",2,"S07P",0.,-yborder,0.,0,"ONLY"); | |
859 | gMC->Gspos("S08B",1,"S08P",0., yborder,0.,0,"ONLY"); | |
860 | gMC->Gspos("S08B",2,"S08P",0.,-yborder,0.,0,"ONLY"); | |
861 | ||
862 | // create the NULOC volume and position it in the horizontal frame | |
863 | ||
864 | gMC->Gsvolu("S07E","BOX",kNulocMaterial,nulocpar,3); | |
865 | gMC->Gsvolu("S08E","BOX",kNulocMaterial,nulocpar,3); | |
866 | index = 0; | |
867 | for (xx = -xxmax; xx <= xxmax; xx += 2*kNulocLength) { | |
868 | index++; | |
869 | gMC->Gspos("S07E",2*index-1,"S07B", xx, 0.,-kBframeWidth/2. + kNulocWidth/2, 0, "ONLY"); | |
870 | gMC->Gspos("S07E",2*index ,"S07B", xx, 0., kBframeWidth/2. - kNulocWidth/2, 0, "ONLY"); | |
871 | gMC->Gspos("S08E",2*index-1,"S08B", xx, 0.,-kBframeWidth/2. + kNulocWidth/2, 0, "ONLY"); | |
872 | gMC->Gspos("S08E",2*index ,"S08B", xx, 0., kBframeWidth/2. - kNulocWidth/2, 0, "ONLY"); | |
873 | } | |
874 | ||
875 | // position the volumes approximating the circular section of the pipe | |
876 | ||
877 | Float_t epsilon = 0.001; | |
878 | Int_t ndiv = 10; | |
879 | Int_t imax = 1; | |
880 | Double_t divpar[3]; | |
881 | Double_t dydiv = kSensHeight/ndiv; | |
882 | Double_t ydiv = (kSensHeight - dydiv)/2.; | |
f4a7360f | 883 | Float_t rmin = iChamber1->RInner(); // Same radius for both chamber of St4 |
e516b01d | 884 | Float_t xdiv = 0.; |
885 | Float_t xvol; | |
886 | Float_t yvol; | |
887 | ||
888 | for (Int_t idiv = 0; idiv < ndiv; idiv++){ | |
889 | ydiv += dydiv; | |
890 | xdiv = 0.; | |
6f7aa53f | 891 | if (ydiv < rmin) xdiv = rmin * TMath::Sin( TMath::ACos((ydiv-dydiv/2.)/rmin) ); |
e516b01d | 892 | divpar[0] = (kPcbLength - xdiv)/2.; |
893 | divpar[1] = dydiv/2. - epsilon; | |
894 | divpar[2] = kSensWidth/2.; | |
895 | xvol = (kPcbLength + xdiv)/2.; | |
896 | yvol = ydiv ; | |
6296ba34 | 897 | |
e516b01d | 898 | for (Int_t quadrant = 1; quadrant <= 4; quadrant++) { |
899 | sprintf(idSlatCh7,"LC%d",ConvertSlatNum(1,quadrant,kNslats4-1)); | |
900 | sprintf(idSlatCh8,"LD%d",ConvertSlatNum(1,quadrant,kNslats4-1)); | |
6296ba34 | 901 | |
e516b01d | 902 | GetEnvelopes(6)->AddEnvelopeConstituentParam("S07G",idSlatCh7, quadrant*100+imax+4*idiv+1, |
903 | TGeoTranslation(xvol-kPcbLength * kNPCB4[1]/2.,yvol-kPcbLength,0.),3,divpar); | |
6296ba34 | 904 | |
e516b01d | 905 | GetEnvelopes(7)->AddEnvelopeConstituentParam("S08G", idSlatCh8, quadrant*100+imax+4*idiv+1, |
906 | TGeoTranslation(xvol-kPcbLength * kNPCB4[1]/2.,yvol-kPcbLength,0.),3,divpar); | |
907 | } | |
d12a7158 | 908 | } |
e516b01d | 909 | // cout << "Geometry for Station 4...... done" << endl; |
910 | ||
911 | } | |
d1cd2474 | 912 | |
e516b01d | 913 | if (fStations[4]) { |
6296ba34 | 914 | |
d1cd2474 | 915 | |
e516b01d | 916 | // //******************************************************************** |
917 | // // Station 5 ** | |
918 | // //******************************************************************** | |
919 | // // indices 1 and 2 for first and second chambers in the station | |
920 | // // iChamber (first chamber) kept for other quanties than Z, | |
921 | // // assumed to be the same in both chambers | |
922 | // corrected geometry (JP. Cussonneau, Ch. Finck) | |
923 | ||
e118b27e | 924 | iChamber = &fMUON->Chamber(8); |
e516b01d | 925 | iChamber1 = iChamber; |
e118b27e | 926 | iChamber2 = &fMUON->Chamber(9); |
d1cd2474 | 927 | |
e516b01d | 928 | const Int_t kNslats5 = 7; // number of slats per quadrant |
929 | const Int_t kNPCB5[kNslats5] = {5, 6, 6, 6, 5, 4, 3}; // n PCB per slat | |
930 | const Float_t kXpos5[kNslats5] = {38.2, 0., 0., 0., 0., 0., 0.}; | |
931 | const Float_t kYpos5[kNslats5] = {0., 38.2, 37.9, 37.6, 37.3, 37.05, 36.75}; | |
932 | Float_t slatLength5[kNslats5]; | |
933 | ||
6ffd4cb7 | 934 | // Mother volume for each chamber |
935 | // Outer excess and inner recess for mother volume radius | |
936 | // with respect to ROuter and RInner | |
f4a7360f | 937 | Float_t dframep_in = kRframeHeight; |
938 | Float_t dframep_out= kVframeLength + 40.0; // Additional 40 cm gap is needed to wrap the corners of the slats | |
6ffd4cb7 | 939 | Float_t tpar[3]; |
940 | Double_t dstation = ( (-iChamber2->Z()) - (-iChamber1->Z()) ) /2.3; | |
941 | tpar[0] = iChamber1->RInner()-dframep_in; | |
942 | tpar[1] = (iChamber1->ROuter()+dframep_out); | |
943 | tpar[2] = dstation; | |
944 | gMC->Gsvolu("CH09", "TUBE", idAir, tpar, 3); | |
945 | gMC->Gsvolu("CH10", "TUBE", idAir, tpar, 3); | |
946 | iChamber1->GetGeometry()->SetVolume("CH09"); | |
947 | iChamber2->GetGeometry()->SetVolume("CH10"); | |
948 | ||
e516b01d | 949 | // create and position the slat (mother) volumes |
950 | ||
951 | char idSlatCh9[5]; | |
952 | char idSlatCh10[5]; | |
953 | Float_t xSlat5; | |
954 | Float_t ySlat5 = 0; | |
955 | angle = 0.; | |
956 | ||
957 | for (i = 0; i < kNslats5; i++){ | |
958 | ||
959 | slatLength5[i] = kPcbLength * kNPCB5[i] + 2.* kVframeLength; | |
960 | xSlat5 = slatLength5[i]/2. + kDslatLength + kXpos5[i]; | |
961 | ySlat5 += kYpos5[i]; | |
962 | ||
963 | spar[0] = slatLength5[i]/2.; | |
964 | spar[1] = kSlatHeight/2.; | |
965 | spar[2] = kSlatWidth/2.; | |
966 | ||
967 | Float_t dzCh5 = dzCh; | |
968 | Float_t zSlat5 = (i%2 ==0)? -zSlat : zSlat; | |
969 | ||
970 | sprintf(idSlatCh9,"LE%d",kNslats5-1+i); | |
e856ab99 | 971 | detElemId = 913 - (i + kNslats5-1-6); |
e516b01d | 972 | gMC->Gsvolu(idSlatCh9,"BOX",kSlatMaterial,spar,3); |
973 | GetEnvelopes(8)->AddEnvelope(idSlatCh9, detElemId, true, TGeoTranslation(xSlat5, ySlat5, -zSlat5 + dzCh5), | |
974 | TGeoRotation("rot1",90,angle,90,90+angle,0,0) ); | |
975 | ||
976 | sprintf(idSlatCh9,"LE%d",3*kNslats5-2+i); | |
e856ab99 | 977 | detElemId = 900 + (i + kNslats5-1-6); |
e516b01d | 978 | gMC->Gsvolu(idSlatCh9,"BOX",kSlatMaterial,spar,3); |
979 | GetEnvelopes(8)->AddEnvelope(idSlatCh9, detElemId, true, TGeoTranslation(-xSlat5, ySlat5, zSlat5 - dzCh5), | |
980 | TGeoRotation("rot2",90,180+angle,90,90+angle,180,0) ); | |
d1cd2474 | 981 | |
e516b01d | 982 | if (i > 0) { |
983 | sprintf(idSlatCh9,"LE%d",kNslats5-1-i); | |
e856ab99 | 984 | detElemId = 913 + (i + kNslats5-1-6); |
e516b01d | 985 | gMC->Gsvolu(idSlatCh9,"BOX",kSlatMaterial,spar,3); |
986 | GetEnvelopes(8)->AddEnvelope(idSlatCh9, detElemId, true, TGeoTranslation(xSlat5, -ySlat5, -zSlat5 + dzCh5), | |
987 | TGeoRotation("rot3",90,angle,90,270+angle,180,0) ); | |
988 | ||
989 | sprintf(idSlatCh9,"LE%d",3*kNslats5-2-i); | |
e856ab99 | 990 | detElemId = 926 - (i + kNslats5-1-6); |
e516b01d | 991 | gMC->Gsvolu(idSlatCh9,"BOX",kSlatMaterial,spar,3); |
992 | GetEnvelopes(8)->AddEnvelope(idSlatCh9, detElemId, true, TGeoTranslation(-xSlat5, -ySlat5, zSlat5 - dzCh5), | |
993 | TGeoRotation("rot4",90,180+angle,90,270+angle,0,0) ); | |
994 | } | |
995 | ||
996 | sprintf(idSlatCh10,"LF%d",kNslats5-1+i); | |
e856ab99 | 997 | detElemId = 1013 - (i + kNslats5-1-6); |
e516b01d | 998 | gMC->Gsvolu(idSlatCh10,"BOX",kSlatMaterial,spar,3); |
999 | GetEnvelopes(9)->AddEnvelope(idSlatCh10, detElemId, true, TGeoTranslation(xSlat5, ySlat5, -zSlat5 + dzCh5), | |
1000 | TGeoRotation("rot5",90,angle,90,90+angle,0,0) ); | |
1001 | ||
1002 | sprintf(idSlatCh10,"LF%d",3*kNslats5-2+i); | |
e856ab99 | 1003 | detElemId = 1000 + (i + kNslats5-1-6); |
e516b01d | 1004 | gMC->Gsvolu(idSlatCh10,"BOX",kSlatMaterial,spar,3); |
1005 | GetEnvelopes(9)->AddEnvelope(idSlatCh10, detElemId, true, TGeoTranslation(-xSlat5, ySlat5, zSlat5 - dzCh5), | |
1006 | TGeoRotation("rot6",90,180+angle,90,90+angle,180,0) ); | |
1007 | ||
1008 | if (i > 0) { | |
1009 | sprintf(idSlatCh10,"LF%d",kNslats5-1-i); | |
e856ab99 | 1010 | detElemId = 1013 + (i + kNslats5-1-6); |
e516b01d | 1011 | gMC->Gsvolu(idSlatCh10,"BOX",kSlatMaterial,spar,3); |
1012 | GetEnvelopes(9)->AddEnvelope(idSlatCh10, detElemId, true, TGeoTranslation(xSlat5, -ySlat5, -zSlat5 + dzCh5), | |
1013 | TGeoRotation("rot7",90,angle,90,270+angle,180,0) ); | |
1014 | sprintf(idSlatCh10,"LF%d",3*kNslats5-2-i); | |
e856ab99 | 1015 | detElemId = 1026 - (i + kNslats5-1-6); |
e516b01d | 1016 | gMC->Gsvolu(idSlatCh10,"BOX",kSlatMaterial,spar,3); |
1017 | GetEnvelopes(9)->AddEnvelope(idSlatCh10, detElemId, true, TGeoTranslation(-xSlat5, -ySlat5, zSlat5 - dzCh5), | |
1018 | TGeoRotation("rot8",90,180+angle,90,270+angle,0,0) ); | |
1019 | } | |
1020 | } | |
1021 | ||
1022 | // create the panel volume | |
d12a7158 | 1023 | |
e516b01d | 1024 | gMC->Gsvolu("S09C","BOX",kCarbonMaterial,panelpar,3); |
1025 | gMC->Gsvolu("S10C","BOX",kCarbonMaterial,panelpar,3); | |
1026 | ||
1027 | // create the nomex volume | |
1028 | ||
1029 | gMC->Gsvolu("S09N","BOX",kNomexMaterial,nomexpar,3); | |
1030 | gMC->Gsvolu("S10N","BOX",kNomexMaterial,nomexpar,3); | |
d1cd2474 | 1031 | |
d1cd2474 | 1032 | |
e516b01d | 1033 | // create the nomex volume (bulk) |
d1cd2474 | 1034 | |
e516b01d | 1035 | gMC->Gsvolu("S09X","BOX",kNomexBMaterial,nomexbpar,3); |
1036 | gMC->Gsvolu("S10X","BOX",kNomexBMaterial,nomexbpar,3); | |
d1cd2474 | 1037 | |
e516b01d | 1038 | // create the insulating material volume |
d1cd2474 | 1039 | |
e516b01d | 1040 | gMC->Gsvolu("S09I","BOX",kInsuMaterial,insupar,3); |
1041 | gMC->Gsvolu("S10I","BOX",kInsuMaterial,insupar,3); | |
c3b69531 | 1042 | |
e516b01d | 1043 | // create the PCB volume |
1044 | ||
1045 | gMC->Gsvolu("S09P","BOX",kPcbMaterial,pcbpar,3); | |
1046 | gMC->Gsvolu("S10P","BOX",kPcbMaterial,pcbpar,3); | |
d1cd2474 | 1047 | |
e516b01d | 1048 | // create the sensitive volumes, |
1049 | ||
1050 | gMC->Gsvolu("S09G","BOX",kSensMaterial,dum,0); | |
1051 | gMC->Gsvolu("S10G","BOX",kSensMaterial,dum,0); | |
1052 | ||
1053 | // create the vertical frame volume | |
1054 | ||
1055 | gMC->Gsvolu("S09V","BOX",kVframeMaterial,vFramepar,3); | |
1056 | gMC->Gsvolu("S10V","BOX",kVframeMaterial,vFramepar,3); | |
1057 | ||
1058 | // create the horizontal frame volume | |
1059 | ||
1060 | gMC->Gsvolu("S09H","BOX",kHframeMaterial,hFramepar,3); | |
1061 | gMC->Gsvolu("S10H","BOX",kHframeMaterial,hFramepar,3); | |
1062 | ||
1063 | // create the horizontal border volume | |
1064 | ||
1065 | gMC->Gsvolu("S09B","BOX",kBframeMaterial,bFramepar,3); | |
1066 | gMC->Gsvolu("S10B","BOX",kBframeMaterial,bFramepar,3); | |
1067 | ||
1068 | index = 0; | |
1069 | for (i = 0; i < kNslats5; i++){ | |
1070 | for (Int_t quadrant = 1; quadrant <= 4; quadrant++) { | |
1071 | ||
1072 | if (i == 0 && quadrant == 2) continue; | |
1073 | if (i == 0 && quadrant == 4) continue; | |
1074 | ||
1075 | sprintf(idSlatCh9,"LE%d",ConvertSlatNum(i,quadrant,kNslats5-1)); | |
1076 | sprintf(idSlatCh10,"LF%d",ConvertSlatNum(i,quadrant,kNslats5-1)); | |
1077 | Float_t xvFrame = (slatLength5[i] - kVframeLength)/2.; // ok | |
1078 | ||
1079 | // position the vertical frames (spacers) | |
1080 | if (i != 1) { | |
1081 | GetEnvelopes(8)->AddEnvelopeConstituent("S09V", idSlatCh9, (2*i-1)*10+quadrant,TGeoTranslation(xvFrame,0.,0.)); | |
1082 | GetEnvelopes(8)->AddEnvelopeConstituent("S09V", idSlatCh9, (2*i)*10+quadrant,TGeoTranslation(-xvFrame,0.,0.)); | |
1083 | GetEnvelopes(9)->AddEnvelopeConstituent("S10V", idSlatCh10, (2*i-1)*10+quadrant,TGeoTranslation(xvFrame,0.,0.)); | |
1084 | GetEnvelopes(9)->AddEnvelopeConstituent("S10V", idSlatCh10, (2*i)*10+quadrant,TGeoTranslation(-xvFrame,0.,0.)); | |
1085 | } else { // no rounded spacer yet | |
1086 | GetEnvelopes(8)->AddEnvelopeConstituent("S09V", idSlatCh9, (2*i-1)*10+quadrant,TGeoTranslation(xvFrame,0.,0.)); | |
1087 | // GetEnvelopes(8)->AddEnvelopeConstituent("S09V", idSlatCh9, (2*i)*10+quadrant,TGeoTranslation(-xvFrame,0.,0.)); | |
1088 | GetEnvelopes(9)->AddEnvelopeConstituent("S10V", idSlatCh10, (2*i-1)*10+quadrant,TGeoTranslation(xvFrame,0.,0.)); | |
1089 | // GetEnvelopes(9)->AddEnvelopeConstituent("S10V", idSlatCh10, (2*i)*10+quadrant,TGeoTranslation(-xvFrame,0.,0.)); | |
1090 | } | |
1091 | ||
1092 | // position the panels and the insulating material | |
1093 | for (j = 0; j < kNPCB5[i]; j++){ | |
1094 | if (i == 1 && j == 0) continue; | |
1095 | index++; | |
1096 | Float_t xx = kSensLength * (-kNPCB5[i]/2.+j+.5); | |
1097 | ||
1098 | Float_t zPanel = spar[2] - nomexbpar[2]; | |
1099 | GetEnvelopes(8)->AddEnvelopeConstituent("S09X", idSlatCh9, 2*index-1,TGeoTranslation(xx,0.,zPanel)); | |
1100 | GetEnvelopes(8)->AddEnvelopeConstituent("S09X", idSlatCh9, 2*index,TGeoTranslation(xx,0.,-zPanel)); | |
1101 | GetEnvelopes(8)->AddEnvelopeConstituent("S09I", idSlatCh9, index,TGeoTranslation(xx,0.,0.)); | |
1102 | ||
1103 | GetEnvelopes(9)->AddEnvelopeConstituent("S10X", idSlatCh10, 2*index-1,TGeoTranslation(xx,0.,zPanel)); | |
1104 | GetEnvelopes(9)->AddEnvelopeConstituent("S10X", idSlatCh10, 2*index,TGeoTranslation(xx,0.,-zPanel)); | |
1105 | GetEnvelopes(9)->AddEnvelopeConstituent("S10I", idSlatCh10, index,TGeoTranslation(xx,0.,0.)); | |
1106 | } | |
1107 | } | |
1108 | } | |
1109 | ||
1110 | // position the nomex volume inside the panel volume | |
1111 | gMC->Gspos("S09N",1,"S09C",0.,0.,0.,0,"ONLY"); | |
1112 | gMC->Gspos("S10N",1,"S10C",0.,0.,0.,0,"ONLY"); | |
1113 | ||
1114 | // position panel volume inside the bulk nomex material volume | |
1115 | gMC->Gspos("S09C",1,"S09X",0.,0.,kNomexBWidth/2.,0,"ONLY"); | |
1116 | gMC->Gspos("S10C",1,"S10X",0.,0.,kNomexBWidth/2.,0,"ONLY"); | |
1117 | ||
1118 | // position the PCB volume inside the insulating material volume | |
1119 | gMC->Gspos("S09P",1,"S09I",0.,0.,0.,0,"ONLY"); | |
1120 | gMC->Gspos("S10P",1,"S10I",0.,0.,0.,0,"ONLY"); | |
1121 | ||
1122 | // position the horizontal frame volume inside the PCB volume | |
1123 | gMC->Gspos("S09H",1,"S09P",0.,0.,0.,0,"ONLY"); | |
1124 | gMC->Gspos("S10H",1,"S10P",0.,0.,0.,0,"ONLY"); | |
1125 | ||
1126 | // position the sensitive volume inside the horizontal frame volume | |
1127 | gMC->Gsposp("S09G",1,"S09H",0.,0.,0.,0,"ONLY",senspar,3); | |
1128 | gMC->Gsposp("S10G",1,"S10H",0.,0.,0.,0,"ONLY",senspar,3); | |
1129 | ||
1130 | // position the border volumes inside the PCB volume | |
1131 | Float_t yborder = ( kPcbHeight - kBframeHeight ) / 2.; | |
1132 | gMC->Gspos("S09B",1,"S09P",0., yborder,0.,0,"ONLY"); | |
1133 | gMC->Gspos("S09B",2,"S09P",0.,-yborder,0.,0,"ONLY"); | |
1134 | gMC->Gspos("S10B",1,"S10P",0., yborder,0.,0,"ONLY"); | |
1135 | gMC->Gspos("S10B",2,"S10P",0.,-yborder,0.,0,"ONLY"); | |
1136 | ||
1137 | // // create the NULOC volume and position it in the horizontal frame | |
1138 | ||
1139 | gMC->Gsvolu("S09E","BOX",kNulocMaterial,nulocpar,3); | |
1140 | gMC->Gsvolu("S10E","BOX",kNulocMaterial,nulocpar,3); | |
1141 | index = 0; | |
1142 | for (xx = -xxmax; xx <= xxmax; xx += 2*kNulocLength) { | |
1143 | index++; | |
1144 | gMC->Gspos("S09E",2*index-1,"S09B", xx, 0.,-kBframeWidth/2. + kNulocWidth/2, 0, "ONLY"); | |
1145 | gMC->Gspos("S09E",2*index ,"S09B", xx, 0., kBframeWidth/2. - kNulocWidth/2, 0, "ONLY"); | |
1146 | gMC->Gspos("S10E",2*index-1,"S10B", xx, 0.,-kBframeWidth/2. + kNulocWidth/2, 0, "ONLY"); | |
1147 | gMC->Gspos("S10E",2*index ,"S10B", xx, 0., kBframeWidth/2. - kNulocWidth/2, 0, "ONLY"); | |
1148 | } | |
1149 | ||
d1cd2474 | 1150 | |
e516b01d | 1151 | // position the volumes approximating the circular section of the pipe |
1152 | Float_t epsilon = 0.001; | |
1153 | Int_t ndiv = 10; | |
1154 | Int_t imax = 1; | |
1155 | Double_t divpar[3]; | |
1156 | Double_t dydiv = kSensHeight/ndiv; | |
1157 | Double_t ydiv = (kSensHeight - dydiv)/2.; | |
f4a7360f | 1158 | Float_t rmin = iChamber1->RInner(); |
e516b01d | 1159 | Float_t xdiv = 0.; |
1160 | Float_t xvol; | |
1161 | Float_t yvol; | |
1162 | ||
1163 | for (Int_t idiv = 0; idiv < ndiv; idiv++){ | |
1164 | ydiv += dydiv; | |
1165 | xdiv = 0.; | |
6f7aa53f | 1166 | if (ydiv < rmin) xdiv = rmin * TMath::Sin( TMath::ACos((ydiv-dydiv/2.)/rmin) ); |
e516b01d | 1167 | divpar[0] = (kPcbLength - xdiv)/2.; |
1168 | divpar[1] = dydiv/2. - epsilon; | |
1169 | divpar[2] = kSensWidth/2.; | |
1170 | xvol = (kPcbLength + xdiv)/2.; | |
1171 | yvol = ydiv; | |
1172 | ||
1173 | for (Int_t quadrant = 1; quadrant <= 4; quadrant++) { | |
1174 | sprintf(idSlatCh9,"LE%d",ConvertSlatNum(1,quadrant,kNslats5-1)); | |
1175 | sprintf(idSlatCh10,"LF%d",ConvertSlatNum(1,quadrant,kNslats5-1)); | |
1176 | ||
1177 | GetEnvelopes(8)->AddEnvelopeConstituentParam("S09G", idSlatCh9, quadrant*100+imax+4*idiv+1, | |
1178 | TGeoTranslation(xvol-kPcbLength * kNPCB5[1]/2.,yvol-kPcbLength,0.),3,divpar); | |
1179 | GetEnvelopes(9)->AddEnvelopeConstituentParam("S10G", idSlatCh10, quadrant*100+imax+4*idiv+1, | |
1180 | TGeoTranslation(xvol-kPcbLength * kNPCB5[1]/2.,yvol-kPcbLength,0.),3,divpar); | |
1181 | } | |
d1cd2474 | 1182 | } |
e516b01d | 1183 | // cout << "Geometry for Station 5...... done" << endl; |
1184 | ||
1185 | } | |
d1cd2474 | 1186 | } |
1187 | ||
1188 | ||
1189 | //______________________________________________________________________________ | |
1190 | void AliMUONSlatGeometryBuilder::SetTransformations() | |
1191 | { | |
1192 | // Defines the transformations for the station2 chambers. | |
1193 | // --- | |
1194 | ||
e118b27e | 1195 | AliMUONChamber* iChamber1 = &fMUON->Chamber(4); |
d1cd2474 | 1196 | Double_t zpos1 = - iChamber1->Z(); |
1197 | iChamber1->GetGeometry() | |
1198 | ->SetTranslation(TGeoTranslation(0., 0., zpos1)); | |
1199 | ||
e118b27e | 1200 | AliMUONChamber* iChamber2 = &fMUON->Chamber(5); |
d1cd2474 | 1201 | Double_t zpos2 = - iChamber2->Z(); |
1202 | iChamber2->GetGeometry() | |
1203 | ->SetTranslation(TGeoTranslation(0., 0., zpos2)); | |
1204 | ||
e118b27e | 1205 | iChamber1 = &fMUON->Chamber(6); |
d1cd2474 | 1206 | zpos1 = - iChamber1->Z(); |
1207 | iChamber1->GetGeometry() | |
1208 | ->SetTranslation(TGeoTranslation(0., 0., zpos1)); | |
1209 | ||
e118b27e | 1210 | iChamber2 = &fMUON->Chamber(7); |
d1cd2474 | 1211 | zpos2 = - iChamber2->Z(); |
1212 | iChamber2->GetGeometry() | |
1213 | ->SetTranslation(TGeoTranslation(0., 0., zpos2)); | |
1214 | ||
e118b27e | 1215 | iChamber1 = &fMUON->Chamber(8); |
d1cd2474 | 1216 | zpos1 = - iChamber1->Z(); |
1217 | iChamber1->GetGeometry() | |
1218 | ->SetTranslation(TGeoTranslation(0., 0., zpos1)); | |
1219 | ||
e118b27e | 1220 | iChamber2 = &fMUON->Chamber(9); |
d1cd2474 | 1221 | zpos2 = - iChamber2->Z(); |
1222 | iChamber2->GetGeometry() | |
1223 | ->SetTranslation(TGeoTranslation(0., 0., zpos2)); | |
1224 | ||
1225 | } | |
1226 | ||
1227 | //______________________________________________________________________________ | |
1228 | void AliMUONSlatGeometryBuilder::SetSensitiveVolumes() | |
1229 | { | |
1230 | // Defines the sensitive volumes for slat stations chambers. | |
1231 | // --- | |
1232 | ||
e118b27e | 1233 | GetGeometry(4)->SetSensitiveVolume("S05G"); |
1234 | GetGeometry(5)->SetSensitiveVolume("S06G"); | |
1235 | GetGeometry(6)->SetSensitiveVolume("S07G"); | |
1236 | GetGeometry(7)->SetSensitiveVolume("S08G"); | |
1237 | GetGeometry(8)->SetSensitiveVolume("S09G"); | |
1238 | GetGeometry(9)->SetSensitiveVolume("S10G"); | |
d1cd2474 | 1239 | } |
1240 | ||
1241 | //______________________________________________________________________________ | |
1242 | Int_t AliMUONSlatGeometryBuilder::ConvertSlatNum(Int_t numslat, Int_t quadnum, Int_t fspq) const | |
1243 | { | |
2057e0cc | 1244 | // On-line function establishing the correspondance between numslat (the slat number on a particular quadrant (numslat->0....4 for St3)) |
1245 | // and slatnum (the slat number on the whole panel (slatnum->1...18 for St3) | |
c10e6eaf | 1246 | numslat += 1; |
1247 | if (quadnum==2 || quadnum==3) | |
1248 | numslat += fspq; | |
1249 | else | |
1250 | numslat = fspq + 2-numslat; | |
1251 | numslat -= 1; | |
d1cd2474 | 1252 | |
c10e6eaf | 1253 | if (quadnum==3 || quadnum==4) numslat += 2*fspq+1; |
1254 | ||
1255 | return numslat; | |
d1cd2474 | 1256 | } |