Fix coverity defect
[u/mrichter/AliRoot.git] / MUON / AliMUONTriggerGeometryBuilder.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$
d1525c79 17
3d1463c8 18//-----------------------------------------------------------------------------
19/// Class AliMUONTriggerGeometryBuilder
d1cd2474 20// -----------------------------------
d1525c79 21// MUON Trigger stations geometry
22// construction class.
23// Author: Philippe Crochet (LPCCFd)
30efacae 24// Support for trigger chambers added April 07 by Enrico Scomparin (INFN To)
3d1463c8 25//-----------------------------------------------------------------------------
d1cd2474 26
27#include <TVirtualMC.h>
28#include <TGeoMatrix.h>
c93255fe 29#include <TArrayI.h>
d1cd2474 30
e118b27e 31#include "AliLog.h"
c0404a6c 32#include "AliRun.h"
e118b27e 33
d1cd2474 34#include "AliMUONTriggerGeometryBuilder.h"
35#include "AliMUON.h"
b7ef3c96 36#include "AliMUONConstants.h"
e118b27e 37#include "AliMUONGeometryModule.h"
a432117a 38#include "AliMUONGeometryEnvelopeStore.h"
d1cd2474 39
5398f946 40/// \cond CLASSIMP
d1cd2474 41ClassImp(AliMUONTriggerGeometryBuilder)
5398f946 42/// \endcond
d1cd2474 43
0a31b522 44// vertical gap between right and left chambers (kDXZERO*2=4cm)
45const Float_t AliMUONTriggerGeometryBuilder::fgkDXZERO=2.;
46// main distances for chamber definition in first plane/first station
47const Float_t AliMUONTriggerGeometryBuilder::fgkXMIN=34.;
48const Float_t AliMUONTriggerGeometryBuilder::fgkXMED=51.;
49const Float_t AliMUONTriggerGeometryBuilder::fgkXMAX=255.;
50// 090704 fgkXMAX changed from 272 to 255.
51// (see fig.2-4 & 2-5 of Local Trigger Board PRR)
52// segmentation updated accordingly
53const Float_t AliMUONTriggerGeometryBuilder::fgkYMIN=34.;
54const Float_t AliMUONTriggerGeometryBuilder::fgkYMAX=51.;
55// inner/outer radius of flange between beam shield. and chambers (1/station)
56//const Float_t AliMUONTriggerGeometryBuilder::fgkRMIN[2]={50.,50.};
57//const Float_t AliMUONTriggerGeometryBuilder::fgkRMAX[2]={64.,68.};
58// z position of the middle of the gas gap in mother vol
59const Float_t AliMUONTriggerGeometryBuilder::fgkZm=-3.6;
60const Float_t AliMUONTriggerGeometryBuilder::fgkZp=+3.6;
61
62// y positions of vertical supports
63const Float_t AliMUONTriggerGeometryBuilder::fgkYVSup[4]={61.45,122.45,192.95,236.95};
64// dimensions of vertical supports
65const Float_t AliMUONTriggerGeometryBuilder::fgkSizeVSupExt[3]={1.5,1.5,306.+5.};
66const Float_t AliMUONTriggerGeometryBuilder::fgkSizeVSupInt[3]={1.2,1.2,306.+5.};
67// transverse dimensions of angular supports
68const Float_t AliMUONTriggerGeometryBuilder::fgkSizeSupport1V[3]={0.,1.5,0.1};
69const Float_t AliMUONTriggerGeometryBuilder::fgkSizeSupport1H[3]={0.,0.1,1.15}; // z should be 1.4 in the installed set-up
70const Float_t AliMUONTriggerGeometryBuilder::fgkSizeSupport2V[3]={0.,3.0,0.1};
71const Float_t AliMUONTriggerGeometryBuilder::fgkSizeSupport2H[3]={0.,0.1,1.9};
72const Float_t AliMUONTriggerGeometryBuilder::fgkSizeSupportXV[3]={0.,1.25,0.25};
73const Float_t AliMUONTriggerGeometryBuilder::fgkSizeSupportXH[3]={0.,0.25,1.5};
74// transverse dimensions of horizontal cable supports
75const Float_t AliMUONTriggerGeometryBuilder::fgkSizeSupportCable[3]={0.,2.,3.};
76// dimensions of gas pipes (inner and outer radius)
77const Float_t AliMUONTriggerGeometryBuilder::fgkSizeGasPipe[3]={0.2,0.4,0.};
78// Position of gas pipe with respect to angular support
79const Float_t AliMUONTriggerGeometryBuilder::fgkOffsetGasPipe=0.75;
80// Small cut on some volumes to avoid extrusion from SC1x
81const Float_t AliMUONTriggerGeometryBuilder::fgkAvoidExtrusion=2.9;
82
d1cd2474 83//______________________________________________________________________________
84AliMUONTriggerGeometryBuilder::AliMUONTriggerGeometryBuilder(AliMUON* muon)
cf19fcc5 85 : AliMUONVGeometryBuilder(16, 4),
0a31b522 86 fMUON(muon),
87 fIdtmed(0),
88 fIdAir(0),
89 fIdAlu1(0),
90 fIdInox(0),
91 fYEnvPsave(0.),
92 fYEnvMsave(0.),
93 fDYsave(0.),
94 fDXsave(0.),
95 fRsupportpipe()
d1cd2474 96{
71a2d3aa 97/// Standard constructor
0a31b522 98 fRsupportpipe.SetAngles(90.,90.,0.);
d1cd2474 99}
100
101//______________________________________________________________________________
102AliMUONTriggerGeometryBuilder::AliMUONTriggerGeometryBuilder()
103 : AliMUONVGeometryBuilder(),
0a31b522 104 fMUON(0),
105 fIdtmed(0),
106 fIdAir(0),
107 fIdAlu1(0),
108 fIdInox(0),
109 fYEnvPsave(0.),
110 fYEnvMsave(0.),
111 fDYsave(0.),
112 fDXsave(0.),
113 fRsupportpipe()
d1cd2474 114{
71a2d3aa 115/// Default constructor
d1cd2474 116}
117
d1cd2474 118//______________________________________________________________________________
71a2d3aa 119AliMUONTriggerGeometryBuilder::~AliMUONTriggerGeometryBuilder()
120{
121/// Destructor
d1cd2474 122}
123
0a31b522 124//______________________________________________________________________________
125TString AliMUONTriggerGeometryBuilder::GetVolumeName(const TString& volume, Int_t icount) const
126{
127// Function to generate a short volume name from its long variant
128
129 if ( volume == "volAlu" ) {
130 char volAlu[5]; // Alu
131 snprintf(volAlu,5,"SC%dA",icount+1);
132 return volAlu;
133 }
134 else if ( volume == "volAluSupportH") {
135 char volAluSupportH[6];
136 snprintf(volAluSupportH,6,"SALH%d",icount+1);
137 return volAluSupportH;
138 }
139 else if ( volume == "volAirSupportH") {
140 char volAirSupportH[6];
141 snprintf(volAirSupportH,6,"SAIH%d",icount+1);
142 return volAirSupportH;
143 }
144 else if ( volume == "volInoxGasPipe") {
145 char volInoxGasPipe[7];
146 snprintf(volInoxGasPipe,7,"SPINO%d",icount+1);
147 return volInoxGasPipe;
148 }
149
150 AliErrorStream() << "Volume " << volume << " name is not defined." << endl;
151 return "";
152}
d1cd2474 153
154//______________________________________________________________________________
0a31b522 155TString AliMUONTriggerGeometryBuilder::GetVolEnvName(Int_t icount, Int_t ienv) const
d1cd2474 156{
0a31b522 157/// Compose envelope names as:
158/// S0R1, S0R2, ..., S0R9, S0L1, S0L2, ..., S0L9
159/// where ienv = 0, .., 17
160
161 TString name = "S";
162 name += icount;
163 if ( ienv < 9 ) {
164 name += "R";
165 name += (ienv + 1);
166 }
167 else {
168 name += "L";
169 name += (ienv - 8) ;
170 }
171 return name;
172}
d1cd2474 173
0a31b522 174//______________________________________________________________________________
175TString AliMUONTriggerGeometryBuilder::GetVolAluAngSuppName(
176 const TString& type1234X,
177 const TString& typeHV,
178 Int_t icount) const
179{
180/// Utility function to generate volume name
181
182 TString name = "SA";
183 name += type1234X;
184 name += typeHV;
185 name += icount+1;
186 return name;
187}
30efacae 188
0a31b522 189//______________________________________________________________________________
190TString AliMUONTriggerGeometryBuilder::GetVolEnvSuppAngName(
191 const TString& type1234X,
192 const TString& typeHV,
193 const TString& typeABDEF,
194 Int_t icount, Int_t ivol) const
195{
196/// Utility function to generate volume name
eb571c25 197
0a31b522 198 TString name = "S";
199 name += typeHV;
200 name += type1234X;
201 name += icount+1;
202 name += typeABDEF;
203 name += ivol;
204 return name;
205}
43adb63d 206
0a31b522 207//______________________________________________________________________________
208TString AliMUONTriggerGeometryBuilder::GetVolEnvInoxGasPipeName(
209 const TString& type12,
210 const TString& typeABCDEF,
211 Int_t icount, Int_t ivol) const
212{
213/// Utility function to generate volume name
43adb63d 214
0a31b522 215 TString name = "SP";
216 name += type12;
217 name += icount+1;
218 name += typeABCDEF;
219 name += ivol;
220 return name;
221}
43adb63d 222
0a31b522 223//______________________________________________________________________________
224void AliMUONTriggerGeometryBuilder::BuildChamberPrototype(Int_t icount) const
225{
226/// Build chamber prototype
d1cd2474 227
0a31b522 228 Float_t tpar[3];
229 tpar[0]= 0.;
230 tpar[1]= 0.;
231 tpar[2]= 0.;
232 char volBak[5]; // Bakelite
233 char volGaz[5]; // Gas streamer
234 snprintf(volBak,5,"SB%dA",icount+1);
235 snprintf(volGaz,5,"S%dG",icount+11);
236 gMC->Gsvolu(GetVolumeName("volAlu", icount),"BOX",fIdAlu1,tpar,0); // Al
237 gMC->Gsvolu(volBak,"BOX",fIdtmed[1107],tpar,0); // Bakelite
238 gMC->Gsvolu(volGaz,"BOX",fIdtmed[1106],tpar,0); // Gas streamer
239 tpar[0] = -1.;
240 tpar[1] = -1.;
241 tpar[2] = 0.1;
242 gMC->Gsposp(volGaz,1,volBak,0.,0.,0.,0,"ONLY",tpar,3);
243 tpar[2] = 0.3;
244 gMC->Gsposp(volBak,1,GetVolumeName("volAlu", icount),0.,0.,0.,0,"ONLY",tpar,3);
245}
d1cd2474 246
0a31b522 247//______________________________________________________________________________
248void AliMUONTriggerGeometryBuilder::BuildRPCSupportsVertical(Int_t& iVolNum, Int_t icount) const
249{
250/// Build RPC vertical supports
251
252 Float_t zRatio = AliMUONConstants::DefaultRatioTriggerChamber(icount);
253 char volAluSupport[5],volAirSupport[5];
254 snprintf(volAluSupport,5,"SAL%d",icount+1);
255 snprintf(volAirSupport,5,"SAI%d",icount+1);
256 char volEnvSupport[12][7];
257 for(Int_t ii=0;ii<8;ii++){
258 snprintf(volEnvSupport[ii],7,"SEA%dV%d",icount+1,ii);
259 }
260 Float_t tpar[3];
261 tpar[0]= 0.;
262 tpar[1]= 0.;
263 tpar[2]= 0.;
264 gMC->Gsvolu(volAluSupport,"BOX",fIdAlu1,tpar,0);
265 gMC->Gsvolu(volAirSupport,"BOX",fIdAir,tpar,0);
266 tpar[0]=fgkSizeVSupInt[0];
267 tpar[1]=fgkSizeVSupInt[1];
268 tpar[2]=-1.;
269 gMC->Gsposp(volAirSupport,1,volAluSupport,0.,0.,0.,0,"ONLY",tpar,3);
270
271 TGeoRotation rsupportv;
272 rsupportv.SetAngles(0.,90.,0.);
273 Double_t dpar[3];
274 dpar[0]=fgkSizeVSupExt[0];
275 dpar[1]=fgkSizeVSupExt[1];
276 dpar[2]=fgkSizeVSupExt[2]*zRatio;
277 for(Int_t ii=0;ii<4;ii++){
278 GetEnvelopes(16+icount)->AddEnvelope(volEnvSupport[ii], 0, true,
279 TGeoTranslation(-fgkYVSup[ii]*zRatio,0.,0.),rsupportv);
280 GetEnvelopes(16+icount)
281 ->AddEnvelopeConstituentParam(volAluSupport,volEnvSupport[ii],iVolNum++,3, dpar);
282 }
283 for(Int_t ii=4;ii<8;ii++){
284 GetEnvelopes(16+icount)->AddEnvelope(volEnvSupport[ii], 0, true,
285 TGeoTranslation(fgkYVSup[ii-4]*zRatio,0.,0.),rsupportv);
286 GetEnvelopes(16+icount)
287 ->AddEnvelopeConstituentParam(volAluSupport,volEnvSupport[ii],iVolNum++,3, dpar);
288 }
289}
290
291//______________________________________________________________________________
292void AliMUONTriggerGeometryBuilder::BuildRPCSupportsHorizontal(Int_t icount) const
293{
294/// Build RPC horizontal supports
30efacae 295
30efacae 296// RPC supports (horizontal)
297
298// supports for cables
30efacae 299
0a31b522 300 Float_t tpar[3];
301 tpar[0]= 0.;
302 tpar[1]= 0.;
303 tpar[2]= 0.;
304 TString volAluSupportH = GetVolumeName("volAluSupportH", icount);
305 TString volAirSupportH = GetVolumeName("volAirSupportH", icount);
306 gMC->Gsvolu(volAluSupportH,"BOX",fIdAlu1,tpar,0);
307 gMC->Gsvolu(volAirSupportH,"BOX",fIdAir,tpar,0);
308 tpar[0]=-1.;
309 tpar[1]=1.9;
310 tpar[2]=2.8;
311 gMC->Gsposp(volAirSupportH,1,volAluSupportH,0.,0.,0.,0,"ONLY",tpar,3);
312}
d1cd2474 313
0a31b522 314//______________________________________________________________________________
315void AliMUONTriggerGeometryBuilder::BuildAngularSupportForChambers(Int_t icount) const
316{
317/// Build angular supports for chambers
318
319 Float_t tpar[3];
320 tpar[0]= 0.;
321 tpar[1]= 0.;
322 tpar[2]= 0.;
323 gMC->Gsvolu(GetVolAluAngSuppName("1","V",icount),"BOX",fIdAlu1,tpar,0);
324 gMC->Gsvolu(GetVolAluAngSuppName("1","H",icount),"BOX",fIdAlu1,tpar,0);
325 gMC->Gsvolu(GetVolAluAngSuppName("2","V",icount),"BOX",fIdAlu1,tpar,0);
326 gMC->Gsvolu(GetVolAluAngSuppName("2","H",icount),"BOX",fIdAlu1,tpar,0);
327 gMC->Gsvolu(GetVolAluAngSuppName("3","V",icount),"BOX",fIdAlu1,tpar,0);
328 gMC->Gsvolu(GetVolAluAngSuppName("3","H",icount),"BOX",fIdAlu1,tpar,0);
329 gMC->Gsvolu(GetVolAluAngSuppName("4","V",icount),"BOX",fIdAlu1,tpar,0);
330 gMC->Gsvolu(GetVolAluAngSuppName("4","H",icount),"BOX",fIdAlu1,tpar,0);
331 gMC->Gsvolu(GetVolAluAngSuppName("X","V",icount),"BOX",fIdAlu1,tpar,0);
332 gMC->Gsvolu(GetVolAluAngSuppName("X","H",icount),"BOX",fIdAlu1,tpar,0);
333}
30efacae 334
0a31b522 335//______________________________________________________________________________
336void AliMUONTriggerGeometryBuilder::BuildGasPipes(Int_t icount) const
337{
338/// Build gas pipes
339 TString volInoxGasPipe = GetVolumeName("volInoxGasPipe", icount);
340 Float_t tpar[3];
341 tpar[0]= 0.;
342 tpar[1]= 0.;
343 tpar[2]= 0.;
344 gMC->Gsvolu(volInoxGasPipe,"TUBE",fIdInox,tpar,0);
345}
346
347//______________________________________________________________________________
348void AliMUONTriggerGeometryBuilder::BuildChamberTypeA(Int_t& iVolNum, Int_t icount)
349{
350/// Build chamber type A and horizontal support
351
352 Double_t dpar[3];
353 Double_t spar[3];
354 Double_t ppar[3];
355
356// chamber type A
357 Float_t zRatio = AliMUONConstants::DefaultRatioTriggerChamber(icount);
358 Float_t xEnv = (fgkDXZERO+fgkXMED+(fgkXMAX-fgkXMED)/2.)*zRatio;
359 Float_t yEnvM = 0.; // y low position of envelope in chamber
360 Float_t yEnvP = 0.; // y up position of envelope in chamber
361 fYEnvPsave = 0.; // tmp data
362 fYEnvMsave = 0.; // tmp data
363 //Float_t xpos = 0.; // x position of RPC in envelope
364 //Float_t ypos = 0.; // y position of RPC in envelope
365 dpar[2] = 0.4;
366 dpar[0] = ((fgkXMAX-fgkXMED)/2.)*zRatio;
367 dpar[1] = fgkYMIN * zRatio;
368
369 Int_t detElemId = (10+icount+1)*100;
370 TString volEnv4 = GetVolEnvName(icount, 4);
371 TString volEnv13 = GetVolEnvName(icount, 13);
372 GetEnvelopes(16+icount)->AddEnvelope(volEnv4, detElemId, true,
373 TGeoTranslation(xEnv,yEnvP,fgkZp));
374 detElemId = (10+icount+1)*100+9;
375 GetEnvelopes(16+icount)->AddEnvelope(volEnv13, detElemId, true,
376 TGeoTranslation(-xEnv,yEnvM,fgkZm),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
377
378 TString volAlu = GetVolumeName("volAlu", icount);
379 GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAlu,volEnv4,iVolNum++,3, dpar);
380 GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAlu,volEnv13,iVolNum++,3, dpar);
381
382// horizontal cable support chamber type A
383 char volEnvSupportHA[6][8];
384 for(Int_t jj=0;jj<2;jj++){
385 for(Int_t ii=0;ii<6;ii++){
386 if(ii<3)snprintf(volEnvSupportHA[3*jj+ii],8,"SA%dHA%d",icount+1,3*jj+ii);
387 }
388 }
389
390 spar[0]=((fgkXMAX/2)-fgkYVSup[0]/2.)*zRatio;
391 spar[1]=fgkSizeSupportCable[1];
392 spar[2]=fgkSizeSupportCable[2];
393 Float_t offsetSuppA = ((fgkXMAX-fgkXMED)/2.)*zRatio-(((fgkXMAX/2)-fgkYVSup[0]/2.)*zRatio);
394 for(Int_t in=0;in<3;in++){
395 GetEnvelopes(16+icount)->AddEnvelope(volEnvSupportHA[in], 0, true,
396 TGeoTranslation(xEnv+offsetSuppA/2.,yEnvP+dpar[1]/2.*(in-1),-(fgkSizeVSupExt[0]+spar[2])));
397 GetEnvelopes(16+icount)->AddEnvelope(volEnvSupportHA[in+3], 0, true,
398 TGeoTranslation(-(xEnv+offsetSuppA/2.),yEnvM+dpar[1]/2.*(in-1),fgkSizeVSupExt[0]+spar[2]),
399 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
400 }
401 for(Int_t ii=0;ii<6;ii++) {
402 TString volAluSupportH = GetVolumeName("volAluSupportH", icount);
403 GetEnvelopes(16+icount)
404 ->AddEnvelopeConstituentParam(volAluSupportH,volEnvSupportHA[ii],iVolNum++,3, spar);
405 }
406
407 spar[0]=dpar[0];
408 spar[1]=fgkSizeSupport1V[1];
409 spar[2]=fgkSizeSupport1V[2];
410 Float_t sparysave=spar[1];
411 TString volEnvSuppAng1VA0 = GetVolEnvSuppAngName("1", "V", "A", icount, 0);
412 TString volEnvSuppAng1VA1 = GetVolEnvSuppAngName("1", "V", "A", icount, 1);
413
414 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VA0, 0, true,
415 TGeoTranslation(xEnv,yEnvP-dpar[1],fgkZp+dpar[2]+spar[2]));
416 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VA1, 0, true,
417 TGeoTranslation(-xEnv,yEnvM-dpar[1],fgkZm-dpar[2]-spar[2]),
418 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
419
420 TString volAluAngSupport1V = GetVolAluAngSuppName("1", "V", icount);
421 GetEnvelopes(16+icount)
422 ->AddEnvelopeConstituentParam(volAluAngSupport1V,volEnvSuppAng1VA0,iVolNum++,3, spar);
423 GetEnvelopes(16+icount)
424 ->AddEnvelopeConstituentParam(volAluAngSupport1V,volEnvSuppAng1VA1,iVolNum++,3, spar);
30efacae 425
426// 1 horizontal
427
0a31b522 428 spar[0]=dpar[0];
429 spar[1]=fgkSizeSupport1H[1];
430 spar[2]=fgkSizeSupport1H[2];
431 TString volEnvSuppAng1HA0 = GetVolEnvSuppAngName("1", "H", "A", icount, 0);
432 TString volEnvSuppAng1HA1 = GetVolEnvSuppAngName("1", "H", "A", icount, 1);
433 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HA0, 0, true,
434 TGeoTranslation(xEnv,yEnvP-dpar[1]-sparysave,fgkZp+dpar[2]-spar[2]));
435 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HA1, 0, true,
436 TGeoTranslation(-xEnv,yEnvM-dpar[1]-sparysave,fgkZm-(dpar[2]-spar[2])),
437 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
438
439 TString volAluAngSupport1H = GetVolAluAngSuppName("1", "H", icount);
440 GetEnvelopes(16+icount)
441 ->AddEnvelopeConstituentParam(volAluAngSupport1H,volEnvSuppAng1HA0,iVolNum++,3, spar);
442 GetEnvelopes(16+icount)
443 ->AddEnvelopeConstituentParam(volAluAngSupport1H,volEnvSuppAng1HA1,iVolNum++,3, spar);
30efacae 444
445// gas pipe (low)
0a31b522 446 ppar[0]=fgkSizeGasPipe[0];
447 ppar[1]=fgkSizeGasPipe[1];
448 ppar[2]=dpar[0];
449 TString volEnvInoxGasPipe1A0 = GetVolEnvInoxGasPipeName("1", "A", icount, 0);
450 TString volEnvInoxGasPipe1A1 = GetVolEnvInoxGasPipeName("1", "A", icount, 1);
451 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1A0, 0, true,
452 TGeoTranslation(xEnv,yEnvP-dpar[1]-sparysave-fgkOffsetGasPipe,fgkZp),fRsupportpipe);
453 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1A1, 0, true,
454 TGeoTranslation(-xEnv,yEnvM-dpar[1]-sparysave-fgkOffsetGasPipe,fgkZm),fRsupportpipe);
455 TString volInoxGasPipe = GetVolumeName("volInoxGasPipe", icount);
456 GetEnvelopes(16+icount)
457 ->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe1A0,iVolNum++,3, ppar);
458 GetEnvelopes(16+icount)
459 ->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe1A1,iVolNum++,3, ppar);
30efacae 460
461// 2 vertical
462
0a31b522 463 spar[0]=dpar[0];
464 spar[1]=fgkSizeSupport2V[1];
465 spar[2]=fgkSizeSupport2V[2];
466 sparysave=spar[1]+fgkSizeSupport2H[1];
467 TString volEnvSuppAng2VA0 = GetVolEnvSuppAngName("2", "V", "A", icount, 0);
468 TString volEnvSuppAng2VA1 = GetVolEnvSuppAngName("2", "V", "A", icount, 1);
469 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VA0, 0, true,
470 TGeoTranslation(xEnv,yEnvP-dpar[1],fgkSizeVSupExt[0]+spar[2]));
471 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VA1, 0, true,
472 TGeoTranslation(-xEnv,yEnvM-dpar[1],-(fgkSizeVSupExt[0]+spar[2])),
473 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
474
475 TString volAluAngSupport2V = GetVolAluAngSuppName("2", "V", icount);
476 GetEnvelopes(16+icount)
477 ->AddEnvelopeConstituentParam(volAluAngSupport2V,volEnvSuppAng2VA0,iVolNum++,3, spar);
478 GetEnvelopes(16+icount)
479 ->AddEnvelopeConstituentParam(volAluAngSupport2V,volEnvSuppAng2VA1,iVolNum++,3, spar);
30efacae 480
481// 2 horizontal
482
0a31b522 483 spar[0]=dpar[0];
484 spar[1]=fgkSizeSupport2H[1];
485 spar[2]=fgkSizeSupport2H[2];
486 TString volEnvSuppAng2HA0 = GetVolEnvSuppAngName("2", "H", "A", icount, 0);
487 TString volEnvSuppAng2HA1 = GetVolEnvSuppAngName("2", "H", "A", icount, 1);
488 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HA0, 0, true,
489 TGeoTranslation(xEnv,yEnvP-dpar[1]-sparysave,fgkSizeVSupExt[0]+spar[2]));
490 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HA1, 0, true,
491 TGeoTranslation(-xEnv,yEnvM-dpar[1]-sparysave,-(fgkSizeVSupExt[0]+spar[2])),
492 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
493
494 TString volAluAngSupport2H = GetVolAluAngSuppName("2", "H", icount);
495 GetEnvelopes(16+icount)
496 ->AddEnvelopeConstituentParam(volAluAngSupport2H,volEnvSuppAng2HA0,iVolNum++,3, spar);
497 GetEnvelopes(16+icount)
498 ->AddEnvelopeConstituentParam(volAluAngSupport2H,volEnvSuppAng2HA1,iVolNum++,3, spar);
30efacae 499
500// 3 vertical
501
0a31b522 502 spar[0]=dpar[0];
503 spar[1]=fgkSizeSupport1V[1];
504 spar[2]=fgkSizeSupport1V[2];
505 sparysave=spar[1];
506 TString volEnvSuppAng3VA0 = GetVolEnvSuppAngName("3", "V", "A", icount, 0);
507 TString volEnvSuppAng3VA1 = GetVolEnvSuppAngName("3", "V", "A", icount, 1);
508 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VA0, 0, true,
509 TGeoTranslation(xEnv,yEnvP+dpar[1],fgkZp+dpar[2]+spar[2]));
510 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VA1, 0, true,
511 TGeoTranslation(-xEnv,yEnvM+dpar[1],fgkZm-dpar[2]-spar[2]),
512 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
513
514 TString volAluAngSupport3V = GetVolAluAngSuppName("3", "V", icount);
515 GetEnvelopes(16+icount)
516 ->AddEnvelopeConstituentParam(volAluAngSupport3V,volEnvSuppAng3VA0,iVolNum++,3, spar);
517 GetEnvelopes(16+icount)
518 ->AddEnvelopeConstituentParam(volAluAngSupport3V,volEnvSuppAng3VA1,iVolNum++,3, spar);
30efacae 519
520// 3 horizontal
521
0a31b522 522 spar[0]=dpar[0];
523 spar[1]=fgkSizeSupport1H[1];
524 spar[2]=fgkSizeSupport1H[2];
525 TString volEnvSuppAng3HA0 = GetVolEnvSuppAngName("3", "H", "A", icount, 0);
526 TString volEnvSuppAng3HA1 = GetVolEnvSuppAngName("3", "H", "A", icount, 1);
527 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HA0, 0, true,
528 TGeoTranslation(xEnv,yEnvP+dpar[1]+sparysave,fgkZp+dpar[2]-spar[2]));
529 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HA1, 0, true,
530 TGeoTranslation(-xEnv,yEnvM+dpar[1]+sparysave,fgkZm-(dpar[2]-spar[2])),
531 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
532
533 TString volAluAngSupport3H = GetVolAluAngSuppName("3", "H", icount);
534 GetEnvelopes(16+icount)
535 ->AddEnvelopeConstituentParam(volAluAngSupport3H,volEnvSuppAng3HA0,iVolNum++,3, spar);
536 GetEnvelopes(16+icount)
537 ->AddEnvelopeConstituentParam(volAluAngSupport3H,volEnvSuppAng3HA1,iVolNum++,3, spar);
538
30efacae 539// gas pipe (high)
0a31b522 540 ppar[0]=fgkSizeGasPipe[0];
541 ppar[1]=fgkSizeGasPipe[1];
542 ppar[2]=dpar[0];
543 TString volEnvInoxGasPipe2A0 = GetVolEnvInoxGasPipeName("2", "A", icount, 0);
544 TString volEnvInoxGasPipe2A1 = GetVolEnvInoxGasPipeName("2", "A", icount, 1);
545 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2A0, 0, true,
546 TGeoTranslation(xEnv,yEnvP+dpar[1]+sparysave+fgkOffsetGasPipe,fgkZp),fRsupportpipe);
547 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2A1, 0, true,
548 TGeoTranslation(-xEnv,yEnvM+dpar[1]+sparysave+fgkOffsetGasPipe,fgkZm),fRsupportpipe);
549 GetEnvelopes(16+icount)
550 ->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe2A0,iVolNum++,3, ppar);
551 GetEnvelopes(16+icount)
552 ->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe2A1,iVolNum++,3, ppar);
30efacae 553
554// 4 vertical
555
0a31b522 556 spar[0]=dpar[0];
557 spar[1]=fgkSizeSupport2V[1];
558 spar[2]=fgkSizeSupport2V[2];
559 sparysave=spar[1]+fgkSizeSupport2H[1];
560 TString volEnvSuppAng4VA0 = GetVolEnvSuppAngName("4", "V", "A", icount, 0);
561 TString volEnvSuppAng4VA1 = GetVolEnvSuppAngName("4", "V", "A", icount, 1);
562 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VA0, 0, true,
563 TGeoTranslation(xEnv,yEnvP+dpar[1],fgkSizeVSupExt[0]+spar[2]));
564 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VA1, 0, true,
565 TGeoTranslation(-xEnv,yEnvM+dpar[1],-(fgkSizeVSupExt[0]+spar[2])),
566 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
567
568 TString volAluAngSupport4V = GetVolAluAngSuppName("4", "V", icount);
569 GetEnvelopes(16+icount)
570 ->AddEnvelopeConstituentParam(volAluAngSupport4V,volEnvSuppAng4VA0,iVolNum++,3, spar);
571 GetEnvelopes(16+icount)
572 ->AddEnvelopeConstituentParam(volAluAngSupport4V,volEnvSuppAng4VA1,iVolNum++,3, spar);
30efacae 573
574// 4 horizontal
575
0a31b522 576 spar[0]=dpar[0];
577 spar[1]=fgkSizeSupport2H[1];
578 spar[2]=fgkSizeSupport2H[2];
579 TString volEnvSuppAng4HA0 = GetVolEnvSuppAngName("4", "H", "A", icount, 0);
580 TString volEnvSuppAng4HA1 = GetVolEnvSuppAngName("4", "H", "A", icount, 1);
581 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HA0, 0, true,
582 TGeoTranslation(xEnv,yEnvP+dpar[1]+sparysave,fgkSizeVSupExt[0]+spar[2]));
583 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HA1, 0, true,
584 TGeoTranslation(-xEnv,yEnvM+dpar[1]+sparysave,-(fgkSizeVSupExt[0]+spar[2])),
585 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
586
587 TString volAluAngSupport4H = GetVolAluAngSuppName("4", "H", icount);
588 GetEnvelopes(16+icount)
589 ->AddEnvelopeConstituentParam(volAluAngSupport4H,volEnvSuppAng4HA0,iVolNum++,3, spar);
590 GetEnvelopes(16+icount)
591 ->AddEnvelopeConstituentParam(volAluAngSupport4H,volEnvSuppAng4HA1,iVolNum++,3, spar);
30efacae 592
593// X horizontal
0a31b522 594 spar[0]=(fgkYVSup[3]-fgkYVSup[0])/2.*zRatio;
595 spar[1]=fgkSizeSupportXH[1];
596 spar[2]=fgkSizeSupportXH[2];
597 Float_t sparysavex=spar[1];
598 TString volEnvSuppAngXHA0 = GetVolEnvSuppAngName("X", "H", "A", icount, 0);
599 TString volEnvSuppAngXHA1 = GetVolEnvSuppAngName("X", "H", "A", icount, 1);
600 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHA0, 0, true,
601 TGeoTranslation(spar[0]+fgkYVSup[0]*zRatio,yEnvP+dpar[1]+sparysave+1.0,
602 fgkSizeVSupExt[0]+spar[2]));
603 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHA1, 0, true,
604 TGeoTranslation(-(spar[0]+fgkYVSup[0]*zRatio),yEnvM+dpar[1]+sparysave+1.0,
605 -(fgkSizeVSupExt[0]+spar[2])),
606 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
607
608 TString volAluAngSupportXH = GetVolAluAngSuppName("X", "H", icount);
609 GetEnvelopes(16+icount)
610 ->AddEnvelopeConstituentParam(volAluAngSupportXH,volEnvSuppAngXHA0,iVolNum++,3, spar);
611 GetEnvelopes(16+icount)
612 ->AddEnvelopeConstituentParam(volAluAngSupportXH,volEnvSuppAngXHA1,iVolNum++,3, spar);
30efacae 613
614// X vertical
0a31b522 615 spar[0]=(fgkYVSup[3]-fgkYVSup[0])/2.*zRatio;
616 spar[1]=fgkSizeSupportXV[1];
617 spar[2]=fgkSizeSupportXV[2];
618 TString volEnvSuppAngXVA0 = GetVolEnvSuppAngName("X", "V", "A", icount, 0);
619 TString volEnvSuppAngXVA1 = GetVolEnvSuppAngName("X", "V", "A", icount, 1);
620 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXVA0, 0, true,
621 TGeoTranslation(spar[0]+fgkYVSup[0]*zRatio,yEnvP+dpar[1]+sparysave+1.0+sparysavex+spar[1],
622 fgkSizeVSupExt[0]+spar[2]));
623 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXVA1, 0, true,
624 TGeoTranslation(-(spar[0]+fgkYVSup[0]*zRatio),yEnvM+dpar[1]+sparysave+1.0+sparysavex+spar[1],
625 -(fgkSizeVSupExt[0]+spar[2])),
626 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
627
628 TString volAluAngSupportXV = GetVolAluAngSuppName("X", "V", icount);
629 GetEnvelopes(16+icount)
630 ->AddEnvelopeConstituentParam(volAluAngSupportXV,volEnvSuppAngXVA0,iVolNum++,3, spar);
631 GetEnvelopes(16+icount)
632 ->AddEnvelopeConstituentParam(volAluAngSupportXV,volEnvSuppAngXVA1,iVolNum++,3, spar);
633
634 // keep values of yEnvP, yEnvM
635 fYEnvPsave = yEnvP;
636 fYEnvMsave = yEnvM;
637}
30efacae 638
0a31b522 639//______________________________________________________________________________
640void AliMUONTriggerGeometryBuilder::BuildChamberTypeB(Int_t& iVolNum, Int_t icount)
641{
642// ratio of zpos1m/zpos1p and inverse for first plane
643 Float_t zpos1= AliMUONConstants::DefaultChamberZ(10);
644 Float_t zmp=(zpos1-3.6)/(zpos1+3.6);
645 Float_t zpm=1./zmp;
646
d1cd2474 647// chamber type B (plus envelope chambers B & C)
0a31b522 648 Double_t dpar[3];
649 Double_t spar[3];
650 Double_t ppar[3];
651
652// chamber type B
653 Float_t zRatio = AliMUONConstants::DefaultRatioTriggerChamber(icount);
654 Float_t xEnv = (fgkDXZERO+fgkXMAX/2.)*zRatio;
655 Float_t yEnvP = 0;
656 Float_t yEnvM = 0;
657 yEnvP = (fYEnvMsave + fgkYMIN * zRatio ) * zpm + fgkYMIN * zRatio;
658 yEnvM = (fYEnvPsave + fgkYMIN * zRatio ) * zmp + fgkYMIN * zRatio;
659 dpar[0] = ((fgkXMAX-fgkXMIN)/2.) * zRatio;
660 dpar[1] = ((fgkYMAX-fgkYMIN)/2.) * zRatio;
661 dpar[2] = 0.4;
662 fDYsave = dpar[1];
663 fDXsave = dpar[0];
664 Float_t xpos = fgkXMIN/2. * zRatio;
665 Float_t ypos = (fgkYMIN - fgkYMIN/4.) * zRatio;
666 Float_t xpossave = xpos;
667
668 Int_t detElemId = (10+icount+1)*100+17;
669 TString volEnv3 = GetVolEnvName(icount, 3);
670 TString volEnv5 = GetVolEnvName(icount, 5);
671 TString volEnv12 = GetVolEnvName(icount, 12);
672 TString volEnv14 = GetVolEnvName(icount, 14);
673 TString volAlu = GetVolumeName("volAlu", icount);
674
675 GetEnvelopes(16+icount)->AddEnvelope(volEnv3, detElemId, true,
676 TGeoTranslation(xEnv,-yEnvM,fgkZm));
677 detElemId = (10+icount+1)*100+1;
678 GetEnvelopes(16+icount)->AddEnvelope(volEnv5, detElemId, true,
679 TGeoTranslation( xEnv, yEnvM,fgkZm));
680 detElemId = (10+icount+1)*100+10;
681 GetEnvelopes(16+icount)->AddEnvelope(volEnv12, detElemId, true,
682 TGeoTranslation(-xEnv,-yEnvP,fgkZp),
683 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
684 detElemId = (10+icount+1)*100+8;
685 GetEnvelopes(16+icount)->AddEnvelope(volEnv14, detElemId, true,
686 TGeoTranslation(-xEnv, yEnvP,fgkZp),
687 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
688
689 GetEnvelopes(16+icount)
690 ->AddEnvelopeConstituentParam(volAlu,volEnv3,iVolNum++,TGeoTranslation(xpos, ypos,0.),3,dpar);
691 GetEnvelopes(16+icount)
692 ->AddEnvelopeConstituentParam(volAlu,volEnv5,iVolNum++,TGeoTranslation(xpos,-ypos,0.),3,dpar);
693 GetEnvelopes(16+icount)
694 ->AddEnvelopeConstituentParam(volAlu,volEnv12,iVolNum++,TGeoTranslation(xpos, ypos,0.),3,dpar);
695 GetEnvelopes(16+icount)
696 ->AddEnvelopeConstituentParam(volAlu,volEnv14,iVolNum++,TGeoTranslation(xpos,-ypos,0.),3,dpar);
d1cd2474 697
0a31b522 698// chamber type C (note: same Z than type B)
699 dpar[0] = (fgkXMAX/2)*zRatio;
700 dpar[1] = (fgkYMAX/2)*zRatio;
701 xpos = 0.;
702 ypos = ((fgkYMAX - fgkYMIN)/2.) * zRatio;
703
704 GetEnvelopes(16+icount)
705 ->AddEnvelopeConstituentParam(volAlu,volEnv3,iVolNum++,TGeoTranslation(xpos,-ypos,0.),3,dpar);
706 GetEnvelopes(16+icount)
707 ->AddEnvelopeConstituentParam(volAlu,volEnv5,iVolNum++,TGeoTranslation(xpos, ypos,0.),3,dpar);
708 GetEnvelopes(16+icount)
709 ->AddEnvelopeConstituentParam(volAlu,volEnv12,iVolNum++,TGeoTranslation(xpos,-ypos,0.),3,dpar);
710 GetEnvelopes(16+icount)
711 ->AddEnvelopeConstituentParam(volAlu,volEnv14,iVolNum++,TGeoTranslation(xpos, ypos,0.),3,dpar);
880610c7 712
30efacae 713// horizontal cable support chamber type B+C
714
0a31b522 715 char volEnvSupportHBC[12][8];
716 for(Int_t jj=0;jj<2;jj++){
717 for(Int_t ii=0;ii<6;ii++){
718 snprintf(volEnvSupportHBC[6*jj+ii],8,"SA%dHB%d",icount+1,6*jj+ii);
719 }
720 }
721
722 spar[0]=dpar[0]-fgkYVSup[0]/2.;
723 spar[1]=fgkSizeSupportCable[1];
724 spar[2]=fgkSizeSupportCable[2];
725 for(Int_t in=0;in<3;in++){
726 GetEnvelopes(16+icount)->AddEnvelope(volEnvSupportHBC[in], 0, true,
727 TGeoTranslation(xEnv+fgkYVSup[0]/2.*zRatio,-(yEnvM+(fgkYMAX-fgkYMIN/2.*zRatio)/2.*(in-1)),
728 fgkSizeVSupExt[0]+spar[2]));
729 GetEnvelopes(16+icount)->AddEnvelope(volEnvSupportHBC[in+3], 0, true,
730 TGeoTranslation(xEnv+fgkYVSup[0]/2.*zRatio, yEnvM+(fgkYMAX-fgkYMIN/2.*zRatio)/2.*(in-1),
731 fgkSizeVSupExt[0]+spar[2]));
732 GetEnvelopes(16+icount)->AddEnvelope(volEnvSupportHBC[in+6], 0, true,
733 TGeoTranslation(-(xEnv+fgkYVSup[0]/2.*zRatio),-(yEnvP+(fgkYMAX-fgkYMIN/2.*zRatio)/2.*(in-1)),
734 -(fgkSizeVSupExt[0]+spar[2])),
735 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
736 GetEnvelopes(16+icount)->AddEnvelope(volEnvSupportHBC[in+9], 0, true,
737 TGeoTranslation(-(xEnv+fgkYVSup[0]/2.*zRatio), yEnvP+(fgkYMAX-fgkYMIN/2.*zRatio)/2.*(in-1),
738 -(fgkSizeVSupExt[0]+spar[2])),
739 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
740 }
741 for(Int_t ii=0;ii<12;ii++) {
742 TString volAluSupportH = GetVolumeName("volAluSupportH", icount);
743 GetEnvelopes(16+icount)
744 ->AddEnvelopeConstituentParam(volAluSupportH,volEnvSupportHBC[ii],iVolNum++,3, spar);
745 }
30efacae 746
747// angular supports chamber type B and C
748// C
749// 1 vertical
0a31b522 750 spar[0]=dpar[0];
751 spar[1]=fgkSizeSupport1V[1];
752 spar[2]=fgkSizeSupport1V[2];
753 Float_t sparysave=spar[1];
754
755 TString volEnvSuppAng1VBC0 = GetVolEnvSuppAngName("1", "V", "B", icount, 0);
756 TString volEnvSuppAng1VBC2 = GetVolEnvSuppAngName("1", "V", "B", icount, 2);
757 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VBC0, 0, true,
758 TGeoTranslation(xEnv,-yEnvM-dpar[1]-fDYsave,fgkZm-dpar[2]-spar[2]));
759 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VBC2, 0, true,
760 TGeoTranslation(-xEnv,-yEnvP-dpar[1]-fDYsave,fgkZp+dpar[2]+spar[2]),
761 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
762
763 TString volAluAngSupport1V = GetVolAluAngSuppName("1", "V", icount);
764 GetEnvelopes(16+icount)
765 ->AddEnvelopeConstituentParam(volAluAngSupport1V,volEnvSuppAng1VBC0,iVolNum++,3, spar);
766 GetEnvelopes(16+icount)
767 ->AddEnvelopeConstituentParam(volAluAngSupport1V,volEnvSuppAng1VBC2,iVolNum++,3, spar);
30efacae 768
769// 1 horizontal
0a31b522 770 spar[0]=dpar[0];
771 spar[1]=fgkSizeSupport1H[1];
772 spar[2]=fgkSizeSupport1H[2];
773
774 TString volEnvSuppAng1HBC0 = GetVolEnvSuppAngName("1", "H", "B", icount, 0);
775 TString volEnvSuppAng1HBC2 = GetVolEnvSuppAngName("1", "H", "B", icount, 2);
776 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HBC0, 0, true,
777 TGeoTranslation(xEnv,-yEnvM-dpar[1]-fDYsave-sparysave,fgkZm-(dpar[2]-spar[2])));
778 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HBC2, 0, true,
779 TGeoTranslation(-xEnv,-yEnvP-dpar[1]-fDYsave-sparysave,fgkZp+dpar[2]-spar[2]),
780 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
781
782 TString volAluAngSupport1H = GetVolAluAngSuppName("1", "H", icount);
783 GetEnvelopes(16+icount)
784 ->AddEnvelopeConstituentParam(volAluAngSupport1H,volEnvSuppAng1HBC0,iVolNum++,3, spar);
785 GetEnvelopes(16+icount)
786 ->AddEnvelopeConstituentParam(volAluAngSupport1H,volEnvSuppAng1HBC2,iVolNum++,3, spar);
30efacae 787
788// gas pipe (low)
0a31b522 789 ppar[0]=fgkSizeGasPipe[0];
790 ppar[1]=fgkSizeGasPipe[1];
791 ppar[2]=dpar[0];
792 TString volEnvInoxGasPipe1BC0 = GetVolEnvInoxGasPipeName("1", "BC", icount, 0);
793 TString volEnvInoxGasPipe1BC2 = GetVolEnvInoxGasPipeName("1", "BC", icount, 2);
794 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1BC0, 0, true,
795 TGeoTranslation(xEnv,-yEnvM-dpar[1]-fDYsave-sparysave-fgkOffsetGasPipe,fgkZm),fRsupportpipe);
796 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1BC2, 0, true,
797 TGeoTranslation(-xEnv,-yEnvP-dpar[1]-fDYsave-sparysave-fgkOffsetGasPipe,fgkZp),fRsupportpipe);
798 TString volInoxGasPipe = GetVolumeName("volInoxGasPipe", icount);
799 GetEnvelopes(16+icount)
800 ->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe1BC0,iVolNum++,3, ppar);
801 GetEnvelopes(16+icount)
802 ->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe1BC2,iVolNum++,3, ppar);
30efacae 803
804// 2 vertical
0a31b522 805 spar[0]=dpar[0];
806 spar[1]=fgkSizeSupport2V[1];
807 spar[2]=fgkSizeSupport2V[2];
808 sparysave=spar[1]+fgkSizeSupport2H[1];
809 TString volEnvSuppAng2VBC0 = GetVolEnvSuppAngName("2", "V", "B", icount, 0);
810 TString volEnvSuppAng2VBC2 = GetVolEnvSuppAngName("2", "V", "B", icount, 2);
811 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VBC0, 0, true,
812 TGeoTranslation(xEnv,-yEnvM-dpar[1]-fDYsave,-(fgkSizeVSupExt[0]+spar[2])));
813 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VBC2, 0, true,
814 TGeoTranslation(-xEnv,-yEnvP-dpar[1]-fDYsave,fgkSizeVSupExt[0]+spar[2]),
815 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
816
817 TString volAluAngSupport2V = GetVolAluAngSuppName("2", "V", icount);
818 GetEnvelopes(16+icount)
819 ->AddEnvelopeConstituentParam(volAluAngSupport2V,volEnvSuppAng2VBC0,iVolNum++,3, spar);
820 GetEnvelopes(16+icount)
821 ->AddEnvelopeConstituentParam(volAluAngSupport2V,volEnvSuppAng2VBC2,iVolNum++,3, spar);
30efacae 822
823// 2 horizontal
0a31b522 824 spar[0]=dpar[0];
825 spar[1]=fgkSizeSupport2H[1];
826 spar[2]=fgkSizeSupport2H[2];
827 TString volEnvSuppAng2HBC0 = GetVolEnvSuppAngName("2", "H", "B", icount, 0);
828 TString volEnvSuppAng2HBC2 = GetVolEnvSuppAngName("2", "H", "B", icount, 2);
829 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HBC0, 0, true,
830 TGeoTranslation(xEnv,-yEnvM-dpar[1]-fDYsave-sparysave,-(fgkSizeVSupExt[0]+spar[2])));
831 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HBC2, 0, true,
832 TGeoTranslation(-xEnv,-yEnvP-dpar[1]-fDYsave-sparysave,fgkSizeVSupExt[0]+spar[2]),
833 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
834
835 TString volAluAngSupport2H = GetVolAluAngSuppName("2", "H", icount);
836 GetEnvelopes(16+icount)
837 ->AddEnvelopeConstituentParam(volAluAngSupport2H,volEnvSuppAng2HBC0,iVolNum++,3, spar);
838 GetEnvelopes(16+icount)
839 ->AddEnvelopeConstituentParam(volAluAngSupport2H,volEnvSuppAng2HBC2,iVolNum++,3, spar);
30efacae 840
841// 3 vertical
0a31b522 842 spar[0]=fDXsave-fgkAvoidExtrusion;
843 spar[1]=fgkSizeSupport1V[1];
844 spar[2]=fgkSizeSupport1V[2];
845 sparysave=spar[1];
846 TString volEnvSuppAng3VBC0 = GetVolEnvSuppAngName("3", "V", "B", icount, 0);
847 TString volEnvSuppAng3VBC2 = GetVolEnvSuppAngName("3", "V", "B", icount, 2);
848 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VBC0, 0, true,
849 TGeoTranslation(xEnv+xpossave,-yEnvM+dpar[1]+fDYsave,fgkZm-dpar[2]-spar[2]));
850 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VBC2, 0, true,
851 TGeoTranslation(-xEnv-xpossave,-yEnvP+dpar[1]+fDYsave,fgkZp+dpar[2]+spar[2]),
852 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
853
854 TString volAluAngSupport3V = GetVolAluAngSuppName("3", "V", icount);
855 GetEnvelopes(16+icount)
856 ->AddEnvelopeConstituentParam(volAluAngSupport3V,volEnvSuppAng3VBC0,iVolNum++,3, spar);
857 GetEnvelopes(16+icount)
858 ->AddEnvelopeConstituentParam(volAluAngSupport3V,volEnvSuppAng3VBC2,iVolNum++,3, spar);
30efacae 859
860// 3 horizontal
0a31b522 861 spar[0]=fDXsave-fgkAvoidExtrusion;
862 spar[1]=fgkSizeSupport1H[1];
863 spar[2]=fgkSizeSupport1H[2];
864 TString volEnvSuppAng3HBC0 = GetVolEnvSuppAngName("3", "H", "B", icount, 0);
865 TString volEnvSuppAng3HBC2 = GetVolEnvSuppAngName("3", "H", "B", icount, 2);
866 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HBC0, 0, true,
867 TGeoTranslation(xEnv+xpossave,-yEnvM+dpar[1]+fDYsave+sparysave,fgkZm-(dpar[2]-spar[2])));
868 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HBC2, 0, true,
869 TGeoTranslation(-xEnv-xpossave,-yEnvP+dpar[1]+fDYsave+sparysave,fgkZp+dpar[2]-spar[2]),
870 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
871
872 TString volAluAngSupport3H = GetVolAluAngSuppName("3", "H", icount);
873 GetEnvelopes(16+icount)
874 ->AddEnvelopeConstituentParam(volAluAngSupport3H,volEnvSuppAng3HBC0,iVolNum++,3, spar);
875 GetEnvelopes(16+icount)
876 ->AddEnvelopeConstituentParam(volAluAngSupport3H,volEnvSuppAng3HBC2,iVolNum++,3, spar);
877
30efacae 878// gas pipe (high)
0a31b522 879 ppar[0]=fgkSizeGasPipe[0];
880 ppar[1]=fgkSizeGasPipe[1];
881 ppar[2]=fDXsave-fgkAvoidExtrusion;
882 TString volEnvInoxGasPipe2BC0 = GetVolEnvInoxGasPipeName("2", "BC", icount, 0);
883 TString volEnvInoxGasPipe2BC2 = GetVolEnvInoxGasPipeName("2", "BC", icount, 2);
884 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2BC0, 0, true,
885 TGeoTranslation(xEnv+xpossave,-yEnvM+dpar[1]+fDYsave+sparysave+fgkOffsetGasPipe,fgkZm),
886 fRsupportpipe);
887 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2BC2, 0, true,
888 TGeoTranslation(-xEnv-xpossave,-yEnvP+dpar[1]+fDYsave+sparysave+fgkOffsetGasPipe,fgkZp),
889 fRsupportpipe);
890 GetEnvelopes(16+icount)
891 ->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe2BC0,iVolNum++,3, ppar);
892 GetEnvelopes(16+icount)
893 ->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe2BC2,iVolNum++,3, ppar);
30efacae 894
895// 4 vertical
0a31b522 896 spar[0]=fDXsave-fgkAvoidExtrusion;
897 spar[1]=fgkSizeSupport2V[1];
898 spar[2]=fgkSizeSupport2V[2];
899 sparysave=spar[1]+fgkSizeSupport2H[1];
900 TString volEnvSuppAng4VBC0 = GetVolEnvSuppAngName("4", "V", "B", icount, 0);
901 TString volEnvSuppAng4VBC2 = GetVolEnvSuppAngName("4", "V", "B", icount, 2);
902 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VBC0, 0, true,
903 TGeoTranslation(xEnv+xpossave,-yEnvM+dpar[1]+fDYsave,-(fgkSizeVSupExt[0]+spar[2])));
904 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VBC2, 0, true,
905 TGeoTranslation(-xEnv-xpossave,-yEnvP+dpar[1]+fDYsave,fgkSizeVSupExt[0]+spar[2]),
906 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
907
908 TString volAluAngSupport4V = GetVolAluAngSuppName("4", "V", icount);
909 GetEnvelopes(16+icount)
910 ->AddEnvelopeConstituentParam(volAluAngSupport4V,volEnvSuppAng4VBC0,iVolNum++,3, spar);
911 GetEnvelopes(16+icount)
912 ->AddEnvelopeConstituentParam(volAluAngSupport4V,volEnvSuppAng4VBC2,iVolNum++,3, spar);
30efacae 913
914// 4 horizontal
0a31b522 915 spar[0]=fDXsave-fgkAvoidExtrusion;
916 spar[1]=fgkSizeSupport2H[1];
917 spar[2]=fgkSizeSupport2H[2];
918 TString volEnvSuppAng4HBC0 = GetVolEnvSuppAngName("4", "H", "B", icount, 0);
919 TString volEnvSuppAng4HBC2 = GetVolEnvSuppAngName("4", "H", "B", icount, 2);
920 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HBC0, 0, true,
921 TGeoTranslation(xEnv+xpossave,-yEnvM+dpar[1]+fDYsave+sparysave,-(fgkSizeVSupExt[0]+spar[2])));
922 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HBC2, 0, true,
923 TGeoTranslation(-xEnv-xpossave,-yEnvP+dpar[1]+fDYsave+sparysave,fgkSizeVSupExt[0]+spar[2]),
924 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
925
926 TString volAluAngSupport4H = GetVolAluAngSuppName("4", "H", icount);
927 GetEnvelopes(16+icount)
928 ->AddEnvelopeConstituentParam(volAluAngSupport4H,volEnvSuppAng4HBC0,iVolNum++,3, spar);
929 GetEnvelopes(16+icount)
930 ->AddEnvelopeConstituentParam(volAluAngSupport4H,volEnvSuppAng4HBC2,iVolNum++,3, spar);
30efacae 931
932// X horizontal
0a31b522 933 spar[0]=(fgkYVSup[3]-fgkYVSup[0])/2.*zRatio;
934 spar[1]=fgkSizeSupportXH[1];
935 spar[2]=fgkSizeSupportXH[2];
936 Float_t sparysavex=spar[1];
937 TString volEnvSuppAngXHBC0 = GetVolEnvSuppAngName("X", "H", "B", icount, 0);
938 TString volEnvSuppAngXHBC2 = GetVolEnvSuppAngName("X", "H", "B", icount, 2);
939 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHBC0, 0, true,
940 TGeoTranslation(spar[0]+fgkYVSup[0]*zRatio,-yEnvM+dpar[1]+fDYsave+sparysave+1.0,
941 -(fgkSizeVSupExt[0]+spar[2])));
942 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHBC2, 0, true,
943 TGeoTranslation(-(spar[0]+fgkYVSup[0]*zRatio),-yEnvP+dpar[1]+fDYsave+sparysave+1.0,
944 fgkSizeVSupExt[0]+spar[2]),
945 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
946
947 TString volAluAngSupportXH = GetVolAluAngSuppName("X", "H", icount);
948 GetEnvelopes(16+icount)
949 ->AddEnvelopeConstituentParam(volAluAngSupportXH,volEnvSuppAngXHBC0,iVolNum++,3, spar);
950 GetEnvelopes(16+icount)
951 ->AddEnvelopeConstituentParam(volAluAngSupportXH,volEnvSuppAngXHBC2,iVolNum++,3, spar);
30efacae 952// X vertical
0a31b522 953 spar[0]=(fgkYVSup[3]-fgkYVSup[0])/2.*zRatio;
954 spar[1]=fgkSizeSupportXV[1];
955 spar[2]=fgkSizeSupportXV[2];
956 TString volEnvSuppAngXVBC0 = GetVolEnvSuppAngName("X", "V", "B", icount, 0);
957 TString volEnvSuppAngXVBC2 = GetVolEnvSuppAngName("X", "V", "B", icount, 2);
958 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXVBC0, 0, true,
959 TGeoTranslation(spar[0]+fgkYVSup[0]*zRatio,
960 -yEnvM+dpar[1]+fDYsave+sparysave+1.0+sparysavex+spar[1],
961 -(fgkSizeVSupExt[0]+spar[2])));
962 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXVBC2, 0, true,
963 TGeoTranslation(-(spar[0]+fgkYVSup[0]*zRatio),
964 -yEnvP+dpar[1]+fDYsave+sparysave+1.0+sparysavex+spar[1],
965 fgkSizeVSupExt[0]+spar[2]),
966 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
967
968 TString volAluAngSupportXV = GetVolAluAngSuppName("X", "V", icount);
969 GetEnvelopes(16+icount)
970 ->AddEnvelopeConstituentParam(volAluAngSupportXV,volEnvSuppAngXVBC0,iVolNum++,3, spar);
971 GetEnvelopes(16+icount)
972 ->AddEnvelopeConstituentParam(volAluAngSupportXV,volEnvSuppAngXVBC2,iVolNum++,3, spar);
30efacae 973
974// B
975// 1 vertical
0a31b522 976 spar[0]=fDXsave-fgkAvoidExtrusion;
977 spar[1]=fgkSizeSupport1V[1];
978 spar[2]=fgkSizeSupport1V[2];
979 sparysave=spar[1];
980 TString volEnvSuppAng1VBC1 = GetVolEnvSuppAngName("1", "V", "B", icount, 1);
981 TString volEnvSuppAng1VBC3 = GetVolEnvSuppAngName("1", "V", "B", icount, 3);
982 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VBC1, 0, true,
983 TGeoTranslation(xEnv+xpossave,yEnvM-dpar[1]-fDYsave,fgkZm-dpar[2]-spar[2]));
984 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VBC3, 0, true,
985 TGeoTranslation(-xEnv-xpossave,yEnvP-dpar[1]-fDYsave,fgkZp+dpar[2]+spar[2]),
986 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
987 //TString volAluAngSupport1V = GetVolAluAngSuppName("1", "V", icount);
988 GetEnvelopes(16+icount)
989 ->AddEnvelopeConstituentParam(volAluAngSupport1V,volEnvSuppAng1VBC1,iVolNum++,3, spar);
990 GetEnvelopes(16+icount)
991 ->AddEnvelopeConstituentParam(volAluAngSupport1V,volEnvSuppAng1VBC3,iVolNum++,3, spar);
30efacae 992
993
994// 1 horizontal
0a31b522 995 spar[0]=fDXsave-fgkAvoidExtrusion;
996 spar[1]=fgkSizeSupport1H[1];
997 spar[2]=fgkSizeSupport1H[2];
998
999 TString volEnvSuppAng1HBC1 = GetVolEnvSuppAngName("1", "H", "B", icount, 1);
1000 TString volEnvSuppAng1HBC3 = GetVolEnvSuppAngName("1", "H", "B", icount, 3);
1001 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HBC1, 0, true,
1002 TGeoTranslation(xEnv+xpossave,yEnvM-dpar[1]-fDYsave-sparysave,fgkZm-(dpar[2]-spar[2])));
1003 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HBC3, 0, true,
1004 TGeoTranslation(-xEnv-xpossave,yEnvP-dpar[1]-fDYsave-sparysave,fgkZp+dpar[2]-spar[2]),
1005 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1006
1007 //TString volAluAngSupport1H = GetVolAluAngSuppName("1", "H", icount);
1008 GetEnvelopes(16+icount)
1009 ->AddEnvelopeConstituentParam(volAluAngSupport1H,volEnvSuppAng1HBC1,iVolNum++,3, spar);
1010 GetEnvelopes(16+icount)
1011 ->AddEnvelopeConstituentParam(volAluAngSupport1H,volEnvSuppAng1HBC3,iVolNum++,3, spar);
30efacae 1012
1013// gas pipe (low)
0a31b522 1014 ppar[0]=fgkSizeGasPipe[0];
1015 ppar[1]=fgkSizeGasPipe[1];
1016 ppar[2]=fDXsave-fgkAvoidExtrusion;
1017 TString volEnvInoxGasPipe1BC1 = GetVolEnvInoxGasPipeName("1", "BC", icount, 1);
1018 TString volEnvInoxGasPipe1BC3 = GetVolEnvInoxGasPipeName("1", "BC", icount, 3);
1019 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1BC1, 0, true,
1020 TGeoTranslation(xEnv+xpossave,yEnvM-dpar[1]-fDYsave-sparysave-fgkOffsetGasPipe,fgkZm),
1021 fRsupportpipe);
1022 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1BC3, 0, true,
1023 TGeoTranslation(-xEnv-xpossave,yEnvP-dpar[1]-fDYsave-sparysave-fgkOffsetGasPipe,fgkZp),
1024 fRsupportpipe);
1025 GetEnvelopes(16+icount)
1026 ->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe1BC1,iVolNum++,3, ppar);
1027 GetEnvelopes(16+icount)
1028 ->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe1BC3,iVolNum++,3, ppar);
30efacae 1029
1030// 2 vertical
0a31b522 1031 spar[0]=fDXsave-fgkAvoidExtrusion;
1032 spar[1]=fgkSizeSupport2V[1];
1033 spar[2]=fgkSizeSupport2V[2];
1034 sparysave=spar[1]+fgkSizeSupport2H[1];
1035 TString volEnvSuppAng2VBC1 = GetVolEnvSuppAngName("2", "V", "B", icount, 1);
1036 TString volEnvSuppAng2VBC3 = GetVolEnvSuppAngName("2", "V", "B", icount, 3);
1037 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VBC1, 0, true,
1038 TGeoTranslation(xEnv+xpossave,yEnvM-dpar[1]-fDYsave,-(fgkSizeVSupExt[0]+spar[2])));
1039 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VBC3, 0, true,
1040 TGeoTranslation(-xEnv-xpossave,yEnvP-dpar[1]-fDYsave,fgkSizeVSupExt[0]+spar[2]),
1041 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1042
1043 //TString volAluAngSupport2V = GetVolAluAngSuppName("2", "V", icount);
1044 GetEnvelopes(16+icount)
1045 ->AddEnvelopeConstituentParam(volAluAngSupport2V,volEnvSuppAng2VBC1,iVolNum++,3, spar);
1046 GetEnvelopes(16+icount)
1047 ->AddEnvelopeConstituentParam(volAluAngSupport2V,volEnvSuppAng2VBC3,iVolNum++,3, spar);
30efacae 1048// 2 horizontal
0a31b522 1049 spar[0]=fDXsave-fgkAvoidExtrusion;
1050 spar[1]=fgkSizeSupport2H[1];
1051 spar[2]=fgkSizeSupport2H[2];
1052 TString volEnvSuppAng2HBC1 = GetVolEnvSuppAngName("2", "H", "B", icount, 1);
1053 TString volEnvSuppAng2HBC3 = GetVolEnvSuppAngName("2", "H", "B", icount, 3);
1054 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HBC1, 0, true,
1055 TGeoTranslation(xEnv+xpossave,yEnvM-dpar[1]-fDYsave-sparysave,-(fgkSizeVSupExt[0]+spar[2])));
1056 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HBC3, 0, true,
1057 TGeoTranslation(-xEnv-xpossave,yEnvP-dpar[1]-fDYsave-sparysave,fgkSizeVSupExt[0]+spar[2]),
1058 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1059
1060 //TString volAluAngSupport2H = GetVolAluAngSuppName("2", "H", icount);
1061 GetEnvelopes(16+icount)
1062 ->AddEnvelopeConstituentParam(volAluAngSupport2H,volEnvSuppAng2HBC1,iVolNum++,3, spar);
1063 GetEnvelopes(16+icount)
1064 ->AddEnvelopeConstituentParam(volAluAngSupport2H,volEnvSuppAng2HBC3,iVolNum++,3, spar);
30efacae 1065
1066// 3 vertical
0a31b522 1067 spar[0]=dpar[0];
1068 spar[1]=fgkSizeSupport1V[1];
1069 spar[2]=fgkSizeSupport1V[2];
1070 sparysave=spar[1];
1071 TString volEnvSuppAng3VBC1 = GetVolEnvSuppAngName("3", "V", "B", icount, 1);
1072 TString volEnvSuppAng3VBC3 = GetVolEnvSuppAngName("3", "V", "B", icount, 3);
1073 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VBC1, 0, true,
1074 TGeoTranslation(xEnv,yEnvM+dpar[1]+fDYsave,fgkZm-dpar[2]-spar[2]));
1075 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VBC3, 0, true,
1076 TGeoTranslation(-xEnv,yEnvP+dpar[1]+fDYsave,fgkZp+dpar[2]+spar[2]),
1077 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1078
1079 //TString volAluAngSupport3V = GetVolAluAngSuppName("3", "V", icount);
1080 GetEnvelopes(16+icount)
1081 ->AddEnvelopeConstituentParam(volAluAngSupport3V,volEnvSuppAng3VBC1,iVolNum++,3, spar);
1082 GetEnvelopes(16+icount)
1083 ->AddEnvelopeConstituentParam(volAluAngSupport3V,volEnvSuppAng3VBC3,iVolNum++,3, spar);
30efacae 1084
1085// 3 horizontal
0a31b522 1086 spar[1]=fgkSizeSupport1H[1];
1087 spar[2]=fgkSizeSupport1H[2];
1088
1089 TString volEnvSuppAng3HBC1 = GetVolEnvSuppAngName("3", "H", "B", icount, 1);
1090 TString volEnvSuppAng3HBC3 = GetVolEnvSuppAngName("3", "H", "B", icount, 3);
1091 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HBC1, 0, true,
1092 TGeoTranslation(xEnv,yEnvM+dpar[1]+fDYsave+sparysave,fgkZm-(dpar[2]-spar[2])));
1093 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HBC3, 0, true,
1094 TGeoTranslation(-xEnv,yEnvP+dpar[1]+fDYsave+sparysave,fgkZp+dpar[2]-spar[2]),
1095 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1096
1097 GetEnvelopes(16+icount)
1098 ->AddEnvelopeConstituentParam(volAluAngSupport3H,volEnvSuppAng3HBC1,iVolNum++,3, spar);
1099 GetEnvelopes(16+icount)
1100 ->AddEnvelopeConstituentParam(volAluAngSupport3H,volEnvSuppAng3HBC3,iVolNum++,3, spar);
30efacae 1101
1102// gas pipe (high)
0a31b522 1103 ppar[0]=fgkSizeGasPipe[0];
1104 ppar[1]=fgkSizeGasPipe[1];
1105 ppar[2]=dpar[0];
1106 TString volEnvInoxGasPipe2BC1 = GetVolEnvInoxGasPipeName("2", "BC", icount, 1);
1107 TString volEnvInoxGasPipe2BC3 = GetVolEnvInoxGasPipeName("2", "BC", icount, 3);
1108 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2BC1, 0, true,
1109 TGeoTranslation(xEnv,yEnvM+dpar[1]+fDYsave+sparysave+fgkOffsetGasPipe,fgkZm),fRsupportpipe);
1110 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2BC3, 0, true,
1111 TGeoTranslation(-xEnv,yEnvP+dpar[1]+fDYsave+sparysave+fgkOffsetGasPipe,fgkZp),fRsupportpipe);
1112 GetEnvelopes(16+icount)
1113 ->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe2BC1,iVolNum++,3, ppar);
1114 GetEnvelopes(16+icount)
1115 ->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe2BC3,iVolNum++,3, ppar);
30efacae 1116
1117// 4 vertical
0a31b522 1118 spar[0]=dpar[0];
1119 spar[1]=fgkSizeSupport2V[1];
1120 spar[2]=fgkSizeSupport2V[2];
1121 sparysave=spar[1]+fgkSizeSupport2H[1];
1122 TString volEnvSuppAng4VBC1 = GetVolEnvSuppAngName("4", "V", "B", icount, 1);
1123 TString volEnvSuppAng4VBC3 = GetVolEnvSuppAngName("4", "V", "B", icount, 3);
1124 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VBC1, 0, true,
1125 TGeoTranslation(xEnv,yEnvM+dpar[1]+fDYsave,-(fgkSizeVSupExt[0]+spar[2])));
1126 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VBC3, 0, true,
1127 TGeoTranslation(-xEnv,yEnvP+dpar[1]+fDYsave,fgkSizeVSupExt[0]+spar[2]),
1128 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1129
1130 GetEnvelopes(16+icount)
1131 ->AddEnvelopeConstituentParam(volAluAngSupport4V,volEnvSuppAng4VBC1,iVolNum++,3, spar);
1132 GetEnvelopes(16+icount)
1133 ->AddEnvelopeConstituentParam(volAluAngSupport4V,volEnvSuppAng4VBC3,iVolNum++,3, spar);
30efacae 1134
1135// 4 horizontal
0a31b522 1136 spar[1]=fgkSizeSupport2H[1];
1137 spar[2]=fgkSizeSupport2H[2];
1138 TString volEnvSuppAng4HBC1 = GetVolEnvSuppAngName("4", "H", "B", icount, 1);
1139 TString volEnvSuppAng4HBC3 = GetVolEnvSuppAngName("4", "H", "B", icount, 3);
1140 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HBC1, 0, true,
1141 TGeoTranslation(xEnv,yEnvM+dpar[1]+fDYsave+sparysave,-(fgkSizeVSupExt[0]+spar[2])));
1142 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HBC3, 0, true,
1143 TGeoTranslation(-xEnv,yEnvP+dpar[1]+fDYsave+sparysave,fgkSizeVSupExt[0]+spar[2]),
1144 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1145
1146 GetEnvelopes(16+icount)
1147 ->AddEnvelopeConstituentParam(volAluAngSupport4H,volEnvSuppAng4HBC1,iVolNum++,3, spar);
1148 GetEnvelopes(16+icount)
1149 ->AddEnvelopeConstituentParam(volAluAngSupport4H,volEnvSuppAng4HBC3,iVolNum++,3, spar);
30efacae 1150
1151// X horizontal
0a31b522 1152 spar[0]=(fgkYVSup[3]-fgkYVSup[0])/2.*zRatio;
1153 spar[1]=fgkSizeSupportXH[1];
1154 spar[2]=fgkSizeSupportXH[2];
1155 sparysavex=spar[1];
1156 TString volEnvSuppAngXHBC1 = GetVolEnvSuppAngName("X", "H", "B", icount, 1);
1157 TString volEnvSuppAngXHBC3 = GetVolEnvSuppAngName("X", "H", "B", icount, 3);
1158 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHBC1, 0, true,
1159 TGeoTranslation(spar[0]+fgkYVSup[0]*zRatio,yEnvM+dpar[1]+fDYsave+sparysave+1.0,
1160 -(fgkSizeVSupExt[0]+spar[2])));
1161 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHBC3, 0, true,
1162 TGeoTranslation(-(spar[0]+fgkYVSup[0]*zRatio),yEnvP+dpar[1]+fDYsave+sparysave+1.0,
1163 fgkSizeVSupExt[0]+spar[2]),
1164 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1165
1166 GetEnvelopes(16+icount)
1167 ->AddEnvelopeConstituentParam(volAluAngSupportXH,volEnvSuppAngXHBC1,iVolNum++,3, spar);
1168 GetEnvelopes(16+icount)
1169 ->AddEnvelopeConstituentParam(volAluAngSupportXH,volEnvSuppAngXHBC3,iVolNum++,3, spar);
30efacae 1170
1171// X vertical
0a31b522 1172 spar[0]=(fgkYVSup[3]-fgkYVSup[0])/2.*zRatio;
1173 spar[1]=fgkSizeSupportXV[1];
1174 spar[2]=fgkSizeSupportXV[2];
1175 TString volEnvSuppAngXVBC1 = GetVolEnvSuppAngName("X", "V", "B", icount, 1);
1176 TString volEnvSuppAngXVBC3 = GetVolEnvSuppAngName("X", "V", "B", icount, 3);
1177 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXVBC1, 0, true,
1178 TGeoTranslation(spar[0]+fgkYVSup[0]*zRatio,
1179 yEnvM+dpar[1]+fDYsave+sparysave+1.0+sparysavex+spar[1],-(fgkSizeVSupExt[0]+spar[2])));
1180 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXVBC3, 0, true,
1181 TGeoTranslation(-(spar[0]+fgkYVSup[0]*zRatio),
1182 yEnvP+dpar[1]+fDYsave+sparysave+1.0+sparysavex+spar[1],fgkSizeVSupExt[0]+spar[2]),
1183 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1184
1185 GetEnvelopes(16+icount)
1186 ->AddEnvelopeConstituentParam(volAluAngSupportXV,volEnvSuppAngXVBC1,iVolNum++,3, spar);
1187 GetEnvelopes(16+icount)
1188 ->AddEnvelopeConstituentParam(volAluAngSupportXV,volEnvSuppAngXVBC3,iVolNum++,3, spar);
1189
1190 // keep values of yEnvP, yEnvM
1191 fYEnvPsave = yEnvP;
1192 fYEnvMsave = yEnvM;
1193}
30efacae 1194
0a31b522 1195//______________________________________________________________________________
1196void AliMUONTriggerGeometryBuilder::BuildChamberTypeD(Int_t& iVolNum, Int_t icount)
1197{
1198// ratio of zpos1m/zpos1p and inverse for first plane
1199 Float_t zpos1= AliMUONConstants::DefaultChamberZ(10);
1200 Float_t zmp=(zpos1-3.6)/(zpos1+3.6);
1201 Float_t zpm=1./zmp;
1202 Float_t zRatio = AliMUONConstants::DefaultRatioTriggerChamber(icount);
1203 Float_t xEnv = (fgkDXZERO+fgkXMAX/2.)*zRatio;
1204
1205 Double_t dpar[3];
1206 Double_t spar[3];
1207 Double_t ppar[3];
1208
1209// D
1210 Float_t yEnvP = 0;
1211 Float_t yEnvM = 0;
1212 yEnvP = (fYEnvMsave + fgkYMIN * zRatio ) * zpm + fgkYMIN * zRatio;
1213 yEnvM = (fYEnvPsave + fgkYMIN * zRatio ) * zmp + fgkYMIN * zRatio;
1214 dpar[0] = (fgkXMAX/2.)*zRatio;
1215 dpar[1] = fgkYMIN*zRatio;
1216 dpar[2] = 0.4;
1217
1218 Int_t detElemId = (10+icount+1)*100+16;
1219 TString volEnv2 = GetVolEnvName(icount, 2);
1220 TString volEnv6 = GetVolEnvName(icount, 6);
1221 TString volEnv11 = GetVolEnvName(icount, 11);
1222 TString volEnv15 = GetVolEnvName(icount, 15);
1223 TString volAlu = GetVolumeName("volAlu", icount);
1224
1225 GetEnvelopes(16+icount)
1226 ->AddEnvelope(volEnv2, detElemId, true, TGeoTranslation(xEnv,-yEnvP,fgkZp));
1227 detElemId = (10+icount+1)*100+2;
1228 GetEnvelopes(16+icount)
1229 ->AddEnvelope(volEnv6, detElemId, true, TGeoTranslation(xEnv, yEnvP,fgkZp));
1230 detElemId = (10+icount+1)*100+11;
1231 GetEnvelopes(16+icount)
1232 ->AddEnvelope(volEnv11, detElemId, true, TGeoTranslation(-xEnv,-yEnvM,fgkZm),
1233 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1234 detElemId = (10+icount+1)*100+7;
1235 GetEnvelopes(16+icount)
1236 ->AddEnvelope(volEnv15, detElemId, true, TGeoTranslation(-xEnv, yEnvM,fgkZm),
1237 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1238
1239 GetEnvelopes(16+icount)
1240 ->AddEnvelopeConstituentParam(volAlu,volEnv2,iVolNum++,3, dpar);
1241 GetEnvelopes(16+icount)
1242 ->AddEnvelopeConstituentParam(volAlu,volEnv6,iVolNum++,3, dpar);
1243 GetEnvelopes(16+icount)
1244 ->AddEnvelopeConstituentParam(volAlu,volEnv11,iVolNum++,3, dpar);
1245 GetEnvelopes(16+icount)
1246 ->AddEnvelopeConstituentParam(volAlu,volEnv15,iVolNum++,3, dpar);
d1cd2474 1247
30efacae 1248// horizontal cable support chamber type D
1249
0a31b522 1250 char volEnvSupportHD[12][8];
1251 for(Int_t jj=0;jj<2;jj++){
1252 for(Int_t ii=0;ii<6;ii++){
1253 snprintf(volEnvSupportHD[6*jj+ii],8,"SA%dHD%d",icount+1,6*jj+ii);
1254 }
1255 }
1256
1257 spar[0]=dpar[0]-(fgkYVSup[0]/2.)*zRatio;
1258 spar[1]=fgkSizeSupportCable[1];
1259 spar[2]=fgkSizeSupportCable[2];
1260 for(Int_t in=0;in<3;in++){
1261 GetEnvelopes(16+icount)->AddEnvelope(volEnvSupportHD[in], 0, true,
1262 TGeoTranslation(xEnv+fgkYVSup[0]/2.*zRatio,-(yEnvP+dpar[1]/2.*(in-1)),
1263 -(fgkSizeVSupExt[0]+spar[2])));
1264 GetEnvelopes(16+icount)->AddEnvelope(volEnvSupportHD[in+3], 0, true,
1265 TGeoTranslation(xEnv+fgkYVSup[0]/2.*zRatio, yEnvP+dpar[1]/2.*(in-1),
1266 -(fgkSizeVSupExt[0]+spar[2])));
1267 GetEnvelopes(16+icount)->AddEnvelope(volEnvSupportHD[in+6], 0, true,
1268 TGeoTranslation(-(xEnv+fgkYVSup[0]/2.*zRatio),-(yEnvM+dpar[1]/2.*(in-1)),
1269 fgkSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1270 GetEnvelopes(16+icount)->AddEnvelope(volEnvSupportHD[in+9], 0, true,
1271 TGeoTranslation(-(xEnv+fgkYVSup[0]/2.*zRatio),yEnvM+dpar[1]/2.*(in-1),
1272 fgkSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1273 }
1274 for(Int_t ii=0;ii<12;ii++) {
1275 TString volAluSupportH = GetVolumeName("volAluSupportH", icount);
1276 GetEnvelopes(16+icount)
1277 ->AddEnvelopeConstituentParam(volAluSupportH,volEnvSupportHD[ii],iVolNum++,3, spar);
1278 }
1279
30efacae 1280// angular supports chamber type D
1281// 1 vertical
1282
0a31b522 1283 spar[0]=dpar[0];
1284 spar[1]=fgkSizeSupport1V[1];
1285 spar[2]=fgkSizeSupport1V[2];
1286 Double_t sparysave=spar[1];
1287
1288 TString volEnvSuppAng1VD[4];
1289 volEnvSuppAng1VD[0] = GetVolEnvSuppAngName("1", "V", "D", icount, 0);
1290 volEnvSuppAng1VD[1] = GetVolEnvSuppAngName("1", "V", "D", icount, 1);
1291 volEnvSuppAng1VD[2] = GetVolEnvSuppAngName("1", "V", "D", icount, 2);
1292 volEnvSuppAng1VD[3] = GetVolEnvSuppAngName("1", "V", "D", icount, 3);
1293
1294 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VD[0], 0, true,
1295 TGeoTranslation(xEnv,-yEnvP-dpar[1],fgkZp+dpar[2]+spar[2]));
1296 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VD[1], 0, true,
1297 TGeoTranslation(xEnv,yEnvP-dpar[1],fgkZp+dpar[2]+spar[2]));
1298 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VD[2], 0, true,
1299 TGeoTranslation(-xEnv,-yEnvM-dpar[1],fgkZm-dpar[2]-spar[2]),
1300 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1301 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VD[3], 0, true,
1302 TGeoTranslation(-xEnv,yEnvM-dpar[1],fgkZm-dpar[2]-spar[2]),
1303 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1304
1305
1306 TString volAluAngSupport1V = GetVolAluAngSuppName("1", "V", icount);
1307 for (Int_t i=0;i<4;i++)
1308 GetEnvelopes(16+icount)
1309 ->AddEnvelopeConstituentParam(volAluAngSupport1V,volEnvSuppAng1VD[i],iVolNum++,3, spar);
30efacae 1310
1311
1312// 1 horizontal
1313
0a31b522 1314 spar[0]=dpar[0];
1315 spar[1]=fgkSizeSupport1H[1];
1316 spar[2]=fgkSizeSupport1H[2];
1317
1318 TString volEnvSuppAng1HD[4];
1319 volEnvSuppAng1HD[0] = GetVolEnvSuppAngName("1", "H", "D", icount, 0);
1320 volEnvSuppAng1HD[1] = GetVolEnvSuppAngName("1", "H", "D", icount, 1);
1321 volEnvSuppAng1HD[2] = GetVolEnvSuppAngName("1", "H", "D", icount, 2);
1322 volEnvSuppAng1HD[3] = GetVolEnvSuppAngName("1", "H", "D", icount, 3);
1323
1324 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HD[0], 0, true,
1325 TGeoTranslation(xEnv,-yEnvP-dpar[1]-sparysave,fgkZp+dpar[2]-spar[2]));
1326 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HD[1], 0, true,
1327 TGeoTranslation(xEnv,yEnvP-dpar[1]-sparysave,fgkZp+dpar[2]-spar[2]));
1328 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HD[2], 0, true,
1329 TGeoTranslation(-xEnv,-yEnvM-dpar[1]-sparysave,fgkZm-(dpar[2]-spar[2])),
1330 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1331 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HD[3], 0, true,
1332 TGeoTranslation(-xEnv,yEnvM-dpar[1]-sparysave,fgkZm-(dpar[2]-spar[2])),
1333 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1334
1335 TString volAluAngSupport1H = GetVolAluAngSuppName("1", "H", icount);
1336 for (Int_t i=0;i<4;i++)
1337 GetEnvelopes(16+icount)
1338 ->AddEnvelopeConstituentParam(volAluAngSupport1H,volEnvSuppAng1HD[i],iVolNum++,3, spar);
30efacae 1339
1340// gas pipe (low)
0a31b522 1341 ppar[0]=fgkSizeGasPipe[0];
1342 ppar[1]=fgkSizeGasPipe[1];
1343 ppar[2]=dpar[0];
1344 TString volEnvInoxGasPipe1D[4];
1345 volEnvInoxGasPipe1D[0] = GetVolEnvInoxGasPipeName("1", "D", icount, 0);
1346 volEnvInoxGasPipe1D[1] = GetVolEnvInoxGasPipeName("1", "D", icount, 1);
1347 volEnvInoxGasPipe1D[2] = GetVolEnvInoxGasPipeName("1", "D", icount, 2);
1348 volEnvInoxGasPipe1D[3] = GetVolEnvInoxGasPipeName("1", "D", icount, 3);
1349 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1D[0], 0, true,
1350 TGeoTranslation(xEnv,-yEnvP-dpar[1]-sparysave-fgkOffsetGasPipe,fgkZp),fRsupportpipe);
1351 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1D[1], 0, true,
1352 TGeoTranslation(xEnv,yEnvP-dpar[1]-sparysave-fgkOffsetGasPipe,fgkZp),fRsupportpipe);
1353 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1D[2], 0, true,
1354 TGeoTranslation(-xEnv,-yEnvM-dpar[1]-sparysave-fgkOffsetGasPipe,fgkZm),fRsupportpipe);
1355 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1D[3], 0, true,
1356 TGeoTranslation(-xEnv,yEnvM-dpar[1]-sparysave-fgkOffsetGasPipe,fgkZm),fRsupportpipe);
1357
1358 TString volInoxGasPipe = GetVolumeName("volInoxGasPipe", icount);
1359 for (Int_t i=0;i<4;i++)
1360 GetEnvelopes(16+icount)
1361 ->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe1D[i],iVolNum++,3, ppar);
30efacae 1362
1363// 2 vertical
1364
0a31b522 1365 spar[0]=dpar[0];
1366 spar[1]=fgkSizeSupport2V[1];
1367 spar[2]=fgkSizeSupport2V[2];
1368 sparysave=spar[1]+fgkSizeSupport2H[1];
1369 TString volEnvSuppAng2VD[4];
1370 volEnvSuppAng2VD[0] = GetVolEnvSuppAngName("2", "V", "D", icount, 0);
1371 volEnvSuppAng2VD[1] = GetVolEnvSuppAngName("2", "V", "D", icount, 1);
1372 volEnvSuppAng2VD[2] = GetVolEnvSuppAngName("2", "V", "D", icount, 2);
1373 volEnvSuppAng2VD[3] = GetVolEnvSuppAngName("2", "V", "D", icount, 3);
1374
1375 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VD[0], 0, true,
1376 TGeoTranslation(xEnv,-yEnvP-dpar[1],fgkSizeVSupExt[0]+spar[2]));
1377 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VD[1], 0, true,
1378 TGeoTranslation(xEnv,yEnvP-dpar[1],fgkSizeVSupExt[0]+spar[2]));
1379 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VD[2], 0, true,
1380 TGeoTranslation(-xEnv,-yEnvM-dpar[1],-(fgkSizeVSupExt[0]+spar[2])),
1381 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1382 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VD[3], 0, true,
1383 TGeoTranslation(-xEnv,yEnvM-dpar[1],-(fgkSizeVSupExt[0]+spar[2])),
1384 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1385
1386 TString volAluAngSupport2V = GetVolAluAngSuppName("2", "V", icount);
1387 for (Int_t i=0;i<4;i++)
1388 GetEnvelopes(16+icount)
1389 ->AddEnvelopeConstituentParam(volAluAngSupport2V,volEnvSuppAng2VD[i],iVolNum++,3, spar);
30efacae 1390
1391// 2 horizontal
1392
0a31b522 1393 spar[0]=dpar[0];
1394 spar[1]=fgkSizeSupport2H[1];
1395 spar[2]=fgkSizeSupport2H[2];
1396 TString volEnvSuppAng2HD[4];
1397 volEnvSuppAng2HD[0] = GetVolEnvSuppAngName("2", "H", "D", icount, 0);
1398 volEnvSuppAng2HD[1] = GetVolEnvSuppAngName("2", "H", "D", icount, 1);
1399 volEnvSuppAng2HD[2] = GetVolEnvSuppAngName("2", "H", "D", icount, 2);
1400 volEnvSuppAng2HD[3] = GetVolEnvSuppAngName("2", "H", "D", icount, 3);
1401
1402 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HD[0], 0, true,
1403 TGeoTranslation(xEnv,-yEnvP-dpar[1]-sparysave,fgkSizeVSupExt[0]+spar[2]));
1404 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HD[1], 0, true,
1405 TGeoTranslation(xEnv,yEnvP-dpar[1]-sparysave,fgkSizeVSupExt[0]+spar[2]));
1406 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HD[2], 0, true,
1407 TGeoTranslation(-xEnv,-yEnvM-dpar[1]-sparysave,-(fgkSizeVSupExt[0]+spar[2])),
1408 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1409 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HD[3], 0, true,
1410 TGeoTranslation(-xEnv,yEnvM-dpar[1]-sparysave,-(fgkSizeVSupExt[0]+spar[2])),
1411 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1412
1413 TString volAluAngSupport2H = GetVolAluAngSuppName("2", "H", icount);
1414 for (Int_t i=0;i<4;i++)
1415 GetEnvelopes(16+icount)
1416 ->AddEnvelopeConstituentParam(volAluAngSupport2H,volEnvSuppAng2HD[i],iVolNum++,3, spar);
30efacae 1417
1418// 3 vertical
1419
0a31b522 1420 spar[0]=dpar[0];
1421 spar[1]=fgkSizeSupport1V[1];
1422 spar[2]=fgkSizeSupport1V[2];
1423 sparysave=spar[1];
1424 TString volEnvSuppAng3VD[4];
1425 volEnvSuppAng3VD[0] = GetVolEnvSuppAngName("3", "V", "D", icount, 0);
1426 volEnvSuppAng3VD[1] = GetVolEnvSuppAngName("3", "V", "D", icount, 1);
1427 volEnvSuppAng3VD[2] = GetVolEnvSuppAngName("3", "V", "D", icount, 2);
1428 volEnvSuppAng3VD[3] = GetVolEnvSuppAngName("3", "V", "D", icount, 3);
1429
1430 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VD[0], 0, true,
1431 TGeoTranslation(xEnv,-yEnvP+dpar[1],fgkZp+dpar[2]+spar[2]));
1432 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VD[1], 0, true,
1433 TGeoTranslation(xEnv,yEnvP+dpar[1],fgkZp+dpar[2]+spar[2]));
1434 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VD[2], 0, true,
1435 TGeoTranslation(-xEnv,-yEnvM+dpar[1],fgkZm-dpar[2]-spar[2]),
1436 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1437 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VD[3], 0, true,
1438 TGeoTranslation(-xEnv,yEnvM+dpar[1],fgkZm-dpar[2]-spar[2]),
1439 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1440
1441 TString volAluAngSupport3V = GetVolAluAngSuppName("3", "V", icount);
1442 for (Int_t i=0;i<4;i++)
1443 GetEnvelopes(16+icount)
1444 ->AddEnvelopeConstituentParam(volAluAngSupport3V,volEnvSuppAng3VD[i],iVolNum++,3, spar);
30efacae 1445
1446
1447// 3 horizontal
1448
0a31b522 1449 spar[0]=dpar[0];
1450 spar[1]=fgkSizeSupport1H[1];
1451 spar[2]=fgkSizeSupport1H[2];
1452 TString volEnvSuppAng3HD[4];
1453 volEnvSuppAng3HD[0] = GetVolEnvSuppAngName("3", "H", "D", icount, 0);
1454 volEnvSuppAng3HD[1] = GetVolEnvSuppAngName("3", "H", "D", icount, 1);
1455 volEnvSuppAng3HD[2] = GetVolEnvSuppAngName("3", "H", "D", icount, 2);
1456 volEnvSuppAng3HD[3] = GetVolEnvSuppAngName("3", "H", "D", icount, 3);
1457
1458 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HD[0], 0, true,
1459 TGeoTranslation(xEnv,-yEnvP+dpar[1]+sparysave,fgkZp+dpar[2]-spar[2]));
1460 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HD[1], 0, true,
1461 TGeoTranslation(xEnv,yEnvP+dpar[1]+sparysave,fgkZp+dpar[2]-spar[2]));
1462 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HD[2], 0, true,
1463 TGeoTranslation(-xEnv,-yEnvM+dpar[1]+sparysave,fgkZm-(dpar[2]-spar[2])),
1464 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1465 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HD[3], 0, true,
1466 TGeoTranslation(-xEnv,yEnvM+dpar[1]+sparysave,fgkZm-(dpar[2]-spar[2])),
1467 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1468
1469 TString volAluAngSupport3H = GetVolAluAngSuppName("3", "H", icount);
1470 for (Int_t i=0;i<4;i++)
1471 GetEnvelopes(16+icount)
1472 ->AddEnvelopeConstituentParam(volAluAngSupport3H,volEnvSuppAng3HD[i],iVolNum++,3, spar);
1473
30efacae 1474// gas pipe (high)
0a31b522 1475 ppar[0]=fgkSizeGasPipe[0];
1476 ppar[1]=fgkSizeGasPipe[1];
1477 ppar[2]=dpar[0];
1478 TString volEnvInoxGasPipe2D[4];
1479 volEnvInoxGasPipe2D[0] = GetVolEnvInoxGasPipeName("2", "D", icount, 0);
1480 volEnvInoxGasPipe2D[1] = GetVolEnvInoxGasPipeName("2", "D", icount, 1);
1481 volEnvInoxGasPipe2D[2] = GetVolEnvInoxGasPipeName("2", "D", icount, 2);
1482 volEnvInoxGasPipe2D[3] = GetVolEnvInoxGasPipeName("2", "D", icount, 3);
1483 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2D[0], 0, true,
1484 TGeoTranslation(xEnv,-yEnvP+dpar[1]+sparysave+fgkOffsetGasPipe,fgkZp),fRsupportpipe);
1485 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2D[1], 0, true,
1486 TGeoTranslation(xEnv,yEnvP+dpar[1]+sparysave+fgkOffsetGasPipe,fgkZp),fRsupportpipe);
1487 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2D[2], 0, true,
1488 TGeoTranslation(-xEnv,-yEnvM+dpar[1]+sparysave+fgkOffsetGasPipe,fgkZm),fRsupportpipe);
1489 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2D[3], 0, true,
1490 TGeoTranslation(-xEnv,yEnvM+dpar[1]+sparysave+fgkOffsetGasPipe,fgkZm),fRsupportpipe);
1491
1492 for (Int_t i=0;i<4;i++)
1493 GetEnvelopes(16+icount)
1494 ->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe2D[i],iVolNum++,3, ppar);
30efacae 1495
1496// 4 vertical
1497
0a31b522 1498 spar[0]=dpar[0];
1499 spar[1]=fgkSizeSupport2V[1];
1500 spar[2]=fgkSizeSupport2V[2];
1501 sparysave=spar[1]+fgkSizeSupport2H[1];
1502 TString volEnvSuppAng4VD[4];
1503 volEnvSuppAng4VD[0] = GetVolEnvSuppAngName("4", "V", "D", icount, 0);
1504 volEnvSuppAng4VD[1] = GetVolEnvSuppAngName("4", "V", "D", icount, 1);
1505 volEnvSuppAng4VD[2] = GetVolEnvSuppAngName("4", "V", "D", icount, 2);
1506 volEnvSuppAng4VD[3] = GetVolEnvSuppAngName("4", "V", "D", icount, 3);
1507
1508 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VD[0], 0, true,
1509 TGeoTranslation(xEnv,-yEnvP+dpar[1],fgkSizeVSupExt[0]+spar[2]));
1510 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VD[1], 0, true,
1511 TGeoTranslation(xEnv,yEnvP+dpar[1],fgkSizeVSupExt[0]+spar[2]));
1512 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VD[2], 0, true,
1513 TGeoTranslation(-xEnv,-yEnvM+dpar[1],-(fgkSizeVSupExt[0]+spar[2])),
1514 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1515 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VD[3], 0, true,
1516 TGeoTranslation(-xEnv,yEnvM+dpar[1],-(fgkSizeVSupExt[0]+spar[2])),
1517 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1518
1519 TString volAluAngSupport4V = GetVolAluAngSuppName("4", "V", icount);
1520 for (Int_t i=0;i<4;i++)
1521 GetEnvelopes(16+icount)
1522 ->AddEnvelopeConstituentParam(volAluAngSupport4V,volEnvSuppAng4VD[i],iVolNum++,3, spar);
30efacae 1523
1524// 4 horizontal
1525
0a31b522 1526 spar[0]=dpar[0];
1527 spar[1]=fgkSizeSupport2H[1];
1528 spar[2]=fgkSizeSupport2H[2];
1529 TString volEnvSuppAng4HD[4];
1530 volEnvSuppAng4HD[0] = GetVolEnvSuppAngName("4", "H", "D", icount, 0);
1531 volEnvSuppAng4HD[1] = GetVolEnvSuppAngName("4", "H", "D", icount, 1);
1532 volEnvSuppAng4HD[2] = GetVolEnvSuppAngName("4", "H", "D", icount, 2);
1533 volEnvSuppAng4HD[3] = GetVolEnvSuppAngName("4", "H", "D", icount, 3);
1534
1535 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HD[0], 0, true,
1536 TGeoTranslation(xEnv,-yEnvP+dpar[1]+sparysave,fgkSizeVSupExt[0]+spar[2]));
1537 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HD[1], 0, true,
1538 TGeoTranslation(xEnv,yEnvP+dpar[1]+sparysave,fgkSizeVSupExt[0]+spar[2]));
1539 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HD[2], 0, true,
1540 TGeoTranslation(-xEnv,-yEnvM+dpar[1]+sparysave,-(fgkSizeVSupExt[0]+spar[2])),
1541 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1542 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HD[3], 0, true,
1543 TGeoTranslation(-xEnv,yEnvM+dpar[1]+sparysave,-(fgkSizeVSupExt[0]+spar[2])),
1544 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1545
1546 TString volAluAngSupport4H = GetVolAluAngSuppName("4", "H", icount);
1547 for (Int_t i=0;i<4;i++)
1548 GetEnvelopes(16+icount)
1549 ->AddEnvelopeConstituentParam(volAluAngSupport4H,volEnvSuppAng4HD[i],iVolNum++,3, spar);
30efacae 1550
1551// X horizontal
0a31b522 1552 spar[0]=(fgkYVSup[3]-fgkYVSup[0])/2.*zRatio;
1553 spar[1]=fgkSizeSupportXH[1];
1554 spar[2]=fgkSizeSupportXH[2];
1555 Double_t sparysavex=spar[1];
1556 TString volEnvSuppAngXHD[4];
1557 volEnvSuppAngXHD[0] = GetVolEnvSuppAngName("X", "H", "D", icount, 0);
1558 volEnvSuppAngXHD[1] = GetVolEnvSuppAngName("X", "H", "D", icount, 1);
1559 volEnvSuppAngXHD[2] = GetVolEnvSuppAngName("X", "H", "D", icount, 2);
1560 volEnvSuppAngXHD[3] = GetVolEnvSuppAngName("X", "H", "D", icount, 3);
1561
1562 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHD[0], 0, true,
1563 TGeoTranslation(spar[0]+fgkYVSup[0]*zRatio,-yEnvP+dpar[1]+sparysave+1.0,
1564 fgkSizeVSupExt[0]+spar[2]));
1565 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHD[1], 0, true,
1566 TGeoTranslation(spar[0]+fgkYVSup[0]*zRatio,yEnvP+dpar[1]+sparysave+1.0,
1567 fgkSizeVSupExt[0]+spar[2]));
1568 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHD[2], 0, true,
1569 TGeoTranslation(-(spar[0]+fgkYVSup[0]*zRatio),yEnvM+dpar[1]+sparysave+1.0,
1570 -(fgkSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1571 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHD[3], 0, true,
1572 TGeoTranslation(-(spar[0]+fgkYVSup[0]*zRatio),-yEnvM+dpar[1]+sparysave+1.0,
1573 -(fgkSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1574
1575 TString volAluAngSupportXH = GetVolAluAngSuppName("X", "H", icount);
1576 for (Int_t i=0;i<4;i++)
1577 GetEnvelopes(16+icount)
1578 ->AddEnvelopeConstituentParam(volAluAngSupportXH,volEnvSuppAngXHD[i],iVolNum++,3, spar);
30efacae 1579
1580// X vertical
0a31b522 1581 spar[0]=(fgkYVSup[3]-fgkYVSup[0])/2.*zRatio;
1582 spar[1]=fgkSizeSupportXV[1];
1583 spar[2]=fgkSizeSupportXV[2];
1584 TString volEnvSuppAngXVD[4];
1585 volEnvSuppAngXVD[0] = GetVolEnvSuppAngName("X", "V", "D", icount, 0);
1586 volEnvSuppAngXVD[1] = GetVolEnvSuppAngName("X", "V", "D", icount, 1);
1587 volEnvSuppAngXVD[2] = GetVolEnvSuppAngName("X", "V", "D", icount, 2);
1588 volEnvSuppAngXVD[3] = GetVolEnvSuppAngName("X", "V", "D", icount, 3);
1589
1590 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXVD[0], 0, true,
1591 TGeoTranslation(spar[0]+fgkYVSup[0]*zRatio,-yEnvP+dpar[1]+sparysave+1.0+sparysavex+spar[1],
1592 fgkSizeVSupExt[0]+spar[2]));
1593 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXVD[1], 0, true,
1594 TGeoTranslation(spar[0]+fgkYVSup[0]*zRatio,yEnvP+dpar[1]+sparysave+1.0+sparysavex+spar[1],
1595 fgkSizeVSupExt[0]+spar[2]));
1596 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXVD[2], 0, true,
1597 TGeoTranslation(-(spar[0]+fgkYVSup[0]*zRatio),yEnvM+dpar[1]+sparysave+1.0+sparysavex+spar[1],
1598 -(fgkSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1599 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXVD[3], 0, true,
1600 TGeoTranslation(-(spar[0]+fgkYVSup[0]*zRatio),-yEnvM+dpar[1]+sparysave+1.0+sparysavex+spar[1],
1601 -(fgkSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1602
1603 TString volAluAngSupportXV = GetVolAluAngSuppName("X", "V", icount);
1604 for (Int_t i=0;i<4;i++)
1605 GetEnvelopes(16+icount)
1606 ->AddEnvelopeConstituentParam(volAluAngSupportXV,volEnvSuppAngXVD[i],iVolNum++,3, spar);
1607
1608 // keep values of yEnvP, yEnvM
1609 fYEnvPsave = yEnvP;
1610 fYEnvMsave = yEnvM;
1611}
1612
1613//______________________________________________________________________________
1614void AliMUONTriggerGeometryBuilder::BuildChamberTypeE(Int_t& iVolNum, Int_t icount)
1615{
1616// ratio of zpos1m/zpos1p and inverse for first plane
1617 Float_t zpos1= AliMUONConstants::DefaultChamberZ(10);
1618 Float_t zmp=(zpos1-3.6)/(zpos1+3.6);
1619 Float_t zpm=1./zmp;
1620 Float_t zRatio = AliMUONConstants::DefaultRatioTriggerChamber(icount);
1621 Float_t xEnv = (fgkDXZERO+fgkXMAX/2.)*zRatio;
1622
1623 Double_t dpar[3];
1624 Double_t spar[3];
1625 Double_t ppar[3];
30efacae 1626
d1cd2474 1627// E
0a31b522 1628 Float_t yEnvP = 0;
1629 Float_t yEnvM = 0;
1630 yEnvP = (fYEnvMsave + fgkYMIN * zRatio ) * zpm + fgkYMIN * zRatio;
1631 yEnvM = (fYEnvPsave + fgkYMIN * zRatio ) * zmp + fgkYMIN * zRatio;
1632
1633 Int_t detElemId = (10+icount+1)*100+15;
1634 TString volEnv1 = GetVolEnvName(icount, 1);
1635 TString volEnv7 = GetVolEnvName(icount, 7);
1636 TString volEnv10 = GetVolEnvName(icount, 10);
1637 TString volEnv16 = GetVolEnvName(icount, 16);
1638 TString volAlu = GetVolumeName("volAlu", icount);
1639
1640 GetEnvelopes(16+icount)
1641 ->AddEnvelope(volEnv1, detElemId, true, TGeoTranslation(xEnv,-yEnvM,fgkZm));
1642 detElemId = (10+icount+1)*100+3;
1643 GetEnvelopes(16+icount)
1644 ->AddEnvelope(volEnv7, detElemId, true, TGeoTranslation(xEnv, yEnvM,fgkZm));
1645 detElemId = (10+icount+1)*100+12;
1646 GetEnvelopes(16+icount)->AddEnvelope(volEnv10, detElemId, true, TGeoTranslation(-xEnv,-yEnvP,fgkZp),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1647 detElemId = (10+icount+1)*100+6;
1648 GetEnvelopes(16+icount)->AddEnvelope(volEnv16, detElemId, true, TGeoTranslation(-xEnv, yEnvP,fgkZp),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1649
1650 GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAlu,volEnv1,iVolNum++,3,dpar);
1651 GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAlu,volEnv7,iVolNum++,3,dpar);
1652 GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAlu,volEnv10,iVolNum++,3,dpar);
1653 GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAlu,volEnv16,iVolNum++,3,dpar);
d1cd2474 1654
30efacae 1655// horizontal cable support chamber type E
1656
0a31b522 1657 char volEnvSupportHE[12][8];
1658 for(Int_t jj=0;jj<2;jj++){
1659 for(Int_t ii=0;ii<6;ii++){
1660 snprintf(volEnvSupportHE[6*jj+ii],8,"SA%dHE%d",icount+1,6*jj+ii);
1661 }
1662 }
1663
1664 spar[0]=dpar[0]-(fgkYVSup[0]/2.)*zRatio;
1665 spar[1]=fgkSizeSupportCable[1];
1666 spar[2]=fgkSizeSupportCable[2];
1667 for(Int_t in=0;in<3;in++){
1668 GetEnvelopes(16+icount)->AddEnvelope(volEnvSupportHE[in], 0, true, TGeoTranslation(xEnv+fgkYVSup[0]/2.*zRatio,-(yEnvM+dpar[1]/2.*(in-1)),fgkSizeVSupExt[0]+spar[2]));
1669 GetEnvelopes(16+icount)->AddEnvelope(volEnvSupportHE[in+3], 0, true, TGeoTranslation(xEnv+fgkYVSup[0]/2.*zRatio, yEnvM+dpar[1]/2.*(in-1),fgkSizeVSupExt[0]+spar[2]));
1670 GetEnvelopes(16+icount)->AddEnvelope(volEnvSupportHE[in+6], 0, true, TGeoTranslation(-(xEnv+fgkYVSup[0]/2.*zRatio),-(yEnvP+dpar[1]/2.*(in-1)),-(fgkSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1671 GetEnvelopes(16+icount)->AddEnvelope(volEnvSupportHE[in+9], 0, true, TGeoTranslation(-(xEnv+fgkYVSup[0]/2.*zRatio), yEnvP+dpar[1]/2.*(in-1),-(fgkSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1672 }
1673 for(Int_t ii=0;ii<12;ii++) {
1674 TString volAluSupportH = GetVolumeName("volAluSupportH", icount);
1675 GetEnvelopes(16+icount)
1676 ->AddEnvelopeConstituentParam(volAluSupportH,volEnvSupportHE[ii],iVolNum++,3, spar);
1677 }
1678
30efacae 1679// angular supports chamber type E
1680// 1 vertical
1681
0a31b522 1682 spar[0]=dpar[0];
1683 spar[1]=fgkSizeSupport1V[1];
1684 spar[2]=fgkSizeSupport1V[2];
1685 Double_t sparysave=spar[1];
1686
1687 TString volEnvSuppAng1VE[4];
1688 volEnvSuppAng1VE[0] = GetVolEnvSuppAngName("1", "V", "E", icount, 0);
1689 volEnvSuppAng1VE[1] = GetVolEnvSuppAngName("1", "V", "E", icount, 1);
1690 volEnvSuppAng1VE[2] = GetVolEnvSuppAngName("1", "V", "E", icount, 2);
1691 volEnvSuppAng1VE[3] = GetVolEnvSuppAngName("1", "V", "E", icount, 3);
1692
1693 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VE[0], 0, true,
1694 TGeoTranslation(xEnv,-yEnvM-dpar[1],fgkZm-dpar[2]-spar[2]));
1695 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VE[1], 0, true,
1696 TGeoTranslation(xEnv,yEnvM-dpar[1],fgkZm-dpar[2]-spar[2]));
1697 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VE[2], 0, true,
1698 TGeoTranslation(-xEnv,-yEnvP-dpar[1],fgkZp+dpar[2]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1699 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VE[3], 0, true,
1700 TGeoTranslation(-xEnv,yEnvP-dpar[1],fgkZp+dpar[2]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
30efacae 1701
0a31b522 1702 TString volAluAngSupport1V = GetVolAluAngSuppName("1", "V", icount);
1703 for (Int_t i=0;i<4;i++)
1704 GetEnvelopes(16+icount)
1705 ->AddEnvelopeConstituentParam(volAluAngSupport1V,volEnvSuppAng1VE[i],iVolNum++,3, spar);
30efacae 1706
1707
1708// 1 horizontal
1709
0a31b522 1710 spar[0]=dpar[0];
1711 spar[1]=fgkSizeSupport1H[1];
1712 spar[2]=fgkSizeSupport1H[2];
1713
1714 TString volEnvSuppAng1HE[4];
1715 volEnvSuppAng1HE[0] = GetVolEnvSuppAngName("1", "H", "E", icount, 0);
1716 volEnvSuppAng1HE[1] = GetVolEnvSuppAngName("1", "H", "E", icount, 1);
1717 volEnvSuppAng1HE[2] = GetVolEnvSuppAngName("1", "H", "E", icount, 2);
1718 volEnvSuppAng1HE[3] = GetVolEnvSuppAngName("1", "H", "E", icount, 3);
1719
1720 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HE[0], 0, true,
1721 TGeoTranslation(xEnv,-yEnvM-dpar[1]-sparysave,fgkZm-(dpar[2]-spar[2])));
1722 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HE[1], 0, true,
1723 TGeoTranslation(xEnv,yEnvM-dpar[1]-sparysave,fgkZm-(dpar[2]-spar[2])));
1724 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HE[2], 0, true, TGeoTranslation(-xEnv,-yEnvP-dpar[1]-sparysave,fgkZp+dpar[2]-spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1725 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HE[3], 0, true, TGeoTranslation(-xEnv,yEnvP-dpar[1]-sparysave,fgkZp+dpar[2]-spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1726
1727 TString volAluAngSupport1H = GetVolAluAngSuppName("1", "H", icount);
1728 for (Int_t i=0;i<4;i++)
1729 GetEnvelopes(16+icount)
1730 ->AddEnvelopeConstituentParam(volAluAngSupport1H,volEnvSuppAng1HE[i],iVolNum++,3, spar);
30efacae 1731
1732// gas pipe (low)
0a31b522 1733 ppar[0]=fgkSizeGasPipe[0];
1734 ppar[1]=fgkSizeGasPipe[1];
1735 ppar[2]=dpar[0];
1736 TString volEnvInoxGasPipe1E[4];
1737 volEnvInoxGasPipe1E[0] = GetVolEnvInoxGasPipeName("1", "E", icount, 0);
1738 volEnvInoxGasPipe1E[1] = GetVolEnvInoxGasPipeName("1", "E", icount, 1);
1739 volEnvInoxGasPipe1E[2] = GetVolEnvInoxGasPipeName("1", "E", icount, 2);
1740 volEnvInoxGasPipe1E[3] = GetVolEnvInoxGasPipeName("1", "E", icount, 3);
1741 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1E[0], 0, true,
1742 TGeoTranslation(xEnv,-yEnvM-dpar[1]-sparysave-fgkOffsetGasPipe,fgkZm),fRsupportpipe);
1743 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1E[1], 0, true,
1744 TGeoTranslation(xEnv,yEnvM-dpar[1]-sparysave-fgkOffsetGasPipe,fgkZm),fRsupportpipe);
1745 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1E[2], 0, true,
1746 TGeoTranslation(-xEnv,-yEnvP-dpar[1]-sparysave-fgkOffsetGasPipe,fgkZp),fRsupportpipe);
1747 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1E[3], 0, true,
1748 TGeoTranslation(-xEnv,yEnvP-dpar[1]-sparysave-fgkOffsetGasPipe,fgkZp),fRsupportpipe);
1749
1750 TString volInoxGasPipe = GetVolumeName("volInoxGasPipe", icount);
1751 for (Int_t i=0;i<4;i++)
1752 GetEnvelopes(16+icount)
1753 ->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe1E[i],iVolNum++,3, ppar);
30efacae 1754
1755// 2 vertical
1756
0a31b522 1757 spar[0]=dpar[0];
1758 spar[1]=fgkSizeSupport2V[1];
1759 spar[2]=fgkSizeSupport2V[2];
1760 sparysave=spar[1]+fgkSizeSupport2H[1];
1761 TString volEnvSuppAng2VE[4];
1762 volEnvSuppAng2VE[0] = GetVolEnvSuppAngName("2", "V", "E", icount, 0);
1763 volEnvSuppAng2VE[1] = GetVolEnvSuppAngName("2", "V", "E", icount, 1);
1764 volEnvSuppAng2VE[2] = GetVolEnvSuppAngName("2", "V", "E", icount, 2);
1765 volEnvSuppAng2VE[3] = GetVolEnvSuppAngName("2", "V", "E", icount, 3);
1766 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VE[0], 0, true,
1767 TGeoTranslation(xEnv,-yEnvM-dpar[1],-(fgkSizeVSupExt[0]+spar[2])));
1768 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VE[1], 0, true,
1769 TGeoTranslation(xEnv,yEnvM-dpar[1],-(fgkSizeVSupExt[0]+spar[2])));
1770 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VE[2], 0, true,
1771 TGeoTranslation(-xEnv,-yEnvP-dpar[1],fgkSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1772 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VE[3], 0, true,
1773 TGeoTranslation(-xEnv,yEnvP-dpar[1],fgkSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1774
1775 TString volAluAngSupport2V = GetVolAluAngSuppName("2", "V", icount);
1776 for (Int_t i=0;i<4;i++)
1777 GetEnvelopes(16+icount)
1778 ->AddEnvelopeConstituentParam(volAluAngSupport2V,volEnvSuppAng2VE[i],iVolNum++,3, spar);
30efacae 1779
1780// 2 horizontal
1781
0a31b522 1782 spar[0]=dpar[0];
1783 spar[1]=fgkSizeSupport2H[1];
1784 spar[2]=fgkSizeSupport2H[2];
1785
1786 TString volEnvSuppAng2HE[4];
1787 volEnvSuppAng2HE[0] = GetVolEnvSuppAngName("2", "H", "E", icount, 0);
1788 volEnvSuppAng2HE[1] = GetVolEnvSuppAngName("2", "H", "E", icount, 1);
1789 volEnvSuppAng2HE[2] = GetVolEnvSuppAngName("2", "H", "E", icount, 2);
1790 volEnvSuppAng2HE[3] = GetVolEnvSuppAngName("2", "H", "E", icount, 3);
1791
1792 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HE[0], 0, true,
1793 TGeoTranslation(xEnv,-yEnvM-dpar[1]-sparysave,-(fgkSizeVSupExt[0]+spar[2])));
1794 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HE[1], 0, true,
1795 TGeoTranslation(xEnv,yEnvM-dpar[1]-sparysave,-(fgkSizeVSupExt[0]+spar[2])));
1796 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HE[2], 0, true, TGeoTranslation(-xEnv,-yEnvP-dpar[1]-sparysave,fgkSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1797 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HE[3], 0, true, TGeoTranslation(-xEnv,yEnvP-dpar[1]-sparysave,fgkSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1798
1799 TString volAluAngSupport2H = GetVolAluAngSuppName("2", "H", icount);
1800 for (Int_t i=0;i<4;i++)
1801 GetEnvelopes(16+icount)
1802 ->AddEnvelopeConstituentParam(volAluAngSupport2H,volEnvSuppAng2HE[i],iVolNum++,3, spar);
30efacae 1803
1804// 3 vertical
1805
0a31b522 1806 spar[0]=dpar[0];
1807 spar[1]=fgkSizeSupport1V[1];
1808 spar[2]=fgkSizeSupport1V[2];
1809 sparysave=spar[1];
1810 TString volEnvSuppAng3VE[4];
1811 volEnvSuppAng3VE[0] = GetVolEnvSuppAngName("3", "V", "E", icount, 0);
1812 volEnvSuppAng3VE[1] = GetVolEnvSuppAngName("3", "V", "E", icount, 1);
1813 volEnvSuppAng3VE[2] = GetVolEnvSuppAngName("3", "V", "E", icount, 2);
1814 volEnvSuppAng3VE[3] = GetVolEnvSuppAngName("3", "V", "E", icount, 3);
1815
1816 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VE[0], 0, true,
1817 TGeoTranslation(xEnv,-yEnvM+dpar[1],fgkZm-dpar[2]-spar[2]));
1818 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VE[1], 0, true,
1819 TGeoTranslation(xEnv,yEnvM+dpar[1],fgkZm-dpar[2]-spar[2]));
1820 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VE[2], 0, true,
1821 TGeoTranslation(-xEnv,-yEnvP+dpar[1],fgkZp+dpar[2]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1822 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VE[3], 0, true,
1823 TGeoTranslation(-xEnv,yEnvP+dpar[1],fgkZp+dpar[2]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
30efacae 1824
0a31b522 1825 TString volAluAngSupport3V = GetVolAluAngSuppName("3", "V", icount);
1826 for (Int_t i=0;i<4;i++)
1827 GetEnvelopes(16+icount)
1828 ->AddEnvelopeConstituentParam(volAluAngSupport3V,volEnvSuppAng3VE[i],iVolNum++,3, spar);
30efacae 1829
1830
1831// 3 horizontal
1832
0a31b522 1833 spar[0]=dpar[0];
1834 spar[1]=fgkSizeSupport1H[1];
1835 spar[2]=fgkSizeSupport1H[2];
1836
1837 TString volEnvSuppAng3HE[4];
1838 volEnvSuppAng3HE[0] = GetVolEnvSuppAngName("3", "H", "E", icount, 0);
1839 volEnvSuppAng3HE[1] = GetVolEnvSuppAngName("3", "H", "E", icount, 1);
1840 volEnvSuppAng3HE[2] = GetVolEnvSuppAngName("3", "H", "E", icount, 2);
1841 volEnvSuppAng3HE[3] = GetVolEnvSuppAngName("3", "H", "E", icount, 3);
1842
1843 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HE[0], 0, true,
1844 TGeoTranslation(xEnv,-yEnvM+dpar[1]+sparysave,fgkZm-(dpar[2]-spar[2])));
1845 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HE[1], 0, true,
1846 TGeoTranslation(xEnv,yEnvM+dpar[1]+sparysave,fgkZm-(dpar[2]-spar[2])));
1847 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HE[2], 0, true, TGeoTranslation(-xEnv,-yEnvP+dpar[1]+sparysave,fgkZp+dpar[2]-spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1848 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HE[3], 0, true, TGeoTranslation(-xEnv,yEnvP+dpar[1]+sparysave,fgkZp+dpar[2]-spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1849
1850 TString volAluAngSupport3H = GetVolAluAngSuppName("3", "H", icount);
1851 for (Int_t i=0;i<4;i++)
1852 GetEnvelopes(16+icount)
1853 ->AddEnvelopeConstituentParam(volAluAngSupport3H,volEnvSuppAng3HE[i],iVolNum++,3, spar);
30efacae 1854
1855// gas pipe (high)
0a31b522 1856 ppar[0]=fgkSizeGasPipe[0];
1857 ppar[1]=fgkSizeGasPipe[1];
1858 ppar[2]=dpar[0];
1859 TString volEnvInoxGasPipe2E[4];
1860 volEnvInoxGasPipe2E[0] = GetVolEnvInoxGasPipeName("2", "E", icount, 0);
1861 volEnvInoxGasPipe2E[1] = GetVolEnvInoxGasPipeName("2", "E", icount, 1);
1862 volEnvInoxGasPipe2E[2] = GetVolEnvInoxGasPipeName("2", "E", icount, 2);
1863 volEnvInoxGasPipe2E[3] = GetVolEnvInoxGasPipeName("2", "E", icount, 3);
1864 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2E[0], 0, true,
1865 TGeoTranslation(xEnv,-yEnvM+dpar[1]+sparysave+fgkOffsetGasPipe,fgkZm),fRsupportpipe);
1866 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2E[1], 0, true,
1867 TGeoTranslation(xEnv,yEnvM+dpar[1]+sparysave+fgkOffsetGasPipe,fgkZm),fRsupportpipe);
1868 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2E[2], 0, true,
1869 TGeoTranslation(-xEnv,-yEnvP+dpar[1]+sparysave+fgkOffsetGasPipe,fgkZp),fRsupportpipe);
1870 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2E[3], 0, true,
1871 TGeoTranslation(-xEnv,yEnvP+dpar[1]+sparysave+fgkOffsetGasPipe,fgkZp),fRsupportpipe);
1872
1873 for (Int_t i=0;i<4;i++)
1874 GetEnvelopes(16+icount)
1875 ->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe2E[i],iVolNum++,3, ppar);
30efacae 1876
1877// 4 vertical
1878
0a31b522 1879 spar[0]=dpar[0];
1880 spar[1]=fgkSizeSupport2V[1];
1881 spar[2]=fgkSizeSupport2V[2];
1882 sparysave=spar[1]+fgkSizeSupport2H[1];
1883
1884 TString volEnvSuppAng4VE[4];
1885 volEnvSuppAng4VE[0] = GetVolEnvSuppAngName("4", "V", "E", icount, 0);
1886 volEnvSuppAng4VE[1] = GetVolEnvSuppAngName("4", "V", "E", icount, 1);
1887 volEnvSuppAng4VE[2] = GetVolEnvSuppAngName("4", "V", "E", icount, 2);
1888 volEnvSuppAng4VE[3] = GetVolEnvSuppAngName("4", "V", "E", icount, 3);
1889
1890 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VE[0], 0, true,
1891 TGeoTranslation(xEnv,-yEnvM+dpar[1],-(fgkSizeVSupExt[0]+spar[2])));
1892 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VE[1], 0, true,
1893 TGeoTranslation(xEnv,yEnvM+dpar[1],-(fgkSizeVSupExt[0]+spar[2])));
1894 GetEnvelopes(16+icount)
1895 ->AddEnvelope(volEnvSuppAng4VE[2], 0, true,
1896 TGeoTranslation(-xEnv,-yEnvP+dpar[1],fgkSizeVSupExt[0]+spar[2]),
1897 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1898 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VE[3], 0, true,
1899 TGeoTranslation(-xEnv,yEnvP+dpar[1],fgkSizeVSupExt[0]+spar[2]),
1900 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1901
1902 TString volAluAngSupport4V = GetVolAluAngSuppName("4", "V", icount);
1903 for (Int_t i=0;i<4;i++)
1904 GetEnvelopes(16+icount)
1905 ->AddEnvelopeConstituentParam(volAluAngSupport4V,volEnvSuppAng4VE[i],iVolNum++,3, spar);
30efacae 1906
1907// 4 horizontal
1908
0a31b522 1909 spar[0]=dpar[0];
1910 spar[1]=fgkSizeSupport2H[1];
1911 spar[2]=fgkSizeSupport2H[2];
1912
1913 TString volEnvSuppAng4HE[4];
1914 volEnvSuppAng4HE[0] = GetVolEnvSuppAngName("4", "H", "E", icount, 0);
1915 volEnvSuppAng4HE[1] = GetVolEnvSuppAngName("4", "H", "E", icount, 1);
1916 volEnvSuppAng4HE[2] = GetVolEnvSuppAngName("4", "H", "E", icount, 2);
1917 volEnvSuppAng4HE[3] = GetVolEnvSuppAngName("4", "H", "E", icount, 3);
1918
1919 GetEnvelopes(16+icount)
1920 ->AddEnvelope(volEnvSuppAng4HE[0], 0, true,
1921 TGeoTranslation(xEnv,-yEnvM+dpar[1]+sparysave,-(fgkSizeVSupExt[0]+spar[2])));
1922 GetEnvelopes(16+icount)
1923 ->AddEnvelope(volEnvSuppAng4HE[1], 0, true,
1924 TGeoTranslation(xEnv,yEnvM+dpar[1]+sparysave,-(fgkSizeVSupExt[0]+spar[2])));
1925 GetEnvelopes(16+icount)
1926 ->AddEnvelope(volEnvSuppAng4HE[2], 0, true,
1927 TGeoTranslation(-xEnv,-yEnvP+dpar[1]+sparysave,fgkSizeVSupExt[0]+spar[2]),
1928 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1929 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HE[3], 0, true,
1930 TGeoTranslation(-xEnv,yEnvP+dpar[1]+sparysave,fgkSizeVSupExt[0]+spar[2]),
1931 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1932
1933 TString volAluAngSupport4H = GetVolAluAngSuppName("4", "H", icount);
1934 for (Int_t i=0;i<4;i++)
1935 GetEnvelopes(16+icount)
1936 ->AddEnvelopeConstituentParam(volAluAngSupport4H,volEnvSuppAng4HE[i],iVolNum++,3, spar);
30efacae 1937
1938// X horizontal
0a31b522 1939 spar[0]=(fgkYVSup[3]-fgkYVSup[0])/2.*zRatio;
1940 spar[1]=fgkSizeSupportXH[1];
1941 spar[2]=fgkSizeSupportXH[2];
1942 Double_t sparysavex=spar[1];
1943
1944 TString volEnvSuppAngXHE[4];
1945 volEnvSuppAngXHE[0] = GetVolEnvSuppAngName("X", "H", "E", icount, 0);
1946 volEnvSuppAngXHE[1] = GetVolEnvSuppAngName("X", "H", "E", icount, 1);
1947 volEnvSuppAngXHE[2] = GetVolEnvSuppAngName("X", "H", "E", icount, 2);
1948 volEnvSuppAngXHE[3] = GetVolEnvSuppAngName("X", "H", "E", icount, 3);
1949
1950 GetEnvelopes(16+icount)
1951 ->AddEnvelope(volEnvSuppAngXHE[0], 0, true,
1952 TGeoTranslation(spar[0]+fgkYVSup[0]*zRatio,-yEnvM+dpar[1]+sparysave+1.0,
1953 -(fgkSizeVSupExt[0]+spar[2])));
1954 GetEnvelopes(16+icount)
1955 ->AddEnvelope(volEnvSuppAngXHE[1], 0, true,
1956 TGeoTranslation(spar[0]+fgkYVSup[0]*zRatio,yEnvM+dpar[1]+sparysave+1.0,
1957 -(fgkSizeVSupExt[0]+spar[2])));
1958 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHE[2], 0, true,
1959 TGeoTranslation(-(spar[0]+fgkYVSup[0]*zRatio),-yEnvP+dpar[1]+sparysave+1.0,
1960 fgkSizeVSupExt[0]+spar[2]),
1961 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1962 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHE[3], 0, true,
1963 TGeoTranslation(-(spar[0]+fgkYVSup[0]*zRatio),yEnvP+dpar[1]+sparysave+1.0,
1964 fgkSizeVSupExt[0]+spar[2]),
1965 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1966
1967 TString volAluAngSupportXH = GetVolAluAngSuppName("X", "H", icount);
1968 for (Int_t i=0;i<4;i++)
1969 GetEnvelopes(16+icount)
1970 ->AddEnvelopeConstituentParam(volAluAngSupportXH,volEnvSuppAngXHE[i],iVolNum++,3, spar);
30efacae 1971
1972// X vertical
0a31b522 1973 spar[0]=(fgkYVSup[3]-fgkYVSup[0])/2.*zRatio;
1974 spar[1]=fgkSizeSupportXV[1];
1975 spar[2]=fgkSizeSupportXV[2];
1976
1977 TString volEnvSuppAngXVE[4];
1978 volEnvSuppAngXVE[0] = GetVolEnvSuppAngName("X", "V", "E", icount, 0);
1979 volEnvSuppAngXVE[1] = GetVolEnvSuppAngName("X", "V", "E", icount, 1);
1980 volEnvSuppAngXVE[2] = GetVolEnvSuppAngName("X", "V", "E", icount, 2);
1981 volEnvSuppAngXVE[3] = GetVolEnvSuppAngName("X", "V", "E", icount, 3);
1982
1983 GetEnvelopes(16+icount)
1984 ->AddEnvelope(volEnvSuppAngXVE[0], 0, true,
1985 TGeoTranslation(spar[0]+fgkYVSup[0]*zRatio,-yEnvM+dpar[1]+sparysave+1.0+sparysavex+spar[1],
1986 -(fgkSizeVSupExt[0]+spar[2])));
1987 GetEnvelopes(16+icount)
1988 ->AddEnvelope(volEnvSuppAngXVE[1], 0, true,
1989 TGeoTranslation(spar[0]+fgkYVSup[0]*zRatio,yEnvM+dpar[1]+sparysave+1.0+sparysavex+spar[1],
1990 -(fgkSizeVSupExt[0]+spar[2])));
1991 GetEnvelopes(16+icount)
1992 ->AddEnvelope(volEnvSuppAngXVE[2], 0, true,
1993 TGeoTranslation(-(spar[0]+fgkYVSup[0]*zRatio),-yEnvP+dpar[1]+sparysave+1.0+sparysavex+spar[1],
1994 fgkSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1995 GetEnvelopes(16+icount)
1996 ->AddEnvelope(volEnvSuppAngXVE[3], 0, true,
1997 TGeoTranslation(-(spar[0]+fgkYVSup[0]*zRatio),yEnvP+dpar[1]+sparysave+1.0+sparysavex+spar[1],
1998 fgkSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
1999
2000 TString volAluAngSupportXV = GetVolAluAngSuppName("X", "V", icount);
2001 for (Int_t i=0;i<4;i++)
2002 GetEnvelopes(16+icount)
2003 ->AddEnvelopeConstituentParam(volAluAngSupportXV,volEnvSuppAngXVE[i],iVolNum++,3, spar);
2004
2005 // keep values of yEnvP, yEnvM
2006 fYEnvPsave = yEnvP;
2007 fYEnvMsave = yEnvM;
2008}
2009
2010//______________________________________________________________________________
2011void AliMUONTriggerGeometryBuilder::BuildChamberTypeF(Int_t& iVolNum, Int_t icount)
2012{
2013// ratio of zpos1m/zpos1p and inverse for first plane
2014 Float_t zpos1= AliMUONConstants::DefaultChamberZ(10);
2015 Float_t zmp=(zpos1-3.6)/(zpos1+3.6);
2016 Float_t zpm=1./zmp;
2017 Float_t zRatio = AliMUONConstants::DefaultRatioTriggerChamber(icount);
2018 Float_t xEnv = (fgkDXZERO+fgkXMAX/2.)*zRatio;
2019
2020 Double_t dpar[3];
2021 Double_t spar[3];
2022 Double_t ppar[3];
d1cd2474 2023
2024// F
0a31b522 2025 dpar[0] = (fgkXMAX/2.)*zRatio;
2026 dpar[1] = fgkYMIN*zRatio;
2027 dpar[2] = 0.4;
2028
2029 Float_t yEnvP = 0;
2030 Float_t yEnvM = 0;
2031 yEnvP = (fYEnvMsave + fgkYMIN * zRatio ) * zpm + fgkYMIN * zRatio;
2032 yEnvM = (fYEnvPsave + fgkYMIN * zRatio ) * zmp + fgkYMIN * zRatio;
2033
2034 Int_t detElemId = (10+icount+1)*100+14;
2035 TString volEnv0 = GetVolEnvName(icount, 0);
2036 TString volEnv8 = GetVolEnvName(icount, 8);
2037 TString volEnv9 = GetVolEnvName(icount, 9);
2038 TString volEnv17 = GetVolEnvName(icount, 17);
2039 TString volAlu = GetVolumeName("volAlu", icount);
2040 GetEnvelopes(16+icount)
2041 ->AddEnvelope(volEnv0, detElemId, true, TGeoTranslation(xEnv,-yEnvP,fgkZp));
2042 detElemId = (10+icount+1)*100+4;
2043 GetEnvelopes(16+icount)
2044 ->AddEnvelope(volEnv8, detElemId, true, TGeoTranslation(xEnv, yEnvP,fgkZp));
2045 detElemId = (10+icount+1)*100+13;
2046 GetEnvelopes(16+icount)
2047 ->AddEnvelope(volEnv9, detElemId, true, TGeoTranslation(-xEnv,-yEnvM,fgkZm),
2048 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
2049 detElemId = (10+icount+1)*100+5;
2050 GetEnvelopes(16+icount)
2051 ->AddEnvelope(volEnv17, detElemId, true, TGeoTranslation(-xEnv, yEnvM,fgkZm),
2052 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
2053
2054 GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAlu,volEnv0,iVolNum++,3,dpar);
2055 GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAlu,volEnv8,iVolNum++,3,dpar);
2056 GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAlu,volEnv9,iVolNum++,3,dpar);
2057 GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAlu,volEnv17,iVolNum++,3,dpar);
d1cd2474 2058
30efacae 2059// horizontal cable support chamber type F
2060
0a31b522 2061 char volEnvSupportHF[12][8];
2062 for(Int_t jj=0;jj<2;jj++){
2063 for(Int_t ii=0;ii<6;ii++){
2064 snprintf(volEnvSupportHF[6*jj+ii],8,"SA%dHF%d",icount+1,6*jj+ii);
2065 }
2066 }
2067
2068 spar[0]=dpar[0]-(fgkYVSup[0]/2.)*zRatio;
2069 spar[1]=fgkSizeSupportCable[1];
2070 spar[2]=fgkSizeSupportCable[2];
2071 for(Int_t in=0;in<3;in++){
2072 GetEnvelopes(16+icount)
2073 ->AddEnvelope(volEnvSupportHF[in], 0, true,
2074 TGeoTranslation(xEnv+fgkYVSup[0]/2.*zRatio,-(yEnvP+dpar[1]/2.*(in-1)),
2075 -(fgkSizeVSupExt[0]+spar[2])));
2076 GetEnvelopes(16+icount)
2077 ->AddEnvelope(volEnvSupportHF[in+3], 0, true,
2078 TGeoTranslation(xEnv+fgkYVSup[0]/2.*zRatio,yEnvP+dpar[1]/2.*(in-1),
2079 -(fgkSizeVSupExt[0]+spar[2])));
2080 GetEnvelopes(16+icount)
2081 ->AddEnvelope(volEnvSupportHF[in+6], 0, true,
2082 TGeoTranslation(-(xEnv+fgkYVSup[0]/2.*zRatio),-(yEnvM+dpar[1]/2.*(in-1)),
2083 fgkSizeVSupExt[0]+spar[2]),
2084 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
2085 GetEnvelopes(16+icount)
2086 ->AddEnvelope(volEnvSupportHF[in+9], 0, true,
2087 TGeoTranslation(-(xEnv+fgkYVSup[0]/2.*zRatio), yEnvM+dpar[1]/2.*(in-1),
2088 fgkSizeVSupExt[0]+spar[2]),
2089 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
2090 }
2091 for(Int_t ii=0;ii<12;ii++) {
2092 TString volAluSupportH = GetVolumeName("volAluSupportH", icount);
2093 GetEnvelopes(16+icount)
2094 ->AddEnvelopeConstituentParam(volAluSupportH,volEnvSupportHF[ii],iVolNum++,3, spar);
2095 }
30efacae 2096
2097// angular supports chamber type F
2098// 1 vertical
2099
0a31b522 2100 spar[0]=dpar[0];
2101 spar[1]=fgkSizeSupport1V[1];
2102 spar[2]=fgkSizeSupport1V[2];
2103 Double_t sparysave=spar[1];
2104 TString volEnvSuppAng1VF[4];
2105 volEnvSuppAng1VF[0] = GetVolEnvSuppAngName("1", "V", "F", icount, 0);
2106 volEnvSuppAng1VF[1] = GetVolEnvSuppAngName("1", "V", "F", icount, 1);
2107 volEnvSuppAng1VF[2] = GetVolEnvSuppAngName("1", "V", "F", icount, 2);
2108 volEnvSuppAng1VF[3] = GetVolEnvSuppAngName("1", "V", "F", icount, 3);
2109
2110 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VF[0], 0, true,
2111 TGeoTranslation(xEnv,-yEnvP-dpar[1],fgkZp+dpar[2]+spar[2]));
2112 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VF[1], 0, true,
2113 TGeoTranslation(xEnv,yEnvP-dpar[1],fgkZp+dpar[2]+spar[2]));
2114 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VF[2], 0, true,
2115 TGeoTranslation(-xEnv,-yEnvM-dpar[1],fgkZm-dpar[2]-spar[2]),
2116 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
2117 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VF[3], 0, true,
2118 TGeoTranslation(-xEnv,yEnvM-dpar[1],fgkZm-dpar[2]-spar[2]),
2119 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
30efacae 2120
0a31b522 2121 TString volAluAngSupport1V = GetVolAluAngSuppName("1", "V", icount);
2122 for (Int_t i=0;i<4;i++)
2123 GetEnvelopes(16+icount)
2124 ->AddEnvelopeConstituentParam(volAluAngSupport1V,volEnvSuppAng1VF[i],iVolNum++,3, spar);
30efacae 2125
2126// 1 horizontal
2127
0a31b522 2128 spar[0]=dpar[0];
2129 spar[1]=fgkSizeSupport1H[1];
2130 spar[2]=fgkSizeSupport1H[2];
2131
2132 TString volEnvSuppAng1HF[4];
2133 volEnvSuppAng1HF[0] = GetVolEnvSuppAngName("1", "H", "F", icount, 0);
2134 volEnvSuppAng1HF[1] = GetVolEnvSuppAngName("1", "H", "F", icount, 1);
2135 volEnvSuppAng1HF[2] = GetVolEnvSuppAngName("1", "H", "F", icount, 2);
2136 volEnvSuppAng1HF[3] = GetVolEnvSuppAngName("1", "H", "F", icount, 3);
2137
2138 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HF[0], 0, true,
2139 TGeoTranslation(xEnv,-yEnvP-dpar[1]-sparysave,fgkZp+dpar[2]-spar[2]));
2140 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HF[1], 0, true,
2141 TGeoTranslation(xEnv,yEnvP-dpar[1]-sparysave,fgkZp+dpar[2]-spar[2]));
2142 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HF[2], 0, true,
2143 TGeoTranslation(-xEnv,-yEnvM-dpar[1]-sparysave,fgkZm-(dpar[2]-spar[2])),
2144 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
2145 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HF[3], 0, true,
2146 TGeoTranslation(-xEnv,yEnvM-dpar[1]-sparysave,fgkZm-(dpar[2]-spar[2])),
2147 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
2148
2149 TString volAluAngSupport1H = GetVolAluAngSuppName("1", "H", icount);
2150 for (Int_t i=0;i<4;i++)
2151 GetEnvelopes(16+icount)
2152 ->AddEnvelopeConstituentParam(volAluAngSupport1H,volEnvSuppAng1HF[i],iVolNum++,3, spar);
30efacae 2153
2154// gas pipe (low)
0a31b522 2155 ppar[0]=fgkSizeGasPipe[0];
2156 ppar[1]=fgkSizeGasPipe[1];
2157 ppar[2]=dpar[0];
2158 TString volEnvInoxGasPipe1F[4];
2159 volEnvInoxGasPipe1F[0] = GetVolEnvInoxGasPipeName("1", "F", icount, 0);
2160 volEnvInoxGasPipe1F[1] = GetVolEnvInoxGasPipeName("1", "F", icount, 1);
2161 volEnvInoxGasPipe1F[2] = GetVolEnvInoxGasPipeName("1", "F", icount, 2);
2162 volEnvInoxGasPipe1F[3] = GetVolEnvInoxGasPipeName("1", "F", icount, 3);
2163 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1F[0], 0, true,
2164 TGeoTranslation(xEnv,-yEnvP-dpar[1]-sparysave-fgkOffsetGasPipe,fgkZp),fRsupportpipe);
2165 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1F[1], 0, true,
2166 TGeoTranslation(xEnv,yEnvP-dpar[1]-sparysave-fgkOffsetGasPipe,fgkZp),fRsupportpipe);
2167 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1F[2], 0, true,
2168 TGeoTranslation(-xEnv,-yEnvM-dpar[1]-sparysave-fgkOffsetGasPipe,fgkZm),fRsupportpipe);
2169 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1F[3], 0, true,
2170 TGeoTranslation(-xEnv,yEnvM-dpar[1]-sparysave-fgkOffsetGasPipe,fgkZm),fRsupportpipe);
2171
2172 TString volInoxGasPipe = GetVolumeName("volInoxGasPipe", icount);
2173 for (Int_t i=0;i<4;i++)
2174 GetEnvelopes(16+icount)
2175 ->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe1F[i],iVolNum++,3, ppar);
30efacae 2176
2177// 2 vertical
2178
0a31b522 2179 spar[0]=dpar[0];
2180 spar[1]=fgkSizeSupport2V[1];
2181 spar[2]=fgkSizeSupport2V[2];
2182 sparysave=spar[1]+fgkSizeSupport2H[1];
2183
2184 TString volEnvSuppAng2VF[4];
2185 volEnvSuppAng2VF[0] = GetVolEnvSuppAngName("2", "V", "F", icount, 0);
2186 volEnvSuppAng2VF[1] = GetVolEnvSuppAngName("2", "V", "F", icount, 1);
2187 volEnvSuppAng2VF[2] = GetVolEnvSuppAngName("2", "V", "F", icount, 2);
2188 volEnvSuppAng2VF[3] = GetVolEnvSuppAngName("2", "V", "F", icount, 3);
2189
2190 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VF[0], 0, true,
2191 TGeoTranslation(xEnv,-yEnvP-dpar[1],fgkSizeVSupExt[0]+spar[2]));
2192 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VF[1], 0, true,
2193 TGeoTranslation(xEnv,yEnvP-dpar[1],fgkSizeVSupExt[0]+spar[2]));
2194 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VF[2], 0, true,
2195 TGeoTranslation(-xEnv,-yEnvM-dpar[1],-(fgkSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
2196 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VF[3], 0, true,
2197 TGeoTranslation(-xEnv,yEnvM-dpar[1],-(fgkSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
2198
2199 TString volAluAngSupport2V = GetVolAluAngSuppName("2", "V", icount);
2200 for (Int_t i=0;i<4;i++)
2201 GetEnvelopes(16+icount)
2202 ->AddEnvelopeConstituentParam(volAluAngSupport2V,volEnvSuppAng2VF[i],iVolNum++,3, spar);
30efacae 2203
2204// 2 horizontal
2205
0a31b522 2206 spar[0]=dpar[0];
2207 spar[1]=fgkSizeSupport2H[1];
2208 spar[2]=fgkSizeSupport2H[2];
2209
2210 TString volEnvSuppAng2HF[4];
2211 volEnvSuppAng2HF[0] = GetVolEnvSuppAngName("2", "H", "F", icount, 0);
2212 volEnvSuppAng2HF[1] = GetVolEnvSuppAngName("2", "H", "F", icount, 1);
2213 volEnvSuppAng2HF[2] = GetVolEnvSuppAngName("2", "H", "F", icount, 2);
2214 volEnvSuppAng2HF[3] = GetVolEnvSuppAngName("2", "H", "F", icount, 3);
2215
2216 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HF[0], 0, true,
2217 TGeoTranslation(xEnv,-yEnvP-dpar[1]-sparysave,fgkSizeVSupExt[0]+spar[2]));
2218 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HF[1], 0, true,
2219 TGeoTranslation(xEnv,yEnvP-dpar[1]-sparysave,fgkSizeVSupExt[0]+spar[2]));
2220 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HF[2], 0, true,
2221 TGeoTranslation(-xEnv,-yEnvM-dpar[1]-sparysave,-(fgkSizeVSupExt[0]+spar[2])),
2222 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
2223 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HF[3], 0, true,
2224 TGeoTranslation(-xEnv,yEnvM-dpar[1]-sparysave,-(fgkSizeVSupExt[0]+spar[2])),
2225 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
2226
2227 TString volAluAngSupport2H = GetVolAluAngSuppName("2", "H", icount);
2228 for (Int_t i=0;i<4;i++)
2229 GetEnvelopes(16+icount)
2230 ->AddEnvelopeConstituentParam(volAluAngSupport2H,volEnvSuppAng2HF[i],iVolNum++,3, spar);
30efacae 2231
2232// 3 vertical
2233
0a31b522 2234 spar[0]=dpar[0];
2235 spar[1]=fgkSizeSupport1V[1];
2236 spar[2]=fgkSizeSupport1V[2];
2237 sparysave=spar[1];
2238
2239 TString volEnvSuppAng3VF[4];
2240 volEnvSuppAng3VF[0] = GetVolEnvSuppAngName("3", "V", "F", icount, 0);
2241 volEnvSuppAng3VF[1] = GetVolEnvSuppAngName("3", "V", "F", icount, 1);
2242 volEnvSuppAng3VF[2] = GetVolEnvSuppAngName("3", "V", "F", icount, 2);
2243 volEnvSuppAng3VF[3] = GetVolEnvSuppAngName("3", "V", "F", icount, 3);
2244
2245 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VF[0], 0, true,
2246 TGeoTranslation(xEnv,-yEnvP+dpar[1],fgkZp+dpar[2]+spar[2]));
2247 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VF[1], 0, true,
2248 TGeoTranslation(xEnv,yEnvP+dpar[1],fgkZp+dpar[2]+spar[2]));
2249 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VF[2], 0, true,
2250 TGeoTranslation(-xEnv,-yEnvM+dpar[1],fgkZm-dpar[2]-spar[2]),
2251 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
2252 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VF[3], 0, true,
2253 TGeoTranslation(-xEnv,yEnvM+dpar[1],fgkZm-dpar[2]-spar[2]),
2254 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
2255
2256 TString volAluAngSupport3V = GetVolAluAngSuppName("3", "V", icount);
2257 for (Int_t i=0;i<4;i++)
2258 GetEnvelopes(16+icount)
2259 ->AddEnvelopeConstituentParam(volAluAngSupport3V,volEnvSuppAng3VF[i],iVolNum++,3, spar);
30efacae 2260
2261// 3 horizontal
2262
0a31b522 2263 spar[0]=dpar[0];
2264 spar[1]=fgkSizeSupport1H[1];
2265 spar[2]=fgkSizeSupport1H[2];
2266
2267 TString volEnvSuppAng3HF[4];
2268 volEnvSuppAng3HF[0] = GetVolEnvSuppAngName("3", "H", "F", icount, 0);
2269 volEnvSuppAng3HF[1] = GetVolEnvSuppAngName("3", "H", "F", icount, 1);
2270 volEnvSuppAng3HF[2] = GetVolEnvSuppAngName("3", "H", "F", icount, 2);
2271 volEnvSuppAng3HF[3] = GetVolEnvSuppAngName("3", "H", "F", icount, 3);
2272
2273 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HF[0], 0, true,
2274 TGeoTranslation(xEnv,-yEnvP+dpar[1]+sparysave,fgkZp+dpar[2]-spar[2]));
2275 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HF[1], 0, true,
2276 TGeoTranslation(xEnv,yEnvP+dpar[1]+sparysave,fgkZp+dpar[2]-spar[2]));
2277 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HF[2], 0, true,
2278 TGeoTranslation(-xEnv,-yEnvM+dpar[1]+sparysave,fgkZm-(dpar[2]-spar[2])),
2279 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
2280 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HF[3], 0, true,
2281 TGeoTranslation(-xEnv,yEnvM+dpar[1]+sparysave,fgkZm-(dpar[2]-spar[2])),
2282 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
2283
2284 TString volAluAngSupport3H = GetVolAluAngSuppName("3", "H", icount);
2285 for (Int_t i=0;i<4;i++)
2286 GetEnvelopes(16+icount)
2287 ->AddEnvelopeConstituentParam(volAluAngSupport3H,volEnvSuppAng3HF[i],iVolNum++,3, spar);
2288
30efacae 2289// gas pipe (high)
0a31b522 2290 ppar[0]=fgkSizeGasPipe[0];
2291 ppar[1]=fgkSizeGasPipe[1];
2292 ppar[2]=dpar[0];
2293 TString volEnvInoxGasPipe2F[4];
2294 volEnvInoxGasPipe2F[0] = GetVolEnvInoxGasPipeName("2", "F", icount, 0);
2295 volEnvInoxGasPipe2F[1] = GetVolEnvInoxGasPipeName("2", "F", icount, 1);
2296 volEnvInoxGasPipe2F[2] = GetVolEnvInoxGasPipeName("2", "F", icount, 2);
2297 volEnvInoxGasPipe2F[3] = GetVolEnvInoxGasPipeName("2", "F", icount, 3);
2298 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2F[0], 0, true,
2299 TGeoTranslation(xEnv,-yEnvP+dpar[1]+sparysave+fgkOffsetGasPipe,fgkZp),fRsupportpipe);
2300 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2F[1], 0, true,
2301 TGeoTranslation(xEnv,yEnvP+dpar[1]+sparysave+fgkOffsetGasPipe,fgkZp),fRsupportpipe);
2302 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2F[2], 0, true,
2303 TGeoTranslation(-xEnv,-yEnvM+dpar[1]+sparysave+fgkOffsetGasPipe,fgkZm),fRsupportpipe);
2304 GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2F[3], 0, true,
2305 TGeoTranslation(-xEnv,yEnvM+dpar[1]+sparysave+fgkOffsetGasPipe,fgkZm),fRsupportpipe);
2306
2307 for (Int_t i=0;i<4;i++)
2308 GetEnvelopes(16+icount)
2309 ->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe2F[i],iVolNum++,3, ppar);
30efacae 2310
2311// 4 vertical
2312
0a31b522 2313 spar[0]=dpar[0];
2314 spar[1]=fgkSizeSupport2V[1];
2315 spar[2]=fgkSizeSupport2V[2];
2316 sparysave=spar[1]+fgkSizeSupport2H[1];
2317
2318 TString volEnvSuppAng4VF[4];
2319 volEnvSuppAng4VF[0] = GetVolEnvSuppAngName("4", "V", "F", icount, 0);
2320 volEnvSuppAng4VF[1] = GetVolEnvSuppAngName("4", "V", "F", icount, 1);
2321 volEnvSuppAng4VF[2] = GetVolEnvSuppAngName("4", "V", "F", icount, 2);
2322 volEnvSuppAng4VF[3] = GetVolEnvSuppAngName("4", "V", "F", icount, 3);
2323
2324 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VF[0], 0, true,
2325 TGeoTranslation(xEnv,-yEnvP+dpar[1],fgkSizeVSupExt[0]+spar[2]));
2326 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VF[1], 0, true,
2327 TGeoTranslation(xEnv,yEnvP+dpar[1],fgkSizeVSupExt[0]+spar[2]));
2328 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VF[2], 0, true,
2329 TGeoTranslation(-xEnv,-yEnvM+dpar[1],-(fgkSizeVSupExt[0]+spar[2])),
2330 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
2331 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VF[3], 0, true,
2332 TGeoTranslation(-xEnv,yEnvM+dpar[1],-(fgkSizeVSupExt[0]+spar[2])),
2333 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
2334
2335 TString volAluAngSupport4V = GetVolAluAngSuppName("4", "V", icount);
2336 for (Int_t i=0;i<4;i++)
2337 GetEnvelopes(16+icount)
2338 ->AddEnvelopeConstituentParam(volAluAngSupport4V,volEnvSuppAng4VF[i],iVolNum++,3, spar);
30efacae 2339
2340// 4 horizontal
2341
0a31b522 2342 spar[0]=dpar[0];
2343 spar[1]=fgkSizeSupport2H[1];
2344 spar[2]=fgkSizeSupport2H[2];
2345
2346 TString volEnvSuppAng4HF[4];
2347 volEnvSuppAng4HF[0] = GetVolEnvSuppAngName("4", "H", "F", icount, 0);
2348 volEnvSuppAng4HF[1] = GetVolEnvSuppAngName("4", "H", "F", icount, 1);
2349 volEnvSuppAng4HF[2] = GetVolEnvSuppAngName("4", "H", "F", icount, 2);
2350 volEnvSuppAng4HF[3] = GetVolEnvSuppAngName("4", "H", "F", icount, 3);
2351
2352 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HF[0], 0, true,
2353 TGeoTranslation(xEnv,-yEnvP+dpar[1]+sparysave,fgkSizeVSupExt[0]+spar[2]));
2354 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HF[1], 0, true,
2355 TGeoTranslation(xEnv,yEnvP+dpar[1]+sparysave,fgkSizeVSupExt[0]+spar[2]));
2356 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HF[2], 0, true,
2357 TGeoTranslation(-xEnv,-yEnvM+dpar[1]+sparysave,-(fgkSizeVSupExt[0]+spar[2])),
2358 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
2359 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HF[3], 0, true,
2360 TGeoTranslation(-xEnv,yEnvM+dpar[1]+sparysave,-(fgkSizeVSupExt[0]+spar[2])),
2361 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
2362
2363 TString volAluAngSupport4H = GetVolAluAngSuppName("4", "H", icount);
2364 for (Int_t i=0;i<4;i++)
2365 GetEnvelopes(16+icount)
2366 ->AddEnvelopeConstituentParam(volAluAngSupport4H,volEnvSuppAng4HF[i],iVolNum++,3, spar);
30efacae 2367
2368
2369// X horizontal
0a31b522 2370 spar[0]=(fgkYVSup[3]-fgkYVSup[0])/2.*zRatio;
2371 spar[1]=fgkSizeSupportXH[1];
2372 spar[2]=fgkSizeSupportXH[2];
2373 Double_t sparysavex=spar[1];
2374
2375 TString volEnvSuppAngXHF[4];
2376 volEnvSuppAngXHF[0] = GetVolEnvSuppAngName("X", "H", "F", icount, 0);
2377 volEnvSuppAngXHF[1] = GetVolEnvSuppAngName("X", "H", "F", icount, 1);
2378 volEnvSuppAngXHF[2] = GetVolEnvSuppAngName("X", "H", "F", icount, 2);
2379 volEnvSuppAngXHF[3] = GetVolEnvSuppAngName("X", "H", "F", icount, 3);
2380
2381 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHF[0], 0, true,
2382 TGeoTranslation(spar[0]+fgkYVSup[0]*zRatio,-yEnvP+dpar[1]+sparysave+1.0,
2383 fgkSizeVSupExt[0]+spar[2]));
2384 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHF[1], 0, true,
2385 TGeoTranslation(spar[0]+fgkYVSup[0]*zRatio,yEnvP+dpar[1]+sparysave+1.0,
2386 fgkSizeVSupExt[0]+spar[2]));
2387 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHF[2], 0, true,
2388 TGeoTranslation(-(spar[0]+fgkYVSup[0]*zRatio),-yEnvM+dpar[1]+sparysave+1.0,
2389 -(fgkSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
2390 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHF[3], 0, true,
2391 TGeoTranslation(-(spar[0]+fgkYVSup[0]*zRatio),yEnvM+dpar[1]+sparysave+1.0,
2392 -(fgkSizeVSupExt[0]+spar[2])),
2393 TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
2394
2395 TString volAluAngSupportXH = GetVolAluAngSuppName("X", "H", icount);
2396 for (Int_t i=0;i<4;i++)
2397 GetEnvelopes(16+icount)
2398 ->AddEnvelopeConstituentParam(volAluAngSupportXH,volEnvSuppAngXHF[i],iVolNum++,3, spar);
30efacae 2399
2400// X vertical
0a31b522 2401 spar[0]=(fgkYVSup[3]-fgkYVSup[0])/2.*zRatio;
2402 spar[1]=fgkSizeSupportXV[1];
2403 spar[2]=fgkSizeSupportXV[2];
2404
2405 TString volEnvSuppAngXVF[4];
2406 volEnvSuppAngXVF[0] = GetVolEnvSuppAngName("X", "V", "F", icount, 0);
2407 volEnvSuppAngXVF[1] = GetVolEnvSuppAngName("X", "V", "F", icount, 1);
2408 volEnvSuppAngXVF[2] = GetVolEnvSuppAngName("X", "V", "F", icount, 2);
2409 volEnvSuppAngXVF[3] = GetVolEnvSuppAngName("X", "V", "F", icount, 3);
2410
2411 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXVF[0], 0, true,
2412 TGeoTranslation(spar[0]+fgkYVSup[0]*zRatio,-yEnvP+dpar[1]+sparysave+1.0+sparysavex+spar[1],
2413 fgkSizeVSupExt[0]+spar[2]));
2414 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXVF[1], 0, true,
2415 TGeoTranslation(spar[0]+fgkYVSup[0]*zRatio,yEnvP+dpar[1]+sparysave+1.0+sparysavex+spar[1],
2416 fgkSizeVSupExt[0]+spar[2]));
2417 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXVF[2], 0, true,
2418 TGeoTranslation(-(spar[0]+fgkYVSup[0]*zRatio),-yEnvM+dpar[1]+sparysave+1.0+sparysavex+spar[1],
2419 -(fgkSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
2420 GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXVF[3], 0, true,
2421 TGeoTranslation(-(spar[0]+fgkYVSup[0]*zRatio),yEnvM+dpar[1]+sparysave+1.0+sparysavex+spar[1],
2422 -(fgkSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
2423
2424 TString volAluAngSupportXV = GetVolAluAngSuppName("X", "V", icount);
2425 for (Int_t i=0;i<4;i++)
2426 GetEnvelopes(16+icount)
2427 ->AddEnvelopeConstituentParam(volAluAngSupportXV,volEnvSuppAngXVF[i],iVolNum++,3, spar);
2428
2429 // keep values of yEnvP, yEnvM
2430 fYEnvPsave = yEnvP;
2431 fYEnvMsave = yEnvM;
2432}
2433
2434//
2435// public methods
2436//
2437
2438//______________________________________________________________________________
2439void AliMUONTriggerGeometryBuilder::CreateGeometry()
2440{
2441/// From AliMUONv1::CreateGeometry()
2442
2443 /*
2444 zpos1 and zpos2 are the middle of the first and second
2445 planes of station 1 (+1m for second station):
2446 zpos1=(zpos1m+zpos1p)/2=(15999+16071)/2=16035 mm, thick/2=40 mm
2447 zpos2=(zpos2m+zpos2p)/2=(16169+16241)/2=16205 mm, thick/2=40 mm
2448 zposxm and zposxp= middles of gaz gaps within a detection plane
2449 rem: the total thickness accounts for 1 mm of al on both
2450 side of the RPCs (see zpos1 and zpos2)
2451 */
2452
2453 fIdtmed = fMUON->GetIdtmed()->GetArray()-1099;
2454 fIdAir= fIdtmed[1100]; // medium 1
2455 fIdAlu1=fIdtmed[1103]; // medium 4
2456 fIdInox = fIdtmed[1128]; // medium 29 Stainless Steel (18%Cr,9%Ni,Fe)
2457
2458 Double_t dstation = ( ( - AliMUONConstants::DefaultChamberZ(11)) -
2459 ( - AliMUONConstants::DefaultChamberZ(10)) ) /2.1;
2460 Float_t par[3];
2461 par[2] = dstation;
2462
2463 Int_t icount=0; // chamber counter (0 1 2 3)
2464
2465 for (Int_t istation=0; istation<2; istation++) { // loop on stations
2466 for (Int_t iplane=0; iplane<2; iplane++) { // loop on detection planes
2467
2468 Int_t iVolNum=1; // counter Volume Number
2469 icount = Int_t(iplane<<0)+Int_t(istation<<1);
2470
2471 cout << "## In AliMUONTriggerGeometryBuilder " << icount << endl;
2472
2473 par[0] = AliMUONConstants::Rmin(5+istation);
2474 par[1] = AliMUONConstants::Rmax(5+istation);
2475 Char_t volName[6];
2476 snprintf(volName,6,"%s%d", "SC",11+icount);
2477 gMC->Gsvolu(volName,"TUBE", fIdAir, par, 3);
2478
2479// chamber prototype
2480 BuildChamberPrototype(icount);
2481
2482// RPC supports (vertical)
2483 BuildRPCSupportsVertical(iVolNum, icount);
2484
2485// RPC supports (horizontal)
2486
2487// supports for cables
2488 BuildRPCSupportsHorizontal(icount);
2489
2490// Angular supports for chambers
2491 BuildAngularSupportForChambers(icount);
2492
2493// gas pipes
2494 BuildGasPipes(icount);
2495
2496// chamber type A
2497 BuildChamberTypeA(iVolNum, icount);
2498
2499// chamber type B (plus envelope chambers B & C)
2500 BuildChamberTypeB(iVolNum, icount);
2501
2502// chamber type D, E and F (same size)
2503 BuildChamberTypeD(iVolNum, icount);
2504 BuildChamberTypeE(iVolNum, icount);
2505 BuildChamberTypeF(iVolNum, icount);
d1cd2474 2506 } // end loop on detection planes
2507 } // end loop on stations
2508}
2509
2510//______________________________________________________________________________
b96f7067 2511void AliMUONTriggerGeometryBuilder::SetVolumes()
d1cd2474 2512{
b96f7067 2513/// Defines the volumes for the trigger chambers.
d1cd2474 2514
c0404a6c 2515 if (gAlice->GetModule("SHIL")) {
cf19fcc5 2516 SetMotherVolume(16, "YOUT2");
2517 SetMotherVolume(17, "YOUT2");
2518 SetMotherVolume(18, "YOUT2");
2519 SetMotherVolume(19, "YOUT2");
c0404a6c 2520 }
2521
cf19fcc5 2522 SetVolume(16, "SC11");
2523 SetVolume(17, "SC12");
2524 SetVolume(18, "SC13");
2525 SetVolume(19, "SC14");
b96f7067 2526}
2527
2528//______________________________________________________________________________
2529void AliMUONTriggerGeometryBuilder::SetTransformations()
2530{
2531/// Defines the transformations for the trigger chambers.
eb1c3e3a 2532
16357b16 2533 TGeoRotation st345inclination("rotbeam");
2534 st345inclination.RotateX(-AliMUONConstants::St345Inclination());
2535
b7ef3c96 2536 Double_t zpos1= AliMUONConstants::DefaultChamberZ(10);
16357b16 2537 SetTransformation(16, TGeoTranslation(0., 0, zpos1), st345inclination);
d1cd2474 2538
b7ef3c96 2539 zpos1= AliMUONConstants::DefaultChamberZ(11);
16357b16 2540 SetTransformation(17, TGeoTranslation(0., 0, zpos1), st345inclination);
b7ef3c96 2541
2542 zpos1= AliMUONConstants::DefaultChamberZ(12);
16357b16 2543 SetTransformation(18, TGeoTranslation(0., 0, zpos1), st345inclination);
b7ef3c96 2544
2545 zpos1= AliMUONConstants::DefaultChamberZ(13);
16357b16 2546 SetTransformation(19, TGeoTranslation(0., 0, zpos1), st345inclination);
d1cd2474 2547}
2548
2549//______________________________________________________________________________
2550void AliMUONTriggerGeometryBuilder::SetSensitiveVolumes()
2551{
71a2d3aa 2552/// Defines the sensitive volumes for trigger station chambers.
d1cd2474 2553
cf19fcc5 2554 GetGeometry(16)->SetSensitiveVolume("S11G");
2555 GetGeometry(17)->SetSensitiveVolume("S12G");
2556 GetGeometry(18)->SetSensitiveVolume("S13G");
2557 GetGeometry(19)->SetSensitiveVolume("S14G");
d1cd2474 2558}
2559