]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITStrackMI.cxx
Corrected name of the SPD fast-or minimum bias trigger input (Annalisa)
[u/mrichter/AliRoot.git] / ITS / AliITStrackMI.cxx
index e7cba4ded7f698ba93722ac2080b695f21171bf5..3eb1f7195b2d2f30c38bc221c48f9d7667f3d1e7 100644 (file)
@@ -140,81 +140,18 @@ Double_t AliITStrackMI::GetPredictedChi2MI(Double_t cy, Double_t cz, Double_t ce
 }
 
 //____________________________________________________________________________
-Int_t AliITStrackMI::CorrectForMaterial(Double_t d, Double_t x0) {
-  //------------------------------------------------------------------
-  //This function corrects the track parameters for crossed material
-  //------------------------------------------------------------------
-  //d=x0=0.;
-
-  Double_t p2=(1.+ GetTgl()*GetTgl())/(GetSigned1Pt()*GetSigned1Pt());
-  Double_t et   = p2 + GetMass()*GetMass();
-  Double_t beta2=p2/et;
-  et = sqrt(et);  
-  d*=TMath::Sqrt((1.+ GetTgl()*GetTgl())/(1.- GetSnp()*GetSnp()));
-
-  //Multiple scattering******************
-  if (d!=0) {
-     Double_t theta2=14.1*14.1/(beta2*p2*1e6)*TMath::Abs(d);
-     //Double_t theta2=1.0259e-6*14*14/28/(beta2*p2)*TMath::Abs(d)*9.36*2.33;
-     Cov(5) += theta2*(1.- GetSnp()*GetSnp())*(1. + GetTgl()*GetTgl());
-     Cov(9) += theta2*(1. + GetTgl()*GetTgl())*(1. + GetTgl()*GetTgl());
-     Cov(13)+= theta2*GetTgl()*GetSigned1Pt()*(1. + GetTgl()*GetTgl());
-     Cov(14)+= theta2*GetTgl()*GetSigned1Pt()*GetTgl()*GetSigned1Pt();
-  }
-
-  //Energy losses************************
-  if (x0!=0.) {
-     d*=x0;
-     //     Double_t dE=0.153e-3/beta2*(log(5940*beta2/(1-beta2)) - beta2)*d;
-     //Double_t dE=0; 
-     Double_t dE = 0.265*0.153e-3*(39.2-55.6*beta2+28.7*beta2*beta2+27.41/beta2)*d;
-     //if (beta2/(1-beta2)>3.5*3.5){
-     //  dE=0.153e-3/beta2*(log(3.5*5940)+0.5*log(beta2/(1-beta2)) - beta2)*d;
-     //}
-     //else{
-     //  dE=0.153e-3/beta2*(log(5940*beta2/(1-beta2)) - beta2)*d;
-     //  dE+=0.06e-3/(beta2*beta2)*d;
-     //}
-
-     Par(4)*=(1.- et/p2*dE);
-     Double_t delta44 = (dE*GetSigned1Pt()*et/p2);
-     delta44*=delta44;
-     Cov(14)+= delta44/400.;
-  }
-
-  if (!Invariant()) return 0;
-
-  return 1;
-}
-
-//____________________________________________________________________________
-Bool_t AliITStrackMI::UpdateMI(Double_t cy, Double_t cz, Double_t cerry, Double_t cerrz, Double_t chi2, Int_t index) {
+Bool_t AliITStrackMI::UpdateMI(const AliCluster *c, Double_t chi2, Int_t index) {
   //------------------------------------------------------------------
   //This function updates track parameters
   //------------------------------------------------------------------
-  Double_t dy=cy - GetY(), dz=cz - GetZ();
+  Double_t dy=c->GetY() - GetY(), dz=c->GetZ() - GetZ();
   Int_t layer = (index & 0xf0000000) >> 28;
   fDy[layer] = dy;
   fDz[layer] = dz;
-  fSigmaY[layer] = TMath::Sqrt(cerry*cerry+GetSigmaY2());
-  fSigmaZ[layer] = TMath::Sqrt(cerrz*cerrz+GetSigmaZ2());
-
-  Double_t p[2]={cy, cz};
-  Double_t cov[3]={cerry*cerry, 0., cerrz*cerrz};
-  if (!AliExternalTrackParam::Update(p,cov)) return kFALSE;
-
-  if (!Invariant()) {
-     AliWarning("Wrong invariant !");
-     return kFALSE;
-  }
-
-  if (chi2<0) return 1;
-  Int_t n=GetNumberOfClusters();
-  fIndex[n]=index;
-  SetNumberOfClusters(n+1);
-  SetChi2(GetChi2()+chi2);
+  fSigmaY[layer] = TMath::Sqrt(c->GetSigmaY2()+GetSigmaY2());
+  fSigmaZ[layer] = TMath::Sqrt(c->GetSigmaZ2()+GetSigmaZ2());
 
-  return kTRUE;
+  return Update(c,chi2,index);
 }
 
 Int_t AliITStrackMI::GetProlongationFast(Double_t alp, Double_t xk,Double_t &y, Double_t &z)
@@ -223,7 +160,7 @@ Int_t AliITStrackMI::GetProlongationFast(Double_t alp, Double_t xk,Double_t &y,
   //get fast prolongation 
   //-----------------------------------------------------------------------------
   Double_t ca=TMath::Cos(alp-GetAlpha()), sa=TMath::Sin(alp-GetAlpha());
-  Double_t cf=TMath::Sqrt(1.- GetSnp()*GetSnp());  
+  Double_t cf=TMath::Sqrt((1.-GetSnp())*(1.+GetSnp()));  
   // **** rotation **********************  
   y= -GetX()*sa + GetY()*ca;
   // **** translation ******************  
@@ -232,7 +169,7 @@ Int_t AliITStrackMI::GetProlongationFast(Double_t alp, Double_t xk,Double_t &y,
   if (TMath::Abs(f2) >= 0.9999) {
     return 0;
   }
-  Double_t r1=TMath::Sqrt(1.- f1*f1), r2=TMath::Sqrt(1.- f2*f2);  
+  Double_t r1=TMath::Sqrt((1.-f1)*(1.+f1)), r2=TMath::Sqrt((1.-f2)*(1.+f2));  
   y += dx*(f1+f2)/(r1+r2);
   z  = GetZ()+dx*(f1+f2)/(f1*r2 + f2*r1)*GetTgl();  
   return 1;