remoe duplicate QA initialisation and do ESD QA for same detectors as RecPoint QA
[u/mrichter/AliRoot.git] / MUON / AliMUONTriggerGeometryBuilder.cxx
index 676432d..b7f0f5e 100644 (file)
  **************************************************************************/
 
 // $Id$
-//
-// Class AliMUONTriggerGeometryBuilder
+
+//-----------------------------------------------------------------------------
+/// Class AliMUONTriggerGeometryBuilder
 // -----------------------------------
-// MUON Trigger stations geometry construction class.
-//
-// Author: Philippe Crochette, LPC Clermont-Ferrand
+// MUON Trigger stations geometry 
+// construction class.
+// Author: Philippe Crochet (LPCCFd)
+// Support for trigger chambers added April 07 by Enrico Scomparin (INFN To)
+//-----------------------------------------------------------------------------
 
 #include <TVirtualMC.h>
 #include <TGeoMatrix.h>
 
+#include "AliLog.h"
+#include "AliRun.h"
+
 #include "AliMUONTriggerGeometryBuilder.h"
 #include "AliMUON.h"
-#include "AliMUONChamber.h"
-#include "AliMUONChamberGeometry.h"
+#include "AliMUONConstants.h"
+#include "AliMUONGeometryModule.h"
+#include "AliMUONGeometryEnvelopeStore.h"
 
+/// \cond CLASSIMP
 ClassImp(AliMUONTriggerGeometryBuilder)
+/// \endcond
 
 //______________________________________________________________________________
 AliMUONTriggerGeometryBuilder::AliMUONTriggerGeometryBuilder(AliMUON* muon)
- : AliMUONVGeometryBuilder(&muon->Chamber(10), &muon->Chamber(11),&muon->Chamber(12),&muon->Chamber(13)),
+ : AliMUONVGeometryBuilder(16, 4),
    fMUON(muon)
 {
-// Standard constructor
+/// Standard constructor
 
 }
 
@@ -45,38 +54,13 @@ AliMUONTriggerGeometryBuilder::AliMUONTriggerGeometryBuilder()
  : AliMUONVGeometryBuilder(),
    fMUON(0)
 {
-// Default constructor
+/// Default constructor
 }
 
-
 //______________________________________________________________________________
-AliMUONTriggerGeometryBuilder::AliMUONTriggerGeometryBuilder(const AliMUONTriggerGeometryBuilder& rhs)
-  : AliMUONVGeometryBuilder(rhs)
+AliMUONTriggerGeometryBuilder::~AliMUONTriggerGeometryBuilder() 
 {
-// Protected copy constructor
-
-  Fatal("Copy constructor", 
-        "Copy constructor is not implemented.");
-}
-
-//______________________________________________________________________________
-AliMUONTriggerGeometryBuilder::~AliMUONTriggerGeometryBuilder() {
-//
-}
-
-//______________________________________________________________________________
-AliMUONTriggerGeometryBuilder& 
-AliMUONTriggerGeometryBuilder::operator = (const AliMUONTriggerGeometryBuilder& rhs) 
-{
-// Protected assignement operator
-
-  // check assignement to self
-  if (this == &rhs) return *this;
-
-  Fatal("operator=", 
-        "Assignment operator is not implemented.");
-    
-  return *this;  
+/// Destructor
 }
 
 //
@@ -86,7 +70,7 @@ AliMUONTriggerGeometryBuilder::operator = (const AliMUONTriggerGeometryBuilder&
 //______________________________________________________________________________
 void AliMUONTriggerGeometryBuilder::CreateGeometry()
 {
-// From AliMUONv1::CreateGeometry()
+/// From AliMUONv1::CreateGeometry()
 
     /* 
        zpos1 and zpos2 are the middle of the first and second
@@ -101,30 +85,59 @@ void AliMUONTriggerGeometryBuilder::CreateGeometry()
     Int_t *idtmed = fMUON->GetIdtmed()->GetArray()-1099;
     Int_t idAir= idtmed[1100]; // medium 1
     Int_t idAlu1=idtmed[1103]; // medium 4
+    Int_t idInox = idtmed[1128];       // medium 29 Stainless Steel (18%Cr,9%Ni,Fe) 
+    
+    Int_t detElemId=0;          // Detection Element Number    
     Float_t tpar[3];
     Double_t dpar[3];    
-    
+    Double_t spar[3];    
+    Double_t ppar[3];    
+   
 // vertical gap between right and left chambers (kDXZERO*2=4cm)
     const Float_t kDXZERO=2.; 
 // main distances for chamber definition in first plane/first station
     const Float_t kXMIN=34.;       
     const Float_t kXMED=51.;                                
-    const Float_t kXMAX=272.; 
-// kXMAX will become 255. in real life. segmentation to be updated accordingly
+    const Float_t kXMAX=255.; 
+// 090704 kXMAX changed from 272 to 255.
 // (see fig.2-4 & 2-5 of Local Trigger Board PRR)
+// segmentation updated accordingly
     const Float_t kYMIN=34.;                              
     const Float_t kYMAX=51.;                              
 // inner/outer radius of flange between beam shield. and chambers (1/station)
-    const Float_t kRMIN[2]={50.,50.};
-    const Float_t kRMAX[2]={64.,68.};
+//    const Float_t kRMIN[2]={50.,50.};
+//    const Float_t kRMAX[2]={64.,68.};
 // z position of the middle of the gas gap in mother vol 
     const Float_t kZm=-3.6;
-    const Float_t kZp=+3.6;     
-
-    AliMUONChamber *iChamber, *iChamber1;
-    iChamber1 = GetChamber(10);
-    Float_t zpos1=-iChamber1->Z(); 
+    const Float_t kZp=+3.6;
     
+// y positions of vertical supports
+    const Float_t kYVSup[4]={61.45,122.45,192.95,236.95}; 
+// dimensions of vertical supports 
+    const Float_t kSizeVSupExt[3]={1.5,1.5,306.+5.}; 
+    const Float_t kSizeVSupInt[3]={1.2,1.2,306.+5.};  
+// transverse dimensions of angular supports 
+    const Float_t kSizeSupport1V[3]={0.,1.5,0.1}; 
+    const Float_t kSizeSupport1H[3]={0.,0.1,1.2}; // z should be 1.4 in the installed set-up 
+    const Float_t kSizeSupport2V[3]={0.,3.0,0.1}; 
+    const Float_t kSizeSupport2H[3]={0.,0.1,1.9}; 
+    const Float_t kSizeSupportXV[3]={0.,1.25,0.25}; 
+    const Float_t kSizeSupportXH[3]={0.,0.25,1.5}; 
+// transverse dimensions of horizontal cable supports
+    const Float_t kSizeSupportCable[3]={0.,2.,3.}; 
+// dimensions of gas pipes (inner and outer radius)
+    const Float_t kSizeGasPipe[3]={0.2,0.4,0.}; 
+// Position of gas pipe with respect to angular support
+    const Float_t kOffsetGasPipe=0.75; 
+// Small cut on some volumes to avoid extrusion from SC1x
+    const Float_t kAvoidExtrusion=2.7;    
+   
+    Float_t zpos1= AliMUONConstants::DefaultChamberZ(10); 
+    Double_t dstation =  ( ( - AliMUONConstants::DefaultChamberZ(11)) - 
+                           ( - AliMUONConstants::DefaultChamberZ(10)) ) /2.1;
+    Float_t par[3];
+    par[2] = dstation;
+
 // ratio of zpos1m/zpos1p and inverse for first plane
     Float_t zmp=(zpos1-3.6)/(zpos1+3.6);
     Float_t zpm=1./zmp;
@@ -135,12 +148,17 @@ void AliMUONTriggerGeometryBuilder::CreateGeometry()
        for (Int_t iplane=0; iplane<2; iplane++) { // loop on detection planes
            
            Int_t iVolNum=1; // counter Volume Number
-           icount = Int_t(iplane*TMath::Power(2,0))+
-               Int_t(istation*TMath::Power(2,1));
-           
-           iChamber = GetChamber(10+icount);
-           Float_t zpos = - iChamber->Z();          
+           icount = Int_t(iplane<<0)+Int_t(istation<<1);
            
+           par[0] = AliMUONConstants::Rmin(5+istation); 
+           par[1] = AliMUONConstants::Rmax(5+istation);
+           Char_t volName[6];
+           sprintf(volName,"%s%d", "SC",11+icount);
+           gMC->Gsvolu(volName,"TUBE", idAir, par, 3);
+           //SetVolume(10+icount, volName);
+//         Float_t zpos =  AliMUONConstants::DefaultChamberZ(10+icount);
+
+/* removed 03/18/05
 // Flange between beam shielding and RPC 
            tpar[0]= kRMIN[istation];
            tpar[1]= kRMAX[istation];
@@ -150,11 +168,17 @@ void AliMUONTriggerGeometryBuilder::CreateGeometry()
            gMC->Gsvolu(volFlange,"TUBE",idAlu1,tpar,3);     // Al
             // changed by ivana
            //gMC->Gspos(volFlange,1,"ALIC",0.,0.,zpos,0,"MANY");
-           iChamber->GetGeometry()->AddEnvelope(volFlange, false, "MANY");
+           iChamber->GetGeometry()->GetEnvelopeStore()
+             ->AddEnvelope(volFlange, 0, false, "MANY");
+*/
            
 // scaling factor
-           Float_t zRatio = zpos / zpos1;
-           
+//         Float_t zRatio = zpos / zpos1;
+           Float_t zRatio = AliMUONConstants::DefaultRatioTriggerChamber(icount);                  
+
+
+
+    
 // envelopes (same size except line 5, all virtual)
            char volEnv[18][5];
            tpar[1] = kYMIN * zRatio; 
@@ -168,7 +192,7 @@ void AliMUONTriggerGeometryBuilder::CreateGeometry()
                        sprintf(volEnv[i],"S%dR%d",icount,iline);
                    else
                        sprintf(volEnv[i],"S%dL%d",icount,iline);
-                   gMC->Gsvolu(volEnv[i],"BOX",idAir,tpar,0); 
+                   // gMC->Gsvolu(volEnv[i],"BOX",idAir,tpar,0); 
                    i++;
                }
            }
@@ -176,13 +200,12 @@ void AliMUONTriggerGeometryBuilder::CreateGeometry()
 // chamber prototype
            tpar[0]= 0.;
            tpar[1]= 0.;
-           tpar[2]= 0.;            
-           char volAlu[5];     // Alu 
+           tpar[2]= 0.;            char volAlu[5];     // Alu 
            char volBak[5];     // Bakelite
            char volGaz[5];     // Gas streamer     
            sprintf(volAlu,"SC%dA",icount+1);
            sprintf(volBak,"SB%dA",icount+1);
-           sprintf(volGaz,"SG%dA",icount+1);
+           sprintf(volGaz,"S%dG",icount+11);
            gMC->Gsvolu(volAlu,"BOX",idAlu1,tpar,0);         // Al
            gMC->Gsvolu(volBak,"BOX",idtmed[1107],tpar,0);   // Bakelite
            gMC->Gsvolu(volGaz,"BOX",idtmed[1106],tpar,0);   // Gas streamer
@@ -193,6 +216,187 @@ void AliMUONTriggerGeometryBuilder::CreateGeometry()
            tpar[2] = 0.3;
            gMC->Gsposp(volBak,1,volAlu,0.,0.,0.,0,"ONLY",tpar,3);
 
+// RPC supports (vertical)
+
+            char volAluSupport[5],volAirSupport[5];
+           sprintf(volAluSupport,"SAL%d",icount+1);
+           sprintf(volAirSupport,"SAI%d",icount+1);
+           char volEnvSupport[12][5];
+            for(Int_t jj=0;jj<2;jj++)
+           for(Int_t ii=0;ii<8;ii++){
+             sprintf(volEnvSupport[ii],"A%dV%d",icount+1,ii);
+           }
+           tpar[0]= 0.;
+           tpar[1]= 0.;
+           tpar[2]= 0.;            
+            gMC->Gsvolu(volAluSupport,"BOX",idAlu1,tpar,0);
+            gMC->Gsvolu(volAirSupport,"BOX",idAir,tpar,0);
+           tpar[0]=kSizeVSupInt[0];
+           tpar[1]=kSizeVSupInt[1];
+           tpar[2]=-1.;
+           gMC->Gsposp(volAirSupport,1,volAluSupport,0.,0.,0.,0,"ONLY",tpar,3);
+           
+           TGeoRotation rsupportv;
+           rsupportv.SetAngles(0.,90.,0.);
+           dpar[0]=kSizeVSupExt[0];
+           dpar[1]=kSizeVSupExt[1];
+           dpar[2]=kSizeVSupExt[2]*zRatio;
+           for(Int_t ii=0;ii<4;ii++){
+                     GetEnvelopes(16+icount)->AddEnvelope(volEnvSupport[ii], 0, true,
+             TGeoTranslation(-kYVSup[ii]*zRatio,0.,0.),rsupportv);
+             GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluSupport,volEnvSupport[ii],iVolNum++,3, dpar);
+           }       
+           for(Int_t ii=4;ii<8;ii++){
+                     GetEnvelopes(16+icount)->AddEnvelope(volEnvSupport[ii], 0, true,
+             TGeoTranslation(kYVSup[ii-4]*zRatio,0.,0.),rsupportv);
+             GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluSupport,volEnvSupport[ii],iVolNum++,3, dpar);
+           }   
+               
+// RPC supports (horizontal)
+
+// supports for cables
+            char volAluSupportH[6],volAirSupportH[6];
+           sprintf(volAluSupportH,"SALH%d",icount+1);
+           sprintf(volAirSupportH,"SAIH%d",icount+1);
+           char volEnvSupportHA[6][7],volEnvSupportHBC[12][7],volEnvSupportHD[12][7],volEnvSupportHE[12][7],volEnvSupportHF[12][7];
+            for(Int_t jj=0;jj<2;jj++){
+             for(Int_t ii=0;ii<6;ii++){
+               if(ii<3)sprintf(volEnvSupportHA[3*jj+ii],"A%dHA%d",icount+1,3*jj+ii);
+               sprintf(volEnvSupportHBC[6*jj+ii],"A%dHB%d",icount+1,6*jj+ii);
+               sprintf(volEnvSupportHD[6*jj+ii],"A%dHD%d",icount+1,6*jj+ii);
+               sprintf(volEnvSupportHE[6*jj+ii],"A%dHE%d",icount+1,6*jj+ii);
+               sprintf(volEnvSupportHF[6*jj+ii],"A%dHF%d",icount+1,6*jj+ii);
+             }
+           }
+           tpar[0]= 0.;
+           tpar[1]= 0.;
+           tpar[2]= 0.;            
+            gMC->Gsvolu(volAluSupportH,"BOX",idAlu1,tpar,0);
+            gMC->Gsvolu(volAirSupportH,"BOX",idAir,tpar,0);
+           tpar[0]=-1.;
+           tpar[1]=1.9;
+           tpar[2]=2.8;
+           gMC->Gsposp(volAirSupportH,1,volAluSupportH,0.,0.,0.,0,"ONLY",tpar,3);
+           
+// Angular supports for chambers
+           char volAluAngSupport1V[6],volAluAngSupport1H[6];
+           sprintf(volAluAngSupport1H,"SA1H%d",icount+1);
+           sprintf(volAluAngSupport1V,"SA1V%d",icount+1);
+           char volAluAngSupport2V[6],volAluAngSupport2H[6];
+           sprintf(volAluAngSupport2H,"SA2H%d",icount+1);
+           sprintf(volAluAngSupport2V,"SA2V%d",icount+1);
+           char volAluAngSupport3V[6],volAluAngSupport3H[6];
+           sprintf(volAluAngSupport3H,"SA3H%d",icount+1);
+           sprintf(volAluAngSupport3V,"SA3V%d",icount+1);
+           char volAluAngSupport4V[6],volAluAngSupport4H[6];
+           sprintf(volAluAngSupport4H,"SA4H%d",icount+1);
+           sprintf(volAluAngSupport4V,"SA4V%d",icount+1);
+           char volAluAngSupportXV[6],volAluAngSupportXH[6];
+           sprintf(volAluAngSupportXH,"SAXH%d",icount+1);
+           sprintf(volAluAngSupportXV,"SAXV%d",icount+1);
+           char volEnvSuppAng1HA[2][6],volEnvSuppAng1HBC[4][6],volEnvSuppAng1HD[4][6],volEnvSuppAng1HE[4][6],volEnvSuppAng1HF[4][6];
+           char volEnvSuppAng1VA[2][6],volEnvSuppAng1VBC[4][6],volEnvSuppAng1VD[4][6],volEnvSuppAng1VE[4][6],volEnvSuppAng1VF[4][6];
+           char volEnvSuppAng2HA[2][6],volEnvSuppAng2HBC[4][6],volEnvSuppAng2HD[4][6],volEnvSuppAng2HE[4][6],volEnvSuppAng2HF[4][6];
+           char volEnvSuppAng2VA[2][6],volEnvSuppAng2VBC[4][6],volEnvSuppAng2VD[4][6],volEnvSuppAng2VE[4][6],volEnvSuppAng2VF[4][6];
+           char volEnvSuppAng3HA[2][6],volEnvSuppAng3HBC[4][6],volEnvSuppAng3HD[4][6],volEnvSuppAng3HE[4][6],volEnvSuppAng3HF[4][6];
+           char volEnvSuppAng3VA[2][6],volEnvSuppAng3VBC[4][6],volEnvSuppAng3VD[4][6],volEnvSuppAng3VE[4][6],volEnvSuppAng3VF[4][6];
+           char volEnvSuppAng4HA[2][6],volEnvSuppAng4HBC[4][6],volEnvSuppAng4HD[4][6],volEnvSuppAng4HE[4][6],volEnvSuppAng4HF[4][6];
+           char volEnvSuppAng4VA[2][6],volEnvSuppAng4VBC[4][6],volEnvSuppAng4VD[4][6],volEnvSuppAng4VE[4][6],volEnvSuppAng4VF[4][6];
+           char volEnvSuppAngXHA[2][6],volEnvSuppAngXHBC[4][6],volEnvSuppAngXHD[4][6],volEnvSuppAngXHE[4][6],volEnvSuppAngXHF[4][6];
+           char volEnvSuppAngXVA[2][6],volEnvSuppAngXVBC[4][6],volEnvSuppAngXVD[4][6],volEnvSuppAngXVE[4][6],volEnvSuppAngXVF[4][6];
+           for(Int_t ii=0;ii<4;ii++){
+             if(ii<2)sprintf(volEnvSuppAng1HA[ii],"H1%dA%d",icount+1,ii);
+             sprintf(volEnvSuppAng1HBC[ii],"H1%dB%d",icount+1,ii);
+             sprintf(volEnvSuppAng1HD[ii],"H1%dD%d",icount+1,ii);
+             sprintf(volEnvSuppAng1HE[ii],"H1%dE%d",icount+1,ii);
+             sprintf(volEnvSuppAng1HF[ii],"H1%dF%d",icount+1,ii);
+             if(ii<2)sprintf(volEnvSuppAng1VA[ii],"V1%dA%d",icount+1,ii);
+             sprintf(volEnvSuppAng1VBC[ii],"V1%dB%d",icount+1,ii);
+             sprintf(volEnvSuppAng1VD[ii],"V1%dD%d",icount+1,ii);
+             sprintf(volEnvSuppAng1VE[ii],"V1%dE%d",icount+1,ii);
+             sprintf(volEnvSuppAng1VF[ii],"V1%dF%d",icount+1,ii);
+             if(ii<2)sprintf(volEnvSuppAng2HA[ii],"H2%dA%d",icount+1,ii);
+             sprintf(volEnvSuppAng2HBC[ii],"H2%dB%d",icount+1,ii);
+             sprintf(volEnvSuppAng2HD[ii],"H2%dD%d",icount+1,ii);
+             sprintf(volEnvSuppAng2HE[ii],"H2%dE%d",icount+1,ii);
+             sprintf(volEnvSuppAng2HF[ii],"H2%dF%d",icount+1,ii);
+             if(ii<2)sprintf(volEnvSuppAng2VA[ii],"V2%dA%d",icount+1,ii);
+             sprintf(volEnvSuppAng2VBC[ii],"V2%dB%d",icount+1,ii);
+             sprintf(volEnvSuppAng2VD[ii],"V2%dD%d",icount+1,ii);
+             sprintf(volEnvSuppAng2VE[ii],"V2%dE%d",icount+1,ii);
+             sprintf(volEnvSuppAng2VF[ii],"V2%dF%d",icount+1,ii);
+             if(ii<2)sprintf(volEnvSuppAng3HA[ii],"H3%dA%d",icount+1,ii);
+             sprintf(volEnvSuppAng3HBC[ii],"H3%dB%d",icount+1,ii);
+             sprintf(volEnvSuppAng3HD[ii],"H3%dD%d",icount+1,ii);
+             sprintf(volEnvSuppAng3HE[ii],"H3%dE%d",icount+1,ii);
+             sprintf(volEnvSuppAng3HF[ii],"H3%dF%d",icount+1,ii);
+             if(ii<2)sprintf(volEnvSuppAng3VA[ii],"V3%dA%d",icount+1,ii);
+             sprintf(volEnvSuppAng3VBC[ii],"V3%dB%d",icount+1,ii);
+             sprintf(volEnvSuppAng3VD[ii],"V3%dD%d",icount+1,ii);
+             sprintf(volEnvSuppAng3VE[ii],"V3%dE%d",icount+1,ii);
+             sprintf(volEnvSuppAng3VF[ii],"V3%dF%d",icount+1,ii);
+             if(ii<2)sprintf(volEnvSuppAng4HA[ii],"H4%dA%d",icount+1,ii);
+             sprintf(volEnvSuppAng4HBC[ii],"H4%dB%d",icount+1,ii);
+             sprintf(volEnvSuppAng4HD[ii],"H4%dD%d",icount+1,ii);
+             sprintf(volEnvSuppAng4HE[ii],"H4%dE%d",icount+1,ii);
+             sprintf(volEnvSuppAng4HF[ii],"H4%dF%d",icount+1,ii);
+             if(ii<2)sprintf(volEnvSuppAng4VA[ii],"V4%dA%d",icount+1,ii);
+             sprintf(volEnvSuppAng4VBC[ii],"V4%dB%d",icount+1,ii);
+             sprintf(volEnvSuppAng4VD[ii],"V4%dD%d",icount+1,ii);
+             sprintf(volEnvSuppAng4VE[ii],"V4%dE%d",icount+1,ii);
+             sprintf(volEnvSuppAng4VF[ii],"V4%dF%d",icount+1,ii);
+             if(ii<2)sprintf(volEnvSuppAngXHA[ii],"HX%dA%d",icount+1,ii);
+             sprintf(volEnvSuppAngXHBC[ii],"HX%dB%d",icount+1,ii);
+             sprintf(volEnvSuppAngXHD[ii],"HX%dD%d",icount+1,ii);
+             sprintf(volEnvSuppAngXHE[ii],"HX%dE%d",icount+1,ii);
+             sprintf(volEnvSuppAngXHF[ii],"HX%dF%d",icount+1,ii);
+             if(ii<2)sprintf(volEnvSuppAngXVA[ii],"VX%dA%d",icount+1,ii);
+             sprintf(volEnvSuppAngXVBC[ii],"VX%dB%d",icount+1,ii);
+             sprintf(volEnvSuppAngXVD[ii],"VX%dD%d",icount+1,ii);
+             sprintf(volEnvSuppAngXVE[ii],"VX%dE%d",icount+1,ii);
+             sprintf(volEnvSuppAngXVF[ii],"VX%dF%d",icount+1,ii);
+           }
+           tpar[0]= 0.;
+           tpar[1]= 0.;
+           tpar[2]= 0.;            
+            gMC->Gsvolu(volAluAngSupport1V,"BOX",idAlu1,tpar,0);
+            gMC->Gsvolu(volAluAngSupport1H,"BOX",idAlu1,tpar,0);
+            gMC->Gsvolu(volAluAngSupport2V,"BOX",idAlu1,tpar,0);
+            gMC->Gsvolu(volAluAngSupport2H,"BOX",idAlu1,tpar,0);
+            gMC->Gsvolu(volAluAngSupport3V,"BOX",idAlu1,tpar,0);
+            gMC->Gsvolu(volAluAngSupport3H,"BOX",idAlu1,tpar,0);
+            gMC->Gsvolu(volAluAngSupport4V,"BOX",idAlu1,tpar,0);
+            gMC->Gsvolu(volAluAngSupport4H,"BOX",idAlu1,tpar,0);
+            gMC->Gsvolu(volAluAngSupportXV,"BOX",idAlu1,tpar,0);
+            gMC->Gsvolu(volAluAngSupportXH,"BOX",idAlu1,tpar,0);
+           
+// gas pipes
+           char volInoxGasPipe[6];
+           sprintf(volInoxGasPipe,"PINO%d",icount+1);
+            char volEnvInoxGasPipe1A[2][6],volEnvInoxGasPipe1BC[4][7],volEnvInoxGasPipe1D[4][6],volEnvInoxGasPipe1E[4][6],volEnvInoxGasPipe1F[4][6];
+            char volEnvInoxGasPipe2A[2][6],volEnvInoxGasPipe2BC[4][7],volEnvInoxGasPipe2D[4][6],volEnvInoxGasPipe2E[4][6],volEnvInoxGasPipe2F[4][6];
+           for(Int_t ii=0;ii<4;ii++){
+             if(ii<2)sprintf(volEnvInoxGasPipe1A[ii],"P1%dA%d",icount+1,ii);
+             sprintf(volEnvInoxGasPipe1BC[ii],"P1%dBC%d",icount+1,ii);
+             sprintf(volEnvInoxGasPipe1D[ii],"P1%dD%d",icount+1,ii);
+             sprintf(volEnvInoxGasPipe1E[ii],"P1%dE%d",icount+1,ii);
+             sprintf(volEnvInoxGasPipe1F[ii],"P1%dF%d",icount+1,ii);
+           }
+           for(Int_t ii=0;ii<4;ii++){
+             if(ii<2)sprintf(volEnvInoxGasPipe2A[ii],"P2%dA%d",icount+1,ii);
+             sprintf(volEnvInoxGasPipe2BC[ii],"P2%dBC%d",icount+1,ii);
+             sprintf(volEnvInoxGasPipe2D[ii],"P2%dD%d",icount+1,ii);
+             sprintf(volEnvInoxGasPipe2E[ii],"P2%dE%d",icount+1,ii);
+             sprintf(volEnvInoxGasPipe2F[ii],"P2%dF%d",icount+1,ii);
+           }
+           tpar[0]= 0.;
+           tpar[1]= 0.;
+           tpar[2]= 0.;            
+            gMC->Gsvolu(volInoxGasPipe,"TUBE",idInox,tpar,0);
+           TGeoRotation rsupportpipe;
+           rsupportpipe.SetAngles(90.,90.,0.);
+          
+
 // chamber type A
            Float_t xEnv = (kDXZERO+kXMED+(kXMAX-kXMED)/2.)*zRatio;
            Float_t yEnvM = 0.;  // y low position of envelope in chamber
@@ -205,11 +409,184 @@ void AliMUONTriggerGeometryBuilder::CreateGeometry()
            dpar[0] = ((kXMAX-kXMED)/2.)*zRatio;
            dpar[1] = kYMIN * zRatio;
 
-           GetChamber(10+icount)->GetGeometry()->AddEnvelope(volEnv[4], true, TGeoTranslation(xEnv,yEnvM,kZm));
-           GetChamber(10+icount)->GetGeometry()->AddEnvelope(volEnv[13], true, TGeoTranslation(-xEnv,yEnvP,kZp));
+           detElemId = (10+icount+1)*100;
+           GetEnvelopes(16+icount)->AddEnvelope(volEnv[4], detElemId, true, TGeoTranslation(xEnv,yEnvP,kZp));
+           detElemId = (10+icount+1)*100+9;
+           GetEnvelopes(16+icount)->AddEnvelope(volEnv[13], detElemId, true, TGeoTranslation(-xEnv,yEnvM,kZm),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAlu,volEnv[4],iVolNum++,3, dpar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAlu,volEnv[13],iVolNum++,3, dpar);      
+
+// horizontal cable support chamber type A
 
-           GetChamber(10+icount)->GetGeometry()->AddEnvelopeConstituentParam(volAlu,volEnv[4],iVolNum++,3, dpar);
-           GetChamber(10+icount)->GetGeometry()->AddEnvelopeConstituentParam(volAlu,volEnv[13],iVolNum++,3, dpar);         
+           spar[0]=((kXMAX/2)-kYVSup[0]/2.)*zRatio;
+           spar[1]=kSizeSupportCable[1];
+           spar[2]=kSizeSupportCable[2];
+           Float_t offsetSuppA = ((kXMAX-kXMED)/2.)*zRatio-(((kXMAX/2)-kYVSup[0]/2.)*zRatio);
+           for(Int_t in=0;in<3;in++){
+                     GetEnvelopes(16+icount)->AddEnvelope(volEnvSupportHA[in], 0, true,
+             TGeoTranslation(xEnv+offsetSuppA/2.,yEnvP+dpar[1]/2.*(in-1),-(kSizeVSupExt[0]+spar[2])));
+             GetEnvelopes(16+icount)->AddEnvelope(volEnvSupportHA[in+3], 0, true,
+             TGeoTranslation(-(xEnv+offsetSuppA/2.),yEnvM+dpar[1]/2.*(in-1),kSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           }
+           for(Int_t ii=0;ii<6;ii++) 
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluSupportH,volEnvSupportHA[ii],iVolNum++,3, spar);
+           
+// angular supports chamber type A
+// 1 vertical     
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport1V[1];
+           spar[2]=kSizeSupport1V[2];
+           Float_t sparysave=spar[1];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VA[0], 0, true,
+           TGeoTranslation(xEnv,yEnvP-dpar[1],kZp+dpar[2]+spar[2]/2.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VA[1], 0, true,
+           TGeoTranslation(-xEnv,yEnvM-dpar[1],kZm-dpar[2]-spar[2]/2.),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport1V,volEnvSuppAng1VA[0],iVolNum++,3, spar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport1V,volEnvSuppAng1VA[1],iVolNum++,3, spar);         
+
+// 1 horizontal           
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport1H[1];
+           spar[2]=kSizeSupport1H[2];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HA[0], 0, true,
+           TGeoTranslation(xEnv,yEnvP-dpar[1]-sparysave,kZp+dpar[2]-spar[2]));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HA[1], 0, true,
+           TGeoTranslation(-xEnv,yEnvM-dpar[1]-sparysave,kZm-(dpar[2]-spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport1H,volEnvSuppAng1HA[0],iVolNum++,3, spar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport1H,volEnvSuppAng1HA[1],iVolNum++,3, spar);         
+
+// gas pipe (low)
+           ppar[0]=kSizeGasPipe[0];
+           ppar[1]=kSizeGasPipe[1];
+           ppar[2]=dpar[0];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1A[0], 0, true,
+           TGeoTranslation(xEnv,yEnvP-dpar[1]-sparysave-kOffsetGasPipe,kZp),rsupportpipe);
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1A[1], 0, true,
+           TGeoTranslation(-xEnv,yEnvM-dpar[1]-sparysave-kOffsetGasPipe,kZm),rsupportpipe);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe1A[0],iVolNum++,3, ppar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe1A[1],iVolNum++,3, ppar);
+
+// 2 vertical     
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport2V[1];
+           spar[2]=kSizeSupport2V[2];
+           sparysave=spar[1];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VA[0], 0, true,
+           TGeoTranslation(xEnv,yEnvP-dpar[1],kSizeVSupExt[0]+spar[2]));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VA[1], 0, true,
+           TGeoTranslation(-xEnv,yEnvM-dpar[1],-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport2V,volEnvSuppAng2VA[0],iVolNum++,3, spar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport2V,volEnvSuppAng2VA[1],iVolNum++,3, spar);         
+
+// 2 horizontal           
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport2H[1];
+           spar[2]=kSizeSupport2H[2]; 
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HA[0], 0, true,
+           TGeoTranslation(xEnv,yEnvP-dpar[1]-sparysave,kSizeVSupExt[0]+spar[2]));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HA[1], 0, true,
+           TGeoTranslation(-xEnv,yEnvM-dpar[1]-sparysave,-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport2H,volEnvSuppAng2HA[0],iVolNum++,3, spar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport2H,volEnvSuppAng2HA[1],iVolNum++,3, spar);         
+
+// 3 vertical     
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport1V[1];
+           spar[2]=kSizeSupport1V[2];
+           sparysave=spar[1];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VA[0], 0, true,
+           TGeoTranslation(xEnv,yEnvP+dpar[1],kZp+dpar[2]+spar[2]/2.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VA[1], 0, true,
+           TGeoTranslation(-xEnv,yEnvM+dpar[1],kZm-dpar[2]-spar[2]/2.),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport3V,volEnvSuppAng3VA[0],iVolNum++,3, spar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport3V,volEnvSuppAng3VA[1],iVolNum++,3, spar);         
+
+// 3 horizontal           
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport1H[1];
+           spar[2]=kSizeSupport1H[2];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HA[0], 0, true,
+           TGeoTranslation(xEnv,yEnvP+dpar[1]+sparysave,kZp+dpar[2]-spar[2]));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HA[1], 0, true,
+           TGeoTranslation(-xEnv,yEnvM+dpar[1]+sparysave,kZm-(dpar[2]-spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport3H,volEnvSuppAng3HA[0],iVolNum++,3, spar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport3H,volEnvSuppAng3HA[1],iVolNum++,3, spar);     
+               
+// gas pipe (high)
+           ppar[0]=kSizeGasPipe[0];
+           ppar[1]=kSizeGasPipe[1];
+           ppar[2]=dpar[0];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2A[0], 0, true,
+           TGeoTranslation(xEnv,yEnvP+dpar[1]+sparysave+kOffsetGasPipe,kZp),rsupportpipe);
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2A[1], 0, true,
+           TGeoTranslation(-xEnv,yEnvM+dpar[1]+sparysave+kOffsetGasPipe,kZm),rsupportpipe);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe2A[0],iVolNum++,3, ppar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe2A[1],iVolNum++,3, ppar);
+
+// 4 vertical     
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport2V[1];
+           spar[2]=kSizeSupport2V[2];
+           sparysave=spar[1];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VA[0], 0, true,
+           TGeoTranslation(xEnv,yEnvP+dpar[1],kSizeVSupExt[0]+spar[2]));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VA[1], 0, true,
+           TGeoTranslation(-xEnv,yEnvM+dpar[1],-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport4V,volEnvSuppAng4VA[0],iVolNum++,3, spar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport4V,volEnvSuppAng4VA[1],iVolNum++,3, spar);         
+
+// 4 horizontal           
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport2H[1];
+           spar[2]=kSizeSupport2H[2];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HA[0], 0, true,
+           TGeoTranslation(xEnv,yEnvP+dpar[1]+sparysave,kSizeVSupExt[0]+spar[2]));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HA[1], 0, true,
+           TGeoTranslation(-xEnv,yEnvM+dpar[1]+sparysave,-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport4H,volEnvSuppAng4HA[0],iVolNum++,3, spar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport4H,volEnvSuppAng4HA[1],iVolNum++,3, spar);         
+
+// X horizontal           
+           spar[0]=(kYVSup[3]-kYVSup[0])/2.*zRatio;
+           spar[1]=kSizeSupportXH[1];
+           spar[2]=kSizeSupportXH[2];
+           Float_t sparysavex=spar[1];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHA[0], 0, true,
+           TGeoTranslation(spar[0]+kYVSup[0]*zRatio,yEnvP+dpar[1]+sparysave+1.0,kSizeVSupExt[0]+spar[2]));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHA[1], 0, true,
+           TGeoTranslation(-(spar[0]+kYVSup[0]*zRatio),yEnvM+dpar[1]+sparysave+1.0,-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupportXH,volEnvSuppAngXHA[0],iVolNum++,3, spar);         
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupportXH,volEnvSuppAngXHA[1],iVolNum++,3, spar);         
+
+// X vertical     
+           spar[0]=(kYVSup[3]-kYVSup[0])/2.*zRatio;
+           spar[1]=kSizeSupportXV[1];
+           spar[2]=kSizeSupportXV[2];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXVA[0], 0, true,
+           TGeoTranslation(spar[0]+kYVSup[0]*zRatio,yEnvP+dpar[1]+sparysave+1.0+sparysavex+spar[1],kSizeVSupExt[0]+spar[2]));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXVA[1], 0, true,
+           TGeoTranslation(-(spar[0]+kYVSup[0]*zRatio),yEnvM+dpar[1]+sparysave+1.0+sparysavex+spar[1],-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupportXV,volEnvSuppAngXVA[0],iVolNum++,3, spar);         
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupportXV,volEnvSuppAngXVA[1],iVolNum++,3, spar);         
 
 // chamber type B (plus envelope chambers B & C)   
            xEnv = (kDXZERO+kXMAX/2.)*zRatio;
@@ -219,30 +596,353 @@ void AliMUONTriggerGeometryBuilder::CreateGeometry()
            yEnvM = (yEnvPsave + kYMIN * zRatio ) * zmp + kYMIN * zRatio;
            dpar[0] = ((kXMAX-kXMIN)/2.) * zRatio;
            dpar[1] = ((kYMAX-kYMIN)/2.) * zRatio;
+           Float_t dysave = dpar[1];
+           Float_t dxsave = dpar[0];
            xpos = kXMIN/2. * zRatio;
            ypos = (kYMIN - kYMIN/4.) * zRatio;
+           Float_t xpossave = xpos;
 
-           GetChamber(10+icount)->GetGeometry()->AddEnvelope(volEnv[3], true, TGeoTranslation( xEnv,-yEnvP,kZp));
-           GetChamber(10+icount)->GetGeometry()->AddEnvelope(volEnv[5], true, TGeoTranslation( xEnv, yEnvP,kZp));
-           GetChamber(10+icount)->GetGeometry()->AddEnvelope(volEnv[12], true, TGeoTranslation(-xEnv,-yEnvM,kZm));
-           GetChamber(10+icount)->GetGeometry()->AddEnvelope(volEnv[14], true, TGeoTranslation(-xEnv, yEnvM,kZm));
+           detElemId = (10+icount+1)*100+17;
+           GetEnvelopes(16+icount)->AddEnvelope(volEnv[3], detElemId, true, TGeoTranslation( xEnv,-yEnvM,kZm));            
+           detElemId = (10+icount+1)*100+1;
+           GetEnvelopes(16+icount)->AddEnvelope(volEnv[5], detElemId, true, TGeoTranslation( xEnv, yEnvM,kZm));
+           detElemId = (10+icount+1)*100+10;
+           GetEnvelopes(16+icount)->AddEnvelope(volEnv[12], detElemId, true, TGeoTranslation(-xEnv,-yEnvP,kZp),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           detElemId = (10+icount+1)*100+8;
+           GetEnvelopes(16+icount)->AddEnvelope(volEnv[14], detElemId, true, TGeoTranslation(-xEnv, yEnvP,kZp),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
 
-           GetChamber(10+icount)->GetGeometry()->AddEnvelopeConstituentParam(volAlu,volEnv[3],iVolNum++,TGeoTranslation(xpos, ypos,0.),3,dpar);
-           GetChamber(10+icount)->GetGeometry()->AddEnvelopeConstituentParam(volAlu,volEnv[5],iVolNum++,TGeoTranslation(xpos,-ypos,0.),3,dpar);
-           GetChamber(10+icount)->GetGeometry()->AddEnvelopeConstituentParam(volAlu,volEnv[12],iVolNum++,TGeoTranslation(-xpos, ypos,0.),3,dpar);
-           GetChamber(10+icount)->GetGeometry()->AddEnvelopeConstituentParam(volAlu,volEnv[14],iVolNum++,TGeoTranslation(-xpos,-ypos,0.),3,dpar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAlu,volEnv[3],iVolNum++,TGeoTranslation(xpos, ypos,0.),3,dpar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAlu,volEnv[5],iVolNum++,TGeoTranslation(xpos,-ypos,0.),3,dpar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAlu,volEnv[12],iVolNum++,TGeoTranslation(xpos, ypos,0.),3,dpar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAlu,volEnv[14],iVolNum++,TGeoTranslation(xpos,-ypos,0.),3,dpar);
 
+                   
 // chamber type C (note: same Z than type B)
            dpar[0] = (kXMAX/2)*zRatio;
            dpar[1] = (kYMAX/2)*zRatio;
            xpos = 0.;      
            ypos = ((kYMAX - kYMIN)/2.) * zRatio;
 
-           GetChamber(10+icount)->GetGeometry()->AddEnvelopeConstituentParam(volAlu,volEnv[3],iVolNum++,TGeoTranslation(xpos,-ypos,0.),3,dpar);
-           GetChamber(10+icount)->GetGeometry()->AddEnvelopeConstituentParam(volAlu,volEnv[5],iVolNum++,TGeoTranslation(xpos, ypos,0.),3,dpar);
-           GetChamber(10+icount)->GetGeometry()->AddEnvelopeConstituentParam(volAlu,volEnv[12],iVolNum++,TGeoTranslation(-xpos,-ypos,0.),3,dpar);
-           GetChamber(10+icount)->GetGeometry()->AddEnvelopeConstituentParam(volAlu,volEnv[14],iVolNum++,TGeoTranslation(-xpos, ypos,0.),3,dpar);
-    
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAlu,volEnv[3],iVolNum++,TGeoTranslation(xpos,-ypos,0.),3,dpar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAlu,volEnv[5],iVolNum++,TGeoTranslation(xpos, ypos,0.),3,dpar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAlu,volEnv[12],iVolNum++,TGeoTranslation(xpos,-ypos,0.),3,dpar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAlu,volEnv[14],iVolNum++,TGeoTranslation(xpos, ypos,0.),3,dpar);
+
+// horizontal cable support chamber type B+C
+
+           spar[0]=dpar[0]-kYVSup[0]/2.;
+           spar[1]=kSizeSupportCable[1];
+           spar[2]=kSizeSupportCable[2];
+           for(Int_t in=0;in<3;in++){
+                     GetEnvelopes(16+icount)->AddEnvelope(volEnvSupportHBC[in], 0, true, TGeoTranslation(xEnv+kYVSup[0]/2.*zRatio,-(yEnvM+(kYMAX-kYMIN/2.*zRatio)/2.*(in-1)),kSizeVSupExt[0]+spar[2]));
+             GetEnvelopes(16+icount)->AddEnvelope(volEnvSupportHBC[in+3], 0, true, TGeoTranslation(xEnv+kYVSup[0]/2.*zRatio, yEnvM+(kYMAX-kYMIN/2.*zRatio)/2.*(in-1),kSizeVSupExt[0]+spar[2]));
+                     GetEnvelopes(16+icount)->AddEnvelope(volEnvSupportHBC[in+6], 0, true, TGeoTranslation(-(xEnv+kYVSup[0]/2.*zRatio),-(yEnvP+(kYMAX-kYMIN/2.*zRatio)/2.*(in-1)),-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+             GetEnvelopes(16+icount)->AddEnvelope(volEnvSupportHBC[in+9], 0, true, TGeoTranslation(-(xEnv+kYVSup[0]/2.*zRatio), yEnvP+(kYMAX-kYMIN/2.*zRatio)/2.*(in-1),-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           }
+           for(Int_t ii=0;ii<12;ii++) 
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluSupportH,volEnvSupportHBC[ii],iVolNum++,3, spar);
+
+// angular supports chamber type B and C
+// C      
+// 1 vertical
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport1V[1];
+           spar[2]=kSizeSupport1V[2];
+           sparysave=spar[1];
+
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VBC[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvM-dpar[1]-dysave,kZm-dpar[2]-spar[2]/2.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VBC[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvP-dpar[1]-dysave,kZp+dpar[2]+spar[2]/2.),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport1V,volEnvSuppAng1VBC[0],iVolNum++,3, spar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport1V,volEnvSuppAng1VBC[2],iVolNum++,3, spar);
+
+// 1 horizontal
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport1H[1];
+           spar[2]=kSizeSupport1H[2];
+           
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HBC[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvM-dpar[1]-dysave-sparysave,kZm-(dpar[2]-spar[2])));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HBC[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvP-dpar[1]-dysave-sparysave,kZp+dpar[2]-spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport1H,volEnvSuppAng1HBC[0],iVolNum++,3, spar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport1H,volEnvSuppAng1HBC[2],iVolNum++,3, spar);        
+
+// gas pipe (low)
+           ppar[0]=kSizeGasPipe[0];
+           ppar[1]=kSizeGasPipe[1];
+           ppar[2]=dpar[0];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1BC[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvM-dpar[1]-dysave-sparysave-kOffsetGasPipe,kZm),rsupportpipe);
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1BC[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvP-dpar[1]-dysave-sparysave-kOffsetGasPipe,kZp),rsupportpipe);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe1BC[0],iVolNum++,3, ppar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe1BC[2],iVolNum++,3, ppar);
+
+// 2 vertical     
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport2V[1];
+           spar[2]=kSizeSupport2V[2];
+           sparysave=spar[1];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VBC[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvM-dpar[1]-dysave,-(kSizeVSupExt[0]+spar[2])));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VBC[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvP-dpar[1]-dysave,kSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport2V,volEnvSuppAng2VBC[0],iVolNum++,3, spar);        
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport2V,volEnvSuppAng2VBC[2],iVolNum++,3, spar);        
+
+// 2 horizontal           
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport2H[1];
+           spar[2]=kSizeSupport2H[2];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HBC[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvM-dpar[1]-dysave-sparysave,-(kSizeVSupExt[0]+spar[2])));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HBC[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvP-dpar[1]-dysave-sparysave,kSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport2H,volEnvSuppAng2HBC[0],iVolNum++,3, spar);        
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport2H,volEnvSuppAng2HBC[2],iVolNum++,3, spar);        
+
+// 3 vertical
+           spar[0]=dxsave-kAvoidExtrusion;
+           spar[1]=kSizeSupport1V[1];
+           spar[2]=kSizeSupport1V[2];
+           sparysave=spar[1];
+
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VBC[0], 0, true,
+           TGeoTranslation(xEnv+xpossave,-yEnvM+dpar[1]+dysave,kZm-dpar[2]-spar[2]/2.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VBC[2], 0, true,
+           TGeoTranslation(-xEnv-xpossave,-yEnvP+dpar[1]+dysave,kZp+dpar[2]+spar[2]/2.),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport3V,volEnvSuppAng3VBC[0],iVolNum++,3, spar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport3V,volEnvSuppAng3VBC[2],iVolNum++,3, spar);
+
+// 3 horizontal
+           spar[0]=dxsave-kAvoidExtrusion;
+           spar[1]=kSizeSupport1H[1];
+           spar[2]=kSizeSupport1H[2];
+           
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HBC[0], 0, true,
+           TGeoTranslation(xEnv+xpossave,-yEnvM+dpar[1]+dysave+sparysave,kZm-(dpar[2]-spar[2])));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HBC[2], 0, true,
+           TGeoTranslation(-xEnv-xpossave,-yEnvP+dpar[1]+dysave+sparysave,kZp+dpar[2]-spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport3H,volEnvSuppAng3HBC[0],iVolNum++,3, spar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport3H,volEnvSuppAng3HBC[2],iVolNum++,3, spar);        
+               
+// gas pipe (high)
+           ppar[0]=kSizeGasPipe[0];
+           ppar[1]=kSizeGasPipe[1];
+           ppar[2]=dxsave-kAvoidExtrusion;
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2BC[0], 0, true,
+           TGeoTranslation(xEnv+xpossave,-yEnvM+dpar[1]+dysave+sparysave+kOffsetGasPipe,kZm),rsupportpipe);
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2BC[2], 0, true,
+           TGeoTranslation(-xEnv-xpossave,-yEnvP+dpar[1]+dysave+sparysave+kOffsetGasPipe,kZp),rsupportpipe);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe2BC[0],iVolNum++,3, ppar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe2BC[2],iVolNum++,3, ppar);
+
+// 4 vertical     
+           spar[0]=dxsave-kAvoidExtrusion;
+           spar[1]=kSizeSupport2V[1];
+           spar[2]=kSizeSupport2V[2];
+           sparysave=spar[1];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VBC[0], 0, true,
+           TGeoTranslation(xEnv+xpossave,-yEnvM+dpar[1]+dysave,-(kSizeVSupExt[0]+spar[2])));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VBC[2], 0, true,
+           TGeoTranslation(-xEnv-xpossave,-yEnvP+dpar[1]+dysave,kSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport4V,volEnvSuppAng4VBC[0],iVolNum++,3, spar);        
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport4V,volEnvSuppAng4VBC[2],iVolNum++,3, spar);        
+
+// 4 horizontal           
+           spar[0]=dxsave-kAvoidExtrusion;
+           spar[1]=kSizeSupport2H[1];
+           spar[2]=kSizeSupport2H[2];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HBC[0], 0, true,
+           TGeoTranslation(xEnv+xpossave,-yEnvM+dpar[1]+dysave+sparysave,-(kSizeVSupExt[0]+spar[2])));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HBC[2], 0, true,
+           TGeoTranslation(-xEnv-xpossave,-yEnvP+dpar[1]+dysave+sparysave,kSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport4H,volEnvSuppAng4HBC[0],iVolNum++,3, spar);        
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport4H,volEnvSuppAng4HBC[2],iVolNum++,3, spar);        
+
+// X horizontal           
+           spar[0]=(kYVSup[3]-kYVSup[0])/2.*zRatio;
+           spar[1]=kSizeSupportXH[1];
+           spar[2]=kSizeSupportXH[2];
+           sparysavex=spar[1];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHBC[0], 0, true,
+           TGeoTranslation(spar[0]+kYVSup[0]*zRatio,-yEnvM+dpar[1]+dysave+sparysave+1.0,-(kSizeVSupExt[0]+spar[2])));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHBC[2], 0, true,
+           TGeoTranslation(-(spar[0]+kYVSup[0]*zRatio),-yEnvP+dpar[1]+dysave+sparysave+1.0,kSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupportXH,volEnvSuppAngXHBC[0],iVolNum++,3, spar);        
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupportXH,volEnvSuppAngXHBC[2],iVolNum++,3, spar);        
+
+// X vertical     
+           spar[0]=(kYVSup[3]-kYVSup[0])/2.*zRatio;
+           spar[1]=kSizeSupportXV[1];
+           spar[2]=kSizeSupportXV[2];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXVBC[0], 0, true,
+           TGeoTranslation(spar[0]+kYVSup[0]*zRatio,-yEnvM+dpar[1]+dysave+sparysave+1.0+sparysavex+spar[1],-(kSizeVSupExt[0]+spar[2])));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXVBC[2], 0, true,
+           TGeoTranslation(-(spar[0]+kYVSup[0]*zRatio),-yEnvP+dpar[1]+dysave+sparysave+1.0+sparysavex+spar[1],kSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupportXV,volEnvSuppAngXVBC[0],iVolNum++,3, spar);        
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupportXV,volEnvSuppAngXVBC[2],iVolNum++,3, spar);        
+
+// B
+// 1 vertical
+           spar[0]=dxsave-kAvoidExtrusion;
+           spar[1]=kSizeSupport1V[1];
+           spar[2]=kSizeSupport1V[2];
+           sparysave=spar[1];
+            GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VBC[1], 0, true,
+           TGeoTranslation(xEnv+xpossave,yEnvM-dpar[1]-dysave,kZm-dpar[2]-spar[2]/2.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VBC[3], 0, true,
+           TGeoTranslation(-xEnv-xpossave,yEnvP-dpar[1]-dysave,kZp+dpar[2]+spar[2]/2.),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport1V,volEnvSuppAng1VBC[1],iVolNum++,3, spar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport1V,volEnvSuppAng1VBC[3],iVolNum++,3, spar);
+
+
+// 1 horizontal
+           spar[0]=dxsave-kAvoidExtrusion;
+           spar[1]=kSizeSupport1H[1];
+           spar[2]=kSizeSupport1H[2];
+           
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HBC[1], 0, true,
+           TGeoTranslation(xEnv+xpossave,yEnvM-dpar[1]-dysave-sparysave,kZm-(dpar[2]-spar[2])));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HBC[3], 0, true,
+           TGeoTranslation(-xEnv-xpossave,yEnvP-dpar[1]-dysave-sparysave,kZp+dpar[2]-spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport1H,volEnvSuppAng1HBC[1],iVolNum++,3, spar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport1H,volEnvSuppAng1HBC[3],iVolNum++,3, spar);        
+
+// gas pipe (low)
+           ppar[0]=kSizeGasPipe[0];
+           ppar[1]=kSizeGasPipe[1];
+           ppar[2]=dxsave-kAvoidExtrusion;
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1BC[1], 0, true,
+           TGeoTranslation(xEnv+xpossave,yEnvM-dpar[1]-dysave-sparysave-kOffsetGasPipe,kZm),rsupportpipe);
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1BC[3], 0, true,
+           TGeoTranslation(-xEnv-xpossave,yEnvP-dpar[1]-dysave-sparysave-kOffsetGasPipe,kZp),rsupportpipe);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe1BC[1],iVolNum++,3, ppar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe1BC[3],iVolNum++,3, ppar);
+
+// 2 vertical     
+           spar[0]=dxsave-kAvoidExtrusion;
+           spar[1]=kSizeSupport2V[1];
+           spar[2]=kSizeSupport2V[2];
+           sparysave=spar[1];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VBC[1], 0, true,
+           TGeoTranslation(xEnv+xpossave,yEnvM-dpar[1]-dysave,-(kSizeVSupExt[0]+spar[2])));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VBC[3], 0, true,
+           TGeoTranslation(-xEnv-xpossave,yEnvP-dpar[1]-dysave,kSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport2V,volEnvSuppAng2VBC[1],iVolNum++,3, spar);        
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport2V,volEnvSuppAng2VBC[3],iVolNum++,3, spar);        
+
+// 2 horizontal           
+           spar[0]=dxsave-kAvoidExtrusion;
+           spar[1]=kSizeSupport2H[1];
+           spar[2]=kSizeSupport2H[2];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HBC[1], 0, true,
+           TGeoTranslation(xEnv+xpossave,yEnvM-dpar[1]-dysave-sparysave,-(kSizeVSupExt[0]+spar[2])));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HBC[3], 0, true,
+           TGeoTranslation(-xEnv-xpossave,yEnvP-dpar[1]-dysave-sparysave,kSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport2H,volEnvSuppAng2HBC[1],iVolNum++,3, spar);        
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport2H,volEnvSuppAng2HBC[3],iVolNum++,3, spar);        
+
+// 3 vertical
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport1V[1];
+           spar[2]=kSizeSupport1V[2];
+           sparysave=spar[1];
+            GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VBC[1], 0, true,
+           TGeoTranslation(xEnv,yEnvM+dpar[1]+dysave,kZm-dpar[2]-spar[2]/2.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VBC[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvP+dpar[1]+dysave,kZp+dpar[2]+spar[2]/2.),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport3V,volEnvSuppAng3VBC[1],iVolNum++,3, spar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport3V,volEnvSuppAng3VBC[3],iVolNum++,3, spar);
+
+// 3 horizontal
+           spar[1]=kSizeSupport1H[1];
+           spar[2]=kSizeSupport1H[2];
+           
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HBC[1], 0, true,
+           TGeoTranslation(xEnv,yEnvM+dpar[1]+dysave+sparysave,kZm-(dpar[2]-spar[2])));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HBC[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvP+dpar[1]+dysave+sparysave,kZp+dpar[2]-spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport3H,volEnvSuppAng3HBC[1],iVolNum++,3, spar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport3H,volEnvSuppAng3HBC[3],iVolNum++,3, spar);        
+
+// gas pipe (high)
+           ppar[0]=kSizeGasPipe[0];
+           ppar[1]=kSizeGasPipe[1];
+           ppar[2]=dpar[0];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2BC[1], 0, true,
+           TGeoTranslation(xEnv,yEnvM+dpar[1]+dysave+sparysave+kOffsetGasPipe,kZm),rsupportpipe);
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2BC[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvP+dpar[1]+dysave+sparysave+kOffsetGasPipe,kZp),rsupportpipe);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe2BC[1],iVolNum++,3, ppar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe2BC[3],iVolNum++,3, ppar);
+
+// 4 vertical     
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport2V[1];
+           spar[2]=kSizeSupport2V[2];
+           sparysave=spar[1];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VBC[1], 0, true,
+           TGeoTranslation(xEnv,yEnvM+dpar[1]+dysave,-(kSizeVSupExt[0]+spar[2])));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VBC[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvP+dpar[1]+dysave,kSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport4V,volEnvSuppAng4VBC[1],iVolNum++,3, spar);        
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport4V,volEnvSuppAng4VBC[3],iVolNum++,3, spar);        
+
+// 4 horizontal           
+           spar[1]=kSizeSupport2H[1];
+           spar[2]=kSizeSupport2H[2];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HBC[1], 0, true,
+           TGeoTranslation(xEnv,yEnvM+dpar[1]+dysave+sparysave,-(kSizeVSupExt[0]+spar[2])));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HBC[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvP+dpar[1]+dysave+sparysave,kSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport4H,volEnvSuppAng4HBC[1],iVolNum++,3, spar);        
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport4H,volEnvSuppAng4HBC[3],iVolNum++,3, spar);        
+
+// X horizontal           
+           spar[0]=(kYVSup[3]-kYVSup[0])/2.*zRatio;
+           spar[1]=kSizeSupportXH[1];
+           spar[2]=kSizeSupportXH[2];
+           sparysavex=spar[1];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHBC[1], 0, true,
+           TGeoTranslation(spar[0]+kYVSup[0]*zRatio,yEnvM+dpar[1]+dysave+sparysave+1.0,-(kSizeVSupExt[0]+spar[2])));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHBC[3], 0, true,
+           TGeoTranslation(-(spar[0]+kYVSup[0]*zRatio),yEnvP+dpar[1]+dysave+sparysave+1.0,kSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupportXH,volEnvSuppAngXHBC[1],iVolNum++,3, spar);        
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupportXH,volEnvSuppAngXHBC[3],iVolNum++,3, spar);        
+
+// X vertical     
+           spar[0]=(kYVSup[3]-kYVSup[0])/2.*zRatio;
+           spar[1]=kSizeSupportXV[1];
+           spar[2]=kSizeSupportXV[2];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXVBC[1], 0, true,
+           TGeoTranslation(spar[0]+kYVSup[0]*zRatio,yEnvM+dpar[1]+dysave+sparysave+1.0+sparysavex+spar[1],-(kSizeVSupExt[0]+spar[2])));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXVBC[3], 0, true,
+           TGeoTranslation(-(spar[0]+kYVSup[0]*zRatio),yEnvP+dpar[1]+dysave+sparysave+1.0+sparysavex+spar[1],kSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupportXV,volEnvSuppAngXVBC[1],iVolNum++,3, spar);        
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupportXV,volEnvSuppAngXVBC[3],iVolNum++,3, spar);        
+
+
 // chamber type D, E and F (same size)
 // D       
            yEnvPsave = yEnvP;
@@ -252,15 +952,241 @@ void AliMUONTriggerGeometryBuilder::CreateGeometry()
            dpar[0] = (kXMAX/2.)*zRatio;
            dpar[1] =  kYMIN*zRatio;
 
-           GetChamber(10+icount)->GetGeometry()->AddEnvelope(volEnv[2], true, TGeoTranslation(xEnv,-yEnvM,kZm));
-           GetChamber(10+icount)->GetGeometry()->AddEnvelope(volEnv[6], true, TGeoTranslation(xEnv, yEnvM,kZm));
-            GetChamber(10+icount)->GetGeometry()->AddEnvelope(volEnv[11], true, TGeoTranslation(-xEnv,-yEnvP,kZp));
-            GetChamber(10+icount)->GetGeometry()->AddEnvelope(volEnv[15], true, TGeoTranslation(-xEnv, yEnvP,kZp));
+           detElemId = (10+icount+1)*100+16;
+           GetEnvelopes(16+icount)->AddEnvelope(volEnv[2], detElemId, true, TGeoTranslation(xEnv,-yEnvP,kZp));
+           detElemId = (10+icount+1)*100+2;
+           GetEnvelopes(16+icount)->AddEnvelope(volEnv[6], detElemId, true, TGeoTranslation(xEnv, yEnvP,kZp));
+           detElemId = (10+icount+1)*100+11;
+            GetEnvelopes(16+icount)->AddEnvelope(volEnv[11], detElemId, true, TGeoTranslation(-xEnv,-yEnvM,kZm),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           detElemId = (10+icount+1)*100+7;
+            GetEnvelopes(16+icount)->AddEnvelope(volEnv[15], detElemId, true, TGeoTranslation(-xEnv, yEnvM,kZm),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAlu,volEnv[2],iVolNum++,3, dpar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAlu,volEnv[6],iVolNum++,3, dpar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAlu,volEnv[11],iVolNum++,3, dpar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAlu,volEnv[15],iVolNum++,3, dpar);
+
+// horizontal cable support chamber type D
+
+           spar[0]=dpar[0]-(kYVSup[0]/2.)*zRatio;
+           spar[1]=kSizeSupportCable[1];
+           spar[2]=kSizeSupportCable[2];
+           for(Int_t in=0;in<3;in++){
+                     GetEnvelopes(16+icount)->AddEnvelope(volEnvSupportHD[in], 0, true, TGeoTranslation(xEnv+kYVSup[0]/2.*zRatio,-(yEnvP+dpar[1]/2.*(in-1)),-(kSizeVSupExt[0]+spar[2])));
+             GetEnvelopes(16+icount)->AddEnvelope(volEnvSupportHD[in+3], 0, true, TGeoTranslation(xEnv+kYVSup[0]/2.*zRatio, yEnvP+dpar[1]/2.*(in-1),-(kSizeVSupExt[0]+spar[2])));
+                     GetEnvelopes(16+icount)->AddEnvelope(volEnvSupportHD[in+6], 0, true, TGeoTranslation(-(xEnv+kYVSup[0]/2.*zRatio),-(yEnvM+dpar[1]/2.*(in-1)),kSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+             GetEnvelopes(16+icount)->AddEnvelope(volEnvSupportHD[in+9], 0, true, TGeoTranslation(-(xEnv+kYVSup[0]/2.*zRatio),yEnvM+dpar[1]/2.*(in-1),kSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           }
+           for(Int_t ii=0;ii<12;ii++) 
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluSupportH,volEnvSupportHD[ii],iVolNum++,3, spar);
+           
+// angular supports chamber type D
+// 1 vertical     
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport1V[1];
+           spar[2]=kSizeSupport1V[2];
+           sparysave=spar[1];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VD[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvP-dpar[1],kZp+dpar[2]+spar[2]/2.));
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VD[1], 0, true,
+           TGeoTranslation(xEnv,yEnvP-dpar[1],kZp+dpar[2]+spar[2]/2.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VD[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvM-dpar[1],kZm-dpar[2]-spar[2]/2.),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VD[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvM-dpar[1],kZm-dpar[2]-spar[2]/2.),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+            for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport1V,volEnvSuppAng1VD[i],iVolNum++,3, spar);
+
+
+// 1 horizontal           
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport1H[1];
+           spar[2]=kSizeSupport1H[2];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HD[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvP-dpar[1]-sparysave,kZp+dpar[2]-spar[2]));
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HD[1], 0, true,
+           TGeoTranslation(xEnv,yEnvP-dpar[1]-sparysave,kZp+dpar[2]-spar[2]));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HD[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvM-dpar[1]-sparysave,kZm-(dpar[2]-spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HD[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvM-dpar[1]-sparysave,kZm-(dpar[2]-spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+            for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport1H,volEnvSuppAng1HD[i],iVolNum++,3, spar);
+
+// gas pipe (low)
+           ppar[0]=kSizeGasPipe[0];
+           ppar[1]=kSizeGasPipe[1];
+           ppar[2]=dpar[0];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1D[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvP-dpar[1]-sparysave-kOffsetGasPipe,kZp),rsupportpipe);
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1D[1], 0, true,
+           TGeoTranslation(xEnv,yEnvP-dpar[1]-sparysave-kOffsetGasPipe,kZp),rsupportpipe);
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1D[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvM-dpar[1]-sparysave-kOffsetGasPipe,kZm),rsupportpipe);
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1D[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvM-dpar[1]-sparysave-kOffsetGasPipe,kZm),rsupportpipe);
+
+            for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe1D[i],iVolNum++,3, ppar);
+
+// 2 vertical     
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport2V[1];
+           spar[2]=kSizeSupport2V[2];
+           sparysave=spar[1];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VD[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvP-dpar[1],kSizeVSupExt[0]+spar[2]));
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VD[1], 0, true,
+           TGeoTranslation(xEnv,yEnvP-dpar[1],kSizeVSupExt[0]+spar[2]));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VD[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvM-dpar[1],-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VD[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvM-dpar[1],-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           
+           for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport2V,volEnvSuppAng2VD[i],iVolNum++,3, spar);         
+
+// 2 horizontal           
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport2H[1];
+           spar[2]=kSizeSupport2H[2];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HD[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvP-dpar[1]-sparysave,kSizeVSupExt[0]+spar[2]));
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HD[1], 0, true,
+           TGeoTranslation(xEnv,yEnvP-dpar[1]-sparysave,kSizeVSupExt[0]+spar[2]));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HD[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvM-dpar[1]-sparysave,-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HD[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvM-dpar[1]-sparysave,-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport2H,volEnvSuppAng2HD[i],iVolNum++,3, spar);         
+
+// 3 vertical     
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport1V[1];
+           spar[2]=kSizeSupport1V[2];
+           sparysave=spar[1];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VD[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvP+dpar[1],kZp+dpar[2]+spar[2]/2.));
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VD[1], 0, true,
+           TGeoTranslation(xEnv,yEnvP+dpar[1],kZp+dpar[2]+spar[2]/2.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VD[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvM+dpar[1],kZm-dpar[2]-spar[2]/2.),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VD[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvM+dpar[1],kZm-dpar[2]-spar[2]/2.),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+            for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport3V,volEnvSuppAng3VD[i],iVolNum++,3, spar);
+
+
+// 3 horizontal           
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport1H[1];
+           spar[2]=kSizeSupport1H[2];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HD[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvP+dpar[1]+sparysave,kZp+dpar[2]-spar[2]));
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HD[1], 0, true,
+           TGeoTranslation(xEnv,yEnvP+dpar[1]+sparysave,kZp+dpar[2]-spar[2]));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HD[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvM+dpar[1]+sparysave,kZm-(dpar[2]-spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HD[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvM+dpar[1]+sparysave,kZm-(dpar[2]-spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
 
-           GetChamber(10+icount)->GetGeometry()->AddEnvelopeConstituentParam(volAlu,volEnv[2],iVolNum++,3, dpar);
-           GetChamber(10+icount)->GetGeometry()->AddEnvelopeConstituentParam(volAlu,volEnv[6],iVolNum++,3, dpar);
-           GetChamber(10+icount)->GetGeometry()->AddEnvelopeConstituentParam(volAlu,volEnv[11],iVolNum++,3, dpar);
-           GetChamber(10+icount)->GetGeometry()->AddEnvelopeConstituentParam(volAlu,volEnv[15],iVolNum++,3, dpar);
+            for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport3H,volEnvSuppAng3HD[i],iVolNum++,3, spar);
+               
+// gas pipe (high)
+           ppar[0]=kSizeGasPipe[0];
+           ppar[1]=kSizeGasPipe[1];
+           ppar[2]=dpar[0];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2D[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvP+dpar[1]+sparysave+kOffsetGasPipe,kZp),rsupportpipe);
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2D[1], 0, true,
+           TGeoTranslation(xEnv,yEnvP+dpar[1]+sparysave+kOffsetGasPipe,kZp),rsupportpipe);
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2D[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvM+dpar[1]+sparysave+kOffsetGasPipe,kZm),rsupportpipe);
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2D[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvM+dpar[1]+sparysave+kOffsetGasPipe,kZm),rsupportpipe);
+
+            for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe2D[i],iVolNum++,3, ppar);
+
+// 4 vertical     
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport2V[1];
+           spar[2]=kSizeSupport2V[2];
+           sparysave=spar[1];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VD[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvP+dpar[1],kSizeVSupExt[0]+spar[2]));
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VD[1], 0, true,
+           TGeoTranslation(xEnv,yEnvP+dpar[1],kSizeVSupExt[0]+spar[2]));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VD[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvM+dpar[1],-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VD[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvM+dpar[1],-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           
+           for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport4V,volEnvSuppAng4VD[i],iVolNum++,3, spar);         
+
+// 4 horizontal           
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport2H[1];
+           spar[2]=kSizeSupport2H[2];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HD[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvP+dpar[1]+sparysave,kSizeVSupExt[0]+spar[2]));
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HD[1], 0, true,
+           TGeoTranslation(xEnv,yEnvP+dpar[1]+sparysave,kSizeVSupExt[0]+spar[2]));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HD[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvM+dpar[1]+sparysave,-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HD[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvM+dpar[1]+sparysave,-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport4H,volEnvSuppAng4HD[i],iVolNum++,3, spar);         
+
+// X horizontal           
+           spar[0]=(kYVSup[3]-kYVSup[0])/2.*zRatio;
+           spar[1]=kSizeSupportXH[1];
+           spar[2]=kSizeSupportXH[2];
+           sparysavex=spar[1];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHD[0], 0, true,
+           TGeoTranslation(spar[0]+kYVSup[0]*zRatio,-yEnvP+dpar[1]+sparysave+1.0,kSizeVSupExt[0]+spar[2]));
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHD[1], 0, true,
+           TGeoTranslation(spar[0]+kYVSup[0]*zRatio,yEnvP+dpar[1]+sparysave+1.0,kSizeVSupExt[0]+spar[2]));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHD[2], 0, true,
+           TGeoTranslation(-(spar[0]+kYVSup[0]*zRatio),yEnvM+dpar[1]+sparysave+1.0,-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHD[3], 0, true,
+           TGeoTranslation(-(spar[0]+kYVSup[0]*zRatio),-yEnvM+dpar[1]+sparysave+1.0,-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupportXH,volEnvSuppAngXHD[i],iVolNum++,3, spar);         
+
+// X vertical     
+           spar[0]=(kYVSup[3]-kYVSup[0])/2.*zRatio;
+           spar[1]=kSizeSupportXV[1];
+           spar[2]=kSizeSupportXV[2];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXVD[0], 0, true,
+           TGeoTranslation(spar[0]+kYVSup[0]*zRatio,-yEnvP+dpar[1]+sparysave+1.0+sparysavex+spar[1],kSizeVSupExt[0]+spar[2]));
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXVD[1], 0, true,
+           TGeoTranslation(spar[0]+kYVSup[0]*zRatio,yEnvP+dpar[1]+sparysave+1.0+sparysavex+spar[1],kSizeVSupExt[0]+spar[2]));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXVD[2], 0, true,
+           TGeoTranslation(-(spar[0]+kYVSup[0]*zRatio),yEnvM+dpar[1]+sparysave+1.0+sparysavex+spar[1],-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXVD[3], 0, true,
+           TGeoTranslation(-(spar[0]+kYVSup[0]*zRatio),-yEnvM+dpar[1]+sparysave+1.0+sparysavex+spar[1],-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupportXV,volEnvSuppAngXVD[i],iVolNum++,3, spar);         
 
 // E
            yEnvPsave = yEnvP;
@@ -268,33 +1194,483 @@ void AliMUONTriggerGeometryBuilder::CreateGeometry()
            yEnvP = (yEnvMsave + kYMIN * zRatio ) * zpm + kYMIN * zRatio;
            yEnvM = (yEnvPsave + kYMIN * zRatio ) * zmp + kYMIN * zRatio;
 
-           GetChamber(10+icount)->GetGeometry()->AddEnvelope(volEnv[1], true, TGeoTranslation(xEnv,-yEnvP,kZp));
-           GetChamber(10+icount)->GetGeometry()->AddEnvelope(volEnv[7], true, TGeoTranslation(xEnv, yEnvP,kZp));
-           GetChamber(10+icount)->GetGeometry()->AddEnvelope(volEnv[10], true, TGeoTranslation(-xEnv,-yEnvM,kZm));
-           GetChamber(10+icount)->GetGeometry()->AddEnvelope(volEnv[16], true, TGeoTranslation(-xEnv, yEnvM,kZm));
+           detElemId = (10+icount+1)*100+15;
+           GetEnvelopes(16+icount)->AddEnvelope(volEnv[1], detElemId, true, TGeoTranslation(xEnv,-yEnvM,kZm));
+           detElemId = (10+icount+1)*100+3;
+           GetEnvelopes(16+icount)->AddEnvelope(volEnv[7], detElemId, true, TGeoTranslation(xEnv, yEnvM,kZm));
+           detElemId = (10+icount+1)*100+12;
+           GetEnvelopes(16+icount)->AddEnvelope(volEnv[10], detElemId, true, TGeoTranslation(-xEnv,-yEnvP,kZp),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           detElemId = (10+icount+1)*100+6;
+           GetEnvelopes(16+icount)->AddEnvelope(volEnv[16], detElemId, true, TGeoTranslation(-xEnv, yEnvP,kZp),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAlu,volEnv[1],iVolNum++,3,dpar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAlu,volEnv[7],iVolNum++,3,dpar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAlu,volEnv[10],iVolNum++,3,dpar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAlu,volEnv[16],iVolNum++,3,dpar);
 
-           GetChamber(10+icount)->GetGeometry()->AddEnvelopeConstituentParam(volAlu,volEnv[1],iVolNum++,3,dpar);
-           GetChamber(10+icount)->GetGeometry()->AddEnvelopeConstituentParam(volAlu,volEnv[7],iVolNum++,3,dpar);
-           GetChamber(10+icount)->GetGeometry()->AddEnvelopeConstituentParam(volAlu,volEnv[10],iVolNum++,3,dpar);
-           GetChamber(10+icount)->GetGeometry()->AddEnvelopeConstituentParam(volAlu,volEnv[16],iVolNum++,3,dpar);
+// horizontal cable support chamber type E
+
+           spar[0]=dpar[0]-(kYVSup[0]/2.)*zRatio;
+           spar[1]=kSizeSupportCable[1];
+           spar[2]=kSizeSupportCable[2];
+           for(Int_t in=0;in<3;in++){
+                     GetEnvelopes(16+icount)->AddEnvelope(volEnvSupportHE[in], 0, true, TGeoTranslation(xEnv+kYVSup[0]/2.*zRatio,-(yEnvM+dpar[1]/2.*(in-1)),kSizeVSupExt[0]+spar[2]));
+             GetEnvelopes(16+icount)->AddEnvelope(volEnvSupportHE[in+3], 0, true, TGeoTranslation(xEnv+kYVSup[0]/2.*zRatio, yEnvM+dpar[1]/2.*(in-1),kSizeVSupExt[0]+spar[2]));
+                     GetEnvelopes(16+icount)->AddEnvelope(volEnvSupportHE[in+6], 0, true, TGeoTranslation(-(xEnv+kYVSup[0]/2.*zRatio),-(yEnvP+dpar[1]/2.*(in-1)),-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+             GetEnvelopes(16+icount)->AddEnvelope(volEnvSupportHE[in+9], 0, true, TGeoTranslation(-(xEnv+kYVSup[0]/2.*zRatio), yEnvP+dpar[1]/2.*(in-1),-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           }
+           for(Int_t ii=0;ii<12;ii++) 
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluSupportH,volEnvSupportHE[ii],iVolNum++,3, spar);
+           
+// angular supports chamber type E
+// 1 vertical     
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport1V[1];
+           spar[2]=kSizeSupport1V[2];
+           sparysave=spar[1];
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VE[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvM-dpar[1],kZm-dpar[2]-spar[2]/2.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VE[1], 0, true,
+           TGeoTranslation(xEnv,yEnvM-dpar[1],kZm-dpar[2]-spar[2]/2.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VE[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvP-dpar[1],kZp+dpar[2]+spar[2]/2.),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VE[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvP-dpar[1],kZp+dpar[2]+spar[2]/2.),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport1V,volEnvSuppAng1VE[i],iVolNum++,3, spar);
 
 
+// 1 horizontal           
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport1H[1];
+           spar[2]=kSizeSupport1H[2];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HE[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvM-dpar[1]-sparysave,kZm-(dpar[2]-spar[2])));
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HE[1], 0, true,
+           TGeoTranslation(xEnv,yEnvM-dpar[1]-sparysave,kZm-(dpar[2]-spar[2])));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HE[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvP-dpar[1]-sparysave,kZp+dpar[2]-spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HE[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvP-dpar[1]-sparysave,kZp+dpar[2]-spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+            for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport1H,volEnvSuppAng1HE[i],iVolNum++,3, spar);
+
+// gas pipe (low)
+           ppar[0]=kSizeGasPipe[0];
+           ppar[1]=kSizeGasPipe[1];
+           ppar[2]=dpar[0];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1E[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvM-dpar[1]-sparysave-kOffsetGasPipe,kZm),rsupportpipe);
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1E[1], 0, true,
+           TGeoTranslation(xEnv,yEnvM-dpar[1]-sparysave-kOffsetGasPipe,kZm),rsupportpipe);
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1E[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvP-dpar[1]-sparysave-kOffsetGasPipe,kZp),rsupportpipe);
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1E[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvP-dpar[1]-sparysave-kOffsetGasPipe,kZp),rsupportpipe);
+
+            for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe1E[i],iVolNum++,3, ppar);
+
+// 2 vertical     
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport2V[1];
+           spar[2]=kSizeSupport2V[2];
+           sparysave=spar[1];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VE[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvM-dpar[1],-(kSizeVSupExt[0]+spar[2])));
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VE[1], 0, true,
+           TGeoTranslation(xEnv,yEnvM-dpar[1],-(kSizeVSupExt[0]+spar[2])));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VE[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvP-dpar[1],kSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VE[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvP-dpar[1],kSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           
+           for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport2V,volEnvSuppAng2VE[i],iVolNum++,3, spar);         
+
+// 2 horizontal           
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport2H[1];
+           spar[2]=kSizeSupport2H[2];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HE[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvM-dpar[1]-sparysave,-(kSizeVSupExt[0]+spar[2])));
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HE[1], 0, true,
+           TGeoTranslation(xEnv,yEnvM-dpar[1]-sparysave,-(kSizeVSupExt[0]+spar[2])));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HE[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvP-dpar[1]-sparysave,kSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HE[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvP-dpar[1]-sparysave,kSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport2H,volEnvSuppAng2HE[i],iVolNum++,3, spar);         
+
+// 3 vertical     
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport1V[1];
+           spar[2]=kSizeSupport1V[2];
+           sparysave=spar[1];
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VE[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvM+dpar[1],kZm-dpar[2]-spar[2]/2.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VE[1], 0, true,
+           TGeoTranslation(xEnv,yEnvM+dpar[1],kZm-dpar[2]-spar[2]/2.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VE[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvP+dpar[1],kZp+dpar[2]+spar[2]/2.),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VE[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvP+dpar[1],kZp+dpar[2]+spar[2]/2.),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport3V,volEnvSuppAng3VE[i],iVolNum++,3, spar);
+
+
+// 3 horizontal           
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport1H[1];
+           spar[2]=kSizeSupport1H[2];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HE[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvM+dpar[1]+sparysave,kZm-(dpar[2]-spar[2])));
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HE[1], 0, true,
+           TGeoTranslation(xEnv,yEnvM+dpar[1]+sparysave,kZm-(dpar[2]-spar[2])));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HE[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvP+dpar[1]+sparysave,kZp+dpar[2]-spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HE[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvP+dpar[1]+sparysave,kZp+dpar[2]-spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+            for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport3H,volEnvSuppAng3HE[i],iVolNum++,3, spar);
+
+// gas pipe (high)
+           ppar[0]=kSizeGasPipe[0];
+           ppar[1]=kSizeGasPipe[1];
+           ppar[2]=dpar[0];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2E[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvM+dpar[1]+sparysave+kOffsetGasPipe,kZm),rsupportpipe);
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2E[1], 0, true,
+           TGeoTranslation(xEnv,yEnvM+dpar[1]+sparysave+kOffsetGasPipe,kZm),rsupportpipe);
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2E[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvP+dpar[1]+sparysave+kOffsetGasPipe,kZp),rsupportpipe);
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2E[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvP+dpar[1]+sparysave+kOffsetGasPipe,kZp),rsupportpipe);
+
+            for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe2E[i],iVolNum++,3, ppar);
+
+// 4 vertical     
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport2V[1];
+           spar[2]=kSizeSupport2V[2];
+           sparysave=spar[1];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VE[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvM+dpar[1],-(kSizeVSupExt[0]+spar[2])));
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VE[1], 0, true,
+           TGeoTranslation(xEnv,yEnvM+dpar[1],-(kSizeVSupExt[0]+spar[2])));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VE[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvP+dpar[1],kSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VE[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvP+dpar[1],kSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           
+           for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport4V,volEnvSuppAng4VE[i],iVolNum++,3, spar);         
+
+// 4 horizontal           
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport2H[1];
+           spar[2]=kSizeSupport2H[2];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HE[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvM+dpar[1]+sparysave,-(kSizeVSupExt[0]+spar[2])));
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HE[1], 0, true,
+           TGeoTranslation(xEnv,yEnvM+dpar[1]+sparysave,-(kSizeVSupExt[0]+spar[2])));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HE[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvP+dpar[1]+sparysave,kSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HE[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvP+dpar[1]+sparysave,kSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport4H,volEnvSuppAng4HE[i],iVolNum++,3, spar);         
+
+// X horizontal           
+           spar[0]=(kYVSup[3]-kYVSup[0])/2.*zRatio;
+           spar[1]=kSizeSupportXH[1];
+           spar[2]=kSizeSupportXH[2];
+           sparysavex=spar[1];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHE[0], 0, true,
+           TGeoTranslation(spar[0]+kYVSup[0]*zRatio,-yEnvM+dpar[1]+sparysave+1.0,-(kSizeVSupExt[0]+spar[2])));
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHE[1], 0, true,
+           TGeoTranslation(spar[0]+kYVSup[0]*zRatio,yEnvM+dpar[1]+sparysave+1.0,-(kSizeVSupExt[0]+spar[2])));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHE[2], 0, true,
+           TGeoTranslation(-(spar[0]+kYVSup[0]*zRatio),-yEnvP+dpar[1]+sparysave+1.0,kSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHE[3], 0, true,
+           TGeoTranslation(-(spar[0]+kYVSup[0]*zRatio),yEnvP+dpar[1]+sparysave+1.0,kSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupportXH,volEnvSuppAngXHE[i],iVolNum++,3, spar);         
+
+// X vertical     
+           spar[0]=(kYVSup[3]-kYVSup[0])/2.*zRatio;
+           spar[1]=kSizeSupportXV[1];
+           spar[2]=kSizeSupportXV[2];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXVE[0], 0, true,
+           TGeoTranslation(spar[0]+kYVSup[0]*zRatio,-yEnvM+dpar[1]+sparysave+1.0+sparysavex+spar[1],-(kSizeVSupExt[0]+spar[2])));
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXVE[1], 0, true,
+           TGeoTranslation(spar[0]+kYVSup[0]*zRatio,yEnvM+dpar[1]+sparysave+1.0+sparysavex+spar[1],-(kSizeVSupExt[0]+spar[2])));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXVE[2], 0, true,
+           TGeoTranslation(-(spar[0]+kYVSup[0]*zRatio),-yEnvP+dpar[1]+sparysave+1.0+sparysavex+spar[1],kSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXVE[3], 0, true,
+           TGeoTranslation(-(spar[0]+kYVSup[0]*zRatio),yEnvP+dpar[1]+sparysave+1.0+sparysavex+spar[1],kSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupportXV,volEnvSuppAngXVE[i],iVolNum++,3, spar);         
+
 // F
            yEnvPsave = yEnvP;
            yEnvMsave = yEnvM;
            yEnvP = (yEnvMsave + kYMIN * zRatio ) * zpm + kYMIN * zRatio;
            yEnvM = (yEnvPsave + kYMIN * zRatio ) * zmp + kYMIN * zRatio;
 
-           GetChamber(10+icount)->GetGeometry()->AddEnvelope(volEnv[0], true, TGeoTranslation(xEnv,-yEnvM,kZm));
-           GetChamber(10+icount)->GetGeometry()->AddEnvelope(volEnv[8], true, TGeoTranslation(xEnv, yEnvM,kZm));
-           GetChamber(10+icount)->GetGeometry()->AddEnvelope(volEnv[9], true, TGeoTranslation(-xEnv,-yEnvP,kZp));
-           GetChamber(10+icount)->GetGeometry()->AddEnvelope(volEnv[17], true, TGeoTranslation(-xEnv, yEnvP,kZp));
+           detElemId = (10+icount+1)*100+14;
+           GetEnvelopes(16+icount)->AddEnvelope(volEnv[0], detElemId, true, TGeoTranslation(xEnv,-yEnvP,kZp));
+           detElemId = (10+icount+1)*100+4;
+           GetEnvelopes(16+icount)->AddEnvelope(volEnv[8], detElemId, true, TGeoTranslation(xEnv, yEnvP,kZp));
+           detElemId = (10+icount+1)*100+13;
+           GetEnvelopes(16+icount)->AddEnvelope(volEnv[9], detElemId, true, TGeoTranslation(-xEnv,-yEnvM,kZm),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           detElemId = (10+icount+1)*100+5;
+           GetEnvelopes(16+icount)->AddEnvelope(volEnv[17], detElemId, true, TGeoTranslation(-xEnv, yEnvM,kZm),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
            
-           GetChamber(10+icount)->GetGeometry()->AddEnvelopeConstituentParam(volAlu,volEnv[0],iVolNum++,3,dpar);
-           GetChamber(10+icount)->GetGeometry()->AddEnvelopeConstituentParam(volAlu,volEnv[8],iVolNum++,3,dpar);
-           GetChamber(10+icount)->GetGeometry()->AddEnvelopeConstituentParam(volAlu,volEnv[9],iVolNum++,3,dpar);
-           GetChamber(10+icount)->GetGeometry()->AddEnvelopeConstituentParam(volAlu,volEnv[17],iVolNum++,3,dpar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAlu,volEnv[0],iVolNum++,3,dpar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAlu,volEnv[8],iVolNum++,3,dpar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAlu,volEnv[9],iVolNum++,3,dpar);
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAlu,volEnv[17],iVolNum++,3,dpar);
+
+// horizontal cable support chamber type F
+
+           spar[0]=dpar[0]-(kYVSup[0]/2.)*zRatio;
+           spar[1]=kSizeSupportCable[1];
+           spar[2]=kSizeSupportCable[2];
+           for(Int_t in=0;in<3;in++){
+                     GetEnvelopes(16+icount)->AddEnvelope(volEnvSupportHF[in], 0, true, TGeoTranslation(xEnv+kYVSup[0]/2.*zRatio,-(yEnvP+dpar[1]/2.*(in-1)),-(kSizeVSupExt[0]+spar[2])));
+             GetEnvelopes(16+icount)->AddEnvelope(volEnvSupportHF[in+3], 0, true, TGeoTranslation(xEnv+kYVSup[0]/2.*zRatio,yEnvP+dpar[1]/2.*(in-1),-(kSizeVSupExt[0]+spar[2])));
+                     GetEnvelopes(16+icount)->AddEnvelope(volEnvSupportHF[in+6], 0, true, TGeoTranslation(-(xEnv+kYVSup[0]/2.*zRatio),-(yEnvM+dpar[1]/2.*(in-1)),kSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+             GetEnvelopes(16+icount)->AddEnvelope(volEnvSupportHF[in+9], 0, true, TGeoTranslation(-(xEnv+kYVSup[0]/2.*zRatio), yEnvM+dpar[1]/2.*(in-1),kSizeVSupExt[0]+spar[2]),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           }
+           for(Int_t ii=0;ii<12;ii++) 
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluSupportH,volEnvSupportHF[ii],iVolNum++,3, spar);
+
+// angular supports chamber type F
+// 1 vertical     
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport1V[1];
+           spar[2]=kSizeSupport1V[2];
+           sparysave=spar[1];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VF[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvP-dpar[1],kZp+dpar[2]+spar[2]/2.));
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VF[1], 0, true,
+           TGeoTranslation(xEnv,yEnvP-dpar[1],kZp+dpar[2]+spar[2]/2.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VF[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvM-dpar[1],kZm-dpar[2]-spar[2]/2.),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1VF[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvM-dpar[1],kZm-dpar[2]-spar[2]/2.),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+            for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport1V,volEnvSuppAng1VF[i],iVolNum++,3, spar);
+
+// 1 horizontal           
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport1H[1];
+           spar[2]=kSizeSupport1H[2];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HF[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvP-dpar[1]-sparysave,kZp+dpar[2]-spar[2]));
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HF[1], 0, true,
+           TGeoTranslation(xEnv,yEnvP-dpar[1]-sparysave,kZp+dpar[2]-spar[2]));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HF[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvM-dpar[1]-sparysave,kZm-(dpar[2]-spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng1HF[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvM-dpar[1]-sparysave,kZm-(dpar[2]-spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
 
+            for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport1H,volEnvSuppAng1HF[i],iVolNum++,3, spar);
+
+// gas pipe (low)
+           ppar[0]=kSizeGasPipe[0];
+           ppar[1]=kSizeGasPipe[1];
+           ppar[2]=dpar[0];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1F[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvP-dpar[1]-sparysave-kOffsetGasPipe,kZp),rsupportpipe);
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1F[1], 0, true,
+           TGeoTranslation(xEnv,yEnvP-dpar[1]-sparysave-kOffsetGasPipe,kZp),rsupportpipe);
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1F[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvM-dpar[1]-sparysave-kOffsetGasPipe,kZm),rsupportpipe);
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe1F[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvM-dpar[1]-sparysave-kOffsetGasPipe,kZm),rsupportpipe);
+
+            for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe1F[i],iVolNum++,3, ppar);
+
+// 2 vertical     
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport2V[1];
+           spar[2]=kSizeSupport2V[2];
+           sparysave=spar[1];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VF[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvP-dpar[1],kSizeVSupExt[0]+spar[2]));
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VF[1], 0, true,
+           TGeoTranslation(xEnv,yEnvP-dpar[1],kSizeVSupExt[0]+spar[2]));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VF[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvM-dpar[1],-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2VF[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvM-dpar[1],-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           
+           for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport2V,volEnvSuppAng2VF[i],iVolNum++,3, spar);         
+
+// 2 horizontal           
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport2H[1];
+           spar[2]=kSizeSupport2H[2];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HF[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvP-dpar[1]-sparysave,kSizeVSupExt[0]+spar[2]));
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HF[1], 0, true,
+           TGeoTranslation(xEnv,yEnvP-dpar[1]-sparysave,kSizeVSupExt[0]+spar[2]));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HF[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvM-dpar[1]-sparysave,-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng2HF[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvM-dpar[1]-sparysave,-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport2H,volEnvSuppAng2HF[i],iVolNum++,3, spar);         
+
+// 3 vertical     
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport1V[1];
+           spar[2]=kSizeSupport1V[2];
+           sparysave=spar[1];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VF[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvP+dpar[1],kZp+dpar[2]+spar[2]/2.));
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VF[1], 0, true,
+           TGeoTranslation(xEnv,yEnvP+dpar[1],kZp+dpar[2]+spar[2]/2.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VF[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvM+dpar[1],kZm-dpar[2]-spar[2]/2.),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3VF[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvM+dpar[1],kZm-dpar[2]-spar[2]/2.),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+            for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport3V,volEnvSuppAng3VF[i],iVolNum++,3, spar);
+
+// 3 horizontal           
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport1H[1];
+           spar[2]=kSizeSupport1H[2];
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HF[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvP+dpar[1]+sparysave,kZp+dpar[2]-spar[2]));
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HF[1], 0, true,
+           TGeoTranslation(xEnv,yEnvP+dpar[1]+sparysave,kZp+dpar[2]-spar[2]));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HF[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvM+dpar[1]+sparysave,kZm-(dpar[2]-spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng3HF[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvM+dpar[1]+sparysave,kZm-(dpar[2]-spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+            for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport3H,volEnvSuppAng3HF[i],iVolNum++,3, spar);
+           
+// gas pipe (high)
+           ppar[0]=kSizeGasPipe[0];
+           ppar[1]=kSizeGasPipe[1];
+           ppar[2]=dpar[0];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2F[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvP+dpar[1]+sparysave+kOffsetGasPipe,kZp),rsupportpipe);
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2F[1], 0, true,
+           TGeoTranslation(xEnv,yEnvP+dpar[1]+sparysave+kOffsetGasPipe,kZp),rsupportpipe);
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2F[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvM+dpar[1]+sparysave+kOffsetGasPipe,kZm),rsupportpipe);
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvInoxGasPipe2F[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvM+dpar[1]+sparysave+kOffsetGasPipe,kZm),rsupportpipe);
+
+            for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volInoxGasPipe,volEnvInoxGasPipe2F[i],iVolNum++,3, ppar);
+
+// 4 vertical     
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport2V[1];
+           spar[2]=kSizeSupport2V[2];
+           sparysave=spar[1];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VF[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvP+dpar[1],kSizeVSupExt[0]+spar[2]));
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VF[1], 0, true,
+           TGeoTranslation(xEnv,yEnvP+dpar[1],kSizeVSupExt[0]+spar[2]));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VF[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvM+dpar[1],-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4VF[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvM+dpar[1],-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           
+           for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport4V,volEnvSuppAng4VF[i],iVolNum++,3, spar);         
+
+// 4 horizontal           
+           spar[0]=dpar[0];
+           spar[1]=kSizeSupport2H[1];
+           spar[2]=kSizeSupport2H[2];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HF[0], 0, true,
+           TGeoTranslation(xEnv,-yEnvP+dpar[1]+sparysave,kSizeVSupExt[0]+spar[2]));
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HF[1], 0, true,
+           TGeoTranslation(xEnv,yEnvP+dpar[1]+sparysave,kSizeVSupExt[0]+spar[2]));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HF[2], 0, true,
+           TGeoTranslation(-xEnv,-yEnvM+dpar[1]+sparysave,-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAng4HF[3], 0, true,
+           TGeoTranslation(-xEnv,yEnvM+dpar[1]+sparysave,-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupport4H,volEnvSuppAng4HF[i],iVolNum++,3, spar);         
+
+
+// X horizontal           
+           spar[0]=(kYVSup[3]-kYVSup[0])/2.*zRatio;
+           spar[1]=kSizeSupportXH[1];
+           spar[2]=kSizeSupportXH[2];
+           sparysavex=spar[1];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHF[0], 0, true,
+           TGeoTranslation(spar[0]+kYVSup[0]*zRatio,-yEnvP+dpar[1]+sparysave+1.0,kSizeVSupExt[0]+spar[2]));
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHF[1], 0, true,
+           TGeoTranslation(spar[0]+kYVSup[0]*zRatio,yEnvP+dpar[1]+sparysave+1.0,kSizeVSupExt[0]+spar[2]));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHF[2], 0, true,
+           TGeoTranslation(-(spar[0]+kYVSup[0]*zRatio),-yEnvM+dpar[1]+sparysave+1.0,-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXHF[3], 0, true,
+           TGeoTranslation(-(spar[0]+kYVSup[0]*zRatio),yEnvM+dpar[1]+sparysave+1.0,-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupportXH,volEnvSuppAngXHF[i],iVolNum++,3, spar);         
+
+// X vertical     
+           spar[0]=(kYVSup[3]-kYVSup[0])/2.*zRatio;
+           spar[1]=kSizeSupportXV[1];
+           spar[2]=kSizeSupportXV[2];
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXVF[0], 0, true,
+           TGeoTranslation(spar[0]+kYVSup[0]*zRatio,-yEnvP+dpar[1]+sparysave+1.0+sparysavex+spar[1],kSizeVSupExt[0]+spar[2]));
+                   GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXVF[1], 0, true,
+           TGeoTranslation(spar[0]+kYVSup[0]*zRatio,yEnvP+dpar[1]+sparysave+1.0+sparysavex+spar[1],kSizeVSupExt[0]+spar[2]));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXVF[2], 0, true,
+           TGeoTranslation(-(spar[0]+kYVSup[0]*zRatio),-yEnvM+dpar[1]+sparysave+1.0+sparysavex+spar[1],-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+           GetEnvelopes(16+icount)->AddEnvelope(volEnvSuppAngXVF[3], 0, true,
+           TGeoTranslation(-(spar[0]+kYVSup[0]*zRatio),yEnvM+dpar[1]+sparysave+1.0+sparysavex+spar[1],-(kSizeVSupExt[0]+spar[2])),TGeoRotation("rot1",90.,180.,90.,90.,180.,0.));
+
+           for(Int_t i=0;i<4;i++)
+           GetEnvelopes(16+icount)->AddEnvelopeConstituentParam(volAluAngSupportXV,volEnvSuppAngXVF[i],iVolNum++,3, spar);
+                   
        } // end loop on detection planes
     } // end loop on stations    
 }
@@ -302,41 +1678,41 @@ void AliMUONTriggerGeometryBuilder::CreateGeometry()
 //______________________________________________________________________________
 void AliMUONTriggerGeometryBuilder::SetTransformations() 
 {
-// Defines the transformations for the trigger chambers.
-// ---
-    Double_t zpos1, zpos2;    
-    AliMUONChamber *iChamber1, *iChamber2;
-
-    iChamber1 = GetChamber(10);
-    zpos1= - iChamber1->Z(); 
-    iChamber1->GetGeometry()
-       ->SetTranslation(TGeoTranslation(0., 0., zpos1));
-    
-    iChamber2 = GetChamber(11);
-    zpos2 = - iChamber2->Z(); 
-    iChamber2->GetGeometry()
-       ->SetTranslation(TGeoTranslation(0., 0., zpos2));
-
-    iChamber1 = GetChamber(12);
-    zpos1 = - iChamber1->Z(); 
-    iChamber1->GetGeometry()
-       ->SetTranslation(TGeoTranslation(0., 0., zpos1));
+/// Defines the transformations for the trigger chambers.
+
+    if (gAlice->GetModule("SHIL")) {
+      SetMotherVolume(16, "YOUT2");
+      SetMotherVolume(17, "YOUT2");
+      SetMotherVolume(18, "YOUT2");
+      SetMotherVolume(19, "YOUT2");
+    }  
+
+    SetVolume(16, "SC11");
+    SetVolume(17, "SC12");
+    SetVolume(18, "SC13");
+    SetVolume(19, "SC14");
+
+    Double_t zpos1= AliMUONConstants::DefaultChamberZ(10); 
+    SetTranslation(16, TGeoTranslation(0., 0., zpos1));
     
-    iChamber2 = GetChamber(13);
-    zpos2 = - iChamber2->Z(); 
-    iChamber2->GetGeometry()
-       ->SetTranslation(TGeoTranslation(0., 0., zpos2));
+    zpos1= AliMUONConstants::DefaultChamberZ(11); 
+    SetTranslation(17, TGeoTranslation(0., 0., zpos1));
+
+    zpos1= AliMUONConstants::DefaultChamberZ(12); 
+    SetTranslation(18, TGeoTranslation(0., 0., zpos1));
+
+    zpos1= AliMUONConstants::DefaultChamberZ(13); 
+    SetTranslation(19, TGeoTranslation(0., 0., zpos1));
 }
 
 //______________________________________________________________________________
 void AliMUONTriggerGeometryBuilder::SetSensitiveVolumes()
 {
-// Defines the sensitive volumes for trigger station chambers.
-// ---
+/// Defines the sensitive volumes for trigger station chambers.
 
-  GetChamber(10)->GetGeometry()->SetSensitiveVolume("SG1A");
-  GetChamber(11)->GetGeometry()->SetSensitiveVolume("SG2A");
-  GetChamber(12)->GetGeometry()->SetSensitiveVolume("SG3A");
-  GetChamber(13)->GetGeometry()->SetSensitiveVolume("SG4A");
+  GetGeometry(16)->SetSensitiveVolume("S11G");
+  GetGeometry(17)->SetSensitiveVolume("S12G");
+  GetGeometry(18)->SetSensitiveVolume("S13G");
+  GetGeometry(19)->SetSensitiveVolume("S14G");
 }