]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fix Coverity
authorakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 10 Apr 2012 12:22:16 +0000 (12:22 +0000)
committerakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 10 Apr 2012 12:22:16 +0000 (12:22 +0000)
PWGCF/FEMTOSCOPY/AliFemto/AliFemtoV0TrackCut.cxx

index 3c4e299ddc724356855b2936e52811c1a9d5f57b..894a86f42313374400aa697ebc8ad6347f69909c 100644 (file)
@@ -261,8 +261,8 @@ bool AliFemtoV0TrackCut::IsKaonNSigma(float mom, float nsigmaTPCK, float nsigmaT
 
 bool AliFemtoV0TrackCut::IsPionNSigma(float mom, float nsigmaTPCPi, float nsigmaTOFPi)
 {
-  mom = 1; //because of warning in the compilation
-  nsigmaTOFPi = 1;
+  //  mom = 1; //because of warning in the compilation
+  //  nsigmaTOFPi = 1;
   // cout<<" AliFemtoV0TrackCut::IsKaonNSigma "<<mom<<" tpc "<<nsigmaTPCK<<" tof "<<nsigmaTOFK<<endl;
 
   //TOF signal
@@ -279,6 +279,8 @@ bool AliFemtoV0TrackCut::IsPionNSigma(float mom, float nsigmaTPCPi, float nsigma
   //      }
 
   if( TMath::Abs(nsigmaTPCPi)<3.0) return true;
+  
+  if (mom == nsigmaTOFPi) { };
 
   return false;
 }
@@ -286,8 +288,8 @@ bool AliFemtoV0TrackCut::IsPionNSigma(float mom, float nsigmaTPCPi, float nsigma
 
 bool AliFemtoV0TrackCut::IsProtonNSigma(float mom, float nsigmaTPCP, float nsigmaTOFP)
 {
-  mom = 1; //because of warning in the compilation
-  nsigmaTOFP = 1;
+  //  mom = 1; //because of warning in the compilation
+  //  nsigmaTOFP = 1;
   // cout<<" AliFemtoV0TrackCut::IsKaonNSigma "<<mom<<" tpc "<<nsigmaTPCK<<" tof "<<nsigmaTOFK<<endl;
 
       //TOF signal
@@ -303,5 +305,7 @@ bool AliFemtoV0TrackCut::IsProtonNSigma(float mom, float nsigmaTPCP, float nsigm
 
   if( TMath::Abs(nsigmaTPCP)<3.0) return true;
 
+  if (mom == nsigmaTOFP) { };
+
   return false;
 }