]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STRUCT/AliPIPEv4.cxx
making calculation of raw Et slightly more straightforward
[u/mrichter/AliRoot.git] / STRUCT / AliPIPEv4.cxx
index c20f43d12d96c25474214b2da379f05be83c6af2..de752296813d01e0a25ca0c2f26bbdf2ab9e61ee 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/* $Id$ */
 
 //-------------------------------------------------------------------------
-//  Beam pipe class
+//  Beam pipe class for ALICE MFT upgrade
 //  This version uses TGeo
-//  Author: A.Morsch
+//  Authors:
+//  F. Manso 
+//  A. Morsch
 //-------------------------------------------------------------------------
 
 
 #include "AliPIPEv4.h"
 #include "AliRun.h"
 #include "AliLog.h"
+
 ClassImp(AliPIPEv4)
+
 //_____________________________________________________________________________
 AliPIPEv4::AliPIPEv4():
-    ftheta_cone(6.00),  // angle of conical beam pipe, if angle < 3 --> cylindrical beam pipe
-    frmin1(2.00),       // internal radius of Be beam pipe
-    fepaisseur(0.08),   // width of Be beam pipe
-    fsigmaz(8.00),      // dispersion of z location (1 sigma) of beam impact position
-    fz_chambre(-40.0),  // first pixel chamber location, closest to the IP
-    fzdebut1(50.),      // beginning of beam pipe z location (A side)
-    fzfin4(-82.)        // end of beamp pipe z location (C side)
+  fRmax(1.8),              // outer radius of Be beam pipe
+  fBe(0.08),               // width of Be beam pipe
+  fZ1(44.4),               // beginning of Be beam pipe z location (A side)
+  fZ2(-44.4)               // end of Be beam pipe z location (C side)
 {
   // Constructor
 }
@@ -63,34 +61,15 @@ AliPIPEv4::AliPIPEv4():
 //_____________________________________________________________________________
 AliPIPEv4::AliPIPEv4(const char *name, const char *title)
   : AliPIPE(name,title),
-    ftheta_cone(6.00),  // angle of conical beam pipe, if angle < 3 --> cylindrical beam pipe
-    frmin1(2.00),       // internal radius of Be beam pipe
-    fepaisseur(0.08),   // width of Be beam pipe
-    fsigmaz(8.00),      // dispersion of z location (1 sigma) of beam impact position
-    fz_chambre(-40.0),  // first pixel chamber location, closest to the IP
-    fzdebut1(50.),      // beginning of beam pipe z location (A side)
-    fzfin4(-82.)        // end of beamp pipe z location (C side)
+    fRmax(1.8),              // outer radius of Be beam pipe
+    fBe(0.08),               // width of Be beam pipe
+    fZ1(44.4),               // beginning of beam pipe z location (A side)
+    fZ2(-44.4)               // end of Be beam pipe z location (C side)
 {
   // Constructor
 }
 
 
-//_____________________________________________________________________________
-AliPIPEv4::AliPIPEv4(const char *name, const char *title, const Float_t theta_cone,  const Float_t rmin1, const Float_t epaisseur, 
-                    const Float_t sigmaz, const Float_t z_chambre)
-  : AliPIPE(name,title),
-    ftheta_cone(theta_cone), // angle of conical beam pipe, if angle < 3 --> cylindrical beam pipe
-    frmin1(rmin1),           // internal radius of Be beam pipe 
-    fepaisseur(epaisseur),   // width of Be beam pipe 
-    fsigmaz(sigmaz),         // dispersion of z location (1 sigma) of beam impact position
-    fz_chambre(z_chambre),   // first pixel chamber location, closest to the IP
-    fzdebut1(50.),           // beginning of beam pipe z location (A side)
-    fzfin4(-82.)             // end of beamp pipe z location (C side)
-{
-  // Constructor
-
-}
-
  
 //___________________________________________
 void AliPIPEv4::CreateGeometry()
@@ -99,8 +78,7 @@ void AliPIPEv4::CreateGeometry()
   //
   //  Class describing the beam pipe geometry
   //
-  Float_t lolo = 0.9;   //1.3 minimum pour que le premier anneau soit dans l'acceptance du spectro
-  Float_t dz, z, zsh, z0;
+  Float_t z, zsh, z0;
   //
   // Rotation Matrices
   //
@@ -109,12 +87,13 @@ void AliPIPEv4::CreateGeometry()
   TGeoRotation* rot180        = new TGeoRotation("rot180", 90., 180.,  90.,  90., 180.,   0.);
   TGeoRotation* rotyz         = new TGeoRotation("rotyz",  90., 180.,   0., 180.,  90.,  90.);
   TGeoRotation* rotxz         = new TGeoRotation("rotxz",   0.,   0.,  90.,  90.,  90., 180.);
-  TGeoRotation* rot045        = new TGeoRotation("rot045", 90.,  45.,  90., 135.,   0.,   0.);
-  TGeoRotation* rot135        = new TGeoRotation("rot135", 90. ,135.,  90., 225.,   0.,   0.);
-  TGeoRotation* rot225        = new TGeoRotation("rot225", 90. ,225.,  90., 315.,   0.,   0.);
-  TGeoRotation* rot315        = new TGeoRotation("rot315", 90. ,315.,  90.,  45.,   0.,   0.);    
+  //TGeoRotation* rot045        = new TGeoRotation("rot045", 90.,  45.,  90., 135.,   0.,   0.);
+  //TGeoRotation* rot135        = new TGeoRotation("rot135", 90. ,135.,  90., 225.,   0.,   0.);
+  //TGeoRotation* rot225        = new TGeoRotation("rot225", 90. ,225.,  90., 315.,   0.,   0.);
+  //TGeoRotation* rot315        = new TGeoRotation("rot315", 90. ,315.,  90.,  45.,   0.,   0.);    
   //
   // Media
+  //const TGeoMedium* kMedSi      =  gGeoManager->GetMedium("PIPE_SILICON"); //FM
   const TGeoMedium* kMedAir     =  gGeoManager->GetMedium("PIPE_AIR");
   const TGeoMedium* kMedAirHigh =  gGeoManager->GetMedium("PIPE_AIR_HIGH");
   const TGeoMedium* kMedVac     =  gGeoManager->GetMedium("PIPE_VACUUM");    
@@ -123,9 +102,12 @@ void AliPIPEv4::CreateGeometry()
   const TGeoMedium* kMedBe      =  gGeoManager->GetMedium("PIPE_BE");       
   const TGeoMedium* kMedCu      =  gGeoManager->GetMedium("PIPE_CU");        
   //const TGeoMedium* kMedKapton  =  gGeoManager->GetMedium("PIPE_KAPTON");        
-  const TGeoMedium* kMedAco     =  gGeoManager->GetMedium("PIPE_ANTICORODAL");        
+  //const TGeoMedium* kMedAco     =  gGeoManager->GetMedium("PIPE_ANTICORODAL");        
   //const TGeoMedium* kMedNEG     =  gGeoManager->GetMedium("PIPE_NEG COATING"); 
-       
+  //const TGeoMedium* kMedAlu     =  gGeoManager->GetMedium("PIPE_ALU");    // fm       
+  const TGeoMedium* kMedAlu2219 =  gGeoManager->GetMedium("PIPE_AA2219");   // fm     
+  const TGeoMedium* kMedAlu5083 =  gGeoManager->GetMedium("PIPE_AA5083");   // fm    
+    
   // Top volume
   TGeoVolume* top    = gGeoManager->GetVolume("ALIC");
   //
@@ -150,11 +132,9 @@ void AliPIPEv4::CreateGeometry()
   //  CP/2 The flange on the non-absorber side:               36.5 cm  
   //  CP/1 The central Be pipe:                              405.0 cm 
   //  CP/3 The double-bellow and flange on the absorber side: 40.5 cm 
-  //
-  //
 
   //
-  //
+  /*
   //  Starting position in z
   const Float_t kCPz0      = -400.0;
   //  Length of the CP/1 section
@@ -167,66 +147,164 @@ void AliPIPEv4::CreateGeometry()
   //    const Float_t kCP2pos    = kCPz0 + kCP2Length / 2.;
   //  Position of the CP/3 section
   const Float_t kCP3pos    = kCPz0 + kCP2Length + kCP1Length + kCP3Length/2.;
+  */
 
 
+  //////////////////// NEW BEAM PIPE GEOMETRY FOR MuonForwardTracker , Author: F. Manso /////////////////////////
+  // from https://twiki.cern.ch/twiki/pub/ALICE/MinutesMecanicsIntegration/Minutes_MFT_meeting_BeamPipe_2013_05_13.pdf
+  //------------------------------------------------ Pipe version 4.6 june 2013 -------------------------------------
+
+  Float_t fztube1=fZ2;
+  Float_t fztube2=fZ2+(-15.53-2.0);
+  Float_t fztube3=fztube2+(-1.3);
+  Float_t fztube4=fztube3+(-1.3-3.8);
+  Float_t fztube5=fztube4+(-4.0-3.8);
+  Float_t fzadapt=fztube5+(-1.3);
+
+  //---------------- Be pipe around the IP ----------
+  TGeoPcon* tube0 = new TGeoPcon(0., 360., 2);
+  tube0->DefineSection(0,fZ1,fRmax-fBe,fRmax);
+  tube0->DefineSection(1,fZ2,fRmax-fBe,fRmax);
+  TGeoVolume* votube0 = new TGeoVolume("votube0",tube0,kMedBe);
+  votube0->SetLineColor(kRed);
+  top->AddNode(votube0,1,new TGeoTranslation(0., 0., 0.));
+
+  TGeoPcon* tube0vide = new TGeoPcon(0., 360., 2);
+  tube0vide->DefineSection(0,fZ1, 0.,fRmax-fBe);
+  tube0vide->DefineSection(1,fZ2, 0.,fRmax-fBe);
+  TGeoVolume* votube0vide = new TGeoVolume("votube0vide",tube0vide,kMedVac);
+  votube0vide->SetVisibility(0);votube0vide->SetLineColor(kGreen);
+  top->AddNode(votube0vide,1,new TGeoTranslation(0., 0., 0.));
+  //-------------------------------------------------
+
+
+  //---------------- First Al tube ------------------
+  TGeoPcon* tube1 = new TGeoPcon(0., 360., 2);
+  tube1->DefineSection(0,fztube1, fRmax-fBe,fRmax);
+  tube1->DefineSection(1,fztube1+(-15.53-2.0),fRmax-fBe,fRmax);
+  TGeoVolume* votube1 = new TGeoVolume("votube1",tube1,kMedAlu2219);
+  votube1->SetLineColor(kBlue);
+  top->AddNode(votube1,1,new TGeoTranslation(0., 0., 0.));
+
+  TGeoPcon* tube1vide = new TGeoPcon(0., 360., 2);
+  tube1vide->DefineSection(0,fZ2, 0.,fRmax-fBe);
+  tube1vide->DefineSection(1,fZ2+(-15.53-2.0), 0.,fRmax-fBe);
+  TGeoVolume* votube1vide = new TGeoVolume("votube1vide",tube1vide,kMedVac);
+  votube1vide->SetVisibility(0);votube1vide->SetLineColor(kGreen);
+  top->AddNode(votube1vide,1,new TGeoTranslation(0., 0., 0.));
+  //-------------------------------------------------
+
+
+  //----------- Conical Al tube before bellows ----------
+  TGeoPcon* tube2 = new TGeoPcon(0., 360., 2);
+  tube2->DefineSection(0,fztube2, fRmax-fBe,fRmax);
+  tube2->DefineSection(1,fztube2+(-1.3),2.15-fBe,2.15);
+  TGeoVolume* votube2 = new TGeoVolume("votube2",tube2,kMedAlu2219);
+  votube2->SetLineColor(kBlue);
+  top->AddNode(votube2,1,new TGeoTranslation(0., 0., 0.));
+
+  TGeoPcon* tube2vide = new TGeoPcon(0., 360., 2);
+  tube2vide->DefineSection(0,fztube2, 0., fRmax-fBe);
+  tube2vide->DefineSection(1,fztube2+(-1.3), 0., 2.15-fBe);
+  TGeoVolume* votube2vide = new TGeoVolume("votube2vide",tube2vide,kMedVac);
+  votube2vide->SetVisibility(0);votube2vide->SetLineColor(kGreen); 
+  top->AddNode(votube2vide,1,new TGeoTranslation(0., 0., 0.));
+  //-------------------------------------------------
+
+
+  //---------- Al tube before first bellow ----------
+  TGeoPcon* tube3 = new TGeoPcon(0., 360., 2);
+  tube3->DefineSection(0,fztube3, 2.15-fBe,2.15);
+  tube3->DefineSection(1,fztube3+(-1.3),2.15-fBe,2.15);
+  TGeoVolume* votube3 = new TGeoVolume("votube3",tube3,kMedAlu2219);
+  votube3->SetLineColor(kBlue);
+  top->AddNode(votube3,1,new TGeoTranslation(0., 0., 0.));
+  //-------------------------------------------------
+  //---------- Al tube between the bellows ----------
+  TGeoPcon* tube4 = new TGeoPcon(0., 360., 2);
+  tube4->DefineSection(0,fztube4, 2.15-fBe,2.15);
+  tube4->DefineSection(1,fztube4+(-4.0),2.15-fBe,2.15);
+  TGeoVolume* votube4 = new TGeoVolume("votube4",tube4,kMedAlu2219);
+  votube4->SetLineColor(kBlue);
+  top->AddNode(votube4,1,new TGeoTranslation(0., 0., 0.));
+  //-------------------------------------------------
+  //-------- Al tube after the second bellow --------
+  TGeoPcon* tube5 = new TGeoPcon(0., 360., 2);
+  tube5->DefineSection(0,fztube5, 2.15-fBe,2.15);
+  tube5->DefineSection(1,fztube5+(-1.3),2.15-fBe,2.15);
+  TGeoVolume* votube5 = new TGeoVolume("votube5",tube5,kMedAlu2219);
+  votube5->SetLineColor(kBlue);
+  top->AddNode(votube5,1,new TGeoTranslation(0., 0., 0.));
+  //-------------------------------------------------
+  //---- One empty tube inside tube3, tube4, tube5 and bellows -----
+  TGeoPcon* tube345vide = new TGeoPcon(0., 360., 2);
+  tube345vide->DefineSection(0,fztube3, 0., 2.15-fBe);
+  tube345vide->DefineSection(1,fztube5+(-1.3), 0., 2.15-fBe);
+  TGeoVolume* votube345vide = new TGeoVolume("votube345vide",tube345vide,kMedVac);
+  votube345vide->SetVisibility(0);votube345vide->SetLineColor(kGreen);
+  top->AddNode(votube345vide,1,new TGeoTranslation(0., 0., 0.));
+  //----------------------------------------------------------------
+
+
+  //----------- 15?? Conical adaptator + flange ----------
+  TGeoPcon* adaptator = new TGeoPcon(0., 360., 4);
+  adaptator->DefineSection(0,fzadapt, 2.15-fBe, 2.15);
+  adaptator->DefineSection(1,fzadapt+(-3.17), 3.0-fBe, 3.0);
+  adaptator->DefineSection(2,fzadapt+(-3.17), 3.0-fBe, 4.3);
+  adaptator->DefineSection(3,fzadapt+(-3.17-1.4), 3.0-fBe ,4.3);
+  TGeoVolume* voadaptator = new TGeoVolume("voadaptator",adaptator,kMedAlu2219);
+  voadaptator->SetLineColor(kBlue);    
+  top->AddNode(voadaptator,1,new TGeoTranslation(0., 0., 0.));
+
+  TGeoPcon* adaptatorvide = new TGeoPcon(0., 360., 4);
+  adaptatorvide->DefineSection(0,fzadapt, 0., 2.15-fBe);
+  adaptatorvide->DefineSection(1,fzadapt+(-3.17), 0., 3.0-fBe);
+  adaptatorvide->DefineSection(2,fzadapt+(-3.17), 0., 3.0-fBe);
+  adaptatorvide->DefineSection(3,fzadapt+(-3.17-1.4), 0., 3.0-fBe);
+  TGeoVolume* voadaptatorvide = new TGeoVolume("voadaptatorvide",adaptatorvide,kMedVac);
+  voadaptatorvide->SetVisibility(0);voadaptatorvide->SetLineColor(kGreen);    
+  top->AddNode(voadaptatorvide,1,new TGeoTranslation(0., 0., 0.));
+  //------------------------------------------------------
+
+
+
+  // ------------------------- Bellows ----------------------------
+
+  //Float_t plieradius = (3.72 + (2. *  7 - 2.) * 0.03) / (4. * 7);  // radius of bellows "plis"
+  Float_t plieradius = 0.17;  // radius of bellow plies
 
-  ///////////////////////////////// NEW GEOMETRY /////////////////////////////////////////////
   
-  Float_t zfin1= fsigmaz - frmin1/TMath::Tan(ftheta_cone/ 180. * TMath::Pi());
-  Float_t zdebut2=zfin1;
-  Float_t rmax2= TMath::Tan(ftheta_cone/ 180. * TMath::Pi())*(fsigmaz+TMath::Abs(fz_chambre));
-  Float_t zfin2=-(TMath::Abs(fz_chambre)-1);
-  Float_t zdebut3=zfin2;
-  Float_t zfin3=zfin2+(-fepaisseur);
-  Float_t zdebut4=zfin3;
-  //---------------- Conical beam pipe ---------------
-  if(ftheta_cone>3){                             
-    TGeoPcon* CONE_VIDE = new TGeoPcon(0., 360., 8);
-    CONE_VIDE->DefineSection(0,fzdebut1, 0.,frmin1);
-    CONE_VIDE->DefineSection(1,zfin1, 0.,frmin1);
-    CONE_VIDE->DefineSection(2,zdebut2, 0.,frmin1);
-    CONE_VIDE->DefineSection(3,zfin2, 0.,rmax2);
-    CONE_VIDE->DefineSection(4,zdebut3, 0.,frmin1);
-    CONE_VIDE->DefineSection(5,zfin3, 0.,frmin1);
-    CONE_VIDE->DefineSection(6,zdebut4, 0.,frmin1);
-    CONE_VIDE->DefineSection(7,fzfin4, 0.,frmin1);
-    TGeoVolume* voCONE_VIDE = new TGeoVolume("CONE_VIDE",CONE_VIDE,kMedVac);            
-    voCONE_VIDE->SetLineColor(kOrange);
-    top->AddNode(voCONE_VIDE,1,new TGeoTranslation(0., 0., 0.));
-
-    TGeoPcon* CONE_BE = new TGeoPcon(0., 360., 8);
-    CONE_BE->DefineSection(0,fzdebut1,frmin1,frmin1+fepaisseur);
-    CONE_BE->DefineSection(1,zfin1,frmin1,frmin1+fepaisseur);
-    CONE_BE->DefineSection(2,zdebut2,frmin1,frmin1+fepaisseur);
-    CONE_BE->DefineSection(3,zfin2,rmax2,rmax2+fepaisseur);
-    CONE_BE->DefineSection(4,zdebut3,frmin1,rmax2+fepaisseur);
-    CONE_BE->DefineSection(5,zfin3,frmin1,rmax2+fepaisseur);
-    CONE_BE->DefineSection(6,zdebut4,frmin1,frmin1+fepaisseur);
-    CONE_BE->DefineSection(7,fzfin4,frmin1,frmin1+fepaisseur);
-    TGeoVolume* voCONE_BE = new TGeoVolume("CONE_BE",CONE_BE,kMedBe);           
-    voCONE_BE->SetLineColor(kRed);
-  }
-  //--------------- Cylindrical beam pipe -------------
-  if(ftheta_cone<3){
-    TGeoPcon* TUBE_VIDE = new TGeoPcon(0., 360., 2);
-    TUBE_VIDE->DefineSection(0,fzdebut1, 0.,frmin1);
-    TUBE_VIDE->DefineSection(1,fzfin4, 0.,frmin1);
-    TGeoVolume* voTUBE_VIDE = new TGeoVolume("TUBE_VIDE",TUBE_VIDE,kMedVac);
-    voTUBE_VIDE->SetLineColor(kOrange);    
-    top->AddNode(voTUBE_VIDE,1,new TGeoTranslation(0., 0., 0.));
-
-    TGeoPcon* TUBE_BE = new TGeoPcon(0., 360., 2);
-    TUBE_BE->DefineSection(0,fzdebut1,frmin1,frmin1+fepaisseur);
-    TUBE_BE->DefineSection(1,fzfin4,frmin1,frmin1+fepaisseur);
-    TGeoVolume* voTUBE_BE = new TGeoVolume("TUBE_BE",TUBE_BE,kMedBe);
-    voTUBE_BE->SetLineColor(kRed);    
-    top->AddNode(voTUBE_BE,1,new TGeoTranslation(0., 0., 0.));
-  }
-  /////////////////////// END NEW GEOMETRY /////////////////////////////
+  // ------------------ First Bellow  -------------------- 
+  TGeoVolume* vobellows1 = MakeBellow("bellows1", 6, 2.15-fBe, 3.0, 3.8, plieradius ,0.03);
+  top->AddNode(vobellows1, 1, new TGeoTranslation(0., 0., fztube3+(-1.3-3.8/2. -0.31 +0.08)));
+  // Comments: removing 1/2 plie (see MakeBellow):  0.31= 2*0.17-0.03    and   0.08: free space
+
+  // small tube of the bellow 1 to cover the 0.08cm remaining space
+  TGeoPcon* bellowtube1 = new TGeoPcon(0., 360., 2);
+  bellowtube1->DefineSection(0,fztube4+(0.08), 2.15-0.03,2.15);
+  bellowtube1->DefineSection(1,fztube4,2.15-0.03,2.15);
+  TGeoVolume* vobellowtube1 = new TGeoVolume("vobellowtube1",bellowtube1,kMedAlu5083);
+  vobellowtube1->SetLineColor(kGreen);
+  top->AddNode(vobellowtube1,1,new TGeoTranslation(0., 0., 0.));
+  //------------------------------------------------------
+   
+  // ------------------ Second Bellow --------------------
+  TGeoVolume* vobellows2 = MakeBellow("bellows2", 6, 2.15-fBe, 3.0, 3.8, plieradius ,0.03);
+  top->AddNode(vobellows2, 1, new TGeoTranslation(0., 0., fztube4+(-4.0-3.8/2. -0.31 +0.08)));
+  // small tube of the bellow 1
+  TGeoPcon* bellowtube2 = new TGeoPcon(0., 360., 2);
+  bellowtube2->DefineSection(0,fztube5+(0.08), 2.15-0.03,2.15);
+  bellowtube2->DefineSection(1,fztube5,2.15-0.03,2.15);
+  TGeoVolume* vobellowtube2 = new TGeoVolume("vobellowtube2",bellowtube2,kMedAlu5083);
+  vobellowtube2->SetLineColor(kGreen);
+  top->AddNode(vobellowtube2,1,new TGeoTranslation(0., 0., 0.));
+  //-----------------------------------------------------
+  
+  /////////////////////////// END NEW BEAM PIPE GEOMETRY fOR MFT /////////////////////////////
     
 
 
+  /*  
   //
   ///////////////////
   //      CP/2     //
@@ -235,15 +313,15 @@ void AliPIPEv4::CreateGeometry()
   // Fixed Point tube [Pos 5]
   //
   // Inner and outer radii of the Stainless Steel pipe    
-  const Float_t kCP2StRi               =      2.90-lolo;
-  const Float_t kCP2StRo               =      2.98-lolo;
+  const Float_t kCP2StRi               =      2.90;
+  const Float_t kCP2StRo               =      2.98;
   //  
   // Transition to central Be-pipe (Bulge)   
   // Length
   const Float_t kCP2BulgeLength        =      0.80;
   //     
   // Bulge outer radius
-  const Float_t kCP2BulgeRo            =      3.05-lolo;
+  const Float_t kCP2BulgeRo            =      3.05;
   //
   // Fixed Point at z = 391.7 (IP)
   //
@@ -251,7 +329,7 @@ void AliPIPEv4::CreateGeometry()
   const Float_t kCP2FixedPointZ        =      8.30;
   //
   // Outer radius of fixed point
-  const Float_t kCP2FixedPointRo       =      3.50-lolo;
+  const Float_t kCP2FixedPointRo       =      3.50;
   //
   // Length of fixed point
   const Float_t kCP2FixedPointLength   =      0.60;
@@ -272,7 +350,7 @@ void AliPIPEv4::CreateGeometry()
   //
   // Fixed flange bulge
   // Outer radius
-  const Float_t kCP2FixedFlangeBulgeRo =     3.00-lolo;
+  const Float_t kCP2FixedFlangeBulgeRo =     3.00;
   //
   // Length    
   const Float_t kCP2FixedFlangeBulgeLength = 2.00;
@@ -309,13 +387,13 @@ void AliPIPEv4::CreateGeometry()
   shCp2Mo->DefineSection(13, z, 0., kCP2BulgeRo);
     
   TGeoVolume* voCp2Mo = new TGeoVolume("CP2MO", shCp2Mo, kMedAir);
-  voCp2Mo->SetVisibility(0);
+  //FM voCp2Mo->SetVisibility(0);
   //
   // CP/1 Vacuum
   TGeoTube*   shCp2Va = new TGeoTube(0., kCP2StRi, (kCP2Length - kCP2FixedFlangeRecessLengths[0])/2.);
   TGeoVolume* voCp2Va = new TGeoVolume("CP2VA", shCp2Va, kMedVac);
     
-  voCp2Mo->AddNode(voCp2Va, 1, new TGeoTranslation(0., 0., kCP2FixedFlangeRecessLengths[0]/2.));
+  //FM voCp2Mo->AddNode(voCp2Va, 1, new TGeoTranslation(0., 0., kCP2FixedFlangeRecessLengths[0]/2.));
     
   /////////////////////////////////////////////
   //  CP/2 Fixed Flange [Pos 6]              //
@@ -335,7 +413,7 @@ void AliPIPEv4::CreateGeometry()
   TGeoVolume* voCp2Fl = new TGeoVolume("CP2FL", shCp2Fl, kMedSteel);
   // 
   dz =  - kCP2Length / 2. +  kCP2FixedFlangeLength / 2.;
-  voCp2Mo->AddNode(voCp2Fl, 1, new TGeoTranslation(0., 0., dz));
+  //FM voCp2Mo->AddNode(voCp2Fl, 1, new TGeoTranslation(0., 0., dz));
 
 
   /////////////////////////////////////////////////////////////
@@ -369,17 +447,16 @@ void AliPIPEv4::CreateGeometry()
 
   TGeoVolume* voCp2Pi = new TGeoVolume("CP2PI", shCp2Pi, kMedSteel);
   dz = (kCP2FixedFlangeRecessLengths[0] + kCP2FixedFlangeRecessLengths[1]) / 2.;
-  voCp2Mo->AddNode(voCp2Pi, 1, new TGeoTranslation(0., 0., dz));
+  //FM voCp2Mo->AddNode(voCp2Pi, 1, new TGeoTranslation(0., 0., dz));
 
   //
   //  Central beam pipe support collars
   //  LHCVC2C_0019
   //  Position at z = -46., 40., 150.
-  //TGeoVolume* voCpSupC = new TGeoVolume("CpSupC", new TGeoTube(3.051, 4.00, 0.35), kMedAco);
+  TGeoVolume* voCpSupC = new TGeoVolume("CpSupC", new TGeoTube(3.051, 4.00, 0.35), kMedAco);
   //voCp1->AddNode(voCpSupC, 1, new TGeoTranslation(0., 0.,  kCP1Length / 2. - 98.2)); 
   //voCp1->AddNode(voCpSupC, 2, new TGeoTranslation(0., 0.,  kCP1Length / 2.- 191.5)); 
 
-  TGeoVolume* voCpSupClolo = new TGeoVolume("CpSupC", new TGeoTube(3.051-lolo, 4.0-lolo, 0.35), kMedAco);   
   //  Beam Pipe Protection Tube
   //
   //  ALIFWDA_0025
@@ -487,9 +564,13 @@ void AliPIPEv4::CreateGeometry()
   voFwdaBPS->AddNode(voFwdaBPSCS,  4,  new TGeoCombiTrans(  kFwdaBPSCSdy,   kFwdaBPSCSdy, 2., rot315));
 
   TGeoVolumeAssembly* voCp2 = new TGeoVolumeAssembly("CP2");
-  voCp2->AddNode(voCp2Mo, 1, gGeoIdentity);
-  voCp2->AddNode(voFwdaBPPT, 1, new TGeoTranslation(0., 0., -kCP2Length / 2. + 13.8));
-  voCp2->AddNode(voFwdaBPS,  1, new TGeoTranslation(0., 0., -kCP2Length / 2. +  5.1));
+  //FM voCp2->AddNode(voCp2Mo, 1, gGeoIdentity);
+  //FM voCp2->AddNode(voFwdaBPPT, 1, new TGeoTranslation(0., 0., -kCP2Length / 2. + 13.8));
+  //FM voCp2->AddNode(voFwdaBPS,  1, new TGeoTranslation(0., 0., -kCP2Length / 2. +  5.1));
+
+  */
+
+  /*
 
   //
   ///////////////////
@@ -502,13 +583,13 @@ void AliPIPEv4::CreateGeometry()
   const Float_t  kCP3AdaptorTubeLength            =  5.50;
   //
   // Inner and outer radii
-  const Float_t kCP3AdaptorTubeRi                =  2.92-lolo;
-  const Float_t kCP3AdaptorTubeRo                =  3.00-lolo;
+  const Float_t kCP3AdaptorTubeRi                =  2.92;
+  const Float_t kCP3AdaptorTubeRo                =  3.00;
   //
   // Bulge at transition point
   // Inner and outer radii
-  const Float_t kCP3AdaptorTubeBulgeRi           =  2.90-lolo;
-  const Float_t kCP3AdaptorTubeBulgeRo           =  3.05-lolo;    
+  const Float_t kCP3AdaptorTubeBulgeRi           =  2.90;
+  const Float_t kCP3AdaptorTubeBulgeRo           =  3.05;    
   //
   // Length of bulge
   const Float_t  kCP3AdaptorTubeBulgeLength       =  0.80;
@@ -518,9 +599,9 @@ void AliPIPEv4::CreateGeometry()
   //  Total length    
   const Float_t kCP3BellowLength                  = 13.00;
   //  Outer Radius
-  const Float_t kCP3BellowRo                      =  3.6-lolo; //-1?
+  const Float_t kCP3BellowRo                      =  3.6;
   //  Inner Radius 
-  const Float_t kCP3BellowRi                      =  2.8-lolo;
+  const Float_t kCP3BellowRi                      =  2.8;
   //  Number of plies
   const Int_t   kCP3NumberOfPlies                 = 18;
   //  Length of undulated region
@@ -549,7 +630,7 @@ void AliPIPEv4::CreateGeometry()
   //  Length of Flange
   const Float_t kCP3FlangeLength                  =  1.40;
   //  Outer radius    
-  const Float_t kCP3FlangeRo                      =  4.30-lolo-1.;
+  const Float_t kCP3FlangeRo                      =  4.30-1.;  // -1 ?? FM
 
   //
   // CP/3 Mother volume
@@ -585,8 +666,7 @@ void AliPIPEv4::CreateGeometry()
   voCp3Mo->SetVisibility(0);
   TGeoVolumeAssembly* voCp3 = new TGeoVolumeAssembly("Cp3");
   voCp3->AddNode(voCp3Mo,  1, gGeoIdentity);
-  //  voCp3->AddNode(voCpSupC, 3, new TGeoTranslation(0., 0., - kCP3Length / 2. + 4.6));
-  voCp3->AddNode(voCpSupClolo, 3, new TGeoTranslation(0., 0., - kCP3Length / 2. + 4.6));
+  voCp3->AddNode(voCpSupC, 3, new TGeoTranslation(0., 0., - kCP3Length / 2. + 4.6));
   dz = kCP3pos;
 
   //////////////////////////////////////////////
@@ -616,7 +696,7 @@ void AliPIPEv4::CreateGeometry()
 
   voCp3AtV->AddNode(voCp3AtS, 1, gGeoIdentity);
   dz = - kCP3Length / 2. +  kCP3AdaptorTubeLength / 2.;
-  voCp3Mo->AddNode(voCp3AtV, 1, new TGeoTranslation(0., 0., dz));
+  //FM voCp3Mo->AddNode(voCp3AtV, 1, new TGeoTranslation(0., 0., dz));
 
   /////////////////////////////////
   // CP/3 Bellow section         //
@@ -742,9 +822,9 @@ void AliPIPEv4::CreateGeometry()
   //
   // Add bellow to CP/3 mother    
   dz = - kCP3Length / 2. +  kCP3AdaptorTubeLength +  kCP3BellowLength / 2.;
-  voCp3Mo->AddNode(voBellowMother, 1,  new TGeoTranslation(0., 0., dz));
+  //FM voCp3Mo->AddNode(voBellowMother, 1,  new TGeoTranslation(0., 0., dz));
   dz += (kCP3BellowLength +  kCP3TubeLength);
-  voCp3Mo->AddNode(voBellowMother, 2,  new TGeoTranslation(0., 0., dz));
+  //FM voCp3Mo->AddNode(voBellowMother, 2,  new TGeoTranslation(0., 0., dz));
 
 
   ///////////////////////////////////////////
@@ -761,7 +841,7 @@ void AliPIPEv4::CreateGeometry()
     
   voCp3Bco->AddNode(voCp3Bci, 1, gGeoIdentity);
   dz = - kCP3Length / 2. +   kCP3AdaptorTubeLength +  kCP3BellowLength +  kCP3TubeLength / 2.;
-  voCp3Mo->AddNode(voCp3Bco, 1, new TGeoTranslation(0., 0., dz));
+  //FM voCp3Mo->AddNode(voCp3Bco, 1, new TGeoTranslation(0., 0., dz));
 
 
   ///////////////////////////////////////////            
@@ -794,7 +874,9 @@ void AliPIPEv4::CreateGeometry()
 
   voCp3mfo->AddNode(voCp3mfi, 1, gGeoIdentity);
   dz =  kCP3Length / 2. - (kCP3FlangeConnectorLength + kCP3FlangeLength) / 2.;
-  voCp3Mo->AddNode(voCp3mfo, 1, new TGeoTranslation(0., 0., dz));
+  //FM voCp3Mo->AddNode(voCp3mfo, 1, new TGeoTranslation(0., 0., dz));
+
+  */
 
 
   /*
@@ -887,7 +969,7 @@ void AliPIPEv4::CreateGeometry()
 
   const Float_t kRB24B1PlieRadius = 
     (kRB24B1BellowUndL + (2. *  kRB24B1NumberOfPlies - 2.) * kRB24B1PlieThickness) / (4. * kRB24B1NumberOfPlies);
-    
+
   const Float_t kRB24B1ProtTubeThickness = 0.02;     // Thickness of the protection tube
   const Float_t kRB24B1ProtTubeLength    = 4.2;      // Length of the protection tube
 
@@ -1922,14 +2004,14 @@ void AliPIPEv4::CreateGeometry()
   //    Rotable Flange             //
   //    Drawing  LHCVFX_0016       //
   /////////////////////////////////// 
-  const Float_t kRB26s1RFlangeTubeRi    = 5.84/2.-lolo ;  // Tube inner radius
-  const Float_t kRB26s1RFlangeTubeRo    = 6.00/2.-lolo ;  // Tube outer radius
+  const Float_t kRB26s1RFlangeTubeRi    = 5.84/2.;  // Tube inner radius
+  const Float_t kRB26s1RFlangeTubeRo    = 6.00/2.;  // Tube outer radius
 
   // Pos 1 Clamp Ring          LHCVFX__0015
   const Float_t kRB26s1RFlangeCrL       = 1.40     ; // Lenth of the clamp ring
-  const Float_t kRB26s1RFlangeCrRi1     = 6.72/2.-lolo-1. ; // Ring inner radius section 1
-  const Float_t kRB26s1RFlangeCrRi2     = 6.06/2.-lolo-1.  ; // Ring inner radius section 2
-  const Float_t kRB26s1RFlangeCrRo      = 8.60/2.-lolo-1.  ; // Ring outer radius 
+  const Float_t kRB26s1RFlangeCrRi1     = 6.72/2.; // Ring inner radius section 1
+  const Float_t kRB26s1RFlangeCrRi2     = 6.06/2.; // Ring inner radius section 2
+  const Float_t kRB26s1RFlangeCrRo      = 8.60/2.;// Ring outer radius 
   const Float_t kRB26s1RFlangeCrD       = 0.800    ; // Width section 1
       
   TGeoPcon* shRB26s1RFlangeCr = new TGeoPcon(0., 360., 4);
@@ -1945,7 +2027,7 @@ void AliPIPEv4::CreateGeometry()
 
   // Pos 2 Insert              LHCVFX__0015
   const Float_t kRB26s1RFlangeIsL       = 4.88     ; // Lenth of the insert
-  const Float_t kRB26s1RFlangeIsR       = 6.70/2.-lolo  ; // Ring radius
+  const Float_t kRB26s1RFlangeIsR       = 6.70/2.  ; // Ring radius
   const Float_t kRB26s1RFlangeIsD       = 0.80     ; // Ring Width
 
   TGeoPcon* shRB26s1RFlangeIs = new TGeoPcon(0., 360., 4);
@@ -1963,7 +2045,7 @@ void AliPIPEv4::CreateGeometry()
   const Float_t kRB26s1RFlangeFpL       = 5.88     ; // Length of the fixed point section (0.08 cm added for welding)
   const Float_t kRB26s1RFlangeFpZ       = 3.82     ; // Position of the ring
   const Float_t kRB26s1RFlangeFpD       = 0.59     ; // Width of the ring
-  const Float_t kRB26s1RFlangeFpR       = 7.00/2.-lolo  ; // Radius of the ring
+  const Float_t kRB26s1RFlangeFpR       = 7.00/2.  ; // Radius of the ring
       
   TGeoPcon* shRB26s1RFlangeFp = new TGeoPcon(0., 360., 6);
   z0 = 0.;
@@ -2712,7 +2794,7 @@ void AliPIPEv4::CreateMaterials()
   Float_t zsteel[4] = { 26.,24.,28.,14. };
   Float_t wsteel[4] = { .715,.18,.1,.005 };
   // AlBe - alloy 
-  Float_t aAlBe[2] = { 26.98, 9.01};
+  Float_t aAlBe[2] = { 26.98, 9.01};             // al=2.702 be=1.8477      
   Float_t zAlBe[2] = { 13.00, 4.00};
   Float_t wAlBe[2] = { 0.4, 0.6};
   //
@@ -2756,7 +2838,21 @@ void AliPIPEv4::CreateMaterials()
   Float_t wNEG[4] = {1./3., 1./3., 1./3.};  
   Float_t dNEG = 5.6; // ?
 
+  //---------------------------------
+  // Aluminium AA 5083 for MFT: Al Manganese(Mn) Magnesium(Mg) Chrome(Cr)
+  Float_t aALU5083[4]={26.982, 54.938, 24.305, 51.996};  // Mg pas meme a que la ligne Anticorodal!
+  Float_t zALU5083[4] ={13., 25., 12., 24.};
+  Float_t wALU5083[4] ={0.947, 0.007, 0.044, 0.0015};
+  // Aluminium AA 2219 for MFT: Al Cu Mn Ti V Zr
+  Float_t aALU2219[6]={26.982, 63.546, 54.938, 47.867, 50.941, 91.224};
+  Float_t zALU2219[6] ={13., 29., 25., 22., 23., 40.};
+  Float_t wALU2219[6] ={0.93, 0.063, 0.003, 0.0006, 0.001, 0.0018};
+  //---------------------------------
+
   //
+  // Silicon for ITS UPGRADE
+  AliMaterial(2,  "SILICON$",28.09 , 14.00 , 2.33 , 9.36 , 45.); 
+
   //
   //     Berillium 
   AliMaterial(5, "BERILLIUM$", 9.01, 4., 1.848, 35.3, 36.7);
@@ -2784,7 +2880,7 @@ void AliPIPEv4::CreateMaterials()
   AliMixture(20, "GETTER$", asteel, zsteel, 1.00, 4, wsteel);
   //     Al-Be alloy
   //     
-  AliMixture(21, "AlBe$", aAlBe, zAlBe, 2.07, 2, wAlBe);
+  AliMixture(21, "AlBe$", aAlBe, zAlBe, 2.07, 2, wAlBe); 
   //     Polyamid
   //   
   AliMixture(22, "PA$", aPA, zPA, 1.14, -4, wPA);
@@ -2802,7 +2898,13 @@ void AliPIPEv4::CreateMaterials()
 
   //    NEG
   AliMixture(25, "NEG COATING", aNEG, zNEG, dNEG, -3, wNEG);
-   
+  
+  //---------------------------------
+  //  Aluminium AA5083 for MFT
+  AliMixture(63, "ALUMINIUM5083$",aALU5083,zALU5083, 2.66 ,4,wALU5083); // from aubertduval.fr
+  // Aluminium AA2219 for MFT
+  AliMixture(64, "ALUMINIUM2219$",aALU2219,zALU2219, 2.84 ,6,wALU2219); // from aubertduval.fr
+  //---------------------------------
    
   // **************** 
   //     Defines tracking media parameters. 
@@ -2814,6 +2916,10 @@ void AliPIPEv4::CreateMaterials()
   Float_t stmin  = -.8;
   // *************** 
   //
+  // Silicon for ITS UPGRADE
+  AliMedium(2,  "SILICON",   2, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
+
+
   //    Beryllium 
   
   AliMedium(5, "BE",       5, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
@@ -2857,6 +2963,13 @@ void AliPIPEv4::CreateMaterials()
   //
   //   NEG
   AliMedium(25, "NEG COATING", 25, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
+
+  //----------------- for the MFT ----------------------
+  AliMedium(63,"AA5083", 63, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
+  AliMedium(64,"AA2219", 64, 0, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin);
+  //----------------------------------------------------
+
+
 }
 
 
@@ -2922,49 +3035,53 @@ TGeoVolume* AliPIPEv4::MakeBellow(const char* ext, Int_t nc, Float_t rMin, Float
   // rPlie  Plie radius
   // dPlie  Plie thickness
   const TGeoMedium* kMedVac    =  gGeoManager->GetMedium("PIPE_VACUUM");    
-  const TGeoMedium* kMedSteel  =  gGeoManager->GetMedium("PIPE_INOX");   
+  //const TGeoMedium* kMedSteel  =  gGeoManager->GetMedium("PIPE_INOX");   
+  const TGeoMedium* kMedAlu5083 =  gGeoManager->GetMedium("PIPE_AA5083"); //fm       
 
   char name[64], nameA[64], nameB[64], bools[64];
-  sprintf(name, "%sBellowUS", ext);
+  snprintf(name, 64, "%sBellowUS", ext);
   TGeoVolume* voBellow = new TGeoVolume(name, new TGeoTube(rMin, rMax, dU/2.), kMedVac);
   //      
   //  Upper part of the undulation
   //
   TGeoTorus* shPlieTorusU  =  new TGeoTorus(rMax - rPlie, rPlie - dPlie, rPlie);
-  sprintf(nameA, "%sTorusU", ext);
+  snprintf(nameA, 64, "%sTorusU", ext);
   shPlieTorusU->SetName(nameA);
   TGeoTube*  shPlieTubeU   =  new TGeoTube (rMax - rPlie, rMax, rPlie);
-  sprintf(nameB, "%sTubeU", ext);
+  snprintf(nameB, 64, "%sTubeU", ext);
   shPlieTubeU->SetName(nameB);
-  sprintf(name, "%sUpperPlie", ext);
-  sprintf(bools, "%s*%s", nameA, nameB);
+  snprintf(name, 64, "%sUpperPlie", ext);
+  snprintf(bools, 64, "%s*%s", nameA, nameB);
   TGeoCompositeShape*  shUpperPlie = new TGeoCompositeShape(name, bools);
     
-  TGeoVolume* voWiggleU = new TGeoVolume(name, shUpperPlie, kMedSteel);
-  //
+  TGeoVolume* voWiggleU = new TGeoVolume(name, shUpperPlie, kMedAlu5083);
+  voWiggleU->SetLineColor(kOrange); // fm
+  
   // Lower part of the undulation
   TGeoTorus* shPlieTorusL =  new TGeoTorus(rMin + rPlie, rPlie - dPlie, rPlie);
-  sprintf(nameA, "%sTorusL", ext);
+  snprintf(nameA, 64, "%sTorusL", ext);
   shPlieTorusL->SetName(nameA);
   TGeoTube*  shPlieTubeL  =  new TGeoTube (rMin, rMin + rPlie, rPlie);
-  sprintf(nameB, "%sTubeL", ext);
+  snprintf(nameB, 64, "%sTubeL", ext);
   shPlieTubeL->SetName(nameB);
-  sprintf(name, "%sLowerPlie", ext);
-  sprintf(bools, "%s*%s", nameA, nameB);
+  snprintf(name, 64, "%sLowerPlie", ext);
+  snprintf(bools, 64, "%s*%s", nameA, nameB);
   TGeoCompositeShape*  shLowerPlie = new TGeoCompositeShape(name, bools);
     
-  TGeoVolume* voWiggleL = new TGeoVolume(name, shLowerPlie, kMedSteel); 
-    
-  //
+  TGeoVolume* voWiggleL = new TGeoVolume(name, shLowerPlie, kMedAlu5083); 
+  voWiggleL->SetLineColor(kOrange); // fm
+  
   // Connection between upper and lower part of undulation
-  sprintf(name, "%sPlieConn1", ext);
-  TGeoVolume* voWiggleC1 = new TGeoVolume(name, new TGeoTube(rMin + rPlie, rMax - rPlie, dPlie/2.), kMedSteel);
-  //
+  snprintf(name, 64, "%sPlieConn1", ext);
+  TGeoVolume* voWiggleC1 = new TGeoVolume(name, new TGeoTube(rMin + rPlie, rMax - rPlie, dPlie/2.), kMedAlu5083);
+  voWiggleC1->SetLineColor(kOrange); // fm
+  
   // One wiggle
   Float_t dz = rPlie -  dPlie / 2.;
   Float_t z0 = -  dPlie / 2.;
-  sprintf(name, "%sWiggle", ext);
+  snprintf(name, 64, "%sWiggle", ext);
   TGeoVolumeAssembly* asWiggle = new TGeoVolumeAssembly(name);
+
   asWiggle->AddNode(voWiggleC1,  1 , new TGeoTranslation(0., 0., z0));
   z0 += dz;
   asWiggle->AddNode(voWiggleU,   1 , new TGeoTranslation(0., 0., z0));
@@ -2974,16 +3091,15 @@ TGeoVolume* AliPIPEv4::MakeBellow(const char* ext, Int_t nc, Float_t rMin, Float
   asWiggle->AddNode(voWiggleL ,  1 , new TGeoTranslation(0., 0., z0));
   // Positioning of the volumes
   z0   = - dU / 2.+ rPlie;
-  voBellow->AddNode(voWiggleL, 2, new TGeoTranslation(0., 0., z0));
+  ////////////voBellow->AddNode(voWiggleL, 2, new TGeoTranslation(0., 0., z0));   removing the first 1/2 plie, fm
   z0  +=  rPlie;
   Float_t zsh  = 4. *  rPlie -  2. * dPlie;
   for (Int_t iw = 0; iw < nc; iw++) {
     Float_t zpos =  z0 + iw * zsh;     
-    voBellow->AddNode(asWiggle,  iw + 1, new TGeoTranslation(0., 0., zpos - dPlie));   
+    voBellow->AddNode(asWiggle,  iw + 1, new TGeoTranslation(0., 0., zpos - dPlie));
+
   }
   return voBellow;
 }
 
 
-
-