]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HBTAN/AliHBTFunction.h
Coding violations corrected
[u/mrichter/AliRoot.git] / HBTAN / AliHBTFunction.h
index e2f00f777563194791fe7900863506315e7e0c0b..0a03880350a0fdf7fde2857312576ce6ed3791fe 100644 (file)
 #include <TH2D.h>
 #include <TH3D.h>
 
-#include "AliHBTPairCut.h"
+#include "AliAODPairCut.h"
 #include "AliHBTPair.h"
 
 
 class AliHBTAnalysis;
-class AliHBTParticleCut;
+class AliVAODParticleCut;
 
 class AliHBTFunction: public TNamed
 {
@@ -47,13 +47,13 @@ class AliHBTFunction: public TNamed
     void Rename(const Char_t * name); //renames the function and histograms ==title is the same that name
     void Rename(const Char_t * name, const Char_t * title); //renames and retitle the function and histograms
     
-    void SetPairCut(AliHBTPairCut* cut);
+    void SetPairCut(AliAODPairCut* cut);
     
     virtual AliHBTPair* CheckPair(AliHBTPair* pair);
     void  SetWriteNumAndDen(Bool_t flag = kFALSE){fWriteNumAndDen = flag;}
   protected:
     virtual void BuildHistos() = 0;//builds default histograms
-    AliHBTPairCut*   fPairCut;     //pair cut
+    AliAODPairCut*   fPairCut;     //pair cut
     Bool_t           fWriteNumAndDen; //flag indicating whether numerator and denominator should be writted together with a result
     ClassDef(AliHBTFunction,3)
 };
@@ -61,15 +61,19 @@ class AliHBTFunction: public TNamed
 inline AliHBTPair* AliHBTFunction::CheckPair(AliHBTPair* pair)
 {
   //check if pair and both particles meets the cut criteria
-  if(fPairCut->Pass(pair)) //if the pair is BAD
-   {//it is BAD 
-    pair = pair->GetSwapedPair();
-    if(pair)
-     if(fPairCut->Pass(pair)) //so try reverse combination
-       { 
-        return 0x0;//it is BAD as well - so return
-       }
-   }
+  if(fPairCut->Rejected(pair)) return 0x0; //if the pair is BAD
+
+//   It is notallowed to change the order here beacause analysis enforce the order
+
+//   {//it is BAD 
+//    pair = pair->GetSwappedPair();
+//    if(pair)
+//     if(fPairCut->Rejected(pair)) //so try reverse combination
+//       { 
+//        return 0x0;//it is BAD as well - so return
+//       }
+//   }
+
   return pair; 
 }