Q transverse correlation function added
[u/mrichter/AliRoot.git] / HBTAN / AliHBTCorrelFctn.cxx
CommitLineData
1b446896 1#include "AliHBTCorrelFctn.h"
db21c92b 2//____________________________________________________________________________
3//////////////////////////////////////////////////////////////////////////////
953577f3 4//
db21c92b 5// class AliHBTQInvCorrelFctn
78d7c6d3 6// class AliHBTQOutLCMSCorrelFctn
7// class AliHBTQLongLCMSCorrelFctn
8// class AliHBTQSideLCMSCorrelFctn
db21c92b 9// class AliHBTInvMassCorrelFctn
10// class AliHBTTwoKStarCorrelFctn
953577f3 11//
db21c92b 12// Set of functions:
13// Q Invaraint Correlation Function
14// Invariant Mass Function
953577f3 15//
db21c92b 16// more info: http://aliweb.cern.ch/people/skowron/analyzer/index.html
17// Piotr.Skowronski@cern.ch
18//
19//////////////////////////////////////////////////////////////////////////////
1b446896 20
21ClassImp(AliHBTQInvCorrelFctn)
22
88cb7938 23//Corroleation function is created from dividing two histograms of QInvariant:
24// of particles from the same evnt
25//by
26// of particles from different events
1b446896 27
e6e21fa2 28AliHBTQInvCorrelFctn::AliHBTQInvCorrelFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
29 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
953577f3 30{
e6e21fa2 31 fWriteNumAndDen = kTRUE;//change default behaviour
953577f3 32 Rename("qinvcf","Q_{inv} Correlation Function");
33}
e6e21fa2 34/*************************************************************************************/
953577f3 35
1b446896 36TH1* AliHBTQInvCorrelFctn::GetResult()
fc13079c 37{
38 //returns the scaled ratio
39 delete fRatio;
40 fRatio = GetRatio(Scale());
41 return fRatio;
953577f3 42}
43/*************************************************************************************/
44/*************************************************************************************/
45/*************************************************************************************/
46
3cc1fefe 47ClassImp(AliHBTOutSideLongFctn)
48
49AliHBTOutSideLongFctn::AliHBTOutSideLongFctn(Int_t nXbins, Double_t maxXval, Double_t minXval,
50 Int_t nYbins, Double_t maxYval, Double_t minYval,
51 Int_t nZbins, Double_t maxZval, Double_t minZval):
ed3b923a 52 AliHBTOnePairFctn3D(nXbins,maxXval,minXval,nYbins,maxYval,minYval,nZbins,maxZval,minZval),
53 fAbs(kTRUE)
3cc1fefe 54{
f78d233e 55//ctor
3cc1fefe 56 fWriteNumAndDen = kTRUE;//change default behaviour
57 Rename("qoslcf","Q_{out}-Q_{side}-Q_{long} Correlation Fctn");
58}
f78d233e 59/*************************************************************************************/
3cc1fefe 60
f78d233e 61TH1* AliHBTOutSideLongFctn::GetResult()
62{
63 //returns the scaled ratio
64 delete fRatio;
65 fRatio = GetRatio(Scale());
66 return fRatio;
67}
ed3b923a 68
69void AliHBTOutSideLongFctn::GetValues(AliHBTPair* pair, Double_t& x, Double_t& y, Double_t& z) const
70{
71 //calculates values of that function
72 //qout qside and qlong
73
78d7c6d3 74 x=pair->GetQOutLCMS();
75 y=pair->GetQSideLCMS();
76 z=pair->GetQLongLCMS();
ed3b923a 77 if (fAbs)
78 {
79 x = TMath::Abs(x);
80 y = TMath::Abs(y);
81 z = TMath::Abs(z);
82 }
83}
84
3cc1fefe 85/*************************************************************************************/
86
78d7c6d3 87ClassImp(AliHBTQOutLCMSCorrelFctn)
e6e21fa2 88
78d7c6d3 89AliHBTQOutLCMSCorrelFctn::AliHBTQOutLCMSCorrelFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
e6e21fa2 90 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
91{
92 //ctor
93 fWriteNumAndDen = kTRUE;//change default behaviour
94 Rename("qoutcf","Q_{out} Correlation Function");
95}
96/*************************************************************************************/
97
78d7c6d3 98TH1* AliHBTQOutLCMSCorrelFctn::GetResult()
1b446896 99{
fc13079c 100 //returns the scaled ratio
101 delete fRatio;
102 fRatio = GetRatio(Scale());
103 return fRatio;
1b446896 104}
953577f3 105/*************************************************************************************/
106/*************************************************************************************/
107/*************************************************************************************/
108
78d7c6d3 109ClassImp(AliHBTQLongLCMSCorrelFctn)
e6e21fa2 110
78d7c6d3 111AliHBTQLongLCMSCorrelFctn::AliHBTQLongLCMSCorrelFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
e6e21fa2 112 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
113{
114 //ctor
115 fWriteNumAndDen = kTRUE;//change default behaviour
116 Rename("qlongcf","Q_{long} Correlation Function");
117}
118/*************************************************************************************/
119
78d7c6d3 120TH1* AliHBTQLongLCMSCorrelFctn::GetResult()
953577f3 121{
fc13079c 122 //returns the scaled ratio
123 delete fRatio;
124 fRatio = GetRatio(Scale());
125 return fRatio;
953577f3 126}
127/*************************************************************************************/
128/*************************************************************************************/
129/*************************************************************************************/
130
78d7c6d3 131ClassImp(AliHBTQSideLCMSCorrelFctn)
e6e21fa2 132
78d7c6d3 133AliHBTQSideLCMSCorrelFctn::AliHBTQSideLCMSCorrelFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
e6e21fa2 134 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
135{
136 //ctor
137 fWriteNumAndDen = kTRUE;//change default behaviour
138 Rename("qsidecf","Q_{side} Correlation Function");
139}
140/*************************************************************************************/
141
78d7c6d3 142TH1* AliHBTQSideLCMSCorrelFctn::GetResult()
953577f3 143{
fc13079c 144 //returns the scaled ratio
145 delete fRatio;
146 fRatio = GetRatio(Scale());
147 return fRatio;
953577f3 148}
149
1b446896 150
953577f3 151/*************************************************************************************/
152/*************************************************************************************/
153/*************************************************************************************/
98bc79ce 154ClassImp(AliHBTQtLCMSCorrelFctn)
155
156AliHBTQtLCMSCorrelFctn::AliHBTQtLCMSCorrelFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
157 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
158{
159 //ctor
160 fWriteNumAndDen = kTRUE;//change default behaviour
161 Rename("Qtcf","Q_{long} Correlation Function");
162}
163/*************************************************************************************/
164
165TH1* AliHBTQtLCMSCorrelFctn::GetResult()
166{
167 //returns the scaled ratio
168 delete fRatio;
169 fRatio = GetRatio(Scale());
170 return fRatio;
171}
172/*************************************************************************************/
173/*************************************************************************************/
174/*************************************************************************************/
1b446896 175
176ClassImp(AliHBTInvMassCorrelFctn)
177
e6e21fa2 178AliHBTInvMassCorrelFctn::AliHBTInvMassCorrelFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
179 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
1b446896 180{
e6e21fa2 181 //ctor
182 fWriteNumAndDen = kTRUE;//change default behaviour
183 Rename("InvMass CF","Invariant Mass Correlation Function");
1b446896 184}
185
186TH1* AliHBTInvMassCorrelFctn::GetResult()
187{
e6e21fa2 188 //returns result
fc13079c 189 return GetNumerator();
1b446896 190}
4866a439 191/*************************************************************************************/
192/*************************************************************************************/
193/*************************************************************************************/
194
195ClassImp(AliHBTTwoKStarCorrelFctn)
196
e6e21fa2 197AliHBTTwoKStarCorrelFctn::AliHBTTwoKStarCorrelFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
198 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
4866a439 199{
e6e21fa2 200 //ctor
201 fWriteNumAndDen = kTRUE;//change default behaviour
4866a439 202 Rename("twokstarcf","2K^{*} Correlation Function");
203}
204
205/*************************************************************************************/
206
207TH1* AliHBTTwoKStarCorrelFctn::GetResult()
208{
fc13079c 209 //returns the scaled ratio
210 delete fRatio;
211 fRatio = GetRatio(Scale());
212 return fRatio;
4866a439 213}
214
215/*************************************************************************************/
087f87e7 216/*************************************************************************************/
217/*************************************************************************************/
218ClassImp(AliHBTAvSeparCorrelFctn)
219
220AliHBTAvSeparCorrelFctn::AliHBTAvSeparCorrelFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
221 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
222{
223 //ctor
224 fWriteNumAndDen = kTRUE;//change default behaviour
225 Rename("avsepcf","Avarage separation Correlation Function");
226}
227
228/*************************************************************************************/
229
230TH1* AliHBTAvSeparCorrelFctn::GetResult()
231{
232 //returns the scaled ratio
233 delete fRatio;
234 fRatio = GetRatio(Scale());
235 return fRatio;
236}
237
238/*************************************************************************************/