fix mem leak and compiler warning
[u/mrichter/AliRoot.git] / ANALYSIS / AliAODPairBaseCut.cxx
index 8642d01..0963581 100644 (file)
@@ -1,3 +1,31 @@
+// Base class AliAODPairBaseCut:
+// This class defines the range of some property - pure virtual
+// Property is coded by AliAODCutTypes type
+// Derived classes:
+//       AliAODQInvCut
+//       AliAODKtCut
+//       AliAODKStarCut
+//       AliAODKStarOutCut
+//       AliAODKStarSideCut
+//       AliAODKStarLongCut
+//       AliAODQSideLCMSCut
+//       AliAODQOutLCMSCut
+//       AliAODQLongLCMSCut
+//       AliAODDeltaECut
+//       AliAODDeltaPCut
+//       AliAODDeltaPvectorCut
+//       AliAODDeltaPhiCut
+//       AliAODDeltaThetaCut
+//       AliAODCluterOverlapCut
+//       AliAODAvSeparationCut
+//       AliAODSeparationCut
+//       AliAODITSSeparationCut
+//       AliAODOutSideSameSignCut
+//       AliAODOutSideDiffSignCut
+//       AliAODLogicalOperPairCut
+//       AliAODOrPairCut
+//       AliAODAndPairCut
+// Author: Piotr.Skowronski@cern.ch
 #include "AliAODPairBaseCut.h"
 
 #include "AliTrackPoints.h"
@@ -261,7 +289,19 @@ Bool_t AliAODAndPairCut::Rejected(AliAODPair * p)  const
   //OR operation is a little bit misleading but is correct
   //User wants to build logical cuts with natural (positive) logic
   //while ALIAN use inernally reverse (returns true when rejected)
-  if (fFirst->Rejected(p) || fSecond->Rejected(p)) return kTRUE;//rejected (any of two rejected(returned kTRUE) )
+  if (fFirst->Rejected(p))
+   {//first rejected - we reject
+     return kTRUE;
+   }
+  else
+   {//first accepted
+    if (fSecond->Rejected(p))
+     {//second rejected - we reject
+       return kTRUE;
+     }
+   }  
+//  if (fFirst->Rejected(p) || fSecond->Rejected(p)) return kTRUE;//rejected (any of two rejected(returned kTRUE) )
+  
   return kFALSE;//accepted (both accepted (returned kFALSE))
 }
 /******************************************************************/