1 ////////////////////////////////////////////////////////////////////////////////
3 // AliFemtoCorrFctnDirectYlm - Correlation function that is binned in Ylms //
4 // directly. Provides a way to store the numerator and denominator //
5 // in Ylms directly and correctly calculate the correlation //
6 // function from them. //
7 // Added the option to use q components in LCMS for identical particles //
9 // Authors: Adam Kisiel kisiel@mps.ohio-state.edu //
11 ////////////////////////////////////////////////////////////////////////////////
12 #ifndef ALIFEMTOCORRFCTNDIRECTYLM_H
13 #define ALIFEMTOCORRFCTNDIRECTYLM_H
20 #include "AliFemtoCorrFctn.h"
21 #include "AliFemtoYlm.h"
22 #include "AliFemtoPairCut.h"
26 class AliFemtoCorrFctnDirectYlm: public AliFemtoCorrFctn {
28 AliFemtoCorrFctnDirectYlm();
29 AliFemtoCorrFctnDirectYlm(const char *name, int maxl, int ibin, double vmin, double vmax, int aUseLCMS);
30 AliFemtoCorrFctnDirectYlm(const AliFemtoCorrFctnDirectYlm& aCorrFctn);
31 ~AliFemtoCorrFctnDirectYlm();
33 AliFemtoCorrFctnDirectYlm& operator=(const AliFemtoCorrFctnDirectYlm& aCorrFctn);
35 void AddRealPair(double *qvec, double weight=1.0);
36 void AddMixedPair(double *qvec, double weight=1.0);
38 void AddRealPair(double qout, double qside, double qlong, double weight=1.0);
39 void AddMixedPair(double qout, double qside, double qlong, double weight=1.0);
41 virtual AliFemtoString Report();
43 virtual void AddRealPair(AliFemtoPair* aPair);
44 virtual void AddMixedPair(AliFemtoPair* aPair);
46 virtual void Finish();
47 virtual TList* GetOutputList();
51 void ReadFromFile(TFile *infile, const char *name, int maxl);
53 TH1D *GetNumRealHist(int el, int em);
54 TH1D *GetNumImagHist(int el, int em);
56 TH1D *GetDenRealHist(int el, int em);
57 TH1D *GetDenImagHist(int el, int em);
59 void SetUseLCMS(int aUseLCMS);
63 double ClebschGordan(double aJot1, double aEm1, double aJot2, double aEm2, double aJot, double aEm);
64 double DeltaJ(double aJot1, double aJot2, double aJot);
65 double WignerSymbol(double aJot1, double aEm1, double aJot2, double aEm2, double aJot, double aEm);
67 void GetMtilde(complex<double>* aMat, double *aMTilde);
70 void GetElEmForIndex(int aIndex, double *aEl, double *aEm) const;
71 void GetElEmForIndex(int aIndex, int *aEl, int *aEm) const;
72 int GetBin(int qbin, int ilmzero, int zeroimag, int ilmprim, int primimag);
74 int PackYlmVector(const double *invec, double *outvec);
75 int PackYlmMatrix(const double *inmat, double *outmat);
77 int GetIndexForLM(int el, int em) const;
79 void PackCovariances();
80 void UnpackCovariances();
82 TH1D **fnumsreal; // Real parts of Ylm components of the numerator
83 TH1D **fnumsimag; // Imaginary parts of Ylm components of the numerator
84 TH1D **fdensreal; // Real parts of Ylm components of the denominator
85 TH1D **fdensimag; // Imaginary parts of Ylm components of the denominator
87 TH1D *fbinctn; // Bin occupation for the numerator
88 TH1D *fbinctd; // Bin occupation for the denominator
90 TH3D *fcovnum; // Numerator covariance matrix packed into TH3D
91 TH3D *fcovden; // Denominator covariance matrix packed into TH3D
93 double *fcovmnum; // Covariance matrix for the numerator
94 double *fcovmden; // Covariance matrix for the denominator
96 int fMaxL; // l cut-off of the decomposition
98 int fMaxJM; // number of l-m combinations
99 double *fels; // table of l's
100 double *fems; // table of m's
101 int *felsi; // table of integer l's
102 int *femsi; // table of integer m's
104 complex<double> *fYlmBuffer; // buffer for ylm calculation
105 double *factorials; // Helper table of factorials
107 double fSout; // Save last calculated qout
108 double fSside; // Save last calculated qside
109 double fSlong; // Save last calculated qlong
111 int fUseLCMS; // 0 - Use PRF, 1 - Use LCMS