]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Changes for TOF Reconstruction using TGeo
authorarcelli <arcelli@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 12 Mar 2006 14:41:33 +0000 (14:41 +0000)
committerarcelli <arcelli@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 12 Mar 2006 14:41:33 +0000 (14:41 +0000)
TOF/AliTOFGeometry.h
TOF/AliTOFGeometryV4.cxx
TOF/AliTOFGeometryV4.h
TOF/AliTOFGeometryV5.cxx
TOF/AliTOFGeometryV5.h
TOF/AliTOFtracker.cxx

index 7cae65dc0aca2331a05b049350985e5882b5decf..51c12e802ef91373ab8b02d19c29efcf625a99b2 100644 (file)
@@ -13,6 +13,7 @@
 
 
 #include "TObject.h"
+#include "TGeoManager.h"
 
 class AliTOFGeometry: public TObject{
 
@@ -64,12 +65,16 @@ class AliTOFGeometry: public TObject{
 
 
   virtual void    Init();
+  virtual void    ImportGeometry() {};
   virtual void    SetHoles(Bool_t holes) {fHoles = holes;};
   virtual Bool_t  GetHoles() const {return fHoles;};
-
-  virtual Bool_t  IsInsideThePad(Int_t */*det*/, Float_t */*pos*/) {return kFALSE;};
-  virtual Float_t DistanceToPad(Int_t */*det*/, Float_t */*pos*/, Float_t *dist3d=0) {return dist3d[0];};
-  virtual void    GetPos(Int_t */*det*/,Float_t */*pos*/);
+  virtual Bool_t  IsInsideThePadPar(Int_t */*det*/, Float_t */*pos*/) {return kFALSE;};
+  virtual Float_t DistanceToPadPar(Int_t */*det*/, Float_t */*pos*/, Float_t *dist3d=0) {return dist3d[0];};
+  virtual Bool_t  IsInsideThePad(Int_t */*det*/,TGeoHMatrix /*mat*/, Float_t */*pos*/){return kFALSE;};
+  virtual Float_t DistanceToPad(Int_t */*det*/,TGeoHMatrix /*mat*/, Float_t */*pos*/, Float_t *dist3d=0){return dist3d[0];};
+  virtual void    GetVolumePath(Int_t */*ind*/, Char_t */*path*/ ){};
+  virtual void    GetPos(Int_t */*det*/,Float_t */*pos*/){};
+  virtual void    GetPosPar(Int_t */*det*/,Float_t */*pos*/);
   virtual void    GetDetID(Float_t */*pos*/,Int_t */*det*/);
   virtual Int_t   GetPlate(Float_t */*pos*/) {return -1;};
   virtual Int_t   GetStrip(Float_t */*pos*/) {return -1;};
index 6f8f3c1d13f3a7f28e88c724f7e944bf8ab2c574..adab95563f39176a06009bd32642f14c5f6a8e8a 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.2  2006/02/28 10:38:00  decaro
+AliTOFGeometry::fAngles, AliTOFGeometry::fHeights, AliTOFGeometry::fDistances arrays: dimension definition in the right location
+
 Revision 1.1  2005/12/15 08:55:33  decaro
 New TOF geometry description (V5) -G. Cara Romeo and A. De Caro
 
@@ -96,6 +99,10 @@ AliTOFGeometryV4::~AliTOFGeometryV4()
 
 }
 //_____________________________________________________________________________
+void AliTOFGeometryV4::ImportGeometry(){
+  TGeoManager::Import("geometry.root");
+}
+//_____________________________________________________________________________
 void AliTOFGeometryV4::Init()
 {
   //
@@ -157,7 +164,7 @@ void AliTOFGeometryV4::Init()
 }
 
 //_____________________________________________________________________________
-Float_t AliTOFGeometryV4::DistanceToPad(Int_t *det, Float_t *pos, Float_t *dist3d) 
+Float_t AliTOFGeometryV4::DistanceToPadPar(Int_t *det, Float_t *pos, Float_t *dist3d) 
 {
 //
 // Returns distance of  space point with coor pos (x,y,z) (cm) wrt 
@@ -182,7 +189,7 @@ Float_t AliTOFGeometryV4::DistanceToPad(Int_t *det, Float_t *pos, Float_t *dist3
   // Do the same for the selected pad
 
   Float_t g[3];
-  GetPos(det,g);
+  GetPosPar(det,g);
 
   Float_t padRadius = TMath::Sqrt(g[0]*g[0]+g[1]*g[1]);
   Float_t padPhi=TMath::ATan2(g[1],g[0]);      
@@ -206,7 +213,6 @@ Float_t AliTOFGeometryV4::DistanceToPad(Int_t *det, Float_t *pos, Float_t *dist3
   Float_t zr = -xt*TMath::Sin(alpha/kRaddeg)+zt*TMath::Cos(alpha/kRaddeg);
 
   Float_t dist = TMath::Sqrt(xr*xr+yr*yr+zr*zr);
-
   if (dist3d){
     dist3d[0] = xr;
     dist3d[1] = yr;
@@ -218,7 +224,7 @@ Float_t AliTOFGeometryV4::DistanceToPad(Int_t *det, Float_t *pos, Float_t *dist3
 }
 
 //_____________________________________________________________________________
-Bool_t AliTOFGeometryV4::IsInsideThePad(Int_t *det, Float_t *pos) 
+Bool_t AliTOFGeometryV4::IsInsideThePadPar(Int_t *det, Float_t *pos) 
 {
 //
 // Returns true if space point with coor pos (x,y,z) (cm) falls 
@@ -245,7 +251,7 @@ Bool_t AliTOFGeometryV4::IsInsideThePad(Int_t *det, Float_t *pos)
   // Do the same for the selected pad
 
   Float_t g[3];
-  GetPos(det,g);
+  GetPosPar(det,g);
 
   Float_t padRadius = TMath::Sqrt(g[0]*g[0]+g[1]*g[1]);
   Float_t padPhi=TMath::ATan2(g[1],g[0]);      
@@ -275,6 +281,84 @@ Bool_t AliTOFGeometryV4::IsInsideThePad(Int_t *det, Float_t *pos)
 
 }
 
+
+//_____________________________________________________________________________
+Float_t AliTOFGeometryV4::DistanceToPad(Int_t *det, TGeoHMatrix mat, Float_t *pos, Float_t *dist3d) 
+{
+//
+// Returns distance of  space point with coor pos (x,y,z) (cm) wrt 
+// pad with Detector Indices idet (iSect,iPlate,iStrip,iPadX,iPadZ) 
+//
+  if (!gGeoManager) {
+    printf("ERROR: no TGeo\n");
+    return 0.;
+  }
+  Double_t vecg[3];
+  vecg[0]=pos[0];
+  vecg[1]=pos[1];
+  vecg[2]=pos[2];
+  Double_t veclr[3]={-1.,-1.,-1.};
+  Double_t vecl[3]={-1.,-1.,-1.};
+  mat.MasterToLocal(vecg,veclr);  
+  vecl[0]=veclr[1];
+  vecl[1]=veclr[0];
+  vecl[2]=-veclr[2];
+  //Take into account reflections
+  if(det[1]>2){
+    vecl[1]=-veclr[0];
+    vecl[2]= veclr[2];
+  }    
+
+  Float_t dist = TMath::Sqrt(vecl[0]*vecl[0]+vecl[1]*vecl[1]+vecl[2]*vecl[2]);
+
+
+  if (dist3d){
+    dist3d[0] = vecl[0];
+    dist3d[1] = vecl[1];
+    dist3d[2] = vecl[2];
+  }
+
+  return dist;
+
+}
+
+
+//_____________________________________________________________________________
+Bool_t AliTOFGeometryV4::IsInsideThePad( Int_t *det, TGeoHMatrix mat, Float_t *pos) 
+{
+//
+// Returns true if space point with coor pos (x,y,z) (cm) falls 
+// inside pad with Detector Indices idet (iSect,iPlate,iStrip,iPadX,iPadZ) 
+//
+
+  const Float_t khsensmy = 0.5;      // heigth of Sensitive Layer
+
+  Double_t vecg[3];
+  vecg[0]=pos[0];
+  vecg[1]=pos[1];
+  vecg[2]=pos[2];
+  Double_t veclr[3]={-1.,-1.,-1.};
+  Double_t vecl[3]={-1.,-1.,-1.};
+  mat.MasterToLocal(vecg,veclr);  
+  vecl[0]=veclr[1];
+  vecl[1]=veclr[0];
+  vecl[2]=-veclr[2];
+  //Take into account reflections
+  if(det[1]>2){
+    vecl[1]=-veclr[0];
+    vecl[2]= veclr[2];
+  }    
+
+  Float_t xr = vecl[0];
+  Float_t yr = vecl[1];
+  Float_t zr = vecl[2];
+
+  Bool_t isInside=false; 
+  if(TMath::Abs(xr)<= khsensmy*0.5 && TMath::Abs(yr)<= (fgkXPad*0.5) && TMath::Abs(zr)<= (fgkZPad*0.5))
+    isInside=true; 
+  return isInside;
+
+}
 //_____________________________________________________________________________
 Float_t AliTOFGeometryV4::GetX(Int_t *det) 
 {
@@ -674,3 +758,99 @@ Float_t  AliTOFGeometryV4::GetStripTheta(Int_t iPlate, Int_t iStrip)
 
 }
 //_____________________________________________________________________________
+void AliTOFGeometryV4::GetVolumePath(Int_t *ind, Char_t *path ) {
+  //--------------------------------------------------------------------
+  // This function returns the colume path of a given pad 
+  //--------------------------------------------------------------------
+  Int_t sector = ind[0];
+  Char_t  string1[100];
+  Char_t  string2[100];
+  Char_t  string3[100];
+  Char_t  string4[100];
+  Int_t nstrB = NStripB();
+  Int_t nstrC = NStripC();
+  
+  Int_t icopy=-1;
+  
+  if(sector<3){
+    icopy=sector+1;
+    sprintf(string1,"/ALIC_1/B077_1/B075_%i/BTO3_1",icopy);
+  }
+  else if(sector<11){
+    // icopy=sector-2;
+    icopy=sector+3;
+    sprintf(string1,"/ALIC_1/B077_1/B071_%i/BTO1_1",icopy);
+  }
+  else if(sector==11 || sector==12){
+    icopy=sector-10;
+    sprintf(string1,"/ALIC_1/B077_1/B074_%i/BTO2_1",icopy);
+  }
+  else {
+    // icopy=sector-4;
+    icopy=sector-12;
+    sprintf(string1,"/ALIC_1/B077_1/B071_%i/BTO1_1",icopy);
+  }
+  
+  Int_t modnum=ind[1];
+  Int_t istrip=ind[2];
+  
+  if( modnum ==0){
+    sprintf(string2,"FTOC_1/FLTC_0");
+    icopy= nstrC - istrip;
+    sprintf(string3,"FSTR_%i",icopy);
+  }    
+  else if( modnum ==1){
+    sprintf(string2,"FTOB_1/FLTB_0");
+    icopy= nstrB - istrip;
+      sprintf(string3,"FSTR_%i",icopy);
+  }
+  else if( modnum ==2){
+    sprintf(string2,"FTOA_0/FLTA_0");
+    icopy= istrip+1;
+    sprintf(string3,"FSTR_%i",icopy);
+  }
+  else if( modnum ==3){
+    sprintf(string2,"FTOB_2/FLTB_0");
+    icopy= istrip+1;
+    sprintf(string3,"FSTR_%i",icopy);
+  }
+  else if( modnum ==4){
+    sprintf(string2,"FTOC_2/FLTC_0");
+    icopy= istrip+1;
+    sprintf(string3,"FSTR_%i",icopy);
+  }
+
+
+  Int_t padz = ind[3]+1; 
+  Int_t padx = ind[4]+1;
+  if(modnum==3 || modnum==4){
+    padz = NpadZ() -ind[3];
+    padx = NpadX() -ind[4];
+  }
+  sprintf(string4,"FSEN_0/FSEZ_%i/FSEX_%i",padz,padx);
+  sprintf(path,"%s/%s/%s/%s",string1,string2,string3,string4); 
+
+}
+
+//_____________________________________________________________________________
+void AliTOFGeometryV4::GetPos(Int_t *det, Float_t *pos) 
+{
+//
+// Returns space point coor (x,y,z) (cm)  for Detector 
+// Indices  (iSect,iPlate,iStrip,iPadX,iPadZ) 
+//
+  Char_t path[100];
+  GetVolumePath(det,path );
+  if (!gGeoManager) {
+    printf("ERROR: no TGeo\n");
+  }
+  gGeoManager->cd(path);
+  TGeoHMatrix global;
+  global = *gGeoManager->GetCurrentMatrix();
+  const Double_t *tr = global.GetTranslation();
+
+  pos[0]=tr[0];  
+  pos[1]=tr[1];  
+  pos[2]=tr[2];
+}
+//_____________________________________________________________________________
index 26b67efe1a8c3dc9338fd787eb3bc630b517b4ca..778177f7dec0647b608eee7f742e26297e214760 100644 (file)
@@ -19,14 +19,19 @@ class AliTOFGeometryV4: public AliTOFGeometry {
   AliTOFGeometryV4();
   virtual ~AliTOFGeometryV4();
   
+  void    ImportGeometry();
   void    Init();
-  Bool_t  IsInsideThePad(Int_t *det, Float_t *pos);
-  Float_t DistanceToPad(Int_t *det, Float_t *pos, Float_t *dist3d=0);
+  Bool_t  IsInsideThePad(Int_t *det, TGeoHMatrix mat, Float_t *pos);
+  Float_t DistanceToPad(Int_t *det, TGeoHMatrix mat, Float_t *pos, Float_t *dist3d=0);
+  Bool_t  IsInsideThePadPar(Int_t *det, Float_t *pos); 
+  Float_t DistanceToPadPar(Int_t *det, Float_t *pos, Float_t *dist3d=0);
+  void    GetVolumePath(Int_t *ind, Char_t *path );
   Int_t   GetPlate(Float_t *pos);
   Int_t   GetStrip(Float_t *pos);
   Int_t   GetSector(Float_t *pos);
   Int_t   GetPadX(Float_t *pos);
   Int_t   GetPadZ(Float_t *pos);
+  void    GetPos(Int_t *det,Float_t *pos);
   Float_t GetX(Int_t *det);
   Float_t GetY(Int_t *det);
   Float_t GetZ(Int_t *det);
index 824c20c2be3785b3f5729fca228e108d70a3e31f..7f756e776542a25d68c7ebb4a361cf8259380d25 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.2  2006/02/28 10:38:00  decaro
+AliTOFGeometry::fAngles, AliTOFGeometry::fHeights, AliTOFGeometry::fDistances arrays: dimension definition in the right location
+
 Revision 1.1  2005/12/15 08:55:33  decaro
 New TOF geometry description (V5) -G. Cara Romeo and A. De Caro
 
@@ -88,6 +91,10 @@ AliTOFGeometryV5::~AliTOFGeometryV5()
 
 }
 //_____________________________________________________________________________
+void AliTOFGeometryV5::ImportGeometry(){
+  TGeoManager::Import("geometry.root");
+}
+//_____________________________________________________________________________
 void AliTOFGeometryV5::Init()
 {
   //
@@ -166,7 +173,7 @@ void AliTOFGeometryV5::Init()
 }
 
 //_____________________________________________________________________________
-Float_t AliTOFGeometryV5::DistanceToPad(Int_t *det, Float_t *pos, Float_t *dist3d) 
+Float_t AliTOFGeometryV5::DistanceToPadPar(Int_t *det, Float_t *pos, Float_t *dist3d) 
 {
 //
 // Returns distance of  space point with coor pos (x,y,z) (cm) wrt 
@@ -192,7 +199,7 @@ Float_t AliTOFGeometryV5::DistanceToPad(Int_t *det, Float_t *pos, Float_t *dist3
   // Do the same for the selected pad
 
   Float_t g[3];
-  GetPos(det,g);
+  GetPosPar(det,g);
 
   Float_t padRadius = TMath::Sqrt(g[0]*g[0]+g[1]*g[1]);
   //Float_t padPhi = TMath::ATan(g[1]/g[0]);   
@@ -230,7 +237,7 @@ Float_t AliTOFGeometryV5::DistanceToPad(Int_t *det, Float_t *pos, Float_t *dist3
 }
 
 //_____________________________________________________________________________
-Bool_t AliTOFGeometryV5::IsInsideThePad(Int_t *det, Float_t *pos) 
+Bool_t AliTOFGeometryV5::IsInsideThePadPar(Int_t *det, Float_t *pos) 
 {
 //
 // Returns true if space point with coor pos (x,y,z) (cm) falls 
@@ -251,7 +258,7 @@ Bool_t AliTOFGeometryV5::IsInsideThePad(Int_t *det, Float_t *pos)
   //const Float_t klstripx = fgkStripLength;
   */
 
-  const Float_t khsensmy = 0.05;//0.05;//0.11;//0.16;//          // heigth of Sensitive Layer
+  const Float_t khsensmy = 0.5;//0.05;//0.11;//0.16;//          // heigth of Sensitive Layer
 
   //Transform pos into Sector Frame
 
@@ -271,7 +278,7 @@ Bool_t AliTOFGeometryV5::IsInsideThePad(Int_t *det, Float_t *pos)
   // Do the same for the selected pad
 
   Float_t g[3];
-  GetPos(det,g);
+  GetPosPar(det,g);
 
   Float_t padRadius = TMath::Sqrt(g[0]*g[0]+g[1]*g[1]);
   Float_t padPhi = TMath::Pi()+TMath::ATan2(-g[1],-g[0]);      
@@ -295,14 +302,82 @@ Bool_t AliTOFGeometryV5::IsInsideThePad(Int_t *det, Float_t *pos)
   Float_t yr =  yt;
   Float_t zr = -xt*TMath::Sin(alpha/kRaddeg)+zt*TMath::Cos(alpha/kRaddeg);
 
-  //if(TMath::Abs(xr)<=1.50*0.5 && TMath::Abs(yr)<= (fgkXPad*0.5) && TMath::Abs(zr)<= (fgkZPad*0.5)) ???
   if(TMath::Abs(xr)<=khsensmy*0.5 && TMath::Abs(yr)<= (fgkXPad*0.5) && TMath::Abs(zr)<= (fgkZPad*0.5))
-  //if(TMath::Abs(xr)<=khstripy*0.5 && TMath::Abs(yr)<= (fgkXPad*0.5) && TMath::Abs(zr)<= (fgkZPad*0.5))
     isInside=true;
   return isInside;
 
 }
 
+
+//_____________________________________________________________________________
+Float_t AliTOFGeometryV5::DistanceToPad(Int_t *det, TGeoHMatrix mat, Float_t *pos, Float_t *dist3d) 
+{
+//
+// Returns distance of  space point with coor pos (x,y,z) (cm) wrt 
+// pad with Detector Indices idet (iSect,iPlate,iStrip,iPadX,iPadZ) 
+//
+  if (!gGeoManager) {
+    printf("ERROR: no TGeo\n");
+    return 0.;
+  }
+  Double_t vecg[3];
+  vecg[0]=pos[0];
+  vecg[1]=pos[1];
+  vecg[2]=pos[2];
+  Double_t veclr[3]={-1.,-1.,-1.};
+  Double_t vecl[3]={-1.,-1.,-1.};
+  mat.MasterToLocal(vecg,veclr);  
+  vecl[0]=veclr[1];
+  vecl[1]=veclr[0];
+  //take into account reflections 
+  if(det[1]>-1)vecl[2]=-veclr[2];
+
+  Float_t dist = TMath::Sqrt(vecl[0]*vecl[0]+vecl[1]*vecl[1]+vecl[2]*vecl[2]);
+
+
+  if (dist3d){
+    dist3d[0] = vecl[0];
+    dist3d[1] = vecl[1];
+    dist3d[2] = vecl[2];
+  }
+
+  return dist;
+
+}
+
+
+//_____________________________________________________________________________
+Bool_t AliTOFGeometryV5::IsInsideThePad( Int_t *det, TGeoHMatrix mat, Float_t *pos) 
+{
+//
+// Returns true if space point with coor pos (x,y,z) (cm) falls 
+// inside pad with Detector Indices idet (iSect,iPlate,iStrip,iPadX,iPadZ) 
+//
+
+  const Float_t khsensmy = 0.5;      // heigth of Sensitive Layer
+  Double_t vecg[3];
+  vecg[0]=pos[0];
+  vecg[1]=pos[1];
+  vecg[2]=pos[2];
+  Double_t veclr[3]={-1.,-1.,-1.};
+  Double_t vecl[3]={-1.,-1.,-1.};
+  mat.MasterToLocal(vecg,vecl);  
+  vecl[0]=veclr[1];
+  vecl[1]=veclr[0];
+  //take into account reflections 
+  if(det[1]>-1)vecl[2]=-veclr[2];
+
+  Float_t xr = vecl[0];
+  Float_t yr = vecl[1];
+  Float_t zr = vecl[2];
+
+  Bool_t isInside=false; 
+  if(TMath::Abs(xr)<= khsensmy*0.5 && TMath::Abs(yr)<= (fgkXPad*0.5) && TMath::Abs(zr)<= (fgkZPad*0.5))
+    isInside=true; 
+  return isInside;
+
+}
+//_____________________________________________________________________________
 //_____________________________________________________________________________
 Float_t AliTOFGeometryV5::GetX(Int_t *det)
 {
@@ -1460,3 +1535,75 @@ void AliTOFGeometryV5::InverseRotation(Float_t *xyz, Double_t rotationAngles[6])
 
 }
 //_____________________________________________________________________________
+void AliTOFGeometryV5::GetVolumePath(Int_t *ind, Char_t *path ) {
+  //--------------------------------------------------------------------
+  // This function returns the colume path of a given pad 
+  //--------------------------------------------------------------------
+  Int_t sector = ind[0];
+  Char_t  string1[100];
+  Char_t  string2[100];
+  Char_t  string3[100];
+  
+  Int_t icopy=-1;
+  
+  if(sector<3){
+    icopy=sector+1;
+    sprintf(string1,"/ALIC_1/B077_1/B075_%i/BTO3_1/FTOA_0/FLTA_0",icopy);
+  }
+  else if(sector<11){
+    icopy=sector+3;
+    sprintf(string1,"/ALIC_1/B077_1/B071_%i/BTO1_1/FTOA_0/FLTA_0",icopy);
+  }
+  else if(sector==11 || sector==12){
+    icopy=sector-10;
+    sprintf(string1,"/ALIC_1/B077_1/B074_%i/BTO2_1/FTOA_0/FLTA_0",icopy);
+    if(fHoles)sprintf(string1,"/ALIC_1/B077_1/B074_%i/BTO2_1",icopy);
+  }
+  else {
+    icopy=sector-12;
+    sprintf(string1,"/ALIC_1/B077_1/B071_%i/BTO1_1/FTOA_0/FLTA_0",icopy);
+  }
+  
+  Int_t iplate=ind[1];
+  Int_t istrip=ind[2];
+  if( iplate==0) icopy=istrip; 
+  if( iplate==1) icopy=istrip+NStripC(); 
+  if( iplate==2) icopy=istrip+NStripC()+NStripB(); 
+  if( iplate==3) icopy=istrip+NStripC()+NStripB()+NStripA(); 
+  if( iplate==4) icopy=istrip+NStripC()+2*NStripB()+NStripA(); 
+  icopy++;
+  sprintf(string2,"FSTR_%i",icopy);
+  if(fHoles && (sector==11 || sector==12)){
+    if(iplate<2)  sprintf(string2,"FTOB_0/FLTB_0/FSTR_%i",icopy);
+    if(iplate>2)  sprintf(string2,"FTOC_0/FLTC_0/FSTR_%i",icopy);
+  }
+
+  Int_t padz = ind[3]+1; 
+  Int_t padx = ind[4]+1;
+  sprintf(string3,"FPCB_1/FSEN_1/FSEZ_%i/FPAD_%i",padz,padx);
+  sprintf(path,"%s/%s/%s",string1,string2,string3); 
+
+}
+//_____________________________________________________________________________
+void AliTOFGeometryV5::GetPos(Int_t *det, Float_t *pos) 
+{
+//
+// Returns space point coor (x,y,z) (cm)  for Detector 
+// Indices  (iSect,iPlate,iStrip,iPadX,iPadZ) 
+//
+  Char_t path[100];
+  GetVolumePath(det,path );
+  if (!gGeoManager) {
+    printf("ERROR: no TGeo\n");
+  }
+  gGeoManager->cd(path);
+  TGeoHMatrix global;
+  global = *gGeoManager->GetCurrentMatrix();
+  const Double_t *tr = global.GetTranslation();
+
+  pos[0]=tr[0];  
+  pos[1]=tr[1];  
+  pos[2]=tr[2];
+}
+//_____________________________________________________________________________
index bfa0560708dbc6dd75630f7d534bd8e4ccdc5543..06b2701b83db44b776b68cae99ce8438ea175173 100644 (file)
@@ -18,15 +18,20 @@ class AliTOFGeometryV5: public AliTOFGeometry {
  public:
   AliTOFGeometryV5();
   virtual ~AliTOFGeometryV5();
-  
+   
+  void    ImportGeometry();
   void    Init();
-  Bool_t  IsInsideThePad(Int_t *det, Float_t *pos); 
-  Float_t DistanceToPad(Int_t *det, Float_t *pos, Float_t *dist3d=0);
+  Bool_t  IsInsideThePad(Int_t *det, TGeoHMatrix mat, Float_t *pos);
+  Float_t DistanceToPad(Int_t *det, TGeoHMatrix mat, Float_t *pos, Float_t *dist3d=0);
+  Bool_t  IsInsideThePadPar(Int_t *det, Float_t *pos); 
+  Float_t DistanceToPadPar(Int_t *det, Float_t *pos, Float_t *dist3d=0);
+  void    GetVolumePath(Int_t *ind, Char_t *path );
   Int_t   GetPlate(Float_t *pos);
   Int_t   GetStrip(Float_t *pos);
   Int_t   GetSector(Float_t *pos);
   Int_t   GetPadX(Float_t *pos);
   Int_t   GetPadZ(Float_t *pos);
+  void    GetPos(Int_t *det,Float_t *pos);
   Float_t GetX(Int_t *det);
   Float_t GetY(Int_t *det);
   Float_t GetZ(Int_t *det);
index 898a06df859008d943453e138a1da4d9edc43313..28c9833ba562f6755e13c182e7bcf312b07027dd 100644 (file)
@@ -85,7 +85,9 @@ AliTOFtracker::AliTOFtracker(const AliTOFtracker &t):AliTracker() {
   fdCut=t.fdCut; 
   fDy=t.fDy; 
   fDz=t.fDz; 
-  fDx=1.5; 
+  fDx=t.fDx; 
+  fDzMax=t.fDzMax; 
+  fDyMax=t.fDyMax; 
   fSeeds=t.fSeeds;
   fTracks=t.fTracks;
   fN=t.fN;