]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITStrackSA.cxx
Updates concerning the geometry: versioning system, new V11hybrid version, bug fixes...
[u/mrichter/AliRoot.git] / ITS / AliITStrackSA.cxx
index b1261e947235290ced0df388ede30c89a4c3a21e..70a235d03718d8110aebb74cab0ffea60161e51a 100755 (executable)
@@ -23,7 +23,7 @@
 //  of cluster equal to fgkMaxNumberOfClusters    //
 ////////////////////////////////////////////////////
 
-#include "AliITSgeom.h"
+#include "AliITSgeomTGeo.h"
 #include "AliITStrackSA.h"
 
 
@@ -81,19 +81,15 @@ fNSA(t.fNSA){
   }
 }
 //____________________________________________________
-AliITStrackSA::AliITStrackSA(AliITSgeom* geom,Int_t layer, Int_t ladder, Int_t detector, Double_t Ycoor, Double_t Zcoor, Double_t phi, Double_t tanlambda, Double_t curv, Int_t lab ):
+AliITStrackSA::AliITStrackSA(Int_t layer, Int_t ladder, Int_t detector, Double_t Ycoor, Double_t Zcoor, Double_t phi, Double_t tanlambda, Double_t curv, Int_t lab ):
 fNSA(0) 
 {
   // standard constructor. Used for ITS standalone tracking
 
-  if(!geom){
-    Fatal("AliITStrackSA","ITS geometry not found - Abort\n");
-    return;
-  }
   // get the azimuthal angle of the detector containing the innermost
   // cluster of this track (data member fAlpha)
-  Float_t rotmatr[9];
-  geom->GetRotMatrix(layer,ladder,detector,rotmatr);
+  Double_t rotmatr[9];
+  AliITSgeomTGeo::GetRotation(layer,ladder,detector,rotmatr);
   Double_t sAlpha=TMath::ATan2(rotmatr[1],rotmatr[0])+TMath::Pi();
   sAlpha+=TMath::Pi()/2.;
   if(layer==1) sAlpha+=TMath::Pi();
@@ -102,7 +98,11 @@ fNSA(0)
   // get the radius of this detector. Procedure taken from the 
   // AliITStrackerV2 constructor
   Float_t x=0,y=0,z=0;
-  geom->GetTrans(layer,ladder,detector,x,y,z);
+  Double_t xyz[3];
+  AliITSgeomTGeo::GetTranslation(layer,ladder,detector,xyz);
+  x=xyz[0];
+  y=xyz[1];
+  z=xyz[2];
 
   Double_t fi=TMath::ATan2(rotmatr[1],rotmatr[0])+TMath::Pi();
   fi+=TMath::Pi()/2;
@@ -136,6 +136,13 @@ fNSA(0)
                   tanlambda,
                   curv/conv};
 
+
+  // dealing with the case B=0 (taken from AliTPCtrack.cxx)
+  Double_t p0=TMath::Sign(1/kMostProbablePt,sP[4]);
+  Double_t w0=sC[14]/(sC[14] + p0*p0), w1=p0*p0/(sC[14] + p0*p0);
+  sP[4] = w0*p0 + w1*sP[4];
+  sC[14]*=w1;
+                                                                              
   Set(sX,sAlpha,sP,sC);
 
   for(Int_t i=0; i<kMaxLayer; i++) fIndex[i] = 0;  // to be set explicitely