Bug corrections
[u/mrichter/AliRoot.git] / HBTAN / AliHBTCorrelFctn.h
index 1b90a16..09159c9 100644 (file)
@@ -1,18 +1,29 @@
 #ifndef ALIHBTCORRELFUNCTION_H
 #define ALIHBTCORRELFUNCTION_H
-
-#include "AliHBTFunction.h"
-#include "AliHBTParticle.h"
-#include <Riostream.h>
-//Set of functions:
+//____________________________________________________________________________
+//////////////////////////////////////////////////////////////////////////////
+//
+// class AliHBTQInvCorrelFctn
+// class AliHBTQOutCMSLCCorrelFctn
+// class AliHBTQLongCMSLCCorrelFctn
+// class AliHBTQSideCMSLCCorrelFctn
+// class AliHBTInvMassCorrelFctn
+// class AliHBTTwoKStarCorrelFctn
+//
+// Set of functions:
 //   Q Invaraint Correlation Function
 //   Invariant Mass Function
 //
-//more info: http://alisoft.cern.ch/people/skowron/analyzer/index.html
-//Piotr.Skowronski@cern.ch
+// more info: http://aliweb.cern.ch/people/skowron/analyzer/index.html
+// Piotr.Skowronski@cern.ch
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#include "AliHBTFunction.h"
+#include <Riostream.h>
 
 /*************************************************************************************/ 
-class AliHBTQInvCorrelFctn: public AliHBTOnePairFctn1D
+class AliHBTQInvCorrelFctn: public AliHBTOnePairFctn1D, public AliHBTCorrelFunction
 {
 //Q Invaraint Correlation Function
 //1D two particle function 
@@ -22,60 +33,74 @@ class AliHBTQInvCorrelFctn: public AliHBTOnePairFctn1D
    TH1* GetResult();
  protected:
    Double_t GetValue(AliHBTPair * pair){return pair->GetQInv();}
+ private:  
+   ClassDef(AliHBTQInvCorrelFctn,2)
+};
+/*************************************************************/
+
+class AliHBTOutSideLongFctn: public AliHBTOnePairFctn3D, public AliHBTCorrelFunction
+{
+
   public:
-    ClassDef(AliHBTQInvCorrelFctn,1)
+    AliHBTOutSideLongFctn(Int_t nXbins = 100, Double_t maxXval = 0.15, Double_t minXval = 0.0,
+                             Int_t nYbins = 100, Double_t maxYval = 0.15, Double_t minYval = 0.0,
+                Int_t nZbins = 100, Double_t maxZval = 0.15, Double_t minZval = 0.0);
+    virtual  ~AliHBTOutSideLongFctn(){}
+
+    TH1* GetResult();
  
+  protected:
+    void GetValues(AliHBTPair* pair, Double_t& x, Double_t& y, Double_t& z)
+      { x=TMath::Abs(pair->GetQOutCMSLC()); y=TMath::Abs(pair->GetQSideCMSLC()); z=TMath::Abs(pair->GetQLongCMSLC());} 
+
+  ClassDef(AliHBTOutSideLongFctn,1)
 };
+
 /*************************************************************************************/ 
 
-class AliHBTQOutCMSLCCorrelFctn: public AliHBTOnePairFctn1D
+class AliHBTQOutCMSLCCorrelFctn: public AliHBTOnePairFctn1D, public AliHBTCorrelFunction
 {
 //Q OutCMSLCaraint Correlation Function
 //1D two particle function 
  public:
-   AliHBTQOutCMSLCCorrelFctn(Int_t nbins = 100, Double_t maxXval = 0.15, Double_t minXval = 0.0):
-                        AliHBTOnePairFctn1D(nbins,maxXval,minXval){}
+   AliHBTQOutCMSLCCorrelFctn(Int_t nbins = 100, Double_t maxXval = 0.15, Double_t minXval = 0.0);
    virtual ~AliHBTQOutCMSLCCorrelFctn(){};
    TH1* GetResult();
  protected:
-   Double_t GetValue(AliHBTPair * pair){return TMath::Abs(pair->GetQOutCMSLC());}
-  public:
-    ClassDef(AliHBTQOutCMSLCCorrelFctn,1)
+   Double_t GetValue(AliHBTPair * pair){return pair->GetQOutCMSLC();}
+ private:  
+    ClassDef(AliHBTQOutCMSLCCorrelFctn,2)
 };
 /*************************************************************************************/ 
 
-class AliHBTQLongCMSLCCorrelFctn: public AliHBTOnePairFctn1D
+class AliHBTQLongCMSLCCorrelFctn: public AliHBTOnePairFctn1D, public AliHBTCorrelFunction
 {
 //Q LongCMSLCaraint Correlation Function
 //1D two particle function 
  public:
-   AliHBTQLongCMSLCCorrelFctn(Int_t nbins = 100, Double_t maxXval = 0.15, Double_t minXval = 0.0):
-                        AliHBTOnePairFctn1D(nbins,maxXval,minXval){}
+   AliHBTQLongCMSLCCorrelFctn(Int_t nbins = 100, Double_t maxXval = 0.15, Double_t minXval = 0.0);
    virtual ~AliHBTQLongCMSLCCorrelFctn(){};
    TH1* GetResult();
  protected:
-   Double_t GetValue(AliHBTPair * pair){return TMath::Abs(pair->GetQLongCMSLC());}
-  public:
-    ClassDef(AliHBTQLongCMSLCCorrelFctn,1)
+   Double_t GetValue(AliHBTPair * pair){return pair->GetQLongCMSLC();}
+ private:  
+    ClassDef(AliHBTQLongCMSLCCorrelFctn,2)
 };
 /*************************************************************************************/ 
 
-class AliHBTQSideCMSLCCorrelFctn: public AliHBTOnePairFctn1D
+class AliHBTQSideCMSLCCorrelFctn: public AliHBTOnePairFctn1D, public AliHBTCorrelFunction
 {
 //Q SideCMSLCaraint Correlation Function
 //1D two particle function 
  public:
-   AliHBTQSideCMSLCCorrelFctn(Int_t nbins = 100, Double_t maxXval = 0.15, Double_t minXval = 0.0):
-                        AliHBTOnePairFctn1D(nbins,maxXval,minXval){}
-   virtual ~AliHBTQSideCMSLCCorrelFctn(){};
+   AliHBTQSideCMSLCCorrelFctn(Int_t nbins = 100, Double_t maxXval = 0.15, Double_t minXval = 0.0);
+   virtual ~AliHBTQSideCMSLCCorrelFctn(){}
    TH1* GetResult();
  protected:
-   Double_t GetValue(AliHBTPair * pair){return TMath::Abs(pair->GetQSideCMSLC());}
-  public:
-    ClassDef(AliHBTQSideCMSLCCorrelFctn,1)
+   Double_t GetValue(AliHBTPair * pair){return pair->GetQSideCMSLC();}
+ private:  
+    ClassDef(AliHBTQSideCMSLCCorrelFctn,2)
 };
 /*************************************************************************************/ 
 
@@ -88,11 +113,23 @@ class AliHBTInvMassCorrelFctn: public AliHBTOnePairFctn1D
    TH1* GetResult();
  protected:
    Double_t GetValue(AliHBTPair * pair) { return pair->GetInvMass();}
-  public:
+ private:  
     ClassDef(AliHBTInvMassCorrelFctn,1)
 };
 
+/*************************************************************************************/ 
 
+class AliHBTTwoKStarCorrelFctn: public AliHBTOnePairFctn1D, public AliHBTCorrelFunction
+{
+//   Correlation Function of 2*KStar
+ public:
+   AliHBTTwoKStarCorrelFctn(Int_t nbins = 200, Double_t maxXval = 0.15, Double_t minXval = 0.0);
+   virtual ~AliHBTTwoKStarCorrelFctn(){};
+   TH1* GetResult();
+ protected:
+   Double_t GetValue(AliHBTPair * pair) { return 2.0*pair->GetKStar();}
+ private:  
+    ClassDef(AliHBTTwoKStarCorrelFctn,2)
+};
 
 #endif