]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STRUCT/AliPIPEv3.cxx
Kalman filter vertex in Psi2s task
[u/mrichter/AliRoot.git] / STRUCT / AliPIPEv3.cxx
index c0b6cd7edbc33e07125dac4702fecc4f5a339403..5095369bcde2a85ddf53241c976e5d84f6d208d4 100644 (file)
 #include "AliLog.h"
  
 ClassImp(AliPIPEv3)
+
  
 //_____________________________________________________________________________
-AliPIPEv3::AliPIPEv3()
+AliPIPEv3::AliPIPEv3() : fBeamBackground(0)
 {
 // Constructor
 }
 
 //_____________________________________________________________________________
 AliPIPEv3::AliPIPEv3(const char *name, const char *title)
-  : AliPIPE(name,title)
+  : AliPIPE(name,title), fBeamBackground(0)
 {
 // Constructor
 }
@@ -528,8 +529,8 @@ void AliPIPEv3::CreateGeometry()
 //  Plie radius
 //  const Float_t kCP3PlieR = 0.118286;
     const Float_t kCP3PlieR = 
-       (kCP3BellowUndulatedLength - 4. *  kCP3ConnectionPlieR + 2. * kCP3PlieThickness + 
-        (2. *  kCP3NumberOfPlies - 2.) * kCP3PlieThickness) / (4. * kCP3NumberOfPlies - 2.);
+       (kCP3BellowUndulatedLength - 4. *  kCP3ConnectionPlieR + 
+        2. *  kCP3NumberOfPlies * kCP3PlieThickness) / (4. * kCP3NumberOfPlies - 2.);
 //  Length of connection pipe
     const Float_t kCP3BellowConnectionLength        =  2.35;
 //
@@ -577,7 +578,8 @@ void AliPIPEv3::CreateGeometry()
     z = -shCp3Mo->GetZ(0);
     shCp3Mo->DefineSection(11, z, 0., kCP3FlangeRo);
 //
-    TGeoVolume* voCp3Mo = new TGeoVolume("CP3MO", shCp3Mo, kMedAir);
+    // TGeoVolume* voCp3Mo = new TGeoVolume("CP3MO", shCp3Mo, kMedAir);
+    TGeoVolume* voCp3Mo = new TGeoVolumeAssembly("CP3MO");
     voCp3Mo->SetVisibility(0);
     TGeoVolumeAssembly* voCp3 = new TGeoVolumeAssembly("Cp3");
     voCp3->AddNode(voCp3Mo,  1, gGeoIdentity);
@@ -877,7 +879,7 @@ void AliPIPEv3::CreateGeometry()
     const Float_t kRB24B1PlieThickness     =  0.015;   // Plie thickness             
 
     const Float_t kRB24B1PlieRadius = 
-       (kRB24B1BellowUndL + (2. *  kRB24B1NumberOfPlies - 2.) * kRB24B1PlieThickness) / (4. * kRB24B1NumberOfPlies);
+      (kRB24B1BellowUndL + (2. *  kRB24B1NumberOfPlies+ 1.) * kRB24B1PlieThickness) / (4. * kRB24B1NumberOfPlies + 2.);
     
     const Float_t kRB24B1ProtTubeThickness = 0.02;     // Thickness of the protection tube
     const Float_t kRB24B1ProtTubeLength    = 4.2;      // Length of the protection tube
@@ -1616,7 +1618,7 @@ void AliPIPEv3::CreateGeometry()
     TGeoVolumeAssembly* voRB24 = new TGeoVolumeAssembly("RB24");
     // Cu Tube with two simplified flanges
     voRB24->AddNode(voRB24CuTubeM, 1, gGeoIdentity);
-    voRB24->AddNode(voRB24CuTubeA, 1, gGeoIdentity);
+    if (!fBeamBackground) voRB24->AddNode(voRB24CuTubeA, 1, gGeoIdentity);
     z = - kRB24CuTubeL/2 + kRB24CuTubeFL/2.;
     voRB24->AddNode(voRB24CuTubeF, 1, new TGeoTranslation(0., 0., z));
     z = + kRB24CuTubeL/2 - kRB24CuTubeFL/2.;
@@ -1807,8 +1809,8 @@ void AliPIPEv3::CreateGeometry()
       const Float_t kRB26s2ConnectionPlieR   =  0.21;    // Connection plie radius     [Pos 1] 
 //  Plie radius
       const Float_t kRB26s2PlieR = 
-       (kRB26s2BellowUndL - 4. *  kRB26s2ConnectionPlieR + 2. * kRB26s2PlieThickness + 
-        (2. *  kRB26s2NumberOfPlies - 2.) * kRB26s2PlieThickness) / (4. * kRB26s2NumberOfPlies - 2.);
+       (kRB26s2BellowUndL - 4. *  kRB26s2ConnectionPlieR + 
+        2. *  kRB26s2NumberOfPlies * kRB26s2PlieThickness) / (4. * kRB26s2NumberOfPlies);
       const Float_t kRB26s2CompTubeInnerR    = 12.00/2.;  // Connection tubes inner radius     [Pos 2 + 3]
       const Float_t kRB26s2CompTubeOuterR    = 12.30/2.;  // Connection tubes outer radius     [Pos 2 + 3]
       const Float_t kRB26s2WeldingTubeLeftL  =  9.00/2.;  // Left connection tube half length  [Pos 2]
@@ -2178,8 +2180,8 @@ void AliPIPEv3::CreateGeometry()
       const Float_t kRB26s3ConnectionPlieR    =  0.21;    // Connection plie radius     [Pos 1] 
 //  Plie radius
       const Float_t kRB26s3PlieR = 
-       (kRB26s3BellowUndL - 4. *  kRB26s3ConnectionPlieR + 2. * kRB26s3PlieThickness + 
-        (2. *  kRB26s3NumberOfPlies - 2.) * kRB26s3PlieThickness) / (4. * kRB26s3NumberOfPlies - 2.);
+       (kRB26s3BellowUndL - 4. *  kRB26s3ConnectionPlieR + 
+        2. *  kRB26s3NumberOfPlies * kRB26s3PlieThickness) / (4. * kRB26s3NumberOfPlies);
 
       //
       // The welding tubes have 3 sections with different radii and 2 transition regions.
@@ -2267,9 +2269,9 @@ void AliPIPEv3::CreateGeometry()
       z0 += kRB26s3PlieR -  kRB26s3PlieThickness;
       voRB26s3Wiggle->AddNode(voRB26s3WiggleL,  1 , new TGeoTranslation(0., 0., z0));
 // Positioning of the volumes
-      z0   = - kRB26s3BellowUndL/2.+ kRB26s3ConnectionPlieR;
+      z0   = - kRB26s3BellowUndL/2.+ kRB26s3PlieR;
       voRB26s3Bellow->AddNode(voRB26s3WiggleL, 1, new TGeoTranslation(0., 0., z0));
-      z0  +=  kRB26s3ConnectionPlieR;
+      z0  +=  kRB26s3PlieR;
       zsh  = 4. *  kRB26s3PlieR -  2. * kRB26s3PlieThickness;
       for (Int_t iw = 0; iw < kRB26s3NumberOfPlies; iw++) {
          Float_t zpos =  z0 + iw * zsh;        
@@ -2393,8 +2395,8 @@ void AliPIPEv3::CreateGeometry()
       const Float_t kRB26s5ConnectionR       = 11.2/2.;  // Bellow connection radius   [Pos 1] 
 //  Plie radius
       const Float_t kRB26s5PlieR = 
-       (kRB26s5BellowUndL - 4. *  kRB26s5ConnectionPlieR + 2. * kRB26s5PlieThickness + 
-        (2. *  kRB26s5NumberOfPlies - 2.) * kRB26s5PlieThickness) / (4. * kRB26s5NumberOfPlies - 2.);
+       (kRB26s5BellowUndL - 4. *  kRB26s5ConnectionPlieR + 
+        2. *  kRB26s5NumberOfPlies * kRB26s5PlieThickness) / (4. * kRB26s5NumberOfPlies);
       const Float_t kRB26s5CompTubeInnerR    = 10.00/2.;  // Connection tubes inner radius     [Pos 2 + 3]
       const Float_t kRB26s5CompTubeOuterR    = 10.30/2.;  // Connection tubes outer radius     [Pos 2 + 3]
       const Float_t kRB26s5WeldingTubeLeftL  =  3.70/2.;  // Left connection tube half length  [Pos 2]
@@ -2979,6 +2981,31 @@ TGeoVolume* AliPIPEv3::MakeBellow(const char* ext, Int_t nc, Float_t rMin, Float
     return voBellow;
 }
 
+//_______________________________________________________________________
+void AliPIPEv3::AddAlignableVolumes() const
+{
+  // 
+  AliInfo("Add PIPE alignable volume");
+
+  if (!gGeoManager) {
+    AliFatal("TGeoManager doesn't exist !");
+    return;
+  }
+
+  TString symname("CP1");
+  TString volpath("/ALIC_1/CP_1/Cp1_1");
+  if(!gGeoManager->SetAlignableEntry(symname.Data(),volpath.Data()))
+    AliFatal(Form("Alignable entry %s not created. Volume path %s not valid",
+                 symname.Data(),volpath.Data()));
+
+  TString symname2("CP3");
+  TString volpath2("/ALIC_1/CP_1/Cp3_1");
+  if(!gGeoManager->SetAlignableEntry(symname2.Data(),volpath2.Data()))
+    AliFatal(Form("Alignable entry %s not created. Volume path %s not valid",
+                 symname2.Data(),volpath2.Data()));
+}
+
+