]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliExternalTrackParam.cxx
Typo fixed.
[u/mrichter/AliRoot.git] / STEER / AliExternalTrackParam.cxx
index e3c0fffb508b13769ff728de1a503955d86b00df..e60bd30ef4cb64ce88c97c4db8682bac7b2dd264 100644 (file)
@@ -117,6 +117,20 @@ void AliExternalTrackParam::Reset() {
   for (Int_t i = 0; i < 15; i++) fC[i] = 0;
 }
 
+//_____________________________________________________________________________
+void AliExternalTrackParam::AddCovariance(const Double_t c[15]) {
+  //
+  // Add "something" to the track covarince matrix.
+  // May be needed to account for unknown mis-calibration/mis-alignment
+  //
+    fC[0] +=c[0];
+    fC[1] +=c[1];  fC[2] +=c[2];
+    fC[3] +=c[3];  fC[4] +=c[4];  fC[5] +=c[5];
+    fC[6] +=c[6];  fC[7] +=c[7];  fC[8] +=c[8];  fC[9] +=c[9];
+    fC[10]+=c[10]; fC[11]+=c[11]; fC[12]+=c[12]; fC[13]+=c[13]; fC[14]+=c[14];
+}
+
+
 Double_t AliExternalTrackParam::GetP() const {
   //---------------------------------------------------------------------
   // This function returns the track momentum
@@ -233,6 +247,7 @@ Bool_t AliExternalTrackParam::CorrectForMeanMaterial
   //Multiple scattering******************
   if (xOverX0 != 0) {
      Double_t theta2=14.1*14.1/(beta2*p2*1e6)*TMath::Abs(xOverX0);
+     if(theta2>TMath::Pi()*TMath::Pi()) return kFALSE;
      //Double_t theta2=1.0259e-6*14*14/28/(beta2*p2)*TMath::Abs(d)*9.36*2.33;
      fC22 += theta2*(1.- fP2*fP2)*(1. + fP3*fP3);
      fC33 += theta2*(1. + fP3*fP3)*(1. + fP3*fP3);
@@ -246,6 +261,8 @@ Bool_t AliExternalTrackParam::CorrectForMeanMaterial
      Double_t e=TMath::Sqrt(p2 + mass*mass);
      if ( TMath::Abs(dE) > 0.3*e ) return kFALSE; //30% energy loss is too much!
      fP4*=(1.- e/p2*dE);
+     if (TMath::Abs(fP4)>100.) return kFALSE; // Do not track below 10 MeV/c
+
 
      // Approximate energy loss fluctuation (M.Ivanov)
      const Double_t knst=0.07; // To be tuned.  
@@ -286,6 +303,7 @@ Bool_t AliExternalTrackParam::CorrectForMaterial
   //Multiple scattering******************
   if (d!=0) {
      Double_t theta2=14.1*14.1/(beta2*p2*1e6)*TMath::Abs(d);
+     if(theta2>TMath::Pi()*TMath::Pi()) return kFALSE;
      //Double_t theta2=1.0259e-6*14*14/28/(beta2*p2)*TMath::Abs(d)*9.36*2.33;
      fC22 += theta2*(1.- fP2*fP2)*(1. + fP3*fP3);
      fC33 += theta2*(1. + fP3*fP3)*(1. + fP3*fP3);