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. //
8 // Authors: Adam Kisiel kisiel@mps.ohio-state.edu //
10 ////////////////////////////////////////////////////////////////////////////////
11 #ifndef ALIFEMTOCORRFCTNDIRECTYLM_H
12 #define ALIFEMTOCORRFCTNDIRECTYLM_H
19 #include "AliFemtoCorrFctn.h"
20 #include "AliFemtoYlm.h"
24 class AliFemtoCorrFctnDirectYlm: public AliFemtoCorrFctn {
26 AliFemtoCorrFctnDirectYlm();
27 AliFemtoCorrFctnDirectYlm(const char *name, int maxl, int ibin, double vmin, double vmax);
28 AliFemtoCorrFctnDirectYlm(const AliFemtoCorrFctnDirectYlm& aCorrFctn);
29 ~AliFemtoCorrFctnDirectYlm();
31 AliFemtoCorrFctnDirectYlm& operator=(const AliFemtoCorrFctnDirectYlm& aCorrFctn);
33 void AddRealPair(double *qvec, double weight=1.0);
34 void AddMixedPair(double *qvec, double weight=1.0);
36 void AddRealPair(double qout, double qside, double qlong, double weight=1.0);
37 void AddMixedPair(double qout, double qside, double qlong, double weight=1.0);
39 virtual AliFemtoString Report();
41 virtual void AddRealPair(AliFemtoPair* aPair);
42 virtual void AddMixedPair(AliFemtoPair* aPair);
44 virtual void Finish();
45 virtual TList* GetOutputList();
49 void ReadFromFile(TFile *infile, const char *name, int maxl);
51 TH1D *GetNumRealHist(int el, int em);
52 TH1D *GetNumImagHist(int el, int em);
54 TH1D *GetDenRealHist(int el, int em);
55 TH1D *GetDenImagHist(int el, int em);
58 double ClebschGordan(double aJot1, double aEm1, double aJot2, double aEm2, double aJot, double aEm);
59 double DeltaJ(double aJot1, double aJot2, double aJot);
60 double WignerSymbol(double aJot1, double aEm1, double aJot2, double aEm2, double aJot, double aEm);
62 void GetMtilde(complex<double>* aMat, double *aMTilde);
65 void GetElEmForIndex(int aIndex, double *aEl, double *aEm) const;
66 void GetElEmForIndex(int aIndex, int *aEl, int *aEm) const;
67 int GetBin(int qbin, int ilmzero, int zeroimag, int ilmprim, int primimag);
69 int PackYlmVector(const double *invec, double *outvec);
70 int PackYlmMatrix(const double *inmat, double *outmat);
72 int GetIndexForLM(int el, int em) const;
74 void PackCovariances();
75 void UnpackCovariances();
77 TH1D **fnumsreal; // Real parts of Ylm components of the numerator
78 TH1D **fnumsimag; // Imaginary parts of Ylm components of the numerator
79 TH1D **fdensreal; // Real parts of Ylm components of the denominator
80 TH1D **fdensimag; // Imaginary parts of Ylm components of the denominator
82 TH1D *fbinctn; // Bin occupation for the numerator
83 TH1D *fbinctd; // Bin occupation for the denominator
85 TH3D *fcovnum; // Numerator covariance matrix packed into TH3D
86 TH3D *fcovden; // Denominator covariance matrix packed into TH3D
88 double *fcovmnum; // Covariance matrix for the numerator
89 double *fcovmden; // Covariance matrix for the denominator
91 int fMaxL; // l cut-off of the decomposition
93 int fMaxJM; // number of l-m combinations
94 double *fels; // table of l's
95 double *fems; // table of m's
96 int *felsi; // table of integer l's
97 int *femsi; // table of integer m's
99 complex<double> *fYlmBuffer; // buffer for ylm calculation
100 double *factorials; // Helper table of factorials
102 double fSout; // Save last calculated qout
103 double fSside; // Save last calculated qside
104 double fSlong; // Save last calculated qlong