]>
Commit | Line | Data |
---|---|---|
76ce4b5b | 1 | /*************************************************************************** |
2 | * | |
3 | * $Id: AliFemtoQinvCorrFctnEMCIC.cxx $ | |
4 | * | |
5 | * Author: Nicolas Bock, Ohio State University, bock@mps.ohio-state.edu | |
6 | *************************************************************************** | |
7 | * | |
8 | * Description: Calculates of the Qinv Correlation Function, and also | |
9 | * produces histograms to calculate EMCICs | |
10 | * | |
11 | *************************************************************************** | |
12 | * | |
13 | **************************************************************************/ | |
14 | ||
15 | ||
16 | #include "AliFemtoQinvCorrFctnEMCIC.h" | |
17 | //#include "AliFemtoHisto.h" | |
18 | #include <cstdio> | |
19 | #include <TVector2.h> | |
20 | ||
21 | #ifdef __ROOT__ | |
22 | ClassImp(AliFemtoQinvCorrFctnEMCIC) | |
23 | #endif | |
24 | ||
25 | //____________________________ | |
26 | AliFemtoQinvCorrFctnEMCIC::AliFemtoQinvCorrFctnEMCIC(char* title, const int& nbins, const float& QinvLo, const float& QinvHi): | |
27 | AliFemtoQinvCorrFctn(title, nbins, QinvLo, QinvHi), | |
28 | /*fESumReal(0), | |
29 | fEMultReal(0), | |
30 | fPtMultReal(0), | |
31 | fPzMultReal(0),*/ | |
32 | fESumMix(0), | |
33 | fEMultMix(0), | |
34 | fPtMultMix(0), | |
35 | fPzMultMix(0) | |
36 | ||
37 | { | |
38 | ||
39 | ||
40 | // set up emcic histograms | |
41 | /*char tTitESum[100] = "ESumReal"; | |
42 | strncat(tTitESum,title, 100); | |
43 | fESumReal = new TH1D(tTitESum,title,nbins,QinvLo,QinvHi); | |
44 | char tTitEMult[100] = "EMultReal"; | |
45 | strncat(tTitEMult,title, 100); | |
46 | fEMultReal = new TH1D(tTitEMult,title,nbins,QinvLo,QinvHi); | |
47 | char tTitPt[100] = "PtMultReal"; | |
48 | strncat(tTitPt,title, 100); | |
49 | fPtMultReal = new TH1D(tTitPt,title,nbins,QinvLo,QinvHi); | |
50 | char tTitPz[100] = "PzMultReal"; | |
51 | strncat(tTitPz,title, 100); | |
52 | fPzMultReal = new TH1D(tTitPz,title,nbins,QinvLo,QinvHi);*/ | |
53 | ||
54 | char tTitESum2[101] = "ESumMix"; | |
55 | strncat(tTitESum2,title, 100); | |
56 | fESumMix = new TH1D(tTitESum2,title,nbins,QinvLo,QinvHi); | |
57 | char tTitEMult2[101] = "EMultMix"; | |
58 | strncat(tTitEMult2,title, 100); | |
59 | fEMultMix = new TH1D(tTitEMult2,title,nbins,QinvLo,QinvHi); | |
60 | char tTitPt2[101] = "PtMultMix"; | |
61 | strncat(tTitPt2,title, 100); | |
62 | fPtMultMix = new TH1D(tTitPt2,title,nbins,QinvLo,QinvHi); | |
63 | char tTitPz2[101] = "PzMultMix"; | |
64 | strncat(tTitPz2,title, 100); | |
65 | fPzMultMix = new TH1D(tTitPz2,title,nbins,QinvLo,QinvHi); | |
66 | ||
67 | ||
68 | ||
69 | // to enable error bar calculation... | |
70 | ||
71 | /* fESumReal->Sumw2(); | |
72 | fEMultReal->Sumw2(); | |
73 | fPtMultReal->Sumw2(); | |
74 | fPzMultReal->Sumw2();*/ | |
75 | fESumMix->Sumw2(); | |
76 | fEMultMix->Sumw2(); | |
77 | fPtMultMix->Sumw2(); | |
78 | fPzMultMix->Sumw2(); | |
79 | } | |
80 | ||
81 | //____________________________ | |
82 | AliFemtoQinvCorrFctnEMCIC::AliFemtoQinvCorrFctnEMCIC(const AliFemtoQinvCorrFctnEMCIC& aCorrFctn) : | |
83 | AliFemtoQinvCorrFctn(aCorrFctn), | |
84 | /*fESumReal(0), | |
85 | fEMultReal(0), | |
86 | fPtMultReal(0), | |
87 | fPzMultReal(0),*/ | |
88 | fESumMix(0), | |
89 | fEMultMix(0), | |
90 | fPtMultMix(0), | |
91 | fPzMultMix(0) | |
92 | { | |
93 | // copy constructor | |
94 | ||
95 | /*fESumReal= new TH1D(*aCorrFctn.fESumReal); | |
96 | fEMultReal= new TH1D(*aCorrFctn.fEMultReal); | |
97 | fPtMultReal= new TH1D(*aCorrFctn.fPtMultReal); | |
98 | fPzMultReal= new TH1D(*aCorrFctn.fPzMultReal);*/ | |
99 | fESumMix= new TH1D(*aCorrFctn.fESumMix); | |
100 | fEMultMix= new TH1D(*aCorrFctn.fEMultMix); | |
101 | fPtMultMix= new TH1D(*aCorrFctn.fPtMultMix); | |
102 | fPzMultMix= new TH1D(*aCorrFctn.fPzMultMix); | |
103 | ||
104 | } | |
105 | //____________________________ | |
106 | AliFemtoQinvCorrFctnEMCIC::~AliFemtoQinvCorrFctnEMCIC(){ | |
107 | // destructor | |
108 | ||
109 | /*delete fESumReal; | |
110 | delete fEMultReal; | |
111 | delete fPtMultReal; | |
112 | delete fPzMultReal;*/ | |
113 | delete fESumMix; | |
114 | delete fEMultMix; | |
115 | delete fPtMultMix; | |
116 | delete fPzMultMix; | |
117 | ||
118 | } | |
119 | //_________________________ | |
120 | AliFemtoQinvCorrFctnEMCIC& AliFemtoQinvCorrFctnEMCIC::operator=(const AliFemtoQinvCorrFctnEMCIC& aCorrFctn) | |
121 | { | |
122 | // assignment operator | |
123 | if (this == &aCorrFctn) | |
124 | return *this; | |
125 | ||
126 | /*if (fESumReal) delete fESumReal; | |
127 | fESumReal= new TH1D(*aCorrFctn.fESumReal); | |
128 | if (fEMultReal) delete fEMultReal; | |
129 | fEMultReal= new TH1D(*aCorrFctn.fEMultReal); | |
130 | if (fPtMultReal) delete fPtMultReal; | |
131 | fPtMultReal= new TH1D(*aCorrFctn.fPtMultReal); | |
132 | if (fPzMultReal) delete fPzMultReal; | |
133 | fPzMultReal= new TH1D(*aCorrFctn.fPzMultReal); | |
134 | if (fESumMix) delete fESumMix;*/ | |
135 | ||
136 | fESumMix= new TH1D(*aCorrFctn.fESumMix); | |
137 | if (fEMultMix) delete fEMultMix; | |
138 | fEMultMix= new TH1D(*aCorrFctn.fEMultMix); | |
139 | if (fPtMultMix) delete fPtMultMix; | |
140 | fPtMultMix= new TH1D(*aCorrFctn.fPtMultMix); | |
141 | if (fPzMultMix) delete fPzMultMix; | |
142 | fPzMultMix= new TH1D(*aCorrFctn.fPzMultMix); | |
143 | ||
144 | return *this; | |
145 | } | |
146 | ||
147 | //____________________________ | |
148 | void AliFemtoQinvCorrFctnEMCIC::AddRealPair(AliFemtoPair* pair){ | |
149 | // add true pair | |
150 | ||
151 | if (fPairCut) | |
152 | if (!fPairCut->Pass(pair)) return; | |
153 | AliFemtoQinvCorrFctn::AddRealPair(pair); | |
154 | ||
155 | ||
156 | //double tQinv = fabs(pair->QInv()); // note - qInv() will be negative for identical pairs... | |
157 | ||
158 | // The EMCICs are calculated here for real pairs | |
159 | /*AliFemtoLorentzVector tMom1 = pair->Track1()->FourMomentum(); | |
160 | AliFemtoLorentzVector tMom2 = pair->Track2()->FourMomentum(); | |
161 | double tE1 = tMom1.e(); | |
162 | double tE2 = tMom2.e(); | |
163 | double tPz1 = tMom1.pz(); | |
164 | double tPz2 = tMom2.pz(); | |
165 | ||
166 | TVector2 tPt1; | |
167 | TVector2 tPt2; | |
168 | tPt1.Set(tMom1.px(),tMom1.py()); | |
169 | tPt2.Set(tMom2.px(),tMom2.py()); | |
170 | double tPt1DotPt2 = tPt1*tPt2; | |
171 | ||
172 | fESumReal->Fill(tQinv,tE1+tE2); | |
173 | fEMultReal->Fill(tQinv,tE1*tE2); | |
174 | fPzMultReal->Fill(tQinv,tPz1*tPz2); | |
175 | fPtMultReal->Fill(tQinv,tPt1DotPt2);*/ | |
176 | ||
177 | } | |
178 | //____________________________ | |
179 | void AliFemtoQinvCorrFctnEMCIC::AddMixedPair(AliFemtoPair* pair){ | |
180 | // add mixed (background) pair | |
181 | if (fPairCut) | |
182 | if (!fPairCut->Pass(pair)) return; | |
183 | AliFemtoQinvCorrFctn::AddMixedPair(pair); | |
184 | double tQinv = fabs(pair->QInv()); // note - qInv() will be negative for identical pairs... | |
185 | ||
186 | ||
187 | // The EMCICs are calculated here for mixed pairs | |
188 | AliFemtoLorentzVector tMom1 = pair->Track1()->FourMomentum(); | |
189 | AliFemtoLorentzVector tMom2 = pair->Track2()->FourMomentum(); | |
190 | double tE1 = tMom1.e(); | |
191 | double tE2 = tMom2.e(); | |
192 | double tPz1 = tMom1.pz(); | |
193 | double tPz2 = tMom2.pz(); | |
194 | ||
195 | TVector2 tPt1; | |
196 | TVector2 tPt2; | |
197 | tPt1.Set(tMom1.px(),tMom1.py()); | |
198 | tPt2.Set(tMom2.px(),tMom2.py()); | |
199 | double tPt1DotPt2 = tPt1*tPt2; | |
200 | ||
201 | fESumMix->Fill(tQinv,tE1+tE2); | |
202 | fEMultMix->Fill(tQinv,tE1*tE2); | |
203 | fPzMultMix->Fill(tQinv,tPz1*tPz2); | |
204 | fPtMultMix->Fill(tQinv,tPt1DotPt2); | |
205 | ||
206 | ||
207 | ||
208 | } | |
209 | //____________________________ | |
210 | void AliFemtoQinvCorrFctnEMCIC::Write(){ | |
211 | // Write out neccessary objects | |
212 | AliFemtoQinvCorrFctn::Write(); //Write num and den | |
213 | /*fESumReal->Write(); | |
214 | fEMultReal->Write(); | |
215 | fPtMultReal->Write(); | |
216 | fPzMultReal->Write(); */ | |
217 | fESumMix->Write(); | |
218 | fEMultMix->Write(); | |
219 | fPtMultMix->Write(); | |
220 | fPzMultMix->Write(); | |
221 | ||
222 | } | |
223 | //______________________________ | |
224 | TList* AliFemtoQinvCorrFctnEMCIC::GetOutputList() | |
225 | { | |
226 | // Prepare the list of objects to be written to the output | |
227 | TList *tOutputList; | |
228 | tOutputList = (TList*)AliFemtoQinvCorrFctn::GetOutputList(); | |
229 | cout << "Getting list from Qinv CF emicic" << endl; | |
230 | /*tOutputList->Add(fESumReal); | |
231 | tOutputList->Add(fEMultReal); | |
232 | tOutputList->Add(fPtMultReal); | |
233 | tOutputList->Add(fPzMultReal); */ | |
234 | tOutputList->Add(fESumMix); | |
235 | tOutputList->Add(fEMultMix); | |
236 | tOutputList->Add(fPtMultMix); | |
237 | tOutputList->Add(fPzMultMix); | |
238 | return tOutputList; | |
239 | } | |
240 | ||
241 |