Added preprocessor conditionals to support ROOT > 5.11.2.
[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):
a296aa84 52 AliHBTOnePairFctn3D(nXbins,maxXval,minXval,nYbins,maxYval,minYval,nZbins,maxZval,minZval)
3cc1fefe 53{
f78d233e 54//ctor
3cc1fefe 55 fWriteNumAndDen = kTRUE;//change default behaviour
56 Rename("qoslcf","Q_{out}-Q_{side}-Q_{long} Correlation Fctn");
57}
f78d233e 58/*************************************************************************************/
3cc1fefe 59
f78d233e 60TH1* AliHBTOutSideLongFctn::GetResult()
61{
62 //returns the scaled ratio
63 delete fRatio;
64 fRatio = GetRatio(Scale());
65 return fRatio;
66}
ed3b923a 67
68void AliHBTOutSideLongFctn::GetValues(AliHBTPair* pair, Double_t& x, Double_t& y, Double_t& z) const
69{
70 //calculates values of that function
71 //qout qside and qlong
72
78d7c6d3 73 x=pair->GetQOutLCMS();
74 y=pair->GetQSideLCMS();
75 z=pair->GetQLongLCMS();
ed3b923a 76 if (fAbs)
77 {
78 x = TMath::Abs(x);
79 y = TMath::Abs(y);
80 z = TMath::Abs(z);
81 }
82}
83
3cc1fefe 84/*************************************************************************************/
85
78d7c6d3 86ClassImp(AliHBTQOutLCMSCorrelFctn)
e6e21fa2 87
78d7c6d3 88AliHBTQOutLCMSCorrelFctn::AliHBTQOutLCMSCorrelFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
e6e21fa2 89 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
90{
91 //ctor
92 fWriteNumAndDen = kTRUE;//change default behaviour
93 Rename("qoutcf","Q_{out} Correlation Function");
94}
95/*************************************************************************************/
96
78d7c6d3 97TH1* AliHBTQOutLCMSCorrelFctn::GetResult()
1b446896 98{
fc13079c 99 //returns the scaled ratio
100 delete fRatio;
101 fRatio = GetRatio(Scale());
102 return fRatio;
1b446896 103}
953577f3 104/*************************************************************************************/
105/*************************************************************************************/
106/*************************************************************************************/
107
78d7c6d3 108ClassImp(AliHBTQLongLCMSCorrelFctn)
e6e21fa2 109
78d7c6d3 110AliHBTQLongLCMSCorrelFctn::AliHBTQLongLCMSCorrelFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
e6e21fa2 111 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
112{
113 //ctor
114 fWriteNumAndDen = kTRUE;//change default behaviour
115 Rename("qlongcf","Q_{long} Correlation Function");
116}
117/*************************************************************************************/
118
78d7c6d3 119TH1* AliHBTQLongLCMSCorrelFctn::GetResult()
953577f3 120{
fc13079c 121 //returns the scaled ratio
122 delete fRatio;
123 fRatio = GetRatio(Scale());
124 return fRatio;
953577f3 125}
126/*************************************************************************************/
127/*************************************************************************************/
128/*************************************************************************************/
129
78d7c6d3 130ClassImp(AliHBTQSideLCMSCorrelFctn)
e6e21fa2 131
78d7c6d3 132AliHBTQSideLCMSCorrelFctn::AliHBTQSideLCMSCorrelFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
e6e21fa2 133 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
134{
135 //ctor
136 fWriteNumAndDen = kTRUE;//change default behaviour
137 Rename("qsidecf","Q_{side} Correlation Function");
138}
139/*************************************************************************************/
140
78d7c6d3 141TH1* AliHBTQSideLCMSCorrelFctn::GetResult()
953577f3 142{
fc13079c 143 //returns the scaled ratio
144 delete fRatio;
145 fRatio = GetRatio(Scale());
146 return fRatio;
953577f3 147}
148
1b446896 149
953577f3 150/*************************************************************************************/
151/*************************************************************************************/
152/*************************************************************************************/
98bc79ce 153ClassImp(AliHBTQtLCMSCorrelFctn)
154
155AliHBTQtLCMSCorrelFctn::AliHBTQtLCMSCorrelFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
156 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
157{
158 //ctor
159 fWriteNumAndDen = kTRUE;//change default behaviour
00aa96f1 160 Rename("Qtcf","Q_{t}(LCMS) Correlation Function");
98bc79ce 161}
162/*************************************************************************************/
163
164TH1* AliHBTQtLCMSCorrelFctn::GetResult()
165{
166 //returns the scaled ratio
167 delete fRatio;
168 fRatio = GetRatio(Scale());
169 return fRatio;
170}
171/*************************************************************************************/
172/*************************************************************************************/
173/*************************************************************************************/
00aa96f1 174ClassImp(AliHBTQtCorrelFctn)
175
176AliHBTQtCorrelFctn::AliHBTQtCorrelFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
177 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
178{
179 //ctor
180 fWriteNumAndDen = kTRUE;//change default behaviour
181 Rename("qtcf","Q_{t} Correlation Function");
182}
183/*************************************************************************************/
184
185TH1* AliHBTQtCorrelFctn::GetResult()
186{
187 //returns the scaled ratio
188 delete fRatio;
189 fRatio = GetRatio(Scale());
190 return fRatio;
191}
192/*************************************************************************************/
193/*************************************************************************************/
194/*************************************************************************************/
1b446896 195
196ClassImp(AliHBTInvMassCorrelFctn)
197
e6e21fa2 198AliHBTInvMassCorrelFctn::AliHBTInvMassCorrelFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
199 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
1b446896 200{
e6e21fa2 201 //ctor
202 fWriteNumAndDen = kTRUE;//change default behaviour
203 Rename("InvMass CF","Invariant Mass Correlation Function");
1b446896 204}
205
206TH1* AliHBTInvMassCorrelFctn::GetResult()
207{
e6e21fa2 208 //returns result
fc13079c 209 return GetNumerator();
1b446896 210}
4866a439 211/*************************************************************************************/
212/*************************************************************************************/
213/*************************************************************************************/
214
215ClassImp(AliHBTTwoKStarCorrelFctn)
216
e6e21fa2 217AliHBTTwoKStarCorrelFctn::AliHBTTwoKStarCorrelFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
218 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
4866a439 219{
e6e21fa2 220 //ctor
221 fWriteNumAndDen = kTRUE;//change default behaviour
4866a439 222 Rename("twokstarcf","2K^{*} Correlation Function");
223}
224
225/*************************************************************************************/
226
227TH1* AliHBTTwoKStarCorrelFctn::GetResult()
228{
fc13079c 229 //returns the scaled ratio
230 delete fRatio;
231 fRatio = GetRatio(Scale());
232 return fRatio;
4866a439 233}
234
235/*************************************************************************************/
087f87e7 236/*************************************************************************************/
237/*************************************************************************************/
238ClassImp(AliHBTAvSeparCorrelFctn)
239
240AliHBTAvSeparCorrelFctn::AliHBTAvSeparCorrelFctn(Int_t nbins, Double_t maxXval, Double_t minXval):
241 AliHBTOnePairFctn1D(nbins,maxXval,minXval)
242{
243 //ctor
244 fWriteNumAndDen = kTRUE;//change default behaviour
245 Rename("avsepcf","Avarage separation Correlation Function");
246}
247
248/*************************************************************************************/
249
250TH1* AliHBTAvSeparCorrelFctn::GetResult()
251{
252 //returns the scaled ratio
253 delete fRatio;
254 fRatio = GetRatio(Scale());
255 return fRatio;
256}
257
258/*************************************************************************************/
a296aa84 259
260ClassImp(AliHBTAvSeparVsQInvCorrelFctn)
261
262AliHBTAvSeparVsQInvCorrelFctn::AliHBTAvSeparVsQInvCorrelFctn(Int_t nXbins, Double_t maxXval, Double_t minXval,
263 Int_t nYbins, Double_t maxYval, Double_t minYval):
264 AliHBTOnePairFctn2D(nXbins,maxXval,minXval,nYbins,maxYval,minYval)
265{
266 //ctor
267 fWriteNumAndDen = kTRUE;//change default behaviour
268 Rename("avsepvsqinv","Avarage Separation VS Q_{inv} Correlation Function");
269}
270
271
272TH1* AliHBTAvSeparVsQInvCorrelFctn::GetResult()
273{
274 //returns the scaled ratio
275 delete fRatio;
276 fRatio = GetRatio(Scale());
277 return fRatio;
278}
279
280/**************************************************************/
281/**************************************************************/
282/**************************************************************/
283
284
285ClassImp(AliHBTQOutQSideFctn)
286
287
288AliHBTQOutQSideFctn::AliHBTQOutQSideFctn(Int_t nxbins, Double_t maxXval, Double_t minXval,
289 Int_t nybins, Double_t maxYval, Double_t minYval):
290 AliHBTOnePairFctn2D(nxbins,maxXval,minXval,nybins,maxYval,minYval)
291{
292 //ctor
293 fWriteNumAndDen = kTRUE;//change default behaviour
294 Rename("qoutqsidecf","Q_{out} Q_{side} Correlation Function 2D");
295}
296/**************************************************************/
297
298TH1* AliHBTQOutQSideFctn::GetResult()
299{
300 //returns the scaled ratio
301 delete fRatio;
302 fRatio = GetRatio(Scale());
303 return fRatio;
304}
305/**************************************************************/
306/**************************************************************/
307
308ClassImp(AliHBTQOutQLongFctn)
309
310AliHBTQOutQLongFctn::AliHBTQOutQLongFctn(Int_t nxbins, Double_t maxXval, Double_t minXval,
311 Int_t nybins, Double_t maxYval, Double_t minYval):
312 AliHBTOnePairFctn2D(nxbins,maxXval,minXval,nybins,maxYval,minYval)
313{
314 //ctor
315 fWriteNumAndDen = kTRUE;//change default behaviour
316 Rename("qoutqlongcf","Q_{out} Q_{long} Correlation Function 2D");
317}
318
319
320/**************************************************************/
321
322TH1* AliHBTQOutQLongFctn::GetResult()
323{
324 //returns the scaled ratio
325 delete fRatio;
326 fRatio = GetRatio(Scale());
327 return fRatio;
328}
329/**************************************************************/
330/**************************************************************/
331/**************************************************************/
332
333ClassImp(AliHBTQSideQLongFctn)
334
335/**************************************************************/
336AliHBTQSideQLongFctn::AliHBTQSideQLongFctn(Int_t nxbins, Double_t maxXval, Double_t minXval,
337 Int_t nybins, Double_t maxYval, Double_t minYval):
338 AliHBTOnePairFctn2D(nxbins,maxXval,minXval,nybins,maxYval,minYval)
339{
340 //ctor
341 fWriteNumAndDen = kTRUE;//change default behaviour
342 Rename("qsideqlongcf","Q_{side} Q_{long} Correlation Function 2D");
343}
344
345TH1* AliHBTQSideQLongFctn::GetResult()
346{
347 //returns the scaled ratio
348 delete fRatio;
349 fRatio = GetRatio(Scale());
350 return fRatio;
351}