1 ////////////////////////////////////////////////////////////////////////////////
3 // AliFemtoCorrFctnNonIdDR - correlation function for non-identical particles //
4 // uses k* as a function variable. Stores the correlation function separately //
5 // for positive and negative signs of k* projections into out, side and long //
6 // directions, enabling the calculations of double ratios //
8 ////////////////////////////////////////////////////////////////////////////////
10 #include "AliFemtoCorrFctnNonIdDR.h"
11 //#include "AliFemtoHisto.h"
15 ClassImp(AliFemtoCorrFctnNonIdDR)
18 //____________________________
19 AliFemtoCorrFctnNonIdDR::AliFemtoCorrFctnNonIdDR(char* title, const int& nbins, const float& QinvLo, const float& QinvHi):
33 // Default constructor
36 snprintf(bufname, 200, "NumOutP%s", title);
37 fNumOutP = new TH1D(bufname,title,nbins,QinvLo,QinvHi);
38 snprintf(bufname, 200, "NumOutN%s", title);
39 fNumOutN = new TH1D(bufname,title,nbins,QinvLo,QinvHi);
40 snprintf(bufname, 200, "NumSideP%s", title);
41 fNumSideP = new TH1D(bufname,title,nbins,QinvLo,QinvHi);
42 snprintf(bufname, 200, "NumSideN%s", title);
43 fNumSideN = new TH1D(bufname,title,nbins,QinvLo,QinvHi);
44 snprintf(bufname, 200, "NumLongP%s", title);
45 fNumLongP = new TH1D(bufname,title,nbins,QinvLo,QinvHi);
46 snprintf(bufname, 200, "NumLongN%s", title);
47 fNumLongN = new TH1D(bufname,title,nbins,QinvLo,QinvHi);
49 // set up denominators
50 snprintf(bufname, 200, "DenOutP%s", title);
51 fDenOutP = new TH1D(bufname,title,nbins,QinvLo,QinvHi);
52 snprintf(bufname, 200, "DenOutN%s", title);
53 fDenOutN = new TH1D(bufname,title,nbins,QinvLo,QinvHi);
54 snprintf(bufname, 200, "DenSideP%s", title);
55 fDenSideP = new TH1D(bufname,title,nbins,QinvLo,QinvHi);
56 snprintf(bufname, 200, "DenSideN%s", title);
57 fDenSideN = new TH1D(bufname,title,nbins,QinvLo,QinvHi);
58 snprintf(bufname, 200, "DenLongP%s", title);
59 fDenLongP = new TH1D(bufname,title,nbins,QinvLo,QinvHi);
60 snprintf(bufname, 200, "DenLongN%s", title);
61 fDenLongN = new TH1D(bufname,title,nbins,QinvLo,QinvHi);
63 // to enable error bar calculation...
78 //____________________________
79 AliFemtoCorrFctnNonIdDR::AliFemtoCorrFctnNonIdDR(const AliFemtoCorrFctnNonIdDR& aCorrFctn) :
94 if (aCorrFctn.fNumOutP)
95 fNumOutP = new TH1D(*aCorrFctn.fNumOutP);
96 if (aCorrFctn.fNumOutN)
97 fNumOutN = new TH1D(*aCorrFctn.fNumOutN);
98 if (aCorrFctn.fNumSideP)
99 fNumSideP = new TH1D(*aCorrFctn.fNumSideP);
100 if (aCorrFctn.fNumSideN)
101 fNumSideN = new TH1D(*aCorrFctn.fNumSideN);
102 if (aCorrFctn.fNumLongP)
103 fNumLongP = new TH1D(*aCorrFctn.fNumLongP);
104 if (aCorrFctn.fNumLongN)
105 fNumLongN = new TH1D(*aCorrFctn.fNumLongN);
107 if (aCorrFctn.fDenOutP)
108 fDenOutP = new TH1D(*aCorrFctn.fDenOutP);
109 if (aCorrFctn.fDenOutN)
110 fDenOutN = new TH1D(*aCorrFctn.fDenOutN);
111 if (aCorrFctn.fDenSideP)
112 fDenSideP = new TH1D(*aCorrFctn.fDenSideP);
113 if (aCorrFctn.fDenSideN)
114 fDenSideN = new TH1D(*aCorrFctn.fDenSideN);
115 if (aCorrFctn.fDenLongP)
116 fDenLongP = new TH1D(*aCorrFctn.fDenLongP);
117 if (aCorrFctn.fDenLongN)
118 fDenLongN = new TH1D(*aCorrFctn.fDenLongN);
120 //____________________________
121 AliFemtoCorrFctnNonIdDR::~AliFemtoCorrFctnNonIdDR(){
135 //_________________________
136 AliFemtoCorrFctnNonIdDR& AliFemtoCorrFctnNonIdDR::operator=(const AliFemtoCorrFctnNonIdDR& aCorrFctn)
138 // assignment operator
139 if (this == &aCorrFctn)
142 if (aCorrFctn.fNumOutP)
143 fNumOutP = new TH1D(*aCorrFctn.fNumOutP);
144 if (aCorrFctn.fNumOutN)
145 fNumOutN = new TH1D(*aCorrFctn.fNumOutN);
146 if (aCorrFctn.fNumSideP)
147 fNumSideP = new TH1D(*aCorrFctn.fNumSideP);
148 if (aCorrFctn.fNumSideN)
149 fNumSideN = new TH1D(*aCorrFctn.fNumSideN);
150 if (aCorrFctn.fNumLongP)
151 fNumLongP = new TH1D(*aCorrFctn.fNumLongP);
152 if (aCorrFctn.fNumLongN)
153 fNumLongN = new TH1D(*aCorrFctn.fNumLongN);
155 if (aCorrFctn.fDenOutP)
156 fDenOutP = new TH1D(*aCorrFctn.fDenOutP);
157 if (aCorrFctn.fDenOutN)
158 fDenOutN = new TH1D(*aCorrFctn.fDenOutN);
159 if (aCorrFctn.fDenSideP)
160 fDenSideP = new TH1D(*aCorrFctn.fDenSideP);
161 if (aCorrFctn.fDenSideN)
162 fDenSideN = new TH1D(*aCorrFctn.fDenSideN);
163 if (aCorrFctn.fDenLongP)
164 fDenLongP = new TH1D(*aCorrFctn.fDenLongP);
165 if (aCorrFctn.fDenLongN)
166 fDenLongN = new TH1D(*aCorrFctn.fDenLongN);
171 //_________________________
172 void AliFemtoCorrFctnNonIdDR::Finish(){
173 // here is where we should normalize, fit, etc...
174 // we should NOT Draw() the histos (as I had done it below),
175 // since we want to insulate ourselves from root at this level
176 // of the code. Do it instead at root command line with browser.
177 // fNumerator->Draw();
178 //fDenominator->Draw();
180 // fRatio->Divide(fNumerator,fDenominator,1.0,1.0);
184 //____________________________
185 AliFemtoString AliFemtoCorrFctnNonIdDR::Report(){
187 string stemp = "Non-identical particles Correlation Function Report:\n";
189 sprintf(ctemp,"Number of entries in numerators:\t%E\n",fNumOutP->GetEntries()+fNumOutN->GetEntries());
191 sprintf(ctemp,"Number of entries in denominators:\t%E\n",fDenOutP->GetEntries()+fDenOutN->GetEntries());
193 // stemp += mCoulombWeight->Report();
194 AliFemtoString returnThis = stemp;
197 //____________________________
198 void AliFemtoCorrFctnNonIdDR::AddRealPair(AliFemtoPair* pair){
200 double tKStar = pair->KStar();
201 if (pair->KOut()>0.0)
202 fNumOutP->Fill(tKStar);
204 fNumOutN->Fill(tKStar);
206 if (pair->KSide()>0.0)
207 fNumSideP->Fill(tKStar);
209 fNumSideN->Fill(tKStar);
211 if (pair->KLong()>0.0)
212 fNumLongP->Fill(tKStar);
214 fNumLongN->Fill(tKStar);
217 //____________________________
218 void AliFemtoCorrFctnNonIdDR::AddMixedPair(AliFemtoPair* pair){
219 // add mixed (background) pair
220 double tKStar = pair->KStar();
221 if (pair->KOut()>0.0)
222 fDenOutP->Fill(tKStar);
224 fDenOutN->Fill(tKStar);
226 if (pair->KSide()>0.0)
227 fDenSideP->Fill(tKStar);
229 fDenSideN->Fill(tKStar);
231 if (pair->KLong()>0.0)
232 fDenLongP->Fill(tKStar);
234 fDenLongN->Fill(tKStar);
236 //____________________________
237 void AliFemtoCorrFctnNonIdDR::Write(){
252 TList* AliFemtoCorrFctnNonIdDR::GetOutputList()
254 // Prepare the list of objects to be written to the output
255 TList *tOutputList = new TList();
257 tOutputList->Add(fNumOutP);
258 tOutputList->Add(fNumOutN);
259 tOutputList->Add(fNumSideP);
260 tOutputList->Add(fNumSideN);
261 tOutputList->Add(fNumLongP);
262 tOutputList->Add(fNumLongN);
263 tOutputList->Add(fDenOutP);
264 tOutputList->Add(fDenOutN);
265 tOutputList->Add(fDenSideP);
266 tOutputList->Add(fDenSideN);
267 tOutputList->Add(fDenLongP);
268 tOutputList->Add(fDenLongN);