]>
Commit | Line | Data |
---|---|---|
be9ef9f9 | 1 | #include <iostream> |
2 | #include <math.h> | |
3 | #include "TChain.h" | |
4 | #include "TFile.h" | |
5 | #include "TKey.h" | |
6 | #include "TObject.h" | |
7 | #include "TObjString.h" | |
8 | #include "TList.h" | |
9 | #include "TTree.h" | |
10 | #include "TH1F.h" | |
11 | #include "TH1D.h" | |
12 | #include "TH2D.h" | |
13 | #include "TH3D.h" | |
14 | #include "TProfile.h" | |
15 | #include "TProfile2D.h" | |
78c3bd48 | 16 | #include "TProfile3D.h" |
be9ef9f9 | 17 | #include "TCanvas.h" |
18 | #include "TRandom3.h" | |
19 | #include "TF1.h" | |
20 | ||
21 | #include "AliAnalysisTask.h" | |
22 | #include "AliAnalysisManager.h" | |
23 | ||
24 | ||
25 | #include "AliESDEvent.h" | |
26 | #include "AliESDInputHandler.h" | |
27 | #include "AliESDtrackCuts.h" | |
28 | ||
29 | #include "AliAODEvent.h" | |
30 | #include "AliAODInputHandler.h" | |
31 | #include "AliAODMCParticle.h" | |
32 | #include "AliAnalysisUtils.h" | |
33 | ||
34 | #include "AliFourPion.h" | |
35 | ||
36 | #define PI 3.1415927 | |
37 | #define G_Coeff 0.006399 // 2*pi*alpha*M_pion | |
42802bba | 38 | #define FmToGeV 0.19733 // conversion of Fm to GeV |
fcb16ac9 | 39 | #define kappa3 0.15 // kappa3 Edgeworth coefficient (non-Gaussian features of C2) |
40 | #define kappa4 0.32 // kappa4 Edgeworth coefficient (non-Gaussian features of C2) | |
42802bba | 41 | #define kappa3Fit 0.1 // kappa3 for c4QS fit |
42 | #define kappa4Fit 0.5 // kappa4 for c4QS fit | |
be9ef9f9 | 43 | |
44 | // Author: Dhevan Gangadharan | |
45 | ||
46 | ClassImp(AliFourPion) | |
47 | ||
48 | //________________________________________________________________________ | |
49 | AliFourPion::AliFourPion(): | |
50 | AliAnalysisTaskSE(), | |
51 | fname(0), | |
52 | fAOD(0x0), | |
53 | fOutputList(0x0), | |
54 | fPIDResponse(0x0), | |
55 | fEC(0x0), | |
56 | fEvt(0x0), | |
57 | fTempStruct(0x0), | |
58 | fRandomNumber(0x0), | |
59 | fLEGO(kTRUE), | |
60 | fMCcase(kFALSE), | |
61 | fAODcase(kTRUE), | |
ebd00f1b | 62 | fCollisionType(0), |
be9ef9f9 | 63 | fGenerateSignal(kFALSE), |
64 | fGeneratorOnly(kFALSE), | |
be9ef9f9 | 65 | fTabulatePairs(kFALSE), |
95567836 | 66 | fLinearInterpolation(kTRUE), |
42802bba | 67 | fMixedChargeCut(kFALSE), |
be9ef9f9 | 68 | fRMax(11), |
78c3bd48 | 69 | fRstartMC(5.0), |
be9ef9f9 | 70 | ffcSq(0.7), |
80507acf | 71 | ffcSqMRC(0.6), |
be9ef9f9 | 72 | fFilterBit(7), |
73 | fMaxChi2NDF(10), | |
74 | fMinTPCncls(0), | |
574647ef | 75 | fEAtype(0), |
be9ef9f9 | 76 | fBfield(0), |
77 | fMbin(0), | |
78 | fFSIindex(0), | |
52b6cc66 | 79 | fFSIindexSmallSystem(9), |
be9ef9f9 | 80 | fEDbin(0), |
81 | fMbins(fCentBins), | |
82 | fMultLimit(0), | |
83 | fCentBinLowLimit(0), | |
84 | fCentBinHighLimit(1), | |
0207c034 | 85 | fTriggerType(0), |
be9ef9f9 | 86 | fEventCounter(0), |
87 | fEventsToMix(0), | |
88 | fZvertexBins(0), | |
89 | fMultLimits(), | |
42802bba | 90 | fMinPt(0.16), |
91 | fMaxPt(1.0), | |
be9ef9f9 | 92 | fQcut(0), |
93 | fQLowerCut(0), | |
d3df474e | 94 | fNormQcutLow(0.15), |
95 | fNormQcutHigh(0.2), | |
be9ef9f9 | 96 | fKupperBound(0), |
0c82e40e | 97 | fQupperBoundQ2(0.), |
98 | fQupperBoundQ3(0.), | |
99 | fQupperBoundQ4(0.), | |
be9ef9f9 | 100 | fQbinsQ2(1), |
101 | fQbinsQ3(1), | |
102 | fQbinsQ4(1), | |
0c82e40e | 103 | fQupperBoundWeights(0.), |
78c3bd48 | 104 | fQbinsQinv3D(0), |
0c82e40e | 105 | fQupperBoundQinv3D(0.), |
be9ef9f9 | 106 | fKstepT(), |
107 | fKstepY(), | |
108 | fKmeanT(), | |
109 | fKmeanY(), | |
110 | fKmiddleT(), | |
111 | fKmiddleY(), | |
112 | fQstep(0), | |
113 | fQstepWeights(0), | |
114 | fQmean(), | |
115 | fDampStart(0), | |
116 | fDampStep(0), | |
70a43d86 | 117 | fq2Binning(0), |
118 | fq2Index(0), | |
119 | fq2CutLow(0.1), | |
120 | fq2CutHigh(0.11), | |
be9ef9f9 | 121 | fTPCTOFboundry(0), |
122 | fTOFboundry(0), | |
123 | fSigmaCutTPC(2.0), | |
124 | fSigmaCutTOF(2.0), | |
4bf06935 | 125 | fMinSepPairEta(0.02), |
126 | fMinSepPairPhi(0.045), | |
be9ef9f9 | 127 | fShareQuality(0), |
128 | fShareFraction(0), | |
129 | fTrueMassP(0), | |
130 | fTrueMassPi(0), | |
131 | fTrueMassK(0), | |
132 | fTrueMassKs(0), | |
133 | fTrueMassLam(0), | |
134 | fKtIndexL(0), | |
135 | fKtIndexH(0), | |
136 | fQoIndexL(0), | |
137 | fQoIndexH(0), | |
138 | fQsIndexL(0), | |
139 | fQsIndexH(0), | |
140 | fQlIndexL(0), | |
141 | fQlIndexH(0), | |
142 | fDummyB(0), | |
143 | fKT3transition(0.3), | |
144 | fKT4transition(0.3), | |
95567836 | 145 | farrP1(), |
146 | farrP2(), | |
b71263d0 | 147 | fDefaultsCharSwitch(), |
148 | fLowQPairSwitch_E0E0(), | |
149 | fLowQPairSwitch_E0E1(), | |
150 | fLowQPairSwitch_E0E2(), | |
151 | fLowQPairSwitch_E0E3(), | |
6bb6954b | 152 | fLowQPairSwitch_E1E1(), |
b71263d0 | 153 | fLowQPairSwitch_E1E2(), |
154 | fLowQPairSwitch_E1E3(), | |
155 | fLowQPairSwitch_E2E3(), | |
156 | fNormQPairSwitch_E0E0(), | |
157 | fNormQPairSwitch_E0E1(), | |
158 | fNormQPairSwitch_E0E2(), | |
159 | fNormQPairSwitch_E0E3(), | |
6bb6954b | 160 | fNormQPairSwitch_E1E1(), |
b71263d0 | 161 | fNormQPairSwitch_E1E2(), |
162 | fNormQPairSwitch_E1E3(), | |
163 | fNormQPairSwitch_E2E3(), | |
80507acf | 164 | fMomResC2SC(0x0), |
165 | fMomResC2MC(0x0), | |
70a43d86 | 166 | fWeightmuonCorrection(0x0) |
be9ef9f9 | 167 | { |
168 | // Default constructor | |
169 | for(Int_t mb=0; mb<fMbins; mb++){ | |
170 | for(Int_t edB=0; edB<fEDbins; edB++){ | |
171 | for(Int_t c1=0; c1<2; c1++){ | |
172 | for(Int_t c2=0; c2<2; c2++){ | |
173 | for(Int_t term=0; term<2; term++){ | |
174 | ||
175 | Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fTerms2=0x0; | |
be9ef9f9 | 176 | Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fIdeal = 0x0; |
177 | Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fSmeared = 0x0; | |
178 | Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].OSL_ktbin[0].fTerms2OSL = 0x0; | |
179 | Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].OSL_ktbin[0].fTerms2OSLQW = 0x0; | |
180 | Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].OSL_ktbin[1].fTerms2OSL = 0x0; | |
181 | Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].OSL_ktbin[1].fTerms2OSLQW = 0x0; | |
182 | ||
183 | }// term_2 | |
184 | ||
185 | ||
186 | for(Int_t c3=0; c3<2; c3++){ | |
187 | for(Int_t term=0; term<5; term++){ | |
188 | ||
189 | Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fNorm3 = 0x0; | |
190 | Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fTerms3 = 0x0; | |
b71263d0 | 191 | Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fKfactor = 0x0; |
574647ef | 192 | Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fBuild = 0x0; |
be9ef9f9 | 193 | |
194 | }// term_3 | |
b71263d0 | 195 | |
196 | for(Int_t c4=0; c4<2; c4++){ | |
6bb6954b | 197 | for(Int_t term=0; term<13; term++){ |
b71263d0 | 198 | |
199 | Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fNorm4 = 0x0; | |
200 | Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fTerms4 = 0x0; | |
201 | Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fKfactor = 0x0; | |
574647ef | 202 | Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fBuild = 0x0; |
b71263d0 | 203 | |
204 | }// term_4 | |
205 | ||
206 | }// c4 | |
be9ef9f9 | 207 | }//c3 |
208 | }//c2 | |
209 | }//c1 | |
210 | for(Int_t tKbin=0; tKbin<fKbinsT; tKbin++){ | |
211 | for(Int_t yKbin=0; yKbin<fKbinsY; yKbin++){ | |
212 | KT[tKbin].KY[yKbin].MB[mb].EDB[edB].TwoPT[0].fTerms2ThreeD = 0x0; | |
213 | KT[tKbin].KY[yKbin].MB[mb].EDB[edB].TwoPT[1].fTerms2ThreeD = 0x0; | |
214 | } | |
215 | } | |
216 | ||
217 | }// ED | |
218 | }// Mbin | |
219 | ||
70a43d86 | 220 | // Initialze EA |
221 | for(Int_t i=0; i<2; i++){ | |
222 | fPbPbc3FitEA[i]=0x0; | |
223 | fpPbc3FitEA[i]=0x0; | |
224 | fppc3FitEA[i]=0x0; | |
225 | } | |
226 | ||
be9ef9f9 | 227 | // Initialize FSI histograms |
52b6cc66 | 228 | for(Int_t i=0; i<13; i++){ |
be9ef9f9 | 229 | fFSIss[i]=0x0; |
230 | fFSIos[i]=0x0; | |
231 | } | |
232 | ||
233 | ||
234 | // Initialize fNormWeight and fNormWeightErr to 0 | |
235 | for(Int_t i=0; i<3; i++){// Kt iterator | |
236 | for(Int_t j=0; j<10; j++){// Mbin iterator | |
237 | fNormWeight[i][j]=0x0; | |
238 | } | |
239 | } | |
be9ef9f9 | 240 | |
70a43d86 | 241 | for(Int_t FT=0; FT<2; FT++){// c3 or C3 |
242 | for(Int_t i=0; i<7; i++){// EW/LG | |
243 | for(Int_t j=0; j<50; j++){// GIndex | |
244 | ExchangeAmp[i][j][FT]=0x0; | |
245 | } | |
ebd00f1b | 246 | } |
247 | } | |
70a43d86 | 248 | |
be9ef9f9 | 249 | } |
250 | //________________________________________________________________________ | |
251 | AliFourPion::AliFourPion(const Char_t *name) | |
ebd00f1b | 252 | : AliAnalysisTaskSE(name), |
be9ef9f9 | 253 | fname(name), |
254 | fAOD(0x0), | |
255 | fOutputList(0x0), | |
256 | fPIDResponse(0x0), | |
257 | fEC(0x0), | |
258 | fEvt(0x0), | |
259 | fTempStruct(0x0), | |
260 | fRandomNumber(0x0), | |
261 | fLEGO(kTRUE), | |
262 | fMCcase(kFALSE), | |
263 | fAODcase(kTRUE), | |
ebd00f1b | 264 | fCollisionType(0), |
be9ef9f9 | 265 | fGenerateSignal(kFALSE), |
266 | fGeneratorOnly(kFALSE), | |
be9ef9f9 | 267 | fTabulatePairs(kFALSE), |
95567836 | 268 | fLinearInterpolation(kTRUE), |
42802bba | 269 | fMixedChargeCut(kFALSE), |
be9ef9f9 | 270 | fRMax(11), |
78c3bd48 | 271 | fRstartMC(5.0), |
be9ef9f9 | 272 | ffcSq(0.7), |
80507acf | 273 | ffcSqMRC(0.6), |
be9ef9f9 | 274 | fFilterBit(7), |
275 | fMaxChi2NDF(10), | |
276 | fMinTPCncls(0), | |
574647ef | 277 | fEAtype(0), |
be9ef9f9 | 278 | fBfield(0), |
279 | fMbin(0), | |
280 | fFSIindex(0), | |
52b6cc66 | 281 | fFSIindexSmallSystem(9), |
be9ef9f9 | 282 | fEDbin(0), |
283 | fMbins(fCentBins), | |
284 | fMultLimit(0), | |
285 | fCentBinLowLimit(0), | |
286 | fCentBinHighLimit(1), | |
0207c034 | 287 | fTriggerType(0), |
be9ef9f9 | 288 | fEventCounter(0), |
289 | fEventsToMix(0), | |
290 | fZvertexBins(0), | |
291 | fMultLimits(), | |
42802bba | 292 | fMinPt(0.16), |
293 | fMaxPt(1.0), | |
be9ef9f9 | 294 | fQcut(0), |
295 | fQLowerCut(0), | |
d3df474e | 296 | fNormQcutLow(0.15), |
297 | fNormQcutHigh(0.2), | |
be9ef9f9 | 298 | fKupperBound(0), |
0c82e40e | 299 | fQupperBoundQ2(0.), |
300 | fQupperBoundQ3(0.), | |
301 | fQupperBoundQ4(0.), | |
be9ef9f9 | 302 | fQbinsQ2(1), |
303 | fQbinsQ3(1), | |
304 | fQbinsQ4(1), | |
0c82e40e | 305 | fQupperBoundWeights(0.), |
78c3bd48 | 306 | fQbinsQinv3D(0), |
0c82e40e | 307 | fQupperBoundQinv3D(0.), |
be9ef9f9 | 308 | fKstepT(), |
309 | fKstepY(), | |
310 | fKmeanT(), | |
311 | fKmeanY(), | |
312 | fKmiddleT(), | |
313 | fKmiddleY(), | |
314 | fQstep(0), | |
315 | fQstepWeights(0), | |
316 | fQmean(), | |
317 | fDampStart(0), | |
318 | fDampStep(0), | |
70a43d86 | 319 | fq2Binning(0), |
320 | fq2Index(0), | |
321 | fq2CutLow(0.1), | |
322 | fq2CutHigh(0.11), | |
be9ef9f9 | 323 | fTPCTOFboundry(0), |
324 | fTOFboundry(0), | |
325 | fSigmaCutTPC(2.0), | |
326 | fSigmaCutTOF(2.0), | |
4bf06935 | 327 | fMinSepPairEta(0.02), |
328 | fMinSepPairPhi(0.045), | |
be9ef9f9 | 329 | fShareQuality(0), |
330 | fShareFraction(0), | |
331 | fTrueMassP(0), | |
332 | fTrueMassPi(0), | |
333 | fTrueMassK(0), | |
334 | fTrueMassKs(0), | |
335 | fTrueMassLam(0), | |
336 | fKtIndexL(0), | |
337 | fKtIndexH(0), | |
338 | fQoIndexL(0), | |
339 | fQoIndexH(0), | |
340 | fQsIndexL(0), | |
341 | fQsIndexH(0), | |
342 | fQlIndexL(0), | |
343 | fQlIndexH(0), | |
344 | fDummyB(0), | |
345 | fKT3transition(0.3), | |
346 | fKT4transition(0.3), | |
95567836 | 347 | farrP1(), |
348 | farrP2(), | |
b71263d0 | 349 | fDefaultsCharSwitch(), |
350 | fLowQPairSwitch_E0E0(), | |
351 | fLowQPairSwitch_E0E1(), | |
352 | fLowQPairSwitch_E0E2(), | |
353 | fLowQPairSwitch_E0E3(), | |
6bb6954b | 354 | fLowQPairSwitch_E1E1(), |
b71263d0 | 355 | fLowQPairSwitch_E1E2(), |
356 | fLowQPairSwitch_E1E3(), | |
357 | fLowQPairSwitch_E2E3(), | |
358 | fNormQPairSwitch_E0E0(), | |
359 | fNormQPairSwitch_E0E1(), | |
360 | fNormQPairSwitch_E0E2(), | |
361 | fNormQPairSwitch_E0E3(), | |
6bb6954b | 362 | fNormQPairSwitch_E1E1(), |
b71263d0 | 363 | fNormQPairSwitch_E1E2(), |
364 | fNormQPairSwitch_E1E3(), | |
365 | fNormQPairSwitch_E2E3(), | |
80507acf | 366 | fMomResC2SC(0x0), |
367 | fMomResC2MC(0x0), | |
70a43d86 | 368 | fWeightmuonCorrection(0x0) |
be9ef9f9 | 369 | { |
370 | // Main constructor | |
371 | fAODcase=kTRUE; | |
6432c081 | 372 | |
be9ef9f9 | 373 | |
374 | ||
375 | for(Int_t mb=0; mb<fMbins; mb++){ | |
376 | for(Int_t edB=0; edB<fEDbins; edB++){ | |
377 | for(Int_t c1=0; c1<2; c1++){ | |
378 | for(Int_t c2=0; c2<2; c2++){ | |
379 | for(Int_t term=0; term<2; term++){ | |
380 | ||
381 | Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fTerms2=0x0; | |
382 | ||
383 | Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fIdeal = 0x0; | |
384 | Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fSmeared = 0x0; | |
385 | Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].OSL_ktbin[0].fTerms2OSL = 0x0; | |
386 | Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].OSL_ktbin[0].fTerms2OSLQW = 0x0; | |
387 | Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].OSL_ktbin[1].fTerms2OSL = 0x0; | |
388 | Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].OSL_ktbin[1].fTerms2OSLQW = 0x0; | |
389 | ||
390 | }// term_2 | |
391 | ||
392 | for(Int_t c3=0; c3<2; c3++){ | |
393 | for(Int_t term=0; term<5; term++){ | |
394 | ||
395 | Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fNorm3 = 0x0; | |
396 | Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fTerms3 = 0x0; | |
b71263d0 | 397 | Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fKfactor = 0x0; |
574647ef | 398 | Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fBuild = 0x0; |
be9ef9f9 | 399 | |
400 | }// term_3 | |
b71263d0 | 401 | |
402 | for(Int_t c4=0; c4<2; c4++){ | |
6bb6954b | 403 | for(Int_t term=0; term<13; term++){ |
b71263d0 | 404 | |
405 | Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fNorm4 = 0x0; | |
406 | Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fTerms4 = 0x0; | |
407 | Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fKfactor = 0x0; | |
574647ef | 408 | Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fBuild = 0x0; |
b71263d0 | 409 | |
410 | }// term_4 | |
411 | }// c4 | |
be9ef9f9 | 412 | }//c3 |
413 | }//c2 | |
414 | }//c1 | |
415 | ||
416 | for(Int_t tKbin=0; tKbin<fKbinsT; tKbin++){ | |
417 | for(Int_t yKbin=0; yKbin<fKbinsY; yKbin++){ | |
418 | KT[tKbin].KY[yKbin].MB[mb].EDB[edB].TwoPT[0].fTerms2ThreeD = 0x0; | |
419 | KT[tKbin].KY[yKbin].MB[mb].EDB[edB].TwoPT[1].fTerms2ThreeD = 0x0; | |
420 | } | |
421 | } | |
422 | ||
423 | }// ED | |
424 | }// Mbin | |
425 | ||
70a43d86 | 426 | // Initialze EA |
427 | for(Int_t i=0; i<2; i++){ | |
428 | fPbPbc3FitEA[i]=0x0; | |
429 | fpPbc3FitEA[i]=0x0; | |
430 | fppc3FitEA[i]=0x0; | |
431 | } | |
432 | ||
be9ef9f9 | 433 | // Initialize FSI histograms |
52b6cc66 | 434 | for(Int_t i=0; i<13; i++){ |
be9ef9f9 | 435 | fFSIss[i]=0x0; |
436 | fFSIos[i]=0x0; | |
437 | } | |
438 | ||
439 | // Initialize fNormWeight and fNormWeightErr to 0 | |
440 | for(Int_t i=0; i<3; i++){// Kt iterator | |
441 | for(Int_t j=0; j<10; j++){// Mbin iterator | |
442 | fNormWeight[i][j]=0x0; | |
443 | } | |
444 | } | |
70a43d86 | 445 | |
446 | for(Int_t FT=0; FT<2; FT++){// c3 or C3 | |
447 | for(Int_t i=0; i<7; i++){// EW/LG | |
448 | for(Int_t j=0; j<50; j++){// GIndex | |
449 | ExchangeAmp[i][j][FT]=0x0; | |
450 | } | |
ebd00f1b | 451 | } |
452 | } | |
be9ef9f9 | 453 | |
454 | DefineOutput(1, TList::Class()); | |
455 | } | |
456 | //________________________________________________________________________ | |
457 | AliFourPion::AliFourPion(const AliFourPion &obj) | |
458 | : AliAnalysisTaskSE(obj.fname), | |
459 | fname(obj.fname), | |
460 | fAOD(obj.fAOD), | |
461 | //fESD(obj.fESD), | |
462 | fOutputList(obj.fOutputList), | |
463 | fPIDResponse(obj.fPIDResponse), | |
464 | fEC(obj.fEC), | |
465 | fEvt(obj.fEvt), | |
466 | fTempStruct(obj.fTempStruct), | |
467 | fRandomNumber(obj.fRandomNumber), | |
468 | fLEGO(obj.fLEGO), | |
469 | fMCcase(obj.fMCcase), | |
470 | fAODcase(obj.fAODcase), | |
ebd00f1b | 471 | fCollisionType(obj.fCollisionType), |
be9ef9f9 | 472 | fGenerateSignal(obj.fGenerateSignal), |
473 | fGeneratorOnly(obj.fGeneratorOnly), | |
be9ef9f9 | 474 | fTabulatePairs(obj.fTabulatePairs), |
95567836 | 475 | fLinearInterpolation(obj.fLinearInterpolation), |
42802bba | 476 | fMixedChargeCut(obj.fMixedChargeCut), |
be9ef9f9 | 477 | fRMax(obj.fRMax), |
78c3bd48 | 478 | fRstartMC(obj.fRstartMC), |
be9ef9f9 | 479 | ffcSq(obj.ffcSq), |
80507acf | 480 | ffcSqMRC(obj.ffcSqMRC), |
be9ef9f9 | 481 | fFilterBit(obj.fFilterBit), |
482 | fMaxChi2NDF(obj.fMaxChi2NDF), | |
483 | fMinTPCncls(obj.fMinTPCncls), | |
574647ef | 484 | fEAtype(obj.fEAtype), |
be9ef9f9 | 485 | fBfield(obj.fBfield), |
486 | fMbin(obj.fMbin), | |
487 | fFSIindex(obj.fFSIindex), | |
52b6cc66 | 488 | fFSIindexSmallSystem(obj.fFSIindexSmallSystem), |
be9ef9f9 | 489 | fEDbin(obj.fEDbin), |
490 | fMbins(obj.fMbins), | |
491 | fMultLimit(obj.fMultLimit), | |
492 | fCentBinLowLimit(obj.fCentBinLowLimit), | |
493 | fCentBinHighLimit(obj.fCentBinHighLimit), | |
0207c034 | 494 | fTriggerType(obj.fTriggerType), |
be9ef9f9 | 495 | fEventCounter(obj.fEventCounter), |
496 | fEventsToMix(obj.fEventsToMix), | |
497 | fZvertexBins(obj.fZvertexBins), | |
498 | fMultLimits(), | |
42802bba | 499 | fMinPt(obj.fMinPt), |
500 | fMaxPt(obj.fMaxPt), | |
501 | fQcut(obj.fQcut), | |
be9ef9f9 | 502 | fQLowerCut(obj.fQLowerCut), |
d3df474e | 503 | fNormQcutLow(obj.fNormQcutLow), |
504 | fNormQcutHigh(obj.fNormQcutHigh), | |
be9ef9f9 | 505 | fKupperBound(obj.fKupperBound), |
506 | fQupperBoundQ2(obj.fQupperBoundQ2), | |
507 | fQupperBoundQ3(obj.fQupperBoundQ3), | |
508 | fQupperBoundQ4(obj.fQupperBoundQ4), | |
509 | fQbinsQ2(obj.fQbinsQ2), | |
510 | fQbinsQ3(obj.fQbinsQ3), | |
511 | fQbinsQ4(obj.fQbinsQ4), | |
512 | fQupperBoundWeights(obj.fQupperBoundWeights), | |
78c3bd48 | 513 | fQbinsQinv3D(obj.fQbinsQinv3D), |
514 | fQupperBoundQinv3D(obj.fQupperBoundQinv3D), | |
be9ef9f9 | 515 | fKstepT(), |
516 | fKstepY(), | |
517 | fKmeanT(), | |
518 | fKmeanY(), | |
519 | fKmiddleT(), | |
520 | fKmiddleY(), | |
521 | fQstep(obj.fQstep), | |
522 | fQstepWeights(obj.fQstepWeights), | |
523 | fQmean(), | |
524 | fDampStart(obj.fDampStart), | |
525 | fDampStep(obj.fDampStep), | |
70a43d86 | 526 | fq2Binning(obj.fq2Binning), |
527 | fq2Index(obj.fq2Index), | |
528 | fq2CutLow(obj.fq2CutLow), | |
529 | fq2CutHigh(obj.fq2CutHigh), | |
be9ef9f9 | 530 | fTPCTOFboundry(obj.fTPCTOFboundry), |
531 | fTOFboundry(obj.fTOFboundry), | |
532 | fSigmaCutTPC(obj.fSigmaCutTPC), | |
533 | fSigmaCutTOF(obj.fSigmaCutTOF), | |
534 | fMinSepPairEta(obj.fMinSepPairEta), | |
535 | fMinSepPairPhi(obj.fMinSepPairPhi), | |
536 | fShareQuality(obj.fShareQuality), | |
537 | fShareFraction(obj.fShareFraction), | |
538 | fTrueMassP(obj.fTrueMassP), | |
539 | fTrueMassPi(obj.fTrueMassPi), | |
540 | fTrueMassK(obj.fTrueMassK), | |
541 | fTrueMassKs(obj.fTrueMassKs), | |
542 | fTrueMassLam(obj.fTrueMassLam), | |
543 | fKtIndexL(obj.fKtIndexL), | |
544 | fKtIndexH(obj.fKtIndexH), | |
545 | fQoIndexL(obj.fQoIndexL), | |
546 | fQoIndexH(obj.fQoIndexH), | |
547 | fQsIndexL(obj.fQsIndexL), | |
548 | fQsIndexH(obj.fQsIndexH), | |
549 | fQlIndexL(obj.fQlIndexL), | |
550 | fQlIndexH(obj.fQlIndexH), | |
551 | fDummyB(obj.fDummyB), | |
552 | fKT3transition(obj.fKT3transition), | |
553 | fKT4transition(obj.fKT4transition), | |
95567836 | 554 | farrP1(), |
555 | farrP2(), | |
b71263d0 | 556 | fDefaultsCharSwitch(), |
557 | fLowQPairSwitch_E0E0(), | |
558 | fLowQPairSwitch_E0E1(), | |
559 | fLowQPairSwitch_E0E2(), | |
560 | fLowQPairSwitch_E0E3(), | |
6bb6954b | 561 | fLowQPairSwitch_E1E1(), |
b71263d0 | 562 | fLowQPairSwitch_E1E2(), |
563 | fLowQPairSwitch_E1E3(), | |
564 | fLowQPairSwitch_E2E3(), | |
565 | fNormQPairSwitch_E0E0(), | |
566 | fNormQPairSwitch_E0E1(), | |
567 | fNormQPairSwitch_E0E2(), | |
568 | fNormQPairSwitch_E0E3(), | |
6bb6954b | 569 | fNormQPairSwitch_E1E1(), |
b71263d0 | 570 | fNormQPairSwitch_E1E2(), |
571 | fNormQPairSwitch_E1E3(), | |
572 | fNormQPairSwitch_E2E3(), | |
80507acf | 573 | fMomResC2SC(obj.fMomResC2SC), |
574 | fMomResC2MC(obj.fMomResC2MC), | |
70a43d86 | 575 | fWeightmuonCorrection(obj.fWeightmuonCorrection) |
be9ef9f9 | 576 | { |
577 | // Copy Constructor | |
578 | ||
70a43d86 | 579 | for(Int_t i=0; i<2; i++){ |
580 | fPbPbc3FitEA[i]=obj.fPbPbc3FitEA[i]; | |
581 | fpPbc3FitEA[i]=obj.fpPbc3FitEA[i]; | |
582 | fppc3FitEA[i]=obj.fppc3FitEA[i]; | |
583 | } | |
584 | ||
52b6cc66 | 585 | for(Int_t i=0; i<13; i++){ |
be9ef9f9 | 586 | fFSIss[i]=obj.fFSIss[i]; |
587 | fFSIos[i]=obj.fFSIos[i]; | |
588 | } | |
589 | ||
590 | // Initialize fNormWeight and fNormWeightErr to 0 | |
591 | for(Int_t i=0; i<3; i++){// Kt iterator | |
592 | for(Int_t j=0; j<10; j++){// Mbin iterator | |
593 | fNormWeight[i][j]=0x0; | |
594 | } | |
595 | } | |
596 | ||
70a43d86 | 597 | for(Int_t FT=0; FT<2; FT++){// c3 or C3 |
598 | for(Int_t i=0; i<7; i++){// EW/LG | |
599 | for(Int_t j=0; j<50; j++){// GIndex | |
600 | ExchangeAmp[i][j][FT]=obj.ExchangeAmp[i][j][FT]; | |
601 | } | |
ebd00f1b | 602 | } |
603 | } | |
70a43d86 | 604 | |
be9ef9f9 | 605 | } |
606 | //________________________________________________________________________ | |
607 | AliFourPion &AliFourPion::operator=(const AliFourPion &obj) | |
608 | { | |
609 | // Assignment operator | |
610 | if (this == &obj) | |
611 | return *this; | |
612 | ||
613 | fname = obj.fname; | |
614 | fAOD = obj.fAOD; | |
615 | fOutputList = obj.fOutputList; | |
616 | fPIDResponse = obj.fPIDResponse; | |
617 | fEC = obj.fEC; | |
618 | fEvt = obj.fEvt; | |
619 | fTempStruct = obj.fTempStruct; | |
620 | fRandomNumber = obj.fRandomNumber; | |
2b6fd022 | 621 | fLEGO = obj.fLEGO; |
be9ef9f9 | 622 | fMCcase = obj.fMCcase; |
623 | fAODcase = obj.fAODcase; | |
ebd00f1b | 624 | fCollisionType = obj.fCollisionType; |
be9ef9f9 | 625 | fGenerateSignal = obj.fGenerateSignal; |
626 | fGeneratorOnly = obj.fGeneratorOnly; | |
be9ef9f9 | 627 | fTabulatePairs = obj.fTabulatePairs; |
95567836 | 628 | fLinearInterpolation = obj.fLinearInterpolation; |
42802bba | 629 | fMixedChargeCut = obj.fMixedChargeCut; |
be9ef9f9 | 630 | fRMax = obj.fRMax; |
78c3bd48 | 631 | fRstartMC = obj.fRstartMC; |
be9ef9f9 | 632 | ffcSq = obj.ffcSq; |
80507acf | 633 | ffcSqMRC = obj.ffcSqMRC; |
be9ef9f9 | 634 | fFilterBit = obj.fFilterBit; |
635 | fMaxChi2NDF = obj.fMaxChi2NDF; | |
636 | fMinTPCncls = obj.fMinTPCncls; | |
574647ef | 637 | fEAtype = obj.fEAtype; |
be9ef9f9 | 638 | fBfield = obj.fBfield; |
639 | fMbin = obj.fMbin; | |
640 | fFSIindex = obj.fFSIindex; | |
52b6cc66 | 641 | fFSIindexSmallSystem = obj.fFSIindexSmallSystem; |
be9ef9f9 | 642 | fEDbin = obj.fEDbin; |
643 | fMbins = obj.fMbins; | |
644 | fMultLimit = obj.fMultLimit; | |
645 | fCentBinLowLimit = obj.fCentBinLowLimit; | |
646 | fCentBinHighLimit = obj.fCentBinHighLimit; | |
0207c034 | 647 | fTriggerType = obj.fTriggerType; |
be9ef9f9 | 648 | fEventCounter = obj.fEventCounter; |
649 | fEventsToMix = obj.fEventsToMix; | |
650 | fZvertexBins = obj.fZvertexBins; | |
42802bba | 651 | fMinPt = obj.fMinPt; |
652 | fMaxPt = obj.fMaxPt; | |
653 | fQcut = obj.fQcut; | |
be9ef9f9 | 654 | fQLowerCut = obj.fQLowerCut; |
655 | fKupperBound = obj.fKupperBound; | |
656 | fQupperBoundQ2 = obj.fQupperBoundQ2; | |
657 | fQupperBoundQ3 = obj.fQupperBoundQ3; | |
658 | fQupperBoundQ4 = obj.fQupperBoundQ4; | |
659 | fQbinsQ2 = obj.fQbinsQ2; | |
660 | fQbinsQ3 = obj.fQbinsQ3; | |
661 | fQbinsQ4 = obj.fQbinsQ4; | |
662 | fQupperBoundWeights = obj.fQupperBoundWeights; | |
78c3bd48 | 663 | fQbinsQinv3D = obj.fQbinsQinv3D; |
664 | fQupperBoundQinv3D = obj.fQupperBoundQinv3D; | |
be9ef9f9 | 665 | fQstep = obj.fQstep; |
666 | fQstepWeights = obj.fQstepWeights; | |
667 | fDampStart = obj.fDampStart; | |
668 | fDampStep = obj.fDampStep; | |
70a43d86 | 669 | fq2Binning = obj.fq2Binning; |
670 | fq2Index = obj.fq2Index; | |
671 | fq2CutLow = obj.fq2CutLow; | |
672 | fq2CutHigh = obj.fq2CutHigh; | |
be9ef9f9 | 673 | fTPCTOFboundry = obj.fTPCTOFboundry; |
674 | fTOFboundry = obj.fTOFboundry; | |
675 | fSigmaCutTPC = obj.fSigmaCutTPC; | |
676 | fSigmaCutTOF = obj.fSigmaCutTOF; | |
677 | fMinSepPairEta = obj.fMinSepPairEta; | |
678 | fMinSepPairPhi = obj.fMinSepPairPhi; | |
679 | fShareQuality = obj.fShareQuality; | |
680 | fShareFraction = obj.fShareFraction; | |
681 | fTrueMassP = obj.fTrueMassP; | |
682 | fTrueMassPi = obj.fTrueMassPi; | |
683 | fTrueMassK = obj.fTrueMassK; | |
684 | fTrueMassKs = obj.fTrueMassKs; | |
685 | fTrueMassLam = obj.fTrueMassLam; | |
686 | fKtIndexL = obj.fKtIndexL; | |
687 | fKtIndexH = obj.fKtIndexH; | |
688 | fQoIndexL = obj.fQoIndexL; | |
689 | fQoIndexH = obj.fQoIndexH; | |
690 | fQsIndexL = obj.fQsIndexL; | |
691 | fQsIndexH = obj.fQsIndexH; | |
692 | fQlIndexL = obj.fQlIndexL; | |
693 | fQlIndexH = obj.fQlIndexH; | |
694 | fDummyB = obj.fDummyB; | |
695 | fKT3transition = obj.fKT3transition; | |
696 | fKT4transition = obj.fKT4transition; | |
80507acf | 697 | fMomResC2SC = obj.fMomResC2SC; |
698 | fMomResC2MC = obj.fMomResC2MC; | |
5591748e | 699 | fWeightmuonCorrection = obj.fWeightmuonCorrection; |
70a43d86 | 700 | |
701 | for(Int_t i=0; i<2; i++){ | |
702 | fPbPbc3FitEA[i]=obj.fPbPbc3FitEA[i]; | |
703 | fpPbc3FitEA[i]=obj.fpPbc3FitEA[i]; | |
704 | fppc3FitEA[i]=obj.fppc3FitEA[i]; | |
705 | } | |
be9ef9f9 | 706 | |
52b6cc66 | 707 | for(Int_t i=0; i<13; i++){ |
be9ef9f9 | 708 | fFSIss[i]=obj.fFSIss[i]; |
709 | fFSIos[i]=obj.fFSIos[i]; | |
710 | } | |
711 | for(Int_t i=0; i<3; i++){// Kt iterator | |
712 | for(Int_t j=0; j<10; j++){// Mbin iterator | |
713 | fNormWeight[i][j]=obj.fNormWeight[i][j]; | |
714 | } | |
715 | } | |
70a43d86 | 716 | |
717 | for(Int_t FT=0; FT<2; FT++){// c3 or C3 | |
718 | for(Int_t i=0; i<7; i++){// EW/LG | |
719 | for(Int_t j=0; j<50; j++){// GIndex | |
720 | ExchangeAmp[i][j][FT]=obj.ExchangeAmp[i][j][FT]; | |
721 | } | |
ebd00f1b | 722 | } |
723 | } | |
724 | ||
be9ef9f9 | 725 | return (*this); |
726 | } | |
727 | //________________________________________________________________________ | |
728 | AliFourPion::~AliFourPion() | |
729 | { | |
730 | // Destructor | |
731 | if(fAOD) delete fAOD; | |
732 | //if(fESD) delete fESD; | |
733 | if(fOutputList) delete fOutputList; | |
734 | if(fPIDResponse) delete fPIDResponse; | |
735 | if(fEC) delete fEC; | |
736 | if(fEvt) delete fEvt; | |
737 | if(fTempStruct) delete [] fTempStruct; | |
738 | if(fRandomNumber) delete fRandomNumber; | |
80507acf | 739 | if(fMomResC2SC) delete fMomResC2SC; |
740 | if(fMomResC2MC) delete fMomResC2MC; | |
5591748e | 741 | if(fWeightmuonCorrection) delete fWeightmuonCorrection; |
70a43d86 | 742 | |
743 | for(Int_t i=0; i<2; i++){ | |
744 | if(fPbPbc3FitEA[i]) delete fPbPbc3FitEA[i]; | |
745 | if(fpPbc3FitEA[i]) delete fpPbc3FitEA[i]; | |
746 | if(fppc3FitEA[i]) delete fppc3FitEA[i]; | |
747 | } | |
ebd00f1b | 748 | |
b71263d0 | 749 | for(Int_t j=0; j<kMultLimitPbPb; j++){ |
750 | if(fLowQPairSwitch_E0E0[j]) delete [] fLowQPairSwitch_E0E0[j]; | |
751 | if(fLowQPairSwitch_E0E1[j]) delete [] fLowQPairSwitch_E0E1[j]; | |
752 | if(fLowQPairSwitch_E0E2[j]) delete [] fLowQPairSwitch_E0E2[j]; | |
753 | if(fLowQPairSwitch_E0E3[j]) delete [] fLowQPairSwitch_E0E3[j]; | |
6bb6954b | 754 | if(fLowQPairSwitch_E1E1[j]) delete [] fLowQPairSwitch_E1E1[j]; |
b71263d0 | 755 | if(fLowQPairSwitch_E1E2[j]) delete [] fLowQPairSwitch_E1E2[j]; |
756 | if(fLowQPairSwitch_E1E3[j]) delete [] fLowQPairSwitch_E1E3[j]; | |
757 | if(fLowQPairSwitch_E2E3[j]) delete [] fLowQPairSwitch_E2E3[j]; | |
758 | // | |
759 | if(fNormQPairSwitch_E0E0[j]) delete [] fNormQPairSwitch_E0E0[j]; | |
760 | if(fNormQPairSwitch_E0E1[j]) delete [] fNormQPairSwitch_E0E1[j]; | |
761 | if(fNormQPairSwitch_E0E2[j]) delete [] fNormQPairSwitch_E0E2[j]; | |
762 | if(fNormQPairSwitch_E0E3[j]) delete [] fNormQPairSwitch_E0E3[j]; | |
6bb6954b | 763 | if(fNormQPairSwitch_E1E1[j]) delete [] fNormQPairSwitch_E1E1[j]; |
b71263d0 | 764 | if(fNormQPairSwitch_E1E2[j]) delete [] fNormQPairSwitch_E1E2[j]; |
765 | if(fNormQPairSwitch_E1E3[j]) delete [] fNormQPairSwitch_E1E3[j]; | |
766 | if(fNormQPairSwitch_E2E3[j]) delete [] fNormQPairSwitch_E2E3[j]; | |
767 | } | |
be9ef9f9 | 768 | |
769 | // | |
770 | for(Int_t mb=0; mb<fMbins; mb++){ | |
771 | for(Int_t edB=0; edB<fEDbins; edB++){ | |
772 | for(Int_t c1=0; c1<2; c1++){ | |
773 | for(Int_t c2=0; c2<2; c2++){ | |
774 | for(Int_t term=0; term<2; term++){ | |
775 | ||
776 | if(Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fTerms2) delete Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fTerms2; | |
777 | ||
778 | if(Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fIdeal) delete Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fIdeal; | |
779 | if(Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fSmeared) delete Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fSmeared; | |
780 | if(Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].OSL_ktbin[0].fTerms2OSL) delete Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].OSL_ktbin[0].fTerms2OSL; | |
781 | if(Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].OSL_ktbin[0].fTerms2OSLQW) delete Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].OSL_ktbin[0].fTerms2OSLQW; | |
782 | if(Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].OSL_ktbin[1].fTerms2OSL) delete Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].OSL_ktbin[1].fTerms2OSL; | |
783 | if(Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].OSL_ktbin[1].fTerms2OSLQW) delete Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].OSL_ktbin[1].fTerms2OSLQW; | |
784 | // | |
785 | if(Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fMCqinv) delete Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fMCqinv; | |
786 | if(Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fMCqinvQW) delete Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fMCqinvQW; | |
787 | }// term_2 | |
788 | ||
789 | for(Int_t c3=0; c3<2; c3++){ | |
790 | for(Int_t term=0; term<5; term++){ | |
791 | ||
792 | if(Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fNorm3) delete Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fNorm3; | |
793 | if(Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fTerms3) delete Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fTerms3; | |
b71263d0 | 794 | if(Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fKfactor) delete Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fKfactor; |
42802bba | 795 | if(Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fKfactorWeighted) delete Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fKfactorWeighted; |
be9ef9f9 | 796 | // |
574647ef | 797 | if(Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fBuild) delete Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fBuild; |
78c3bd48 | 798 | if(Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fTerms33D) delete Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fTerms33D; |
799 | if(Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fKfactor3D) delete Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fKfactor3D; | |
be9ef9f9 | 800 | }// term_3 |
b71263d0 | 801 | |
802 | for(Int_t c4=0; c4<2; c4++){ | |
6bb6954b | 803 | for(Int_t term=0; term<13; term++){ |
b71263d0 | 804 | |
805 | if(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fNorm4) delete Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fNorm4; | |
806 | if(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fTerms4) delete Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fTerms4; | |
807 | if(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fKfactor) delete Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fKfactor; | |
42802bba | 808 | if(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fKfactorWeighted) delete Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fKfactorWeighted; |
b71263d0 | 809 | // |
574647ef | 810 | if(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fBuild) delete Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fBuild; |
811 | if(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fPrimeBuild) delete Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fPrimeBuild; | |
812 | if(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fPrimePrimeBuild) delete Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fPrimePrimeBuild; | |
813 | if(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fCumulantBuild) delete Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fCumulantBuild; | |
814 | if(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fBuildFromFits) delete Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fBuildFromFits; | |
815 | if(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fPrimeBuildFromFits) delete Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fPrimeBuildFromFits; | |
816 | if(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fPrimePrimeBuildFromFits) delete Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fPrimePrimeBuildFromFits; | |
817 | if(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fCumulantBuildFromFits) delete Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fCumulantBuildFromFits; | |
b71263d0 | 818 | }// term_4 |
819 | ||
820 | }//c4 | |
be9ef9f9 | 821 | }//c3 |
822 | }//c2 | |
823 | }//c1 | |
824 | for(Int_t tKbin=0; tKbin<fKbinsT; tKbin++){ | |
825 | for(Int_t yKbin=0; yKbin<fKbinsY; yKbin++){ | |
826 | if(KT[tKbin].KY[yKbin].MB[mb].EDB[edB].TwoPT[0].fTerms2ThreeD) delete KT[tKbin].KY[yKbin].MB[mb].EDB[edB].TwoPT[0].fTerms2ThreeD; | |
827 | if(KT[tKbin].KY[yKbin].MB[mb].EDB[edB].TwoPT[1].fTerms2ThreeD) delete KT[tKbin].KY[yKbin].MB[mb].EDB[edB].TwoPT[1].fTerms2ThreeD; | |
828 | } | |
829 | } | |
830 | ||
831 | }// ED | |
832 | }// Mbin | |
833 | ||
834 | ||
52b6cc66 | 835 | for(Int_t i=0; i<13; i++){ |
be9ef9f9 | 836 | if(fFSIss[i]) delete fFSIss[i]; |
837 | if(fFSIos[i]) delete fFSIos[i]; | |
838 | } | |
839 | for(Int_t i=0; i<3; i++){// Kt iterator | |
840 | for(Int_t j=0; j<10; j++){// Mbin iterator | |
841 | if(fNormWeight[i][j]) delete fNormWeight[i][j]; | |
842 | } | |
843 | } | |
70a43d86 | 844 | |
845 | for(Int_t FT=0; FT<2; FT++){// c3 or C3 | |
846 | for(Int_t i=0; i<7; i++){// EW/LG | |
847 | for(Int_t j=0; j<50; j++){// GIndex | |
848 | if(ExchangeAmp[i][j][FT]) delete ExchangeAmp[i][j][FT]; | |
849 | } | |
ebd00f1b | 850 | } |
851 | } | |
233f4fe1 | 852 | |
be9ef9f9 | 853 | } |
854 | //________________________________________________________________________ | |
855 | void AliFourPion::ParInit() | |
856 | { | |
857 | cout<<"AliFourPion MyInit() call"<<endl; | |
ebd00f1b | 858 | cout<<"lego:"<<fLEGO<<" MCcase:"<<fMCcase<<" CollisionType:"<<fCollisionType<<" TabulatePairs:"<<fTabulatePairs<<" GenSignal:"<<fGenerateSignal<<" CentLow:"<<fCentBinLowLimit<<" CentHigh:"<<fCentBinHighLimit<<" RMax:"<<fRMax<<" fc^2:"<<ffcSq<<" FB:"<<fFilterBit<<" MaxChi2/NDF:"<<fMaxChi2NDF<<" MinTPCncls:"<<fMinTPCncls<<" MinPairSepEta:"<<fMinSepPairEta<<" MinPairSepPhi:"<<fMinSepPairPhi<<" NsigTPC:"<<fSigmaCutTPC<<" NsigTOF:"<<fSigmaCutTOF<<endl; |
be9ef9f9 | 859 | |
860 | fRandomNumber = new TRandom3(); | |
861 | fRandomNumber->SetSeed(0); | |
862 | ||
863 | // | |
864 | fEventCounter=0; | |
865 | fEventsToMix=3; | |
866 | fZvertexBins=2;//2 | |
867 | ||
868 | fTPCTOFboundry = 0.6;// TPC pid used below this momentum, TOF above but below TOF_boundry | |
869 | fTOFboundry = 2.1;// TOF pid used below this momentum | |
870 | ||
871 | //////////////////////////////////////////////// | |
872 | // PadRow Pair Cuts | |
873 | fShareQuality = .5;// max | |
874 | fShareFraction = .05;// max | |
875 | //////////////////////////////////////////////// | |
876 | ||
0207c034 | 877 | // pp and pPb mult limits |
878 | fMultLimits[0]=0, fMultLimits[1]=5; fMultLimits[2]=10; fMultLimits[3]=15; fMultLimits[4]=20; | |
879 | fMultLimits[5]=30, fMultLimits[6]=40; fMultLimits[7]=50; fMultLimits[8]=70; fMultLimits[9]=100; | |
880 | fMultLimits[10]=150; | |
be9ef9f9 | 881 | |
be9ef9f9 | 882 | |
ebd00f1b | 883 | |
884 | if(fCollisionType==0) {// PbPb | |
be9ef9f9 | 885 | fMultLimit=kMultLimitPbPb; |
886 | fMbins=fCentBins; | |
887 | fQcut=0.1; | |
d3df474e | 888 | //fNormQcutLow = 0.15;// 0.15 |
889 | //fNormQcutHigh = 0.2;// 0.2 | |
78c3bd48 | 890 | fRstartMC = 5.0; |
891 | fQbinsQinv3D = 20; | |
892 | fQupperBoundQinv3D = 0.1; | |
eef1e577 | 893 | }else {// pPb & pp |
be9ef9f9 | 894 | fMultLimit=kMultLimitpp; |
0207c034 | 895 | fMbins=1; |
be9ef9f9 | 896 | fQcut=0.6; |
d3df474e | 897 | //fNormQcutLow = 0.6;// was 1.0 |
898 | //fNormQcutHigh = 0.8;// was 1.5 | |
78c3bd48 | 899 | fRstartMC = 1.0; |
900 | fQbinsQinv3D = 60; | |
901 | fQupperBoundQinv3D = 0.6; | |
be9ef9f9 | 902 | } |
903 | ||
904 | fQLowerCut = 0.005;// was 0.005 | |
905 | fKupperBound = 1.0; | |
906 | // | |
907 | fKstepY[0] = 1.6; | |
908 | fKmeanY[0] = 0;// central y | |
909 | fKmiddleY[0] = 0; | |
910 | ||
911 | // 4x1 (Kt: 0-0.25, 0.25-0.35, 0.35-0.45, 0.45-1.0) | |
912 | if(fKbinsT==4){ | |
913 | fKstepT[0] = 0.25; fKstepT[1] = 0.1; fKstepT[2] = 0.1; fKstepT[3] = 0.55; | |
914 | fKmeanT[0] = 0.212; fKmeanT[1] = 0.299; fKmeanT[2] = 0.398; fKmeanT[3] = 0.576; | |
915 | fKmiddleT[0] = 0.125; fKmiddleT[1] = 0.3; fKmiddleT[2] = 0.4; fKmiddleT[3] = 0.725; | |
916 | } | |
917 | // 3x1 (Kt: 0-0.3, 0.3-0.45, 0.45-1.0) | |
918 | if(fKbinsT==3){ | |
919 | fKstepT[0] = 0.3; fKstepT[1] = 0.15; fKstepT[2] = 0.55; | |
920 | fKmeanT[0] = 0.240; fKmeanT[1] = 0.369; fKmeanT[2] = 0.576; | |
921 | fKmiddleT[0] = 0.15; fKmiddleT[1] = 0.375; fKmiddleT[2] = 0.725; | |
922 | } | |
923 | // 2x1 (Kt: 0-0.35, 0.35-1.0) | |
924 | if(fKbinsT==2){ | |
925 | fKstepT[0] = 0.35; fKstepT[1] = 0.65; | |
926 | fKmeanT[0] = 0.264; fKmeanT[1] = 0.500; | |
927 | fKmiddleT[0] = 0.175; fKmiddleT[1] = 0.675; | |
928 | } | |
929 | ||
930 | // | |
931 | fQupperBoundWeights = 0.2; | |
932 | fQupperBoundQ2 = 2.0; | |
5591748e | 933 | fQupperBoundQ3 = 0.6; |
934 | fQupperBoundQ4 = 0.6; | |
0c82e40e | 935 | fQbinsQ2 = int(fQupperBoundQ2/0.005); |
936 | fQbinsQ3 = int(fQupperBoundQ3/0.005); | |
937 | fQbinsQ4 = int(fQupperBoundQ4/0.005); | |
be9ef9f9 | 938 | fQstepWeights = fQupperBoundWeights/Float_t(kQbinsWeights); |
939 | for(Int_t i=0; i<kQbinsWeights; i++) {fQmean[i]=(i+0.5)*fQstepWeights;} | |
940 | // | |
941 | fDampStart = 0.5;// was 0.3, then 0.5 | |
942 | fDampStep = 0.02; | |
943 | ||
944 | // | |
be9ef9f9 | 945 | |
946 | fEC = new AliFourPionEventCollection **[fZvertexBins]; | |
947 | for(UShort_t i=0; i<fZvertexBins; i++){ | |
948 | ||
0207c034 | 949 | fEC[i] = new AliFourPionEventCollection *[fMbinsMixing]; |
be9ef9f9 | 950 | |
0207c034 | 951 | for(UShort_t j=0; j<fMbinsMixing; j++){ |
be9ef9f9 | 952 | |
953 | fEC[i][j] = new AliFourPionEventCollection(fEventsToMix+1, fMultLimit, kMCarrayLimit, fMCcase); | |
954 | } | |
955 | } | |
956 | ||
b71263d0 | 957 | for(Int_t i=0; i<kMultLimitPbPb; i++) fDefaultsCharSwitch[i]='0'; |
958 | for(Int_t i=0; i<kMultLimitPbPb; i++) { | |
959 | fLowQPairSwitch_E0E0[i] = new TArrayC(kMultLimitPbPb,fDefaultsCharSwitch); | |
960 | fLowQPairSwitch_E0E1[i] = new TArrayC(kMultLimitPbPb,fDefaultsCharSwitch); | |
961 | fLowQPairSwitch_E0E2[i] = new TArrayC(kMultLimitPbPb,fDefaultsCharSwitch); | |
962 | fLowQPairSwitch_E0E3[i] = new TArrayC(kMultLimitPbPb,fDefaultsCharSwitch); | |
6bb6954b | 963 | fLowQPairSwitch_E1E1[i] = new TArrayC(kMultLimitPbPb,fDefaultsCharSwitch); |
b71263d0 | 964 | fLowQPairSwitch_E1E2[i] = new TArrayC(kMultLimitPbPb,fDefaultsCharSwitch); |
965 | fLowQPairSwitch_E1E3[i] = new TArrayC(kMultLimitPbPb,fDefaultsCharSwitch); | |
966 | fLowQPairSwitch_E2E3[i] = new TArrayC(kMultLimitPbPb,fDefaultsCharSwitch); | |
967 | // | |
968 | fNormQPairSwitch_E0E0[i] = new TArrayC(kMultLimitPbPb,fDefaultsCharSwitch); | |
969 | fNormQPairSwitch_E0E1[i] = new TArrayC(kMultLimitPbPb,fDefaultsCharSwitch); | |
970 | fNormQPairSwitch_E0E2[i] = new TArrayC(kMultLimitPbPb,fDefaultsCharSwitch); | |
971 | fNormQPairSwitch_E0E3[i] = new TArrayC(kMultLimitPbPb,fDefaultsCharSwitch); | |
6bb6954b | 972 | fNormQPairSwitch_E1E1[i] = new TArrayC(kMultLimitPbPb,fDefaultsCharSwitch); |
b71263d0 | 973 | fNormQPairSwitch_E1E2[i] = new TArrayC(kMultLimitPbPb,fDefaultsCharSwitch); |
974 | fNormQPairSwitch_E1E3[i] = new TArrayC(kMultLimitPbPb,fDefaultsCharSwitch); | |
975 | fNormQPairSwitch_E2E3[i] = new TArrayC(kMultLimitPbPb,fDefaultsCharSwitch); | |
976 | } | |
be9ef9f9 | 977 | |
978 | fTempStruct = new AliFourPionTrackStruct[fMultLimit]; | |
b71263d0 | 979 | |
980 | ||
be9ef9f9 | 981 | fTrueMassP=0.93827, fTrueMassPi=0.13957, fTrueMassK=0.493677, fTrueMassKs=0.497614, fTrueMassLam=1.11568; |
be9ef9f9 | 982 | |
983 | ||
55e482b6 | 984 | // Set weights, Coulomb corrections, etc. if not in LEGO train |
985 | if(!fLEGO) { | |
986 | SetFSICorrelations(fLEGO);// Read in 2-particle and 3-particle FSI correlations | |
987 | if(!fTabulatePairs) SetWeightArrays(fLEGO);// Set Weight Array | |
988 | if(!fMCcase && !fTabulatePairs) SetMomResCorrections(fLEGO);// Read Momentum resolution file | |
989 | if(!fMCcase && !fTabulatePairs) SetMuonCorrections(fLEGO);// Read Muon corrections | |
990 | if(!fMCcase && !fTabulatePairs) Setc3FitEAs(fLEGO);// Read EAs from c3 fits | |
991 | } | |
17e6b26c | 992 | |
55e482b6 | 993 | |
994 | ||
ebd00f1b | 995 | // Pair-Exchange amplitudes from c3 fits |
233f4fe1 | 996 | TString *EWequation = new TString("[0]*exp(-pow(x*[1]/0.19733,2)/2.) * ( 1 + [2]/(6.*pow(2.,1.5))*(8*pow(x*[1]/0.19733,3) - 12*pow(x*[1]/0.19733,1)) + [3]/(24.*pow(2.,2))*(16*pow(x*[1]/0.19733,4) -48*pow(x*[1]/0.19733,2) + 12) + [4]/(120.*pow(2.,2.5))*(32.*pow(x*[1]/0.19733,5) - 160.*pow(x*[1]/0.19733,3) + 120*x*[1]/0.19733))"); |
ebd00f1b | 997 | TString *LGequation = new TString("[0]*exp(-x*[1]/0.19733/2.) * ( 1 + [2]*(x*[1]/0.19733 - 1) + [3]/2.*(pow(x*[1]/0.19733,2) - 4*x*[1]/0.19733 + 2) + [4]/6.*(-pow(x*[1]/0.19733,3) + 9*pow(x*[1]/0.19733,2) - 18*x*[1]/0.19733 + 6))"); |
70a43d86 | 998 | |
17e6b26c | 999 | if(!fMCcase && !fTabulatePairs){ |
70a43d86 | 1000 | for(Int_t FT=0; FT<2; FT++){// c3 or C3 |
1001 | for(Int_t i=0; i<7; i++){// Rcoh index | |
1002 | for(Int_t j=0; j<50; j++){// G index | |
1003 | TString *nameEA=new TString("ExchangeAmp"); | |
1004 | *nameEA += FT; | |
1005 | *nameEA += i; | |
1006 | *nameEA += j; | |
1007 | if(fEAtype==0) ExchangeAmp[i][j][FT] = new TF1(nameEA->Data(), EWequation->Data(), 0,1.0);// Edgeworth | |
1008 | else ExchangeAmp[i][j][FT] = new TF1(nameEA->Data(), LGequation->Data(), 0,1.0);// Laguerre | |
1009 | // | |
1010 | if(fCollisionType==0){ | |
1011 | ExchangeAmp[i][j][FT]->FixParameter(0, fPbPbc3FitEA[FT]->GetBinContent(i+1, 1, j+1)); | |
1012 | ExchangeAmp[i][j][FT]->FixParameter(1, fPbPbc3FitEA[FT]->GetBinContent(i+1, 2, j+1)); | |
1013 | ExchangeAmp[i][j][FT]->FixParameter(2, fPbPbc3FitEA[FT]->GetBinContent(i+1, 3, j+1)); | |
1014 | ExchangeAmp[i][j][FT]->FixParameter(3, fPbPbc3FitEA[FT]->GetBinContent(i+1, 4, j+1)); | |
1015 | ExchangeAmp[i][j][FT]->FixParameter(4, 0); | |
1016 | }else if(fCollisionType==1){ | |
1017 | ExchangeAmp[i][j][FT]->FixParameter(0, fpPbc3FitEA[FT]->GetBinContent(i+1, 1, j+1)); | |
1018 | ExchangeAmp[i][j][FT]->FixParameter(1, fpPbc3FitEA[FT]->GetBinContent(i+1, 2, j+1)); | |
1019 | ExchangeAmp[i][j][FT]->FixParameter(2, fpPbc3FitEA[FT]->GetBinContent(i+1, 3, j+1)); | |
1020 | ExchangeAmp[i][j][FT]->FixParameter(3, fpPbc3FitEA[FT]->GetBinContent(i+1, 4, j+1)); | |
1021 | ExchangeAmp[i][j][FT]->FixParameter(4, 0); | |
1022 | }else{ | |
1023 | ExchangeAmp[i][j][FT]->FixParameter(0, fppc3FitEA[FT]->GetBinContent(i+1, 1, j+1)); | |
1024 | ExchangeAmp[i][j][FT]->FixParameter(1, fppc3FitEA[FT]->GetBinContent(i+1, 2, j+1)); | |
1025 | ExchangeAmp[i][j][FT]->FixParameter(2, fppc3FitEA[FT]->GetBinContent(i+1, 3, j+1)); | |
1026 | ExchangeAmp[i][j][FT]->FixParameter(3, fppc3FitEA[FT]->GetBinContent(i+1, 4, j+1)); | |
1027 | ExchangeAmp[i][j][FT]->FixParameter(4, 0); | |
1028 | } | |
17e6b26c | 1029 | } |
55e482b6 | 1030 | } |
ebd00f1b | 1031 | } |
1032 | } | |
be9ef9f9 | 1033 | ///////////////////////////////////////////// |
1034 | ///////////////////////////////////////////// | |
70a43d86 | 1035 | |
be9ef9f9 | 1036 | } |
1037 | //________________________________________________________________________ | |
1038 | void AliFourPion::UserCreateOutputObjects() | |
1039 | { | |
1040 | // Create histograms | |
1041 | // Called once | |
1042 | ||
1043 | ParInit();// Initialize my settings | |
1044 | ||
1045 | ||
1046 | fOutputList = new TList(); | |
1047 | fOutputList->SetOwner(); | |
1048 | ||
0c82e40e | 1049 | TH3F *fVertexDist = new TH3F("fVertexDist","Vertex Distribution",20,-1.,1., 20,-1.,1., 600,-30.,30.); |
be9ef9f9 | 1050 | fVertexDist->GetXaxis()->SetTitle("X Vertex (cm)"); |
1051 | fVertexDist->GetYaxis()->SetTitle("Y Vertex (cm)"); | |
1052 | fVertexDist->GetZaxis()->SetTitle("Z Vertex (cm)"); | |
1053 | fOutputList->Add(fVertexDist); | |
1054 | ||
1055 | ||
0c82e40e | 1056 | TH2F *fDCAxyDistPlus = new TH2F("fDCAxyDistPlus","DCA distribution",300,0.,3., 50,0.,5.); |
be9ef9f9 | 1057 | fOutputList->Add(fDCAxyDistPlus); |
0c82e40e | 1058 | TH2F *fDCAzDistPlus = new TH2F("fDCAzDistPlus","DCA distribution",300,0.,3., 50,0.,5.); |
be9ef9f9 | 1059 | fOutputList->Add(fDCAzDistPlus); |
0c82e40e | 1060 | TH2F *fDCAxyDistMinus = new TH2F("fDCAxyDistMinus","DCA distribution",300,0.,3., 50,0.,5.); |
be9ef9f9 | 1061 | fOutputList->Add(fDCAxyDistMinus); |
0c82e40e | 1062 | TH2F *fDCAzDistMinus = new TH2F("fDCAzDistMinus","DCA distribution",300,0.,3., 50,0.,5.); |
be9ef9f9 | 1063 | fOutputList->Add(fDCAzDistMinus); |
1064 | ||
1065 | ||
1066 | TH1F *fEvents1 = new TH1F("fEvents1","Events vs. fMbin",fMbins,.5,fMbins+.5); | |
1067 | fOutputList->Add(fEvents1); | |
1068 | TH1F *fEvents2 = new TH1F("fEvents2","Events vs. fMbin",fMbins,.5,fMbins+.5); | |
1069 | fOutputList->Add(fEvents2); | |
1070 | ||
1071 | TH1F *fMultDist0 = new TH1F("fMultDist0","Multiplicity Distribution",fMultLimit,-.5,fMultLimit-.5); | |
1072 | fMultDist0->GetXaxis()->SetTitle("Multiplicity"); | |
1073 | fOutputList->Add(fMultDist0); | |
1074 | ||
1075 | TH1F *fMultDist1 = new TH1F("fMultDist1","Multiplicity Distribution",fMultLimit,-.5,fMultLimit-.5); | |
1076 | fMultDist1->GetXaxis()->SetTitle("Multiplicity"); | |
1077 | fOutputList->Add(fMultDist1); | |
1078 | ||
1079 | TH1F *fMultDist2 = new TH1F("fMultDist2","Multiplicity Distribution",fMultLimit,-.5,fMultLimit-.5); | |
1080 | fMultDist2->GetXaxis()->SetTitle("Multiplicity"); | |
1081 | fOutputList->Add(fMultDist2); | |
1082 | ||
1083 | TH1F *fMultDist3 = new TH1F("fMultDist3","Multiplicity Distribution",fMultLimit,-.5,fMultLimit-.5); | |
1084 | fMultDist3->GetXaxis()->SetTitle("Multiplicity"); | |
1085 | fOutputList->Add(fMultDist3); | |
1086 | ||
0c82e40e | 1087 | TH3F *fChPtEtaDist = new TH3F("fChPtEtaDist","fChPtEtaDist",2,-1.1,1.1, 300,0.,3., 28,-1.4,1.4); |
0207c034 | 1088 | fOutputList->Add(fChPtEtaDist); |
0c82e40e | 1089 | TH3F *fChPhiPtDist = new TH3F("fChPhiPtDist","fChPhiPtDist",2,-1.1,1.1, 120,0.,2*PI, 300,0.,3.); |
0207c034 | 1090 | fOutputList->Add(fChPhiPtDist); |
be9ef9f9 | 1091 | |
0207c034 | 1092 | TH2F *fCentEtaDist = new TH2F("fCentEtaDist","",10,-.5,9.5, 28,-1.4,1.4); |
1093 | fOutputList->Add(fCentEtaDist); | |
0c82e40e | 1094 | TH2F *fCentPtDist = new TH2F("fCentPtDist","",10,-.5,9.5, 600,0.,3.); |
0207c034 | 1095 | fOutputList->Add(fCentPtDist); |
1096 | ||
0c82e40e | 1097 | TH3F *fTOFResponse = new TH3F("fTOFResponse","TOF relative time",20,0.,100., 200,0.,2., 4000,-20000.,20000.); |
be9ef9f9 | 1098 | fOutputList->Add(fTOFResponse); |
0c82e40e | 1099 | TH3F *fTPCResponse = new TH3F("fTPCResponse","TPCsignal",20,0.,100., 200,0.,2., 1000,0.,1000.); |
be9ef9f9 | 1100 | fOutputList->Add(fTPCResponse); |
1101 | ||
0c82e40e | 1102 | TH1F *fRejectedPairs = new TH1F("fRejectedPairs","",400,0.,2.); |
be9ef9f9 | 1103 | fOutputList->Add(fRejectedPairs); |
0c82e40e | 1104 | TH1F *fRejectedPairsWeighting = new TH1F("fAcceptedPairsWeighting","",400,0.,2.); |
fac2d84b | 1105 | fOutputList->Add(fRejectedPairsWeighting); |
0c82e40e | 1106 | TH1F *fTotalPairsWeighting = new TH1F("fTotalPairsWeighting","",400,0.,2.); |
fac2d84b | 1107 | fOutputList->Add(fTotalPairsWeighting); |
1108 | // | |
0c82e40e | 1109 | TH1F *fRejectedPairsMC = new TH1F("fRejectedPairsMC","",400,0.,2.); |
fac2d84b | 1110 | fOutputList->Add(fRejectedPairsMC); |
0c82e40e | 1111 | TH1F *fRejectedPairsWeightingMC = new TH1F("fAcceptedPairsWeightingMC","",400,0.,2.); |
fac2d84b | 1112 | fOutputList->Add(fRejectedPairsWeightingMC); |
0c82e40e | 1113 | TH1F *fTotalPairsWeightingMC = new TH1F("fTotalPairsWeightingMC","",400,0.,2.); |
fac2d84b | 1114 | fOutputList->Add(fTotalPairsWeightingMC); |
1115 | ||
be9ef9f9 | 1116 | TH1I *fRejectedEvents = new TH1I("fRejectedEvents","",fMbins,0.5,fMbins+.5); |
1117 | fOutputList->Add(fRejectedEvents); | |
fac2d84b | 1118 | |
be9ef9f9 | 1119 | TH3F *fPairsDetaDPhiNum = new TH3F("fPairsDetaDPhiNum","",10,-.5,9.5, 200,-0.2,0.2, 600,-0.3,0.3); |
1120 | if(fMCcase) fOutputList->Add(fPairsDetaDPhiNum); | |
1121 | TH3F *fPairsDetaDPhiDen = new TH3F("fPairsDetaDPhiDen","",10,-.5,9.5, 200,-0.2,0.2, 600,-0.3,0.3); | |
1122 | if(fMCcase) fOutputList->Add(fPairsDetaDPhiDen); | |
0c82e40e | 1123 | TH3F *fPairsShareFracDPhiNum = new TH3F("fPairsShareFracDPhiNum","",10,-.5,9.5, 159,0.,1., 600,-0.3,0.3); |
be9ef9f9 | 1124 | if(fMCcase) fOutputList->Add(fPairsShareFracDPhiNum); |
0c82e40e | 1125 | TH3F *fPairsShareFracDPhiDen = new TH3F("fPairsShareFracDPhiDen","",10,-.5,9.5, 159,0.,1., 600,-0.3,0.3); |
be9ef9f9 | 1126 | if(fMCcase) fOutputList->Add(fPairsShareFracDPhiDen); |
0c82e40e | 1127 | TH3D* fPairsPadRowNum = new TH3D("fPairsPadRowNum","", 20,0.,1., 159,0.,1., 40,0.,0.2); |
be9ef9f9 | 1128 | if(fMCcase) fOutputList->Add(fPairsPadRowNum); |
0c82e40e | 1129 | TH3D* fPairsPadRowDen = new TH3D("fPairsPadRowDen","", 20,0.,1., 159,0.,1., 40,0.,0.2); |
be9ef9f9 | 1130 | if(fMCcase) fOutputList->Add(fPairsPadRowDen); |
1131 | ||
1132 | ||
1133 | ||
0c82e40e | 1134 | TH2D *fResonanceOSPairs = new TH2D("fResonanceOSPairs","",fMbins,.5,fMbins+.5, 1000,0.,2.); |
be9ef9f9 | 1135 | if(fMCcase) fOutputList->Add(fResonanceOSPairs); |
0c82e40e | 1136 | TH2D *fAllOSPairs = new TH2D("fAllOSPairs","",fMbins,.5,fMbins+.5, 1000,0.,2.); |
be9ef9f9 | 1137 | if(fMCcase) fOutputList->Add(fAllOSPairs); |
1138 | ||
0c82e40e | 1139 | TH3D *fPrimarySCPionPairs = new TH3D("fPrimarySCPionPairs","",fMbins,.5,fMbins+.5, 20,0.,1., 20,0.,0.2); |
be9ef9f9 | 1140 | if(fMCcase) fOutputList->Add(fPrimarySCPionPairs); |
0c82e40e | 1141 | TH3D *fAllSCPionPairs = new TH3D("fAllSCPionPairs","",fMbins,.5,fMbins+.5, 20,0.,1., 20,0,0.2); |
be9ef9f9 | 1142 | if(fMCcase) fOutputList->Add(fAllSCPionPairs); |
0c82e40e | 1143 | TH3D *fPrimaryMCPionPairs = new TH3D("fPrimaryMCPionPairs","",fMbins,.5,fMbins+.5, 20,0.,1., 20,0.,0.2); |
be9ef9f9 | 1144 | if(fMCcase) fOutputList->Add(fPrimaryMCPionPairs); |
0c82e40e | 1145 | TH3D *fAllMCPionPairs = new TH3D("fAllMCPionPairs","",fMbins,.5,fMbins+.5, 20,0.,1., 20,0.,0.2); |
be9ef9f9 | 1146 | if(fMCcase) fOutputList->Add(fAllMCPionPairs); |
1147 | ||
1148 | // | |
1149 | TH1D *fMuonParents = new TH1D("fMuonParents","",500,0.5,500.5); | |
1150 | if(fMCcase) fOutputList->Add(fMuonParents); | |
1151 | TH1D *fSecondaryMuonParents = new TH1D("fSecondaryMuonParents","",500,0.5,500.5); | |
1152 | if(fMCcase) fOutputList->Add(fSecondaryMuonParents); | |
0c82e40e | 1153 | TH3D *fMuonPionDeltaQinv = new TH3D("fMuonPionDeltaQinv","",2,-0.5,1.5, 20,0.,1., 100,-0.2,0.2); |
be9ef9f9 | 1154 | if(fMCcase) fOutputList->Add(fMuonPionDeltaQinv); |
1155 | TH1D *fPionCandidates = new TH1D("fPionCandidates","",500,0.5,500.5); | |
1156 | if(fMCcase) fOutputList->Add(fPionCandidates); | |
1157 | // | |
1158 | ||
1159 | ||
1160 | TProfile *fAvgMult = new TProfile("fAvgMult","",fMbins,.5,fMbins+.5, 0,1500,""); | |
1161 | fOutputList->Add(fAvgMult); | |
1162 | ||
0c82e40e | 1163 | TH2D *fTrackChi2NDF = new TH2D("fTrackChi2NDF","",20,0.,100., 100,0.,10.); |
be9ef9f9 | 1164 | fOutputList->Add(fTrackChi2NDF); |
0c82e40e | 1165 | TH2D *fTrackTPCncls = new TH2D("fTrackTPCncls","",20,0.,100., 110,50.,160.); |
be9ef9f9 | 1166 | fOutputList->Add(fTrackTPCncls); |
1167 | ||
1168 | ||
0c82e40e | 1169 | TH1D *fTPNRejects3pion1 = new TH1D("fTPNRejects3pion1","",fQbinsQ3,0.,fQupperBoundQ3); |
be9ef9f9 | 1170 | fOutputList->Add(fTPNRejects3pion1); |
0c82e40e | 1171 | TH1D *fTPNRejects3pion2 = new TH1D("fTPNRejects3pion2","",fQbinsQ3,0.,fQupperBoundQ3); |
be9ef9f9 | 1172 | fOutputList->Add(fTPNRejects3pion2); |
0c82e40e | 1173 | TH1D *fTPNRejects4pion1 = new TH1D("fTPNRejects4pion1","",fQbinsQ4,0.,fQupperBoundQ4); |
be9ef9f9 | 1174 | fOutputList->Add(fTPNRejects4pion1); |
1175 | ||
0c82e40e | 1176 | TH3D *fKT3DistTerm1 = new TH3D("fKT3DistTerm1","",fMbins,.5,fMbins+.5, 20,0.,1., 20,0.,0.2); |
1177 | TH3D *fKT3DistTerm5 = new TH3D("fKT3DistTerm5","",fMbins,.5,fMbins+.5, 20,0.,1., 20,0.,0.2); | |
be9ef9f9 | 1178 | fOutputList->Add(fKT3DistTerm1); |
1179 | fOutputList->Add(fKT3DistTerm5); | |
0c82e40e | 1180 | TH3D *fKT4DistTerm1 = new TH3D("fKT4DistTerm1","",fMbins,.5,fMbins+.5, 20,0.,1., 20,0.,0.2); |
1181 | TH3D *fKT4DistTerm13 = new TH3D("fKT4DistTerm13","",fMbins,.5,fMbins+.5, 20,0.,1., 20,0.,0.2); | |
be9ef9f9 | 1182 | fOutputList->Add(fKT4DistTerm1); |
6bb6954b | 1183 | fOutputList->Add(fKT4DistTerm13); |
be9ef9f9 | 1184 | |
1185 | ||
1186 | TProfile2D *fKT3AvgpT = new TProfile2D("fKT3AvgpT","",fMbins,.5,fMbins+.5, 2,-0.5,1.5, 0.,1.0,""); | |
1187 | fOutputList->Add(fKT3AvgpT); | |
1188 | TProfile2D *fKT4AvgpT = new TProfile2D("fKT4AvgpT","",fMbins,.5,fMbins+.5, 2,-0.5,1.5, 0.,1.0,""); | |
1189 | fOutputList->Add(fKT4AvgpT); | |
4bf06935 | 1190 | TH3D* fQ3AvgpTENsum0 = new TH3D("fQ3AvgpTENsum0","", 2,-0.5,1.5, fQbinsQ3,0,fQupperBoundQ3, 180,0.1,1.0); |
1191 | fOutputList->Add(fQ3AvgpTENsum0); | |
1192 | TH3D* fQ3AvgpTENsum3 = new TH3D("fQ3AvgpTENsum3","", 2,-0.5,1.5, fQbinsQ3,0,fQupperBoundQ3, 180,0.1,1.0); | |
1193 | fOutputList->Add(fQ3AvgpTENsum3); | |
1194 | TH3D* fQ3AvgpTENsum6 = new TH3D("fQ3AvgpTENsum6","", 2,-0.5,1.5, fQbinsQ3,0,fQupperBoundQ3, 180,0.1,1.0); | |
1195 | fOutputList->Add(fQ3AvgpTENsum6); | |
1196 | // | |
1197 | TH3D* fQ4AvgpTENsum0 = new TH3D("fQ4AvgpTENsum0","", 2,-0.5,1.5, fQbinsQ4,0,fQupperBoundQ4, 180,0.1,1.0); | |
1198 | fOutputList->Add(fQ4AvgpTENsum0); | |
1199 | TH3D* fQ4AvgpTENsum1 = new TH3D("fQ4AvgpTENsum1","", 2,-0.5,1.5, fQbinsQ4,0,fQupperBoundQ4, 180,0.1,1.0); | |
1200 | fOutputList->Add(fQ4AvgpTENsum1); | |
1201 | TH3D* fQ4AvgpTENsum2 = new TH3D("fQ4AvgpTENsum2","", 2,-0.5,1.5, fQbinsQ4,0,fQupperBoundQ4, 180,0.1,1.0); | |
1202 | fOutputList->Add(fQ4AvgpTENsum2); | |
1203 | TH3D* fQ4AvgpTENsum3 = new TH3D("fQ4AvgpTENsum3","", 2,-0.5,1.5, fQbinsQ4,0,fQupperBoundQ4, 180,0.1,1.0); | |
1204 | fOutputList->Add(fQ4AvgpTENsum3); | |
1205 | TH3D* fQ4AvgpTENsum6 = new TH3D("fQ4AvgpTENsum6","", 2,-0.5,1.5, fQbinsQ4,0,fQupperBoundQ4, 180,0.1,1.0); | |
1206 | fOutputList->Add(fQ4AvgpTENsum6); | |
be9ef9f9 | 1207 | |
0c82e40e | 1208 | TH1D *fMCWeight3DTerm1SC = new TH1D("fMCWeight3DTerm1SC","", 20,0.,0.2); |
1209 | TH1D *fMCWeight3DTerm1SCden = new TH1D("fMCWeight3DTerm1SCden","", 20,0.,0.2); | |
1210 | TH1D *fMCWeight3DTerm2SC = new TH1D("fMCWeight3DTerm2SC","", 20,0.,0.2); | |
1211 | TH1D *fMCWeight3DTerm2SCden = new TH1D("fMCWeight3DTerm2SCden","", 20,0.,0.2); | |
1212 | TH1D *fMCWeight3DTerm1MC = new TH1D("fMCWeight3DTerm1MC","", 20,0.,0.2); | |
1213 | TH1D *fMCWeight3DTerm1MCden = new TH1D("fMCWeight3DTerm1MCden","", 20,0.,0.2); | |
1214 | TH1D *fMCWeight3DTerm2MC = new TH1D("fMCWeight3DTerm2MC","", 20,0.,0.2); | |
1215 | TH1D *fMCWeight3DTerm2MCden = new TH1D("fMCWeight3DTerm2MCden","", 20,0.,0.2); | |
1216 | TH1D *fMCWeight3DTerm3MC = new TH1D("fMCWeight3DTerm3MC","", 20,0.,0.2); | |
1217 | TH1D *fMCWeight3DTerm3MCden = new TH1D("fMCWeight3DTerm3MCden","", 20,0.,0.2); | |
1218 | TH1D *fMCWeight3DTerm4MC = new TH1D("fMCWeight3DTerm4MC","", 20,0.,0.2); | |
1219 | TH1D *fMCWeight3DTerm4MCden = new TH1D("fMCWeight3DTerm4MCden","", 20,0.,0.2); | |
be9ef9f9 | 1220 | fOutputList->Add(fMCWeight3DTerm1SC); |
1221 | fOutputList->Add(fMCWeight3DTerm1SCden); | |
1222 | fOutputList->Add(fMCWeight3DTerm2SC); | |
1223 | fOutputList->Add(fMCWeight3DTerm2SCden); | |
1224 | fOutputList->Add(fMCWeight3DTerm1MC); | |
1225 | fOutputList->Add(fMCWeight3DTerm1MCden); | |
1226 | fOutputList->Add(fMCWeight3DTerm2MC); | |
1227 | fOutputList->Add(fMCWeight3DTerm2MCden); | |
1228 | fOutputList->Add(fMCWeight3DTerm3MC); | |
1229 | fOutputList->Add(fMCWeight3DTerm3MCden); | |
1230 | fOutputList->Add(fMCWeight3DTerm4MC); | |
1231 | fOutputList->Add(fMCWeight3DTerm4MCden); | |
1232 | ||
1233 | ||
6432c081 | 1234 | |
1235 | for(Int_t mb=0; mb<fMbins; mb++){ | |
ebd00f1b | 1236 | if(fCollisionType==0) {if((mb < fCentBinLowLimit) || (mb > fCentBinHighLimit)) continue;} |
be9ef9f9 | 1237 | |
6432c081 | 1238 | for(Int_t edB=0; edB<fEDbins; edB++){ |
1239 | for(Int_t c1=0; c1<2; c1++){ | |
1240 | for(Int_t c2=0; c2<2; c2++){ | |
1241 | for(Int_t term=0; term<2; term++){ | |
1242 | ||
1243 | TString *nameEx2 = new TString("TwoParticle_Charge1_"); | |
1244 | *nameEx2 += c1; | |
1245 | nameEx2->Append("_Charge2_"); | |
1246 | *nameEx2 += c2; | |
1247 | nameEx2->Append("_M_"); | |
1248 | *nameEx2 += mb; | |
1249 | nameEx2->Append("_ED_"); | |
1250 | *nameEx2 += edB; | |
1251 | nameEx2->Append("_Term_"); | |
1252 | *nameEx2 += term+1; | |
1253 | ||
1254 | if( (c1+c2)==1 ) {if(c1!=0) continue;}// skip degenerate histogram | |
1255 | ||
1256 | ||
0c82e40e | 1257 | Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fTerms2 = new TH2D(nameEx2->Data(),"Two Particle Distribution",20,0.,1., fQbinsQ2,0.,fQupperBoundQ2); |
6432c081 | 1258 | fOutputList->Add(Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fTerms2); |
1259 | TString *nameEx2QW=new TString(nameEx2->Data()); | |
1260 | nameEx2QW->Append("_QW"); | |
0c82e40e | 1261 | Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fTerms2QW = new TH2D(nameEx2QW->Data(),"Two Particle Distribution",20,0.,1., fQbinsQ2,0.,fQupperBoundQ2); |
6432c081 | 1262 | fOutputList->Add(Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fTerms2QW); |
1263 | TString *nameAvgP=new TString(nameEx2->Data()); | |
1264 | nameAvgP->Append("_AvgP"); | |
0c82e40e | 1265 | Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fAvgP = new TProfile2D(nameAvgP->Data(),"",10,0.,1, fQbinsQ2,0.,fQupperBoundQ2, 0.,1.0,""); |
6432c081 | 1266 | fOutputList->Add(Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fAvgP); |
1267 | ||
1268 | TString *nameUnitMult=new TString(nameEx2->Data()); | |
1269 | nameUnitMult->Append("_UnitMult"); | |
0c82e40e | 1270 | Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fUnitMultBin = new TH2D(nameUnitMult->Data(),"Two Particle Distribution",21,0.5,21.5, fQbinsQ2,0.,fQupperBoundQ2); |
6432c081 | 1271 | fOutputList->Add(Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fUnitMultBin); |
1272 | ||
1273 | if(fMCcase){ | |
1274 | // Momentum resolution histos | |
1275 | TString *nameIdeal = new TString(nameEx2->Data()); | |
1276 | nameIdeal->Append("_Ideal"); | |
0c82e40e | 1277 | Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fIdeal = new TH2D(nameIdeal->Data(),"Two Particle Distribution",11,0.5,11.5, fQbinsQ2,0.,fQupperBoundQ2); |
6432c081 | 1278 | if(mb==0) fOutputList->Add(Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fIdeal); |
1279 | TString *nameSmeared = new TString(nameEx2->Data()); | |
1280 | nameSmeared->Append("_Smeared"); | |
0c82e40e | 1281 | Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fSmeared = new TH2D(nameSmeared->Data(),"Two Particle Distribution",11,0.5,11.5, fQbinsQ2,0.,fQupperBoundQ2); |
6432c081 | 1282 | if(mb==0) fOutputList->Add(Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fSmeared); |
1283 | // | |
1284 | // Muon correction histos | |
1285 | TString *nameMuonIdeal=new TString(nameEx2->Data()); | |
1286 | nameMuonIdeal->Append("_MuonIdeal"); | |
0c82e40e | 1287 | Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fMuonIdeal = new TH2D(nameMuonIdeal->Data(),"", 11,0.5,11.5, fQbinsQ2,0.,fQupperBoundQ2); |
6432c081 | 1288 | if(mb==0 && edB==0) fOutputList->Add(Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fMuonIdeal); |
1289 | TString *nameMuonSmeared=new TString(nameEx2->Data()); | |
1290 | nameMuonSmeared->Append("_MuonSmeared"); | |
0c82e40e | 1291 | Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fMuonSmeared = new TH2D(nameMuonSmeared->Data(),"", 11,0.5,11.5, fQbinsQ2,0.,fQupperBoundQ2); |
6432c081 | 1292 | if(mb==0 && edB==0) fOutputList->Add(Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fMuonSmeared); |
1293 | // | |
1294 | TString *nameMuonPionK2=new TString(nameEx2->Data()); | |
1295 | nameMuonPionK2->Append("_MuonPionK2"); | |
0c82e40e | 1296 | Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fMuonPionK2 = new TH2D(nameMuonPionK2->Data(),"", 11,0.5,11.5, fQbinsQ2,0.,fQupperBoundQ2); |
6432c081 | 1297 | if(mb==0 && edB==0) fOutputList->Add(Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fMuonPionK2); |
1298 | // | |
1299 | TString *namePionPionK2=new TString(nameEx2->Data()); | |
1300 | namePionPionK2->Append("_PionPionK2"); | |
0c82e40e | 1301 | Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fPionPionK2 = new TH2D(namePionPionK2->Data(),"", 11,0.5,11.5, fQbinsQ2,0.,fQupperBoundQ2); |
6432c081 | 1302 | if(mb==0 && edB==0) fOutputList->Add(Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fPionPionK2); |
1303 | // | |
1304 | // | |
1305 | TString *nameEx2MC=new TString(nameEx2->Data()); | |
1306 | nameEx2MC->Append("_MCqinv"); | |
0c82e40e | 1307 | Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fMCqinv = new TH1D(nameEx2MC->Data(),"", fQbinsQ2,0.,fQupperBoundQ2); |
6432c081 | 1308 | fOutputList->Add(Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fMCqinv); |
1309 | TString *nameEx2MCQW=new TString(nameEx2->Data()); | |
1310 | nameEx2MCQW->Append("_MCqinvQW"); | |
0c82e40e | 1311 | Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fMCqinvQW = new TH1D(nameEx2MCQW->Data(),"", fQbinsQ2,0.,fQupperBoundQ2); |
6432c081 | 1312 | fOutputList->Add(Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fMCqinvQW); |
1313 | // | |
1314 | TString *nameEx2PIDpurityDen=new TString(nameEx2->Data()); | |
1315 | nameEx2PIDpurityDen->Append("_PIDpurityDen"); | |
0c82e40e | 1316 | Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fPIDpurityDen = new TH2D(nameEx2PIDpurityDen->Data(),"Two Particle Distribution",20,0.,1, fQbinsQ2,0.,fQupperBoundQ2); |
6432c081 | 1317 | fOutputList->Add(Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fPIDpurityDen); |
1318 | TString *nameEx2PIDpurityNum=new TString(nameEx2->Data()); | |
1319 | nameEx2PIDpurityNum->Append("_PIDpurityNum"); | |
0c82e40e | 1320 | Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fPIDpurityNum = new TH3D(nameEx2PIDpurityNum->Data(),"Two Particle Distribution",16,0.5,16.5, 20,0.,1, fQbinsQ2,0.,fQupperBoundQ2); |
6432c081 | 1321 | fOutputList->Add(Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].fPIDpurityNum); |
1322 | } | |
1323 | TString *nameEx2OSLB1 = new TString(nameEx2->Data()); | |
1324 | nameEx2OSLB1->Append("_osl_b1"); | |
0c82e40e | 1325 | Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].OSL_ktbin[0].fTerms2OSL = new TH3D(nameEx2OSLB1->Data(),"Two Particle Distribution",kQbinsWeights,0.,fQupperBoundWeights, kQbinsWeights,0.,fQupperBoundWeights, kQbinsWeights,0.,fQupperBoundWeights); |
6432c081 | 1326 | fOutputList->Add(Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].OSL_ktbin[0].fTerms2OSL); |
1327 | nameEx2OSLB1->Append("_QW"); | |
0c82e40e | 1328 | Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].OSL_ktbin[0].fTerms2OSLQW = new TH3D(nameEx2OSLB1->Data(),"Two Particle Distribution",kQbinsWeights,0.,fQupperBoundWeights, kQbinsWeights,0.,fQupperBoundWeights, kQbinsWeights,0.,fQupperBoundWeights); |
6432c081 | 1329 | fOutputList->Add(Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].OSL_ktbin[0].fTerms2OSLQW); |
1330 | // | |
1331 | TString *nameEx2OSLB2 = new TString(nameEx2->Data()); | |
1332 | nameEx2OSLB2->Append("_osl_b2"); | |
0c82e40e | 1333 | Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].OSL_ktbin[1].fTerms2OSL = new TH3D(nameEx2OSLB2->Data(),"Two Particle Distribution",kQbinsWeights,0.,fQupperBoundWeights, kQbinsWeights,0.,fQupperBoundWeights, kQbinsWeights,0.,fQupperBoundWeights); |
6432c081 | 1334 | fOutputList->Add(Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].OSL_ktbin[1].fTerms2OSL); |
1335 | nameEx2OSLB2->Append("_QW"); | |
0c82e40e | 1336 | Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].OSL_ktbin[1].fTerms2OSLQW = new TH3D(nameEx2OSLB2->Data(),"Two Particle Distribution",kQbinsWeights,0.,fQupperBoundWeights, kQbinsWeights,0.,fQupperBoundWeights, kQbinsWeights,0.,fQupperBoundWeights); |
6432c081 | 1337 | fOutputList->Add(Charge1[c1].Charge2[c2].MB[mb].EDB[edB].TwoPT[term].OSL_ktbin[1].fTerms2OSLQW); |
1338 | ||
1339 | }// term_2 | |
1340 | ||
1341 | ||
1342 | ||
1343 | // skip 3-particle if Tabulate6DPairs is true | |
1344 | if(fTabulatePairs) continue; | |
1345 | ||
1346 | for(Int_t c3=0; c3<2; c3++){ | |
1347 | for(Int_t term=0; term<5; term++){ | |
be9ef9f9 | 1348 | |
6432c081 | 1349 | TString *namePC3 = new TString("ThreeParticle_Charge1_"); |
1350 | *namePC3 += c1; | |
1351 | namePC3->Append("_Charge2_"); | |
1352 | *namePC3 += c2; | |
1353 | namePC3->Append("_Charge3_"); | |
1354 | *namePC3 += c3; | |
1355 | namePC3->Append("_M_"); | |
1356 | *namePC3 += mb; | |
1357 | namePC3->Append("_ED_"); | |
1358 | *namePC3 += edB; | |
1359 | namePC3->Append("_Term_"); | |
1360 | *namePC3 += term+1; | |
be9ef9f9 | 1361 | |
6432c081 | 1362 | /////////////////////////////////////// |
1363 | // skip degenerate histograms | |
1364 | if( (c1+c2+c3)==1) {if(c3!=1) continue;} | |
1365 | if( (c1+c2+c3)==2) {if(c1!=0) continue;} | |
1366 | ///////////////////////////////////////// | |
be9ef9f9 | 1367 | |
be9ef9f9 | 1368 | |
6432c081 | 1369 | TString *nameNorm=new TString(namePC3->Data()); |
1370 | nameNorm->Append("_Norm"); | |
1371 | Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fNorm3 = new TH1D(nameNorm->Data(),"Norm",1,-0.5,0.5); | |
1372 | fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fNorm3); | |
1373 | // | |
be9ef9f9 | 1374 | |
6432c081 | 1375 | TString *name1DQ=new TString(namePC3->Data()); |
1376 | name1DQ->Append("_1D"); | |
0c82e40e | 1377 | Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fTerms3 = new TH1D(name1DQ->Data(),"", fQbinsQ3,0.,fQupperBoundQ3); |
6432c081 | 1378 | fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fTerms3); |
78c3bd48 | 1379 | if(c1==0 && c2==0 && c3==0){ |
1380 | TString *name3DQ=new TString(namePC3->Data()); | |
1381 | name3DQ->Append("_3D"); | |
0c82e40e | 1382 | Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fTerms33D = new TH3D(name3DQ->Data(),"", fQbinsQinv3D,0.,fQupperBoundQinv3D, fQbinsQinv3D,0.,fQupperBoundQinv3D, fQbinsQinv3D,0.,fQupperBoundQinv3D); |
78c3bd48 | 1383 | fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fTerms33D); |
1384 | } | |
6432c081 | 1385 | // |
1386 | TString *nameKfactor=new TString(namePC3->Data()); | |
1387 | nameKfactor->Append("_Kfactor"); | |
0c82e40e | 1388 | Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fKfactor = new TProfile(nameKfactor->Data(),"", fQbinsQ3,0.,fQupperBoundQ3, 0.,100., ""); |
6432c081 | 1389 | fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fKfactor); |
78c3bd48 | 1390 | if(c1==0 && c2==0 && c3==0){ |
1391 | TString *nameKfactor3D=new TString(namePC3->Data()); | |
1392 | nameKfactor3D->Append("_Kfactor3D"); | |
0c82e40e | 1393 | Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fKfactor3D = new TProfile3D(nameKfactor3D->Data(),"", fQbinsQinv3D,0.,fQupperBoundQinv3D, fQbinsQinv3D,0.,fQupperBoundQinv3D, fQbinsQinv3D,0.,fQupperBoundQinv3D, ""); |
78c3bd48 | 1394 | fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fKfactor3D); |
1395 | } | |
6432c081 | 1396 | // |
80507acf | 1397 | TString *nameKfactorW=new TString(namePC3->Data()); |
1398 | nameKfactorW->Append("_KfactorWeighted"); | |
0c82e40e | 1399 | Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fKfactorWeighted = new TProfile(nameKfactorW->Data(),"", fQbinsQ3,0.,fQupperBoundQ3, 0.,100., ""); |
80507acf | 1400 | fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fKfactorWeighted); |
1401 | // | |
6432c081 | 1402 | TString *nameMeanQinv=new TString(namePC3->Data()); |
1403 | nameMeanQinv->Append("_MeanQinv"); | |
0c82e40e | 1404 | Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fMeanQinv = new TProfile(nameMeanQinv->Data(),"", fQbinsQ3,0.,fQupperBoundQ3, 0.,.2, ""); |
6432c081 | 1405 | fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fMeanQinv); |
1406 | ||
1407 | if(fMCcase==kTRUE){ | |
1408 | // Momentum resolution correction histos | |
1409 | TString *nameMomResIdeal=new TString(namePC3->Data()); | |
1410 | nameMomResIdeal->Append("_Ideal"); | |
0c82e40e | 1411 | Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fIdeal = new TH2D(nameMomResIdeal->Data(),"", 11,0.5,11.5, fQbinsQ3,0.,fQupperBoundQ3); |
6432c081 | 1412 | if(mb==0) fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fIdeal); |
1413 | TString *nameMomResSmeared=new TString(namePC3->Data()); | |
1414 | nameMomResSmeared->Append("_Smeared"); | |
0c82e40e | 1415 | Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fSmeared = new TH2D(nameMomResSmeared->Data(),"", 11,0.5,11.5, fQbinsQ3,0.,fQupperBoundQ3); |
6432c081 | 1416 | if(mb==0) fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fSmeared); |
be9ef9f9 | 1417 | // Muon correction histos |
6432c081 | 1418 | TString *nameMuonIdeal=new TString(namePC3->Data()); |
be9ef9f9 | 1419 | nameMuonIdeal->Append("_MuonIdeal"); |
0c82e40e | 1420 | Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fMuonIdeal = new TH3D(nameMuonIdeal->Data(),"", 2,0.5,2.5, 11,0.5,11.5, fQbinsQ3,0.,fQupperBoundQ3); |
6432c081 | 1421 | if(mb==0 && edB==0 && term<4) fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fMuonIdeal); |
1422 | TString *nameMuonSmeared=new TString(namePC3->Data()); | |
be9ef9f9 | 1423 | nameMuonSmeared->Append("_MuonSmeared"); |
0c82e40e | 1424 | Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fMuonSmeared = new TH3D(nameMuonSmeared->Data(),"", 2,0.5,2.5, 11,0.5,11.5, fQbinsQ3,0.,fQupperBoundQ3); |
6432c081 | 1425 | if(mb==0 && edB==0 && term<4) fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fMuonSmeared); |
be9ef9f9 | 1426 | // |
6432c081 | 1427 | TString *nameMuonPionK3=new TString(namePC3->Data()); |
1428 | nameMuonPionK3->Append("_MuonPionK3"); | |
0c82e40e | 1429 | Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fMuonPionK3 = new TH3D(nameMuonPionK3->Data(),"", 2,0.5,2.5, 11,0.5,11.5, fQbinsQ3,0.,fQupperBoundQ3); |
6432c081 | 1430 | if(mb==0 && edB==0 && term<4) fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fMuonPionK3); |
be9ef9f9 | 1431 | // |
6432c081 | 1432 | TString *namePionPionK3=new TString(namePC3->Data()); |
1433 | namePionPionK3->Append("_PionPionK3"); | |
0c82e40e | 1434 | Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fPionPionK3 = new TH3D(namePionPionK3->Data(),"", 2,0.5,2.5, 11,0.5,11.5, fQbinsQ3,0.,fQupperBoundQ3); |
6432c081 | 1435 | if(mb==0 && edB==0 && term<4) fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fPionPionK3); |
1436 | ||
1437 | }// MCcase | |
1438 | // | |
1439 | if(c1==c2 && c1==c3 && term==4 ){ | |
574647ef | 1440 | TString *nameBuild=new TString(namePC3->Data()); |
1441 | nameBuild->Append("_Build"); | |
1442 | Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fBuild = new TH2D(nameBuild->Data(),"", kDENtypes,0.5,kDENtypes+0.5, fQbinsQ3,0.,fQupperBoundQ3); | |
1443 | fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fBuild); | |
be9ef9f9 | 1444 | // |
574647ef | 1445 | TString *nameBuildNeg=new TString(namePC3->Data()); |
1446 | nameBuildNeg->Append("_BuildNeg"); | |
1447 | Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fBuildNeg = new TH2D(nameBuildNeg->Data(),"", kDENtypes,0.5,kDENtypes+0.5, fQbinsQ3,0.,fQupperBoundQ3); | |
1448 | fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fBuildNeg); | |
be9ef9f9 | 1449 | // |
574647ef | 1450 | TString *nameBuildErr=new TString(namePC3->Data()); |
1451 | nameBuildErr->Append("_BuildErr"); | |
1452 | Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fBuildErr = new TH2D(nameBuildErr->Data(),"", kDENtypes,0.5,kDENtypes+0.5, fQbinsQ3,0.,fQupperBoundQ3); | |
1453 | fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].MB[mb].EDB[edB].ThreePT[term].fBuildErr); | |
6432c081 | 1454 | }// term=4 |
be9ef9f9 | 1455 | |
6432c081 | 1456 | }// term_3 |
be9ef9f9 | 1457 | |
6432c081 | 1458 | for(Int_t c4=0; c4<2; c4++){ |
1459 | for(Int_t term=0; term<13; term++){ | |
1460 | ||
1461 | TString *namePC4 = new TString("FourParticle_Charge1_"); | |
1462 | *namePC4 += c1; | |
1463 | namePC4->Append("_Charge2_"); | |
1464 | *namePC4 += c2; | |
1465 | namePC4->Append("_Charge3_"); | |
1466 | *namePC4 += c3; | |
1467 | namePC4->Append("_Charge4_"); | |
1468 | *namePC4 += c4; | |
1469 | namePC4->Append("_M_"); | |
1470 | *namePC4 += mb; | |
1471 | namePC4->Append("_ED_"); | |
1472 | *namePC4 += edB; | |
1473 | namePC4->Append("_Term_"); | |
1474 | *namePC4 += term+1; | |
be9ef9f9 | 1475 | |
1476 | /////////////////////////////////////// | |
1477 | // skip degenerate histograms | |
6432c081 | 1478 | if( (c1+c2+c3+c4)==1) {if(c4!=1) continue;} |
1479 | if( (c1+c2+c3+c4)==2) {if(c3+c4!=2) continue;} | |
1480 | if( (c1+c2+c3+c4)==3) {if(c1!=0) continue;} | |
be9ef9f9 | 1481 | ///////////////////////////////////////// |
1482 | ||
6432c081 | 1483 | TString *nameNorm=new TString(namePC4->Data()); |
be9ef9f9 | 1484 | nameNorm->Append("_Norm"); |
6432c081 | 1485 | Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fNorm4 = new TH1D(nameNorm->Data(),"Norm",1,-0.5,0.5); |
1486 | fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fNorm4); | |
be9ef9f9 | 1487 | // |
6432c081 | 1488 | TString *name1DQ=new TString(namePC4->Data()); |
be9ef9f9 | 1489 | name1DQ->Append("_1D"); |
0c82e40e | 1490 | Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fTerms4 = new TH1D(name1DQ->Data(),"", fQbinsQ4,0.,fQupperBoundQ4); |
6432c081 | 1491 | fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fTerms4); |
be9ef9f9 | 1492 | // |
6432c081 | 1493 | TString *nameKfactor=new TString(namePC4->Data()); |
be9ef9f9 | 1494 | nameKfactor->Append("_Kfactor"); |
0c82e40e | 1495 | Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fKfactor = new TProfile(nameKfactor->Data(),"", fQbinsQ4,0.,fQupperBoundQ4, 0.,100., ""); |
6432c081 | 1496 | fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fKfactor); |
be9ef9f9 | 1497 | // |
80507acf | 1498 | TString *nameKfactorW=new TString(namePC4->Data()); |
1499 | nameKfactorW->Append("_KfactorWeighted"); | |
0c82e40e | 1500 | Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fKfactorWeighted = new TProfile(nameKfactorW->Data(),"", fQbinsQ4,0.,fQupperBoundQ4, 0.,100., ""); |
80507acf | 1501 | fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fKfactorWeighted); |
1502 | // | |
6432c081 | 1503 | if(c1==c2 && c1==c3 && c1==c4 && term==12 ){ |
574647ef | 1504 | TString *nameBuild=new TString(namePC4->Data()); |
1505 | nameBuild->Append("_Build"); | |
1506 | Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fBuild = new TH2D(nameBuild->Data(),"", kDENtypes,0.5,kDENtypes+0.5, fQbinsQ4,0.,fQupperBoundQ4); | |
1507 | fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fBuild); | |
6432c081 | 1508 | // |
574647ef | 1509 | TString *namePrimeBuild=new TString(namePC4->Data()); |
1510 | namePrimeBuild->Append("_PrimeBuild"); | |
1511 | Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fPrimeBuild = new TH2D(namePrimeBuild->Data(),"", kDENtypes,0.5,kDENtypes+0.5, fQbinsQ4,0.,fQupperBoundQ4); | |
1512 | fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fPrimeBuild); | |
6432c081 | 1513 | // |
574647ef | 1514 | TString *namePrimePrimeBuild=new TString(namePC4->Data()); |
1515 | namePrimePrimeBuild->Append("_PrimePrimeBuild"); | |
1516 | Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fPrimePrimeBuild = new TH2D(namePrimePrimeBuild->Data(),"", kDENtypes,0.5,kDENtypes+0.5, fQbinsQ4,0.,fQupperBoundQ4); | |
1517 | fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fPrimePrimeBuild); | |
1518 | // | |
1519 | TString *nameCumulantBuild=new TString(namePC4->Data()); | |
1520 | nameCumulantBuild->Append("_CumulantBuild"); | |
1521 | Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fCumulantBuild = new TH2D(nameCumulantBuild->Data(),"", kDENtypes,0.5,kDENtypes+0.5, fQbinsQ4,0.,fQupperBoundQ4); | |
1522 | fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fCumulantBuild); | |
1523 | // | |
1524 | // | |
1525 | TString *nameBuildNeg=new TString(namePC4->Data()); | |
1526 | nameBuildNeg->Append("_BuildNeg"); | |
1527 | Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fBuildNeg = new TH2D(nameBuildNeg->Data(),"", kDENtypes,0.5,kDENtypes+0.5, fQbinsQ4,0.,fQupperBoundQ4); | |
1528 | fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fBuildNeg); | |
1529 | // | |
1530 | TString *namePrimeBuildNeg=new TString(namePC4->Data()); | |
1531 | namePrimeBuildNeg->Append("_PrimeBuildNeg"); | |
1532 | Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fPrimeBuildNeg = new TH2D(namePrimeBuildNeg->Data(),"", kDENtypes,0.5,kDENtypes+0.5, fQbinsQ4,0.,fQupperBoundQ4); | |
1533 | fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fPrimeBuildNeg); | |
1534 | // | |
1535 | TString *namePrimePrimeBuildNeg=new TString(namePC4->Data()); | |
1536 | namePrimePrimeBuildNeg->Append("_PrimePrimeBuildNeg"); | |
1537 | Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fPrimePrimeBuildNeg = new TH2D(namePrimePrimeBuildNeg->Data(),"", kDENtypes,0.5,kDENtypes+0.5, fQbinsQ4,0.,fQupperBoundQ4); | |
1538 | fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fPrimePrimeBuildNeg); | |
1539 | // | |
1540 | TString *nameCumulantBuildNeg=new TString(namePC4->Data()); | |
1541 | nameCumulantBuildNeg->Append("_CumulantBuildNeg"); | |
1542 | Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fCumulantBuildNeg = new TH2D(nameCumulantBuildNeg->Data(),"", kDENtypes,0.5,kDENtypes+0.5, fQbinsQ4,0.,fQupperBoundQ4); | |
1543 | fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fCumulantBuildNeg); | |
1544 | // | |
1545 | // | |
1546 | TString *nameBuildErr=new TString(namePC4->Data()); | |
1547 | nameBuildErr->Append("_BuildErr"); | |
1548 | Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fBuildErr = new TH2D(nameBuildErr->Data(),"", kDENtypes,0.5,kDENtypes+0.5, fQbinsQ4,0.,fQupperBoundQ4); | |
1549 | fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fBuildErr); | |
ebd00f1b | 1550 | // |
1551 | if(c1==0 && c2==0 && c3==0 && c4==0){ | |
574647ef | 1552 | TString *nameBuildFromFits=new TString(namePC4->Data()); |
1553 | nameBuildFromFits->Append("_BuildFromFits"); | |
70a43d86 | 1554 | Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fBuildFromFits = new TH3D(nameBuildFromFits->Data(),"", 2,0.5,2.5, kDENtypes,0.5,kDENtypes+0.5, fQbinsQ4,0.,fQupperBoundQ4); |
574647ef | 1555 | fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fBuildFromFits); |
1556 | // | |
1557 | TString *namePrimeBuildFromFits=new TString(namePC4->Data()); | |
1558 | namePrimeBuildFromFits->Append("_PrimeBuildFromFits"); | |
70a43d86 | 1559 | Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fPrimeBuildFromFits = new TH3D(namePrimeBuildFromFits->Data(),"", 2,0.5,2.5, kDENtypes,0.5,kDENtypes+0.5, fQbinsQ4,0.,fQupperBoundQ4); |
574647ef | 1560 | fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fPrimeBuildFromFits); |
1561 | // | |
1562 | TString *namePrimePrimeBuildFromFits=new TString(namePC4->Data()); | |
1563 | namePrimePrimeBuildFromFits->Append("_PrimePrimeBuildFromFits"); | |
70a43d86 | 1564 | Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fPrimePrimeBuildFromFits = new TH3D(namePrimePrimeBuildFromFits->Data(),"", 2,0.5,2.5, kDENtypes,0.5,kDENtypes+0.5, fQbinsQ4,0.,fQupperBoundQ4); |
574647ef | 1565 | fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fPrimePrimeBuildFromFits); |
ebd00f1b | 1566 | // |
574647ef | 1567 | TString *nameCumulantBuildFromFits=new TString(namePC4->Data()); |
1568 | nameCumulantBuildFromFits->Append("_CumulantBuildFromFits"); | |
70a43d86 | 1569 | Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fCumulantBuildFromFits = new TH3D(nameCumulantBuildFromFits->Data(),"", 2,0.5,2.5, kDENtypes,0.5,kDENtypes+0.5, fQbinsQ4,0.,fQupperBoundQ4); |
574647ef | 1570 | fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fCumulantBuildFromFits); |
ebd00f1b | 1571 | } |
6432c081 | 1572 | } |
be9ef9f9 | 1573 | |
1574 | if(fMCcase==kTRUE){ | |
1575 | // Momentum resolution correction histos | |
6432c081 | 1576 | TString *nameMomResIdeal=new TString(namePC4->Data()); |
be9ef9f9 | 1577 | nameMomResIdeal->Append("_Ideal"); |
0c82e40e | 1578 | Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fIdeal = new TH2D(nameMomResIdeal->Data(),"", 11,0.5,11.5, fQbinsQ4,0.,fQupperBoundQ4); |
6432c081 | 1579 | if(mb==0) fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fIdeal); |
1580 | TString *nameMomResSmeared=new TString(namePC4->Data()); | |
be9ef9f9 | 1581 | nameMomResSmeared->Append("_Smeared"); |
0c82e40e | 1582 | Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fSmeared = new TH2D(nameMomResSmeared->Data(),"", 11,0.5,11.5, fQbinsQ4,0.,fQupperBoundQ4); |
6432c081 | 1583 | if(mb==0) fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fSmeared); |
be9ef9f9 | 1584 | // Muon correction histos |
6432c081 | 1585 | TString *nameMuonIdeal=new TString(namePC4->Data()); |
be9ef9f9 | 1586 | nameMuonIdeal->Append("_MuonIdeal"); |
0c82e40e | 1587 | Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fMuonIdeal = new TH3D(nameMuonIdeal->Data(),"", 2,0.5,2.5, 11,0.5,11.5, fQbinsQ4,0.,fQupperBoundQ4); |
6432c081 | 1588 | if(mb==0 && edB==0 && term<12) fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fMuonIdeal); |
1589 | TString *nameMuonSmeared=new TString(namePC4->Data()); | |
be9ef9f9 | 1590 | nameMuonSmeared->Append("_MuonSmeared"); |
0c82e40e | 1591 | Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fMuonSmeared = new TH3D(nameMuonSmeared->Data(),"", 2,0.5,2.5, 11,0.5,11.5, fQbinsQ4,0.,fQupperBoundQ4); |
6432c081 | 1592 | if(mb==0 && edB==0 && term<12) fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fMuonSmeared); |
be9ef9f9 | 1593 | // |
6432c081 | 1594 | TString *nameMuonPionK4=new TString(namePC4->Data()); |
1595 | nameMuonPionK4->Append("_MuonPionK4"); | |
0c82e40e | 1596 | Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fMuonPionK4 = new TH3D(nameMuonPionK4->Data(),"", 2,0.5,2.5, 11,0.5,11.5, fQbinsQ4,0.,fQupperBoundQ4); |
6432c081 | 1597 | if(mb==0 && edB==0 && term<12) fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fMuonPionK4); |
be9ef9f9 | 1598 | // |
6432c081 | 1599 | TString *namePionPionK4=new TString(namePC4->Data()); |
1600 | namePionPionK4->Append("_PionPionK4"); | |
0c82e40e | 1601 | Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fPionPionK4 = new TH3D(namePionPionK4->Data(),"", 2,0.5,2.5, 11,0.5,11.5, fQbinsQ4,0.,fQupperBoundQ4); |
6432c081 | 1602 | if(mb==0 && edB==0 && term<12) fOutputList->Add(Charge1[c1].Charge2[c2].Charge3[c3].Charge4[c4].MB[mb].EDB[edB].FourPT[term].fPionPionK4); |
be9ef9f9 | 1603 | |
1604 | }// MCcase | |
be9ef9f9 | 1605 | |
6432c081 | 1606 | |
be9ef9f9 | 1607 | } |
6432c081 | 1608 | } |
1609 | ||
1610 | }//c3 | |
1611 | }//c2 | |
1612 | }//c1 | |
1613 | }// ED | |
1614 | }// mbin | |
be9ef9f9 | 1615 | |
be9ef9f9 | 1616 | |
1617 | ||
1618 | if(fTabulatePairs){ | |
1619 | ||
1620 | for(Int_t tKbin=0; tKbin<fKbinsT; tKbin++){ | |
1621 | for(Int_t yKbin=0; yKbin<fKbinsY; yKbin++){ | |
1622 | for(Int_t mb=0; mb<fMbins; mb++){ | |
1623 | for(Int_t edB=0; edB<fEDbins; edB++){ | |
1624 | ||
1625 | TString *nameNum = new TString("TPN_num_Kt_"); | |
1626 | *nameNum += tKbin; | |
1627 | nameNum->Append("_Ky_"); | |
1628 | *nameNum += yKbin; | |
1629 | nameNum->Append("_M_"); | |
1630 | *nameNum += mb; | |
1631 | nameNum->Append("_ED_"); | |
1632 | *nameNum += edB; | |
1633 | ||
1634 | TString *nameDen = new TString("TPN_den_Kt_"); | |
1635 | *nameDen += tKbin; | |
1636 | nameDen->Append("_Ky_"); | |
1637 | *nameDen += yKbin; | |
1638 | nameDen->Append("_M_"); | |
1639 | *nameDen += mb; | |
1640 | nameDen->Append("_ED_"); | |
1641 | *nameDen += edB; | |
1642 | ||
70a43d86 | 1643 | if(edB<=1){ |
0c82e40e | 1644 | KT[tKbin].KY[yKbin].MB[mb].EDB[edB].TwoPT[0].fTerms2ThreeD = new TH3D(nameNum->Data(),"", kQbinsWeights,0.,fQupperBoundWeights, kQbinsWeights,0.,fQupperBoundWeights, kQbinsWeights,0.,fQupperBoundWeights); |
be9ef9f9 | 1645 | fOutputList->Add(KT[tKbin].KY[yKbin].MB[mb].EDB[edB].TwoPT[0].fTerms2ThreeD); |
1646 | ||
0c82e40e | 1647 | KT[tKbin].KY[yKbin].MB[mb].EDB[edB].TwoPT[1].fTerms2ThreeD = new TH3D(nameDen->Data(),"", kQbinsWeights,0.,fQupperBoundWeights, kQbinsWeights,0.,fQupperBoundWeights, kQbinsWeights,0.,fQupperBoundWeights); |
be9ef9f9 | 1648 | fOutputList->Add(KT[tKbin].KY[yKbin].MB[mb].EDB[edB].TwoPT[1].fTerms2ThreeD); |
1649 | } | |
1650 | ||
1651 | } | |
1652 | } | |
1653 | } | |
1654 | } | |
1655 | ||
1656 | } | |
1657 | ||
1658 | ||
1659 | TProfile *fQsmearMean = new TProfile("fQsmearMean","",2,0.5,2.5, -0.2,0.2,""); | |
1660 | fOutputList->Add(fQsmearMean); | |
1661 | TProfile *fQsmearSq = new TProfile("fQsmearSq","",2,0.5,2.5, -2,2,""); | |
1662 | fOutputList->Add(fQsmearSq); | |
0c82e40e | 1663 | TH2D *fQ2Res = new TH2D("fQ2Res","",20,0.,1, 200,-.2,.2); |
be9ef9f9 | 1664 | fOutputList->Add(fQ2Res); |
0c82e40e | 1665 | TH2D *fQ3Res = new TH2D("fQ3Res","",20,0.,1, 200,-.3,.3); |
be9ef9f9 | 1666 | fOutputList->Add(fQ3Res); |
0c82e40e | 1667 | TH2D *fQ4Res = new TH2D("fQ4Res","",20,0.,1, 200,-.4,.4); |
be9ef9f9 | 1668 | fOutputList->Add(fQ4Res); |
1669 | ||
0c82e40e | 1670 | TH2D *DistQinv4pion = new TH2D("DistQinv4pion","",6,0.5,6.5, fQbinsQ2,0.,fQupperBoundQ2); |
be9ef9f9 | 1671 | fOutputList->Add(DistQinv4pion); |
0c82e40e | 1672 | TH2D *DistQinvMC4pion = new TH2D("DistQinvMC4pion","",6,0.5,6.5, fQbinsQ2,0.,fQupperBoundQ2); |
be9ef9f9 | 1673 | if(fMCcase) fOutputList->Add(DistQinvMC4pion); |
1674 | ||
0c82e40e | 1675 | TH2D *fAvgQ12VersusQ3 = new TH2D("fAvgQ12VersusQ3","",40,0.,0.2, fQbinsQ3,0.,fQupperBoundQ3); |
be9ef9f9 | 1676 | fOutputList->Add(fAvgQ12VersusQ3); |
0c82e40e | 1677 | TH2D *fAvgQ13VersusQ3 = new TH2D("fAvgQ13VersusQ3","",40,0.,0.2, fQbinsQ3,0.,fQupperBoundQ3); |
be9ef9f9 | 1678 | fOutputList->Add(fAvgQ13VersusQ3); |
0c82e40e | 1679 | TH2D *fAvgQ23VersusQ3 = new TH2D("fAvgQ23VersusQ3","",40,0.,0.2, fQbinsQ3,0.,fQupperBoundQ3); |
be9ef9f9 | 1680 | fOutputList->Add(fAvgQ23VersusQ3); |
1681 | ||
5591748e | 1682 | TH1D *fDistPionParents4 = new TH1D("fDistPionParents4","",4,0.5,4.5); |
1683 | fOutputList->Add(fDistPionParents4); | |
1684 | ||
0c82e40e | 1685 | TH2D *fDistTPCNclsFindable = new TH2D("fDistTPCNclsFindable","", 100,0.,0.5, 201,-0.5,200.5); |
6432c081 | 1686 | fDistTPCNclsFindable->GetXaxis()->SetTitle("pT (GeV/c)"); fDistTPCNclsFindable->GetYaxis()->SetTitle("Ncls Findable"); |
1687 | fOutputList->Add(fDistTPCNclsFindable); | |
0c82e40e | 1688 | TProfile *fProfileTPCNclsFindable = new TProfile("fProfileTPCNclsFindable","",100,0.,0.5, 0.,200., ""); |
6432c081 | 1689 | fProfileTPCNclsFindable->GetXaxis()->SetTitle("pT (GeV/c)"); fProfileTPCNclsFindable->GetYaxis()->SetTitle("<Ncls Findable>"); |
1690 | fOutputList->Add(fProfileTPCNclsFindable); | |
1691 | // | |
0c82e40e | 1692 | TH2D *fDistTPCNclsCrossed = new TH2D("fDistTPCNclsCrossed","",100,0.,0.5, 201,-0.5,200.5); |
6432c081 | 1693 | fDistTPCNclsCrossed->GetXaxis()->SetTitle("pT (GeV/c)"); fDistTPCNclsCrossed->GetYaxis()->SetTitle("Ncls Crossed"); |
1694 | fOutputList->Add(fDistTPCNclsCrossed); | |
0c82e40e | 1695 | TProfile *fProfileTPCNclsCrossed = new TProfile("fProfileTPCNclsCrossed","",100,0.,0.5, 0.,200., ""); |
6432c081 | 1696 | fProfileTPCNclsCrossed->GetXaxis()->SetTitle("pT (GeV/c)"); fProfileTPCNclsCrossed->GetYaxis()->SetTitle("<Ncls Crossed>"); |
1697 | fOutputList->Add(fProfileTPCNclsCrossed); | |
1698 | // | |
0c82e40e | 1699 | TH2D *fDistTPCNclsFindableRatio = new TH2D("fDistTPCNclsFindableRatio","",100,0.,0.5, 100,0.,1.); |
6432c081 | 1700 | fDistTPCNclsFindableRatio->GetXaxis()->SetTitle("pT (GeV/c)"); fDistTPCNclsFindableRatio->GetYaxis()->SetTitle("Ncls / Ncls Findable"); |
1701 | fOutputList->Add(fDistTPCNclsFindableRatio); | |
0c82e40e | 1702 | TProfile *fProfileTPCNclsFindableRatio = new TProfile("fProfileTPCNclsFindableRatio","",100,0.,0.5, 0.,1., ""); |
6432c081 | 1703 | fProfileTPCNclsFindableRatio->GetXaxis()->SetTitle("pT (GeV/c)"); fProfileTPCNclsFindableRatio->GetYaxis()->SetTitle("<Ncls / Ncls Findable>"); |
1704 | fOutputList->Add(fProfileTPCNclsFindableRatio); | |
1705 | // | |
0c82e40e | 1706 | TH2D *fDistTPCNclsCrossedRatio = new TH2D("fDistTPCNclsCrossedRatio","",100,0.,0.5, 100,0.,1.); |
6432c081 | 1707 | fDistTPCNclsCrossedRatio->GetXaxis()->SetTitle("pT (GeV/c)"); fDistTPCNclsCrossedRatio->GetYaxis()->SetTitle("Ncls / Ncls Crossed"); |
1708 | fOutputList->Add(fDistTPCNclsCrossedRatio); | |
0c82e40e | 1709 | TProfile *fProfileTPCNclsCrossedRatio = new TProfile("fProfileTPCNclsCrossedRatio","",100,0.,0.5, 0.,1., ""); |
6432c081 | 1710 | fProfileTPCNclsCrossedRatio->GetXaxis()->SetTitle("pT (GeV/c)"); fProfileTPCNclsCrossedRatio->GetYaxis()->SetTitle("<Ncls / Ncls Crossed>"); |
1711 | fOutputList->Add(fProfileTPCNclsCrossedRatio); | |
1712 | ||
0c82e40e | 1713 | TH2D *fc4QSFitNum = new TH2D("fc4QSFitNum","",7,0.5,7.5, fQbinsQ4,0.,fQupperBoundQ4); |
42802bba | 1714 | fOutputList->Add(fc4QSFitNum); |
0c82e40e | 1715 | TH2D *fc4QSFitDen = new TH2D("fc4QSFitDen","",7,0.5,7.5, fQbinsQ4,0.,fQupperBoundQ4); |
42802bba | 1716 | fOutputList->Add(fc4QSFitDen); |
70a43d86 | 1717 | |
1718 | TH3F *fq2Dist = new TH3F("fq2Dist","",fMbins,.5,fMbins+.5, 4,0.5,4.5, 200,0,10); | |
1719 | fOutputList->Add(fq2Dist); | |
1720 | ||
be9ef9f9 | 1721 | //////////////////////////////////// |
1722 | /////////////////////////////////// | |
1723 | ||
1724 | PostData(1, fOutputList); | |
1725 | } | |
1726 | ||
1727 | //________________________________________________________________________ | |
1728 | void AliFourPion::UserExec(Option_t *) | |
1729 | { | |
1730 | // Main loop | |
1731 | // Called for each event | |
1732 | //cout<<"=========== Event # "<<fEventCounter+1<<" ==========="<<endl; | |
1733 | fEventCounter++; | |
0207c034 | 1734 | if(fEventCounter%1000==0) cout<<"=========== Event # "<<fEventCounter<<" ==========="<<endl; |
1735 | ||
be9ef9f9 | 1736 | if(!fAODcase) {cout<<"ESDs not supported"<<endl; return;} |
1737 | ||
1738 | fAOD = dynamic_cast<AliAODEvent*> (InputEvent()); | |
1739 | if (!fAOD) {Printf("ERROR: fAOD not available"); return;} | |
1740 | ||
be9ef9f9 | 1741 | // Trigger Cut |
1742 | if(fAOD->GetRunNumber() >= 136851 && fAOD->GetRunNumber() <= 139517){// 10h data | |
1743 | Bool_t isSelected1 = (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & AliVEvent::kMB); | |
1744 | if(!isSelected1 && !fMCcase) {return;} | |
1745 | }else if(fAOD->GetRunNumber() >= 167693 && fAOD->GetRunNumber() <= 170593){// 11h data | |
1746 | Bool_t isSelected1 = (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & AliVEvent::kCentral); | |
1747 | Bool_t isSelected2 = (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & AliVEvent::kSemiCentral); | |
1748 | if(!isSelected1 && !isSelected2 && !fMCcase) {return;} | |
0207c034 | 1749 | }else { |
1750 | Bool_t isSelected[4]={kFALSE}; | |
1751 | isSelected[0] = (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & AliVEvent::kMB); | |
1752 | isSelected[1] = (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & AliVEvent::kAny); | |
1753 | isSelected[2] = (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & AliVEvent::kINT7); | |
1754 | isSelected[3] = (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & AliVEvent::kHighMult); | |
1755 | if(!isSelected[fTriggerType] && !fMCcase) return; | |
1756 | } | |
70a43d86 | 1757 | |
be9ef9f9 | 1758 | /////////////////////////////////////////////////////////// |
1759 | const AliAODVertex *primaryVertexAOD; | |
1760 | AliCentrality *centrality;// for AODs and ESDs | |
1761 | ||
1762 | ||
1763 | AliAnalysisManager *man=AliAnalysisManager::GetAnalysisManager(); | |
1764 | AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler()); | |
1765 | fPIDResponse = inputHandler->GetPIDResponse(); | |
1766 | ||
1767 | ||
1768 | TClonesArray *mcArray = 0x0; | |
1769 | if(fMCcase){ | |
1770 | if(fAODcase){ | |
1771 | mcArray = (TClonesArray*)fAOD->FindListObject(AliAODMCParticle::StdBranchName()); | |
1772 | if(!mcArray || mcArray->GetEntriesFast() >= kMCarrayLimit){ | |
1773 | cout<<"No MC particle branch found or Array too large!!"<<endl; | |
1774 | return; | |
1775 | } | |
1776 | } | |
1777 | } | |
1778 | ||
70a43d86 | 1779 | |
be9ef9f9 | 1780 | UInt_t status=0; |
1781 | Int_t positiveTracks=0, negativeTracks=0; | |
1782 | Int_t myTracks=0, pionCount=0, kaonCount=0, protonCount=0; | |
1783 | ||
1784 | Double_t vertex[3]={0}; | |
1785 | Int_t zbin=0; | |
1786 | Double_t zstep=2*10/Double_t(fZvertexBins), zstart=-10.; | |
1787 | ///////////////////////////////////////////////// | |
4bf06935 | 1788 | // ratio of Real data to HIJING reconstructed pT (10 MeV bins) |
0207c034 | 1789 | //Double_t HIJINGptWeights[100]={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.5, 0.590355, 0.672751, 0.795686, 0.848618, 0.861539, 0.874636, 0.880394, 0.87923, 0.885105, 0.888841, 0.892765, 0.896278, 0.899725, 0.903054, 0.907074, 0.91066, 0.913765, 0.918804, 0.923374, 0.929005, 0.935538, 0.942802, 0.949584, 0.956928, 0.963521, 0.972898, 0.981403, 0.989027, 0.997965, 1.00558, 1.01372, 1.02148, 1.03064, 1.04131, 1.05199, 1.06319, 1.07698, 1.09113, 1.10416, 1.11662, 1.12823, 1.14161, 1.15455, 1.1683, 1.18439, 1.19696, 1.21124, 1.22607, 1.24087, 1.25386, 1.26666, 1.27374, 1.2821, 1.29218, 1.30137, 1.30795, 1.31512, 1.32047, 1.32571, 1.33242, 1.3376, 1.34084, 1.34644, 1.34978, 1.35259, 1.35149, 1.35534, 1.3541, 1.35808, 1.36003, 1.35981, 1.36037, 1.35774, 1.35814, 1.35796, 1.35764, 1.35517, 1.34804, 1.34797, 1.33822, 1.32501, 1.30844, 1.2971, 1.27107}; |
1790 | Float_t HIJINGq2WeightsSC[200]={0.72, 0.723886, 0.770856, 0.799396, 0.815821, 0.827209, 0.833142, 0.837393, 0.839721, 0.842022, 0.84374, 0.845376, 0.84732, 0.848803, 0.850515, 0.852089, 0.853712, 0.855571, 0.857279, 0.85894, 0.860671, 0.862479, 0.863945, 0.865519, 0.867301, 0.868955, 0.870215, 0.871652, 0.873089, 0.874289, 0.875633, 0.876694, 0.877712, 0.878681, 0.879694, 0.88073, 0.881459, 0.882039, 0.882761, 0.88334, 0.884004, 0.884455, 0.884816, 0.885327, 0.88556, 0.885997, 0.886291, 0.886526, 0.886975, 0.887374, 0.887712, 0.888016, 0.888627, 0.888971, 0.889295, 0.889845, 0.890088, 0.890599, 0.890893, 0.891363, 0.891598, 0.892019, 0.892141, 0.892256, 0.892372, 0.892276, 0.892012, 0.891801, 0.891554, 0.891267, 0.891074, 0.890822, 0.890737, 0.890768, 0.89081, 0.890987, 0.89124, 0.891499, 0.891887, 0.892403, 0.892978, 0.893485, 0.894214, 0.894858, 0.895669, 0.896584, 0.897447, 0.89844, 0.899375, 0.900527, 0.901568, 0.902717, 0.903952, 0.905128, 0.90645, 0.907729, 0.909055, 0.910516, 0.911916, 0.913396, 0.914911, 0.91645, 0.918067, 0.919725, 0.921435, 0.923185, 0.925044, 0.926784, 0.928747, 0.930641, 0.932574, 0.934767, 0.93666, 0.938805, 0.94098, 0.943166, 0.945492, 0.947778, 0.950146, 0.952474, 0.954981, 0.957334, 0.959891, 0.96247, 0.965063, 0.967719, 0.97025, 0.973033, 0.975868, 0.978622, 0.981536, 0.984275, 0.987362, 0.990211, 0.993284, 0.996277, 0.999363, 1.00251, 1.00555, 1.00883, 1.01209, 1.01519, 1.01853, 1.02184, 1.0252, 1.02866, 1.03206, 1.03545, 1.03881, 1.04227, 1.04569, 1.04914, 1.05259, 1.056, 1.05953, 1.063, 1.06652, 1.07005, 1.07353, 1.07719, 1.0808, 1.08426, 1.08763, 1.09136, 1.09486, 1.0985, 1.10199, 1.10562, 1.10933, 1.11293, 1.11628, 1.11992, 1.1236, 1.12736, 1.13088, 1.13448, 1.13815, 1.14168, 1.14537, 1.1489, 1.15255, 1.15629, 1.15981, 1.16349, 1.16699, 1.17076, 1.17445, 1.17833, 1.18188, 1.18551, 1.18928, 1.19318, 1.19691, 1.20059, 1.20455, 1.20817, 1.21199, 1.21609, 1.21977, 1.22367}; | |
1791 | Float_t HIJINGq2WeightsMC[200]={0.83, 0.833821, 0.834928, 0.836263, 0.837359, 0.83809, 0.838463, 0.840012, 0.840868, 0.842129, 0.843379, 0.844784, 0.846186, 0.847562, 0.849184, 0.850567, 0.85239, 0.854038, 0.855708, 0.857257, 0.859145, 0.860831, 0.862469, 0.864066, 0.865664, 0.867224, 0.868654, 0.870187, 0.871525, 0.872742, 0.874066, 0.875166, 0.876261, 0.877325, 0.878249, 0.879089, 0.879897, 0.880624, 0.881234, 0.881898, 0.88248, 0.882964, 0.883452, 0.883857, 0.884323, 0.884818, 0.885157, 0.885589, 0.88595, 0.886352, 0.886864, 0.887326, 0.887809, 0.888366, 0.888873, 0.889273, 0.889781, 0.890211, 0.890571, 0.891011, 0.891294, 0.891612, 0.891867, 0.892072, 0.89211, 0.891951, 0.891729, 0.891513, 0.891194, 0.890843, 0.89054, 0.890331, 0.890168, 0.890082, 0.890156, 0.890266, 0.890395, 0.890707, 0.891075, 0.891482, 0.891972, 0.89255, 0.893115, 0.893882, 0.89471, 0.895582, 0.896505, 0.897537, 0.898425, 0.89959, 0.900708, 0.901903, 0.903061, 0.904374, 0.905684, 0.907069, 0.908443, 0.909809, 0.911322, 0.912849, 0.914481, 0.916016, 0.917755, 0.919439, 0.921197, 0.922945, 0.924892, 0.926703, 0.928648, 0.930665, 0.932648, 0.934779, 0.936863, 0.939002, 0.941158, 0.943437, 0.945753, 0.948068, 0.950428, 0.952854, 0.955338, 0.957853, 0.960329, 0.962977, 0.965578, 0.968212, 0.970931, 0.97373, 0.97653, 0.979386, 0.982208, 0.985161, 0.988179, 0.991104, 0.994135, 0.997152, 1.00033, 1.00348, 1.00664, 1.00977, 1.01307, 1.01632, 1.01975, 1.02304, 1.02628, 1.02974, 1.03302, 1.03653, 1.03986, 1.04345, 1.04684, 1.05039, 1.05374, 1.05738, 1.06089, 1.06444, 1.06794, 1.07139, 1.07506, 1.07841, 1.08201, 1.08563, 1.08919, 1.09277, 1.09637, 1.10003, 1.10361, 1.10713, 1.11064, 1.11432, 1.11795, 1.12165, 1.12533, 1.1289, 1.13251, 1.13617, 1.13979, 1.1435, 1.14709, 1.15079, 1.15436, 1.15803, 1.16164, 1.16529, 1.1688, 1.17255, 1.17619, 1.17996, 1.18369, 1.18727, 1.19104, 1.19478, 1.1986, 1.20233, 1.20613, 1.20977, 1.21385, 1.21761, 1.22134, 1.22535}; | |
1792 | // | |
1793 | Float_t HIJINGq3WeightsSC[35]={0.946, 0.946, 0.946171, 0.92177, 0.958284, 0.986155, 0.99244, 0.999372, 1.00152, 1.00427, 1.00328, 1.00546, 1.00546, 1.00628, 1.00586, 1.00446, 1.00496, 1.00427, 1.00413, 1.00354, 1.00322, 1.00266, 1.00158, 1.00123, 1.00048, 0.999826, 0.99901, 0.997586, 0.996728, 0.994507, 0.993044, 0.990995, 0.989289, 0.988248, 0.988455}; | |
1794 | Float_t HIJINGq3WeightsMC[35]={0.634, 0.63488, 0.963204, 0.977364, 0.992797, 1.00015, 1.00179, 1.00467, 1.00602, 1.00635, 1.00665, 1.00677, 1.00643, 1.00601, 1.00562, 1.00542, 1.00494, 1.0048, 1.00406, 1.0036, 1.00297, 1.0025, 1.00178, 1.00126, 1.00035, 0.999798, 0.998795, 0.997544, 0.996334, 0.994345, 0.992467, 0.991007, 0.988918, 0.9877, 0.98789}; | |
1795 | // | |
1796 | Float_t HIJINGq4WeightsSC[50]={0.88, 0.88, 0.88, 0.88, 0.88, 0.88, 0.889957, 0.911624, 0.932747, 0.959097, 0.987571, 0.974175, 0.974291, 0.985743, 0.989953, 0.988542, 0.992858, 0.995232, 0.995808, 0.997182, 0.997073, 0.99795, 0.998597, 0.999141, 0.999598, 1.00026, 1.0002, 1.00061, 1.0003, 1.00054, 1.0006, 1.00082, 1.00094, 1.00092, 1.00058, 1.00036, 0.999695, 0.999366, 0.998782, 0.998301, 0.997107, 0.995746, 0.994276, 0.992814, 0.992403, 0.992536, 0.994614, 0.982908, 0.992077, .99}; | |
1797 | Float_t HIJINGq4WeightsMC1[50]={0.82, 0.82, 0.82, 0.82, 0.82, 0.823248, 0.917691, 0.960501, 0.96697, 0.972048, 0.984931, 0.98916, 0.986344, 0.992934, 0.996263, 0.996503, 0.996566, 0.997508, 0.998417, 0.999181, 0.999746, 0.999707, 1.00034, 1.00065, 1.00081, 1.00104, 1.0009, 1.00097, 1.00088, 1.00111, 1.00101, 1.00095, 1.00078, 1.00069, 1.00037, 1.00002, 0.999555, 0.998796, 0.998073, 0.997315, 0.9964, 0.994994, 0.993685, 0.990758, 0.990211, 0.987958, 0.980713, 0.985536, 0.923206, 0.92}; | |
1798 | Float_t HIJINGq4WeightsMC2[50]={0.88, 0.88, 0.88, 0.88, 0.885817, 0.9888, 1.00199, 0.974765, 0.987792, 0.989186, 0.984239, 0.991871, 0.992879, 0.995809, 0.997829, 0.998076, 0.998521, 0.998509, 0.999429, 0.999958, 1.00029, 1.00064, 1.00052, 1.00095, 1.00107, 1.00121, 1.0011, 1.00123, 1.00106, 1.00111, 1.00108, 1.00097, 1.00078, 1.00066, 1.00038, 0.999903, 0.99931, 0.998711, 0.997939, 0.997057, 0.99611, 0.994732, 0.993368, 0.991332, 0.989286, 0.987895, 0.983888, 0.986218, 0.945475, .94}; | |
1799 | ||
be9ef9f9 | 1800 | |
be9ef9f9 | 1801 | Float_t centralityPercentile=0; |
4bf06935 | 1802 | Float_t cStep=5.0, cStepMixing=5.0, cStart=0; |
12f1dc46 | 1803 | Int_t MbinMixing=0; |
be9ef9f9 | 1804 | |
1805 | if(fAODcase){// AOD case | |
1806 | ||
ebd00f1b | 1807 | if(fCollisionType==0){ |
be9ef9f9 | 1808 | centrality = fAOD->GetCentrality(); |
1809 | centralityPercentile = centrality->GetCentralityPercentile("V0M"); | |
1810 | if(centralityPercentile == 0) {cout<<"Centrality = 0, skipping event"<<endl; return;} | |
1811 | if((centralityPercentile < 5*fCentBinLowLimit) || (centralityPercentile>= 5*(fCentBinHighLimit+1))) {/*cout<<"Centrality out of Range. Skipping Event"<<endl;*/ return;} | |
1812 | cout<<"Centrality % = "<<centralityPercentile<<endl; | |
1813 | } | |
1814 | ||
b71263d0 | 1815 | |
be9ef9f9 | 1816 | ((TH1F*)fOutputList->FindObject("fMultDist0"))->Fill(fAOD->GetNumberOfTracks()); |
1817 | ||
1818 | // Pile-up rejection | |
1819 | AliAnalysisUtils *AnaUtil=new AliAnalysisUtils(); | |
ebd00f1b | 1820 | if(fCollisionType!=0) AnaUtil->SetUseMVPlpSelection(kTRUE);// use Multi-Vertex tool for pp and pPb |
be9ef9f9 | 1821 | else AnaUtil->SetUseMVPlpSelection(kFALSE); |
1822 | Bool_t pileUpCase=AnaUtil->IsPileUpEvent(fAOD); | |
1823 | if(pileUpCase) return; | |
ebd00f1b | 1824 | |
be9ef9f9 | 1825 | //////////////////////////////// |
1826 | // Vertexing | |
1827 | ((TH1F*)fOutputList->FindObject("fMultDist1"))->Fill(fAOD->GetNumberOfTracks()); | |
1828 | primaryVertexAOD = fAOD->GetPrimaryVertex(); | |
1829 | vertex[0]=primaryVertexAOD->GetX(); vertex[1]=primaryVertexAOD->GetY(); vertex[2]=primaryVertexAOD->GetZ(); | |
1830 | ||
0207c034 | 1831 | if(fabs(vertex[2]) > 10) {/*cout<<"Zvertex Out of Range. Skip Event"<<endl;*/ return;} // Z-Vertex Cut |
be9ef9f9 | 1832 | ((TH3F*)fOutputList->FindObject("fVertexDist"))->Fill(vertex[0], vertex[1], vertex[2]); |
1833 | ||
ebd00f1b | 1834 | if(!fMCcase && primaryVertexAOD->GetNContributors() < 1) {/*cout<<"Bad Vertex. Skip Event"<<endl;*/ return;} |
be9ef9f9 | 1835 | |
1836 | ((TH1F*)fOutputList->FindObject("fMultDist2"))->Fill(fAOD->GetNumberOfTracks()); | |
1837 | ||
1838 | fBfield = fAOD->GetMagneticField(); | |
1839 | ||
1840 | for(Int_t i=0; i<fZvertexBins; i++){ | |
1841 | if( (vertex[2] >= zstart+i*zstep) && (vertex[2] < zstart+(i+1)*zstep) ){ | |
1842 | zbin=i; | |
1843 | break; | |
1844 | } | |
1845 | } | |
1846 | ||
1847 | ||
1848 | ||
1849 | ///////////////////////////// | |
1850 | // Create Shuffled index list | |
1851 | Int_t randomIndex[fAOD->GetNumberOfTracks()]; | |
1852 | for (Int_t i = 0; i < fAOD->GetNumberOfTracks(); i++) randomIndex[i]=i; | |
1853 | Shuffle(randomIndex,0,fAOD->GetNumberOfTracks()-1); | |
1854 | ///////////////////////////// | |
4bf06935 | 1855 | |
be9ef9f9 | 1856 | |
1857 | // Track loop | |
1858 | for (Int_t i = 0; i < fAOD->GetNumberOfTracks(); i++) { | |
574647ef | 1859 | AliAODTrack* aodtrack = (AliAODTrack*)fAOD->GetTrack(randomIndex[i]); |
be9ef9f9 | 1860 | if (!aodtrack) continue; |
1861 | if(myTracks >= fMultLimit) {cout<<"More tracks than Track Limit"<<endl; return;} | |
1862 | ||
1863 | status=aodtrack->GetStatus(); | |
1864 | ||
1865 | if(!aodtrack->TestFilterBit(BIT(fFilterBit))) continue;// AOD filterBit cut | |
1866 | ((TH2D*)fOutputList->FindObject("fTrackChi2NDF"))->Fill(centralityPercentile, aodtrack->Chi2perNDF()); | |
1867 | ((TH2D*)fOutputList->FindObject("fTrackTPCncls"))->Fill(centralityPercentile, aodtrack->GetTPCncls()); | |
1868 | if(aodtrack->GetTPCNcls() < fMinTPCncls) continue;// TPC nCluster cut | |
1869 | if(aodtrack->Chi2perNDF() > fMaxChi2NDF) continue; | |
1870 | ||
1871 | if(fFilterBit != 7){ | |
1872 | Bool_t goodTrackOtherFB = kFALSE; | |
1873 | for (Int_t j = 0; j < fAOD->GetNumberOfTracks(); j++) { | |
574647ef | 1874 | AliAODTrack* aodtrack2 = (AliAODTrack*)fAOD->GetTrack(randomIndex[j]); |
be9ef9f9 | 1875 | if(!aodtrack2) continue; |
1876 | if(!aodtrack2->TestFilterBit(BIT(fFilterBit))) continue; | |
1877 | ||
1878 | if(-(aodtrack->GetID()+1)==aodtrack2->GetID()) {goodTrackOtherFB=kTRUE; break;} | |
1879 | ||
1880 | } | |
1881 | if(!goodTrackOtherFB) continue; | |
1882 | } | |
1883 | ||
1884 | ||
86528e76 | 1885 | if(aodtrack->Pt() < 0.16) continue; |
be9ef9f9 | 1886 | if(fabs(aodtrack->Eta()) > 0.8) continue; |
1887 | ||
1888 | ||
1889 | Bool_t goodMomentum = aodtrack->GetPxPyPz( fTempStruct[myTracks].fP); | |
1890 | if(!goodMomentum) continue; | |
1891 | aodtrack->GetXYZ( fTempStruct[myTracks].fX); | |
1892 | ||
0207c034 | 1893 | |
be9ef9f9 | 1894 | Double_t dca2[2]={0}; |
1895 | dca2[0] = sqrt( pow(fTempStruct[myTracks].fX[0] - vertex[0],2) + pow(fTempStruct[myTracks].fX[1] - vertex[1],2)); | |
1896 | dca2[1] = sqrt( pow(fTempStruct[myTracks].fX[2] - vertex[2],2)); | |
1897 | Double_t dca3d = sqrt( pow(dca2[0],2) + pow(dca2[1],2)); | |
1898 | ||
1899 | fTempStruct[myTracks].fStatus = status; | |
1900 | fTempStruct[myTracks].fFiltermap = aodtrack->GetFilterMap(); | |
1901 | fTempStruct[myTracks].fId = aodtrack->GetID(); | |
1902 | // | |
1903 | fTempStruct[myTracks].fLabel = aodtrack->GetLabel(); | |
1904 | fTempStruct[myTracks].fPhi = atan2(fTempStruct[myTracks].fP[1], fTempStruct[myTracks].fP[0]); | |
1905 | if(fTempStruct[myTracks].fPhi < 0) fTempStruct[myTracks].fPhi += 2*PI; | |
1906 | fTempStruct[myTracks].fPt = sqrt(pow(fTempStruct[myTracks].fP[0],2) + pow(fTempStruct[myTracks].fP[1],2)); | |
1907 | fTempStruct[myTracks].fMom = sqrt( pow(fTempStruct[myTracks].fPt,2) + pow(fTempStruct[myTracks].fP[2],2) ); | |
1908 | fTempStruct[myTracks].fEta = aodtrack->Eta(); | |
1909 | fTempStruct[myTracks].fCharge = aodtrack->Charge(); | |
1910 | fTempStruct[myTracks].fDCAXY = dca2[0]; | |
1911 | fTempStruct[myTracks].fDCAZ = dca2[1]; | |
1912 | fTempStruct[myTracks].fDCA = dca3d; | |
1913 | fTempStruct[myTracks].fClusterMap = aodtrack->GetTPCClusterMap(); | |
1914 | fTempStruct[myTracks].fSharedMap = aodtrack->GetTPCSharedMap(); | |
1915 | ||
1916 | ||
1917 | ||
86528e76 | 1918 | if(fTempStruct[myTracks].fMom > 0.9999) continue;// upper P bound |
1919 | ||
be9ef9f9 | 1920 | |
1921 | ||
1922 | // PID section | |
1923 | fTempStruct[myTracks].fElectron = kFALSE; | |
1924 | fTempStruct[myTracks].fPion = kFALSE; | |
1925 | fTempStruct[myTracks].fKaon = kFALSE; | |
1926 | fTempStruct[myTracks].fProton = kFALSE; | |
1927 | ||
1928 | Float_t nSigmaTPC[5]; | |
1929 | Float_t nSigmaTOF[5]; | |
1930 | nSigmaTPC[0]=10; nSigmaTPC[1]=10; nSigmaTPC[2]=10; nSigmaTPC[3]=10; nSigmaTPC[4]=10; | |
1931 | nSigmaTOF[0]=10; nSigmaTOF[1]=10; nSigmaTOF[2]=10; nSigmaTOF[3]=10; nSigmaTOF[4]=10; | |
1932 | fTempStruct[myTracks].fTOFhit = kFALSE;// default | |
1933 | Float_t signalTPC=0, signalTOF=0; | |
1934 | Double_t integratedTimesTOF[10]={0}; | |
1935 | ||
1936 | ||
1937 | Bool_t DoPIDWorkAround=kTRUE; | |
1938 | //if(fFilterBit == 7) DoPIDWorkAround=kTRUE; | |
ebd00f1b | 1939 | if(fMCcase && fCollisionType!=0) DoPIDWorkAround=kFALSE; |
be9ef9f9 | 1940 | if(DoPIDWorkAround==kFALSE && fabs(fPIDResponse->NumberOfSigmasTPC(aodtrack,AliPID::kPion)) < 900) { |
1941 | nSigmaTPC[0]=fPIDResponse->NumberOfSigmasTPC(aodtrack,AliPID::kElectron); | |
1942 | nSigmaTPC[1]=fPIDResponse->NumberOfSigmasTPC(aodtrack,AliPID::kMuon); | |
1943 | nSigmaTPC[2]=fPIDResponse->NumberOfSigmasTPC(aodtrack,AliPID::kPion); | |
1944 | nSigmaTPC[3]=fPIDResponse->NumberOfSigmasTPC(aodtrack,AliPID::kKaon); | |
1945 | nSigmaTPC[4]=fPIDResponse->NumberOfSigmasTPC(aodtrack,AliPID::kProton); | |
1946 | // | |
1947 | nSigmaTOF[0]=fPIDResponse->NumberOfSigmasTOF(aodtrack,AliPID::kElectron); | |
1948 | nSigmaTOF[1]=fPIDResponse->NumberOfSigmasTOF(aodtrack,AliPID::kMuon); | |
1949 | nSigmaTOF[2]=fPIDResponse->NumberOfSigmasTOF(aodtrack,AliPID::kPion); | |
1950 | nSigmaTOF[3]=fPIDResponse->NumberOfSigmasTOF(aodtrack,AliPID::kKaon); | |
1951 | nSigmaTOF[4]=fPIDResponse->NumberOfSigmasTOF(aodtrack,AliPID::kProton); | |
1952 | signalTPC = aodtrack->GetTPCsignal(); | |
1953 | if( (status&AliESDtrack::kTOFpid)!=0 && (status&AliESDtrack::kTIME)!=0 && (status&AliESDtrack::kTOFout)!=0 && (status&AliESDtrack::kTOFmismatch)<=0){// good tof hit | |
1954 | fTempStruct[myTracks].fTOFhit = kTRUE; | |
1955 | signalTOF = aodtrack->GetTOFsignal(); | |
1956 | aodtrack->GetIntegratedTimes(integratedTimesTOF); | |
1957 | }else fTempStruct[myTracks].fTOFhit = kFALSE; | |
1958 | ||
1959 | }else {// FilterBit 7 PID workaround | |
1960 | ||
1961 | for(Int_t j = 0; j < fAOD->GetNumberOfTracks(); j++) { | |
574647ef | 1962 | AliAODTrack* aodTrack2 = (AliAODTrack*)fAOD->GetTrack(j); |
be9ef9f9 | 1963 | if (!aodTrack2) continue; |
1964 | if(aodtrack->GetID() != (-aodTrack2->GetID() - 1)) continue;// (-aodTrack2->GetID() - 1) | |
1965 | ||
1966 | UInt_t status2=aodTrack2->GetStatus(); | |
1967 | ||
1968 | nSigmaTPC[0]=fPIDResponse->NumberOfSigmasTPC(aodTrack2,AliPID::kElectron); | |
1969 | nSigmaTPC[1]=fPIDResponse->NumberOfSigmasTPC(aodTrack2,AliPID::kMuon); | |
1970 | nSigmaTPC[2]=fPIDResponse->NumberOfSigmasTPC(aodTrack2,AliPID::kPion); | |
1971 | nSigmaTPC[3]=fPIDResponse->NumberOfSigmasTPC(aodTrack2,AliPID::kKaon); | |
1972 | nSigmaTPC[4]=fPIDResponse->NumberOfSigmasTPC(aodTrack2,AliPID::kProton); | |
1973 | // | |
1974 | nSigmaTOF[0]=fPIDResponse->NumberOfSigmasTOF(aodTrack2,AliPID::kElectron); | |
1975 | nSigmaTOF[1]=fPIDResponse->NumberOfSigmasTOF(aodTrack2,AliPID::kMuon); | |
1976 | nSigmaTOF[2]=fPIDResponse->NumberOfSigmasTOF(aodTrack2,AliPID::kPion); | |
1977 | nSigmaTOF[3]=fPIDResponse->NumberOfSigmasTOF(aodTrack2,AliPID::kKaon); | |
1978 | nSigmaTOF[4]=fPIDResponse->NumberOfSigmasTOF(aodTrack2,AliPID::kProton); | |
1979 | signalTPC = aodTrack2->GetTPCsignal(); | |
1980 | ||
1981 | if( (status2&AliESDtrack::kTOFpid)!=0 && (status2&AliESDtrack::kTIME)!=0 && (status2&AliESDtrack::kTOFout)!=0 && (status2&AliESDtrack::kTOFmismatch)<=0){// good tof hit | |
1982 | fTempStruct[myTracks].fTOFhit = kTRUE; | |
1983 | signalTOF = aodTrack2->GetTOFsignal(); | |
1984 | aodTrack2->GetIntegratedTimes(integratedTimesTOF); | |
1985 | }else fTempStruct[myTracks].fTOFhit = kFALSE; | |
1986 | ||
6432c081 | 1987 | //if(aodTrack2->Pt()<0.2) cout<<aodTrack2->GetTPCNclsF()<<" "<<aodTrack2->GetTPCNCrossedRows()<<" "<<aodTrack2->GetTPCNcls()<<" "<<aodTrack2->GetTPCFoundFraction()<<endl; |
1988 | ||
1989 | ||
be9ef9f9 | 1990 | }// aodTrack2 |
1991 | }// FilterBit 7 PID workaround | |
1992 | ||
1993 | ||
1994 | /////////////////// | |
1995 | ((TH3F*)fOutputList->FindObject("fTPCResponse"))->Fill(centralityPercentile, fTempStruct[myTracks].fMom, signalTPC); | |
1996 | if(fTempStruct[myTracks].fTOFhit) { | |
1997 | ((TH3F*)fOutputList->FindObject("fTOFResponse"))->Fill(centralityPercentile, fTempStruct[myTracks].fMom, signalTOF - integratedTimesTOF[3]); | |
1998 | } | |
1999 | /////////////////// | |
2000 | ||
2001 | // Use TOF if good hit and above threshold | |
2002 | if(fTempStruct[myTracks].fTOFhit && fTempStruct[myTracks].fMom > fTPCTOFboundry){ | |
2003 | if(fabs(nSigmaTOF[0])<fSigmaCutTOF) fTempStruct[myTracks].fElectron = kTRUE;// Electron candidate | |
2004 | if(fabs(nSigmaTOF[2])<fSigmaCutTOF) fTempStruct[myTracks].fPion = kTRUE;// Pion candidate | |
2005 | if(fabs(nSigmaTOF[3])<fSigmaCutTOF) fTempStruct[myTracks].fKaon = kTRUE;// Kaon candidate | |
2006 | if(fabs(nSigmaTOF[4])<fSigmaCutTOF) fTempStruct[myTracks].fProton = kTRUE;// Proton candidate | |
2007 | }else {// TPC info instead | |
2008 | if(fabs(nSigmaTPC[0])<fSigmaCutTPC) fTempStruct[myTracks].fElectron = kTRUE;// Electron candidate | |
2009 | if(fabs(nSigmaTPC[2])<fSigmaCutTPC) fTempStruct[myTracks].fPion = kTRUE;// Pion candidate | |
2010 | if(fabs(nSigmaTPC[3])<fSigmaCutTPC) fTempStruct[myTracks].fKaon = kTRUE;// Kaon candidate | |
2011 | if(fabs(nSigmaTPC[4])<fSigmaCutTPC) fTempStruct[myTracks].fProton = kTRUE;// Proton candidate | |
2012 | } | |
2013 | ||
2014 | ||
2015 | // Ensure there is only 1 candidate per track | |
2016 | if(fTempStruct[myTracks].fElectron && fTempStruct[myTracks].fMom < 0.45) continue;// Remove electron band | |
2017 | if(!fTempStruct[myTracks].fPion && !fTempStruct[myTracks].fKaon && !fTempStruct[myTracks].fProton) continue; | |
2018 | if(!fTempStruct[myTracks].fPion) continue;// only pions | |
2019 | if(fTempStruct[myTracks].fPion && fTempStruct[myTracks].fKaon) continue; | |
2020 | if(fTempStruct[myTracks].fPion && fTempStruct[myTracks].fProton) continue; | |
2021 | if(fTempStruct[myTracks].fKaon && fTempStruct[myTracks].fProton) continue; | |
0207c034 | 2022 | |
be9ef9f9 | 2023 | |
2024 | ||
2025 | ||
2026 | if(fTempStruct[myTracks].fCharge==+1) { | |
2027 | ((TH2F*)fOutputList->FindObject("fDCAxyDistPlus"))->Fill(fTempStruct[myTracks].fPt, dca2[0]); | |
2028 | ((TH2F*)fOutputList->FindObject("fDCAzDistPlus"))->Fill(fTempStruct[myTracks].fPt, dca2[1]); | |
2029 | }else { | |
2030 | ((TH2F*)fOutputList->FindObject("fDCAxyDistMinus"))->Fill(fTempStruct[myTracks].fPt, dca2[0]); | |
2031 | ((TH2F*)fOutputList->FindObject("fDCAzDistMinus"))->Fill(fTempStruct[myTracks].fPt, dca2[1]); | |
2032 | } | |
2033 | ||
0207c034 | 2034 | ((TH3F*)fOutputList->FindObject("fChPhiPtDist"))->Fill(aodtrack->Charge(), aodtrack->Phi(), aodtrack->Pt()); |
2035 | ((TH3F*)fOutputList->FindObject("fChPtEtaDist"))->Fill(aodtrack->Charge(), aodtrack->Pt(), aodtrack->Eta()); | |
2036 | ((TH2F*)fOutputList->FindObject("fCentPtDist"))->Fill(int(centralityPercentile/5.), aodtrack->Pt()); | |
2037 | ((TH2F*)fOutputList->FindObject("fCentEtaDist"))->Fill(int(centralityPercentile/5.), aodtrack->Eta()); | |
2038 | ||
6432c081 | 2039 | ((TH2D*)fOutputList->FindObject("fDistTPCNclsFindable"))->Fill(aodtrack->Pt(), aodtrack->GetTPCNclsF()); |
2040 | ((TProfile*)fOutputList->FindObject("fProfileTPCNclsFindable"))->Fill(aodtrack->Pt(), aodtrack->GetTPCNclsF()); | |
2041 | // | |
2042 | ((TH2D*)fOutputList->FindObject("fDistTPCNclsCrossed"))->Fill(aodtrack->Pt(), aodtrack->GetTPCNCrossedRows()); | |
2043 | ((TProfile*)fOutputList->FindObject("fProfileTPCNclsCrossed"))->Fill(aodtrack->Pt(), aodtrack->GetTPCNCrossedRows()); | |
2044 | // | |
2045 | if(aodtrack->GetTPCNclsF() > 0){ | |
2046 | ((TH2D*)fOutputList->FindObject("fDistTPCNclsFindableRatio"))->Fill(aodtrack->Pt(), double(aodtrack->GetTPCNcls())/double(aodtrack->GetTPCNclsF())); | |
2047 | ((TProfile*)fOutputList->FindObject("fProfileTPCNclsFindableRatio"))->Fill(aodtrack->Pt(), double(aodtrack->GetTPCNcls())/double(aodtrack->GetTPCNclsF())); | |
2048 | } | |
2049 | // | |
2050 | ((TH2D*)fOutputList->FindObject("fDistTPCNclsCrossedRatio"))->Fill(aodtrack->Pt(), aodtrack->GetTPCFoundFraction()); | |
2051 | ((TProfile*)fOutputList->FindObject("fProfileTPCNclsCrossedRatio"))->Fill(aodtrack->Pt(), aodtrack->GetTPCFoundFraction()); | |
2052 | ||
2053 | ||
be9ef9f9 | 2054 | if(fTempStruct[myTracks].fPion) {// pions |
2055 | fTempStruct[myTracks].fEaccepted = sqrt(pow(fTempStruct[myTracks].fMom,2) + pow(fTrueMassPi,2)); | |
2056 | fTempStruct[myTracks].fKey = 1; | |
2057 | }else if(fTempStruct[myTracks].fKaon){// kaons | |
2058 | fTempStruct[myTracks].fEaccepted = sqrt(pow(fTempStruct[myTracks].fMom,2) + pow(fTrueMassK,2));; | |
2059 | fTempStruct[myTracks].fKey = 10; | |
2060 | }else{// protons | |
2061 | fTempStruct[myTracks].fEaccepted = sqrt(pow(fTempStruct[myTracks].fMom,2) + pow(fTrueMassP,2));; | |
2062 | fTempStruct[myTracks].fKey = 100; | |
2063 | } | |
2064 | ||
2065 | ||
2066 | ||
2067 | if(aodtrack->Charge() > 0) positiveTracks++; | |
2068 | else negativeTracks++; | |
2069 | ||
2070 | if(fTempStruct[myTracks].fPion) pionCount++; | |
2071 | if(fTempStruct[myTracks].fKaon) kaonCount++; | |
2072 | if(fTempStruct[myTracks].fProton) protonCount++; | |
2073 | ||
2074 | myTracks++; | |
2075 | ||
2076 | if(fMCcase){// muon mothers | |
2077 | AliAODMCParticle *tempMCTrack=(AliAODMCParticle*)mcArray->At(abs(aodtrack->GetLabel())); | |
2078 | if(abs(tempMCTrack->GetPdgCode())==13 && tempMCTrack->GetMother()>0){// muons | |
2079 | AliAODMCParticle *parent=(AliAODMCParticle*)mcArray->At(tempMCTrack->GetMother()); | |
2080 | if(parent->IsPhysicalPrimary()){ | |
2081 | ((TH1D*)fOutputList->FindObject("fMuonParents"))->Fill(abs(parent->GetPdgCode())); | |
2082 | }else ((TH1D*)fOutputList->FindObject("fSecondaryMuonParents"))->Fill(abs(parent->GetPdgCode())); | |
2083 | } | |
2084 | ((TH1D*)fOutputList->FindObject("fPionCandidates"))->Fill(abs(tempMCTrack->GetPdgCode())); | |
2085 | } | |
2086 | } | |
2087 | //cout<<"kinkcount = "<<kinkcount<<" pionkinks = "<<pionkinks<<" primarypionkinks = "<<primarypionkinks<<endl; | |
2088 | }else {// ESD tracks | |
2089 | cout<<"ESDs not supported currently"<<endl; | |
2090 | return; | |
2091 | } | |
2092 | ||
2093 | // Generator info only | |
2094 | if(fMCcase && fGeneratorOnly){ | |
2095 | myTracks=0; pionCount=0; kaonCount=0; protonCount=0;// reset track counters | |
2096 | for(Int_t mctrackN=0; mctrackN<mcArray->GetEntriesFast(); mctrackN++){ | |
2097 | if(myTracks >= fMultLimit) {cout<<"More tracks than Track Limit"<<endl; return;} | |
2098 | if(myTracks >= 1300) continue;// additional cut to limit high mult events which exceed pair # limits | |
2099 | ||
2100 | AliAODMCParticle *mcParticle = (AliAODMCParticle*)mcArray->At(mctrackN); | |
2101 | if(!mcParticle) continue; | |
2102 | if(fabs(mcParticle->Eta())>0.8) continue; | |
2103 | if(mcParticle->Charge()!=-3 && mcParticle->Charge()!=+3) continue;// x3 by convention | |
86528e76 | 2104 | if(mcParticle->Pt() < 0.16 || mcParticle->Pt() > 1.0) continue; |
be9ef9f9 | 2105 | if(!mcParticle->IsPrimary()) continue; |
2106 | if(!mcParticle->IsPhysicalPrimary()) continue; | |
2107 | if(abs(mcParticle->GetPdgCode())!=211) continue; | |
2108 | ||
2109 | fTempStruct[myTracks].fP[0] = mcParticle->Px(); | |
2110 | fTempStruct[myTracks].fP[1] = mcParticle->Py(); | |
2111 | fTempStruct[myTracks].fP[2] = mcParticle->Pz(); | |
2112 | fTempStruct[myTracks].fX[0] = 0.; fTempStruct[myTracks].fX[1] = 0.; fTempStruct[myTracks].fX[2] = 0.; | |
2113 | ||
2114 | fTempStruct[myTracks].fId = myTracks;// use my track counter | |
2115 | fTempStruct[myTracks].fLabel = mctrackN; | |
2116 | fTempStruct[myTracks].fPhi = atan2(fTempStruct[myTracks].fP[1], fTempStruct[myTracks].fP[0]); | |
2117 | if(fTempStruct[myTracks].fPhi < 0) fTempStruct[myTracks].fPhi += 2*PI; | |
2118 | fTempStruct[myTracks].fPt = sqrt(pow(fTempStruct[myTracks].fP[0],2) + pow(fTempStruct[myTracks].fP[1],2)); | |
2119 | fTempStruct[myTracks].fMom = sqrt( pow(fTempStruct[myTracks].fPt,2) + pow(fTempStruct[myTracks].fP[2],2) ); | |
2120 | fTempStruct[myTracks].fEta = mcParticle->Eta(); | |
2121 | fTempStruct[myTracks].fCharge = int(mcParticle->Charge()/3.); | |
2122 | fTempStruct[myTracks].fDCAXY = 0.; | |
2123 | fTempStruct[myTracks].fDCAZ = 0.; | |
2124 | fTempStruct[myTracks].fDCA = 0.; | |
2125 | fTempStruct[myTracks].fPion = kTRUE; | |
2126 | fTempStruct[myTracks].fEaccepted = sqrt(pow(fTempStruct[myTracks].fMom,2) + pow(fTrueMassPi,2)); | |
2127 | fTempStruct[myTracks].fKey = 1; | |
2128 | ||
2129 | myTracks++; | |
2130 | pionCount++; | |
2131 | } | |
2132 | } | |
2133 | ||
2134 | if(myTracks >= 1) { | |
2135 | ((TH1F*)fOutputList->FindObject("fMultDist3"))->Fill(myTracks); | |
2136 | } | |
2137 | ||
2138 | ||
2139 | //cout<<"There are "<<myTracks<<" myTracks"<<endl; | |
2140 | //cout<<"pionCount = "<<pionCount<<" kaonCount = "<<kaonCount<<" protonCount = "<<protonCount<<endl; | |
6432c081 | 2141 | //return; |
be9ef9f9 | 2142 | |
2143 | ///////////////////////////////////////// | |
2144 | // Pion Multiplicity Cut (To ensure all Correlation orders are present in each event) | |
0207c034 | 2145 | if(myTracks < 4) {/*cout<<"Less than 4 tracks. Skipping Event."<<endl;*/ return;} |
be9ef9f9 | 2146 | ///////////////////////////////////////// |
2147 | ||
2148 | ||
2149 | //////////////////////////////// | |
2150 | /////////////////////////////// | |
2151 | // Mbin determination | |
2152 | // | |
2153 | // Mbin set to Pion Count Only for pp!!!!!!! | |
2154 | fMbin=-1; | |
ebd00f1b | 2155 | if(fCollisionType!=0){ |
0207c034 | 2156 | |
2157 | if(pionCount >= fMultLimits[3] && pionCount < fMultLimits[10]) fMbin=0;// only 1 bin | |
2158 | ||
2159 | for(Int_t i=0; i<fMbinsMixing; i++){// event-mixing M bin | |
2160 | if( ( pionCount >= fMultLimits[i]) && ( pionCount < fMultLimits[i+1]) ){ | |
2161 | MbinMixing=i;// 0 = lowest mult | |
2162 | break; | |
2163 | } | |
be9ef9f9 | 2164 | } |
0207c034 | 2165 | |
be9ef9f9 | 2166 | }else{ |
29d2e579 | 2167 | for(Int_t i=0; i<fCentBins; i++){// correlation analysis M bin |
be9ef9f9 | 2168 | if( (centralityPercentile >= cStart+i*cStep) && (centralityPercentile < cStart+(i+1)*cStep) ){ |
2169 | fMbin=i;// 0 = most central | |
2170 | break; | |
2171 | } | |
2172 | } | |
0207c034 | 2173 | for(Int_t i=0; i<fMbinsMixing; i++){// event-mixing M bin |
29d2e579 | 2174 | if( (centralityPercentile >= cStart+i*cStepMixing) && (centralityPercentile < cStart+(i+1)*cStepMixing) ){ |
2175 | MbinMixing=i;// 0 = most central | |
2176 | break; | |
2177 | } | |
2178 | } | |
be9ef9f9 | 2179 | } |
0207c034 | 2180 | |
2181 | if(fMbin==-1) {return;} | |
be9ef9f9 | 2182 | |
70a43d86 | 2183 | |
2184 | ////////////////////////////////////////////////////////////////////////// | |
2185 | // q2 vector | |
2186 | Float_t Qx[4]={0}; | |
2187 | Float_t Qy[4]={0}; | |
2188 | Float_t Mq[4]={0}; | |
2189 | Float_t qVect2[4]={0}; | |
2190 | Int_t q2index=0; | |
2191 | for(Int_t i=0; i<myTracks; i++){ | |
2192 | if(fTempStruct[i].fPt < 0.25) q2index=0; | |
2193 | else if(fTempStruct[i].fPt < 0.35) q2index=1; | |
2194 | else if(fTempStruct[i].fPt < 0.45) q2index=2; | |
2195 | else q2index=3; | |
2196 | ||
2197 | Qx[q2index] += cos(2*fTempStruct[i].fPhi); | |
2198 | Qy[q2index] += sin(2*fTempStruct[i].fPhi); | |
2199 | Mq[q2index]++; | |
2200 | } | |
2201 | for(Int_t i=0; i<4; i++){ | |
2202 | qVect2[i] = sqrt(pow(Qx[i],2)+pow(Qy[i],2)); | |
2203 | if(Mq[i] > 0) qVect2[i] /= sqrt(Mq[i]); | |
2204 | ((TH3F*)fOutputList->FindObject("fq2Dist"))->Fill(fMbin+1, i+1, qVect2[i]); | |
2205 | //cout<<qVect2[i]<<" "<<Mq[i]<<endl; | |
2206 | } | |
2207 | ||
2208 | if(fq2Binning){// bin in q2 | |
2209 | if(qVect2[fq2Index] < fq2CutLow) fEDbin = 0; | |
2210 | else if (qVect2[fq2Index] > fq2CutHigh) fEDbin = 1; | |
2211 | else return; | |
2212 | } | |
2213 | ////////////////////////////////////////////////////////////////////////// | |
2214 | ||
2215 | ||
be9ef9f9 | 2216 | /////////////////// |
2217 | // can only be called after fMbin has been set | |
2218 | // Radius parameter only matters for Monte-Carlo data | |
2219 | SetFSIindex(fRMax); | |
2220 | /////////////////// | |
2221 | ||
2222 | Int_t rBinForTPNMomRes = 10; | |
2223 | if(fMbin==0) {rBinForTPNMomRes=10;}// 10 fm with EW (fRMax should be 11 for normal running) | |
2224 | else if(fMbin==1) {rBinForTPNMomRes=9;} | |
2225 | else if(fMbin<=3) {rBinForTPNMomRes=8;} | |
2226 | else if(fMbin<=5) {rBinForTPNMomRes=7;} | |
2227 | else {rBinForTPNMomRes=6;} | |
2228 | ||
2229 | ////////////////////////////////////////////////// | |
70a43d86 | 2230 | if(!fq2Binning) fEDbin=0;// Extra Dimension bin (Kt3, q2,....) |
be9ef9f9 | 2231 | ////////////////////////////////////////////////// |
2232 | ||
70a43d86 | 2233 | |
be9ef9f9 | 2234 | |
2235 | ((TH1F*)fOutputList->FindObject("fEvents1"))->Fill(fMbin+1); | |
2236 | ((TProfile*)fOutputList->FindObject("fAvgMult"))->Fill(fMbin+1., pionCount); | |
2237 | ||
2238 | //////////////////////////////////// | |
2239 | // Add event to buffer if > 0 tracks | |
2240 | if(myTracks > 0){ | |
29d2e579 | 2241 | fEC[zbin][MbinMixing]->FIFOShift(); |
2242 | (fEvt) = fEC[zbin][MbinMixing]->fEvtStr; | |
be9ef9f9 | 2243 | (fEvt)->fNtracks = myTracks; |
2244 | (fEvt)->fFillStatus = 1; | |
2245 | for(Int_t i=0; i<myTracks; i++) (fEvt)->fTracks[i] = fTempStruct[i]; | |
2246 | if(fMCcase){ | |
2247 | (fEvt)->fMCarraySize = mcArray->GetEntriesFast(); | |
2248 | for(Int_t i=0; i<mcArray->GetEntriesFast(); i++) { | |
2249 | AliAODMCParticle *tempMCTrack = (AliAODMCParticle*)mcArray->At(i); | |
2250 | (fEvt)->fMCtracks[i].fPx = tempMCTrack->Px(); | |
2251 | (fEvt)->fMCtracks[i].fPy = tempMCTrack->Py(); | |
2252 | (fEvt)->fMCtracks[i].fPz = tempMCTrack->Pz(); | |
2253 | (fEvt)->fMCtracks[i].fPtot = sqrt(pow(tempMCTrack->Px(),2)+pow(tempMCTrack->Py(),2)+pow(tempMCTrack->Pz(),2)); | |
2254 | (fEvt)->fMCtracks[i].fPdgCode = tempMCTrack->GetPdgCode(); | |
2255 | (fEvt)->fMCtracks[i].fMotherLabel = tempMCTrack->GetMother(); | |
2256 | } | |
2257 | } | |
2258 | } | |
4bf06935 | 2259 | |
70a43d86 | 2260 | |
be9ef9f9 | 2261 | |
2262 | Float_t qinv12=0, qinv13=0, qinv14=0, qinv23=0, qinv24=0, qinv34=0; | |
2263 | Float_t qout=0, qside=0, qlong=0; | |
2264 | Float_t kT12=0; | |
2265 | Float_t q3=0, q3MC=0; | |
2266 | Float_t q4=0, q4MC=0; | |
2267 | Int_t ch1=0, ch2=0, ch3=0, ch4=0; | |
2268 | Int_t bin1=0, bin2=0, bin3=0, bin4=0; | |
2269 | Float_t pVect1[4]={0}; | |
2270 | Float_t pVect2[4]={0}; | |
2271 | Float_t pVect3[4]={0}; | |
2272 | Float_t pVect4[4]={0}; | |
2273 | Float_t pVect1MC[4]={0}; | |
2274 | Float_t pVect2MC[4]={0}; | |
2275 | Float_t pVect3MC[4]={0}; | |
2276 | Float_t pVect4MC[4]={0}; | |
2277 | Float_t Pparent1[4]={0}; | |
2278 | Float_t Pparent2[4]={0}; | |
2279 | Float_t Pparent3[4]={0}; | |
2280 | Float_t Pparent4[4]={0}; | |
2281 | Float_t weight12=0, weight13=0, weight14=0, weight23=0, weight24=0, weight34=0; | |
2282 | Float_t weight12Err=0, weight13Err=0, weight14Err=0, weight23Err=0, weight24Err=0, weight34Err=0; | |
5591748e | 2283 | Float_t weight12CC[3]={0}; |
2284 | Float_t weight13CC[3]={0}; | |
2285 | Float_t weight14CC[3]={0}; | |
2286 | Float_t weight23CC[3]={0}; | |
2287 | Float_t weight24CC[3]={0}; | |
2288 | Float_t weight34CC[3]={0}; | |
ab890ec3 | 2289 | //Float_t weight12CC_e=0, weight13CC_e=0, weight14CC_e=0, weight23CC_e=0, weight24CC_e=0, weight34CC_e=0; |
2290 | Float_t weightTotal=0;//, weightTotalErr=0; | |
574647ef | 2291 | Float_t weightPrime=0, weightPrimePrime=0, weightCumulant=0; |
be9ef9f9 | 2292 | Float_t qinv12MC=0, qinv13MC=0, qinv14MC=0, qinv23MC=0, qinv24MC=0, qinv34MC=0; |
2293 | Float_t parentQinv12=0, parentQinv13=0, parentQinv14=0, parentQinv23=0, parentQinv24=0, parentQinv34=0; | |
2294 | Float_t parentQ3=0; | |
2295 | Float_t FSICorr12=0, FSICorr13=0, FSICorr14=0, FSICorr23=0, FSICorr24=0, FSICorr34=0; | |
2296 | Bool_t pionParent1=kFALSE, pionParent2=kFALSE, pionParent3=kFALSE, pionParent4=kFALSE; | |
2297 | Bool_t FilledMCpair12=kFALSE, FilledMCtriplet123=kFALSE; | |
6432c081 | 2298 | Bool_t Positive1stTripletWeights=kTRUE, Positive2ndTripletWeights=kTRUE; |
ab890ec3 | 2299 | Float_t T12=0, T13=0, T14=0, T23=0, T24=0, T34=0; |
574647ef | 2300 | Float_t t12=0, t13=0, t14=0, t23=0, t24=0, t34=0; |
80507acf | 2301 | Int_t momBin12=1, momBin13=1, momBin14=1, momBin23=1, momBin24=1, momBin34=1; |
2302 | Float_t MomResCorr12=1.0, MomResCorr13=1.0, MomResCorr14=1.0, MomResCorr23=1.0, MomResCorr24=1.0, MomResCorr34=1.0; | |
be9ef9f9 | 2303 | // |
2304 | AliAODMCParticle *mcParticle1=0x0; | |
2305 | AliAODMCParticle *mcParticle2=0x0; | |
2306 | ||
2307 | ||
2308 | //////////////////// | |
b71263d0 | 2309 | //Int_t PairCount[7]={0}; |
2310 | //Int_t NormPairCount[7]={0}; | |
70a43d86 | 2311 | Int_t EDindex3=0, EDindex4=0; |
be9ef9f9 | 2312 | |
b71263d0 | 2313 | // reset to defaults |
0207c034 | 2314 | for(Int_t i=0; i<fMultLimit; i++) { |
b71263d0 | 2315 | fLowQPairSwitch_E0E0[i]->Set(kMultLimitPbPb,fDefaultsCharSwitch); |
2316 | fLowQPairSwitch_E0E1[i]->Set(kMultLimitPbPb,fDefaultsCharSwitch); | |
2317 | fLowQPairSwitch_E0E2[i]->Set(kMultLimitPbPb,fDefaultsCharSwitch); | |
2318 | fLowQPairSwitch_E0E3[i]->Set(kMultLimitPbPb,fDefaultsCharSwitch); | |
6bb6954b | 2319 | fLowQPairSwitch_E1E1[i]->Set(kMultLimitPbPb,fDefaultsCharSwitch); |
b71263d0 | 2320 | fLowQPairSwitch_E1E2[i]->Set(kMultLimitPbPb,fDefaultsCharSwitch); |
2321 | fLowQPairSwitch_E1E3[i]->Set(kMultLimitPbPb,fDefaultsCharSwitch); | |
2322 | fLowQPairSwitch_E2E3[i]->Set(kMultLimitPbPb,fDefaultsCharSwitch); | |
2323 | // | |
2324 | fNormQPairSwitch_E0E0[i]->Set(kMultLimitPbPb,fDefaultsCharSwitch); | |
2325 | fNormQPairSwitch_E0E1[i]->Set(kMultLimitPbPb,fDefaultsCharSwitch); | |
2326 | fNormQPairSwitch_E0E2[i]->Set(kMultLimitPbPb,fDefaultsCharSwitch); | |
2327 | fNormQPairSwitch_E0E3[i]->Set(kMultLimitPbPb,fDefaultsCharSwitch); | |
6bb6954b | 2328 | fNormQPairSwitch_E1E1[i]->Set(kMultLimitPbPb,fDefaultsCharSwitch); |
b71263d0 | 2329 | fNormQPairSwitch_E1E2[i]->Set(kMultLimitPbPb,fDefaultsCharSwitch); |
2330 | fNormQPairSwitch_E1E3[i]->Set(kMultLimitPbPb,fDefaultsCharSwitch); | |
2331 | fNormQPairSwitch_E2E3[i]->Set(kMultLimitPbPb,fDefaultsCharSwitch); | |
2332 | } | |
5591748e | 2333 | |
b71263d0 | 2334 | |
2335 | ////////////////////////////////////////// | |
2336 | // make low-q pair storage and normalization-pair storage | |
2337 | // | |
2338 | for(Int_t en1=0; en1<=2; en1++){// 1st event number (en1=0 is the same event as current event) | |
2339 | for(Int_t en2=en1; en2<=3; en2++){// 2nd event number (en2=0 is the same event as current event) | |
6bb6954b | 2340 | if(en1>1 && en1==en2) continue; |
2341 | ||
b71263d0 | 2342 | for (Int_t i=0; i<(fEvt+en1)->fNtracks; i++) {// 1st particle |
2343 | for (Int_t j=i+1; j<(fEvt+en2)->fNtracks; j++) {// 2nd particle | |
2344 | ||
5591748e | 2345 | |
b71263d0 | 2346 | pVect1[0]=(fEvt+en1)->fTracks[i].fEaccepted; pVect2[0]=(fEvt+en2)->fTracks[j].fEaccepted; |
2347 | pVect1[1]=(fEvt+en1)->fTracks[i].fP[0]; pVect2[1]=(fEvt+en2)->fTracks[j].fP[0]; | |
2348 | pVect1[2]=(fEvt+en1)->fTracks[i].fP[1]; pVect2[2]=(fEvt+en2)->fTracks[j].fP[1]; | |
2349 | pVect1[3]=(fEvt+en1)->fTracks[i].fP[2]; pVect2[3]=(fEvt+en2)->fTracks[j].fP[2]; | |
2350 | ch1 = Int_t(((fEvt+en1)->fTracks[i].fCharge + 1)/2.); | |
2351 | ch2 = Int_t(((fEvt+en2)->fTracks[j].fCharge + 1)/2.); | |
2352 | ||
2353 | qinv12 = GetQinv(pVect1, pVect2); | |
2354 | kT12 = sqrt(pow(pVect1[1]+pVect2[1],2) + pow(pVect1[2]+pVect2[2],2))/2.; | |
2355 | SetFillBins2(ch1, ch2, bin1, bin2); | |
2356 | ||
80507acf | 2357 | if(qinv12 < fQLowerCut) continue;// remove unwanted low-q pairs (also a type of track splitting/merging cut) |
2358 | if(ch1 == ch2 && !fGeneratorOnly){ | |
fac2d84b | 2359 | Int_t tempChGroup[2]={0,0}; |
80507acf | 2360 | if(en1==0 && en2==1) ((TH1F*)fOutputList->FindObject("fTotalPairsWeighting"))->Fill(qinv12, MCWeight(tempChGroup, 10, ffcSqMRC, qinv12, 0.)); |
b71263d0 | 2361 | if(!AcceptPair((fEvt+en1)->fTracks[i], (fEvt+en2)->fTracks[j])) { |
2362 | if(en1==0 && en2==0) ((TH1F*)fOutputList->FindObject("fRejectedPairs"))->Fill(qinv12); | |
2363 | continue; | |
be9ef9f9 | 2364 | } |
80507acf | 2365 | if(en1==0 && en2==1) ((TH1F*)fOutputList->FindObject("fAcceptedPairsWeighting"))->Fill(qinv12, MCWeight(tempChGroup, 10, ffcSqMRC, qinv12, 0.)); |
fac2d84b | 2366 | } |
42802bba | 2367 | if(fMixedChargeCut && ch1 != ch2 && !fGeneratorOnly && !fMCcase){// remove +- low-q pairs to keep balance between ++ and +- contributions to multi-particle Q3,Q4 projections |
fac2d84b | 2368 | Int_t tempChGroup[2]={0,1}; |
80507acf | 2369 | if(en1==0 && en2==1) ((TH1F*)fOutputList->FindObject("fTotalPairsWeightingMC"))->Fill(qinv12, MCWeight(tempChGroup, 10, ffcSqMRC, qinv12, 0.)); |
fac2d84b | 2370 | if(!AcceptPairPM((fEvt+en1)->fTracks[i], (fEvt+en2)->fTracks[j])) { |
2371 | if(en1==0 && en2==0) ((TH1F*)fOutputList->FindObject("fRejectedPairsMC"))->Fill(qinv12); | |
2372 | continue; | |
2373 | } | |
80507acf | 2374 | if(en1==0 && en2==1) ((TH1F*)fOutputList->FindObject("fAcceptedPairsWeightingMC"))->Fill(qinv12, MCWeight(tempChGroup, 10, ffcSqMRC, qinv12, 0.)); |
42802bba | 2375 | } |
b71263d0 | 2376 | |
2377 | GetQosl(pVect1, pVect2, qout, qside, qlong); | |
2378 | if( (en1+en2==0)) { | |
86528e76 | 2379 | if(!fGenerateSignal) Charge1[bin1].Charge2[bin2].MB[fMbin].EDB[0].TwoPT[0].fTerms2->Fill(kT12, qinv12); |
b71263d0 | 2380 | Charge1[bin1].Charge2[bin2].MB[fMbin].EDB[0].TwoPT[0].fTerms2QW->Fill(kT12, qinv12, qinv12); |
2381 | // osl frame | |
2382 | if((kT12 > 0.2) && (kT12 < 0.3)){ | |
2383 | Charge1[bin1].Charge2[bin2].MB[fMbin].EDB[0].TwoPT[en2].OSL_ktbin[0].fTerms2OSL->Fill(fabs(qout), fabs(qside), fabs(qlong)); | |
2384 | Charge1[bin1].Charge2[bin2].MB[fMbin].EDB[0].TwoPT[en2].OSL_ktbin[0].fTerms2OSLQW->Fill(fabs(qout), fabs(qside), fabs(qlong), qinv12); | |
be9ef9f9 | 2385 | } |
b71263d0 | 2386 | if((kT12 > 0.6) && (kT12 < 0.7)){ |
2387 | Charge1[bin1].Charge2[bin2].MB[fMbin].EDB[0].TwoPT[en2].OSL_ktbin[1].fTerms2OSL->Fill(fabs(qout), fabs(qside), fabs(qlong)); | |
2388 | Charge1[bin1].Charge2[bin2].MB[fMbin].EDB[0].TwoPT[en2].OSL_ktbin[1].fTerms2OSLQW->Fill(fabs(qout), fabs(qside), fabs(qlong), qinv12); | |
be9ef9f9 | 2389 | } |
b71263d0 | 2390 | // unit mult bins |
2391 | if( (fEvt+en1)->fNtracks%100==0){ | |
2392 | Int_t kTindex=0; | |
2393 | if(kT12>0.3) kTindex=1; | |
2394 | Int_t UnitMultBin = int((fEvt+en1)->fNtracks / 100.) + 1; | |
2395 | Charge1[bin1].Charge2[bin2].MB[fMbin].EDB[kTindex].TwoPT[0].fUnitMultBin->Fill(UnitMultBin, qinv12); | |
be9ef9f9 | 2396 | } |
574647ef | 2397 | |
b71263d0 | 2398 | } |
2399 | if( (en1+en2==1)) { | |
86528e76 | 2400 | if(!fGenerateSignal) Charge1[bin1].Charge2[bin2].MB[fMbin].EDB[0].TwoPT[1].fTerms2->Fill(kT12, qinv12); |
b71263d0 | 2401 | Charge1[bin1].Charge2[bin2].MB[fMbin].EDB[0].TwoPT[1].fTerms2QW->Fill(kT12, qinv12, qinv12); |
2402 | // osl frame | |
2403 | if((kT12 > 0.2) && (kT12 < 0.3)){ | |
2404 | Charge1[bin1].Charge2[bin2].MB[fMbin].EDB[fEDbin].TwoPT[en2].OSL_ktbin[0].fTerms2OSL->Fill(fabs(qout), fabs(qside), fabs(qlong)); | |
2405 | Charge1[bin1].Charge2[bin2].MB[fMbin].EDB[fEDbin].TwoPT[en2].OSL_ktbin[0].fTerms2OSLQW->Fill(fabs(qout), fabs(qside), fabs(qlong), qinv12); | |
2406 | } | |
2407 | if((kT12 > 0.6) && (kT12 < 0.7)){ | |
2408 | Charge1[bin1].Charge2[bin2].MB[fMbin].EDB[fEDbin].TwoPT[en2].OSL_ktbin[1].fTerms2OSL->Fill(fabs(qout), fabs(qside), fabs(qlong)); | |
2409 | Charge1[bin1].Charge2[bin2].MB[fMbin].EDB[fEDbin].TwoPT[en2].OSL_ktbin[1].fTerms2OSLQW->Fill(fabs(qout), fabs(qside), fabs(qlong), qinv12); | |
be9ef9f9 | 2410 | } |
b71263d0 | 2411 | // unit mult bins |
2412 | if( (fEvt+en1)->fNtracks%100==0){ | |
2413 | Int_t kTindex=0; | |
2414 | if(kT12>0.3) kTindex=1; | |
2415 | Int_t UnitMultBin = int((fEvt+en1)->fNtracks / 100.) + 1; | |
2416 | Charge1[bin1].Charge2[bin2].MB[fMbin].EDB[kTindex].TwoPT[1].fUnitMultBin->Fill(UnitMultBin, qinv12); | |
be9ef9f9 | 2417 | } |
b71263d0 | 2418 | } |
574647ef | 2419 | ///////////////////////////////////////////////////// |
6bb6954b | 2420 | if(fTabulatePairs && en1==0 && en2<=1 && bin1==bin2){ |
b71263d0 | 2421 | Float_t kY = 0; |
2422 | Int_t kTbin=-1, kYbin=-1; | |
86528e76 | 2423 | Bool_t PairToReject=kFALSE; |
2424 | if((fEvt+en1)->fTracks[i].fPt < fMinPt || (fEvt+en1)->fTracks[i].fPt > fMaxPt) PairToReject=kTRUE; | |
2425 | if((fEvt+en2)->fTracks[j].fPt < fMinPt || (fEvt+en2)->fTracks[j].fPt > fMaxPt) PairToReject=kTRUE; | |
2426 | if(!PairToReject){ | |
2427 | for(Int_t kIt=0; kIt<fKbinsT; kIt++) {if(kT12 < (fKmiddleT[kIt] + fKstepT[kIt]/2.)) {kTbin = kIt; break;}} | |
2428 | for(Int_t kIt=0; kIt<fKbinsY; kIt++) {if(kY < (fKmiddleY[kIt] + fKstepY[kIt]/2.)) {kYbin = kIt; break;}} | |
2429 | if((kTbin<0) || (kYbin<0)) {cout<<"problem!!!!!!!!!!!!!!!!!!!!!!!!!!!!"<<endl; continue;} | |
2430 | if((kTbin>=fKbinsT) || (kYbin>=fKbinsY)) {cout<<"problem!!!!!!!!!!!!!!!!!!!!!!!!!!!!"<<endl; continue;} | |
2431 | if(fGenerateSignal && en2==0) { | |
2432 | Int_t chGroup2[2]={ch1,ch2}; | |
2433 | Float_t WInput = MCWeight(chGroup2, fRMax, ffcSqMRC, qinv12, kT12); | |
70a43d86 | 2434 | KT[kTbin].KY[kYbin].MB[fMbin].EDB[fEDbin].TwoPT[en2].fTerms2ThreeD->Fill(fabs(qout), fabs(qside), fabs(qlong), WInput); |
2435 | }else KT[kTbin].KY[kYbin].MB[fMbin].EDB[fEDbin].TwoPT[en2].fTerms2ThreeD->Fill(fabs(qout), fabs(qside), fabs(qlong)); | |
86528e76 | 2436 | } |
b71263d0 | 2437 | } |
2438 | ||
2439 | ////////////////////////////////////////////////////////////////////////////// | |
86528e76 | 2440 | |
b71263d0 | 2441 | if(qinv12 <= fQcut) { |
b71263d0 | 2442 | if(en1==0 && en2==0) {fLowQPairSwitch_E0E0[i]->AddAt('1',j);} |
2443 | if(en1==0 && en2==1) {fLowQPairSwitch_E0E1[i]->AddAt('1',j);} | |
2444 | if(en1==0 && en2==2) {fLowQPairSwitch_E0E2[i]->AddAt('1',j);} | |
2445 | if(en1==0 && en2==3) {fLowQPairSwitch_E0E3[i]->AddAt('1',j);} | |
6bb6954b | 2446 | if(en1==1 && en2==1) {fLowQPairSwitch_E1E1[i]->AddAt('1',j);} |
b71263d0 | 2447 | if(en1==1 && en2==2) {fLowQPairSwitch_E1E2[i]->AddAt('1',j);} |
2448 | if(en1==1 && en2==3) {fLowQPairSwitch_E1E3[i]->AddAt('1',j);} | |
2449 | if(en1==2 && en2==3) {fLowQPairSwitch_E2E3[i]->AddAt('1',j);} | |
2450 | } | |
2451 | if((qinv12 >= fNormQcutLow) && (qinv12 < fNormQcutHigh)) { | |
b71263d0 | 2452 | if(en1==0 && en2==0) {fNormQPairSwitch_E0E0[i]->AddAt('1',j);} |
2453 | if(en1==0 && en2==1) {fNormQPairSwitch_E0E1[i]->AddAt('1',j);} | |
2454 | if(en1==0 && en2==2) {fNormQPairSwitch_E0E2[i]->AddAt('1',j);} | |
2455 | if(en1==0 && en2==3) {fNormQPairSwitch_E0E3[i]->AddAt('1',j);} | |
6bb6954b | 2456 | if(en1==1 && en2==1) {fNormQPairSwitch_E1E1[i]->AddAt('1',j);} |
b71263d0 | 2457 | if(en1==1 && en2==2) {fNormQPairSwitch_E1E2[i]->AddAt('1',j);} |
2458 | if(en1==1 && en2==3) {fNormQPairSwitch_E1E3[i]->AddAt('1',j);} | |
2459 | if(en1==2 && en2==3) {fNormQPairSwitch_E2E3[i]->AddAt('1',j);} | |
be9ef9f9 | 2460 | } |
b71263d0 | 2461 | |
be9ef9f9 | 2462 | } |
2463 | } | |
2464 | } | |
b71263d0 | 2465 | } |
be9ef9f9 | 2466 | |
b71263d0 | 2467 | //cout<<PairCount[0]<<" "<<PairCount[1]<<" "<<PairCount[2]<<" "<<PairCount[3]<<" "<<PairCount[4]<<" "<<PairCount[5]<<" "<<PairCount[6]<<endl; |
2468 | //cout<<NormPairCount[0]<<" "<<NormPairCount[1]<<" "<<NormPairCount[2]<<" "<<NormPairCount[3]<<" "<<NormPairCount[4]<<" "<<NormPairCount[5]<<" "<<NormPairCount[6]<<endl; | |
2469 | /////////////////////////////////////////////////// | |
2470 | // Do not use pairs from events with too many pairs | |
2471 | ||
2472 | ((TH1F*)fOutputList->FindObject("fEvents2"))->Fill(fMbin+1); | |
2473 | ||
2474 | /////////////////////////////////////////////////// | |
2475 | ||
2476 | ||
2477 | if(fTabulatePairs) return; | |
be9ef9f9 | 2478 | |
fac2d84b | 2479 | /*TF1 *SCpairWeight = new TF1("SCpairWeight","[0] + [1]*x + [2]*exp(-[3]*x)",0,0.2);// same-charge pair weight for monte-carlo data without two-track cuts. |
2480 | SCpairWeight->FixParameter(0, 0.959); | |
2481 | SCpairWeight->FixParameter(1, 0.278); | |
2482 | SCpairWeight->FixParameter(2, -1.759); | |
2483 | SCpairWeight->FixParameter(3, 115.107);*/ | |
2484 | ||
b71263d0 | 2485 | //////////////////////////////////////////////////// |
2486 | //////////////////////////////////////////////////// | |
2487 | // Normalization counting of 3- and 4-particle terms | |
2488 | for(Int_t en2=0; en2<=1; en2++){// 2nd event number (en2=0 is the same event as current event) | |
2489 | for(Int_t en3=en2; en3<=2; en3++){// 3rd event number | |
6bb6954b | 2490 | if(en2==0 && en3>2) continue;// not needed config |
b71263d0 | 2491 | if(en2==1 && en3==en2) continue;// not needed config |
2492 | for(Int_t en4=en3; en4<=3; en4++){// 4th event number | |
2493 | if(en3==0 && en4>1) continue;// not needed config | |
6bb6954b | 2494 | if(en3==1 && en4==3) continue;// not needed configs |
2495 | if(en3==2 && (en2+en3+en4)!=6) continue;// not needed configs | |
b71263d0 | 2496 | |
2497 | for (Int_t i=0; i<myTracks; i++) {// 1st particle | |
2498 | pVect1[1]=(fEvt)->fTracks[i].fP[0]; | |
2499 | pVect1[2]=(fEvt)->fTracks[i].fP[1]; | |
2500 | pVect1[3]=(fEvt)->fTracks[i].fP[2]; | |
2501 | ch1 = Int_t(((fEvt)->fTracks[i].fCharge + 1)/2.); | |
be9ef9f9 | 2502 | |
b71263d0 | 2503 | for (Int_t j=i+1; j<(fEvt+en2)->fNtracks; j++) {// 2nd particle |
b71263d0 | 2504 | if(en2==0) {if(fNormQPairSwitch_E0E0[i]->At(j)=='0') continue;} |
2505 | else {if(fNormQPairSwitch_E0E1[i]->At(j)=='0') continue;} | |
2506 | ||
2507 | pVect2[1]=(fEvt+en2)->fTracks[j].fP[0]; | |
2508 | pVect2[2]=(fEvt+en2)->fTracks[j].fP[1]; | |
2509 | pVect2[3]=(fEvt+en2)->fTracks[j].fP[2]; | |
2510 | ch2 = Int_t(((fEvt+en2)->fTracks[j].fCharge + 1)/2.); | |
2511 | ||
2512 | for (Int_t k=j+1; k<(fEvt+en3)->fNtracks; k++) {// 3rd particle | |
b71263d0 | 2513 | if(en3==0) { |
2514 | if(fNormQPairSwitch_E0E0[i]->At(k)=='0') continue; | |
2515 | if(fNormQPairSwitch_E0E0[j]->At(k)=='0') continue; | |
2516 | }else if(en3==1){ | |
2517 | if(fNormQPairSwitch_E0E1[i]->At(k)=='0') continue; | |
2518 | if(fNormQPairSwitch_E0E1[j]->At(k)=='0') continue; | |
2519 | }else{ | |
2520 | if(fNormQPairSwitch_E0E2[i]->At(k)=='0') continue; | |
2521 | if(fNormQPairSwitch_E1E2[j]->At(k)=='0') continue; | |
2522 | } | |
be9ef9f9 | 2523 | |
b71263d0 | 2524 | pVect3[1]=(fEvt+en3)->fTracks[k].fP[0]; |
2525 | pVect3[2]=(fEvt+en3)->fTracks[k].fP[1]; | |
2526 | pVect3[3]=(fEvt+en3)->fTracks[k].fP[2]; | |
2527 | ch3 = Int_t(((fEvt+en3)->fTracks[k].fCharge + 1)/2.); | |
2528 | Bool_t fill2=kFALSE, fill3=kFALSE, fill4=kFALSE; | |
2529 | SetFillBins3(ch1, ch2, ch3, 1, bin1, bin2, bin3, fill2, fill3, fill4); | |
2530 | ||
2531 | Float_t KT3 = sqrt(pow(pVect1[1]+pVect2[1]+pVect3[1],2) + pow(pVect1[2]+pVect2[2]+pVect3[2],2))/3.; | |
70a43d86 | 2532 | if(!fq2Binning){ |
2533 | if(KT3<=fKT3transition) EDindex3=0; | |
2534 | else EDindex3=1; | |
2535 | }else{ | |
2536 | EDindex3 = fEDbin; | |
2537 | if(KT3>fKT3transition) { | |
2538 | EDindex3=2+fEDbin; | |
2539 | } | |
2540 | } | |
b71263d0 | 2541 | |
70a43d86 | 2542 | if(en2==0 && en3==0 && en4==0) Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[0].fNorm3->Fill(0); |
2543 | if(en2==1 && en3==2 && en4==3) Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[4].fNorm3->Fill(0); | |
b71263d0 | 2544 | if(en2==0 && en3==1 && en4==2) { |
70a43d86 | 2545 | if(fill2) Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[1].fNorm3->Fill(0); |
2546 | if(fill3) Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[2].fNorm3->Fill(0); | |
2547 | if(fill4) Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[3].fNorm3->Fill(0); | |
b71263d0 | 2548 | } |
2549 | ||
2550 | ||
2551 | for (Int_t l=k+1; l<(fEvt+en4)->fNtracks; l++) {// 4th particle | |
b71263d0 | 2552 | if(en4==0){ |
2553 | if(fNormQPairSwitch_E0E0[i]->At(l)=='0') continue; | |
2554 | if(fNormQPairSwitch_E0E0[j]->At(l)=='0') continue; | |
2555 | if(fNormQPairSwitch_E0E0[k]->At(l)=='0') continue; | |
2556 | }else if(en4==1){ | |
6bb6954b | 2557 | if(en3==0){ |
2558 | if(fNormQPairSwitch_E0E1[i]->At(l)=='0') continue; | |
2559 | if(fNormQPairSwitch_E0E1[j]->At(l)=='0') continue; | |
2560 | if(fNormQPairSwitch_E0E1[k]->At(l)=='0') continue; | |
2561 | }else{ | |
2562 | if(fNormQPairSwitch_E0E1[i]->At(l)=='0') continue; | |
2563 | if(fNormQPairSwitch_E0E1[j]->At(l)=='0') continue; | |
2564 | if(fNormQPairSwitch_E1E1[k]->At(l)=='0') continue; | |
2565 | } | |
b71263d0 | 2566 | }else if(en4==2){ |
2567 | if(fNormQPairSwitch_E0E2[i]->At(l)=='0') continue; | |
2568 | if(fNormQPairSwitch_E0E2[j]->At(l)=='0') continue; | |
2569 | if(fNormQPairSwitch_E1E2[k]->At(l)=='0') continue; | |
be9ef9f9 | 2570 | }else{ |
b71263d0 | 2571 | if(fNormQPairSwitch_E0E3[i]->At(l)=='0') continue; |
2572 | if(fNormQPairSwitch_E1E3[j]->At(l)=='0') continue; | |
2573 | if(fNormQPairSwitch_E2E3[k]->At(l)=='0') continue; | |
be9ef9f9 | 2574 | } |
86528e76 | 2575 | |
b71263d0 | 2576 | pVect4[1]=(fEvt+en4)->fTracks[l].fP[0]; |
2577 | pVect4[2]=(fEvt+en4)->fTracks[l].fP[1]; | |
2578 | pVect4[3]=(fEvt+en4)->fTracks[l].fP[2]; | |
2579 | ch4 = Int_t(((fEvt+en4)->fTracks[l].fCharge + 1)/2.); | |
2580 | Float_t KT4 = sqrt(pow(pVect1[1]+pVect2[1]+pVect3[1]+pVect4[1],2) + pow(pVect1[2]+pVect2[2]+pVect3[2]+pVect4[2],2))/4.; | |
be9ef9f9 | 2581 | |
70a43d86 | 2582 | if(!fq2Binning){ |
2583 | if(KT4<=fKT4transition) EDindex4=0; | |
2584 | else EDindex4=1; | |
2585 | }else{ | |
2586 | EDindex4 = fEDbin; | |
2587 | if(KT4>fKT4transition) { | |
2588 | EDindex4=2+fEDbin; | |
2589 | } | |
2590 | } | |
2591 | ||
6bb6954b | 2592 | Bool_t FillTerms[13]={kFALSE}; |
b71263d0 | 2593 | SetFillBins4(ch1, ch2, ch3, ch4, bin1, bin2, bin3, bin4, en2+en3+en4, FillTerms); |
2594 | // | |
6bb6954b | 2595 | for(int ft=0; ft<13; ft++) { |
70a43d86 | 2596 | if(FillTerms[ft]) Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[fMbin].EDB[EDindex4].FourPT[ft].fNorm4->Fill(0.); |
be9ef9f9 | 2597 | } |
be9ef9f9 | 2598 | |
b71263d0 | 2599 | |
be9ef9f9 | 2600 | } |
2601 | } | |
b71263d0 | 2602 | } |
2603 | } | |
2604 | ||
be9ef9f9 | 2605 | } |
2606 | } | |
b71263d0 | 2607 | } |
be9ef9f9 | 2608 | |
6bb6954b | 2609 | |
0207c034 | 2610 | |
be9ef9f9 | 2611 | |
2612 | /////////////////////////////////////////////////////////////////////// | |
2613 | /////////////////////////////////////////////////////////////////////// | |
2614 | /////////////////////////////////////////////////////////////////////// | |
2615 | // | |
2616 | // | |
2617 | // Start the Main Correlation Analysis | |
2618 | // | |
2619 | // | |
2620 | /////////////////////////////////////////////////////////////////////// | |
6bb6954b | 2621 | |
be9ef9f9 | 2622 | |
2623 | ||
2624 | //////////////////////////////////////////////////// | |
2625 | //////////////////////////////////////////////////// | |
2626 | for(Int_t en2=0; en2<=1; en2++){// 2nd event number (en2=0 is the same event as current event) | |
2627 | for(Int_t en3=en2; en3<=2; en3++){// 3rd event number | |
6bb6954b | 2628 | if(en2==0 && en3>2) continue;// not needed config |
be9ef9f9 | 2629 | if(en2==1 && en3==en2) continue;// not needed config |
2630 | for(Int_t en4=en3; en4<=3; en4++){// 4th event number | |
2631 | if(en3==0 && en4>1) continue;// not needed config | |
6bb6954b | 2632 | if(en3==1 && en4==3) continue;// not needed configs |
2633 | if(en3==2 && (en2+en3+en4)!=6) continue;// not needed configs | |
2634 | ||
be9ef9f9 | 2635 | Int_t ENsum=en2+en3+en4;// 0 or 1 or 3 or 6 |
4bf06935 | 2636 | |
be9ef9f9 | 2637 | ///////////////////////////////////////////////////////////// |
2638 | for (Int_t i=0; i<myTracks; i++) {// 1st particle | |
2639 | pVect1[0]=(fEvt)->fTracks[i].fEaccepted; | |
2640 | pVect1[1]=(fEvt)->fTracks[i].fP[0]; | |
2641 | pVect1[2]=(fEvt)->fTracks[i].fP[1]; | |
2642 | pVect1[3]=(fEvt)->fTracks[i].fP[2]; | |
2643 | ch1 = Int_t(((fEvt)->fTracks[i].fCharge + 1)/2.); | |
86528e76 | 2644 | if((fEvt)->fTracks[i].fPt < fMinPt) continue; |
2645 | if((fEvt)->fTracks[i].fPt > fMaxPt) continue; | |
be9ef9f9 | 2646 | |
2647 | ///////////////////////////////////////////////////////////// | |
2648 | for (Int_t j=i+1; j<(fEvt+en2)->fNtracks; j++) {// 2nd particle | |
b71263d0 | 2649 | if(en2==0) {if(fLowQPairSwitch_E0E0[i]->At(j)=='0') continue;} |
2650 | else {if(fLowQPairSwitch_E0E1[i]->At(j)=='0') continue;} | |
86528e76 | 2651 | if((fEvt+en2)->fTracks[j].fPt < fMinPt) continue; |
2652 | if((fEvt+en2)->fTracks[j].fPt > fMaxPt) continue; | |
2653 | ||
be9ef9f9 | 2654 | pVect2[0]=(fEvt+en2)->fTracks[j].fEaccepted; |
2655 | pVect2[1]=(fEvt+en2)->fTracks[j].fP[0]; | |
2656 | pVect2[2]=(fEvt+en2)->fTracks[j].fP[1]; | |
2657 | pVect2[3]=(fEvt+en2)->fTracks[j].fP[2]; | |
2658 | ch2 = Int_t(((fEvt+en2)->fTracks[j].fCharge + 1)/2.); | |
2659 | qinv12 = GetQinv(pVect1, pVect2); | |
2660 | kT12 = sqrt(pow(pVect1[1]+pVect2[1],2) + pow(pVect1[2]+pVect2[2],2))/2.; | |
2661 | SetFillBins2(ch1, ch2, bin1, bin2); | |
2662 | Int_t kTindex=0; | |
2663 | if(kT12<=0.3) kTindex=0; | |
2664 | else kTindex=1; | |
2665 | ||
2666 | FSICorr12 = FSICorrelation(ch1,ch2, qinv12); | |
2667 | ||
2668 | // two particle terms filled during tabulation of low-q pairs | |
2669 | ||
2670 | ||
2671 | if(fMCcase){ | |
2672 | FilledMCpair12=kFALSE; | |
2673 | ||
6bb6954b | 2674 | if(ch1==ch2 && fMbin==0 && qinv12<0.2 && ENsum!=2 && ENsum!=3 && ENsum!=6){ |
be9ef9f9 | 2675 | for(Int_t rstep=0; rstep<10; rstep++){ |
2676 | Float_t coeff = (rstep)*0.2*(0.18/1.2); | |
2677 | Float_t phi1 = (fEvt)->fTracks[i].fPhi - asin((fEvt)->fTracks[i].fCharge*(0.1*fBfield)*coeff/(fEvt)->fTracks[i].fPt); | |
2678 | if(phi1 > 2*PI) phi1 -= 2*PI; | |
2679 | if(phi1 < 0) phi1 += 2*PI; | |
2680 | Float_t phi2 = (fEvt+en2)->fTracks[j].fPhi - asin((fEvt+en2)->fTracks[j].fCharge*(0.1*fBfield)*coeff/(fEvt+en2)->fTracks[j].fPt); | |
2681 | if(phi2 > 2*PI) phi2 -= 2*PI; | |
2682 | if(phi2 < 0) phi2 += 2*PI; | |
2683 | Float_t deltaphi = phi1 - phi2; | |
2684 | if(deltaphi > PI) deltaphi -= PI; | |
2685 | if(deltaphi < -PI) deltaphi += PI; | |
2686 | ||
2687 | if(ENsum==0) ((TH3F*)fOutputList->FindObject("fPairsDetaDPhiNum"))->Fill(rstep, (fEvt)->fTracks[i].fEta-(fEvt+en2)->fTracks[j].fEta, deltaphi); | |
2688 | else ((TH3F*)fOutputList->FindObject("fPairsDetaDPhiDen"))->Fill(rstep, (fEvt)->fTracks[i].fEta-(fEvt+en2)->fTracks[j].fEta, deltaphi); | |
2689 | } | |
2690 | ||
2691 | }// pair selection | |
2692 | ||
2693 | // Check that label does not exceed stack size | |
2694 | if((fEvt)->fTracks[i].fLabel < (fEvt)->fMCarraySize && (fEvt+en2)->fTracks[j].fLabel < (fEvt+en2)->fMCarraySize){ | |
2695 | if(ENsum==0 && abs((fEvt+en2)->fTracks[j].fLabel) == abs((fEvt)->fTracks[i].fLabel)) continue; | |
2696 | pVect1MC[0]=sqrt(pow((fEvt)->fMCtracks[abs((fEvt)->fTracks[i].fLabel)].fPtot,2)+pow(fTrueMassPi,2)); | |
2697 | pVect2MC[0]=sqrt(pow((fEvt+en2)->fMCtracks[abs((fEvt+en2)->fTracks[j].fLabel)].fPtot,2)+pow(fTrueMassPi,2)); | |
2698 | pVect1MC[1]=(fEvt)->fMCtracks[abs((fEvt)->fTracks[i].fLabel)].fPx; pVect2MC[1]=(fEvt+en2)->fMCtracks[abs((fEvt+en2)->fTracks[j].fLabel)].fPx; | |
2699 | pVect1MC[2]=(fEvt)->fMCtracks[abs((fEvt)->fTracks[i].fLabel)].fPy; pVect2MC[2]=(fEvt+en2)->fMCtracks[abs((fEvt+en2)->fTracks[j].fLabel)].fPy; | |
2700 | pVect1MC[3]=(fEvt)->fMCtracks[abs((fEvt)->fTracks[i].fLabel)].fPz; pVect2MC[3]=(fEvt+en2)->fMCtracks[abs((fEvt+en2)->fTracks[j].fLabel)].fPz; | |
2701 | qinv12MC = GetQinv(pVect1MC, pVect2MC); | |
86528e76 | 2702 | Int_t chGroup2[2]={ch1,ch2}; |
2703 | ||
2704 | if(fGenerateSignal && (ENsum==0 || ENsum==6)){ | |
2705 | if(ENsum==0) { | |
2706 | Float_t WInput = MCWeight(chGroup2, fRMax, ffcSqMRC, qinv12MC, 0.); | |
2707 | Charge1[bin1].Charge2[bin2].MB[fMbin].EDB[0].TwoPT[0].fTerms2->Fill(kT12, qinv12, WInput); | |
2708 | }else{ | |
2709 | Charge1[bin1].Charge2[bin2].MB[fMbin].EDB[0].TwoPT[1].fTerms2->Fill(kT12, qinv12); | |
2710 | } | |
2711 | } | |
be9ef9f9 | 2712 | |
2713 | if(qinv12<0.1 && ch1==ch2 && ENsum==0) { | |
2714 | ((TProfile*)fOutputList->FindObject("fQsmearMean"))->Fill(1.,qinv12-qinv12MC); | |
2715 | ((TProfile*)fOutputList->FindObject("fQsmearSq"))->Fill(1.,1000.*pow(qinv12-qinv12MC,2)); | |
2716 | ((TH2D*)fOutputList->FindObject("fQ2Res"))->Fill(kT12, qinv12-qinv12MC); | |
2717 | } | |
2718 | ||
2719 | // secondary contamination | |
2720 | if(ENsum==0){ | |
2721 | mcParticle1 = (AliAODMCParticle*)mcArray->At(abs((fEvt)->fTracks[i].fLabel)); | |
2722 | mcParticle2 = (AliAODMCParticle*)mcArray->At(abs((fEvt+en2)->fTracks[j].fLabel)); | |
2723 | if(!mcParticle1 || !mcParticle2) continue; | |
2724 | if(abs(mcParticle1->GetPdgCode())==211 && abs(mcParticle2->GetPdgCode())==211){ | |
2725 | if(ch1==ch2) { | |
2726 | ((TH3D*)fOutputList->FindObject("fAllSCPionPairs"))->Fill(fMbin+1, kT12, qinv12); | |
2727 | if(!mcParticle1->IsSecondaryFromWeakDecay() && !mcParticle2->IsSecondaryFromWeakDecay()) { | |
2728 | ((TH3D*)fOutputList->FindObject("fPrimarySCPionPairs"))->Fill(fMbin+1, kT12, qinv12); | |
2729 | } | |
2730 | }else{ | |
2731 | ((TH3D*)fOutputList->FindObject("fAllMCPionPairs"))->Fill(fMbin+1, kT12, qinv12); | |
2732 | if(!mcParticle1->IsSecondaryFromWeakDecay() && !mcParticle2->IsSecondaryFromWeakDecay()) { | |
2733 | ((TH3D*)fOutputList->FindObject("fPrimaryMCPionPairs"))->Fill(fMbin+1, kT12, qinv12); | |
2734 | } | |
2735 | } | |
2736 | } | |
2737 | } | |
2738 | ||
2739 | if(ENsum==6){// all mixed events | |
86528e76 | 2740 | |
be9ef9f9 | 2741 | Float_t rForQW=5.0; |
2742 | if(fFSIindex<=1) rForQW=10; | |
2743 | else if(fFSIindex==2) rForQW=9; | |
2744 | else if(fFSIindex==3) rForQW=8; | |
2745 | else if(fFSIindex==4) rForQW=7; | |
2746 | else if(fFSIindex==5) rForQW=6; | |
2747 | else if(fFSIindex==6) rForQW=5; | |
2748 | else if(fFSIindex==7) rForQW=4; | |
2749 | else if(fFSIindex==8) rForQW=3; | |
2750 | else rForQW=2; | |
2751 | ||
2752 | ||
80507acf | 2753 | Charge1[bin1].Charge2[bin2].MB[fMbin].EDB[0].TwoPT[1].fMCqinv->Fill(qinv12MC, MCWeight(chGroup2, rForQW, ffcSqMRC, qinv12MC, 0.));// was 4,5 |
2754 | Charge1[bin1].Charge2[bin2].MB[fMbin].EDB[0].TwoPT[1].fMCqinvQW->Fill(qinv12MC, qinv12MC*MCWeight(chGroup2, rForQW, ffcSqMRC, qinv12MC, 0.));// was 4,5 | |
be9ef9f9 | 2755 | // pion purity |
2756 | Charge1[bin1].Charge2[bin2].MB[fMbin].EDB[0].TwoPT[1].fPIDpurityDen->Fill(kT12, qinv12); | |
2757 | Int_t SCNumber = 1; | |
2758 | Int_t PdgCodeSum = abs((fEvt)->fMCtracks[abs((fEvt)->fTracks[i].fLabel)].fPdgCode) + abs((fEvt+en2)->fMCtracks[abs((fEvt+en2)->fTracks[j].fLabel)].fPdgCode); | |
2759 | if(PdgCodeSum==22) SCNumber=1;// e-e | |
2760 | else if(PdgCodeSum==24) SCNumber=2;// e-mu | |
2761 | else if(PdgCodeSum==222) SCNumber=3;// e-pi | |
2762 | else if(PdgCodeSum==332) SCNumber=4;// e-k | |
2763 | else if(PdgCodeSum==2223) SCNumber=5;// e-p | |
2764 | else if(PdgCodeSum==26) SCNumber=6;// mu-mu | |
2765 | else if(PdgCodeSum==224) SCNumber=7;// mu-pi | |
2766 | else if(PdgCodeSum==334) SCNumber=8;// mu-k | |
2767 | else if(PdgCodeSum==2225) SCNumber=9;// mu-p | |
2768 | else if(PdgCodeSum==422) SCNumber=10;// pi-pi | |
2769 | else if(PdgCodeSum==532) SCNumber=11;// pi-k | |
2770 | else if(PdgCodeSum==2423) SCNumber=12;// pi-p | |
2771 | else if(PdgCodeSum==642) SCNumber=13;// k-k | |
2772 | else if(PdgCodeSum==2533) SCNumber=14;// k-p | |
2773 | else if(PdgCodeSum==4424) SCNumber=15;// p-p | |
2774 | else {SCNumber=16;} | |
2775 | ||
2776 | Charge1[bin1].Charge2[bin2].MB[fMbin].EDB[0].TwoPT[1].fPIDpurityNum->Fill(SCNumber, kT12, qinv12); | |
2777 | ||
2778 | /////////////////////// | |
2779 | // muon contamination | |
2780 | Pparent1[0]=pVect1MC[0]; Pparent1[1]=pVect1MC[1]; Pparent1[2]=pVect1MC[2]; Pparent1[3]=pVect1MC[3]; | |
2781 | Pparent2[0]=pVect2MC[0]; Pparent2[1]=pVect2MC[1]; Pparent2[2]=pVect2MC[2]; Pparent2[3]=pVect2MC[3]; | |
2782 | pionParent1=kFALSE; pionParent2=kFALSE; | |
2783 | FilledMCpair12=kTRUE; | |
2784 | // | |
2785 | if(abs((fEvt)->fMCtracks[abs((fEvt)->fTracks[i].fLabel)].fPdgCode)==13 || abs((fEvt+en2)->fMCtracks[abs((fEvt+en2)->fTracks[j].fLabel)].fPdgCode)==13){// muon check | |
2786 | Int_t MotherLabel1 = (fEvt)->fMCtracks[abs((fEvt)->fTracks[i].fLabel)].fMotherLabel; | |
2787 | if(abs((fEvt)->fMCtracks[MotherLabel1].fPdgCode)==211) { | |
2788 | pionParent1=kTRUE; | |
2789 | Pparent1[1] = (fEvt)->fMCtracks[MotherLabel1].fPx; Pparent1[2] = (fEvt)->fMCtracks[MotherLabel1].fPy; Pparent1[3] = (fEvt)->fMCtracks[MotherLabel1].fPz; | |
2790 | Pparent1[0] = sqrt(pow(Pparent1[1],2)+pow(Pparent1[2],2)+pow(Pparent1[3],2)+pow(fTrueMassPi,2)); | |
2791 | } | |
2792 | // | |
2793 | if(abs((fEvt+en2)->fMCtracks[abs((fEvt+en2)->fTracks[j].fLabel)].fPdgCode)==13) { | |
2794 | Int_t MotherLabel2 = (fEvt+en2)->fMCtracks[abs((fEvt+en2)->fTracks[j].fLabel)].fMotherLabel; | |
2795 | if(abs((fEvt+en2)->fMCtracks[MotherLabel2].fPdgCode)==211) { | |
2796 | pionParent2=kTRUE; | |
2797 | Pparent2[1] = (fEvt+en2)->fMCtracks[MotherLabel2].fPx; Pparent2[2] = (fEvt+en2)->fMCtracks[MotherLabel2].fPy; Pparent2[3] = (fEvt+en2)->fMCtracks[MotherLabel2].fPz; | |
2798 | Pparent2[0] = sqrt(pow(Pparent2[1],2)+pow(Pparent2[2],2)+pow(Pparent2[3],2)+pow(fTrueMassPi,2)); | |
2799 | } | |
2800 | } | |
2801 | ||
2802 | parentQinv12 = GetQinv(Pparent1, Pparent2); | |
2803 | ||
2804 | if(pionParent1 || pionParent2){ | |
2805 | if(parentQinv12 > 0.001 && parentQinv12 < 0.3){ | |
2806 | Float_t muonPionK12 = FSICorrelation(ch1, ch2, qinv12MC); | |
2807 | Float_t pionPionK12 = FSICorrelation(ch1, ch2, parentQinv12); | |
2808 | for(Int_t term=1; term<=2; term++){ | |
2809 | for(Int_t Riter=0; Riter<fRVALUES; Riter++){ | |
78c3bd48 | 2810 | Float_t Rvalue = fRstartMC+Riter; |
be9ef9f9 | 2811 | Float_t WInput = 1.0; |
2812 | if(term==1) { | |
2813 | WInput = MCWeight(chGroup2, Rvalue, 1.0, parentQinv12, 0.); | |
5591748e | 2814 | }else{ |
be9ef9f9 | 2815 | muonPionK12 = 1.0; pionPionK12=1.0; |
2816 | } | |
5591748e | 2817 | |
be9ef9f9 | 2818 | Charge1[bin1].Charge2[bin2].MB[0].EDB[0].TwoPT[term-1].fMuonSmeared->Fill(Rvalue, qinv12MC, WInput); |
2819 | Charge1[bin1].Charge2[bin2].MB[0].EDB[0].TwoPT[term-1].fMuonIdeal->Fill(Rvalue, parentQinv12, WInput); | |
2820 | Charge1[bin1].Charge2[bin2].MB[0].EDB[0].TwoPT[term-1].fMuonPionK2->Fill(Rvalue, qinv12MC, muonPionK12); | |
2821 | Charge1[bin1].Charge2[bin2].MB[0].EDB[0].TwoPT[term-1].fPionPionK2->Fill(Rvalue, parentQinv12, pionPionK12); | |
2822 | }// Riter | |
2823 | }// term loop | |
2824 | ||
2825 | if(ch1==ch2) ((TH3D*)fOutputList->FindObject("fMuonPionDeltaQinv"))->Fill(0., kT12, qinv12MC-parentQinv12); | |
2826 | else ((TH3D*)fOutputList->FindObject("fMuonPionDeltaQinv"))->Fill(1., kT12, qinv12MC-parentQinv12); | |
2827 | }// parentQ check | |
2828 | }// pion parent check | |
2829 | }// muon check | |
2830 | ||
2831 | ||
0207c034 | 2832 | Int_t indexq2 = qinv12 / 0.005; |
2833 | if(indexq2 >=200) indexq2=199; | |
78c3bd48 | 2834 | Float_t WSpectrum = 1.0; |
ebd00f1b | 2835 | if(fCollisionType==0) { |
78c3bd48 | 2836 | WSpectrum = HIJINGq2WeightsSC[indexq2]; |
2837 | if(ch1!=ch2) WSpectrum = HIJINGq2WeightsMC[indexq2]; | |
2838 | } | |
be9ef9f9 | 2839 | // momentum resolution |
2840 | for(Int_t Riter=0; Riter<fRVALUES; Riter++){ | |
78c3bd48 | 2841 | Float_t Rvalue = fRstartMC+Riter; |
80507acf | 2842 | Float_t WInput = MCWeight(chGroup2, Rvalue, ffcSqMRC, qinv12MC, 0.); |
0207c034 | 2843 | Charge1[bin1].Charge2[bin2].MB[0].EDB[kTindex].TwoPT[0].fIdeal->Fill(Rvalue, qinv12MC, WInput * WSpectrum); |
2844 | Charge1[bin1].Charge2[bin2].MB[0].EDB[kTindex].TwoPT[1].fIdeal->Fill(Rvalue, qinv12MC, WSpectrum); | |
2845 | Charge1[bin1].Charge2[bin2].MB[0].EDB[kTindex].TwoPT[0].fSmeared->Fill(Rvalue, qinv12, WInput * WSpectrum); | |
2846 | Charge1[bin1].Charge2[bin2].MB[0].EDB[kTindex].TwoPT[1].fSmeared->Fill(Rvalue, qinv12, WSpectrum); | |
be9ef9f9 | 2847 | } |
2848 | ||
2849 | }// ENsum check | |
2850 | }// MC array check | |
2851 | }// MC case | |
2852 | ||
2853 | ||
6bb6954b | 2854 | |
be9ef9f9 | 2855 | ///////////////////////////////////////////////////////////// |
2856 | for (Int_t k=j+1; k<(fEvt+en3)->fNtracks; k++) {// 3rd particle | |
b71263d0 | 2857 | if(en3==0) { |
2858 | if(fLowQPairSwitch_E0E0[i]->At(k)=='0') continue; | |
2859 | if(fLowQPairSwitch_E0E0[j]->At(k)=='0') continue; | |
2860 | }else if(en3==1){ | |
2861 | if(fLowQPairSwitch_E0E1[i]->At(k)=='0') continue; | |
2862 | if(fLowQPairSwitch_E0E1[j]->At(k)=='0') continue; | |
2863 | }else{ | |
2864 | if(fLowQPairSwitch_E0E2[i]->At(k)=='0') continue; | |
2865 | if(fLowQPairSwitch_E1E2[j]->At(k)=='0') continue; | |
be9ef9f9 | 2866 | } |
86528e76 | 2867 | if((fEvt+en3)->fTracks[k].fPt < fMinPt) continue; |
2868 | if((fEvt+en3)->fTracks[k].fPt > fMaxPt) continue; | |
2869 | ||
be9ef9f9 | 2870 | pVect3[0]=(fEvt+en3)->fTracks[k].fEaccepted; |
2871 | pVect3[1]=(fEvt+en3)->fTracks[k].fP[0]; | |
2872 | pVect3[2]=(fEvt+en3)->fTracks[k].fP[1]; | |
2873 | pVect3[3]=(fEvt+en3)->fTracks[k].fP[2]; | |
2874 | ch3 = Int_t(((fEvt+en3)->fTracks[k].fCharge + 1)/2.); | |
2875 | qinv13 = GetQinv(pVect1, pVect3); | |
2876 | qinv23 = GetQinv(pVect2, pVect3); | |
2877 | q3 = sqrt(pow(qinv12,2) + pow(qinv13,2) + pow(qinv23,2)); | |
86528e76 | 2878 | Int_t chGroup3[3]={ch1,ch2,ch3}; |
2879 | Float_t QinvMCGroup3[3]={0}; | |
2880 | Float_t kTGroup3[3]={0}; | |
be9ef9f9 | 2881 | FilledMCtriplet123 = kFALSE; |
0207c034 | 2882 | if(fMCcase){ |
86528e76 | 2883 | if((fEvt+en3)->fTracks[k].fLabel == (fEvt+en2)->fTracks[j].fLabel) continue; |
2884 | if((fEvt+en3)->fTracks[k].fLabel == (fEvt)->fTracks[i].fLabel) continue; | |
2885 | ||
2886 | pVect3MC[0]=sqrt(pow((fEvt+en3)->fMCtracks[abs((fEvt+en3)->fTracks[k].fLabel)].fPtot,2)+pow(fTrueMassPi,2)); | |
2887 | pVect3MC[1]=(fEvt+en3)->fMCtracks[abs((fEvt+en3)->fTracks[k].fLabel)].fPx; | |
2888 | pVect3MC[2]=(fEvt+en3)->fMCtracks[abs((fEvt+en3)->fTracks[k].fLabel)].fPy; | |
2889 | pVect3MC[3]=(fEvt+en3)->fMCtracks[abs((fEvt+en3)->fTracks[k].fLabel)].fPz; | |
2890 | qinv13MC = GetQinv(pVect1MC, pVect3MC); | |
2891 | qinv23MC = GetQinv(pVect2MC, pVect3MC); | |
2892 | QinvMCGroup3[0] = qinv12MC; QinvMCGroup3[1] = qinv13MC; QinvMCGroup3[2] = qinv23MC; | |
2893 | } | |
2894 | ||
be9ef9f9 | 2895 | |
2896 | Bool_t fill2=kFALSE, fill3=kFALSE, fill4=kFALSE; | |
2897 | SetFillBins3(ch1, ch2, ch3, 1, bin1, bin2, bin3, fill2, fill3, fill4); | |
2898 | ||
2899 | Float_t KT3 = sqrt(pow(pVect1[1]+pVect2[1]+pVect3[1],2) + pow(pVect1[2]+pVect2[2]+pVect3[2],2))/3.; | |
70a43d86 | 2900 | if(!fq2Binning){ |
2901 | if(KT3<=fKT3transition) EDindex3=0; | |
2902 | else EDindex3=1; | |
2903 | }else{ | |
2904 | EDindex3 = fEDbin; | |
2905 | if(KT3>fKT3transition) { | |
2906 | EDindex3=2+fEDbin; | |
2907 | } | |
2908 | } | |
2909 | ||
be9ef9f9 | 2910 | FSICorr13 = FSICorrelation(ch1,ch3, qinv13); |
2911 | FSICorr23 = FSICorrelation(ch2,ch3, qinv23); | |
80507acf | 2912 | if(!fGenerateSignal && !fMCcase) { |
2913 | momBin12 = fMomResC2SC->GetYaxis()->FindBin(qinv12); | |
2914 | momBin13 = fMomResC2SC->GetYaxis()->FindBin(qinv13); | |
2915 | momBin23 = fMomResC2SC->GetYaxis()->FindBin(qinv23); | |
2916 | if(momBin12 >= 20) momBin12 = 19; | |
2917 | if(momBin13 >= 20) momBin13 = 19; | |
2918 | if(momBin23 >= 20) momBin23 = 19; | |
2919 | // | |
2920 | if(ch1==ch2) MomResCorr12 = fMomResC2SC->GetBinContent(rBinForTPNMomRes, momBin12); | |
2921 | else MomResCorr12 = fMomResC2MC->GetBinContent(rBinForTPNMomRes, momBin12); | |
2922 | if(ch1==ch3) MomResCorr13 = fMomResC2SC->GetBinContent(rBinForTPNMomRes, momBin13); | |
2923 | else MomResCorr13 = fMomResC2MC->GetBinContent(rBinForTPNMomRes, momBin13); | |
2924 | if(ch2==ch3) MomResCorr23 = fMomResC2SC->GetBinContent(rBinForTPNMomRes, momBin23); | |
2925 | else MomResCorr23 = fMomResC2MC->GetBinContent(rBinForTPNMomRes, momBin23); | |
2926 | } | |
be9ef9f9 | 2927 | if(ENsum==0) { |
86528e76 | 2928 | Float_t Winput=1.0; |
2929 | if(fMCcase && fGenerateSignal) Winput = MCWeight3(1, fRMax, ffcSqMRC, chGroup3, QinvMCGroup3, kTGroup3); | |
70a43d86 | 2930 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[0].fTerms3->Fill(q3, Winput); |
2931 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[0].fKfactor->Fill(q3, 1/(FSICorr12*FSICorr13*FSICorr23), Winput); | |
2932 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[0].fKfactorWeighted->Fill(q3, 1/(FSICorr12*FSICorr13*FSICorr23), MomResCorr12*MomResCorr13*MomResCorr23 * Winput); | |
2933 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[0].fMeanQinv->Fill(q3, qinv12); | |
2934 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[0].fMeanQinv->Fill(q3, qinv13); | |
2935 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[0].fMeanQinv->Fill(q3, qinv23); | |
78c3bd48 | 2936 | if(bin1==bin2 && bin1==bin3){ |
70a43d86 | 2937 | Charge1[0].Charge2[0].Charge3[0].MB[fMbin].EDB[EDindex3].ThreePT[0].fTerms33D->Fill(qinv12, qinv13, qinv23); |
2938 | Charge1[0].Charge2[0].Charge3[0].MB[fMbin].EDB[EDindex3].ThreePT[0].fKfactor3D->Fill(qinv12, qinv13, qinv23, 1/(FSICorr12*FSICorr13*FSICorr23)); | |
78c3bd48 | 2939 | } |
be9ef9f9 | 2940 | } |
2941 | if(ENsum==6) { | |
70a43d86 | 2942 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[4].fTerms3->Fill(q3); |
2943 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[4].fMeanQinv->Fill(q3, qinv12); | |
2944 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[4].fMeanQinv->Fill(q3, qinv13); | |
2945 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[4].fMeanQinv->Fill(q3, qinv23); | |
2946 | if(bin1==bin2 && bin1==bin3) Charge1[0].Charge2[0].Charge3[0].MB[fMbin].EDB[EDindex3].ThreePT[4].fTerms33D->Fill(qinv12, qinv13, qinv23); | |
be9ef9f9 | 2947 | } |
2948 | if(ENsum==3){ | |
86528e76 | 2949 | Float_t Winput=1.0; |
be9ef9f9 | 2950 | if(fill2) { |
86528e76 | 2951 | if(fMCcase && fGenerateSignal) Winput = MCWeight3(2, fRMax, ffcSqMRC, chGroup3, QinvMCGroup3, kTGroup3); |
70a43d86 | 2952 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[1].fTerms3->Fill(q3, Winput); |
2953 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[1].fKfactor->Fill(q3, 1/(FSICorr12), Winput); | |
2954 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[1].fKfactorWeighted->Fill(q3, 1/(FSICorr12), MomResCorr12 * Winput); | |
2955 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[1].fMeanQinv->Fill(q3, qinv12); | |
2956 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[1].fMeanQinv->Fill(q3, qinv13); | |
2957 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[1].fMeanQinv->Fill(q3, qinv23); | |
78c3bd48 | 2958 | if(bin1==bin2 && bin1==bin3){ |
70a43d86 | 2959 | Charge1[0].Charge2[0].Charge3[0].MB[fMbin].EDB[EDindex3].ThreePT[1].fTerms33D->Fill(qinv12, qinv13, qinv23); |
2960 | Charge1[0].Charge2[0].Charge3[0].MB[fMbin].EDB[EDindex3].ThreePT[1].fKfactor3D->Fill(qinv12, qinv13, qinv23, 1/(FSICorr12)); | |
78c3bd48 | 2961 | } |
be9ef9f9 | 2962 | }if(fill3) { |
86528e76 | 2963 | if(fMCcase && fGenerateSignal) Winput = MCWeight3(3, fRMax, ffcSqMRC, chGroup3, QinvMCGroup3, kTGroup3); |
70a43d86 | 2964 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[2].fTerms3->Fill(q3, Winput); |
2965 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[2].fKfactor->Fill(q3, 1/(FSICorr12), Winput); | |
2966 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[2].fKfactorWeighted->Fill(q3, 1/(FSICorr12), MomResCorr12 * Winput); | |
2967 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[2].fMeanQinv->Fill(q3, qinv12); | |
2968 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[2].fMeanQinv->Fill(q3, qinv13); | |
2969 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[2].fMeanQinv->Fill(q3, qinv23); | |
78c3bd48 | 2970 | if(bin1==bin2 && bin1==bin3){ |
70a43d86 | 2971 | Charge1[0].Charge2[0].Charge3[0].MB[fMbin].EDB[EDindex3].ThreePT[2].fTerms33D->Fill(qinv13, qinv12, qinv23); |
2972 | Charge1[0].Charge2[0].Charge3[0].MB[fMbin].EDB[EDindex3].ThreePT[2].fKfactor3D->Fill(qinv13, qinv12, qinv23, 1/(FSICorr12)); | |
78c3bd48 | 2973 | } |
be9ef9f9 | 2974 | }if(fill4) { |
86528e76 | 2975 | if(fMCcase && fGenerateSignal) Winput = MCWeight3(4, fRMax, ffcSqMRC, chGroup3, QinvMCGroup3, kTGroup3); |
70a43d86 | 2976 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[3].fTerms3->Fill(q3, Winput); |
2977 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[3].fKfactor->Fill(q3, 1/(FSICorr12), Winput); | |
2978 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[3].fKfactorWeighted->Fill(q3, 1/(FSICorr12), MomResCorr12 * Winput); | |
2979 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[3].fMeanQinv->Fill(q3, qinv12); | |
2980 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[3].fMeanQinv->Fill(q3, qinv13); | |
2981 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[3].fMeanQinv->Fill(q3, qinv23); | |
78c3bd48 | 2982 | if(bin1==bin2 && bin1==bin3){ |
70a43d86 | 2983 | Charge1[0].Charge2[0].Charge3[0].MB[fMbin].EDB[EDindex3].ThreePT[3].fTerms33D->Fill(qinv13, qinv23, qinv12); |
2984 | Charge1[0].Charge2[0].Charge3[0].MB[fMbin].EDB[EDindex3].ThreePT[3].fKfactor3D->Fill(qinv13, qinv23, qinv12, 1/(FSICorr12)); | |
78c3bd48 | 2985 | } |
be9ef9f9 | 2986 | } |
2987 | } | |
2988 | ||
2989 | // r3 denominator | |
ebd00f1b | 2990 | if(ENsum==6 && ch1==ch2 && ch1==ch3 && fCollisionType==0){ |
6432c081 | 2991 | Positive1stTripletWeights = kTRUE; |
be9ef9f9 | 2992 | // |
2993 | GetWeight(pVect1, pVect2, weight12, weight12Err); | |
2994 | GetWeight(pVect1, pVect3, weight13, weight13Err); | |
2995 | GetWeight(pVect2, pVect3, weight23, weight23Err); | |
2996 | ||
2997 | if(sqrt(fabs(weight12*weight13*weight23)) > 1.0) {// weight should never be larger than 1 | |
2998 | if(fMbin==0 && bin1==0) { | |
2999 | ((TH1D*)fOutputList->FindObject("fTPNRejects3pion1"))->Fill(q3, sqrt(fabs(weight12*weight13*weight23))); | |
3000 | } | |
3001 | }else{ | |
3002 | ||
5591748e | 3003 | Float_t MuonCorr12=1.0, MuonCorr13=1.0, MuonCorr23=1.0; |
be9ef9f9 | 3004 | if(!fGenerateSignal && !fMCcase) { |
5591748e | 3005 | MuonCorr12 = fWeightmuonCorrection->GetBinContent(rBinForTPNMomRes, momBin12); |
3006 | MuonCorr13 = fWeightmuonCorrection->GetBinContent(rBinForTPNMomRes, momBin13); | |
3007 | MuonCorr23 = fWeightmuonCorrection->GetBinContent(rBinForTPNMomRes, momBin23); | |
be9ef9f9 | 3008 | } |
fac2d84b | 3009 | |
5591748e | 3010 | // no MRC, no Muon Correction |
3011 | weight12CC[0] = ((weight12+1) - ffcSq*FSICorr12 - (1-ffcSq)); | |
3012 | weight12CC[0] /= FSICorr12*ffcSq; | |
3013 | weight13CC[0] = ((weight13+1) - ffcSq*FSICorr13 - (1-ffcSq)); | |
3014 | weight13CC[0] /= FSICorr13*ffcSq; | |
3015 | weight23CC[0] = ((weight23+1) - ffcSq*FSICorr23 - (1-ffcSq)); | |
3016 | weight23CC[0] /= FSICorr23*ffcSq; | |
3017 | if(weight12CC[0] > 0 && weight13CC[0] > 0 && weight23CC[0] > 0){ | |
70a43d86 | 3018 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[4].fBuild->Fill(1, q3, sqrt(weight12CC[0]*weight13CC[0]*weight23CC[0])); |
5591748e | 3019 | } |
3020 | // no Muon Correction | |
3021 | weight12CC[1] = ((weight12+1)*MomResCorr12 - ffcSq*FSICorr12 - (1-ffcSq)); | |
3022 | weight12CC[1] /= FSICorr12*ffcSq; | |
3023 | weight13CC[1] = ((weight13+1)*MomResCorr13 - ffcSq*FSICorr13 - (1-ffcSq)); | |
3024 | weight13CC[1] /= FSICorr13*ffcSq; | |
3025 | weight23CC[1] = ((weight23+1)*MomResCorr23 - ffcSq*FSICorr23 - (1-ffcSq)); | |
3026 | weight23CC[1] /= FSICorr23*ffcSq; | |
3027 | if(weight12CC[1] > 0 && weight13CC[1] > 0 && weight23CC[1] > 0){ | |
70a43d86 | 3028 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[4].fBuild->Fill(2, q3, sqrt(weight12CC[1]*weight13CC[1]*weight23CC[1])); |
5591748e | 3029 | } |
3030 | // both Corrections | |
3031 | weight12CC[2] = ((weight12+1)*MomResCorr12 - ffcSq*FSICorr12 - (1-ffcSq)); | |
3032 | weight12CC[2] /= FSICorr12*ffcSq; | |
3033 | weight12CC[2] *= MuonCorr12; | |
3034 | weight13CC[2] = ((weight13+1)*MomResCorr13 - ffcSq*FSICorr13 - (1-ffcSq)); | |
3035 | weight13CC[2] /= FSICorr13*ffcSq; | |
3036 | weight13CC[2] *= MuonCorr13; | |
3037 | weight23CC[2] = ((weight23+1)*MomResCorr23 - ffcSq*FSICorr23 - (1-ffcSq)); | |
3038 | weight23CC[2] /= FSICorr23*ffcSq; | |
3039 | weight23CC[2] *= MuonCorr23; | |
6432c081 | 3040 | |
5591748e | 3041 | if(weight12CC[2] < 0 || weight13CC[2] < 0 || weight23CC[2] < 0) {// C2^QS can never be less than unity |
be9ef9f9 | 3042 | if(fMbin==0 && bin1==0) { |
5591748e | 3043 | ((TH1D*)fOutputList->FindObject("fTPNRejects3pion2"))->Fill(q3, sqrt(fabs(weight12CC[2]*weight13CC[2]*weight23CC[2]))); |
be9ef9f9 | 3044 | } |
6432c081 | 3045 | if(weight12CC[2] < 0) weight12CC[2]=0; |
3046 | if(weight13CC[2] < 0) weight13CC[2]=0; | |
3047 | if(weight23CC[2] < 0) weight23CC[2]=0; | |
3048 | Positive1stTripletWeights = kFALSE; | |
3049 | } | |
3050 | ///////////////////////////////////////////////////// | |
3051 | weightTotal = sqrt(weight12CC[2]*weight13CC[2]*weight23CC[2]); | |
3052 | ///////////////////////////////////////////////////// | |
3053 | if(Positive1stTripletWeights){ | |
70a43d86 | 3054 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[4].fBuild->Fill(3, q3, weightTotal); |
3055 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[4].fBuild->Fill(4, q3, 1); | |
6432c081 | 3056 | }else{ |
70a43d86 | 3057 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[4].fBuildNeg->Fill(4, q3, 1); |
6432c081 | 3058 | } |
0207c034 | 3059 | |
6432c081 | 3060 | // |
3061 | // Full Weight reconstruction | |
3062 | ||
574647ef | 3063 | for(Int_t RcohIndex=0; RcohIndex<7; RcohIndex++){// Rcoh |
3064 | t12 = exp(-pow(RcohIndex/FmToGeV * qinv12,2)/2.); | |
3065 | t23 = exp(-pow(RcohIndex/FmToGeV * qinv23,2)/2.); | |
3066 | t13 = exp(-pow(RcohIndex/FmToGeV * qinv13,2)/2.); | |
3067 | for(Int_t GIndex=0; GIndex<25; GIndex++){ | |
3068 | Int_t FillBin = 5 + RcohIndex*25 + GIndex; | |
6432c081 | 3069 | Float_t G = 0.02*GIndex; |
574647ef | 3070 | if(RcohIndex!=6){ |
3071 | T12 = (-2*G*(1-G)*t12 + sqrt(pow(2*G*(1-G)*t12,2) + 4*pow(1-G,2)*weight12CC[2])) / (2*pow(1-G,2)); | |
3072 | T13 = (-2*G*(1-G)*t13 + sqrt(pow(2*G*(1-G)*t13,2) + 4*pow(1-G,2)*weight13CC[2])) / (2*pow(1-G,2)); | |
3073 | T23 = (-2*G*(1-G)*t23 + sqrt(pow(2*G*(1-G)*t23,2) + 4*pow(1-G,2)*weight23CC[2])) / (2*pow(1-G,2)); | |
3074 | }else{// Full Size | |
95567836 | 3075 | T12 = sqrt(weight12CC[2] / (1-G*G)); |
3076 | T13 = sqrt(weight13CC[2] / (1-G*G)); | |
3077 | T23 = sqrt(weight23CC[2] / (1-G*G)); | |
574647ef | 3078 | t12 = T12; |
3079 | t13 = T13; | |
3080 | t23 = T23; | |
6432c081 | 3081 | } |
574647ef | 3082 | weightTotal = 2*G*(1-G)*(T12*t12 + T13*t13 + T23*t23) + pow(1-G,2)*(T12*T12 + T13*T13 + T23*T23); |
3083 | weightTotal += 2*G*pow(1-G,2)*(T12*T13*t23 + T12*T23*t13 + T13*T23*t12) + 2*pow(1-G,3)*T12*T13*T23; | |
3084 | ||
6432c081 | 3085 | if(Positive1stTripletWeights){ |
70a43d86 | 3086 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[4].fBuild->Fill(FillBin, q3, weightTotal); |
6432c081 | 3087 | }else{ |
70a43d86 | 3088 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[4].fBuildNeg->Fill(FillBin, q3, weightTotal); |
ab890ec3 | 3089 | } |
3090 | } | |
6432c081 | 3091 | } |
3092 | // | |
3093 | /*weight12CC_e = weight12Err*MomResCorr12 / FSICorr12 / ffcSq * MuonCorr12; | |
43046300 | 3094 | weight13CC_e = weight13Err*MomResCorr13 / FSICorr13 / ffcSq * MuonCorr13; |
3095 | weight23CC_e = weight23Err*MomResCorr23 / FSICorr23 / ffcSq * MuonCorr23; | |
3096 | if(weight12CC[2]*weight13CC[2]*weight23CC[2] > 0){ | |
6432c081 | 3097 | weightTotalErr = pow(2 * sqrt(3) * weight12CC_e*weight13CC[2]*weight23CC[2] / sqrt(weight12CC[2]*weight13CC[2]*weight23CC[2]),2); |
43046300 | 3098 | } |
3099 | weightTotalErr += pow(weight12CC_e,2) + pow(weight13CC_e,2) + pow(weight23CC_e,2); | |
70a43d86 | 3100 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[fMbin].EDB[EDindex3].ThreePT[4].fBuildErr->Fill(4, q3, weightTotalErr);*/ |
5591748e | 3101 | |
be9ef9f9 | 3102 | }// 1st r3 den check |
5591748e | 3103 | |
be9ef9f9 | 3104 | }// r3 den |
3105 | ||
4bf06935 | 3106 | |
3107 | if(ch1==ch2 && ch1==ch3){ | |
3108 | Float_t pt1=sqrt(pow(pVect1[1],2)+pow(pVect1[2],2)); | |
3109 | Float_t pt2=sqrt(pow(pVect2[1],2)+pow(pVect2[2],2)); | |
3110 | Float_t pt3=sqrt(pow(pVect3[1],2)+pow(pVect3[2],2)); | |
3111 | if(ENsum==0){ | |
3112 | ((TH3D*)fOutputList->FindObject("fKT3DistTerm1"))->Fill(fMbin+1, KT3, q3); | |
3113 | if(q3<0.1){ | |
70a43d86 | 3114 | ((TProfile2D*)fOutputList->FindObject("fKT3AvgpT"))->Fill(fMbin+1, EDindex3, pt1); |
3115 | ((TProfile2D*)fOutputList->FindObject("fKT3AvgpT"))->Fill(fMbin+1, EDindex3, pt2); | |
3116 | ((TProfile2D*)fOutputList->FindObject("fKT3AvgpT"))->Fill(fMbin+1, EDindex3, pt3); | |
4bf06935 | 3117 | } |
3118 | } | |
3119 | if(fMbin==0){ | |
3120 | if(ENsum==0){ | |
70a43d86 | 3121 | ((TH3D*)fOutputList->FindObject("fQ3AvgpTENsum0"))->Fill(EDindex3, q3, pt1); |
3122 | ((TH3D*)fOutputList->FindObject("fQ3AvgpTENsum0"))->Fill(EDindex3, q3, pt2); | |
3123 | ((TH3D*)fOutputList->FindObject("fQ3AvgpTENsum0"))->Fill(EDindex3, q3, pt3); | |
4bf06935 | 3124 | } |
3125 | if(ENsum==3){ | |
70a43d86 | 3126 | ((TH3D*)fOutputList->FindObject("fQ3AvgpTENsum3"))->Fill(EDindex3, q3, pt1); |
3127 | ((TH3D*)fOutputList->FindObject("fQ3AvgpTENsum3"))->Fill(EDindex3, q3, pt2); | |
3128 | ((TH3D*)fOutputList->FindObject("fQ3AvgpTENsum3"))->Fill(EDindex3, q3, pt3); | |
4bf06935 | 3129 | } |
3130 | if(ENsum==6){ | |
70a43d86 | 3131 | ((TH3D*)fOutputList->FindObject("fQ3AvgpTENsum6"))->Fill(EDindex3, q3, pt1); |
3132 | ((TH3D*)fOutputList->FindObject("fQ3AvgpTENsum6"))->Fill(EDindex3, q3, pt2); | |
3133 | ((TH3D*)fOutputList->FindObject("fQ3AvgpTENsum6"))->Fill(EDindex3, q3, pt3); | |
9c0557fb | 3134 | } |
be9ef9f9 | 3135 | } |
9c0557fb | 3136 | |
be9ef9f9 | 3137 | } |
3138 | if(ch1==ch2 && ch1==ch3 && ENsum==6) ((TH3D*)fOutputList->FindObject("fKT3DistTerm5"))->Fill(fMbin+1, KT3, q3); | |
3139 | ||
3140 | ||
3141 | ||
3142 | ||
3143 | if(fMCcase && ENsum==6 && FilledMCpair12){// for momentum resolution and muon correction | |
3144 | if((fEvt+en3)->fTracks[k].fLabel < (fEvt+en3)->fMCarraySize){ | |
3145 | ||
3146 | pVect3MC[0]=sqrt(pow((fEvt+en3)->fMCtracks[abs((fEvt+en3)->fTracks[k].fLabel)].fPtot,2)+pow(fTrueMassPi,2)); | |
3147 | pVect3MC[1]=(fEvt+en3)->fMCtracks[abs((fEvt+en3)->fTracks[k].fLabel)].fPx; | |
3148 | pVect3MC[2]=(fEvt+en3)->fMCtracks[abs((fEvt+en3)->fTracks[k].fLabel)].fPy; | |
3149 | pVect3MC[3]=(fEvt+en3)->fMCtracks[abs((fEvt+en3)->fTracks[k].fLabel)].fPz; | |
3150 | qinv13MC = GetQinv(pVect1MC, pVect3MC); | |
3151 | qinv23MC = GetQinv(pVect2MC, pVect3MC); | |
3152 | ||
3153 | q3MC = sqrt(pow(qinv12MC,2)+pow(qinv13MC,2)+pow(qinv23MC,2)); | |
3154 | if(q3<0.1 && ch1==ch2 && ch1==ch3) ((TH2D*)fOutputList->FindObject("fQ3Res"))->Fill(KT3, q3-q3MC); | |
3155 | ||
4bf06935 | 3156 | //Float_t TripletWeightTTC=1.0;// same-charge weights to mimic two-track depletion of same-charge pairs |
fac2d84b | 3157 | //if(ch1==ch2 && qinv12>0.006) TripletWeightTTC *= SCpairWeight->Eval(qinv12); |
3158 | //if(ch1==ch3 && qinv13>0.006) TripletWeightTTC *= SCpairWeight->Eval(qinv13); | |
3159 | //if(ch2==ch3 && qinv23>0.006) TripletWeightTTC *= SCpairWeight->Eval(qinv23); | |
3160 | ||
86528e76 | 3161 | |
be9ef9f9 | 3162 | Pparent3[0]=pVect3MC[0]; Pparent3[1]=pVect3MC[1]; Pparent3[2]=pVect3MC[2]; Pparent3[3]=pVect3MC[3]; |
3163 | pionParent3=kFALSE; | |
3164 | ||
3165 | if(abs((fEvt+en3)->fMCtracks[abs((fEvt+en3)->fTracks[k].fLabel)].fPdgCode)==13){// muon check | |
3166 | Int_t MotherLabel3 = (fEvt+en3)->fMCtracks[abs((fEvt+en3)->fTracks[k].fLabel)].fMotherLabel; | |
3167 | if(abs((fEvt+en3)->fMCtracks[MotherLabel3].fPdgCode)==211) { | |
3168 | pionParent3=kTRUE; | |
3169 | Pparent3[1] = (fEvt+en3)->fMCtracks[MotherLabel3].fPx; Pparent3[2] = (fEvt+en3)->fMCtracks[MotherLabel3].fPy; Pparent3[3] = (fEvt+en3)->fMCtracks[MotherLabel3].fPz; | |
3170 | Pparent3[0] = sqrt(pow(Pparent3[1],2)+pow(Pparent3[2],2)+pow(Pparent3[3],2)+pow(fTrueMassPi,2)); | |
3171 | } | |
3172 | } | |
3173 | ||
3174 | parentQinv13 = GetQinv(Pparent1, Pparent3); | |
3175 | parentQinv23 = GetQinv(Pparent2, Pparent3); | |
3176 | parentQ3 = sqrt(pow(parentQinv12,2) + pow(parentQinv13,2) + pow(parentQinv23,2)); | |
3177 | ||
3178 | if(parentQinv12 > 0.001 && parentQinv13 > 0.001 && parentQinv23 > 0.001 && parentQ3 < 0.5){ | |
3179 | FilledMCtriplet123=kTRUE; | |
3180 | if(pionParent1 || pionParent2 || pionParent3) {// want at least one pion-->muon | |
3181 | ||
3182 | Float_t parentQinvGroup3[3]={parentQinv12, parentQinv13, parentQinv23}; | |
3183 | //Float_t parentkTGroup3[3]={float(sqrt(pow(Pparent1[1]+Pparent2[1],2) + pow(Pparent1[2]+Pparent2[2],2))/2.), | |
3184 | //float(sqrt(pow(Pparent1[1]+Pparent3[1],2) + pow(Pparent1[2]+Pparent3[2],2))/2.), | |
3185 | //float(sqrt(pow(Pparent2[1]+Pparent3[1],2) + pow(Pparent2[2]+Pparent3[2],2))/2.)}; | |
3186 | Float_t parentkTGroup3[3]={0}; | |
3187 | ||
3188 | ((TH2D*)fOutputList->FindObject("fAvgQ12VersusQ3"))->Fill(parentQ3, parentQinv12); | |
3189 | ((TH2D*)fOutputList->FindObject("fAvgQ13VersusQ3"))->Fill(parentQ3, parentQinv13); | |
3190 | ((TH2D*)fOutputList->FindObject("fAvgQ23VersusQ3"))->Fill(parentQ3, parentQinv23); | |
3191 | ||
5591748e | 3192 | for(Int_t term=1; term<=4; term++){ |
3193 | if(term==1) {} | |
3194 | else if(term==2) {if(!pionParent1 && !pionParent2) continue;} | |
3195 | else if(term==3) {if(!pionParent1 && !pionParent3) continue;} | |
3196 | else {if(!pionParent2 && !pionParent3) continue;} | |
be9ef9f9 | 3197 | for(Int_t Riter=0; Riter<fRVALUES; Riter++){ |
78c3bd48 | 3198 | Float_t Rvalue = fRstartMC+Riter; |
be9ef9f9 | 3199 | Float_t WInput = MCWeight3(term, Rvalue, 1.0, chGroup3, parentQinvGroup3, parentkTGroup3); |
3200 | Float_t WInputParentFSI = MCWeightFSI3(term, Rvalue, 1.0, chGroup3, parentQinvGroup3); | |
3201 | Float_t WInputFSI = MCWeightFSI3(term, Rvalue, 1.0, chGroup3, QinvMCGroup3); | |
4bf06935 | 3202 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[0].EDB[0].ThreePT[term-1].fMuonSmeared->Fill(1, Rvalue, q3MC, WInput); |
3203 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[0].EDB[0].ThreePT[term-1].fMuonIdeal->Fill(1, Rvalue, parentQ3, WInput); | |
3204 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[0].EDB[0].ThreePT[term-1].fMuonPionK3->Fill(1, Rvalue, q3MC, WInputFSI); | |
3205 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[0].EDB[0].ThreePT[term-1].fPionPionK3->Fill(1, Rvalue, parentQ3, WInputParentFSI); | |
5591748e | 3206 | // |
4bf06935 | 3207 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[0].EDB[0].ThreePT[term-1].fMuonSmeared->Fill(2, Rvalue, q3MC); |
3208 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[0].EDB[0].ThreePT[term-1].fMuonIdeal->Fill(2, Rvalue, parentQ3); | |
3209 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[0].EDB[0].ThreePT[term-1].fMuonPionK3->Fill(2, Rvalue, q3MC); | |
3210 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[0].EDB[0].ThreePT[term-1].fPionPionK3->Fill(2, Rvalue, parentQ3); | |
be9ef9f9 | 3211 | }// Riter |
3212 | }// term loop | |
3213 | ||
3214 | }// pion parent check | |
3215 | }// parentQ check (muon correction) | |
4bf06935 | 3216 | |
0207c034 | 3217 | |
3218 | Int_t indexq3 = q3 / 0.005; | |
3219 | if(indexq3 >=35) indexq3=34; | |
78c3bd48 | 3220 | Float_t WSpectrum = 1; |
ebd00f1b | 3221 | if(fCollisionType==0){ |
78c3bd48 | 3222 | WSpectrum = HIJINGq3WeightsSC[indexq3]; |
3223 | if(ch1!=ch2 || ch1!=ch3) WSpectrum = HIJINGq3WeightsMC[indexq3]; | |
3224 | } | |
be9ef9f9 | 3225 | // 3-pion momentum resolution |
3226 | for(Int_t term=1; term<=5; term++){ | |
3227 | for(Int_t Riter=0; Riter<fRVALUES; Riter++){ | |
78c3bd48 | 3228 | Float_t Rvalue = fRstartMC+Riter; |
80507acf | 3229 | Float_t WInput = MCWeight3(term, Rvalue, ffcSqMRC, chGroup3, QinvMCGroup3, kTGroup3); |
70a43d86 | 3230 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[0].EDB[EDindex3].ThreePT[term-1].fIdeal->Fill(Rvalue, q3MC, WInput*WSpectrum); |
3231 | Charge1[bin1].Charge2[bin2].Charge3[bin3].MB[0].EDB[EDindex3].ThreePT[term-1].fSmeared->Fill(Rvalue, q3, WInput*WSpectrum); | |
be9ef9f9 | 3232 | } |
3233 | } | |
3234 | ||
3235 | }// 3rd particle label check | |
3236 | }// MCcase and ENsum==6 | |
3237 | ||
5591748e | 3238 | |
be9ef9f9 | 3239 | |
3240 | ||
5591748e | 3241 | ///////////////////////////////////////////////////////////// |
be9ef9f9 | 3242 | for (Int_t l=k+1; l<(fEvt+en4)->fNtracks; l++) {// 4th particle |
b71263d0 | 3243 | if(en4==0){ |
3244 | if(fLowQPairSwitch_E0E0[i]->At(l)=='0') continue; | |
3245 | if(fLowQPairSwitch_E0E0[j]->At(l)=='0') continue; | |
3246 | if(fLowQPairSwitch_E0E0[k]->At(l)=='0') continue; | |
3247 | }else if(en4==1){ | |
6bb6954b | 3248 | if(en3==0){ |
3249 | if(fLowQPairSwitch_E0E1[i]->At(l)=='0') continue; | |
3250 | if(fLowQPairSwitch_E0E1[j]->At(l)=='0') continue; | |
3251 | if(fLowQPairSwitch_E0E1[k]->At(l)=='0') continue; | |
3252 | }else{ | |
3253 | if(fLowQPairSwitch_E0E1[i]->At(l)=='0') continue; | |
3254 | if(fLowQPairSwitch_E0E1[j]->At(l)=='0') continue; | |
3255 | if(fLowQPairSwitch_E1E1[k]->At(l)=='0') continue; | |
3256 | } | |
b71263d0 | 3257 | }else if(en4==2){ |
3258 | if(fLowQPairSwitch_E0E2[i]->At(l)=='0') continue; | |
3259 | if(fLowQPairSwitch_E0E2[j]->At(l)=='0') continue; | |
3260 | if(fLowQPairSwitch_E1E2[k]->At(l)=='0') continue; | |
3261 | }else{ | |
3262 | if(fLowQPairSwitch_E0E3[i]->At(l)=='0') continue; | |
3263 | if(fLowQPairSwitch_E1E3[j]->At(l)=='0') continue; | |
3264 | if(fLowQPairSwitch_E2E3[k]->At(l)=='0') continue; | |
be9ef9f9 | 3265 | } |
86528e76 | 3266 | if((fEvt+en4)->fTracks[l].fPt < fMinPt) continue; |
3267 | if((fEvt+en4)->fTracks[l].fPt > fMaxPt) continue; | |
3268 | ||
be9ef9f9 | 3269 | pVect4[0]=(fEvt+en4)->fTracks[l].fEaccepted; |
3270 | pVect4[1]=(fEvt+en4)->fTracks[l].fP[0]; | |
3271 | pVect4[2]=(fEvt+en4)->fTracks[l].fP[1]; | |
3272 | pVect4[3]=(fEvt+en4)->fTracks[l].fP[2]; | |
3273 | ch4 = Int_t(((fEvt+en4)->fTracks[l].fCharge + 1)/2.); | |
3274 | qinv14 = GetQinv(pVect1, pVect4); | |
3275 | qinv24 = GetQinv(pVect2, pVect4); | |
3276 | qinv34 = GetQinv(pVect3, pVect4); | |
3277 | q4 = sqrt(pow(q3,2) + pow(qinv14,2) + pow(qinv24,2) + pow(qinv34,2)); | |
86528e76 | 3278 | Int_t chGroup4[4]={ch1,ch2,ch3,ch4}; |
3279 | Float_t QinvMCGroup4[6]={0}; | |
3280 | Float_t kTGroup4[6]={0}; | |
3281 | ||
0207c034 | 3282 | if(fMCcase){// for momentum resolution and muon correction |
86528e76 | 3283 | if((fEvt+en4)->fTracks[l].fLabel == (fEvt+en3)->fTracks[k].fLabel) continue; |
3284 | if((fEvt+en4)->fTracks[l].fLabel == (fEvt+en2)->fTracks[j].fLabel) continue; | |
3285 | if((fEvt+en4)->fTracks[l].fLabel == (fEvt)->fTracks[i].fLabel) continue; | |
3286 | ||
3287 | pVect4MC[0]=sqrt(pow((fEvt+en4)->fMCtracks[abs((fEvt+en4)->fTracks[l].fLabel)].fPtot,2)+pow(fTrueMassPi,2)); | |
3288 | pVect4MC[1]=(fEvt+en4)->fMCtracks[abs((fEvt+en4)->fTracks[l].fLabel)].fPx; | |
3289 | pVect4MC[2]=(fEvt+en4)->fMCtracks[abs((fEvt+en4)->fTracks[l].fLabel)].fPy; | |
3290 | pVect4MC[3]=(fEvt+en4)->fMCtracks[abs((fEvt+en4)->fTracks[l].fLabel)].fPz; | |
3291 | qinv14MC = GetQinv(pVect1MC, pVect4MC); | |
3292 | qinv24MC = GetQinv(pVect2MC, pVect4MC); | |
3293 | qinv34MC = GetQinv(pVect3MC, pVect4MC); | |
3294 | ||
3295 | QinvMCGroup4[0] = qinv12MC; QinvMCGroup4[1] = qinv13MC; QinvMCGroup4[2] = qinv14MC; | |
3296 | QinvMCGroup4[3] = qinv23MC; QinvMCGroup4[4] = qinv24MC; QinvMCGroup4[5] = qinv34MC; | |
2b6fd022 | 3297 | |
86528e76 | 3298 | } |
be9ef9f9 | 3299 | if(ch1==ch2 && ch1==ch3 && ch1==ch4 && ENsum==6){ |
3300 | ((TH2D*)fOutputList->FindObject("DistQinv4pion"))->Fill(1, qinv12); ((TH2D*)fOutputList->FindObject("DistQinv4pion"))->Fill(2, qinv13); | |
3301 | ((TH2D*)fOutputList->FindObject("DistQinv4pion"))->Fill(3, qinv14); ((TH2D*)fOutputList->FindObject("DistQinv4pion"))->Fill(4, qinv23); | |
3302 | ((TH2D*)fOutputList->FindObject("DistQinv4pion"))->Fill(5, qinv24); ((TH2D*)fOutputList->FindObject("DistQinv4pion"))->Fill(6, qinv34); | |
3303 | } | |
3304 | ||
3305 | Float_t KT4 = sqrt(pow(pVect1[1]+pVect2[1]+pVect3[1]+pVect4[1],2) + pow(pVect1[2]+pVect2[2]+pVect3[2]+pVect4[2],2))/4.; | |
70a43d86 | 3306 | if(!fq2Binning){ |
3307 | if(KT4<=fKT4transition) EDindex4=0; | |
3308 | else EDindex4=1; | |
3309 | }else{ | |
3310 | EDindex4 = fEDbin; | |
3311 | if(KT4>fKT4transition) { | |
3312 | EDindex4=2+fEDbin; | |
3313 | } | |
3314 | } | |
be9ef9f9 | 3315 | |
3316 | FSICorr14 = FSICorrelation(ch1,ch4, qinv14); | |
3317 | FSICorr24 = FSICorrelation(ch2,ch4, qinv24); | |
3318 | FSICorr34 = FSICorrelation(ch3,ch4, qinv34); | |
80507acf | 3319 | |
3320 | if(!fGenerateSignal && !fMCcase) { | |
3321 | momBin14 = fMomResC2SC->GetYaxis()->FindBin(qinv14); | |
3322 | momBin24 = fMomResC2SC->GetYaxis()->FindBin(qinv24); | |
3323 | momBin34 = fMomResC2SC->GetYaxis()->FindBin(qinv34); | |
3324 | if(momBin14 >= 20) momBin14 = 19; | |
3325 | if(momBin24 >= 20) momBin24 = 19; | |
3326 | if(momBin34 >= 20) momBin34 = 19; | |
3327 | // | |
3328 | if(ch1==ch4) MomResCorr14 = fMomResC2SC->GetBinContent(rBinForTPNMomRes, momBin14); | |
3329 | else MomResCorr14 = fMomResC2MC->GetBinContent(rBinForTPNMomRes, momBin14); | |
3330 | if(ch2==ch4) MomResCorr24 = fMomResC2SC->GetBinContent(rBinForTPNMomRes, momBin24); | |
3331 | else MomResCorr24 = fMomResC2MC->GetBinContent(rBinForTPNMomRes, momBin24); | |
3332 | if(ch3==ch4) MomResCorr34 = fMomResC2SC->GetBinContent(rBinForTPNMomRes, momBin34); | |
3333 | else MomResCorr34 = fMomResC2MC->GetBinContent(rBinForTPNMomRes, momBin34); | |
3334 | } | |
3335 | ||
6bb6954b | 3336 | Bool_t FillTerms[13]={kFALSE}; |
be9ef9f9 | 3337 | SetFillBins4(ch1, ch2, ch3, ch4, bin1, bin2, bin3, bin4, ENsum, FillTerms); |
3338 | // | |
6bb6954b | 3339 | for(int ft=0; ft<13; ft++) { |
be9ef9f9 | 3340 | Float_t FSIfactor = 1.0; |
80507acf | 3341 | Float_t MomResWeight = 1.0; |
86528e76 | 3342 | Float_t WInput = 1.0; |
3343 | if(fMCcase && fGenerateSignal) WInput = MCWeight4(ft+1, fRMax, ffcSqMRC, chGroup4, QinvMCGroup4, kTGroup4); | |
80507acf | 3344 | if(ft==0) { |
3345 | FSIfactor = 1/(FSICorr12 * FSICorr13 * FSICorr14 * FSICorr23 * FSICorr24 * FSICorr34); | |
3346 | MomResWeight = MomResCorr12 * MomResCorr13 * MomResCorr14 * MomResCorr23 * MomResCorr24 * MomResCorr34; | |
3347 | }else if(ft<=4) { | |
3348 | FSIfactor = 1/(FSICorr12 * FSICorr13 * FSICorr23); | |
3349 | MomResWeight = MomResCorr12 * MomResCorr13 * MomResCorr23; | |
3350 | }else if(ft<=10) { | |
3351 | FSIfactor = 1/(FSICorr12); | |
3352 | MomResWeight = MomResCorr12; | |
3353 | }else if(ft==11) { | |
3354 | FSIfactor = 1/(FSICorr12 * FSICorr34); | |
3355 | MomResWeight = MomResCorr12 * MomResCorr34; | |
3356 | }else {FSIfactor = 1.0; MomResWeight = 1.0;} | |
be9ef9f9 | 3357 | if(FillTerms[ft]) { |
70a43d86 | 3358 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[fMbin].EDB[EDindex4].FourPT[ft].fTerms4->Fill(q4, WInput); |
3359 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[fMbin].EDB[EDindex4].FourPT[ft].fKfactor->Fill(q4, FSIfactor, WInput); | |
3360 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[fMbin].EDB[EDindex4].FourPT[ft].fKfactorWeighted->Fill(q4, FSIfactor, MomResWeight*WInput); | |
be9ef9f9 | 3361 | } |
3362 | } | |
3363 | ||
3364 | ///////////////////////////////////////////////////////////// | |
55e482b6 | 3365 | // C4 building |
ebd00f1b | 3366 | if(ch1==ch2 && ch1==ch3 && ch1==ch4 && ENsum==6 ){ |
3367 | if(fCollisionType==0){ | |
3368 | Positive2ndTripletWeights=kTRUE; | |
3369 | // | |
3370 | GetWeight(pVect1, pVect4, weight14, weight14Err); | |
3371 | GetWeight(pVect2, pVect4, weight24, weight24Err); | |
3372 | GetWeight(pVect3, pVect4, weight34, weight34Err); | |
3373 | ||
3374 | Float_t MuonCorr14=1.0, MuonCorr24=1.0, MuonCorr34=1.0; | |
3375 | if(!fGenerateSignal && !fMCcase) { | |
3376 | MuonCorr14 = fWeightmuonCorrection->GetBinContent(rBinForTPNMomRes, momBin14); | |
3377 | MuonCorr24 = fWeightmuonCorrection->GetBinContent(rBinForTPNMomRes, momBin24); | |
3378 | MuonCorr34 = fWeightmuonCorrection->GetBinContent(rBinForTPNMomRes, momBin34); | |
be9ef9f9 | 3379 | } |
ebd00f1b | 3380 | |
3381 | // no MRC, no Muon Correction | |
3382 | weight14CC[0] = ((weight14+1) - ffcSq*FSICorr14 - (1-ffcSq)); | |
3383 | weight14CC[0] /= FSICorr14*ffcSq; | |
3384 | weight24CC[0] = ((weight24+1) - ffcSq*FSICorr24 - (1-ffcSq)); | |
3385 | weight24CC[0] /= FSICorr24*ffcSq; | |
3386 | weight34CC[0] = ((weight34+1) - ffcSq*FSICorr34 - (1-ffcSq)); | |
3387 | weight34CC[0] /= FSICorr34*ffcSq; | |
3388 | if(weight14CC[0] > 0 && weight24CC[0] > 0 && weight34CC[0] > 0 && weight12CC[0] > 0 && weight13CC[0] > 0 && weight23CC[0] > 0){ | |
3389 | weightTotal = sqrt(weight12CC[0]*weight13CC[0]*weight24CC[0]*weight34CC[0]); | |
3390 | weightTotal += sqrt(weight12CC[0]*weight14CC[0]*weight23CC[0]*weight34CC[0]); | |
3391 | weightTotal += sqrt(weight13CC[0]*weight14CC[0]*weight23CC[0]*weight24CC[0]); | |
3392 | weightTotal /= 3.; | |
70a43d86 | 3393 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[fMbin].EDB[EDindex4].FourPT[12].fBuild->Fill(1, q4, weightTotal); |
ebd00f1b | 3394 | } |
3395 | // no Muon Correction | |
3396 | weight14CC[1] = ((weight14+1)*MomResCorr14 - ffcSq*FSICorr14 - (1-ffcSq)); | |
3397 | weight14CC[1] /= FSICorr14*ffcSq; | |
3398 | weight24CC[1] = ((weight24+1)*MomResCorr24 - ffcSq*FSICorr24 - (1-ffcSq)); | |
3399 | weight24CC[1] /= FSICorr24*ffcSq; | |
3400 | weight34CC[1] = ((weight34+1)*MomResCorr34 - ffcSq*FSICorr34 - (1-ffcSq)); | |
3401 | weight34CC[1] /= FSICorr34*ffcSq; | |
3402 | if(weight14CC[1] > 0 && weight24CC[1] > 0 && weight34CC[1] > 0 && weight12CC[1] > 0 && weight13CC[1] > 0 && weight23CC[1] > 0){ | |
3403 | weightTotal = sqrt(weight12CC[1]*weight13CC[1]*weight24CC[1]*weight34CC[1]); | |
3404 | weightTotal += sqrt(weight12CC[1]*weight14CC[1]*weight23CC[1]*weight34CC[1]); | |
3405 | weightTotal += sqrt(weight13CC[1]*weight14CC[1]*weight23CC[1]*weight24CC[1]); | |
3406 | weightTotal /= 3.; | |
70a43d86 | 3407 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[fMbin].EDB[EDindex4].FourPT[12].fBuild->Fill(2, q4, weightTotal); |
ebd00f1b | 3408 | } |
3409 | // both corrections | |
3410 | weight14CC[2] = ((weight14+1)*MomResCorr14 - ffcSq*FSICorr14 - (1-ffcSq)); | |
3411 | weight14CC[2] /= FSICorr14*ffcSq; | |
3412 | weight14CC[2] *= MuonCorr14; | |
3413 | weight24CC[2] = ((weight24+1)*MomResCorr24 - ffcSq*FSICorr24 - (1-ffcSq)); | |
3414 | weight24CC[2] /= FSICorr24*ffcSq; | |
3415 | weight24CC[2] *= MuonCorr24; | |
3416 | weight34CC[2] = ((weight34+1)*MomResCorr34 - ffcSq*FSICorr34 - (1-ffcSq)); | |
3417 | weight34CC[2] /= FSICorr34*ffcSq; | |
3418 | weight34CC[2] *= MuonCorr34; | |
3419 | ||
3420 | if(weight14CC[2] < 0 || weight24CC[2] < 0 || weight34CC[2] < 0) {// C2^QS can never be less than unity | |
70a43d86 | 3421 | if(fMbin==0 && bin1==0 && EDindex4==0) { |
ebd00f1b | 3422 | ((TH1D*)fOutputList->FindObject("fTPNRejects4pion1"))->Fill(q4, sqrt(fabs(weight12CC[2]*weight23CC[2]*weight34CC[2]*weight14CC[2]))); |
ab890ec3 | 3423 | } |
ebd00f1b | 3424 | if(weight14CC[2] < 0) weight14CC[2]=0; |
3425 | if(weight24CC[2] < 0) weight24CC[2]=0; | |
3426 | if(weight34CC[2] < 0) weight34CC[2]=0; | |
3427 | Positive2ndTripletWeights=kFALSE; | |
ab890ec3 | 3428 | } |
ebd00f1b | 3429 | ///////////////////////////////////////////////////// |
3430 | weightTotal = sqrt(weight12CC[2]*weight13CC[2]*weight24CC[2]*weight34CC[2]); | |
3431 | weightTotal += sqrt(weight12CC[2]*weight14CC[2]*weight23CC[2]*weight34CC[2]); | |
3432 | weightTotal += sqrt(weight13CC[2]*weight14CC[2]*weight23CC[2]*weight24CC[2]); | |
3433 | weightTotal /= 3.; | |
3434 | if(Positive1stTripletWeights && Positive2ndTripletWeights){ | |
70a43d86 | 3435 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[fMbin].EDB[EDindex4].FourPT[12].fBuild->Fill(3, q4, weightTotal); |
3436 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[fMbin].EDB[EDindex4].FourPT[12].fBuild->Fill(4, q4, 1); | |
3437 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[fMbin].EDB[EDindex4].FourPT[12].fPrimeBuild->Fill(4, q4, 1); | |
3438 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[fMbin].EDB[EDindex4].FourPT[12].fPrimePrimeBuild->Fill(4, q4, 1); | |
3439 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[fMbin].EDB[EDindex4].FourPT[12].fCumulantBuild->Fill(4, q4, 1); | |
ebd00f1b | 3440 | }else{ |
70a43d86 | 3441 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[fMbin].EDB[EDindex4].FourPT[12].fBuildNeg->Fill(3, q4, weightTotal); |
3442 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[fMbin].EDB[EDindex4].FourPT[12].fBuildNeg->Fill(4, q4, 1); | |
3443 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[fMbin].EDB[EDindex4].FourPT[12].fPrimeBuildNeg->Fill(4, q4, 1); | |
3444 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[fMbin].EDB[EDindex4].FourPT[12].fPrimePrimeBuildNeg->Fill(4, q4, 1); | |
3445 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[fMbin].EDB[EDindex4].FourPT[12].fCumulantBuildNeg->Fill(4, q4, 1); | |
ebd00f1b | 3446 | } |
3447 | }// CollisionType==0 | |
574647ef | 3448 | |
70a43d86 | 3449 | Charge1[0].Charge2[0].Charge3[0].Charge4[0].MB[fMbin].EDB[EDindex4].FourPT[12].fBuildFromFits->Fill(1, 4, q4, 1); |
3450 | Charge1[0].Charge2[0].Charge3[0].Charge4[0].MB[fMbin].EDB[EDindex4].FourPT[12].fPrimeBuildFromFits->Fill(1, 4, q4, 1); | |
3451 | Charge1[0].Charge2[0].Charge3[0].Charge4[0].MB[fMbin].EDB[EDindex4].FourPT[12].fPrimePrimeBuildFromFits->Fill(1, 4, q4, 1); | |
3452 | Charge1[0].Charge2[0].Charge3[0].Charge4[0].MB[fMbin].EDB[EDindex4].FourPT[12].fCumulantBuildFromFits->Fill(1, 4, q4, 1); | |
3453 | Charge1[0].Charge2[0].Charge3[0].Charge4[0].MB[fMbin].EDB[EDindex4].FourPT[12].fBuildFromFits->Fill(2, 4, q4, 1); | |
3454 | Charge1[0].Charge2[0].Charge3[0].Charge4[0].MB[fMbin].EDB[EDindex4].FourPT[12].fPrimeBuildFromFits->Fill(2, 4, q4, 1); | |
3455 | Charge1[0].Charge2[0].Charge3[0].Charge4[0].MB[fMbin].EDB[EDindex4].FourPT[12].fPrimePrimeBuildFromFits->Fill(2, 4, q4, 1); | |
3456 | Charge1[0].Charge2[0].Charge3[0].Charge4[0].MB[fMbin].EDB[EDindex4].FourPT[12].fCumulantBuildFromFits->Fill(2, 4, q4, 1); | |
ebd00f1b | 3457 | // Full Weight reconstruction |
70a43d86 | 3458 | for(Int_t type=0; type<3; type++){// C2 interpolation, c3 fit, C3 fit |
ebd00f1b | 3459 | if(type==0 && fCollisionType!=0) continue; |
70a43d86 | 3460 | for(Int_t RcohIndex=0; RcohIndex<7; RcohIndex++){// Rcoh=0,1,2,3,4,5 fm, then Rcoh=Rch |
574647ef | 3461 | t12 = exp(-pow(RcohIndex/FmToGeV * qinv12,2)/2.); |
3462 | t13 = exp(-pow(RcohIndex/FmToGeV * qinv13,2)/2.); | |
3463 | t14 = exp(-pow(RcohIndex/FmToGeV * qinv14,2)/2.); | |
3464 | t23 = exp(-pow(RcohIndex/FmToGeV * qinv23,2)/2.); | |
3465 | t24 = exp(-pow(RcohIndex/FmToGeV * qinv24,2)/2.); | |
3466 | t34 = exp(-pow(RcohIndex/FmToGeV * qinv34,2)/2.); | |
70a43d86 | 3467 | |
574647ef | 3468 | for(Int_t GIndex=0; GIndex<25; GIndex++){// 25 is enough |
3469 | Int_t FillBin = 5 + RcohIndex*25 + GIndex; | |
ebd00f1b | 3470 | Float_t G = 0.02*GIndex; |
574647ef | 3471 | |
70a43d86 | 3472 | if(type==0){// From C2 |
3473 | Float_t a = pow(1-G,2); | |
3474 | Float_t b = 2*G*(1-G); | |
3475 | if(RcohIndex!=6){ | |
574647ef | 3476 | T12 = (-b*t12 + sqrt(pow(b*t12,2) + 4*a*weight12CC[2])) / (2*a); |
3477 | T13 = (-b*t13 + sqrt(pow(b*t13,2) + 4*a*weight13CC[2])) / (2*a); | |
3478 | T14 = (-b*t14 + sqrt(pow(b*t14,2) + 4*a*weight14CC[2])) / (2*a); | |
3479 | T23 = (-b*t23 + sqrt(pow(b*t23,2) + 4*a*weight23CC[2])) / (2*a); | |
3480 | T24 = (-b*t24 + sqrt(pow(b*t24,2) + 4*a*weight24CC[2])) / (2*a); | |
3481 | T34 = (-b*t34 + sqrt(pow(b*t34,2) + 4*a*weight34CC[2])) / (2*a); | |
ebd00f1b | 3482 | }else{ |
ebd00f1b | 3483 | T12 = sqrt(weight12CC[2] / (1-G*G)); |
3484 | T13 = sqrt(weight13CC[2] / (1-G*G)); | |
3485 | T14 = sqrt(weight14CC[2] / (1-G*G)); | |
3486 | T23 = sqrt(weight23CC[2] / (1-G*G)); | |
3487 | T24 = sqrt(weight24CC[2] / (1-G*G)); | |
3488 | T34 = sqrt(weight34CC[2] / (1-G*G)); | |
70a43d86 | 3489 | t12 = T12; |
3490 | t13 = T13; | |
3491 | t14 = T14; | |
3492 | t23 = T23; | |
3493 | t24 = T24; | |
3494 | t34 = T34; | |
3495 | } | |
3496 | }else{// from c3 or C3 fit | |
3497 | T12 = ExchangeAmp[RcohIndex][GIndex][type-1]->Eval(qinv12); | |
3498 | T13 = ExchangeAmp[RcohIndex][GIndex][type-1]->Eval(qinv13); | |
3499 | T14 = ExchangeAmp[RcohIndex][GIndex][type-1]->Eval(qinv14); | |
3500 | T23 = ExchangeAmp[RcohIndex][GIndex][type-1]->Eval(qinv23); | |
3501 | T24 = ExchangeAmp[RcohIndex][GIndex][type-1]->Eval(qinv24); | |
3502 | T34 = ExchangeAmp[RcohIndex][GIndex][type-1]->Eval(qinv34); | |
3503 | if(RcohIndex==6){ | |
3504 | t12 = T12; | |
3505 | t13 = T13; | |
3506 | t14 = T14; | |
3507 | t23 = T23; | |
3508 | t24 = T24; | |
3509 | t34 = T34; | |
ebd00f1b | 3510 | } |
ebd00f1b | 3511 | } |
70a43d86 | 3512 | |
574647ef | 3513 | // Build the correlation functions |
3514 | weightTotal = 2*G*(1-G)*(T12*t12 + T13*t13 + T14*t14 + T23*t23 + T24*t24 + T34*t34);// 2-pion | |
3515 | weightTotal += pow(1-G,2)*(T12*T12 + T13*T13 + T14*T14 + T23*T23 + T24*T24 + T34*T34);// 2-pion fully chaotic | |
3516 | weightTotal += 2*G*pow(1-G,3)*(T12*t12*T34*T34 + T12*T12*T34*t34 + T13*t13*T24*T24 + T13*T13*T24*t24 + T14*t14*T23*T23 + T14*T14*T23*t23);// 2-pair | |
3517 | weightTotal += pow(1-G,4)*(pow(T12,2)*pow(T34,2) + pow(T13,2)*pow(T24,2) + pow(T14,2)*pow(T23,2));// 2-pair fully chaotic | |
3518 | weightTotal += 2*G*pow(1-G,2)*(T12*T13*t23 + T12*T23*t13 + T13*T23*t12 + T12*T14*t24 + T12*T24*t14 + T14*T24*t12);// 3-pion | |
3519 | weightTotal += 2*G*pow(1-G,2)*(T13*T14*t34 + T13*T34*t14 + T14*T34*t13 + T23*T24*t34 + T23*T34*t24 + T24*T34*t23);// 3-pion | |
3520 | weightTotal += 2*pow(1-G,3)*(T12*T13*T23 + T12*T14*T24 + T13*T14*T34 + T23*T24*T34);// 3-pion fully chaotic | |
3521 | weightTotal += 2*G*pow(1-G,3)*(T12*t23*T34*T14 + T12*T23*t34*T14 + T12*T23*T34*t14 + t12*T23*T34*T14);// 4-pion | |
3522 | weightTotal += 2*G*pow(1-G,3)*(T12*t24*T34*T13 + T12*T24*T34*t13 + T12*T24*t34*T13 + t12*T24*T34*T13);// 4-pion | |
3523 | weightTotal += 2*G*pow(1-G,3)*(T13*T23*t24*T14 + T13*t23*T24*T14 + T13*T23*T24*t14 + t13*T23*T24*T14);// 4-pion | |
3524 | weightTotal += 2*pow(1-G,4)*(T12*T23*T34*T14 + T12*T24*T34*T13 + T13*T23*T24*T14);// 4-pion fully chaotic | |
3525 | // | |
3526 | weightPrime = weightTotal - 2*G*(1-G)*(T12*t12 + T13*t13 + T14*t14 + T23*t23 + T24*t24 + T34*t34); | |
3527 | weightPrime -= pow(1-G,2)*(T12*T12 + T13*T13 + T14*T14 + T23*T23 + T24*T24 + T34*T34); | |
3528 | weightPrimePrime = weightPrime - 2*G*pow(1-G,3)*(T12*t12*T34*T34 + T12*T12*T34*t34 + T13*t13*T24*T24 + T13*T13*T24*t24 + T14*t14*T23*T23 + T14*T14*T23*t23); | |
3529 | weightPrimePrime -= pow(1-G,4)*(pow(T12,2)*pow(T34,2) + pow(T13,2)*pow(T24,2) + pow(T14,2)*pow(T23,2)); | |
3530 | weightCumulant = 2*G*pow(1-G,3)*(T12*t23*T34*T14 + T12*T23*t34*T14 + T12*T23*T34*t14 + t12*T23*T34*T14); | |
3531 | weightCumulant += 2*G*pow(1-G,3)*(T12*t24*T34*T13 + T12*T24*T34*t13 + T12*T24*t34*T13 + t12*T24*T34*T13); | |
3532 | weightCumulant += 2*G*pow(1-G,3)*(T13*T23*t24*T14 + T13*t23*T24*T14 + T13*T23*T24*t14 + t13*T23*T24*T14); | |
3533 | weightCumulant += 2*pow(1-G,4)*(T12*T23*T34*T14 + T12*T24*T34*T13 + T13*T23*T24*T14); | |
3534 | ||
3535 | ||
ebd00f1b | 3536 | if(type==0){ |
3537 | if(Positive1stTripletWeights && Positive2ndTripletWeights){ | |
70a43d86 | 3538 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[fMbin].EDB[EDindex4].FourPT[12].fBuild->Fill(FillBin, q4, weightTotal); |
3539 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[fMbin].EDB[EDindex4].FourPT[12].fPrimeBuild->Fill(FillBin, q4, weightPrime); | |
3540 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[fMbin].EDB[EDindex4].FourPT[12].fPrimePrimeBuild->Fill(FillBin, q4, weightPrimePrime); | |
3541 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[fMbin].EDB[EDindex4].FourPT[12].fCumulantBuild->Fill(FillBin, q4, weightCumulant); | |
ebd00f1b | 3542 | }else{ |
70a43d86 | 3543 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[fMbin].EDB[EDindex4].FourPT[12].fBuildNeg->Fill(FillBin, q4, weightTotal); |
3544 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[fMbin].EDB[EDindex4].FourPT[12].fPrimeBuildNeg->Fill(FillBin, q4, weightPrime); | |
3545 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[fMbin].EDB[EDindex4].FourPT[12].fPrimePrimeBuildNeg->Fill(FillBin, q4, weightPrimePrime); | |
3546 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[fMbin].EDB[EDindex4].FourPT[12].fCumulantBuildNeg->Fill(FillBin, q4, weightCumulant); | |
ebd00f1b | 3547 | } |
3548 | }else{ | |
70a43d86 | 3549 | Charge1[0].Charge2[0].Charge3[0].Charge4[0].MB[fMbin].EDB[EDindex4].FourPT[12].fBuildFromFits->Fill(type, FillBin, q4, weightTotal); |
3550 | Charge1[0].Charge2[0].Charge3[0].Charge4[0].MB[fMbin].EDB[EDindex4].FourPT[12].fPrimeBuildFromFits->Fill(type, FillBin, q4, weightPrime); | |
3551 | Charge1[0].Charge2[0].Charge3[0].Charge4[0].MB[fMbin].EDB[EDindex4].FourPT[12].fPrimePrimeBuildFromFits->Fill(type, FillBin, q4, weightPrimePrime); | |
3552 | Charge1[0].Charge2[0].Charge3[0].Charge4[0].MB[fMbin].EDB[EDindex4].FourPT[12].fCumulantBuildFromFits->Fill(type, FillBin, q4, weightCumulant); | |
ebd00f1b | 3553 | } |
3554 | ||
3555 | }// GIndex | |
3556 | }// RcohIndex | |
3557 | }// type | |
6432c081 | 3558 | // stat errors |
3559 | /*weight14CC_e = weight14Err*MomResCorr14 / FSICorr14 / ffcSq * MuonCorr14; | |
43046300 | 3560 | weight24CC_e = weight24Err*MomResCorr24 / FSICorr24 / ffcSq * MuonCorr24; |
3561 | weight34CC_e = weight34Err*MomResCorr34 / FSICorr34 / ffcSq * MuonCorr34; | |
3562 | if(weight12CC[2]*weight13CC[2]*weight24CC[2]*weight34CC[2] > 0){ | |
6432c081 | 3563 | weightTotalErr = pow( 6 * 2 * weight12CC_e*weight13CC[2]*weight24CC[2]*weight34CC[2] / sqrt(weight12CC[2]*weight13CC[2]*weight24CC[2]*weight34CC[2]),2); |
43046300 | 3564 | } |
3565 | if(weight12CC[2]*weight13CC[2]*weight23CC[2] > 0){ | |
6432c081 | 3566 | weightTotalErr += pow( 8 * sqrt(3) * weight12CC_e*weight13CC[2]*weight23CC[2] / sqrt(weight12CC[2]*weight13CC[2]*weight23CC[2]),2); |
43046300 | 3567 | } |
3568 | weightTotalErr += 2*(pow(weight12CC_e*weight34CC[2],2) + pow(weight13CC_e*weight24CC[2],2) + pow(weight14CC_e*weight23CC[2],2)); | |
3569 | weightTotalErr += pow(weight12CC_e,2) + pow(weight13CC_e,2) + pow(weight14CC_e,2) + pow(weight23CC_e,2) + pow(weight24CC_e,2) + pow(weight34CC_e,2); | |
70a43d86 | 3570 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[fMbin].EDB[EDindex4].FourPT[12].fBuildErr->Fill(4, q4, weightTotalErr); |
6432c081 | 3571 | */ |
574647ef | 3572 | // Radius estimations for c4 |
70a43d86 | 3573 | if(fMbin==0 && EDindex4==0){ |
42802bba | 3574 | for(Int_t Rindex=0; Rindex<7; Rindex++){ |
3575 | Float_t R = (6. + Rindex)/FmToGeV; | |
3576 | Float_t arg12=qinv12*R; | |
3577 | Float_t arg13=qinv13*R; | |
3578 | Float_t arg14=qinv14*R; | |
3579 | Float_t arg23=qinv23*R; | |
3580 | Float_t arg24=qinv24*R; | |
3581 | Float_t arg34=qinv34*R; | |
3582 | // Exchange Amplitudes | |
3583 | Float_t EA12 = exp(-pow(arg12,2)/2.)*(1 + kappa3Fit/(6.*pow(2.,1.5))*(8.*pow(arg12,3) - 12.*arg12) + kappa4Fit/(24.*pow(2.,2))*(16.*pow(arg12,4) -48.*pow(arg12,2) + 12)); | |
3584 | Float_t EA13 = exp(-pow(arg13,2)/2.)*(1 + kappa3Fit/(6.*pow(2.,1.5))*(8.*pow(arg13,3) - 12.*arg13) + kappa4Fit/(24.*pow(2.,2))*(16.*pow(arg13,4) -48.*pow(arg13,2) + 12)); | |
3585 | Float_t EA14 = exp(-pow(arg14,2)/2.)*(1 + kappa3Fit/(6.*pow(2.,1.5))*(8.*pow(arg14,3) - 12.*arg14) + kappa4Fit/(24.*pow(2.,2))*(16.*pow(arg14,4) -48.*pow(arg14,2) + 12)); | |
3586 | Float_t EA23 = exp(-pow(arg23,2)/2.)*(1 + kappa3Fit/(6.*pow(2.,1.5))*(8.*pow(arg23,3) - 12.*arg23) + kappa4Fit/(24.*pow(2.,2))*(16.*pow(arg23,4) -48.*pow(arg23,2) + 12)); | |
3587 | Float_t EA24 = exp(-pow(arg24,2)/2.)*(1 + kappa3Fit/(6.*pow(2.,1.5))*(8.*pow(arg24,3) - 12.*arg24) + kappa4Fit/(24.*pow(2.,2))*(16.*pow(arg24,4) -48.*pow(arg24,2) + 12)); | |
3588 | Float_t EA34 = exp(-pow(arg34,2)/2.)*(1 + kappa3Fit/(6.*pow(2.,1.5))*(8.*pow(arg34,3) - 12.*arg34) + kappa4Fit/(24.*pow(2.,2))*(16.*pow(arg34,4) -48.*pow(arg34,2) + 12)); | |
3589 | // | |
3590 | Float_t TotalCorrelation = 1 + 2*(EA12*EA13*EA24*EA34 + EA12*EA14*EA23*EA34 + EA13*EA14*EA23*EA24); | |
3591 | ((TH2D*)fOutputList->FindObject("fc4QSFitNum"))->Fill(Rindex+1, q4, TotalCorrelation); | |
3592 | ((TH2D*)fOutputList->FindObject("fc4QSFitDen"))->Fill(Rindex+1, q4); | |
3593 | } | |
3594 | } | |
3595 | }// SC and ENsum=6 | |
be9ef9f9 | 3596 | ///////////////////////////////////////////////////////////// |
6bb6954b | 3597 | |
4bf06935 | 3598 | if(ch1==ch2 && ch1==ch3 && ch1==ch4){ |
3599 | Float_t pt1=sqrt(pow(pVect1[1],2)+pow(pVect1[2],2)); | |
3600 | Float_t pt2=sqrt(pow(pVect2[1],2)+pow(pVect2[2],2)); | |
3601 | Float_t pt3=sqrt(pow(pVect3[1],2)+pow(pVect3[2],2)); | |
3602 | Float_t pt4=sqrt(pow(pVect4[1],2)+pow(pVect4[2],2)); | |
3603 | if(ENsum==0){ | |
3604 | ((TH3D*)fOutputList->FindObject("fKT4DistTerm1"))->Fill(fMbin+1, KT4, q4); | |
3605 | if(q4<0.105){ | |
70a43d86 | 3606 | ((TProfile2D*)fOutputList->FindObject("fKT4AvgpT"))->Fill(fMbin+1, EDindex4, pt1); |
3607 | ((TProfile2D*)fOutputList->FindObject("fKT4AvgpT"))->Fill(fMbin+1, EDindex4, pt2); | |
3608 | ((TProfile2D*)fOutputList->FindObject("fKT4AvgpT"))->Fill(fMbin+1, EDindex4, pt3); | |
3609 | ((TProfile2D*)fOutputList->FindObject("fKT4AvgpT"))->Fill(fMbin+1, EDindex4, pt4); | |
9c0557fb | 3610 | } |
be9ef9f9 | 3611 | } |
4bf06935 | 3612 | if(fMbin==0){ |
3613 | if(ENsum==0){ | |
70a43d86 | 3614 | ((TH3D*)fOutputList->FindObject("fQ4AvgpTENsum0"))->Fill(EDindex4, q4, pt1); |
3615 | ((TH3D*)fOutputList->FindObject("fQ4AvgpTENsum0"))->Fill(EDindex4, q4, pt2); | |
3616 | ((TH3D*)fOutputList->FindObject("fQ4AvgpTENsum0"))->Fill(EDindex4, q4, pt3); | |
3617 | ((TH3D*)fOutputList->FindObject("fQ4AvgpTENsum0"))->Fill(EDindex4, q4, pt4); | |
4bf06935 | 3618 | }else if(ENsum==1){ |
70a43d86 | 3619 | ((TH3D*)fOutputList->FindObject("fQ4AvgpTENsum1"))->Fill(EDindex4, q4, pt1); |
3620 | ((TH3D*)fOutputList->FindObject("fQ4AvgpTENsum1"))->Fill(EDindex4, q4, pt2); | |
3621 | ((TH3D*)fOutputList->FindObject("fQ4AvgpTENsum1"))->Fill(EDindex4, q4, pt3); | |
3622 | ((TH3D*)fOutputList->FindObject("fQ4AvgpTENsum1"))->Fill(EDindex4, q4, pt4); | |
4bf06935 | 3623 | }else if(ENsum==2){ |
70a43d86 | 3624 | ((TH3D*)fOutputList->FindObject("fQ4AvgpTENsum2"))->Fill(EDindex4, q4, pt1); |
3625 | ((TH3D*)fOutputList->FindObject("fQ4AvgpTENsum2"))->Fill(EDindex4, q4, pt2); | |
3626 | ((TH3D*)fOutputList->FindObject("fQ4AvgpTENsum2"))->Fill(EDindex4, q4, pt3); | |
3627 | ((TH3D*)fOutputList->FindObject("fQ4AvgpTENsum2"))->Fill(EDindex4, q4, pt4); | |
4bf06935 | 3628 | }else if(ENsum==3){ |
70a43d86 | 3629 | ((TH3D*)fOutputList->FindObject("fQ4AvgpTENsum3"))->Fill(EDindex4, q4, pt1); |
3630 | ((TH3D*)fOutputList->FindObject("fQ4AvgpTENsum3"))->Fill(EDindex4, q4, pt2); | |
3631 | ((TH3D*)fOutputList->FindObject("fQ4AvgpTENsum3"))->Fill(EDindex4, q4, pt3); | |
3632 | ((TH3D*)fOutputList->FindObject("fQ4AvgpTENsum3"))->Fill(EDindex4, q4, pt4); | |
4bf06935 | 3633 | }else{// 6 |
70a43d86 | 3634 | ((TH3D*)fOutputList->FindObject("fQ4AvgpTENsum6"))->Fill(EDindex4, q4, pt1); |
3635 | ((TH3D*)fOutputList->FindObject("fQ4AvgpTENsum6"))->Fill(EDindex4, q4, pt2); | |
3636 | ((TH3D*)fOutputList->FindObject("fQ4AvgpTENsum6"))->Fill(EDindex4, q4, pt3); | |
3637 | ((TH3D*)fOutputList->FindObject("fQ4AvgpTENsum6"))->Fill(EDindex4, q4, pt4); | |
4bf06935 | 3638 | } |
3639 | ||
3640 | } | |
be9ef9f9 | 3641 | } |
4bf06935 | 3642 | |
6bb6954b | 3643 | if(ch1==ch2 && ch1==ch3 && ch1==ch4 && ENsum==6) ((TH3D*)fOutputList->FindObject("fKT4DistTerm13"))->Fill(fMbin+1, KT4, q4); |
3644 | ||
be9ef9f9 | 3645 | |
3646 | // momenumtum resolution and muon corrections | |
3647 | if(fMCcase && ENsum==6 && FilledMCtriplet123){// for momentum resolution and muon correction | |
3648 | if((fEvt+en4)->fTracks[l].fLabel < (fEvt+en4)->fMCarraySize){ | |
3649 | ||
3650 | pVect4MC[0]=sqrt(pow((fEvt+en4)->fMCtracks[abs((fEvt+en4)->fTracks[l].fLabel)].fPtot,2)+pow(fTrueMassPi,2)); | |
3651 | pVect4MC[1]=(fEvt+en4)->fMCtracks[abs((fEvt+en4)->fTracks[l].fLabel)].fPx; | |
3652 | pVect4MC[2]=(fEvt+en4)->fMCtracks[abs((fEvt+en4)->fTracks[l].fLabel)].fPy; | |
3653 | pVect4MC[3]=(fEvt+en4)->fMCtracks[abs((fEvt+en4)->fTracks[l].fLabel)].fPz; | |
3654 | qinv14MC = GetQinv(pVect1MC, pVect4MC); | |
3655 | qinv24MC = GetQinv(pVect2MC, pVect4MC); | |
3656 | qinv34MC = GetQinv(pVect3MC, pVect4MC); | |
3657 | ||
3658 | q4MC = sqrt(pow(q3MC,2) + pow(qinv14MC,2) + pow(qinv24MC,2) + pow(qinv34MC,2)); | |
3659 | if(q4<0.1 && ch1==ch2 && ch1==ch3 && ch1==ch4) ((TH2D*)fOutputList->FindObject("fQ4Res"))->Fill(KT4, q4-q4MC); | |
3660 | if(ch1==ch2 && ch1==ch3 && ch1==ch4) { | |
5591748e | 3661 | ((TH2D*)fOutputList->FindObject("DistQinvMC4pion"))->Fill(1, qinv12MC); ((TH2D*)fOutputList->FindObject("DistQinvMC4pion"))->Fill(2, qinv13MC); |
3662 | ((TH2D*)fOutputList->FindObject("DistQinvMC4pion"))->Fill(3, qinv14MC); ((TH2D*)fOutputList->FindObject("DistQinvMC4pion"))->Fill(4, qinv23MC); | |
be9ef9f9 | 3663 | ((TH2D*)fOutputList->FindObject("DistQinvMC4pion"))->Fill(5, qinv24MC); ((TH2D*)fOutputList->FindObject("DistQinvMC4pion"))->Fill(6, qinv34MC); |
3664 | } | |
fac2d84b | 3665 | |
4bf06935 | 3666 | //Float_t QuadWeightTTC=1.0;// same-charge weights to mimic two-track depletion of same-charge pairs |
fac2d84b | 3667 | //if(ch1==ch2 && qinv12>0.006) QuadWeightTTC *= SCpairWeight->Eval(qinv12); |
3668 | //if(ch1==ch3 && qinv13>0.006) QuadWeightTTC *= SCpairWeight->Eval(qinv13); | |
3669 | //if(ch1==ch4 && qinv14>0.006) QuadWeightTTC *= SCpairWeight->Eval(qinv14); | |
3670 | //if(ch2==ch3 && qinv23>0.006) QuadWeightTTC *= SCpairWeight->Eval(qinv23); | |
3671 | //if(ch2==ch4 && qinv24>0.006) QuadWeightTTC *= SCpairWeight->Eval(qinv24); | |
3672 | //if(ch3==ch4 && qinv34>0.006) QuadWeightTTC *= SCpairWeight->Eval(qinv34); | |
3673 | ||
3674 | ||
86528e76 | 3675 | |
be9ef9f9 | 3676 | Pparent4[0]=pVect4MC[0]; Pparent4[1]=pVect4MC[1]; Pparent4[2]=pVect4MC[2]; Pparent4[3]=pVect4MC[3]; |
3677 | pionParent4=kFALSE; | |
3678 | if(abs((fEvt+en4)->fMCtracks[abs((fEvt+en4)->fTracks[l].fLabel)].fPdgCode)==13){// muon check | |
3679 | Int_t MotherLabel4 = (fEvt+en4)->fMCtracks[abs((fEvt+en4)->fTracks[l].fLabel)].fMotherLabel; | |
3680 | if(abs((fEvt+en4)->fMCtracks[MotherLabel4].fPdgCode)==211) { | |
3681 | pionParent4=kTRUE; | |
3682 | Pparent4[1] = (fEvt+en4)->fMCtracks[MotherLabel4].fPx; Pparent4[2] = (fEvt+en4)->fMCtracks[MotherLabel4].fPy; Pparent4[3] = (fEvt+en4)->fMCtracks[MotherLabel4].fPz; | |
3683 | Pparent4[0] = sqrt(pow(Pparent4[1],2)+pow(Pparent4[2],2)+pow(Pparent4[3],2)+pow(fTrueMassPi,2)); | |
3684 | } | |
3685 | } | |
3686 | ||
3687 | parentQinv14 = GetQinv(Pparent1, Pparent4); | |
3688 | parentQinv24 = GetQinv(Pparent2, Pparent4); | |
3689 | parentQinv34 = GetQinv(Pparent3, Pparent4); | |
3690 | Float_t parentQ4 = sqrt(pow(parentQ3,2) + pow(parentQinv14,2) + pow(parentQinv24,2) + pow(parentQinv34,2)); | |
3691 | ||
3692 | if(parentQinv14 > 0.001 && parentQinv24 > 0.001 && parentQinv34 > 0.001 && parentQ4 < 0.5){ | |
3693 | if(pionParent1 || pionParent2 || pionParent3 || pionParent4) {// want at least one pion-->muon | |
3694 | ||
5591748e | 3695 | if(pionParent1) ((TH1D*)fOutputList->FindObject("fDistPionParents4"))->Fill(1); |
3696 | if(pionParent2) ((TH1D*)fOutputList->FindObject("fDistPionParents4"))->Fill(2); | |
3697 | if(pionParent3) ((TH1D*)fOutputList->FindObject("fDistPionParents4"))->Fill(3); | |
3698 | if(pionParent4) ((TH1D*)fOutputList->FindObject("fDistPionParents4"))->Fill(4); | |
be9ef9f9 | 3699 | Float_t parentQinvGroup4[6]={parentQinv12, parentQinv13, parentQinv14, parentQinv23, parentQinv24, parentQinv34}; |
3700 | Float_t parentkTGroup4[6]={0}; | |
3701 | ||
5591748e | 3702 | for(Int_t term=1; term<=12; term++){ |
3703 | if(term==1) {} | |
3704 | else if(term==2) {if(!pionParent1 && !pionParent2 && !pionParent3) continue;} | |
3705 | else if(term==3) {if(!pionParent1 && !pionParent2 && !pionParent4) continue;} | |
3706 | else if(term==4) {if(!pionParent1 && !pionParent3 && !pionParent4) continue;} | |
3707 | else if(term==5) {if(!pionParent2 && !pionParent3 && !pionParent4) continue;} | |
3708 | else if(term==6) {if(!pionParent1 && !pionParent2) continue;} | |
3709 | else if(term==7) {if(!pionParent1 && !pionParent3) continue;} | |
3710 | else if(term==8) {if(!pionParent1 && !pionParent4) continue;} | |
3711 | else if(term==9) {if(!pionParent2 && !pionParent3) continue;} | |
3712 | else if(term==10) {if(!pionParent2 && !pionParent4) continue;} | |
3713 | else if(term==11) {if(!pionParent3 && !pionParent4) continue;} | |
3714 | else {} | |
be9ef9f9 | 3715 | for(Int_t Riter=0; Riter<fRVALUES; Riter++){ |
78c3bd48 | 3716 | Float_t Rvalue = fRstartMC+Riter; |
be9ef9f9 | 3717 | Float_t WInput = MCWeight4(term, Rvalue, 1.0, chGroup4, parentQinvGroup4, parentkTGroup4); |
3718 | Float_t WInputParentFSI = MCWeightFSI4(term, Rvalue, 1.0, chGroup4, parentQinvGroup4); | |
3719 | Float_t WInputFSI = MCWeightFSI4(term, Rvalue, 1.0, chGroup4, QinvMCGroup4); | |
4bf06935 | 3720 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[0].EDB[0].FourPT[term-1].fMuonSmeared->Fill(1, Rvalue, q4MC, WInput); |
3721 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[0].EDB[0].FourPT[term-1].fMuonIdeal->Fill(1, Rvalue, parentQ4, WInput); | |
3722 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[0].EDB[0].FourPT[term-1].fMuonPionK4->Fill(1, Rvalue, q4MC, WInputFSI); | |
3723 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[0].EDB[0].FourPT[term-1].fPionPionK4->Fill(1, Rvalue, parentQ4, WInputParentFSI); | |
5591748e | 3724 | // |
4bf06935 | 3725 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[0].EDB[0].FourPT[term-1].fMuonSmeared->Fill(2, Rvalue, q4MC); |
3726 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[0].EDB[0].FourPT[term-1].fMuonIdeal->Fill(2, Rvalue, parentQ4); | |
3727 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[0].EDB[0].FourPT[term-1].fMuonPionK4->Fill(2, Rvalue, q4MC); | |
3728 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[0].EDB[0].FourPT[term-1].fPionPionK4->Fill(2, Rvalue, parentQ4); | |
be9ef9f9 | 3729 | }// Riter |
3730 | }// term loop | |
3731 | ||
3732 | }// pion parent check | |
3733 | }// parentQ check (muon correction) | |
4bf06935 | 3734 | |
0207c034 | 3735 | Int_t indexq4 = q4 / 0.005; |
3736 | if(indexq4 >=50) indexq4=49; | |
78c3bd48 | 3737 | Float_t WSpectrum = 1.0; |
ebd00f1b | 3738 | if(fCollisionType==0){ |
78c3bd48 | 3739 | WSpectrum = HIJINGq4WeightsSC[indexq4]; |
3740 | if((ch1+ch2+ch3+ch4)==3 || (ch1+ch2+ch3+ch4)==1) WSpectrum = HIJINGq4WeightsMC1[indexq4]; | |
3741 | if((ch1+ch2+ch3+ch4)==2) WSpectrum = HIJINGq4WeightsMC2[indexq4]; | |
3742 | } | |
be9ef9f9 | 3743 | // 4-pion momentum resolution |
6bb6954b | 3744 | for(Int_t term=1; term<=13; term++){ |
be9ef9f9 | 3745 | for(Int_t Riter=0; Riter<fRVALUES; Riter++){ |
78c3bd48 | 3746 | Float_t Rvalue = fRstartMC+Riter; |
80507acf | 3747 | Float_t WInput = MCWeight4(term, Rvalue, ffcSqMRC, chGroup4, QinvMCGroup4, kTGroup4); |
70a43d86 | 3748 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[0].EDB[EDindex4].FourPT[term-1].fIdeal->Fill(Rvalue, q4MC, WInput*WSpectrum); |
3749 | Charge1[bin1].Charge2[bin2].Charge3[bin3].Charge4[bin4].MB[0].EDB[EDindex4].FourPT[term-1].fSmeared->Fill(Rvalue, q4, WInput*WSpectrum); | |
be9ef9f9 | 3750 | } |
3751 | } | |
0207c034 | 3752 | |
be9ef9f9 | 3753 | }// label check particle 4 |
3754 | }// MCcase | |
3755 | ||
3756 | }// 4th particle | |
3757 | }// 3rd particle | |
3758 | }// 2nd particle | |
3759 | }// 1st particle | |
3760 | ||
3761 | }// en4 | |
3762 | }// en3 | |
3763 | }// en2 | |
3764 | ||
3765 | ||
3766 | ||
3767 | ||
3768 | ||
3769 | ||
3770 | ||
3771 | // Post output data. | |
3772 | PostData(1, fOutputList); | |
3773 | ||
3774 | } | |
3775 | //________________________________________________________________________ | |
3776 | void AliFourPion::Terminate(Option_t *) | |
3777 | { | |
3778 | // Called once at the end of the query | |
3779 | ||
3780 | cout<<"Done"<<endl; | |
3781 | ||
3782 | } | |
3783 | //________________________________________________________________________ | |
3784 | Bool_t AliFourPion::AcceptPair(AliFourPionTrackStruct first, AliFourPionTrackStruct second) | |
3785 | { | |
3786 | ||
3787 | if(fabs(first.fEta-second.fEta) > fMinSepPairEta) return kTRUE; | |
3788 | ||
3789 | // propagate through B field to r=1m | |
3790 | Float_t phi1 = first.fPhi - asin(first.fCharge*(0.1*fBfield)*0.15/first.fPt);// 0.15 for D=1m | |
3791 | if(phi1 > 2*PI) phi1 -= 2*PI; | |
3792 | if(phi1 < 0) phi1 += 2*PI; | |
3793 | Float_t phi2 = second.fPhi - asin(second.fCharge*(0.1*fBfield)*0.15/second.fPt);// 0.15 for D=1m | |
3794 | if(phi2 > 2*PI) phi2 -= 2*PI; | |
3795 | if(phi2 < 0) phi2 += 2*PI; | |
3796 | ||
3797 | Float_t deltaphi = phi1 - phi2; | |
3798 | if(deltaphi > PI) deltaphi -= 2*PI; | |
3799 | if(deltaphi < -PI) deltaphi += 2*PI; | |
3800 | deltaphi = fabs(deltaphi); | |
3801 | ||
3802 | if(deltaphi < fMinSepPairPhi) return kFALSE;// Min Separation | |
3803 | ||
3804 | ||
3805 | // propagate through B field to r=1.6m | |
3806 | phi1 = first.fPhi - asin(first.fCharge*(0.1*fBfield)*0.24/first.fPt);// mine. 0.24 for D=1.6m | |
3807 | if(phi1 > 2*PI) phi1 -= 2*PI; | |
3808 | if(phi1 < 0) phi1 += 2*PI; | |
3809 | phi2 = second.fPhi - asin(second.fCharge*(0.1*fBfield)*0.24/second.fPt);// mine. 0.24 for D=1.6m | |
3810 | if(phi2 > 2*PI) phi2 -= 2*PI; | |
3811 | if(phi2 < 0) phi2 += 2*PI; | |
3812 | ||
3813 | deltaphi = phi1 - phi2; | |
3814 | if(deltaphi > PI) deltaphi -= 2*PI; | |
3815 | if(deltaphi < -PI) deltaphi += 2*PI; | |
3816 | deltaphi = fabs(deltaphi); | |
3817 | ||
3818 | if(deltaphi < fMinSepPairPhi) return kFALSE;// Min Separation | |
3819 | ||
3820 | ||
3821 | ||
3822 | // | |
3823 | ||
42802bba | 3824 | /* Int_t ncl1 = first.fClusterMap.GetNbits(); |
be9ef9f9 | 3825 | Int_t ncl2 = second.fClusterMap.GetNbits(); |
3826 | Int_t sumCls = 0; Int_t sumSha = 0; Int_t sumQ = 0; | |
3827 | Double_t shfrac = 0; Double_t qfactor = 0; | |
3828 | for(Int_t imap = 0; imap < ncl1 && imap < ncl2; imap++) { | |
3829 | if (first.fClusterMap.TestBitNumber(imap) && second.fClusterMap.TestBitNumber(imap)) {// Both clusters | |
3830 | if (first.fSharedMap.TestBitNumber(imap) && second.fSharedMap.TestBitNumber(imap)) { // Shared | |
3831 | sumQ++; | |
3832 | sumCls+=2; | |
3833 | sumSha+=2;} | |
3834 | else {sumQ--; sumCls+=2;} | |
3835 | } | |
3836 | else if (first.fClusterMap.TestBitNumber(imap) || second.fClusterMap.TestBitNumber(imap)) {// Non shared | |
3837 | sumQ++; | |
3838 | sumCls++;} | |
3839 | } | |
3840 | if (sumCls>0) { | |
3841 | qfactor = sumQ*1.0/sumCls; | |
3842 | shfrac = sumSha*1.0/sumCls; | |
3843 | } | |
3844 | ||
3845 | if(qfactor > fShareQuality || shfrac > fShareFraction) return kFALSE; | |
42802bba | 3846 | */ |
be9ef9f9 | 3847 | |
3848 | return kTRUE; | |
3849 | ||
3850 | ||
fac2d84b | 3851 | } |
3852 | //________________________________________________________________________ | |
3853 | Bool_t AliFourPion::AcceptPairPM(AliFourPionTrackStruct first, AliFourPionTrackStruct second) | |
3854 | {// optional pair cuts for +- pairs | |
3855 | ||
3856 | if(fabs(first.fEta-second.fEta) > fMinSepPairEta) return kTRUE; | |
3857 | ||
3858 | // propagate through B field to r=1m | |
3859 | Float_t phi1 = first.fPhi - asin(1.*(0.1*fBfield)*0.15/first.fPt);// 0.15 for D=1m | |
3860 | if(phi1 > 2*PI) phi1 -= 2*PI; | |
3861 | if(phi1 < 0) phi1 += 2*PI; | |
3862 | Float_t phi2 = second.fPhi - asin(1.*(0.1*fBfield)*0.15/second.fPt);// 0.15 for D=1m | |
3863 | if(phi2 > 2*PI) phi2 -= 2*PI; | |
3864 | if(phi2 < 0) phi2 += 2*PI; | |
3865 | ||
3866 | Float_t deltaphi = phi1 - phi2; | |
3867 | if(deltaphi > PI) deltaphi -= 2*PI; | |
3868 | if(deltaphi < -PI) deltaphi += 2*PI; | |
3869 | deltaphi = fabs(deltaphi); | |
3870 | ||
3871 | if(deltaphi < fMinSepPairPhi) return kFALSE;// Min Separation | |
3872 | ||
3873 | ||
3874 | // propagate through B field to r=1.6m | |
3875 | phi1 = first.fPhi - asin(1.*(0.1*fBfield)*0.24/first.fPt);// mine. 0.24 for D=1.6m | |
3876 | if(phi1 > 2*PI) phi1 -= 2*PI; | |
3877 | if(phi1 < 0) phi1 += 2*PI; | |
3878 | phi2 = second.fPhi - asin(1.*(0.1*fBfield)*0.24/second.fPt);// mine. 0.24 for D=1.6m | |
3879 | if(phi2 > 2*PI) phi2 -= 2*PI; | |
3880 | if(phi2 < 0) phi2 += 2*PI; | |
3881 | ||
3882 | deltaphi = phi1 - phi2; | |
3883 | if(deltaphi > PI) deltaphi -= 2*PI; | |
3884 | if(deltaphi < -PI) deltaphi += 2*PI; | |
3885 | deltaphi = fabs(deltaphi); | |
3886 | ||
3887 | if(deltaphi < fMinSepPairPhi) return kFALSE;// Min Separation | |
3888 | ||
3889 | return kTRUE; | |
3890 | ||
be9ef9f9 | 3891 | } |
3892 | //________________________________________________________________________ | |
fcb16ac9 | 3893 | Float_t AliFourPion::Gamov(Int_t chargeBin1, Int_t chargeBin2, Float_t qinv) |
be9ef9f9 | 3894 | { |
3895 | Float_t arg = G_Coeff/qinv; | |
3896 | ||
3897 | if(chargeBin1==chargeBin2) return (exp(arg)-1)/(arg); | |
3898 | else {return (exp(-arg)-1)/(-arg);} | |
3899 | ||
3900 | } | |
3901 | //________________________________________________________________________ | |
3902 | void AliFourPion::Shuffle(Int_t *iarr, Int_t i1, Int_t i2) | |
3903 | { | |
3904 | Int_t j, k; | |
3905 | Int_t a = i2 - i1; | |
3906 | for (Int_t i = i1; i < i2+1; i++) { | |
3907 | j = (Int_t) (gRandom->Rndm() * a); | |
3908 | k = iarr[j]; | |
3909 | iarr[j] = iarr[i]; | |
3910 | iarr[i] = k; | |
3911 | } | |
3912 | } | |
3913 | ||
3914 | ||
3915 | //________________________________________________________________________ | |
3916 | Float_t AliFourPion::GetQinv(Float_t track1[], Float_t track2[]){ | |
3917 | ||
3918 | Float_t qinv = sqrt( fabs(pow(track1[1]-track2[1],2) + pow(track1[2]-track2[2],2) + pow(track1[3]-track2[3],2) - pow(track1[0]-track2[0],2)) ); | |
3919 | return qinv; | |
3920 | ||
3921 | } | |
3922 | //________________________________________________________________________ | |
3923 | void AliFourPion::GetQosl(Float_t track1[], Float_t track2[], Float_t& qout, Float_t& qside, Float_t& qlong){ | |
3924 | ||
3925 | Float_t p0 = track1[0] + track2[0]; | |
3926 | Float_t px = track1[1] + track2[1]; | |
3927 | Float_t py = track1[2] + track2[2]; | |
3928 | Float_t pz = track1[3] + track2[3]; | |
3929 | ||
3930 | Float_t mt = sqrt(p0*p0 - pz*pz); | |
3931 | Float_t pt = sqrt(px*px + py*py); | |
3932 | ||
3933 | Float_t v0 = track1[0] - track2[0]; | |
3934 | Float_t vx = track1[1] - track2[1]; | |
3935 | Float_t vy = track1[2] - track2[2]; | |
3936 | Float_t vz = track1[3] - track2[3]; | |
3937 | ||
3938 | qout = (px*vx + py*vy)/pt; | |
3939 | qside = (px*vy - py*vx)/pt; | |
3940 | qlong = (p0*vz - pz*v0)/mt; | |
3941 | } | |
3942 | //________________________________________________________________________ | |
3943 | void AliFourPion::SetWeightArrays(Bool_t legoCase, TH3F *histos[AliFourPion::fKbinsT][AliFourPion::fCentBins]){ | |
3944 | ||
3945 | if(legoCase){ | |
3946 | cout<<"LEGO call to SetWeightArrays"<<endl; | |
3947 | ||
3948 | for(Int_t tKbin=0; tKbin<fKbinsT; tKbin++){ | |
3949 | for(Int_t mb=0; mb<fCentBins; mb++){ | |
3950 | fNormWeight[tKbin][mb] = (TH3F*)histos[tKbin][mb]->Clone(); | |
3951 | fNormWeight[tKbin][mb]->SetDirectory(0); | |
3952 | } | |
3953 | } | |
3954 | ||
3955 | }else{ | |
3956 | ||
3957 | TFile *wFile = new TFile("WeightFile.root","READ"); | |
3958 | if(!wFile->IsOpen()) {cout<<"No Weight File!!!!!!!!!!"<<endl; return;} | |
3959 | else cout<<"Good Weight File Found!"<<endl; | |
3960 | ||
3961 | for(Int_t tKbin=0; tKbin<fKbinsT; tKbin++){ | |
3962 | for(Int_t mb=0; mb<fCentBins; mb++){ | |
3963 | ||
3964 | TString *name = new TString("Weight_Kt_"); | |
3965 | *name += tKbin; | |
3966 | name->Append("_Ky_0"); | |
3967 | name->Append("_M_"); | |
3968 | *name += mb; | |
3969 | name->Append("_ED_0"); | |
3970 | ||
3971 | ||
3972 | fNormWeight[tKbin][mb] = (TH3F*)wFile->Get(name->Data()); | |
3973 | fNormWeight[tKbin][mb]->SetDirectory(0); | |
3974 | ||
3975 | ||
3976 | }//mb | |
3977 | }//kt | |
3978 | ||
3979 | wFile->Close(); | |
3980 | } | |
3981 | ||
3982 | cout<<"Done reading weight file"<<endl; | |
3983 | ||
3984 | } | |
3985 | //________________________________________________________________________ | |
3986 | void AliFourPion::GetWeight(Float_t track1[], Float_t track2[], Float_t& wgt, Float_t& wgtErr){ | |
3987 | ||
3988 | Float_t kt=sqrt( pow(track1[1]+track2[1],2) + pow(track1[2]+track2[2],2))/2.; | |
3989 | // | |
3990 | Float_t qOut=0,qSide=0,qLong=0; | |
3991 | GetQosl(track1, track2, qOut, qSide, qLong); | |
3992 | qOut = fabs(qOut); | |
3993 | qSide = fabs(qSide); | |
3994 | qLong = fabs(qLong); | |
3995 | Float_t wd=0, xd=0, yd=0, zd=0; | |
3996 | //Float_t qinvtemp=GetQinv(0,track1, track2); | |
3997 | // | |
3998 | ||
3999 | if(kt < fKmeanT[0]) {fKtIndexL=0; fKtIndexH=1;} | |
4000 | else if(kt >= fKmeanT[fKbinsT-1]) {fKtIndexL=fKbinsT-2; fKtIndexH=fKbinsT-1;} | |
4001 | else { | |
4002 | for(Int_t i=0; i<fKbinsT-1; i++){ | |
4003 | if((kt >= fKmeanT[i]) && (kt < fKmeanT[i+1])) {fKtIndexL=i; fKtIndexH=i+1; break;} | |
4004 | } | |
4005 | } | |
4006 | wd = (kt-fKmeanT[fKtIndexL])/(fKmeanT[fKtIndexH]-fKmeanT[fKtIndexL]); | |
4e2838bf | 4007 | if(fMaxPt<=0.251) {fKtIndexL=0; fKtIndexH=0; wd=0;} |
4008 | if(fMinPt>0.249 && fKtIndexL==0) {fKtIndexL=1; wd=0;} | |
be9ef9f9 | 4009 | // |
be9ef9f9 | 4010 | if(qOut < fQmean[0]) {fQoIndexL=0; fQoIndexH=0; xd=0;} |
4011 | else if(qOut >= fQmean[kQbinsWeights-1]) {fQoIndexL=kQbinsWeights-1; fQoIndexH=kQbinsWeights-1; xd=1;} | |
4012 | else { | |
4013 | for(Int_t i=0; i<kQbinsWeights-1; i++){ | |
4014 | if((qOut >= fQmean[i]) && (qOut < fQmean[i+1])) {fQoIndexL=i; fQoIndexH=i+1; break;} | |
95567836 | 4015 | } |
be9ef9f9 | 4016 | xd = (qOut-fQmean[fQoIndexL])/(fQmean[fQoIndexH]-fQmean[fQoIndexL]); |
4017 | } | |
4018 | // | |
4019 | if(qSide < fQmean[0]) {fQsIndexL=0; fQsIndexH=0; yd=0;} | |
4020 | else if(qSide >= fQmean[kQbinsWeights-1]) {fQsIndexL=kQbinsWeights-1; fQsIndexH=kQbinsWeights-1; yd=1;} | |
4021 | else { | |
4022 | for(Int_t i=0; i<kQbinsWeights-1; i++){ | |
4023 | if((qSide >= fQmean[i]) && (qSide < fQmean[i+1])) {fQsIndexL=i; fQsIndexH=i+1; break;} | |
4024 | } | |
4025 | yd = (qSide-fQmean[fQsIndexL])/(fQmean[fQsIndexH]-fQmean[fQsIndexL]); | |
4026 | } | |
4027 | // | |
4028 | if(qLong < fQmean[0]) {fQlIndexL=0; fQlIndexH=0; zd=0;} | |
4029 | else if(qLong >= fQmean[kQbinsWeights-1]) {fQlIndexL=kQbinsWeights-1; fQlIndexH=kQbinsWeights-1; zd=1;} | |
4030 | else { | |
4031 | for(Int_t i=0; i<kQbinsWeights-1; i++){ | |
4032 | if((qLong >= fQmean[i]) && (qLong < fQmean[i+1])) {fQlIndexL=i; fQlIndexH=i+1; break;} | |
4033 | } | |
4034 | zd = (qLong-fQmean[fQlIndexL])/(fQmean[fQlIndexH]-fQmean[fQlIndexL]); | |
4035 | } | |
4036 | // | |
95567836 | 4037 | if(fLinearInterpolation){// Linear Interpolation of osl |
4038 | // w interpolation (kt) | |
4039 | Float_t c000 = fNormWeight[fKtIndexL][fMbin]->GetBinContent(fQoIndexL+1, fQsIndexL+1, fQlIndexL+1)*(1-wd) + fNormWeight[fKtIndexH][fMbin]->GetBinContent(fQoIndexL+1, fQsIndexL+1, fQlIndexL+1)*wd; | |
4040 | Float_t c100 = fNormWeight[fKtIndexL][fMbin]->GetBinContent(fQoIndexH+1, fQsIndexL+1, fQlIndexL+1)*(1-wd) + fNormWeight[fKtIndexH][fMbin]->GetBinContent(fQoIndexH+1, fQsIndexL+1, fQlIndexL+1)*wd; | |
4041 | Float_t c010 = fNormWeight[fKtIndexL][fMbin]->GetBinContent(fQoIndexL+1, fQsIndexH+1, fQlIndexL+1)*(1-wd) + fNormWeight[fKtIndexH][fMbin]->GetBinContent(fQoIndexL+1, fQsIndexH+1, fQlIndexL+1)*wd; | |
4042 | Float_t c001 = fNormWeight[fKtIndexL][fMbin]->GetBinContent(fQoIndexL+1, fQsIndexL+1, fQlIndexH+1)*(1-wd) + fNormWeight[fKtIndexH][fMbin]->GetBinContent(fQoIndexL+1, fQsIndexL+1, fQlIndexH+1)*wd; | |
4043 | Float_t c110 = fNormWeight[fKtIndexL][fMbin]->GetBinContent(fQoIndexH+1, fQsIndexH+1, fQlIndexL+1)*(1-wd) + fNormWeight[fKtIndexH][fMbin]->GetBinContent(fQoIndexH+1, fQsIndexH+1, fQlIndexL+1)*wd; | |
4044 | Float_t c101 = fNormWeight[fKtIndexL][fMbin]->GetBinContent(fQoIndexH+1, fQsIndexL+1, fQlIndexH+1)*(1-wd) + fNormWeight[fKtIndexH][fMbin]->GetBinContent(fQoIndexH+1, fQsIndexL+1, fQlIndexH+1)*wd; | |
4045 | Float_t c011 = fNormWeight[fKtIndexL][fMbin]->GetBinContent(fQoIndexL+1, fQsIndexH+1, fQlIndexH+1)*(1-wd) + fNormWeight[fKtIndexH][fMbin]->GetBinContent(fQoIndexL+1, fQsIndexH+1, fQlIndexH+1)*wd; | |
4046 | Float_t c111 = fNormWeight[fKtIndexL][fMbin]->GetBinContent(fQoIndexH+1, fQsIndexH+1, fQlIndexH+1)*(1-wd) + fNormWeight[fKtIndexH][fMbin]->GetBinContent(fQoIndexH+1, fQsIndexH+1, fQlIndexH+1)*wd; | |
4047 | // x interpolation (qOut) | |
4048 | Float_t c00 = c000*(1-xd) + c100*xd; | |
4049 | Float_t c10 = c010*(1-xd) + c110*xd; | |
4050 | Float_t c01 = c001*(1-xd) + c101*xd; | |
4051 | Float_t c11 = c011*(1-xd) + c111*xd; | |
4052 | // y interpolation (qSide) | |
4053 | Float_t c0 = c00*(1-yd) + c10*yd; | |
4054 | Float_t c1 = c01*(1-yd) + c11*yd; | |
4055 | // z interpolation (qLong) | |
4056 | wgt = (c0*(1-zd) + c1*zd); | |
4057 | }else{// cubic interpolation of osl | |
4058 | ||
4059 | for(Int_t x=0; x<4; x++){ | |
4060 | for(Int_t y=0; y<4; y++){ | |
4061 | for(Int_t z=0; z<4; z++){ | |
4062 | Int_t binO = fQoIndexL + x; | |
4063 | Int_t binS = fQsIndexL + y; | |
4064 | Int_t binL = fQlIndexL + z; | |
4065 | if(binO<=0) binO = 1; | |
4066 | if(binS<=0) binS = 1; | |
4067 | if(binL<=0) binL = 1; | |
4068 | if(binO>kQbinsWeights) binO = kQbinsWeights; | |
4069 | if(binS>kQbinsWeights) binS = kQbinsWeights; | |
4070 | if(binL>kQbinsWeights) binL = kQbinsWeights; | |
4071 | farrP1[x][y][z] = fNormWeight[fKtIndexL][fMbin]->GetBinContent(binO,binS,binL); | |
4072 | farrP2[x][y][z] = fNormWeight[fKtIndexH][fMbin]->GetBinContent(binO,binS,binL); | |
4073 | } | |
4074 | } | |
4075 | } | |
4076 | Float_t coord[3]={xd, yd, zd}; | |
4077 | Float_t c0 = nCubicInterpolate(3, (Float_t*) farrP1, coord); | |
4078 | Float_t c1 = nCubicInterpolate(3, (Float_t*) farrP2, coord); | |
4079 | // kT interpolation | |
4080 | wgt = c0*(1-wd) + c1*wd; | |
4081 | } | |
be9ef9f9 | 4082 | //// |
4083 | ||
43046300 | 4084 | // simplified stat error |
4085 | Float_t avgErr = fNormWeight[fKtIndexL][fMbin]->GetBinError(fQoIndexH+1,fQsIndexH+1,fQlIndexH+1); | |
4086 | avgErr += fNormWeight[fKtIndexH][fMbin]->GetBinError(fQoIndexL+1,fQsIndexL+1,fQlIndexL+1); | |
4087 | avgErr /= 2.; | |
4088 | // | |
4089 | wgtErr = avgErr; | |
be9ef9f9 | 4090 | |
4091 | ||
4092 | } | |
4093 | //________________________________________________________________________ | |
4094 | Float_t AliFourPion::MCWeight(Int_t c[2], Float_t R, Float_t fcSq, Float_t qinv, Float_t k12){ | |
4095 | ||
4096 | Float_t radius = R/0.19733;// convert to GeV (starts at 5 fm, was 3 fm) | |
4097 | Float_t r12=radius*(1-k12/2.0); | |
4098 | SetFSIindex(R); | |
4099 | Float_t coulCorr12 = FSICorrelation(c[0], c[1], qinv); | |
4100 | if(c[0]==c[1]){ | |
4101 | Float_t arg=qinv*r12; | |
4102 | Float_t EW = 1 + kappa3/(6.*pow(2.,1.5))*(8.*pow(arg,3) - 12.*arg); | |
4103 | EW += kappa4/(24.*pow(2.,2))*(16.*pow(arg,4) -48.*pow(arg,2) + 12); | |
4104 | return ((1-fcSq) + fcSq*(1 + exp(-pow(qinv*r12,2))*pow(EW,2))*coulCorr12); | |
4105 | }else { | |
4106 | return ((1-fcSq) + fcSq*coulCorr12); | |
4107 | } | |
4108 | ||
4109 | } | |
4110 | //________________________________________________________________________ | |
4111 | Float_t AliFourPion::MCWeightOSL(Int_t charge1, Int_t charge2, Int_t r, Int_t dampIndex, Float_t qinv, Float_t qo, Float_t qs, Float_t ql){ | |
4112 | ||
4113 | Float_t radiusOut = Float_t(r)/0.19733;// convert to GeV (starts at 5 fm, was 3 fm) | |
4114 | Float_t radiusSide = radiusOut; | |
4115 | Float_t radiusLong = radiusOut; | |
4116 | Float_t myDamp = fDampStart + (fDampStep)*dampIndex; | |
4117 | Float_t coulCorr12 = FSICorrelation(charge1, charge2, qinv); | |
4118 | if(charge1==charge2){ | |
4119 | return ((1-myDamp) + myDamp*(1 + exp(-pow(qo*radiusOut,2)) * exp(-pow(qs*radiusSide,2)) * exp(-pow(ql*radiusLong,2)))*coulCorr12); | |
4120 | }else { | |
4121 | return ((1-myDamp) + myDamp*coulCorr12); | |
4122 | } | |
4123 | ||
4124 | } | |
4125 | ||
4126 | //________________________________________________________________________ | |
4127 | Float_t AliFourPion::MCWeight3(Int_t term, Float_t R, Float_t fcSq, Int_t c[3], Float_t qinv[3], Float_t kT[3]){ | |
4128 | // FSI + QS correlations | |
4129 | if(term==5) return 1.0; | |
4130 | ||
4131 | Float_t radius=R/0.19733; | |
4132 | Float_t r12=radius*(1-kT[0]/2.0); | |
4133 | Float_t r13=radius*(1-kT[1]/2.0); | |
4134 | Float_t r23=radius*(1-kT[2]/2.0); | |
4135 | ||
4136 | Float_t fc = sqrt(fcSq); | |
4137 | ||
4138 | SetFSIindex(R); | |
4139 | Float_t Kfactor12 = FSICorrelation(c[0],c[1], qinv[0]);// K2 | |
4140 | Float_t Kfactor13 = FSICorrelation(c[0],c[2], qinv[1]);// K2 | |
4141 | Float_t Kfactor23 = FSICorrelation(c[1],c[2], qinv[2]);// K2 | |
4142 | ||
4143 | if(c[0]==c[1] && c[0]==c[2]){// all three of the same charge | |
4144 | Float_t arg12=qinv[0]*r12; | |
4145 | Float_t arg13=qinv[1]*r13; | |
4146 | Float_t arg23=qinv[2]*r23; | |
4147 | Float_t EW12 = 1 + kappa3/(6.*pow(2.,1.5))*(8.*pow(arg12,3) - 12.*arg12); | |
4148 | EW12 += kappa4/(24.*pow(2.,2))*(16.*pow(arg12,4) -48.*pow(arg12,2) + 12); | |
4149 | Float_t EW13 = 1 + kappa3/(6.*pow(2.,1.5))*(8.*pow(arg13,3) - 12.*arg13); | |
4150 | EW13 += kappa4/(24.*pow(2.,2))*(16.*pow(arg13,4) -48.*pow(arg13,2) + 12); | |
4151 | Float_t EW23 = 1 + kappa3/(6.*pow(2.,1.5))*(8.*pow(arg23,3) - 12.*arg23); | |
4152 | EW23 += kappa4/(24.*pow(2.,2))*(16.*pow(arg23,4) -48.*pow(arg23,2) + 12); | |
4153 | if(term==1){ | |
4154 | Float_t C3QS = 1 + exp(-pow(qinv[0]*r12,2))*pow(EW12,2) + exp(-pow(qinv[1]*r13,2))*pow(EW13,2) + exp(-pow(qinv[2]*r23,2))*pow(EW23,2); | |
4155 | C3QS += 2*exp(-(pow(r12,2)*pow(qinv[0],2) + pow(r13,2)*pow(qinv[1],2) + pow(r23,2)*pow(qinv[2],2))/2.)*EW12*EW13*EW23; | |
4156 | Float_t C3 = pow(1-fc,3) + 3*fc*pow(1-fc,2); | |
4157 | C3 += pow(fc,2)*(1-fc)*(1+exp(-pow(qinv[0]*r12,2))*pow(EW12,2))*Kfactor12; | |
4158 | C3 += pow(fc,2)*(1-fc)*(1+exp(-pow(qinv[1]*r13,2))*pow(EW13,2))*Kfactor13; | |
4159 | C3 += pow(fc,2)*(1-fc)*(1+exp(-pow(qinv[2]*r23,2))*pow(EW23,2))*Kfactor23; | |
4160 | C3 += pow(fc,3)*C3QS*Kfactor12*Kfactor13*Kfactor23; | |
4161 | return C3; | |
4162 | }else if(term==2){ | |
4163 | return ((1-fcSq) + fcSq*(1 + exp(-pow(qinv[0]*r12,2))*pow(EW12,2))*Kfactor12); | |
4164 | }else if(term==3){ | |
4165 | return ((1-fcSq) + fcSq*(1 + exp(-pow(qinv[1]*r13,2))*pow(EW13,2))*Kfactor13); | |
4166 | }else if(term==4){ | |
4167 | return ((1-fcSq) + fcSq*(1 + exp(-pow(qinv[2]*r23,2))*pow(EW23,2))*Kfactor23); | |
4168 | }else return 1.0; | |
4169 | ||
4170 | }else{// mixed charge case | |
4171 | Float_t arg=qinv[0]*r12; | |
4172 | Float_t KfactorSC = Kfactor12; | |
4173 | Float_t KfactorMC1 = Kfactor13; | |
4174 | Float_t KfactorMC2 = Kfactor23; | |
4175 | if(c[0]==c[2]) {arg=qinv[1]*r13; KfactorSC = Kfactor13; KfactorMC1 = Kfactor12; KfactorMC2 = Kfactor23;} | |
4176 | if(c[1]==c[2]) {arg=qinv[2]*r23; KfactorSC = Kfactor23; KfactorMC1 = Kfactor12; KfactorMC2 = Kfactor13;} | |
4177 | Float_t EW = 1 + kappa3/(6.*pow(2.,1.5))*(8.*pow(arg,3) - 12.*arg); | |
4178 | EW += kappa4/(24.*pow(2.,2))*(16.*pow(arg,4) -48.*pow(arg,2) + 12); | |
4179 | if(term==1){ | |
4180 | Float_t C3QS = 1 + exp(-pow(arg,2))*pow(EW,2); | |
4181 | Float_t C3 = pow(1-fc,3) + 3*fc*pow(1-fc,2); | |
4182 | C3 += pow(fc,2)*(1-fc)*(1+exp(-pow(arg,2))*pow(EW,2))*KfactorSC; | |
4183 | C3 += pow(fc,2)*(1-fc)*KfactorMC1; | |
4184 | C3 += pow(fc,2)*(1-fc)*KfactorMC2; | |
4185 | C3 += pow(fc,3)*C3QS*KfactorSC*KfactorMC1*KfactorMC2; | |
4186 | return C3; | |
4187 | }else if(term==2){ | |
4188 | if( (c[0]+c[1]+c[2])==1) return ((1-fcSq) + fcSq*(1 + exp(-pow(arg,2))*pow(EW,2))*KfactorSC); | |
4189 | else return ((1-fcSq) + fcSq*KfactorMC1);// doesn't matter MC1 or MC2 | |
4190 | }else if(term==3){ | |
4191 | return ((1-fcSq) + fcSq*KfactorMC1);// doesn't matter MC1 or MC2 | |
4192 | }else if(term==4){ | |
4193 | if( (c[0]+c[1]+c[2])==2) return ((1-fcSq) + fcSq*(1 + exp(-pow(arg,2))*pow(EW,2))*KfactorSC); | |
4194 | else return ((1-fcSq) + fcSq*KfactorMC1);// doesn't matter MC1 or MC2 | |
4195 | }else return 1.0; | |
4196 | } | |
4197 | ||
4198 | } | |
4199 | //________________________________________________________________________ | |
4200 | Float_t AliFourPion::MCWeightFSI3(Int_t term, Float_t R, Float_t fcSq, Int_t c[3], Float_t qinv[3]){ | |
4201 | // FSI only (no QS correlations) | |
4202 | if(term==5) return 1.0; | |
4203 | ||
4204 | Float_t fc = sqrt(fcSq); | |
4205 | SetFSIindex(R); | |
4206 | Float_t Kfactor12 = FSICorrelation(c[0],c[1], qinv[0]);// K2 | |
4207 | Float_t Kfactor13 = FSICorrelation(c[0],c[2], qinv[1]);// K2 | |
4208 | Float_t Kfactor23 = FSICorrelation(c[1],c[2], qinv[2]);// K2 | |
4209 | ||
4210 | if(c[0]==c[1] && c[0]==c[2]){// all three of the same charge | |
4211 | if(term==1){ | |
4212 | Float_t C3 = pow(1-fc,3) + 3*fc*pow(1-fc,2); | |
4213 | C3 += pow(fc,2)*(1-fc)*Kfactor12; | |
4214 | C3 += pow(fc,2)*(1-fc)*Kfactor13; | |
4215 | C3 += pow(fc,2)*(1-fc)*Kfactor23; | |
4216 | C3 += pow(fc,3)*Kfactor12*Kfactor13*Kfactor23; | |
4217 | return C3; | |
4218 | }else if(term==2){ | |
4219 | return ((1-fcSq) + fcSq*Kfactor12); | |
4220 | }else if(term==3){ | |
4221 | return ((1-fcSq) + fcSq*Kfactor13); | |
4222 | }else if(term==4){ | |
4223 | return ((1-fcSq) + fcSq*Kfactor23); | |
4224 | }else return 1.0; | |
4225 | ||
4226 | }else{// mixed charge case | |
4227 | Float_t KfactorSC = Kfactor12; | |
4228 | Float_t KfactorMC1 = Kfactor13; | |
4229 | Float_t KfactorMC2 = Kfactor23; | |
4230 | if(c[0]==c[2]) {KfactorSC = Kfactor13; KfactorMC1 = Kfactor12; KfactorMC2 = Kfactor23;} | |
4231 | if(c[1]==c[2]) {KfactorSC = Kfactor23; KfactorMC1 = Kfactor12; KfactorMC2 = Kfactor13;} | |
4232 | if(term==1){ | |
4233 | Float_t C3 = pow(1-fc,3) + 3*fc*pow(1-fc,2); | |
4234 | C3 += pow(fc,2)*(1-fc)*KfactorSC; | |
4235 | C3 += pow(fc,2)*(1-fc)*KfactorMC1; | |
4236 | C3 += pow(fc,2)*(1-fc)*KfactorMC2; | |
4237 | C3 += pow(fc,3)*KfactorSC*KfactorMC1*KfactorMC2; | |
4238 | return C3; | |
4239 | }else if(term==2){ | |
4240 | if( (c[0]+c[1]+c[2])==1) return ((1-fcSq) + fcSq*KfactorSC); | |
4241 | else return ((1-fcSq) + fcSq*KfactorMC1);// doesn't matter MC1 or MC2 | |
4242 | }else if(term==3){ | |
4243 | return ((1-fcSq) + fcSq*KfactorMC1);// doesn't matter MC1 or MC2 | |
4244 | }else if(term==4){ | |
4245 | if( (c[0]+c[1]+c[2])==2) return ((1-fcSq) + fcSq*KfactorSC); | |
4246 | else return ((1-fcSq) + fcSq*KfactorMC1);// doesn't matter MC1 or MC2 | |
4247 | }else return 1.0; | |
4248 | } | |
4249 | ||
4250 | } | |
4251 | //________________________________________________________________________ | |
4252 | Float_t AliFourPion::MCWeight4(Int_t term, Float_t R, Float_t fcSq, Int_t c[4], Float_t qinv[6], Float_t kT[6]){ | |
6bb6954b | 4253 | if(term==13) return 1.0; |
be9ef9f9 | 4254 | |
4255 | // Charge ordering: | |
4256 | // ----, ---+, --++, -+++, ++++ | |
4257 | // | |
4258 | // term ordering: | |
4259 | // Term 1: 1-2-3-4 (all same-event) | |
4260 | // Term 2: 1-2-3 4 (particle 4 from different event) | |
4261 | // Term 3: 1-2-4 3 (particle 3 from different event) | |
4262 | // Term 4: 1-3-4 2 (particle 2 from different event) | |
4263 | // Term 5: 2-3-4 1 (particle 1 from different event) | |
4264 | // Term 6: 1-2 3 4 (particle 1 and 2 from same event) | |
4265 | // Term 7: 1-3 2 4 | |
4266 | // Term 8: 1-4 2 3 | |
4267 | // Term 9: 2-3 1 4 | |
4268 | // Term 10: 2-4 1 3 | |
4269 | // Term 11: 3-4 1 2 | |
4270 | // Term 12: 1 2 3 4 (all from different events) | |
4271 | ||
4272 | Float_t radius = R/0.19733; | |
4273 | Float_t r[6]={0}; | |
4274 | r[0]=radius*(1-kT[0]/2.0); | |
4275 | r[1]=radius*(1-kT[1]/2.0); | |
4276 | r[2]=radius*(1-kT[2]/2.0); | |
4277 | r[3]=radius*(1-kT[3]/2.0); | |
4278 | r[4]=radius*(1-kT[4]/2.0); | |
4279 | r[5]=radius*(1-kT[5]/2.0); | |
4280 | ||
4281 | Int_t ChargeSum=c[0]+c[1]+c[2]+c[3]; | |
4282 | ||
4283 | Float_t fc = sqrt(fcSq); | |
4284 | SetFSIindex(R); | |
4285 | Float_t Kfactor12 = FSICorrelation(c[0],c[1], qinv[0]);// K2 | |
4286 | Float_t Kfactor13 = FSICorrelation(c[0],c[2], qinv[1]);// K2 | |
4287 | Float_t Kfactor14 = FSICorrelation(c[0],c[3], qinv[2]);// K2 | |
4288 | Float_t Kfactor23 = FSICorrelation(c[1],c[2], qinv[3]);// K2 | |
4289 | Float_t Kfactor24 = FSICorrelation(c[1],c[3], qinv[4]);// K2 | |
4290 | Float_t Kfactor34 = FSICorrelation(c[2],c[3], qinv[5]);// K2 | |
4291 | Float_t arg12=qinv[0]*r[0]; | |
4292 | Float_t arg13=qinv[1]*r[1]; | |
4293 | Float_t arg14=qinv[2]*r[2]; | |
4294 | Float_t arg23=qinv[3]*r[3]; | |
4295 | Float_t arg24=qinv[4]*r[4]; | |
4296 | Float_t arg34=qinv[5]*r[5]; | |
4297 | // Exchange Amplitudes | |
4298 | Float_t EA12 = exp(-pow(arg12,2)/2.)*(1 + kappa3/(6.*pow(2.,1.5))*(8.*pow(arg12,3) - 12.*arg12) + kappa4/(24.*pow(2.,2))*(16.*pow(arg12,4) -48.*pow(arg12,2) + 12)); | |
4299 | Float_t EA13 = exp(-pow(arg13,2)/2.)*(1 + kappa3/(6.*pow(2.,1.5))*(8.*pow(arg13,3) - 12.*arg13) + kappa4/(24.*pow(2.,2))*(16.*pow(arg13,4) -48.*pow(arg13,2) + 12)); | |
4300 | Float_t EA14 = exp(-pow(arg14,2)/2.)*(1 + kappa3/(6.*pow(2.,1.5))*(8.*pow(arg14,3) - 12.*arg14) + kappa4/(24.*pow(2.,2))*(16.*pow(arg14,4) -48.*pow(arg14,2) + 12)); | |
4301 | Float_t EA23 = exp(-pow(arg23,2)/2.)*(1 + kappa3/(6.*pow(2.,1.5))*(8.*pow(arg23,3) - 12.*arg23) + kappa4/(24.*pow(2.,2))*(16.*pow(arg23,4) -48.*pow(arg23,2) + 12)); | |
4302 | Float_t EA24 = exp(-pow(arg24,2)/2.)*(1 + kappa3/(6.*pow(2.,1.5))*(8.*pow(arg24,3) - 12.*arg24) + kappa4/(24.*pow(2.,2))*(16.*pow(arg24,4) -48.*pow(arg24,2) + 12)); | |
4303 | Float_t EA34 = exp(-pow(arg34,2)/2.)*(1 + kappa3/(6.*pow(2.,1.5))*(8.*pow(arg34,3) - 12.*arg34) + kappa4/(24.*pow(2.,2))*(16.*pow(arg34,4) -48.*pow(arg34,2) + 12)); | |
4304 | ||
4305 | if(c[0]==c[1] && c[0]==c[2] && c[0]==c[3]){// ---- and ++++ configuration | |
4306 | ||
4307 | if(term==1){ | |
4308 | Float_t C4QS = 1 + pow(EA12,2) + pow(EA13,2) + pow(EA14,2) + pow(EA23,2) + pow(EA24,2) + pow(EA34,2);// baseline + single pairs | |
4309 | C4QS += pow(EA12,2) * pow(EA34,2);// 2-pairs | |
4310 | C4QS += pow(EA13,2) * pow(EA24,2);// 2-pairs | |
4311 | C4QS += pow(EA14,2) * pow(EA23,2);// 2-pairs | |
4312 | C4QS += 2*EA12*EA13*EA23 + 2*EA12*EA14*EA24 + 2*EA13*EA14*EA34 + 2*EA23*EA24*EA34;// 3-particle exhange | |
4313 | C4QS += 3*EA12*EA23*EA34*EA14 + 3*EA12*EA13*EA34*EA24;// 4-particle exchange | |
4314 | Float_t C4 = pow(1-fc,4) + 4*fc*pow(1-fc,3); | |
4315 | C4 += pow(fc,2)*pow(1-fc,2)*( (1 + pow(EA12,2))*Kfactor12 + (1 + pow(EA13,2))*Kfactor13 + (1 + pow(EA14,2))*Kfactor14 ); | |
4316 | C4 += pow(fc,2)*pow(1-fc,2)*( (1 + pow(EA23,2))*Kfactor23 + (1 + pow(EA24,2))*Kfactor24 + (1 + pow(EA34,2))*Kfactor34); | |
4317 | C4 += pow(fc,3)*(1-fc)*(1 + pow(EA12,2) + pow(EA13,2) + pow(EA23,2) + 2*EA12*EA13*EA23) * Kfactor12*Kfactor13*Kfactor23; | |
4318 | C4 += pow(fc,3)*(1-fc)*(1 + pow(EA12,2) + pow(EA14,2) + pow(EA24,2) + 2*EA12*EA14*EA24) * Kfactor12*Kfactor14*Kfactor24; | |
4319 | C4 += pow(fc,3)*(1-fc)*(1 + pow(EA13,2) + pow(EA14,2) + pow(EA34,2) + 2*EA13*EA14*EA34) * Kfactor13*Kfactor14*Kfactor34; | |
4320 | C4 += pow(fc,3)*(1-fc)*(1 + pow(EA23,2) + pow(EA24,2) + pow(EA34,2) + 2*EA23*EA24*EA34) * Kfactor23*Kfactor24*Kfactor34; | |
4321 | C4 += pow(fc,4)*C4QS*Kfactor12*Kfactor13*Kfactor14*Kfactor23*Kfactor24*Kfactor34; | |
4322 | return C4; | |
4323 | }else if(term<=5){ | |
4324 | Float_t EA1=0, EA2=0, EA3=0, Kpair1=0, Kpair2=0, Kpair3=0; | |
4325 | if(term==2) {EA1=EA12; EA2=EA13; EA3=EA23; Kpair1=Kfactor12; Kpair2=Kfactor13; Kpair3=Kfactor23;} | |
4326 | else if(term==3) {EA1=EA12; EA2=EA14; EA3=EA24; Kpair1=Kfactor12; Kpair2=Kfactor14; Kpair3=Kfactor24;} | |
4327 | else if(term==4) {EA1=EA13; EA2=EA14; EA3=EA34; Kpair1=Kfactor13; Kpair2=Kfactor14; Kpair3=Kfactor34;} | |
4328 | else {EA1=EA23; EA2=EA24; EA3=EA34; Kpair1=Kfactor23; Kpair2=Kfactor24; Kpair3=Kfactor34;} | |
4329 | Float_t C3QS = 1 + pow(EA1,2) + pow(EA2,2) + pow(EA3,2); | |
4330 | C3QS += 2*EA1*EA2*EA3; | |
4331 | Float_t C3 = pow(1-fc,3) + 3*fc*pow(1-fc,2); | |
4332 | C3 += pow(fc,2)*(1-fc)*( (1+pow(EA1,2))*Kpair1 + (1+pow(EA2,2))*Kpair2 + (1+pow(EA3,2))*Kpair3 ); | |
4333 | C3 += pow(fc,3)*C3QS*Kpair1*Kpair2*Kpair3; | |
4334 | return C3; | |
4335 | }else if(term<=11){ | |
4336 | if(term==6) return ((1-fcSq) + fcSq*(1 + pow(EA12,2))*Kfactor12); | |
4337 | else if(term==7) return ((1-fcSq) + fcSq*(1 + pow(EA13,2))*Kfactor13); | |
4338 | else if(term==8) return ((1-fcSq) + fcSq*(1 + pow(EA14,2))*Kfactor14); | |
4339 | else if(term==9) return ((1-fcSq) + fcSq*(1 + pow(EA23,2))*Kfactor23); | |
4340 | else if(term==10) return ((1-fcSq) + fcSq*(1 + pow(EA24,2))*Kfactor24); | |
4341 | else return ((1-fcSq) + fcSq*(1 + pow(EA34,2))*Kfactor34); | |
6bb6954b | 4342 | }else if(term==12){ |
5591748e | 4343 | Float_t C22 = (1-fcSq) + fcSq*(1 + pow(EA12,2))*Kfactor12; |
4344 | C22 *= (1-fcSq) + fcSq*(1 + pow(EA34,2))*Kfactor34; | |
6bb6954b | 4345 | return C22; |
be9ef9f9 | 4346 | }else return 1.0; |
4347 | ||
4348 | }else{// mixed charge case | |
4349 | if( ChargeSum==1 || ChargeSum==3){// ---+ and -+++ configuration | |
4350 | Float_t EA1=0, EA2=0, EA3=0, Kpair1=0, Kpair2=0, Kpair3=0, Kpair4=0, Kpair5=0, Kpair6=0; | |
4351 | Int_t c_OddOneOut = 1; | |
4352 | if(ChargeSum==3) c_OddOneOut = 0; | |
4353 | // | |
4354 | if(c[0]==c_OddOneOut) {EA1=EA23; EA2=EA24; EA3=EA34; Kpair1=Kfactor23; Kpair2=Kfactor24; Kpair3=Kfactor34; Kpair4=Kfactor12; Kpair5=Kfactor13; Kpair6=Kfactor14;} | |
4355 | else if(c[1]==c_OddOneOut) {EA1=EA13; EA2=EA14; EA3=EA34; Kpair1=Kfactor13; Kpair2=Kfactor14; Kpair3=Kfactor34; Kpair4=Kfactor12; Kpair5=Kfactor23; Kpair6=Kfactor24;} | |
4356 | else if(c[2]==c_OddOneOut) {EA1=EA12; EA2=EA14; EA3=EA24; Kpair1=Kfactor12; Kpair2=Kfactor14; Kpair3=Kfactor24; Kpair4=Kfactor13; Kpair5=Kfactor23; Kpair6=Kfactor34;} | |
4357 | else {EA1=EA12; EA2=EA13; EA3=EA23; Kpair1=Kfactor12; Kpair2=Kfactor13; Kpair3=Kfactor23; Kpair4=Kfactor14; Kpair5=Kfactor24; Kpair6=Kfactor34;} | |
4358 | ||
4359 | if(term==1){ | |
4360 | Float_t C3QS = 1 + pow(EA1,2) + pow(EA2,2) + pow(EA3,2) + 2*EA1*EA2*EA3; | |
4361 | Float_t C4 = pow(1-fc,4) + 4*fc*pow(1-fc,3); | |
4362 | C4 += pow(fc,2)*pow(1-fc,2)*( (1 + pow(EA1,2))*Kpair1 + (1 + pow(EA2,2))*Kpair2 + (1 + pow(EA3,2))*Kpair3 ); | |
4363 | C4 += pow(fc,2)*pow(1-fc,2)*( Kpair4 + Kpair5 + Kpair6 ); | |
4364 | C4 += pow(fc,3)*(1-fc)*(1 + pow(EA1,2) + pow(EA2,2) + pow(EA3,2) + 2*EA1*EA2*EA3) * Kpair1*Kpair2*Kpair3; | |
4365 | C4 += pow(fc,3)*(1-fc)*( (1 + pow(EA1,2))*Kpair1*Kpair4*Kpair5 + (1+pow(EA2,2))*Kpair2*Kpair4*Kpair6 + (1+pow(EA3,2))*Kpair3*Kpair5*Kpair6);// doesn't matter which MC K's | |
4366 | C4 += pow(fc,4)*C3QS*Kfactor12*Kfactor13*Kfactor14*Kfactor23*Kfactor24*Kfactor34; | |
4367 | return C4; | |
4368 | }else if( (term==2 && ChargeSum==1) || (term==5 && ChargeSum==3)){ | |
4369 | Float_t C3QS = 1 + pow(EA1,2) + pow(EA2,2) + pow(EA3,2) + 2*EA1*EA2*EA3; | |
4370 | Float_t C3 = pow(1-fc,3) + 3*fc*pow(1-fc,2); | |
4371 | C3 += pow(fc,2)*(1-fc)*(1+pow(EA1,2))*Kpair1; | |
4372 | C3 += pow(fc,2)*(1-fc)*(1+pow(EA2,2))*Kpair2; | |
4373 | C3 += pow(fc,2)*(1-fc)*(1+pow(EA3,2))*Kpair3; | |
4374 | C3 += pow(fc,3)*C3QS*Kpair1*Kpair2*Kpair3; | |
4375 | return C3; | |
4376 | }else if(term<=5){// one SC pair, two MC pairs | |
4377 | Float_t C3 = pow(1-fc,3) + 3*fc*pow(1-fc,2); | |
4378 | C3 += pow(fc,2)*(1-fc)*(1+pow(EA1,2))*Kpair1;// any SC pair will do | |
4379 | C3 += pow(fc,2)*(1-fc)*Kpair4;// any MC pair will do | |
4380 | C3 += pow(fc,2)*(1-fc)*Kpair5;// any MC pair will do | |
4381 | C3 += pow(fc,3)*(1+pow(EA1,2))*Kpair1*Kpair4*Kpair5; | |
4382 | return C3; | |
4383 | }else if(term==6 || term==7){ | |
4384 | if(ChargeSum==1) return ((1-fcSq) + fcSq*(1 + pow(EA1,2))*Kpair1);// any SC pair will do | |
4385 | else return ((1-fcSq) + fcSq*Kpair4);// any MC pair will do | |
4386 | }else if(term==8){ | |
4387 | return ((1-fcSq) + fcSq*Kpair4);// any MC pair will do | |
4388 | }else if(term==9){ | |
4389 | return ((1-fcSq) + fcSq*(1 + pow(EA1,2))*Kpair1);// any SC pair will do | |
6bb6954b | 4390 | }else if(term==10 || term==11){ |
be9ef9f9 | 4391 | if(ChargeSum==3) return ((1-fcSq) + fcSq*(1 + pow(EA1,2))*Kpair1);// any SC pair will do |
4392 | else return ((1-fcSq) + fcSq*Kpair4);// any MC pair will do | |
6bb6954b | 4393 | }else return 1.0;// for 12 and 13 |
be9ef9f9 | 4394 | }else{// --++ configuration |
4395 | Float_t EA1=0, EA2=0, Kpair1=0, Kpair2=0, Kpair3=0, Kpair4=0, Kpair5=0, Kpair6=0; | |
4396 | if(c[0]==c[1]) {EA1=EA12; EA2=EA34; Kpair1=Kfactor12; Kpair2=Kfactor34; Kpair3=Kfactor13; Kpair4=Kfactor14; Kpair5=Kfactor23; Kpair6=Kfactor24;} | |
4397 | else if(c[0]==c[2]) {EA1=EA13; EA2=EA24; Kpair1=Kfactor13; Kpair2=Kfactor24; Kpair3=Kfactor12; Kpair4=Kfactor14; Kpair5=Kfactor23; Kpair6=Kfactor34;} | |
4398 | else {EA1=EA14; EA2=EA23; Kpair1=Kfactor14; Kpair2=Kfactor23; Kpair3=Kfactor12; Kpair4=Kfactor13; Kpair5=Kfactor24; Kpair6=Kfactor34;} | |
4399 | // | |
4400 | if(term==1){ | |
4401 | Float_t C2QS = 1 + pow(EA1,2)*pow(EA2,2); | |
4402 | Float_t C4 = pow(1-fc,4) + 4*fc*pow(1-fc,3); | |
4403 | C4 += pow(fc,2)*pow(1-fc,2)*( (1 + pow(EA1,2))*Kpair1 + (1 + pow(EA2,2))*Kpair2 ); | |
4404 | C4 += pow(fc,2)*pow(1-fc,2)*( Kpair3 + Kpair4 + Kpair5 + Kpair6 ); | |
4405 | C4 += pow(fc,3)*(1-fc)*( (1 + pow(EA1,2))*Kpair1*Kpair3*Kpair4 + (1 + pow(EA2,2))*Kpair2*Kpair3*Kpair4); | |
4406 | C4 += pow(fc,3)*(1-fc)*( (1 + pow(EA1,2))*Kpair1*Kpair5*Kpair6 + (1 + pow(EA2,2))*Kpair2*Kpair5*Kpair6);// doesn't matter which two MC K's used | |
4407 | C4 += pow(fc,4)*C2QS*Kfactor12*Kfactor13*Kfactor14*Kfactor23*Kfactor24*Kfactor34; | |
4408 | return C4; | |
4409 | }else if(term<=5){ | |
4410 | Float_t C3 = pow(1-fc,3) + 3*fc*pow(1-fc,2); | |
4411 | C3 += pow(fc,2)*(1-fc)*(1+pow(EA1,2))*Kpair1;// any SC pair will do | |
4412 | C3 += pow(fc,2)*(1-fc)*Kpair4;// any MC pair will do | |
4413 | C3 += pow(fc,2)*(1-fc)*Kpair6;// any MC pair will do | |
4414 | C3 += pow(fc,3)*(1+pow(EA1,2))*Kpair1*Kpair4*Kpair6; | |
4415 | return C3; | |
4416 | }else if(term==6 || term==11){ | |
4417 | return ((1-fcSq) + fcSq*(1 + pow(EA1,2))*Kpair1);// any SC pair will do | |
fcb16ac9 | 4418 | }else if(term!=12 && term !=13){ |
be9ef9f9 | 4419 | return ((1-fcSq) + fcSq*Kpair3);// any MC pair will do |
fcb16ac9 | 4420 | }else if(term==12){ |
4421 | Float_t C22 = (1-fcSq) + fcSq*(1 + pow(EA1,2))*Kpair1; | |
4422 | C22 *= (1-fcSq) + fcSq*(1 + pow(EA2,2))*Kpair2; | |
4423 | return C22; | |
be9ef9f9 | 4424 | }else return 1.0; |
4425 | } | |
4426 | } | |
4427 | ||
4428 | } | |
4429 | //________________________________________________________________________ | |
4430 | Float_t AliFourPion::MCWeightFSI4(Int_t term, Float_t R, Float_t fcSq, Int_t c[4], Float_t qinv[6]){ | |
6bb6954b | 4431 | if(term==13) return 1.0; |
be9ef9f9 | 4432 | |
4433 | Int_t ChargeSum=c[0]+c[1]+c[2]+c[3]; | |
4434 | ||
4435 | Float_t fc = sqrt(fcSq); | |
4436 | SetFSIindex(R); | |
4437 | Float_t Kfactor12 = FSICorrelation(c[0],c[1], qinv[0]);// K2 | |
4438 | Float_t Kfactor13 = FSICorrelation(c[0],c[2], qinv[1]);// K2 | |
4439 | Float_t Kfactor14 = FSICorrelation(c[0],c[3], qinv[2]);// K2 | |
4440 | Float_t Kfactor23 = FSICorrelation(c[1],c[2], qinv[3]);// K2 | |
4441 | Float_t Kfactor24 = FSICorrelation(c[1],c[3], qinv[4]);// K2 | |
4442 | Float_t Kfactor34 = FSICorrelation(c[2],c[3], qinv[5]);// K2 | |
4443 | ||
4444 | if(c[0]==c[1] && c[0]==c[2] && c[0]==c[3]){// ---- and ++++ configuration | |
4445 | ||
4446 | if(term==1){ | |
4447 | Float_t C4 = pow(1-fc,4) + 4*fc*pow(1-fc,3); | |
4448 | C4 += pow(fc,2)*pow(1-fc,2)*( Kfactor12 + Kfactor13 + Kfactor14 ); | |
4449 | C4 += pow(fc,2)*pow(1-fc,2)*( Kfactor23 + Kfactor24 + Kfactor34 ); | |
4450 | C4 += pow(fc,3)*(1-fc) * Kfactor12*Kfactor13*Kfactor23; | |
4451 | C4 += pow(fc,3)*(1-fc) * Kfactor12*Kfactor14*Kfactor24; | |
4452 | C4 += pow(fc,3)*(1-fc) * Kfactor13*Kfactor14*Kfactor34; | |
4453 | C4 += pow(fc,3)*(1-fc) * Kfactor23*Kfactor24*Kfactor34; | |
4454 | C4 += pow(fc,4) * Kfactor12*Kfactor13*Kfactor14*Kfactor23*Kfactor24*Kfactor34; | |
4455 | return C4; | |
4456 | }else if(term<=5){ | |
4457 | Float_t Kpair1=0, Kpair2=0, Kpair3=0; | |
4458 | if(term==2) {Kpair1=Kfactor12; Kpair2=Kfactor13; Kpair3=Kfactor23;} | |
4459 | else if(term==3) {Kpair1=Kfactor12; Kpair2=Kfactor14; Kpair3=Kfactor24;} | |
4460 | else if(term==4) {Kpair1=Kfactor13; Kpair2=Kfactor14; Kpair3=Kfactor34;} | |
4461 | else {Kpair1=Kfactor23; Kpair2=Kfactor24; Kpair3=Kfactor34;} | |
4462 | Float_t C3 = pow(1-fc,3) + 3*fc*pow(1-fc,2); | |
4463 | C3 += pow(fc,2)*(1-fc)*( Kpair1 + Kpair2 + Kpair3 ); | |
4464 | C3 += pow(fc,3)*Kpair1*Kpair2*Kpair3; | |
4465 | return C3; | |
4466 | }else if(term<=11){ | |
4467 | if(term==6) return ((1-fcSq) + fcSq*Kfactor12); | |
4468 | else if(term==7) return ((1-fcSq) + fcSq*Kfactor13); | |
4469 | else if(term==8) return ((1-fcSq) + fcSq*Kfactor14); | |
4470 | else if(term==9) return ((1-fcSq) + fcSq*Kfactor23); | |
4471 | else if(term==10) return ((1-fcSq) + fcSq*Kfactor24); | |
4472 | else return ((1-fcSq) + fcSq*Kfactor34); | |
6bb6954b | 4473 | }else if(term==12){ |
5591748e | 4474 | Float_t C22 = (1-fcSq) + fcSq*Kfactor12; |
4475 | C22 *= (1-fcSq) + fcSq*Kfactor34; | |
6bb6954b | 4476 | return C22; |
be9ef9f9 | 4477 | }else return 1.0; |
4478 | ||
4479 | }else{// mixed charge case | |
4480 | if( ChargeSum==1 || ChargeSum==3){// ---+ and -+++ configuration | |
4481 | Float_t Kpair1=0, Kpair2=0, Kpair3=0, Kpair4=0, Kpair5=0, Kpair6=0; | |
4482 | Int_t c_OddOneOut = 1; | |
4483 | if(ChargeSum==3) c_OddOneOut = 0; | |
4484 | // | |
4485 | if(c[0]==c_OddOneOut) {Kpair1=Kfactor23; Kpair2=Kfactor24; Kpair3=Kfactor34; Kpair4=Kfactor12; Kpair5=Kfactor13; Kpair6=Kfactor14;} | |
4486 | else if(c[1]==c_OddOneOut) {Kpair1=Kfactor13; Kpair2=Kfactor14; Kpair3=Kfactor34; Kpair4=Kfactor12; Kpair5=Kfactor23; Kpair6=Kfactor24;} | |
4487 | else if(c[2]==c_OddOneOut) {Kpair1=Kfactor12; Kpair2=Kfactor14; Kpair3=Kfactor24; Kpair4=Kfactor13; Kpair5=Kfactor23; Kpair6=Kfactor34;} | |
4488 | else {Kpair1=Kfactor12; Kpair2=Kfactor13; Kpair3=Kfactor23; Kpair4=Kfactor14; Kpair5=Kfactor24; Kpair6=Kfactor34;} | |
4489 | ||
4490 | if(term==1){ | |
4491 | Float_t C4 = pow(1-fc,4) + 4*fc*pow(1-fc,3); | |
4492 | C4 += pow(fc,2)*pow(1-fc,2)*( Kpair1 + Kpair2 + Kpair3 ); | |
4493 | C4 += pow(fc,2)*pow(1-fc,2)*( Kpair4 + Kpair5 + Kpair6 ); | |
4494 | C4 += pow(fc,3)*(1-fc)*Kpair1*Kpair2*Kpair3; | |
4495 | C4 += pow(fc,3)*(1-fc)*(Kpair1*Kpair4*Kpair5 + Kpair2*Kpair4*Kpair6 + Kpair3*Kpair5*Kpair6);// doesn't matter which two MC K's used | |
4496 | C4 += pow(fc,4)*Kfactor12*Kfactor13*Kfactor14*Kfactor23*Kfactor24*Kfactor34; | |
4497 | return C4; | |
4498 | }else if( (term==2 && ChargeSum==1) || (term==5 && ChargeSum==3)){ | |
4499 | Float_t C3 = pow(1-fc,3) + 3*fc*pow(1-fc,2); | |
4500 | C3 += pow(fc,2)*(1-fc)*Kpair1; | |
4501 | C3 += pow(fc,2)*(1-fc)*Kpair2; | |
4502 | C3 += pow(fc,2)*(1-fc)*Kpair3; | |
4503 | C3 += pow(fc,3)*Kpair1*Kpair2*Kpair3; | |
4504 | return C3; | |
4505 | }else if(term<=5){// one SC pair, two MC pairs | |
4506 | Float_t C3 = pow(1-fc,3) + 3*fc*pow(1-fc,2); | |
4507 | C3 += pow(fc,2)*(1-fc)*Kpair1;// any SC pair will do | |
4508 | C3 += pow(fc,2)*(1-fc)*Kpair4;// any MC pair will do | |
4509 | C3 += pow(fc,2)*(1-fc)*Kpair5;// any MC pair will do | |
4510 | C3 += pow(fc,3)*Kpair1*Kpair4*Kpair5; | |
4511 | return C3; | |
4512 | }else if(term==6 || term==7){ | |
4513 | if(ChargeSum==1) return ((1-fcSq) + fcSq*Kpair1);// any SC pair will do | |
4514 | else return ((1-fcSq) + fcSq*Kpair4);// any MC pair will do | |
4515 | }else if(term==8){ | |
4516 | return ((1-fcSq) + fcSq*Kpair4);// any MC pair will do | |
4517 | }else if(term==9){ | |
4518 | return ((1-fcSq) + fcSq*Kpair1);// any SC pair will do | |
6bb6954b | 4519 | }else if(term==10 || term==11){ |
be9ef9f9 | 4520 | if(ChargeSum==3) return ((1-fcSq) + fcSq*Kpair1);// any SC pair will do |
4521 | else return ((1-fcSq) + fcSq*Kpair4);// any MC pair will do | |
6bb6954b | 4522 | }else return 1.0;// 12 and 13 |
be9ef9f9 | 4523 | }else{// --++ configuration |
4524 | Float_t Kpair1=0, Kpair2=0, Kpair3=0, Kpair4=0, Kpair5=0, Kpair6=0; | |
4525 | if(c[0]==c[1]) {Kpair1=Kfactor12; Kpair2=Kfactor34; Kpair3=Kfactor13; Kpair4=Kfactor14; Kpair5=Kfactor23; Kpair6=Kfactor24;} | |
4526 | else if(c[0]==c[2]) {Kpair1=Kfactor13; Kpair2=Kfactor24; Kpair3=Kfactor12; Kpair4=Kfactor14; Kpair5=Kfactor23; Kpair6=Kfactor34;} | |
4527 | else {Kpair1=Kfactor14; Kpair2=Kfactor23; Kpair3=Kfactor12; Kpair4=Kfactor13; Kpair5=Kfactor24; Kpair6=Kfactor34;} | |
4528 | // | |
4529 | if(term==1){ | |
4530 | Float_t C4 = pow(1-fc,4) + 4*fc*pow(1-fc,3); | |
4531 | C4 += pow(fc,2)*pow(1-fc,2)*( Kpair1 + Kpair2 + Kpair3 + Kpair4 + Kpair5 + Kpair6); | |
4532 | C4 += pow(fc,3)*(1-fc)*( Kpair1*Kpair3*Kpair4 + Kpair2*Kpair3*Kpair4 + Kpair1*Kpair5*Kpair6 + Kpair2*Kpair5*Kpair6); | |
4533 | C4 += pow(fc,4)*Kfactor12*Kfactor13*Kfactor14*Kfactor23*Kfactor24*Kfactor34; | |
4534 | return C4; | |
4535 | }else if(term<=5){ | |
4536 | Float_t C3 = pow(1-fc,3) + 3*fc*pow(1-fc,2); | |
4537 | C3 += pow(fc,2)*(1-fc)*Kpair1;// any SC pair will do | |
4538 | C3 += pow(fc,2)*(1-fc)*Kpair4;// any MC pair will do | |
4539 | C3 += pow(fc,2)*(1-fc)*Kpair6;// any MC pair will do | |
4540 | C3 += pow(fc,3)*Kpair1*Kpair4*Kpair6; | |
4541 | return C3; | |
4542 | }else if(term==6 || term==11){ | |
4543 | return ((1-fcSq) + fcSq*Kpair1);// any SC pair will do | |
6bb6954b | 4544 | }else if(term !=12 && term !=13){ |
be9ef9f9 | 4545 | return ((1-fcSq) + fcSq*Kpair3);// any MC pair will do |
fcb16ac9 | 4546 | }else if(term==12){ |
4547 | Float_t C22 = (1-fcSq) + fcSq*Kpair1; | |
4548 | C22 *= (1-fcSq) + fcSq*Kpair2; | |
4549 | return C22; | |
be9ef9f9 | 4550 | }else return 1.0; |
4551 | } | |
4552 | } | |
4553 | ||
4554 | } | |
4555 | //________________________________________________________________________ | |
80507acf | 4556 | void AliFourPion::SetMomResCorrections(Bool_t legoCase, TH2D *temp2DSC, TH2D *temp2DMC){ |
be9ef9f9 | 4557 | |
4558 | ||
4559 | if(legoCase){ | |
4560 | cout<<"LEGO call to SetMomResCorrections"<<endl; | |
80507acf | 4561 | fMomResC2SC = (TH2D*)temp2DSC->Clone(); |
4562 | fMomResC2SC->SetDirectory(0); | |
4563 | fMomResC2MC = (TH2D*)temp2DMC->Clone(); | |
4564 | fMomResC2MC->SetDirectory(0); | |
be9ef9f9 | 4565 | }else { |
4566 | TFile *momResFile = new TFile("MomResFile.root","READ"); | |
4567 | if(!momResFile->IsOpen()) { | |
4568 | cout<<"No momentum resolution file found"<<endl; | |
4569 | AliFatal("No momentum resolution file found. Kill process."); | |
4570 | }else {cout<<"Good Momentum Resolution File Found!"<<endl;} | |
4571 | ||
80507acf | 4572 | TH2D *temp2DSC2 = (TH2D*)momResFile->Get("MRC_C2_SC"); |
4573 | fMomResC2SC = (TH2D*)temp2DSC2->Clone(); | |
4574 | fMomResC2SC->SetDirectory(0); | |
4575 | // | |
4576 | TH2D *temp2DMC2 = (TH2D*)momResFile->Get("MRC_C2_MC"); | |
4577 | fMomResC2MC = (TH2D*)temp2DMC2->Clone(); | |
4578 | fMomResC2MC->SetDirectory(0); | |
4579 | // | |
be9ef9f9 | 4580 | momResFile->Close(); |
4581 | } | |
4582 | ||
4583 | ||
80507acf | 4584 | for(Int_t bx=1; bx<=fMomResC2SC->GetNbinsX(); bx++){ |
4585 | for(Int_t by=1; by<=fMomResC2SC->GetNbinsY(); by++){ | |
4586 | if(fMomResC2SC->GetBinContent(bx,by) > 1.5) fMomResC2SC->SetBinContent(bx,by, 1.0);// Maximum is ~1.02 | |
4587 | if(fMomResC2SC->GetBinContent(bx,by) < 0.8) fMomResC2SC->SetBinContent(bx,by, 1.0);// Minimum is ~0.8 | |
4588 | if(fMomResC2MC->GetBinContent(bx,by) > 1.5) fMomResC2MC->SetBinContent(bx,by, 1.0);// Maximum is ~1.02 | |
4589 | if(fMomResC2MC->GetBinContent(bx,by) < 0.8) fMomResC2MC->SetBinContent(bx,by, 1.0);// Minimum is ~0.8 | |
be9ef9f9 | 4590 | } |
4591 | } | |
80507acf | 4592 | |
be9ef9f9 | 4593 | cout<<"Done reading momentum resolution file"<<endl; |
4594 | } | |
4595 | //________________________________________________________________________ | |
52b6cc66 | 4596 | void AliFourPion::SetFSICorrelations(Bool_t legoCase, TH1D *tempss[13], TH1D *tempos[13]){ |
be9ef9f9 | 4597 | // read in 2-particle and 3-particle FSI correlations = K2 & K3 |
4598 | // 2-particle input histo from file is binned in qinv. 3-particle in qinv of each pair | |
4599 | if(legoCase){ | |
4600 | cout<<"LEGO call to SetFSICorrelations"<<endl; | |
52b6cc66 | 4601 | for(Int_t MB=0; MB<13; MB++) { |
be9ef9f9 | 4602 | fFSIss[MB] = (TH1D*)tempss[MB]->Clone(); |
4603 | fFSIos[MB] = (TH1D*)tempos[MB]->Clone(); | |
4604 | // | |
4605 | fFSIss[MB]->SetDirectory(0); | |
4606 | fFSIos[MB]->SetDirectory(0); | |
4607 | } | |
4608 | }else { | |
4609 | cout<<"non LEGO call to SetFSICorrelations"<<endl; | |
4610 | TFile *fsifile = new TFile("KFile.root","READ"); | |
4611 | if(!fsifile->IsOpen()) { | |
4612 | cout<<"No FSI file found"<<endl; | |
4613 | AliFatal("No FSI file found. Kill process."); | |
4614 | }else {cout<<"Good FSI File Found!"<<endl;} | |
4615 | ||
52b6cc66 | 4616 | TH1D *temphistoSS[13]; |
4617 | TH1D *temphistoOS[13]; | |
4618 | for(Int_t MB=0; MB<13; MB++) { | |
be9ef9f9 | 4619 | TString *nameK2SS = new TString("K2ss_"); |
4620 | *nameK2SS += MB; | |
4621 | temphistoSS[MB] = (TH1D*)fsifile->Get(nameK2SS->Data()); | |
4622 | // | |
4623 | TString *nameK2OS = new TString("K2os_"); | |
4624 | *nameK2OS += MB; | |
4625 | temphistoOS[MB] = (TH1D*)fsifile->Get(nameK2OS->Data()); | |
4626 | // | |
4627 | fFSIss[MB] = (TH1D*)temphistoSS[MB]->Clone(); | |
4628 | fFSIos[MB] = (TH1D*)temphistoOS[MB]->Clone(); | |
4629 | fFSIss[MB]->SetDirectory(0); | |
4630 | fFSIos[MB]->SetDirectory(0); | |
4631 | } | |
4632 | // | |
4633 | ||
4634 | fsifile->Close(); | |
4635 | } | |
4636 | ||
4637 | cout<<"Done reading FSI file"<<endl; | |
4638 | } | |
4639 | //________________________________________________________________________ | |
4640 | Float_t AliFourPion::FSICorrelation(Int_t charge1, Int_t charge2, Float_t qinv){ | |
4641 | // returns 2-particle Coulomb correlations = K2 | |
4642 | Int_t qbinL = fFSIss[fFSIindex]->GetXaxis()->FindBin(qinv-fFSIss[fFSIindex]->GetXaxis()->GetBinWidth(1)/2.); | |
4643 | Int_t qbinH = qbinL+1; | |
4644 | if(qbinL <= 0) return 1.0; | |
fcb16ac9 | 4645 | if(qbinH > fFSIss[fFSIindex]->GetNbinsX()) { |
4646 | if(charge1!=charge2) { | |
4647 | Float_t ScaleFac = (fFSIos[fFSIindex]->GetBinContent(fFSIos[fFSIindex]->GetNbinsX()-1) - 1); | |
4648 | ScaleFac /= (Gamov(charge1, charge2, fFSIos[fFSIindex]->GetXaxis()->GetBinCenter(fFSIos[fFSIindex]->GetNbinsX()-1)) - 1); | |
4649 | return ( (Gamov(charge1, charge2, qinv)-1)*ScaleFac + 1); | |
4650 | }else{ | |
4651 | Float_t ScaleFac = (fFSIss[fFSIindex]->GetBinContent(fFSIss[fFSIindex]->GetNbinsX()-1) - 1); | |
4652 | ScaleFac /= (Gamov(charge1, charge2, fFSIss[fFSIindex]->GetXaxis()->GetBinCenter(fFSIss[fFSIindex]->GetNbinsX()-1)) - 1); | |
4653 | return ( (Gamov(charge1, charge2, qinv)-1)*ScaleFac + 1); | |
4654 | } | |
4655 | } | |
be9ef9f9 | 4656 | |
4657 | Float_t slope=0; | |
4658 | if(charge1==charge2){ | |
4659 | slope = fFSIss[fFSIindex]->GetBinContent(qbinL) - fFSIss[fFSIindex]->GetBinContent(qbinH); | |
4660 | slope /= fFSIss[fFSIindex]->GetXaxis()->GetBinCenter(qbinL) - fFSIss[fFSIindex]->GetXaxis()->GetBinCenter(qbinH); | |
4661 | return (slope*(qinv - fFSIss[fFSIindex]->GetXaxis()->GetBinCenter(qbinL)) + fFSIss[fFSIindex]->GetBinContent(qbinL)); | |
4662 | }else { | |
4663 | slope = fFSIos[fFSIindex]->GetBinContent(qbinL) - fFSIos[fFSIindex]->GetBinContent(qbinH); | |
4664 | slope /= fFSIos[fFSIindex]->GetXaxis()->GetBinCenter(qbinL) - fFSIos[fFSIindex]->GetXaxis()->GetBinCenter(qbinH); | |
4665 | return (slope*(qinv - fFSIos[fFSIindex]->GetXaxis()->GetBinCenter(qbinL)) + fFSIos[fFSIindex]->GetBinContent(qbinL)); | |
4666 | } | |
4667 | } | |
4668 | //________________________________________________________________________ | |
4669 | void AliFourPion::SetFillBins2(Int_t c1, Int_t c2, Int_t &b1, Int_t &b2){ | |
4670 | if((c1+c2)==1) {b1=0; b2=1;}// Re-assign to merge degenerate histos | |
4671 | else {b1=c1; b2=c2;} | |
4672 | } | |
4673 | //________________________________________________________________________ | |
4674 | void AliFourPion::SetFillBins3(Int_t c1, Int_t c2, Int_t c3, Short_t part, Int_t &b1, Int_t &b2, Int_t &b3, Bool_t &fill2, Bool_t &fill3, Bool_t &fill4){ | |
4675 | ||
4676 | // "part" specifies which pair is from the same event. Only relevant for terms 2-4 | |
4677 | Bool_t seSS=kFALSE; | |
4678 | if(part==1) {// default case (irrelevant for term 1 and term 5) | |
4679 | if(c1==c2) seSS=kTRUE; | |
4680 | } | |
4681 | if(part==2){ | |
4682 | if(c1==c3) seSS=kTRUE; | |
4683 | } | |
4684 | ||
4685 | ||
4686 | // fill2, fill3, fill4 are only used for Cumulant Terms 2,3,4 | |
4687 | if( (c1+c2+c3)==1) { | |
4688 | b1=0; b2=0; b3=1;// Re-assign to merge degenerate histos | |
4689 | // | |
4690 | if(seSS) fill2=kTRUE; | |
4691 | else {fill3=kTRUE; fill4=kTRUE;} | |
4692 | // | |
4693 | }else if( (c1+c2+c3)==2) { | |
4694 | b1=0; b2=1; b3=1; | |
4695 | // | |
4696 | if(!seSS) {fill2=kTRUE; fill3=kTRUE;} | |
4697 | else fill4=kTRUE; | |
4698 | // | |
4699 | }else { | |
4700 | b1=c1; b2=c2; b3=c3; | |
4701 | fill2=kTRUE; fill3=kTRUE; fill4=kTRUE; | |
4702 | } | |
4703 | ||
4704 | } | |
4705 | //________________________________________________________________________ | |
6bb6954b | 4706 | void AliFourPion::SetFillBins4(Int_t c1, Int_t c2, Int_t c3, Int_t c4, Int_t &b1, Int_t &b2, Int_t &b3, Int_t &b4, Int_t ENsum, Bool_t fillTerm[13]){ |
be9ef9f9 | 4707 | |
4708 | // fill2, fill3, fill4 are only used for Cumulant Terms 2,3,4 | |
4709 | if( (c1+c2+c3+c4)==0 || (c1+c2+c3+c4)==4) {// all of the same charge: ---- or ++++ | |
4710 | ||
4711 | b1=c1; b2=c2; b3=c3; b4=c4; | |
4712 | if(ENsum==0) fillTerm[0]=kTRUE; | |
4713 | else if(ENsum==1) {fillTerm[1]=kTRUE; fillTerm[2]=kTRUE; fillTerm[3]=kTRUE; fillTerm[4]=kTRUE;} | |
6bb6954b | 4714 | else if(ENsum==2) {fillTerm[11]=kTRUE;} |
be9ef9f9 | 4715 | else if(ENsum==3) {fillTerm[5]=kTRUE; fillTerm[6]=kTRUE; fillTerm[7]=kTRUE; fillTerm[8]=kTRUE; fillTerm[9]=kTRUE; fillTerm[10]=kTRUE;} |
6bb6954b | 4716 | else fillTerm[12]=kTRUE; |
be9ef9f9 | 4717 | |
4718 | }else if( (c1+c2+c3+c4)==1) {// one positive charge: ---+ | |
4719 | ||
4720 | b1=0; b2=0; b3=0; b4=1;// Re-assign to merge degenerate histos | |
4721 | if(ENsum==0) fillTerm[0]=kTRUE; | |
4722 | else if(ENsum==1){ | |
4723 | if(c4==1) fillTerm[1]=kTRUE; | |
4724 | else {fillTerm[2]=kTRUE; fillTerm[3]=kTRUE; fillTerm[4]=kTRUE;} | |
6bb6954b | 4725 | }else if(ENsum==2){ |
4726 | fillTerm[11]=kTRUE; | |
be9ef9f9 | 4727 | }else if(ENsum==3){ |
4728 | if(c3==1 || c4==1) {fillTerm[5]=kTRUE; fillTerm[6]=kTRUE; fillTerm[8]=kTRUE;} | |
4729 | else {fillTerm[7]=kTRUE; fillTerm[9]=kTRUE; fillTerm[10]=kTRUE;} | |
6bb6954b | 4730 | }else fillTerm[12]=kTRUE; |
be9ef9f9 | 4731 | |
4732 | }else if( (c1+c2+c3+c4)==2) {// two positive charges: --++ | |
4733 | ||
4734 | b1=0; b2=0; b3=1; b4=1;// Re-assign to merge degenerate histos | |
4735 | if(ENsum==0) fillTerm[0]=kTRUE; | |
4736 | else if(ENsum==1){ | |
4737 | if(c4==1) {fillTerm[1]=kTRUE; fillTerm[2]=kTRUE;} | |
4738 | else {fillTerm[3]=kTRUE; fillTerm[4]=kTRUE;} | |
6bb6954b | 4739 | }else if(ENsum==2){ |
4740 | if( (c1+c2)==0) fillTerm[11]=kTRUE; | |
be9ef9f9 | 4741 | }else if(ENsum==3){ |
4742 | if( (c1+c2)==0) fillTerm[5]=kTRUE; | |
4743 | else if( (c1+c2)==1) {fillTerm[6]=kTRUE; fillTerm[7]=kTRUE; fillTerm[8]=kTRUE; fillTerm[9]=kTRUE;} | |
4744 | else fillTerm[10]=kTRUE; | |
6bb6954b | 4745 | }else fillTerm[12]=kTRUE; |
be9ef9f9 | 4746 | |
4747 | }else{// three positive charges | |
4748 | ||
4749 | b1=0; b2=1; b3=1; b4=1;// Re-assign to merge degenerate histos | |
4750 | if(ENsum==0) fillTerm[0]=kTRUE; | |
4751 | else if(ENsum==1){ | |
4752 | if(c4==0) fillTerm[4]=kTRUE; | |
4753 | else {fillTerm[1]=kTRUE; fillTerm[2]=kTRUE; fillTerm[3]=kTRUE;} | |
6bb6954b | 4754 | }else if(ENsum==2){ |
4755 | fillTerm[11]=kTRUE; | |
be9ef9f9 | 4756 | }else if(ENsum==3){ |
4757 | if(c3==0 || c4==0) {fillTerm[8]=kTRUE; fillTerm[9]=kTRUE; fillTerm[10]=kTRUE;} | |
4758 | else {fillTerm[5]=kTRUE; fillTerm[6]=kTRUE; fillTerm[7]=kTRUE;} | |
6bb6954b | 4759 | }else fillTerm[12]=kTRUE; |
be9ef9f9 | 4760 | |
4761 | } | |
4762 | ||
4763 | } | |
4764 | //________________________________________________________________________ | |
4765 | void AliFourPion::SetFSIindex(Float_t R){ | |
4766 | if(!fMCcase){ | |
ebd00f1b | 4767 | if(fCollisionType==0){ |
be9ef9f9 | 4768 | if(fMbin==0) fFSIindex = 0;//0-5% |
4769 | else if(fMbin==1) fFSIindex = 1;//5-10% | |
4770 | else if(fMbin<=3) fFSIindex = 2;//10-20% | |
4771 | else if(fMbin<=5) fFSIindex = 3;//20-30% | |
4772 | else if(fMbin<=7) fFSIindex = 4;//30-40% | |
4773 | else if(fMbin<=9) fFSIindex = 5;//40-50% | |
4774 | else if(fMbin<=12) fFSIindex = 6;//40-50% | |
4775 | else if(fMbin<=15) fFSIindex = 7;//40-50% | |
4776 | else if(fMbin<=18) fFSIindex = 8;//40-50% | |
4777 | else fFSIindex = 8;//90-100% | |
52b6cc66 | 4778 | }else fFSIindex = fFSIindexSmallSystem;// pPb and pp |
be9ef9f9 | 4779 | }else{// FSI binning for MC |
4780 | if(R>=10.) fFSIindex = 0; | |
4781 | else if(R>=9.) fFSIindex = 1; | |
4782 | else if(R>=8.) fFSIindex = 2; | |
4783 | else if(R>=7.) fFSIindex = 3; | |
4784 | else if(R>=6.) fFSIindex = 4; | |
4785 | else if(R>=5.) fFSIindex = 5; | |
4786 | else if(R>=4.) fFSIindex = 6; | |
4787 | else if(R>=3.) fFSIindex = 7; | |
4788 | else if(R>=2.) fFSIindex = 8; | |
4789 | else fFSIindex = 9; | |
4790 | } | |
4791 | } | |
5591748e | 4792 | //________________________________________________________________________ |
4793 | void AliFourPion::SetMuonCorrections(Bool_t legoCase, TH2D *tempMuon){ | |
4794 | if(legoCase){ | |
4795 | cout<<"LEGO call to SetMuonCorrections"<<endl; | |
4796 | fWeightmuonCorrection = (TH2D*)tempMuon->Clone(); | |
4797 | fWeightmuonCorrection->SetDirectory(0); | |
4798 | }else { | |
4799 | cout<<"non LEGO call to SetMuonCorrections"<<endl; | |
4800 | TFile *MuonFile=new TFile("MuonCorrection.root","READ"); | |
4801 | if(!MuonFile->IsOpen()) { | |
4802 | cout<<"No Muon file found"<<endl; | |
4803 | AliFatal("No Muon file found. Kill process."); | |
4804 | }else {cout<<"Good Muon File Found!"<<endl;} | |
4805 | ||
4806 | fWeightmuonCorrection = (TH2D*)MuonFile->Get("WeightmuonCorrection"); | |
4807 | fWeightmuonCorrection->SetDirectory(0); | |
4808 | // | |
4809 | MuonFile->Close(); | |
4810 | } | |
4811 | cout<<"Done reading Muon file"<<endl; | |
4812 | } | |
95567836 | 4813 | //________________________________________________________________________ |
70a43d86 | 4814 | void AliFourPion::Setc3FitEAs(Bool_t legoCase, TH3D *histoPbPb[2], TH3D *histopPb[2], TH3D *histopp[2]){ |
4815 | ||
55e482b6 | 4816 | if(legoCase){ |
4817 | cout<<"LEGO call to Setc3FitEAs"<<endl; | |
70a43d86 | 4818 | for(Int_t FT=0; FT<2; FT++){ |
4819 | fPbPbc3FitEA[FT] = (TH3D*)histoPbPb[FT]->Clone(); | |
4820 | fpPbc3FitEA[FT] = (TH3D*)histopPb[FT]->Clone(); | |
4821 | fppc3FitEA[FT] = (TH3D*)histopp[FT]->Clone(); | |
4822 | fPbPbc3FitEA[FT]->SetDirectory(0); | |
4823 | fpPbc3FitEA[FT]->SetDirectory(0); | |
4824 | fppc3FitEA[FT]->SetDirectory(0); | |
4825 | } | |
55e482b6 | 4826 | }else{ |
4827 | cout<<"non LEGO call to Setc3FitEAs"<<endl; | |
4828 | TFile *EAfile = new TFile("c3EAfile.root","READ"); | |
4829 | if(!EAfile->IsOpen()) { | |
4830 | cout<<"No EA file found"<<endl; | |
4831 | AliFatal("No EA file found. Kill process."); | |
4832 | }else {cout<<"Good EA File Found!"<<endl;} | |
70a43d86 | 4833 | for(Int_t FT=0; FT<2; FT++){ |
4834 | if(FT==0){ | |
4835 | fPbPbc3FitEA[FT] = (TH3D*)EAfile->Get("PbPbEA_c3"); | |
4836 | fpPbc3FitEA[FT] = (TH3D*)EAfile->Get("pPbEA_c3"); | |
4837 | fppc3FitEA[FT] = (TH3D*)EAfile->Get("ppEA_c3"); | |
4838 | }else{ | |
4839 | fPbPbc3FitEA[FT] = (TH3D*)EAfile->Get("PbPbEA_C3"); | |
4840 | fpPbc3FitEA[FT] = (TH3D*)EAfile->Get("pPbEA_C3"); | |
4841 | fppc3FitEA[FT] = (TH3D*)EAfile->Get("ppEA_C3"); | |
4842 | } | |
4843 | fPbPbc3FitEA[FT]->SetDirectory(0); | |
4844 | fpPbc3FitEA[FT]->SetDirectory(0); | |
4845 | fppc3FitEA[FT]->SetDirectory(0); | |
4846 | } | |
4847 | EAfile->Close(); | |
55e482b6 | 4848 | } |
4849 | cout<<"Done reading EA file"<<endl; | |
4850 | } | |
4851 | //________________________________________________________________________ | |
95567836 | 4852 | Float_t AliFourPion::cubicInterpolate (Float_t p[4], Float_t x) { |
4853 | return p[1] + 0.5 * x*(p[2] - p[0] + x*(2.0*p[0] - 5.0*p[1] + 4.0*p[2] - p[3] + x*(3.0*(p[1] - p[2]) + p[3] - p[0])));// Paulinternet | |
4854 | } | |
4855 | //________________________________________________________________________ | |
4856 | Float_t AliFourPion::nCubicInterpolate (Int_t n, Float_t* p, Float_t coordinates[]) { | |
4857 | ||
4858 | if (n == 1) { | |
4859 | return cubicInterpolate(p, *coordinates); | |
4860 | } | |
4861 | else { | |
4862 | Float_t arr[4]; | |
4863 | Int_t skip = 1 << (n - 1) * 2; | |
4864 | arr[0] = nCubicInterpolate(n - 1, p, coordinates + 1); | |
4865 | arr[1] = nCubicInterpolate(n - 1, p + skip, coordinates + 1); | |
4866 | arr[2] = nCubicInterpolate(n - 1, p + 2*skip, coordinates + 1); | |
4867 | arr[3] = nCubicInterpolate(n - 1, p + 3*skip, coordinates + 1); | |
4868 | return cubicInterpolate(arr, *coordinates); | |
4869 | } | |
4870 | } |