]> 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 81d344566c4a34e21c4cefff1c7ad2141040cfe9..70a235d03718d8110aebb74cab0ffea60161e51a 100755 (executable)
 //  of cluster equal to fgkMaxNumberOfClusters    //
 ////////////////////////////////////////////////////
 
-#include "AliITSgeom.h"
+#include "AliITSgeomTGeo.h"
 #include "AliITStrackSA.h"
 
 
 ClassImp(AliITStrackSA)
 
 //_____________________________________
-AliITStrackSA:: AliITStrackSA() : AliITStrackMI(){
+AliITStrackSA:: AliITStrackSA() : AliITStrackMI(),
+fNSA(0)
+{
 // Default constructor  
   SetNumberOfClusters(0);
   SetNumberOfClustersSA(0);
@@ -44,7 +46,8 @@ AliITStrackSA:: AliITStrackSA() : AliITStrackMI(){
 
 //___________________________________________________
 AliITStrackSA::AliITStrackSA(const AliITStrackMI& t) : 
-AliITStrackMI(t){
+AliITStrackMI(t),
+fNSA(0){
 // Copy a V2 track into a SA track
   SetNumberOfClustersSA(0);
   ResetIndexSA();
@@ -56,7 +59,8 @@ AliITStrackMI(t){
 }
 //___________________________________________________
 AliITStrackSA::AliITStrackSA(const AliITStrackSA& t) : 
-AliITStrackMI(t){
+AliITStrackMI(t),
+fNSA(t.fNSA){
 // Copy constructor
 
 
@@ -77,17 +81,15 @@ AliITStrackMI(t){
   }
 }
 //____________________________________________________
-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();
@@ -96,7 +98,11 @@ AliITStrackSA::AliITStrackSA(AliITSgeom* geom,Int_t layer, Int_t ladder, Int_t d
   // 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;
@@ -130,6 +136,13 @@ AliITStrackSA::AliITStrackSA(AliITSgeom* geom,Int_t layer, Int_t ladder, Int_t d
                   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