]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STRUCT/AliPIPEv4.cxx
Modifications for upgraded pipi, S.Rossegger, Chinorar Kobdaj
[u/mrichter/AliRoot.git] / STRUCT / AliPIPEv4.cxx
index 4a49e27516efc96a509f3c0bd07ec00215080a99..b9469da2a7d1c4e3289fd5355c1696b41d2b5dcd 100644 (file)
@@ -53,7 +53,7 @@ AliPIPEv4::AliPIPEv4():
   fRmax(1.98),            // outer radius of Be beam pipe
   fBe(0.08),              // width of Be beam pipe
   fZ1(50.),               // beginning of beam pipe z location (A side)
-  fZ2(-49),               // end of Be beam pipe z location (C side)
+  fZ2(-57.25),               // end of Be beam pipe z location (C side)
   fZ3(-82.)               // end of beam pipe z location (C side)
 {
   // Constructor
@@ -65,7 +65,7 @@ AliPIPEv4::AliPIPEv4(const char *name, const char *title)
     fRmax(1.98),            // outer radius of Be beam pipe
     fBe(0.08),              // width of Be beam pipe
     fZ1(50.),               // beginning of beam pipe z location (A side)
-    fZ2(-49.),              // end of Be beam pipe z location (C side)
+    fZ2(-57.25),              // end of Be beam pipe z location (C side)
     fZ3(-82.)               // end of Steel beam pipe z location (C side)
 {
   // Constructor
@@ -78,7 +78,7 @@ AliPIPEv4::AliPIPEv4(const char *name, const char *title, const Float_t rmax, co
     fRmax(rmax),             // outer radius of Be beam pipe 
     fBe(width),              // width of Be beam pipe 
     fZ1(50.),                // beginning of beam pipe z location (A side)
-    fZ2(-49.),               // end of Be beam pipe z location (C side)
+    fZ2(-57.25),               // end of Be beam pipe z location (C side)
     fZ3(-82.)                // end of Steel beam pipe z location (C side)
 {
   // Constructor
@@ -236,12 +236,13 @@ void AliPIPEv4::CreateGeometry()
   TGeoVolume* voadaptatorVide = new TGeoVolume("voadaptatorVide",adaptatorVide,kMedVac);
   voadaptatorVide->SetVisibility(0);
   top->AddNode(voadaptatorVide,1,new TGeoTranslation(0., 0., 0.)); 
+
   // -------------- End Vaccum ------------
   
   // -------------- Bellows --------------
   Float_t plieradius = (3.8 + (2. *  7 - 2.) * 0.03) / (4. * 7);  // radius of bellows "plis"
   Float_t dzbellow1=2.0;  // distance between the start of the aluminium beam pipe and the first bellows 
-  Float_t dzbellow2=2.0;  // distance between the 2 bellows
+  Float_t dzbellow2=4.0;  // distance between the 2 bellows
   //--------------------------------------
 
   //---------------- First Al tube ------------------
@@ -251,11 +252,13 @@ void AliPIPEv4::CreateGeometry()
   TGeoVolume* votube1 = new TGeoVolume("votube1",tube1,kMedAlu2219);
   votube1->SetLineColor(kBlue);
   top->AddNode(votube1,1,new TGeoTranslation(0., 0., 0.));
+
   //-------------------------------------------------
 
   // ------------------ Bellows 1  ----------------------- 
   TGeoVolume* vobellows1 = MakeBellow("bellows1", 7, 2.0, 2.665, 3.8, plieradius ,0.03);
   top->AddNode(vobellows1, 1, new TGeoTranslation(0., 0., fZ2-dzbellow1-(3.8)/2.));
+
   //------------------------------------------------------
     
   //------------- Second Al tube --------------
@@ -265,11 +268,13 @@ void AliPIPEv4::CreateGeometry()
   TGeoVolume* votube2 = new TGeoVolume("votube2",tube2,kMedAlu2219);
   votube2->SetLineColor(kBlue);
   top->AddNode(votube2,1,new TGeoTranslation(0., 0., 0.));
+
   //-------------------------------------------
 
   // ------------------ Bellows 2 ----------------------- 
   TGeoVolume* vobellows2 = MakeBellow("bellows2", 7, 2.0, 2.665, 3.8, plieradius ,0.03);
   top->AddNode(vobellows2, 1, new TGeoTranslation(0., 0., fZ2-dzbellow1-3.8-dzbellow2-3.8/2.));
+
   //-----------------------------------------------------
 
   //------------- Conical adaptator -------------
@@ -283,6 +288,7 @@ void AliPIPEv4::CreateGeometry()
   TGeoVolume* voadaptator = new TGeoVolume("voadaptator",adaptator,kMedAlu2219);
   voadaptator->SetLineColor(kBlue);    
   top->AddNode(voadaptator,1,new TGeoTranslation(0., 0., 0.));
+
   //---------------------------------------------
 
   TGeoPcon* flange = new TGeoPcon(0., 360., 2);
@@ -3042,19 +3048,19 @@ TGeoVolume* AliPIPEv4::MakeBellow(const char* ext, Int_t nc, Float_t rMin, Float
   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, kMedAlu5083);
@@ -3062,27 +3068,27 @@ TGeoVolume* AliPIPEv4::MakeBellow(const char* ext, Int_t nc, Float_t rMin, Float
   //
   // 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, kMedAlu5083); 
   voWiggleL->SetLineColor(kOrange+3); //FM
   //
   // Connection between upper and lower part of undulation
-  sprintf(name, "%sPlieConn1", ext);
+  snprintf(name, 64, "%sPlieConn1", ext);
   TGeoVolume* voWiggleC1 = new TGeoVolume(name, new TGeoTube(rMin + rPlie, rMax - rPlie, dPlie/2.), kMedAlu5083);
   voWiggleC1->SetLineColor(kOrange+3); //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));