Additional Protection
authorskowron <skowron@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 7 Sep 2003 17:14:01 +0000 (17:14 +0000)
committerskowron <skowron@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 7 Sep 2003 17:14:01 +0000 (17:14 +0000)
HBTAN/AliHBTPair.cxx

index 1751a2e..fe6490b 100644 (file)
@@ -249,7 +249,16 @@ Double_t AliHBTPair::GetKStar()
     
     CalculateQInvL();
     
-    Q = TMath::Sqrt( Q*Q - fQInvL);
+    Q = Q*Q - fQInvL;
+    if ( Q < 0)
+     {
+        Info("GetKStar","Q = %f",Q);
+        fPart1->Print();
+        fPart2->Print();
+        Q = TMath::Abs(Q);
+     }
+     
+    Q = TMath::Sqrt(Q);
     fKStar = Q/2.;
     fKStarNotCalc = kFALSE;
    }