Added check on sign of diagonal elements of covariance matrix: fixed savannah bug...
authordecaro <decaro@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 15 May 2010 13:20:38 +0000 (13:20 +0000)
committerdecaro <decaro@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 15 May 2010 13:20:38 +0000 (13:20 +0000)
TOF/AliTOFtracker.cxx
TOF/AliTOFtrackerMI.cxx
TOF/AliTOFtrackerV1.cxx

index 0356c7e..f91568a 100644 (file)
@@ -742,8 +742,14 @@ void AliTOFtracker::MatchTracks( Bool_t mLastStep){
     // Fill Reco-QA histos for Reconstruction
     fHRecNClus->Fill(nc);
     fHRecDist->Fill(mindist);
-    fHRecSigYVsP->Fill(mom,TMath::Sqrt(cov[0]));
-    fHRecSigZVsP->Fill(mom,TMath::Sqrt(cov[2]));
+    if (cov[0]>=0.)
+      fHRecSigYVsP->Fill(mom,TMath::Sqrt(cov[0]));
+    else
+      fHRecSigYVsP->Fill(mom,TMath::Sqrt(-cov[0]));
+    if (cov[2]>=0.)
+      fHRecSigZVsP->Fill(mom,TMath::Sqrt(cov[2]));
+    else
+      fHRecSigZVsP->Fill(mom,TMath::Sqrt(-cov[2]));
     fHRecSigYVsPWin->Fill(mom,dphi*sensRadius);
     fHRecSigZVsPWin->Fill(mom,dz);
 
index a2b5649..01794c5 100644 (file)
@@ -792,8 +792,8 @@ void AliTOFtrackerMI::GetLikelihood(Float_t dy, Float_t dz, const Double_t *cov,
 
   
   Float_t normwidth, normd, p0,p1;  
-  Float_t sigmay = TMath::Max(TMath::Sqrt(cov[0]+kMeanSigmaY*kMeanSigmaY),kMaxSigmaY);
-  Float_t sigmaz = TMath::Max(TMath::Sqrt(cov[2]+kMeanSigmaZ*kMeanSigmaZ),kMaxSigmaZ);
+  Float_t sigmay = TMath::Max(TMath::Sqrt(TMath::Abs(cov[0])+kMeanSigmaY*kMeanSigmaY),kMaxSigmaY);
+  Float_t sigmaz = TMath::Max(TMath::Sqrt(TMath::Abs(cov[2])+kMeanSigmaZ*kMeanSigmaZ),kMaxSigmaZ);
 
   py=0;
   pz=0;  
index 953484a..594db73 100644 (file)
@@ -579,8 +579,14 @@ void AliTOFtrackerV1::MatchTracks( ){
     fHRecNClus->Fill(nc);
     fHRecChi2->Fill(bestChi2);
     fHRecDistZ->Fill(dzTW);
-    fHRecSigYVsP->Fill(mom,TMath::Sqrt(cov[0]));
-    fHRecSigZVsP->Fill(mom,TMath::Sqrt(cov[2]));
+    if (cov[0]>=0.)
+      fHRecSigYVsP->Fill(mom,TMath::Sqrt(cov[0]));
+    else
+      fHRecSigYVsP->Fill(mom,TMath::Sqrt(-cov[0]));
+    if (cov[2]>=0.)
+      fHRecSigZVsP->Fill(mom,TMath::Sqrt(cov[2]));
+    else
+      fHRecSigZVsP->Fill(mom,TMath::Sqrt(-cov[2]));
     fHRecSigYVsPWin->Fill(mom,dphi*sensRadius);
     fHRecSigZVsPWin->Fill(mom,dz);