Retrofeed from 4-01-Release
[u/mrichter/AliRoot.git] / HBTAN / AliHBTCorrectOSLCorrelFctn.h
1 #ifndef ALIHBTCORRECTOSLCORRELFCTN_H
2 #define ALIHBTCORRECTOSLCORRELFCTN_H
3 //____________________
4 ///////////////////////////////////////////////////////
5 //                                                   //
6 // AliHBTCorrectQ3DCorrelFctn                        //
7 //                                                   //
8 // Class for calculating Q Invariant correlation     //
9 // taking to the account resolution of the           //
10 // detector and coulomb effects.                     //
11 //                                                   //
12 //          N[meas]   N[ideal]/D[ideal]
13 //  C(Q) =  ------- * -----------------
14 //          D[meas]   N[smear]/D[smear]
15 //
16 // if smeared is eqal to the measured than  we get ideal.
17 ///////////////////////////////////////////////////////
18
19 #include "AliHBTCorrectQInvCorrelFctn.h"
20
21
22 class AliHBTCorrectOSLCorrelFctn: public AliHBTOnePairFctn3D, public AliHBTCorrectedCorrelFctn
23 {
24   public:
25    AliHBTCorrectOSLCorrelFctn(const char* name = "qoslcorrectedCF", 
26                               const char* title= "Corrected Q_{out}-Q_{side}-Q_{long} Correlation Fonction");
27
28   AliHBTCorrectOSLCorrelFctn(const Char_t *name, const Char_t *title,
29                  Int_t nXbins, Double_t maxXval, Double_t minXval, 
30                  Int_t nYbins, Double_t maxYval, Double_t minYval, 
31                  Int_t nZbins, Double_t maxZval, Double_t minZval);
32                    
33    AliHBTCorrectOSLCorrelFctn(const AliHBTCorrectOSLCorrelFctn& in);
34    virtual ~AliHBTCorrectOSLCorrelFctn();
35
36    void     ProcessSameEventParticles(AliHBTPair* pair);//process particles from same event (real pair)
37    void     ProcessDiffEventParticles(AliHBTPair* pair);//process particles coming from different events (mixed pairs)
38
39    void     SetInitialValues(Double_t lambda, Double_t rout, Double_t rside, Double_t rlong);
40    void     Init();
41    void     WriteFunction();//overloaded 
42
43    TH1*     GetResult();//returns the result histogram
44    void     GetValues(AliHBTPair* pair, Double_t& x, Double_t& y, Double_t& z) const ;
45    
46    Double_t GetModelValue(Double_t qout, Double_t qside, Double_t qlong) const;
47    
48    
49   protected:
50
51     void BuildHistos(Int_t nxbins, Float_t xmax, Float_t xmin,
52                      Int_t nybins, Float_t ymax, Float_t ymin,
53          Int_t nzbins, Float_t zmax, Float_t zmin);
54
55     TH3F* fMeasCorrelFctn; //!Measured correlation function
56     
57     TH3F* fSmearedNumer; //! Numerator of smeard q
58     TH3F* fSmearedDenom; //! Denominator of smeard q
59     TH3F* fMeasNumer;  //! Numerator of ideal q calculated on basis of model equation
60     TH3F* fMeasDenom;  //! Denominator of ideal q calculated on basis of model equation
61
62     Double_t fLambda;
63     Double_t fROutSq;
64     Double_t fRSideSq;
65     Double_t fRLongSq;
66     
67   private:
68   
69     ClassDef(AliHBTCorrectOSLCorrelFctn,1)
70 };
71
72 inline Double_t AliHBTCorrectOSLCorrelFctn::GetModelValue(Double_t qout, Double_t qside, Double_t qlong) const
73 {
74  //returns model value of the cf
75   return 1.0 + fLambda*TMath::Exp(( fROutSq*qout*qout + fRSideSq*qside*qside + fRLongSq*qlong*qlong) / (-0.038936366329));
76 }
77
78 #endif