]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOFtrack.cxx
include reconstruction parameters to be used by AliTOFtrackerV1
[u/mrichter/AliRoot.git] / TOF / AliTOFtrack.cxx
index 73b6d7219260b0082d4e363553f311878ef85f4a..497ecedf7d6137ad92505e610ceee19f457e5e31 100644 (file)
@@ -128,7 +128,7 @@ Bool_t AliTOFtrack::PropagateTo(Double_t xk,Double_t x0,Double_t rho)
 }     
 
 //_____________________________________________________________________________
-Bool_t AliTOFtrack::PropagateToInnerTOF(Bool_t holes)
+Bool_t AliTOFtrack::PropagateToInnerTOF()
 {
   // Propagates a track of particle with mass=pm to a reference plane 
   // defined by x=xk through media of density=rho and radiationLength=x0
@@ -156,7 +156,7 @@ Bool_t AliTOFtrack::PropagateToInnerTOF(Bool_t holes)
   for (Int_t istep=0;istep<nsteps;istep++){
     Float_t xp = x+istep*0.5; 
     Double_t param[2];  
-    GetPropagationParameters(holes,param);  
+    GetPropagationParameters(param);  
     PropagateTo(xp,param[0],param[1]);
     
   }
@@ -167,6 +167,36 @@ Bool_t AliTOFtrack::PropagateToInnerTOF(Bool_t holes)
   
 }     
 
+//_________________________________________________________________________
+Double_t AliTOFtrack::GetPredictedChi2(const AliCluster3D *c) const {
+  //
+  //
+  //
+  Double_t p[3]={c->GetX(), c->GetY(), c->GetZ()};
+  Double_t covyz[3]={c->GetSigmaY2(), c->GetSigmaYZ(), c->GetSigmaZ2()};
+  Double_t covxyz[3]={c->GetSigmaX2(), c->GetSigmaXY(), c->GetSigmaXZ()};
+  return AliExternalTrackParam::GetPredictedChi2(p, covyz, covxyz);
+}
+//_________________________________________________________________________
+Bool_t AliTOFtrack::PropagateTo(const AliCluster3D *c) {
+  //
+  //
+  //
+  Double_t oldX=GetX(), oldY=GetY(), oldZ=GetZ();
+  Double_t p[3]={c->GetX(), c->GetY(), c->GetZ()};
+  Double_t covyz[3]={c->GetSigmaY2(), c->GetSigmaYZ(), c->GetSigmaZ2()};
+  Double_t covxyz[3]={c->GetSigmaX2(), c->GetSigmaXY(), c->GetSigmaXZ()};
+  Double_t bz=GetBz();
+  if (!AliExternalTrackParam::PropagateTo(p, covyz, covxyz, bz)) return kFALSE;
+  if (IsStartedTimeIntegral()) {
+    Double_t d = TMath::Sqrt((GetX()-oldX)*(GetX()-oldX) +
+                            (GetY()-oldY)*(GetY()-oldY) +
+                            (GetZ()-oldZ)*(GetZ()-oldZ));
+    if (GetX()<oldX) d=-d;
+    AddTimeStep(d);
+  }
+  return kTRUE;
+}
 //_________________________________________________________________________
 Double_t AliTOFtrack::GetYat(Double_t xk, Bool_t & skip) const {     
 //-----------------------------------------------------------------
@@ -191,6 +221,7 @@ Int_t AliTOFtrack::Compare(const TObject *o) const {
   return 0;
 }
 
+//_____________________________________________________________________________
 Double_t AliTOFtrack::GetBz() const {
   //
   // returns Bz component of the magnetic field (kG)
@@ -201,17 +232,18 @@ Double_t AliTOFtrack::GetBz() const {
 }
 
 //_____________________________________________________________________________
-void AliTOFtrack::GetPropagationParameters(Bool_t holes, Double_t *param) {
+void AliTOFtrack::GetPropagationParameters(Double_t *param) {
 
  //Get average medium density, x0 while propagating the track
 
   //For TRD holes description
-
+  /*
   Double_t thetamin = (90.-31.1) * TMath::Pi()/180.;
   Double_t thetamax = (90.+31.1) * TMath::Pi()/180.;
 
   Double_t zmin = -55.;
   Double_t zmax =  55.;
+  */
 
   // Detector inner/outer radii
   Double_t rTPC    = 261.53;
@@ -228,10 +260,11 @@ void AliTOFtrack::GetPropagationParameters(Bool_t holes, Double_t *param) {
   Double_t x0TRD = 171.7;
   Double_t rhoTRD =0.33;
 
-  Int_t isec = GetSector();
+  //  Int_t isec = GetSector();
   Double_t r[3]; GetXYZ(r);
-  Float_t thetatr = TMath::ATan2(TMath::Sqrt(r[0]*r[0]+r[1]*r[1]),r[2]);
+  //  Float_t thetatr = TMath::ATan2(TMath::Sqrt(r[0]*r[0]+r[1]*r[1]),r[2]);
 
+  /*
   if(holes){
     if (isec == 0 || isec == 1 || isec == 2 ) {
       if( thetatr>=thetamin && thetatr<=thetamax){ 
@@ -246,7 +279,7 @@ void AliTOFtrack::GetPropagationParameters(Bool_t holes, Double_t *param) {
       }
     }
   }
-
+  */
   if(GetX() <= rTPC)
     {param[0]=x0TPC;param[1]=rhoTPC;}
   else if(GetX() > rTPC &&  GetX() < rTPCTRD)