]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCv1.cxx
New access to conditions database
[u/mrichter/AliRoot.git] / TPC / AliTPCv1.cxx
index 582a05083b2402d9ee3a6828751c26c3e592d79e..9f0fb1eb32ef9e377936aeb3e7d7976c53063b6c 100644 (file)
@@ -38,6 +38,8 @@
 #include <TNode.h>
 #include <TTUBE.h>
 #include <TVirtualMC.h>
+#include <TString.h>
+#include <TSystem.h>
 
 #include "AliConst.h"
 #include "AliRun.h"
@@ -115,7 +117,7 @@ void AliTPCv1::CreateGeometry()
   //
   TGeoPcon *tpc = new TGeoPcon(0.,360.,18); //18 sections
   tpc->DefineSection(0,-290.,77.,278.);
-  tpc->DefineSection(1,-259.6,77.,278.);
+  tpc->DefineSection(1,-259.6,70.,278.);
   //
   tpc->DefineSection(2,-259.6,68.1,278.);
   tpc->DefineSection(3,-253.6,68.1,278.);
@@ -138,7 +140,7 @@ void AliTPCv1::CreateGeometry()
   tpc->DefineSection(14,253.6,65.6,278.);
   tpc->DefineSection(15,259.6,65.6,278.);
   //
-  tpc->DefineSection(16,259.6,77.0,278.);
+  tpc->DefineSection(16,259.6,70.0,278.);
   tpc->DefineSection(17,290.,77.,278.);
   //
   TGeoMedium *m1 = gGeoManager->GetMedium("TPC_Air");
@@ -244,7 +246,7 @@ void AliTPCv1::CreateGeometry()
   //
   tf1v->AddNode(tf2v,1); tf2v->AddNode(tf3v,1);
   //
-  v3->AddNode(tov1,1); v4->AddNode(tf1v,1);
+  v3->AddNode(tov1,1,new TGeoTranslation(0.,0.,-1.5)); v4->AddNode(tf1v,1);
   //
   v2->AddNode(v3,1); v2->AddNode(v4,1); 
   //
@@ -514,12 +516,15 @@ void AliTPCv1::CreateGeometry()
    //
    TGeoBBox *conn = new TGeoBBox(0.4,0.3,4.675); // identical for iroc and oroc
    TGeoVolume *connv = new TGeoVolume("TPC_RCCON",conn,m1);
+   TString fileName(gSystem->Getenv("ALICE_ROOT"));
+   fileName += "/TPC/conn_iroc.dat";
    ifstream in;
-   in.open("conn_iroc.dat", ios_base::in); // asci file
+   in.open(fileName.Data(), ios_base::in); // asci file
    for(Int_t i =0;i<86;i++){
-      Double_t y = 3.9;
+      Double_t y = 3.99;
       Double_t x,z,ang;
       in>>x>>z>>ang;
+      z-=26.5;
       TGeoRotation *rrr = new TGeoRotation();
       rrr->RotateY(ang);
       TGeoCombiTrans *trans = new TGeoCombiTrans("trans",x,y,z,rrr);
@@ -630,7 +635,9 @@ void AliTPCv1::CreateGeometry()
    //
    // holes for connectors
    //
-   in.open("conn_oroc.dat", ios_base::in); // asci file
+   fileName = gSystem->Getenv("ALICE_ROOT");
+   fileName += "/TPC/conn_oroc.dat";
+   in.open(fileName.Data(), ios_base::in); // asci file
    for(Int_t i =0;i<78;i++){
       Double_t y =3.89;
       Double_t x,z,ang;