AliPhysics  fffcdf3 (fffcdf3)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskCMEV0.cxx
Go to the documentation of this file.
1 /*************************************************************************
2  * Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: The ALICE Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
7  * Permission to use, copy, modify and distribute this software and its *
8  * documentation strictly for non-commercial purposes is hereby granted *
9  * without fee, provided that the above copyright notice appears in all *
10  * copies and that both the copyright notice and this permission notice *
11  * appear in the supporting documentation. The authors make no claims *
12  * about the suitability of this software for any purpose. It is *
13  * provided "as is" without express or implied warranty. *
14  **************************************************************************/
15 
17 // CME correlator study using VO.
18 // Author: Rihan Haque (mhaque@cern.ch)
20 
21 
22 
23 #include <TGrid.h>
24 #include <TFile.h>
25 #include <TList.h>
26 #include "TMatrixDSym.h"
27 #include "Riostream.h"
28 #include "AliAnalysisManager.h"
29 #include "AliInputEventHandler.h"
30 #include "AliOADBContainer.h"
31 #include "AliMultSelection.h"
32 #include "AliMultiplicity.h"
33 #include "AliAnalysisUtils.h"
34 #include "AliVVertex.h"
35 #include "AliAODTrack.h"
36 #include "AliAODEvent.h"
37 #include "AliAODHeader.h"
38 #include "AliAODVertex.h"
39 #include "AliAODVZERO.h"
40 #include "AliAODZDC.h"
41 #include "AliFlowEvent.h"
42 #include "AliFlowEventSimple.h"
43 #include "AliAnalysisTaskCMEV0.h"
44 
45 using std::endl;
46 using std::cout;
47 
48 ClassImp(AliAnalysisTaskCMEV0)
49 
51  fEvent(NULL),
52  fMultSelection(NULL),
53  fAnalysisUtil(NULL),
54  fListHistos(NULL),
55  fListCalibs(NULL),
56  fListFBHijing(NULL),
57  fListNUACorr(NULL),
58  fListZDNCorr(NULL),
59  fRejectPileUp(kTRUE),
60  fRejectPileUpTight(kTRUE),
61  bFillAvgTPCQn(kFALSE),
62  bFillEtaPhiNUA(kFALSE),
63  bApplyNUACorr(kFALSE),
64  bApplyZDCCorr(kFALSE),
65  bApplyNUAforEP(kFALSE),
66  sDataSet("2015"),
67  sAnalysisSet("DoGainEq"),
68  sCentEstimator("V0"),
69  sFileNUA("NewR"),
70  fRunFlag(0),
71  fOldRunNum(0),
72  fievent(0),
73  EvtCent(0.0),
74  fHarmonicN(1),
75  fHarmonicM(1),
76  fHarmonicPsi(2),
77  fHist_Event_count(NULL),
78  fPileUpMultSelCount(NULL),
79  fPileUpCount(NULL),
80  fTaskConfigParm(NULL),
81  fMultV0(NULL),
82  fQxnmV0A(NULL),
83  fQynmV0A(NULL),
84  fQxnsV0A(NULL),
85  fQynsV0A(NULL),
86  fQxnmV0C(NULL),
87  fQynmV0C(NULL),
88  fQxnsV0C(NULL),
89  fQynsV0C(NULL),
90  fHV0AEventPlaneVsCent(NULL),
91  fHV0CEventPlaneVsCent(NULL),
92  fHTPCEventPlaneVsCent(NULL),
93  fHEnergyZNCvsCent(NULL),
94  fHEnergyZNAvsCent(NULL),
95  fHEnergyZPCvsCent(NULL),
96  fHEnergyZPAvsCent(NULL),
97  fHEnergyZNCvsCentRun(NULL),
98  fHEnergyZNAvsCentRun(NULL),
99  fHEnergyZPCvsCentRun(NULL),
100  fHEnergyZPAvsCentRun(NULL),
101  fHEnergyZPCvsZPA(NULL),
102  fHEnergyZNCvsZNA(NULL),
103  hUnderOverBinNUApos(NULL),
104  hUnderOverBinNUAneg(NULL),
105  fHCentBinTrkRecenter(NULL),
106  fHCorrectZDNP(NULL),
107  fV0AQnxVsCentRun(NULL),
108  fV0AQnyVsCentRun(NULL),
109  fV0CQnxVsCentRun(NULL),
110  fV0CQnyVsCentRun(NULL),
111  fTPCQnxVsCentRun(NULL),
112  fTPCQnyVsCentRun(NULL),
113  mListNUAPos(NULL),
114  mListNUANeg(NULL),
115  fileNUApos(NULL),
116  fileNUAneg(NULL),
117  fAvgMultCentRun(NULL),
118  fAvgWgtMultCentRun(NULL),
119  fAvgPOIposCentRun(NULL),
120  fAvgPOInegCentRun(NULL),
121  fAvgPOIPPCentRun(NULL),
122  fAvgPOINNCentRun(NULL),
123  fAvgPOIOSCentRun(NULL),
124  fV0MultChVsRun(NULL),
125  fEventStatvsRun(NULL),
126  fEtaBinFinderForQA(NULL),
127  fVzBinFinderForNUA(NULL)
128 {
129  for(int i=0;i<4;i++){
130  fHCorrectNUApos[i] = NULL;
131  fHCorrectNUAneg[i] = NULL;
132  }
133  for(int i=0;i<90;i++){
134  runNums[i] = 0;
135  for(int j=0;j<4;j++){
136  fHist3DEtaPhiVz_Pos_Run[j][i] = NULL;
137  fHist3DEtaPhiVz_Neg_Run[j][i] = NULL;
138  }
139  }
140  for(int i=0;i<10;i++){
141  fFB_Efficiency_Cent[i] = NULL;
142  }
143  for(int i=0;i<2;i++){
144  for(int j=0;j<3;j++){
145  fHist_Corr3p_SP_Norm_PN[i][j] = NULL;
146  fHist_Corr3p_SP_Norm_PP[i][j] = NULL;
147  fHist_Corr3p_SP_Norm_NN[i][j] = NULL;
148  fHist_Reso2n_SP_Norm_Det[i][j] = NULL;
149  }
150  }
151  for(int i=0;i<2;i++){
152  for(int j=0;j<3;j++){
153  fHist_Corr3p_EP_Norm_PN[i][j] = NULL;
154  fHist_Corr3p_EP_Norm_PP[i][j] = NULL;
155  fHist_Corr3p_EP_Norm_NN[i][j] = NULL;
156  fHist_Reso2n_EP_Norm_Det[i][j] = NULL;
157  }
158  }
159  for(int i=0;i<2;i++){
160  fHist_Corr3p_vsRun_EP_PN[i] = NULL;
161  fHist_Corr3p_vsRun_EP_PP[i] = NULL;
162  fHist_Corr3p_vsRun_EP_NN[i] = NULL;
163  }
164  for(int i=0;i<3;i++){
165  fHist_Corr3p_ZDN_SP_PN[i] = NULL;
166  fHist_Corr3p_ZDN_SP_PP[i] = NULL;
167  fHist_Corr3p_ZDN_SP_NN[i] = NULL;
168  fHist_Reso2n_ZDN_SP_Det[i] = NULL;
169  }
170  for(int i=0;i<2;i++){
171  for(int j=0;j<6;j++){
172  fHist_Corr3p_pTSum_EP_V0A_PN[i][j] = NULL;
173  fHist_Corr3p_pTSum_EP_V0A_PP[i][j] = NULL;
174  fHist_Corr3p_pTSum_EP_V0A_NN[i][j] = NULL;
175  fHist_Corr3p_pTSum_EP_V0C_PN[i][j] = NULL;
176  fHist_Corr3p_pTSum_EP_V0C_PP[i][j] = NULL;
177  fHist_Corr3p_pTSum_EP_V0C_NN[i][j] = NULL;
178 
179  fHist_Corr3p_pTDiff_EP_V0A_PN[i][j] = NULL;
180  fHist_Corr3p_pTDiff_EP_V0A_PP[i][j] = NULL;
181  fHist_Corr3p_pTDiff_EP_V0A_NN[i][j] = NULL;
182  fHist_Corr3p_pTDiff_EP_V0C_PN[i][j] = NULL;
183  fHist_Corr3p_pTDiff_EP_V0C_PP[i][j] = NULL;
184  fHist_Corr3p_pTDiff_EP_V0C_NN[i][j] = NULL;
185 
186  fHist_Corr3p_EtaDiff_EP_V0A_PN[i][j] = NULL;
187  fHist_Corr3p_EtaDiff_EP_V0A_PP[i][j] = NULL;
188  fHist_Corr3p_EtaDiff_EP_V0A_NN[i][j] = NULL;
189  fHist_Corr3p_EtaDiff_EP_V0C_PN[i][j] = NULL;
190  fHist_Corr3p_EtaDiff_EP_V0C_PP[i][j] = NULL;
191  fHist_Corr3p_EtaDiff_EP_V0C_NN[i][j] = NULL;
192  }
193  }
194  for(int i=0;i<10;i++){
195  fHistChPosvsEtaPtRun[i] = NULL;
196  fHistChNegvsEtaPtRun[i] = NULL;
197  }
198  for(int i=0;i<2;i++){
199  fHist_Corr3p_QAEta_SP_V0A_PN[i] = NULL;
200  fHist_Corr3p_QAEta_SP_V0A_PP[i] = NULL;
201  fHist_Corr3p_QAEta_SP_V0A_NN[i] = NULL;
202  }
203  for(int i=0;i<2;i++){
204  fHist_Corr3p_QAEta_SP_V0C_PN[i] = NULL;
205  fHist_Corr3p_QAEta_SP_V0C_PP[i] = NULL;
206  fHist_Corr3p_QAEta_SP_V0C_NN[i] = NULL;
207  }
208  for(int i=0;i<4;i++){
209  fHCos1nPosChEtaVz[i] = NULL;
210  fHCos2nPosChEtaVz[i] = NULL;
211  fHCos3nPosChEtaVz[i] = NULL;
212  fHCos4nPosChEtaVz[i] = NULL;
213  fHSin1nPosChEtaVz[i] = NULL;
214  fHSin2nPosChEtaVz[i] = NULL;
215  fHSin3nPosChEtaVz[i] = NULL;
216  fHSin4nPosChEtaVz[i] = NULL;
217 
218  fHCos1nNegChEtaVz[i] = NULL;
219  fHCos2nNegChEtaVz[i] = NULL;
220  fHCos3nNegChEtaVz[i] = NULL;
221  fHCos4nNegChEtaVz[i] = NULL;
222  fHSin1nNegChEtaVz[i] = NULL;
223  fHSin2nNegChEtaVz[i] = NULL;
224  fHSin3nNegChEtaVz[i] = NULL;
225  fHSin4nNegChEtaVz[i] = NULL;
226 
227  fHCos2nDWPosChEtaVz[i] = NULL;
228  fHSin2nDWPosChEtaVz[i] = NULL;
229  fHCos2nDWNegChEtaVz[i] = NULL;
230  fHSin2nDWNegChEtaVz[i] = NULL;
231  }
232  for(int i=0;i<2;i++){
233  fHist_NonIso_SP_PP_Mag0[i] = NULL;
234  fHist_NonIso_SP_NN_Mag0[i] = NULL;
235  fHist_NonIso_SP_PP_Mag1[i] = NULL;
236  fHist_NonIso_SP_NN_Mag1[i] = NULL;
237  }
238  for(int i=0;i<2;i++){
239  fHist_Corr2p_EP_Norm_PN[i] = NULL;
240  fHist_Corr2p_EP_Norm_PP[i] = NULL;
241  fHist_Corr2p_EP_Norm_NN[i] = NULL;
242  }
243 
244  DefineInput(1, AliFlowEventSimple::Class()); // Input slot #1: AliFlowEventSimple
245 
246  DefineOutput(1,TList::Class());
247  DefineOutput(2,TList::Class());
248 }//-------- real ---------
249 
251  fEvent(NULL),
252  fMultSelection(NULL),
253  fAnalysisUtil(NULL),
254  fListHistos(NULL),
255  fListCalibs(NULL),
256  fListFBHijing(NULL),
257  fListNUACorr(NULL),
258  fListZDNCorr(NULL),
259  fRejectPileUp(kTRUE),
260  fRejectPileUpTight(kTRUE),
261  bFillAvgTPCQn(kFALSE),
262  bFillEtaPhiNUA(kFALSE),
263  bApplyNUACorr(kFALSE),
264  bApplyZDCCorr(kFALSE),
265  bApplyNUAforEP(kFALSE),
266  sDataSet("2015"),
267  sAnalysisSet("DoGainEq"),
268  sCentEstimator("V0"),
269  sFileNUA("NewR"),
270  fRunFlag(0),
271  fOldRunNum(0),
272  fievent(0),
273  EvtCent(0.0),
274  fHarmonicN(1),
275  fHarmonicM(1),
276  fHarmonicPsi(2),
277  fHist_Event_count(NULL),
278  fPileUpMultSelCount(NULL),
279  fPileUpCount(NULL),
280  fTaskConfigParm(NULL),
281  fMultV0(NULL),
282  fQxnmV0A(NULL),
283  fQynmV0A(NULL),
284  fQxnsV0A(NULL),
285  fQynsV0A(NULL),
286  fQxnmV0C(NULL),
287  fQynmV0C(NULL),
288  fQxnsV0C(NULL),
289  fQynsV0C(NULL),
290  fHV0AEventPlaneVsCent(NULL),
291  fHV0CEventPlaneVsCent(NULL),
292  fHTPCEventPlaneVsCent(NULL),
293  fHEnergyZNCvsCent(NULL),
294  fHEnergyZNAvsCent(NULL),
295  fHEnergyZPCvsCent(NULL),
296  fHEnergyZPAvsCent(NULL),
297  fHEnergyZNCvsCentRun(NULL),
298  fHEnergyZNAvsCentRun(NULL),
299  fHEnergyZPCvsCentRun(NULL),
300  fHEnergyZPAvsCentRun(NULL),
301  fHEnergyZPCvsZPA(NULL),
302  fHEnergyZNCvsZNA(NULL),
303  hUnderOverBinNUApos(NULL),
304  hUnderOverBinNUAneg(NULL),
305  fHCentBinTrkRecenter(NULL),
306  fHCorrectZDNP(NULL),
307  fV0AQnxVsCentRun(NULL),
308  fV0AQnyVsCentRun(NULL),
309  fV0CQnxVsCentRun(NULL),
310  fV0CQnyVsCentRun(NULL),
311  fTPCQnxVsCentRun(NULL),
312  fTPCQnyVsCentRun(NULL),
313  mListNUAPos(NULL),
314  mListNUANeg(NULL),
315  fileNUApos(NULL),
316  fileNUAneg(NULL),
317  fAvgMultCentRun(NULL),
318  fAvgWgtMultCentRun(NULL),
319  fAvgPOIposCentRun(NULL),
320  fAvgPOInegCentRun(NULL),
321  fAvgPOIPPCentRun(NULL),
322  fAvgPOINNCentRun(NULL),
323  fAvgPOIOSCentRun(NULL),
324  fV0MultChVsRun(NULL),
325  fEventStatvsRun(NULL),
326  fEtaBinFinderForQA(NULL),
327  fVzBinFinderForNUA(NULL)
328 {
329  for(int i=0;i<4;i++){
330  fHCorrectNUApos[i] = NULL;
331  fHCorrectNUAneg[i] = NULL;
332  }
333  for(int i=0;i<90;i++){
334  runNums[i] = 0;
335  for(int j=0;j<4;j++){
336  fHist3DEtaPhiVz_Pos_Run[j][i] = NULL;
337  fHist3DEtaPhiVz_Neg_Run[j][i] = NULL;
338  }
339  }
340  for(int i=0;i<10;i++){
341  fFB_Efficiency_Cent[i] = NULL;
342  }
343  for(int i=0;i<2;i++){
344  for(int j=0;j<3;j++){
345  fHist_Corr3p_SP_Norm_PN[i][j] = NULL;
346  fHist_Corr3p_SP_Norm_PP[i][j] = NULL;
347  fHist_Corr3p_SP_Norm_NN[i][j] = NULL;
348  fHist_Reso2n_SP_Norm_Det[i][j] = NULL;
349  }
350  }
351  for(int i=0;i<2;i++){
352  for(int j=0;j<3;j++){
353  fHist_Corr3p_EP_Norm_PN[i][j] = NULL;
354  fHist_Corr3p_EP_Norm_PP[i][j] = NULL;
355  fHist_Corr3p_EP_Norm_NN[i][j] = NULL;
356  fHist_Reso2n_EP_Norm_Det[i][j] = NULL;
357  }
358  }
359  for(int i=0;i<2;i++){
360  fHist_Corr3p_vsRun_EP_PN[i] = NULL;
361  fHist_Corr3p_vsRun_EP_PP[i] = NULL;
362  fHist_Corr3p_vsRun_EP_NN[i] = NULL;
363  }
364  for(int i=0;i<3;i++){
365  fHist_Corr3p_ZDN_SP_PN[i] = NULL;
366  fHist_Corr3p_ZDN_SP_PP[i] = NULL;
367  fHist_Corr3p_ZDN_SP_NN[i] = NULL;
368  fHist_Reso2n_ZDN_SP_Det[i] = NULL;
369  }
370  for(int i=0;i<2;i++){
371  for(int j=0;j<6;j++){
372  fHist_Corr3p_pTSum_EP_V0A_PN[i][j] = NULL;
373  fHist_Corr3p_pTSum_EP_V0A_PP[i][j] = NULL;
374  fHist_Corr3p_pTSum_EP_V0A_NN[i][j] = NULL;
375  fHist_Corr3p_pTSum_EP_V0C_PN[i][j] = NULL;
376  fHist_Corr3p_pTSum_EP_V0C_PP[i][j] = NULL;
377  fHist_Corr3p_pTSum_EP_V0C_NN[i][j] = NULL;
378 
379  fHist_Corr3p_pTDiff_EP_V0A_PN[i][j] = NULL;
380  fHist_Corr3p_pTDiff_EP_V0A_PP[i][j] = NULL;
381  fHist_Corr3p_pTDiff_EP_V0A_NN[i][j] = NULL;
382  fHist_Corr3p_pTDiff_EP_V0C_PN[i][j] = NULL;
383  fHist_Corr3p_pTDiff_EP_V0C_PP[i][j] = NULL;
384  fHist_Corr3p_pTDiff_EP_V0C_NN[i][j] = NULL;
385 
386  fHist_Corr3p_EtaDiff_EP_V0A_PN[i][j] = NULL;
387  fHist_Corr3p_EtaDiff_EP_V0A_PP[i][j] = NULL;
388  fHist_Corr3p_EtaDiff_EP_V0A_NN[i][j] = NULL;
389  fHist_Corr3p_EtaDiff_EP_V0C_PN[i][j] = NULL;
390  fHist_Corr3p_EtaDiff_EP_V0C_PP[i][j] = NULL;
391  fHist_Corr3p_EtaDiff_EP_V0C_NN[i][j] = NULL;
392  }
393  }
394  for(int i=0;i<10;i++){
395  fHistChPosvsEtaPtRun[i] = NULL;
396  fHistChNegvsEtaPtRun[i] = NULL;
397  }
398  for(int i=0;i<2;i++){
402  }
403  for(int i=0;i<2;i++){
407  }
408  for(int i=0;i<4;i++){
409  fHCos1nPosChEtaVz[i] = NULL;
410  fHCos2nPosChEtaVz[i] = NULL;
411  fHCos3nPosChEtaVz[i] = NULL;
412  fHCos4nPosChEtaVz[i] = NULL;
413  fHSin1nPosChEtaVz[i] = NULL;
414  fHSin2nPosChEtaVz[i] = NULL;
415  fHSin3nPosChEtaVz[i] = NULL;
416  fHSin4nPosChEtaVz[i] = NULL;
417 
418  fHCos1nNegChEtaVz[i] = NULL;
419  fHCos2nNegChEtaVz[i] = NULL;
420  fHCos3nNegChEtaVz[i] = NULL;
421  fHCos4nNegChEtaVz[i] = NULL;
422  fHSin1nNegChEtaVz[i] = NULL;
423  fHSin2nNegChEtaVz[i] = NULL;
424  fHSin3nNegChEtaVz[i] = NULL;
425  fHSin4nNegChEtaVz[i] = NULL;
426 
427  fHCos2nDWPosChEtaVz[i] = NULL;
428  fHSin2nDWPosChEtaVz[i] = NULL;
429  fHCos2nDWNegChEtaVz[i] = NULL;
430  fHSin2nDWNegChEtaVz[i] = NULL;
431  }
432  for(int i=0;i<2;i++){
433  fHist_NonIso_SP_PP_Mag0[i] = NULL;
434  fHist_NonIso_SP_NN_Mag0[i] = NULL;
435  fHist_NonIso_SP_PP_Mag1[i] = NULL;
436  fHist_NonIso_SP_NN_Mag1[i] = NULL;
437  }
438  for(int i=0;i<2;i++){
439  fHist_Corr2p_EP_Norm_PN[i] = NULL;
440  fHist_Corr2p_EP_Norm_PP[i] = NULL;
441  fHist_Corr2p_EP_Norm_NN[i] = NULL;
442  }
443 
444 }//-----------
445 
446 
447 
448 
450 {
452 
453  fAnalysisUtil = new AliAnalysisUtils();
454  fAnalysisUtil->SetUseMVPlpSelection(kTRUE);
455  fAnalysisUtil->SetUseOutOfBunchPileUp(kTRUE);
456 
457 
458  if(fListFBHijing) {
459  for(int i=0;i<10;i++) {
460  fFB_Efficiency_Cent[i] = (TH1D *) fListFBHijing->FindObject(Form("eff_unbiased_%d",i));
461  }
462  }
463  else{ // if MC efficiency not found then use weight = 1.
464  printf("\n\n!!***** Warning *****!!\n FilterBit efficiency not found, use = 1.0 !!\n\n");
465  for(int i=0;i<10;i++){
466  fFB_Efficiency_Cent[i] = new TH1D(Form("eff_unbiased_%d",i),"",1000,0,50.);
467  for(int j=1;j<=fFB_Efficiency_Cent[i]->GetNbinsX();j++){
468  fFB_Efficiency_Cent[i]->SetBinContent(j,1.000);
469  }
470  }
471  }
472 
473 
474 
475  fListHistos = new TList();
476  fListHistos->SetOwner(kTRUE);
477 
478  fListCalibs = new TList();
479  fListCalibs->SetOwner(kTRUE);
480 
481  this->DefineHistograms();
482 
483 
484  fTaskConfigParm->Fill(14.5,fHarmonicN);
485  fTaskConfigParm->Fill(15.5,fHarmonicM);
486  fTaskConfigParm->Fill(16.5,fHarmonicPsi);
487 
488 
489  PostData(1,fListHistos);
490  PostData(2,fListCalibs);
491 
492 }
493 
495 {
496  delete fListHistos;
497  delete fListCalibs;
498 
499  delete fMultSelection;
500  delete fAnalysisUtil; // it is '= new' !!!
501 
502  delete fHCentBinTrkRecenter;
503 
504  for(int i=0;i<4;i++){
505  if(fHCorrectNUApos[i]) delete fHCorrectNUApos[i];
506  if(fHCorrectNUAneg[i]) delete fHCorrectNUAneg[i];
507  }
508 }
509 
510 
511 
512 
513 
514 
515 
517 {
518  Float_t stepCount = 0.5;
519  fHist_Event_count->Fill(stepCount); //1
520  stepCount++;
521 
522  AliAODEvent *aod = dynamic_cast<AliAODEvent*>(InputEvent());
523  fEvent = dynamic_cast<AliFlowEventSimple*>(GetInputData(1));
524 
525  if(!aod || !fEvent){
526  printf("\n ... ::UserExec = no AOD or Flow Event, \n.... EXIT ..... \n");
527  return;
528  }
529 
530  fHist_Event_count->Fill(stepCount); //2
531  stepCount++;
532 
533 
534 
535  //---------pileup rejection: --------
536 
537  Bool_t kPileupEvent = kFALSE;
538 
539  kPileupEvent = CheckEventIsPileUp(aod);
540 
541  if(kPileupEvent) return;
542 
543  fHist_Event_count->Fill(stepCount); //3
544  stepCount++;
545 
546 
547 
548  Double_t centrV0M = -1;
549  Double_t centrCL1 = -1;
550  Double_t centrCL0 = -1;
551  Double_t centrTRK = -1;
552  EvtCent = -1;
553 
554  if(sDataSet=="2010"||sDataSet=="2011"){
555  centrV0M = ((AliVAODHeader*)aod->GetHeader())->GetCentralityP()->GetCentralityPercentile("V0M");
556  centrCL1 = ((AliVAODHeader*)aod->GetHeader())->GetCentralityP()->GetCentralityPercentile("CL1");
557  centrCL0 = ((AliVAODHeader*)aod->GetHeader())->GetCentralityP()->GetCentralityPercentile("CL0");
558  centrTRK = ((AliVAODHeader*)aod->GetHeader())->GetCentralityP()->GetCentralityPercentile("TRK");
559  }
560  else{
561  fMultSelection = (AliMultSelection*) InputEvent()->FindListObject("MultSelection");
562  if(!fMultSelection) {
563  printf("\n\n **WARNING** ::UserExec() AliMultSelection object not found.\n\n");
564  exit(1);
565  }
566  centrV0M = fMultSelection->GetMultiplicityPercentile("V0M");
567  centrCL1 = fMultSelection->GetMultiplicityPercentile("CL1");
568  centrCL0 = fMultSelection->GetMultiplicityPercentile("CL0");
569  centrTRK = fMultSelection->GetMultiplicityPercentile("TRK");
570  }
571 
572 
573 
574  if(sCentEstimator=="V0" || sCentEstimator=="V0M"){
575  EvtCent = centrV0M;
576  }
577  else{
578  EvtCent = centrCL1;
579  }
580 
581 
582  Int_t iCentSPD = centrCL1;
583 
584  if(iCentSPD >= 90) return;
585 
586  fHist_Event_count->Fill(stepCount); //4
587  stepCount++;
588 
589 
590 
591 
592  Int_t cIndex = 0;
593  Int_t cForNUA = 0;
594 
595  if(EvtCent<5.0) {
596  cIndex = 0;
597  cForNUA = 0; //0=0-5,
598  }
599  else if(EvtCent>=5.0 && EvtCent<10){
600  cIndex = 1;
601  cForNUA = 1; // 1=5-10,
602  }
603  else if(EvtCent>=10.0) {
604  cIndex = abs(EvtCent/10.0) + 1;
605  if(EvtCent<40.0)
606  cForNUA = 2; // 2=10-40,
607  else if(EvtCent>=40.0)
608  cForNUA = 3; // 3=40-90
609  }
610 
611 
612  //------- load v0 calib file of Alex --------
613  Int_t runindex = -111;
614  Int_t runNumber = aod->GetRunNumber();
615  Float_t psiN = fHarmonicPsi;
616  runindex = GetCurrentRunIndex(runNumber);
617 
618  if(runNumber!=fOldRunNum){
619 
620  if(sDataSet=="2015" || sDataSet=="2015PbPb")
621  OpenInfoCalbration(runNumber, psiN);
622  if(bApplyNUACorr){
623  GetNUACorrectionHist(runNumber,sFileNUA);
624  }
625  if(bApplyZDCCorr && sDataSet=="2015"){
626  GetZDCCorrectionHist(runNumber);
627  }
628  fOldRunNum = runNumber;
629  }
630 
631 
632 
633  Double_t fMagField = aod->GetMagneticField();
634  Int_t QAindex = -1;
635 
636  if(fMagField<0)
637  QAindex = 0;
638  else if(fMagField>0)
639  QAindex = 1;
640 
641 //-------- V0 info ---------------
642  const AliAODVZERO *fAODV0 = aod->GetVZEROData();
643 
644 
645  Double_t QyanCor = 0., QycnCor = 0.;
646  Double_t QxanCor = 0., QxcnCor = 0.;
647  Double_t Qxan = 0., Qyan = 0.;
648  Double_t Qxcn = 0., Qycn = 0.;
649  Double_t sumMa = 0., sumMc = 0.;
650  Double_t fMultv0 = 0.;
651  Double_t phiV0 = 0.;
652 
653 
654  if(sDataSet=="2015" || sDataSet=="2015PbPb") {
655  GetV0QvectAndMult(fAODV0, psiN, Qxan, Qyan, sumMa, Qxcn, Qycn, sumMc);
656 
657  QyanCor = (Qyan - fQynmV0A->GetBinContent(iCentSPD+1))/fQynsV0A->GetBinContent(iCentSPD+1);
658  QycnCor = (Qycn - fQynmV0C->GetBinContent(iCentSPD+1))/fQynsV0C->GetBinContent(iCentSPD+1);
659 
660  QxanCor = Qxan;
661  QxcnCor = Qxcn;
662 
663  if(psiN != 4.){
664  QxanCor = (Qxan - fQxnmV0A->GetBinContent(iCentSPD+1))/fQxnsV0A->GetBinContent(iCentSPD+1);
665  QxcnCor = (Qxcn - fQxnmV0C->GetBinContent(iCentSPD+1))/fQxnsV0C->GetBinContent(iCentSPD+1);
666  }
667  }
668  else{
669 
670  for(int iV0 = 0; iV0 < 64; iV0++) { //0-31 is V0C, 32-63 VOA
671 
672  fMultv0 = fAODV0->GetMultiplicity(iV0);
673  fV0MultChVsRun->Fill(iV0+0.5,runindex,fMultv0);
674 
675  phiV0 = TMath::PiOver4()*(0.5 + iV0 % 8);
676 
677  if(iV0 < 32){
678  Qxcn += TMath::Cos(fHarmonicPsi*phiV0) * fMultv0;
679  Qycn += TMath::Sin(fHarmonicPsi*phiV0) * fMultv0;
680  sumMc += fMultv0;
681  }
682  else if(iV0 >= 32){
683  Qxan += TMath::Cos(fHarmonicPsi*phiV0) * fMultv0;
684  Qyan += TMath::Sin(fHarmonicPsi*phiV0) * fMultv0;
685  sumMa += fMultv0;
686  }
687  }
688  QxanCor = Qxan;
689  QxcnCor = Qxcn;
690  QyanCor = Qyan;
691  QycnCor = Qycn;
692  }
693 
694 
695 
696  if(sumMa < 0 || sumMc < 0) return;
697  fHist_Event_count->Fill(stepCount); //5
698  stepCount++;
699 
700 
701  AliAODVertex *pVertex = aod->GetPrimaryVertex();
702  Double_t VtxZ = pVertex->GetZ();
703 
704 
705 
706  //------------- Load ZDC info: -----------
707  Double_t energyZNC=0.,energyZNA=0.,energyZPC=0.,energyZPA=0.;
708 
709  energyZNC = ((AliVAODHeader*)aod->GetHeader())->GetZDCN1Energy();
710  energyZNA = ((AliVAODHeader*)aod->GetHeader())->GetZDCN2Energy();
711  energyZPC = ((AliVAODHeader*)aod->GetHeader())->GetZDCP1Energy();
712  energyZPA = ((AliVAODHeader*)aod->GetHeader())->GetZDCP2Energy();
713 
714 
715  //Apply Gain Correction:
717  energyZNC = energyZNC * fHCorrectZDNP->GetBinContent((abs(EvtCent)+1),1);
718  energyZNA = energyZNA * fHCorrectZDNP->GetBinContent((abs(EvtCent)+1),2);
719  energyZPC = energyZPC * fHCorrectZDNP->GetBinContent((abs(EvtCent)+1),3);
720  energyZPA = energyZPA * fHCorrectZDNP->GetBinContent((abs(EvtCent)+1),4);
721  }
722 
723 
724  fHEnergyZNCvsCent->Fill(EvtCent,energyZNC);
725  fHEnergyZNAvsCent->Fill(EvtCent,energyZNA);
726  fHEnergyZPCvsCent->Fill(EvtCent,energyZPC);
727  fHEnergyZPAvsCent->Fill(EvtCent,energyZPA);
728 
729  fHEnergyZNCvsCentRun->Fill(EvtCent,runindex,energyZNC);
730  fHEnergyZNAvsCentRun->Fill(EvtCent,runindex,energyZNA);
731  fHEnergyZPCvsCentRun->Fill(EvtCent,runindex,energyZPC);
732  fHEnergyZPAvsCentRun->Fill(EvtCent,runindex,energyZPA);
733 
734  if(EvtCent>30. && EvtCent<40.){
735  fHEnergyZPCvsZPA->Fill(energyZPC,energyZPA);
736  fHEnergyZNCvsZNA->Fill(energyZNC,energyZNA);
737  }
738 
739 
740 
741 
742 
743 
744  Int_t BadRuns[10] = {246871,246870,246867,246865,246864,246859,246858,246676,246675,246540};
745  Int_t iBadrun = 10;
746  Int_t isBadRun = 0;
747 
748  for(int ib=0;ib<iBadrun;ib++){
749  if(runNumber==BadRuns[ib]){
750  isBadRun = 1;
751  break;
752  }
753  }
754 
755 
756 
757 
758 
759  //Store Qvector for tracks:
760  Double_t QxPos[2] = {0.,}; //[0]=n*phi,[1]=2*n*phi
761  Double_t QyPos[2] = {0.,};
762  Double_t QxNeg[2] = {0.,};
763  Double_t QyNeg[2] = {0.,};
764 
765  //Store Qvector for Auto-correlations
766  Double_t QxAutoPos[2] = {0.,};
767  Double_t QyAutoPos[2] = {0.,};
768  Double_t QxAutoNeg[2] = {0.,};
769  Double_t QyAutoNeg[2] = {0.,};
770 
771 
772  //temp: for QA only
773  Double_t QxPosQAEta[16] = {0.,};
774  Double_t QyPosQAEta[16] = {0.,};
775  Double_t QxNegQAEta[16] = {0.,};
776  Double_t QyNegQAEta[16] = {0.,};
777  Double_t QxAutoPosQAEta[16] = {0.,};
778  Double_t QyAutoPosQAEta[16] = {0.,};
779  Double_t QxAutoNegQAEta[16] = {0.,};
780  Double_t QyAutoNegQAEta[16] = {0.,};
781  Double_t MPOIposQAEta[16] = {0.,};
782  Double_t MPOInegQAEta[16] = {0.,};
783  Int_t iEtaQA = -1;
784 
785  Double_t AvgCos1n=0.,AvgSin1n=0.;
786  //Double_t AvgCos2n=0.,AvgSin2n=0.;
787  Double_t AvgDWCos2n=0.,AvgDWSin2n=0.;
788 
789 
790 
791 
792 
793  //Multiplicity of POIs:
794  Double_t MPOIpos = 0;
795  Double_t MPOIneg = 0;
796  Double_t McorrPos = 0.;
797  Double_t McorrNeg = 0.;
798 
799  //TPC Event plane Qvectors:
800  Double_t QxTPC[2] = {0.,};
801  Double_t QyTPC[2] = {0.,};
802 
803  Int_t ptBin;
804  Int_t nRefMult = 0;
805  Int_t n = fHarmonicN;
806  Int_t m = fHarmonicM;
807  Int_t p = (fHarmonicN+fHarmonicM); // cos(nphi1 + mphi2 - p*Psi)
808 
809  Double_t nRefMultWgt = 0.;
810 
811 
812 
813 
814  //Int_t iCentRec = 0; //centrality bin for track recenter
815  //iCentRec = fHCentBinTrkRecenter->FindBin(EvtCent);
816 
817  //Int_t nBinVz=1,nBinPhi=1,nBinEta=1;
818 
819  //CME using Event plane:
820  Double_t pi = TMath::Pi();
821  Double_t Psi2V0C = 1./psiN*TMath::ATan2(QycnCor,QxcnCor);
822  if(Psi2V0C<0.) Psi2V0C += 2*pi/psiN;
823 
824  Double_t Psi2V0A = 1./psiN*TMath::ATan2(QyanCor,QxanCor);
825  if(Psi2V0A<0.) Psi2V0A += 2*pi/psiN;
826 
827  fV0AQnxVsCentRun->Fill(centrCL1,runindex,QycnCor); // For V0-Q Recenter QA.
828  fV0AQnyVsCentRun->Fill(centrCL1,runindex,QyanCor);
829  fV0CQnxVsCentRun->Fill(centrCL1,runindex,QxcnCor);
830  fV0CQnyVsCentRun->Fill(centrCL1,runindex,QycnCor);
831 
832 
833 
834  Int_t iBinNUA = 1;
835  Int_t iVzNUA = -1;
836  iVzNUA = fVzBinFinderForNUA->FindBin(VtxZ) - 1;
837 
838 
839 
840  Int_t iTracks = fEvent->NumberOfTracks();
841 
842  AliFlowTrackSimple* pTrack1 = NULL;
843  AliFlowTrackSimple* pTrack2 = NULL;
844 
845  Double_t dPhi1,dPt1,dEta1,dChrg1;
846  Double_t dPhi2,dPt2,dEta2,dChrg2;
847  Double_t WgtEP = 1.0;
848 
849  Double_t ptw1 = 1.0, w1NUA = 1.0;
850  Double_t ptw2 = 1.0;
851  Double_t w2NUA = 1.0;
852 
853  for(int i=0; i<iTracks; i++) {
854  pTrack1 = fEvent->GetTrack(i);
855  if(!pTrack1) continue;
856  dPhi1 = pTrack1->Phi(); //0-2pi range
857  dPt1 = pTrack1-> Pt();
858  dEta1 = pTrack1->Eta();
859  dChrg1 = pTrack1->Charge();
860 
861  if(!pTrack1->InPOISelection())
862  continue;
863 
864  if(bFillEtaPhiNUA){
865  if(dChrg1>0){
866  fHist3DEtaPhiVz_Pos_Run[cForNUA][runindex]->Fill(VtxZ,dPhi1,dEta1);
867  }
868  else if(dChrg1<0){
869  fHist3DEtaPhiVz_Neg_Run[cForNUA][runindex]->Fill(VtxZ,dPhi1,dEta1);
870  }
871  }
872  /*
873  if(bFillEtaPhiNUA){
874  if(dChrg1>0){
875  fHist3DEtaPhiVz_Pos_Run[iVzNUA][runindex]->Fill(dPt1,dPhi1,dEta1);
876  }
877  else if(dChrg1<0){
878  fHist3DEtaPhiVz_Neg_Run[iVzNUA][runindex]->Fill(dPt1,dPhi1,dEta1);
879  }
880  }*/
881 
882  if(bApplyNUACorr){
883  //get NUA weights:
884  if(sFileNUA=="OldJ"||sFileNUA=="NewR"){
885  if(dChrg1>0){
886  iBinNUA = fHCorrectNUApos[cForNUA]->FindBin(VtxZ,dPhi1,dEta1);
887  w1NUA = fHCorrectNUApos[cForNUA]->GetBinContent(iBinNUA);
888  }
889  else if(dChrg1<0){
890  iBinNUA = fHCorrectNUAneg[cForNUA]->FindBin(VtxZ,dPhi1,dEta1);
891  w1NUA = fHCorrectNUAneg[cForNUA]->GetBinContent(iBinNUA);
892  }
893  if(sFileNUA=="OldJ") w1NUA = 1./w1NUA;
894  }
895  else if(sFileNUA=="NewPt"||sFileNUA=="NewpT"){
896  if(dChrg1>0){
897  iBinNUA = fHCorrectNUApos[iVzNUA]->FindBin(dPt1,dPhi1,dEta1);
898  w1NUA = fHCorrectNUApos[iVzNUA]->GetBinContent(iBinNUA);
899  }
900  else if(dChrg1<0){
901  iBinNUA = fHCorrectNUAneg[iVzNUA]->FindBin(dPt1,dPhi1,dEta1);
902  w1NUA = fHCorrectNUAneg[iVzNUA]->GetBinContent(iBinNUA);
903  }
904  }
905  if(w1NUA > 1e3 ) w1NUA = 1.0;
906  }
907 
908 
909 
910  if(dChrg1>0){
911  fHistChPosvsEtaPtRun[cIndex]->Fill(dPt1,dEta1,runindex,w1NUA);
912  }
913  else if(dChrg1<0){
914  fHistChNegvsEtaPtRun[cIndex]->Fill(dPt1,dEta1,runindex,w1NUA);
915  }
916 
917 
918  ptBin = fFB_Efficiency_Cent[cIndex]->FindBin(dPt1);
919  ptw1 = 1.0/fFB_Efficiency_Cent[cIndex]->GetBinContent(ptBin);
920 
921 
922  /*
923  if(bFillAvgTPCQn) { //fill TPC Q-vect:
924  if(VtxZ>0 && dEta1>=0){
925  if(dChrg1>0){
926  fHCos1nPosChEtaVz[0]->Fill(EvtCent,runindex,ptw1*TMath::Cos(dPhi1));
927  fHSin1nPosChEtaVz[0]->Fill(EvtCent,runindex,ptw1*TMath::Sin(dPhi1));
928  fHCos2nPosChEtaVz[0]->Fill(EvtCent,runindex,ptw1*TMath::Cos(2.*dPhi1));
929  fHSin2nPosChEtaVz[0]->Fill(EvtCent,runindex,ptw1*TMath::Sin(2.*dPhi1));
930  fHCos3nPosChEtaVz[0]->Fill(EvtCent,runindex,ptw1*TMath::Cos(3.*dPhi1));
931  fHSin3nPosChEtaVz[0]->Fill(EvtCent,runindex,ptw1*TMath::Sin(3.*dPhi1));
932  fHCos4nPosChEtaVz[0]->Fill(EvtCent,runindex,ptw1*TMath::Cos(4.*dPhi1));
933  fHSin4nPosChEtaVz[0]->Fill(EvtCent,runindex,ptw1*TMath::Sin(4.*dPhi1));
934  fHCos2nDWPosChEtaVz[0]->Fill(EvtCent,runindex,ptw1*ptw1*TMath::Cos(2.*dPhi1));
935  fHSin2nDWPosChEtaVz[0]->Fill(EvtCent,runindex,ptw1*ptw1*TMath::Sin(2.*dPhi1));
936  }
937  else if(dChrg1<0){
938  fHCos1nNegChEtaVz[0]->Fill(EvtCent,runindex,ptw1*TMath::Cos(dPhi1));
939  fHSin1nNegChEtaVz[0]->Fill(EvtCent,runindex,ptw1*TMath::Sin(dPhi1));
940  fHCos2nNegChEtaVz[0]->Fill(EvtCent,runindex,ptw1*TMath::Cos(2.*dPhi1));
941  fHSin2nNegChEtaVz[0]->Fill(EvtCent,runindex,ptw1*TMath::Sin(2.*dPhi1));
942  fHCos3nNegChEtaVz[0]->Fill(EvtCent,runindex,ptw1*TMath::Cos(3.*dPhi1));
943  fHSin3nNegChEtaVz[0]->Fill(EvtCent,runindex,ptw1*TMath::Sin(3.*dPhi1));
944  fHCos4nNegChEtaVz[0]->Fill(EvtCent,runindex,ptw1*TMath::Cos(4.*dPhi1));
945  fHSin4nNegChEtaVz[0]->Fill(EvtCent,runindex,ptw1*TMath::Sin(4.*dPhi1));
946  fHCos2nDWNegChEtaVz[0]->Fill(EvtCent,runindex,ptw1*ptw1*TMath::Cos(2.*dPhi1));
947  fHSin2nDWNegChEtaVz[0]->Fill(EvtCent,runindex,ptw1*ptw1*TMath::Sin(2.*dPhi1));
948  }
949  }
950  else if(VtxZ>0 && dEta1<0){
951  if(dChrg1>0){
952  fHCos1nPosChEtaVz[1]->Fill(EvtCent,runindex,ptw1*TMath::Cos(dPhi1));
953  fHSin1nPosChEtaVz[1]->Fill(EvtCent,runindex,ptw1*TMath::Sin(dPhi1));
954  fHCos2nPosChEtaVz[1]->Fill(EvtCent,runindex,ptw1*TMath::Cos(2.*dPhi1));
955  fHSin2nPosChEtaVz[1]->Fill(EvtCent,runindex,ptw1*TMath::Sin(2.*dPhi1));
956  fHCos3nPosChEtaVz[1]->Fill(EvtCent,runindex,ptw1*TMath::Cos(3.*dPhi1));
957  fHSin3nPosChEtaVz[1]->Fill(EvtCent,runindex,ptw1*TMath::Sin(3.*dPhi1));
958  fHCos4nPosChEtaVz[1]->Fill(EvtCent,runindex,ptw1*TMath::Cos(4.*dPhi1));
959  fHSin4nPosChEtaVz[1]->Fill(EvtCent,runindex,ptw1*TMath::Sin(4.*dPhi1));
960  fHCos2nDWPosChEtaVz[1]->Fill(EvtCent,runindex,ptw1*ptw1*TMath::Cos(2.*dPhi1));
961  fHSin2nDWPosChEtaVz[1]->Fill(EvtCent,runindex,ptw1*ptw1*TMath::Sin(2.*dPhi1));
962  }
963  else if(dChrg1<0){
964  fHCos1nNegChEtaVz[1]->Fill(EvtCent,runindex,ptw1*TMath::Cos(dPhi1));
965  fHSin1nNegChEtaVz[1]->Fill(EvtCent,runindex,ptw1*TMath::Sin(dPhi1));
966  fHCos2nNegChEtaVz[1]->Fill(EvtCent,runindex,ptw1*TMath::Cos(2.*dPhi1));
967  fHSin2nNegChEtaVz[1]->Fill(EvtCent,runindex,ptw1*TMath::Sin(2.*dPhi1));
968  fHCos3nNegChEtaVz[1]->Fill(EvtCent,runindex,ptw1*TMath::Cos(3.*dPhi1));
969  fHSin3nNegChEtaVz[1]->Fill(EvtCent,runindex,ptw1*TMath::Sin(3.*dPhi1));
970  fHCos4nNegChEtaVz[1]->Fill(EvtCent,runindex,ptw1*TMath::Cos(4.*dPhi1));
971  fHSin4nNegChEtaVz[1]->Fill(EvtCent,runindex,ptw1*TMath::Sin(4.*dPhi1));
972  fHCos2nDWNegChEtaVz[1]->Fill(EvtCent,runindex,ptw1*ptw1*TMath::Cos(2.*dPhi1));
973  fHSin2nDWNegChEtaVz[1]->Fill(EvtCent,runindex,ptw1*ptw1*TMath::Sin(2.*dPhi1));
974  }
975  }
976  else if(VtxZ<0 && dEta1>=0){
977  if(dChrg1>0){
978  fHCos1nPosChEtaVz[2]->Fill(EvtCent,runindex,ptw1*TMath::Cos(dPhi1));
979  fHSin1nPosChEtaVz[2]->Fill(EvtCent,runindex,ptw1*TMath::Sin(dPhi1));
980  fHCos2nPosChEtaVz[2]->Fill(EvtCent,runindex,ptw1*TMath::Cos(2.*dPhi1));
981  fHSin2nPosChEtaVz[2]->Fill(EvtCent,runindex,ptw1*TMath::Sin(2.*dPhi1));
982  fHCos3nPosChEtaVz[2]->Fill(EvtCent,runindex,ptw1*TMath::Cos(3.*dPhi1));
983  fHSin3nPosChEtaVz[2]->Fill(EvtCent,runindex,ptw1*TMath::Sin(3.*dPhi1));
984  fHCos4nPosChEtaVz[2]->Fill(EvtCent,runindex,ptw1*TMath::Cos(4.*dPhi1));
985  fHSin4nPosChEtaVz[2]->Fill(EvtCent,runindex,ptw1*TMath::Sin(4.*dPhi1));
986  fHCos2nDWPosChEtaVz[2]->Fill(EvtCent,runindex,ptw1*ptw1*TMath::Cos(2.*dPhi1));
987  fHSin2nDWPosChEtaVz[2]->Fill(EvtCent,runindex,ptw1*ptw1*TMath::Sin(2.*dPhi1));
988  }
989  else if(dChrg1<0){
990  fHCos1nNegChEtaVz[2]->Fill(EvtCent,runindex,ptw1*TMath::Cos(dPhi1));
991  fHSin1nNegChEtaVz[2]->Fill(EvtCent,runindex,ptw1*TMath::Sin(dPhi1));
992  fHCos2nNegChEtaVz[2]->Fill(EvtCent,runindex,ptw1*TMath::Cos(2.*dPhi1));
993  fHSin2nNegChEtaVz[2]->Fill(EvtCent,runindex,ptw1*TMath::Sin(2.*dPhi1));
994  fHCos3nNegChEtaVz[2]->Fill(EvtCent,runindex,ptw1*TMath::Cos(3.*dPhi1));
995  fHSin3nNegChEtaVz[2]->Fill(EvtCent,runindex,ptw1*TMath::Sin(3.*dPhi1));
996  fHCos4nNegChEtaVz[2]->Fill(EvtCent,runindex,ptw1*TMath::Cos(4.*dPhi1));
997  fHSin4nNegChEtaVz[2]->Fill(EvtCent,runindex,ptw1*TMath::Sin(4.*dPhi1));
998  fHCos2nDWNegChEtaVz[2]->Fill(EvtCent,runindex,ptw1*ptw1*TMath::Cos(2.*dPhi1));
999  fHSin2nDWNegChEtaVz[2]->Fill(EvtCent,runindex,ptw1*ptw1*TMath::Sin(2.*dPhi1));
1000  }
1001 
1002  }
1003  else if(VtxZ<0 && dEta1<0){
1004  if(dChrg1>0){
1005  fHCos1nPosChEtaVz[3]->Fill(EvtCent,runindex,ptw1*TMath::Cos(dPhi1));
1006  fHSin1nPosChEtaVz[3]->Fill(EvtCent,runindex,ptw1*TMath::Sin(dPhi1));
1007  fHCos2nPosChEtaVz[3]->Fill(EvtCent,runindex,ptw1*TMath::Cos(2.*dPhi1));
1008  fHSin2nPosChEtaVz[3]->Fill(EvtCent,runindex,ptw1*TMath::Sin(2.*dPhi1));
1009  fHCos3nPosChEtaVz[3]->Fill(EvtCent,runindex,ptw1*TMath::Cos(3.*dPhi1));
1010  fHSin3nPosChEtaVz[3]->Fill(EvtCent,runindex,ptw1*TMath::Sin(3.*dPhi1));
1011  fHCos4nPosChEtaVz[3]->Fill(EvtCent,runindex,ptw1*TMath::Cos(4.*dPhi1));
1012  fHSin4nPosChEtaVz[3]->Fill(EvtCent,runindex,ptw1*TMath::Sin(4.*dPhi1));
1013  fHCos2nDWPosChEtaVz[3]->Fill(EvtCent,runindex,ptw1*ptw1*TMath::Cos(2.*dPhi1));
1014  fHSin2nDWPosChEtaVz[3]->Fill(EvtCent,runindex,ptw1*ptw1*TMath::Sin(2.*dPhi1));
1015  }
1016  else if(dChrg1<0){
1017  fHCos1nNegChEtaVz[3]->Fill(EvtCent,runindex,ptw1*TMath::Cos(dPhi1));
1018  fHSin1nNegChEtaVz[3]->Fill(EvtCent,runindex,ptw1*TMath::Sin(dPhi1));
1019  fHCos2nNegChEtaVz[3]->Fill(EvtCent,runindex,ptw1*TMath::Cos(2.*dPhi1));
1020  fHSin2nNegChEtaVz[3]->Fill(EvtCent,runindex,ptw1*TMath::Sin(2.*dPhi1));
1021  fHCos3nNegChEtaVz[3]->Fill(EvtCent,runindex,ptw1*TMath::Cos(3.*dPhi1));
1022  fHSin3nNegChEtaVz[3]->Fill(EvtCent,runindex,ptw1*TMath::Sin(3.*dPhi1));
1023  fHCos4nNegChEtaVz[3]->Fill(EvtCent,runindex,ptw1*TMath::Cos(4.*dPhi1));
1024  fHSin4nNegChEtaVz[3]->Fill(EvtCent,runindex,ptw1*TMath::Sin(4.*dPhi1));
1025  fHCos2nDWNegChEtaVz[3]->Fill(EvtCent,runindex,ptw1*ptw1*TMath::Cos(2.*dPhi1));
1026  fHSin2nDWNegChEtaVz[3]->Fill(EvtCent,runindex,ptw1*ptw1*TMath::Sin(2.*dPhi1));
1027  }
1028  }
1029  }*/
1030 
1031 
1032  if(isBadRun) continue;
1033 
1034 
1035 
1036  iEtaQA = fEtaBinFinderForQA->FindBin(dEta1) - 1;
1037 
1038  if(dChrg1>0){
1039  QxPos[0] += (ptw1*w1NUA*TMath::Cos(n*dPhi1) - AvgCos1n);
1040  QyPos[0] += (ptw1*w1NUA*TMath::Sin(n*dPhi1) - AvgSin1n);
1041  QxAutoPos[0] += (ptw1*ptw1*w1NUA*w1NUA*TMath::Cos(2.*n*dPhi1) - AvgDWCos2n);
1042  QyAutoPos[0] += (ptw1*ptw1*w1NUA*w1NUA*TMath::Sin(2.*n*dPhi1) - AvgDWSin2n);
1043  MPOIpos += w1NUA*ptw1;
1044  McorrPos += w1NUA*ptw1*w1NUA*ptw1;
1045  //QA: eta dependence
1046  if(EvtCent>=10 && EvtCent<20){
1047  QxPosQAEta[iEtaQA] += (ptw1*w1NUA*TMath::Cos(n*dPhi1) - AvgCos1n);
1048  QyPosQAEta[iEtaQA] += (ptw1*w1NUA*TMath::Sin(n*dPhi1) - AvgSin1n);
1049  QxAutoPosQAEta[iEtaQA] += (ptw1*ptw1*w1NUA*w1NUA*TMath::Cos(2.*n*dPhi1) - AvgDWCos2n);
1050  QyAutoPosQAEta[iEtaQA] += (ptw1*ptw1*w1NUA*w1NUA*TMath::Sin(2.*n*dPhi1) - AvgDWSin2n);
1051  MPOIposQAEta[iEtaQA] += ptw1*w1NUA;
1052  }
1053  }
1054  else if(dChrg1<0){
1055  QxNeg[0] += (ptw1*w1NUA*TMath::Cos(n*dPhi1) - AvgCos1n);
1056  QyNeg[0] += (ptw1*w1NUA*TMath::Sin(n*dPhi1) - AvgSin1n);
1057  QxAutoNeg[0] += (ptw1*ptw1*w1NUA*w1NUA*TMath::Cos(2.*n*dPhi1) - AvgDWCos2n);
1058  QyAutoNeg[0] += (ptw1*ptw1*w1NUA*w1NUA*TMath::Sin(2.*n*dPhi1) - AvgDWSin2n);
1059  MPOIneg += w1NUA*ptw1;
1060  McorrNeg += w1NUA*ptw1*w1NUA*ptw1;
1061  //QA: eta dependence
1062  if(EvtCent>=10 && EvtCent<20){
1063  QxNegQAEta[iEtaQA] += (ptw1*w1NUA*TMath::Cos(n*dPhi1) - AvgCos1n);
1064  QyNegQAEta[iEtaQA] += (ptw1*w1NUA*TMath::Sin(n*dPhi1) - AvgSin1n);
1065  QxAutoNegQAEta[iEtaQA] += (ptw1*ptw1*w1NUA*w1NUA*TMath::Cos(2.*n*dPhi1) - AvgDWCos2n);
1066  QyAutoNegQAEta[iEtaQA] += (ptw1*ptw1*w1NUA*w1NUA*TMath::Sin(2.*n*dPhi1) - AvgDWSin2n);
1067  MPOInegQAEta[iEtaQA] += ptw1*w1NUA;
1068  }
1069  }
1070 
1071  //QxTPC[0] += ptw1*w1NUA*TMath::Cos(n*dPhi1);
1072  //QyTPC[0] += ptw1*w1NUA*TMath::Sin(n*dPhi1);
1073  QxTPC[1] += ptw1*w1NUA*TMath::Cos(psiN*dPhi1);
1074  QyTPC[1] += ptw1*w1NUA*TMath::Sin(psiN*dPhi1);
1075 
1076  nRefMult++;
1077  nRefMultWgt += ptw1*w1NUA;
1078 
1079 
1080  //if(i%10==0)
1081  //cout<<" track "<<i<<" eta = "<<dEta1<<"\tvz = "<<VtxZ<<"\tptw1 = "<<ptw1<<"\tw1NUA = "<<w1NUA<<"\tAvgCos1n = "<<AvgCos1n<<endl;
1082 
1083 
1084 
1085  //2nd track loop:
1086  for(int j=0; j<iTracks; j++) {
1087 
1088  if(j==i) continue; //Auto-correlation removed.
1089 
1090  pTrack2 = fEvent->GetTrack(j);
1091  if(!pTrack2) continue;
1092  dPhi2 = pTrack2->Phi(); //0-2pi range
1093  dPt2 = pTrack2-> Pt();
1094  dEta2 = pTrack2->Eta();
1095  dChrg2 = pTrack2->Charge();
1096 
1097  if(!pTrack2->InPOISelection())
1098  continue;
1099 
1100 
1101  ptBin = fFB_Efficiency_Cent[cIndex]->FindBin(dPt2);
1102  ptw2 = 1.0/fFB_Efficiency_Cent[cIndex]->GetBinContent(ptBin);
1103 
1104  if(bApplyNUACorr){
1105  //get NUA weights:
1106  if(sFileNUA=="OldJ"||sFileNUA=="NewR"){
1107  if(dChrg2>0){
1108  iBinNUA = fHCorrectNUApos[cForNUA]->FindBin(VtxZ,dPhi2,dEta2);
1109  w2NUA = fHCorrectNUApos[cForNUA]->GetBinContent(iBinNUA);
1110  }
1111  else if(dChrg2<0){
1112  iBinNUA = fHCorrectNUAneg[cForNUA]->FindBin(VtxZ,dPhi2,dEta2);
1113  w2NUA = fHCorrectNUAneg[cForNUA]->GetBinContent(iBinNUA);
1114  }
1115  if(sFileNUA=="OldJ") w2NUA = 1./w2NUA;
1116  }
1117  else if(sFileNUA=="NewPt"||sFileNUA=="NewpT"){
1118  if(dChrg2>0){
1119  iBinNUA = fHCorrectNUApos[iVzNUA]->FindBin(dPt2,dPhi2,dEta2);
1120  w2NUA = fHCorrectNUApos[iVzNUA]->GetBinContent(iBinNUA);
1121  }
1122  else if(dChrg2<0){
1123  iBinNUA = fHCorrectNUAneg[iVzNUA]->FindBin(dPt2,dPhi2,dEta2);
1124  w2NUA = fHCorrectNUAneg[iVzNUA]->GetBinContent(iBinNUA);
1125  }
1126  }
1127  if(w2NUA > 1e3 ) w2NUA = 1.0;
1128  }
1129 
1130  if(bApplyNUAforEP){
1131  WgtEP = ptw1*ptw2*w1NUA*w2NUA;
1132  }
1133  else{
1134  WgtEP = 1.0;
1135  }
1136 
1137  if(dChrg1!=dChrg2){
1138  fHist_Corr3p_EP_Norm_PN[QAindex][0]->Fill(EvtCent, TMath::Cos(n*dPhi1 + m*dPhi2 - p*Psi2V0A),WgtEP);
1139  fHist_Corr3p_EP_Norm_PN[QAindex][1]->Fill(EvtCent, TMath::Cos(n*dPhi1 + m*dPhi2 - p*Psi2V0C),WgtEP);
1140 
1141  fHist_Corr3p_vsRun_EP_PN[0]->Fill(EvtCent, runindex, TMath::Cos(n*dPhi1 + m*dPhi2 - p*Psi2V0A),WgtEP);
1142  fHist_Corr3p_vsRun_EP_PN[1]->Fill(EvtCent, runindex, TMath::Cos(n*dPhi1 + m*dPhi2 - p*Psi2V0C),WgtEP);
1143 
1144  fHist_Corr2p_EP_Norm_PN[QAindex]->Fill(EvtCent,0.5,TMath::Cos((dPhi1 - dPhi2)),WgtEP);
1145  fHist_Corr2p_EP_Norm_PN[QAindex]->Fill(EvtCent,1.5,TMath::Cos(2.*(dPhi1 - dPhi2)),WgtEP);
1146  fHist_Corr2p_EP_Norm_PN[QAindex]->Fill(EvtCent,2.5,TMath::Cos(3.*(dPhi1 - dPhi2)),WgtEP);
1147  fHist_Corr2p_EP_Norm_PN[QAindex]->Fill(EvtCent,3.5,TMath::Cos(4.*(dPhi1 - dPhi2)),WgtEP);
1148 
1149  if(cIndex<6){
1150  fHist_Corr3p_pTSum_EP_V0A_PN[QAindex][cIndex]->Fill((dPt1+dPt2)*0.5, TMath::Cos(n*dPhi1 + m*dPhi2 - p*Psi2V0A),WgtEP);
1151  fHist_Corr3p_pTSum_EP_V0C_PN[QAindex][cIndex]->Fill((dPt1+dPt2)*0.5, TMath::Cos(n*dPhi1 + m*dPhi2 - p*Psi2V0C),WgtEP);
1152  fHist_Corr3p_pTDiff_EP_V0A_PN[QAindex][cIndex]->Fill(TMath::Abs(dPt1-dPt2), TMath::Cos(n*dPhi1 + m*dPhi2 - p*Psi2V0A),WgtEP);
1153  fHist_Corr3p_pTDiff_EP_V0C_PN[QAindex][cIndex]->Fill(TMath::Abs(dPt1-dPt2), TMath::Cos(n*dPhi1 + m*dPhi2 - p*Psi2V0C),WgtEP);
1154  fHist_Corr3p_EtaDiff_EP_V0A_PN[QAindex][cIndex]->Fill(TMath::Abs(dEta1-dEta2), TMath::Cos(n*dPhi1 + m*dPhi2 - p*Psi2V0A),WgtEP);
1155  fHist_Corr3p_EtaDiff_EP_V0C_PN[QAindex][cIndex]->Fill(TMath::Abs(dEta1-dEta2), TMath::Cos(n*dPhi1 + m*dPhi2 - p*Psi2V0C),WgtEP);
1156  }
1157  }
1158  else if(dChrg1>0 && dChrg2>0){
1159  fHist_Corr3p_EP_Norm_PP[QAindex][0]->Fill(EvtCent, TMath::Cos(n*dPhi1 + m*dPhi2 - p*Psi2V0A),WgtEP);
1160  fHist_Corr3p_EP_Norm_PP[QAindex][1]->Fill(EvtCent, TMath::Cos(n*dPhi1 + m*dPhi2 - p*Psi2V0C),WgtEP);
1161 
1162  fHist_Corr3p_vsRun_EP_PP[0]->Fill(EvtCent, runindex, TMath::Cos(n*dPhi1 + m*dPhi2 - p*Psi2V0A),WgtEP);
1163  fHist_Corr3p_vsRun_EP_PP[1]->Fill(EvtCent, runindex, TMath::Cos(n*dPhi1 + m*dPhi2 - p*Psi2V0C),WgtEP);
1164 
1165  fHist_Corr2p_EP_Norm_PP[QAindex]->Fill(EvtCent,0.5,TMath::Cos((dPhi1 - dPhi2)),WgtEP);
1166  fHist_Corr2p_EP_Norm_PP[QAindex]->Fill(EvtCent,1.5,TMath::Cos(2.*(dPhi1 - dPhi2)),WgtEP);
1167  fHist_Corr2p_EP_Norm_PP[QAindex]->Fill(EvtCent,2.5,TMath::Cos(3.*(dPhi1 - dPhi2)),WgtEP);
1168  fHist_Corr2p_EP_Norm_PP[QAindex]->Fill(EvtCent,3.5,TMath::Cos(4.*(dPhi1 - dPhi2)),WgtEP);
1169 
1170  if(cIndex<6){
1171  fHist_Corr3p_pTSum_EP_V0A_PP[QAindex][cIndex]->Fill((dPt1+dPt2)*0.5, TMath::Cos(n*dPhi1 + m*dPhi2 - p*Psi2V0A),WgtEP);
1172  fHist_Corr3p_pTSum_EP_V0C_PP[QAindex][cIndex]->Fill((dPt1+dPt2)*0.5, TMath::Cos(n*dPhi1 + m*dPhi2 - p*Psi2V0C),WgtEP);
1173  fHist_Corr3p_pTDiff_EP_V0A_PP[QAindex][cIndex]->Fill(TMath::Abs(dPt1-dPt2), TMath::Cos(n*dPhi1 + m*dPhi2 - p*Psi2V0A),WgtEP);
1174  fHist_Corr3p_pTDiff_EP_V0C_PP[QAindex][cIndex]->Fill(TMath::Abs(dPt1-dPt2), TMath::Cos(n*dPhi1 + m*dPhi2 - p*Psi2V0C),WgtEP);
1175  fHist_Corr3p_EtaDiff_EP_V0A_PP[QAindex][cIndex]->Fill(TMath::Abs(dEta1-dEta2), TMath::Cos(n*dPhi1 + m*dPhi2 - p*Psi2V0A),WgtEP);
1176  fHist_Corr3p_EtaDiff_EP_V0C_PP[QAindex][cIndex]->Fill(TMath::Abs(dEta1-dEta2), TMath::Cos(n*dPhi1 + m*dPhi2 - p*Psi2V0C),WgtEP);
1177  }
1178  }
1179  else if(dChrg1<0 && dChrg2<0){
1180  fHist_Corr3p_EP_Norm_NN[QAindex][0]->Fill(EvtCent, TMath::Cos(n*dPhi1 + m*dPhi2 - p*Psi2V0A),WgtEP);
1181  fHist_Corr3p_EP_Norm_NN[QAindex][1]->Fill(EvtCent, TMath::Cos(n*dPhi1 + m*dPhi2 - p*Psi2V0C),WgtEP);
1182 
1183  fHist_Corr3p_vsRun_EP_NN[0]->Fill(EvtCent, runindex, TMath::Cos(n*dPhi1 + m*dPhi2 - p*Psi2V0A),WgtEP);
1184  fHist_Corr3p_vsRun_EP_NN[1]->Fill(EvtCent, runindex, TMath::Cos(n*dPhi1 + m*dPhi2 - p*Psi2V0C),WgtEP);
1185 
1186  fHist_Corr2p_EP_Norm_NN[QAindex]->Fill(EvtCent,0.5,TMath::Cos((dPhi1 - dPhi2)),WgtEP);
1187  fHist_Corr2p_EP_Norm_NN[QAindex]->Fill(EvtCent,1.5,TMath::Cos(2.*(dPhi1 - dPhi2)),WgtEP);
1188  fHist_Corr2p_EP_Norm_NN[QAindex]->Fill(EvtCent,2.5,TMath::Cos(3.*(dPhi1 - dPhi2)),WgtEP);
1189  fHist_Corr2p_EP_Norm_NN[QAindex]->Fill(EvtCent,3.5,TMath::Cos(4.*(dPhi1 - dPhi2)),WgtEP);
1190 
1191  if(cIndex<6){
1192  fHist_Corr3p_pTSum_EP_V0A_NN[QAindex][cIndex]->Fill((dPt1+dPt2)*0.5, TMath::Cos(n*dPhi1 + m*dPhi2 - p*Psi2V0A),WgtEP);
1193  fHist_Corr3p_pTSum_EP_V0C_NN[QAindex][cIndex]->Fill((dPt1+dPt2)*0.5, TMath::Cos(n*dPhi1 + m*dPhi2 - p*Psi2V0C),WgtEP);
1194  fHist_Corr3p_pTDiff_EP_V0A_NN[QAindex][cIndex]->Fill(TMath::Abs(dPt1-dPt2), TMath::Cos(n*dPhi1 + m*dPhi2 - p*Psi2V0A),WgtEP);
1195  fHist_Corr3p_pTDiff_EP_V0C_NN[QAindex][cIndex]->Fill(TMath::Abs(dPt1-dPt2), TMath::Cos(n*dPhi1 + m*dPhi2 - p*Psi2V0C),WgtEP);
1196  fHist_Corr3p_EtaDiff_EP_V0A_NN[QAindex][cIndex]->Fill(TMath::Abs(dEta1-dEta2), TMath::Cos(n*dPhi1 + m*dPhi2 - p*Psi2V0A),WgtEP);
1197  fHist_Corr3p_EtaDiff_EP_V0C_NN[QAindex][cIndex]->Fill(TMath::Abs(dEta1-dEta2), TMath::Cos(n*dPhi1 + m*dPhi2 - p*Psi2V0C),WgtEP);
1198  }
1199  }
1200  }//nested loop ends
1201  }//------ track loop ends ------
1202 
1203 
1204 
1205  fEventStatvsRun->Fill(runindex);
1206 
1207  if(isBadRun) return;
1208  fHist_Event_count->Fill(stepCount); //6
1209  stepCount++;
1210 
1211 
1212 
1213  Double_t QTPCRe = 0.;
1214  Double_t QTPCIm = 0.;
1215 
1216  QTPCRe = QxTPC[1];
1217  QTPCIm = QyTPC[1];
1218 
1219 
1220  Double_t Psi2TPC = 1./psiN*(TMath::ATan2(QTPCIm,QTPCRe));
1221  if(Psi2TPC < 0.) Psi2TPC += 2*pi/psiN;
1222 
1223 
1224  fTPCQnxVsCentRun->Fill(centrCL1,runindex,TMath::Cos(Psi2TPC));
1225  fTPCQnyVsCentRun->Fill(centrCL1,runindex,TMath::Sin(Psi2TPC));
1226 
1227 
1228 
1229 //V0A-V0C EP resolution:
1230  fHist_Reso2n_EP_Norm_Det[QAindex][0]->Fill(EvtCent, TMath::Cos(psiN*(Psi2V0A-Psi2V0C)));
1231 //V0A-TPC EP resolution:
1232  fHist_Reso2n_EP_Norm_Det[QAindex][1]->Fill(EvtCent, TMath::Cos(psiN*(Psi2V0A-Psi2TPC)));
1233 //V0C-TPC EP resolution:
1234  fHist_Reso2n_EP_Norm_Det[QAindex][2]->Fill(EvtCent, TMath::Cos(psiN*(Psi2V0C-Psi2TPC)));
1235 
1236  fHV0AEventPlaneVsCent->Fill(EvtCent,Psi2V0A);
1237  fHV0CEventPlaneVsCent->Fill(EvtCent,Psi2V0C);
1238  fHTPCEventPlaneVsCent->Fill(EvtCent,Psi2TPC);
1239 
1240 
1241 
1242 
1243 
1244 
1245  //------- SP Method -------------
1246 
1247 
1248  Double_t uPRe=0.,uNRe=0.,uPIm=0.,uNIm=0.,uN2Re=0.,uN2Im=0.,uP2Re=0.,uP2Im=0.;
1249  Double_t uPM=0.,uNM=0.;
1250  //Double_t VCIm=0., VPRe=0.,VPIm=0.;
1251 
1252 
1253  uPM = MPOIpos; uNM = MPOIneg;
1254 
1255  uPRe = QxPos[0]; uNRe = QxNeg[0];
1256  uPIm = QyPos[0]; uNIm = QyNeg[0];
1257 
1258  uP2Re = QxAutoPos[0]; uP2Im = QyAutoPos[0];
1259  uN2Re = QxAutoNeg[0]; uN2Im = QyAutoNeg[0];
1260 
1261  Double_t TwoQpQnV = 0.,TwoQpQpV=0.,TwoQnQnV=0.;
1262 
1263  if(uPM > 1 && uNM > 1) {
1264  //CME w.r.t V0A EP:
1265  TwoQpQnV = ((uPRe*uNRe-uPIm*uNIm)*QxanCor + (uPRe*uNIm+uPIm*uNRe)*QyanCor) / (uPM*uNM) ;
1266  TwoQpQpV = ((uPRe*uPRe-uPIm*uPIm-uP2Re)*QxanCor + (2.*uPRe*uPIm-uP2Im)*QyanCor) / (uPM*(uPM-1)) ;
1267  TwoQnQnV = ((uNRe*uNRe-uNIm*uNIm-uN2Re)*QxanCor + (2.*uNRe*uNIm-uN2Im)*QyanCor) / (uNM*(uNM-1)) ;
1268  //Fill profiles:
1269  fHist_Corr3p_SP_Norm_PN[QAindex][0]->Fill(EvtCent, TwoQpQnV, uPM*uNM);
1270  fHist_Corr3p_SP_Norm_PP[QAindex][0]->Fill(EvtCent, TwoQpQpV, (uPM*(uPM-1)));
1271  fHist_Corr3p_SP_Norm_NN[QAindex][0]->Fill(EvtCent, TwoQnQnV, (uNM*(uNM-1)));
1272 
1273  //-------- Fill NonIsotropic terms ------
1274 
1275  Double_t QnNonIsoRe = 0.,QnNonIsoIm=0.;
1276 
1277  if(QAindex==0){ //B < 0
1278  //charge pos:
1279  fHist_NonIso_SP_PP_Mag0[0]->Fill(EvtCent, 0.5,uPRe/uPM,uPM); //<Cos(nPhi)> ChPos
1280  fHist_NonIso_SP_PP_Mag0[0]->Fill(EvtCent, 1.5,uPIm/uPM,uPM); //<Sin(nPhi)> ChPos
1281 
1282  QnNonIsoRe = (uPRe*QxanCor + uPIm*QyanCor)/uPM;
1283  QnNonIsoIm = (uPIm*QxanCor - uPRe*QyanCor)/uPM;
1284  fHist_NonIso_SP_PP_Mag0[0]->Fill(EvtCent, 2.5,QnNonIsoRe,uPM); //<Cos(nPhi-mPsi)> ChPos
1285  fHist_NonIso_SP_PP_Mag0[0]->Fill(EvtCent, 3.5,QnNonIsoIm,uPM); //<Sin(nPhi-mPsi)> ChPos
1286 
1287  QnNonIsoRe = (uPRe*uPRe-uPIm*uPIm-uP2Re)/(uPM*(uPM-1));
1288  QnNonIsoIm = (2.*uPRe*uPIm-uP2Im)/(uPM*(uPM-1));
1289  fHist_NonIso_SP_PP_Mag0[0]->Fill(EvtCent, 4.5,QnNonIsoRe,(uPM*(uPM-1))); //<Cos(nPhi1+nPhi2)> ChPos
1290  fHist_NonIso_SP_PP_Mag0[0]->Fill(EvtCent, 5.5,QnNonIsoIm,(uPM*(uPM-1))); //<Sin(nPhi1+nPhi2)> ChPos
1291 
1292  QnNonIsoRe = (uPRe*uNRe-uPIm*uNIm)/(uPM*uNM);
1293  QnNonIsoIm = (uPRe*uNIm+uPIm*uNRe)/(uPM*uNM);
1294  fHist_NonIso_SP_PP_Mag0[0]->Fill(EvtCent, 6.5,QnNonIsoRe,(uPM*uNM)); //<Cos(nPhi1+nPhi2)> phi1,phi2 opposite charge
1295  fHist_NonIso_SP_PP_Mag0[0]->Fill(EvtCent, 7.5,QnNonIsoIm,(uPM*uNM)); //<Sin(nPhi1+nPhi2)> phi1,phi2 opposite charge
1296 
1297  fHist_NonIso_SP_PP_Mag0[0]->Fill(EvtCent, 8.5,QxanCor,uPM); //<Cos(mPsiEP)>
1298  fHist_NonIso_SP_PP_Mag0[0]->Fill(EvtCent, 9.5,QyanCor,uPM); //<Sin(mPsiEP)>
1299 
1300  //charge neg:
1301  fHist_NonIso_SP_NN_Mag0[0]->Fill(EvtCent, 0.5,uNRe/uNM,uNM); //<Cos(nPhi)> ChNeg
1302  fHist_NonIso_SP_NN_Mag0[0]->Fill(EvtCent, 1.5,uNIm/uNM,uNM); //<Sin(nPhi)> ChNeg
1303 
1304  QnNonIsoRe = (uNRe*QxanCor + uNIm*QyanCor)/uNM;
1305  QnNonIsoIm = (uNIm*QxanCor - uNRe*QyanCor)/uNM;
1306  fHist_NonIso_SP_NN_Mag0[0]->Fill(EvtCent, 2.5,QnNonIsoRe,uNM); //<Cos(nPhi-mPsi)> ChNeg
1307  fHist_NonIso_SP_NN_Mag0[0]->Fill(EvtCent, 3.5,QnNonIsoIm,uNM); //<Cos(nPhi-mPsi)> ChNeg
1308 
1309  QnNonIsoRe = (uNRe*uNRe-uNIm*uNIm-uN2Re)/(uNM*(uNM-1));
1310  QnNonIsoIm = (2.*uNRe*uNIm-uN2Im)/(uNM*(uNM-1));
1311  fHist_NonIso_SP_NN_Mag0[0]->Fill(EvtCent, 4.5,QnNonIsoRe,(uNM*(uNM-1))); //<Cos(nPhi1+nPhi2)> ChNeg
1312  fHist_NonIso_SP_NN_Mag0[0]->Fill(EvtCent, 5.5,QnNonIsoIm,(uNM*(uNM-1))); //<Sin(nPhi1+nPhi2)> ChNeg
1313 
1314  QnNonIsoRe = (uPRe*uNRe-uPIm*uNIm)/(uPM*uNM);
1315  QnNonIsoIm = (uPRe*uNIm+uPIm*uNRe)/(uPM*uNM);
1316  fHist_NonIso_SP_NN_Mag0[0]->Fill(EvtCent, 6.5,QnNonIsoRe,(uPM*uNM)); //<Cos(nPhi1+nPhi2)> phi1,phi2 opposite charge
1317  fHist_NonIso_SP_NN_Mag0[0]->Fill(EvtCent, 7.5,QnNonIsoIm,(uPM*uNM)); //<Sin(nPhi1+nPhi2)> phi1,phi2 opposite charge
1318 
1319  fHist_NonIso_SP_NN_Mag0[0]->Fill(EvtCent, 8.5,QxanCor,uNM); //<Cos(mPsiEP)>
1320  fHist_NonIso_SP_NN_Mag0[0]->Fill(EvtCent, 9.5,QyanCor,uNM); //<Sin(mPsiEP)>
1321  }
1322  else if(QAindex==1){ //B > 0
1323  //charge pos:
1324  fHist_NonIso_SP_PP_Mag1[0]->Fill(EvtCent, 0.5,uPRe/uPM,uPM); //<Cos(nPhi)> ChPos
1325  fHist_NonIso_SP_PP_Mag1[0]->Fill(EvtCent, 1.5,uPIm/uPM,uPM); //<Sin(nPhi)> ChPos
1326 
1327  QnNonIsoRe = (uPRe*QxanCor + uPIm*QyanCor)/uPM;
1328  QnNonIsoIm = (uPIm*QxanCor - uPRe*QyanCor)/uPM;
1329  fHist_NonIso_SP_PP_Mag1[0]->Fill(EvtCent, 2.5,QnNonIsoRe,uPM); //<Cos(nPhi-mPsi)> ChPos
1330  fHist_NonIso_SP_PP_Mag1[0]->Fill(EvtCent, 3.5,QnNonIsoIm,uPM); //<Sin(nPhi-mPsi)> ChPos
1331 
1332  QnNonIsoRe = (uPRe*uPRe-uPIm*uPIm-uP2Re)/(uPM*(uPM-1));
1333  QnNonIsoIm = (2.*uPRe*uPIm-uP2Im)/(uPM*(uPM-1));
1334  fHist_NonIso_SP_PP_Mag1[0]->Fill(EvtCent, 4.5,QnNonIsoRe,(uPM*(uPM-1))); //<Cos(nPhi1+nPhi2)> ChPos
1335  fHist_NonIso_SP_PP_Mag1[0]->Fill(EvtCent, 5.5,QnNonIsoIm,(uPM*(uPM-1))); //<Sin(nPhi1+nPhi2)> ChPos
1336 
1337  QnNonIsoRe = (uPRe*uNRe-uPIm*uNIm)/(uPM*uNM);
1338  QnNonIsoIm = (uPRe*uNIm+uPIm*uNRe)/(uPM*uNM);
1339  fHist_NonIso_SP_PP_Mag1[0]->Fill(EvtCent, 6.5,QnNonIsoRe,(uPM*uNM)); //<Cos(nPhi1+nPhi2)> phi1,phi2 opposite charge
1340  fHist_NonIso_SP_PP_Mag1[0]->Fill(EvtCent, 7.5,QnNonIsoIm,(uPM*uNM)); //<Sin(nPhi1+nPhi2)> phi1,phi2 opposite charge
1341 
1342  fHist_NonIso_SP_PP_Mag1[0]->Fill(EvtCent, 8.5,QxanCor,uPM); //<Cos(mPsiEP)>
1343  fHist_NonIso_SP_PP_Mag1[0]->Fill(EvtCent, 9.5,QyanCor,uPM); //<Sin(mPsiEP)>
1344 
1345  //charge neg:
1346  fHist_NonIso_SP_NN_Mag1[0]->Fill(EvtCent, 0.5,uNRe/uNM,uNM); //<Cos(nPhi)> ChNeg
1347  fHist_NonIso_SP_NN_Mag1[0]->Fill(EvtCent, 1.5,uNIm/uNM,uNM); //<Sin(nPhi)> ChNeg
1348 
1349  QnNonIsoRe = (uNRe*QxanCor + uNIm*QyanCor)/uNM;
1350  QnNonIsoIm = (uNIm*QxanCor - uNRe*QyanCor)/uNM;
1351  fHist_NonIso_SP_NN_Mag1[0]->Fill(EvtCent, 2.5,QnNonIsoRe,uNM); //<Cos(nPhi-mPsi)> ChNeg
1352  fHist_NonIso_SP_NN_Mag1[0]->Fill(EvtCent, 3.5,QnNonIsoIm,uNM); //<Cos(nPhi-mPsi)> ChNeg
1353 
1354  QnNonIsoRe = (uNRe*uNRe-uNIm*uNIm-uN2Re)/(uNM*(uNM-1));
1355  QnNonIsoIm = (2.*uNRe*uNIm-uN2Im)/(uNM*(uNM-1));
1356  fHist_NonIso_SP_NN_Mag1[0]->Fill(EvtCent, 4.5,QnNonIsoRe,(uNM*(uNM-1))); //<Cos(nPhi1+nPhi2)> ChNeg
1357  fHist_NonIso_SP_NN_Mag1[0]->Fill(EvtCent, 5.5,QnNonIsoIm,(uNM*(uNM-1))); //<Sin(nPhi1+nPhi2)> ChNeg
1358 
1359  QnNonIsoRe = (uPRe*uNRe-uPIm*uNIm)/(uPM*uNM);
1360  QnNonIsoIm = (uPRe*uNIm+uPIm*uNRe)/(uPM*uNM);
1361  fHist_NonIso_SP_NN_Mag1[0]->Fill(EvtCent, 6.5,QnNonIsoRe,(uPM*uNM)); //<Cos(nPhi1+nPhi2)> phi1,phi2 opposite charge
1362  fHist_NonIso_SP_NN_Mag1[0]->Fill(EvtCent, 7.5,QnNonIsoIm,(uPM*uNM)); //<Sin(nPhi1+nPhi2)> phi1,phi2 opposite charge
1363 
1364  fHist_NonIso_SP_NN_Mag1[0]->Fill(EvtCent, 8.5,QxanCor,uNM); //<Cos(mPsiEP)>
1365  fHist_NonIso_SP_NN_Mag1[0]->Fill(EvtCent, 9.5,QyanCor,uNM); //<Sin(mPsiEP)>
1366  }
1367 
1368 
1369  //-------- CME - ZDN correlators:---------
1370  fHist_Corr3p_ZDN_SP_PN[0]->Fill(EvtCent, 0., TwoQpQnV, uPM*uNM);
1371  fHist_Corr3p_ZDN_SP_PN[0]->Fill(EvtCent, 1., energyZPA, 1.);
1372  fHist_Corr3p_ZDN_SP_PN[0]->Fill(EvtCent, 2., energyZPC, 1.);
1373  fHist_Corr3p_ZDN_SP_PN[0]->Fill(EvtCent, 3., (energyZPA+energyZPC), 1.);
1374  fHist_Corr3p_ZDN_SP_PN[0]->Fill(EvtCent, 4., energyZNA, 1.);
1375  fHist_Corr3p_ZDN_SP_PN[0]->Fill(EvtCent, 5., energyZNC, 1.);
1376  fHist_Corr3p_ZDN_SP_PN[0]->Fill(EvtCent, 6., (energyZNA+energyZNC), 1.);
1377  fHist_Corr3p_ZDN_SP_PN[0]->Fill(EvtCent, 7., TwoQpQnV*energyZPA, uPM*uNM);
1378  fHist_Corr3p_ZDN_SP_PN[0]->Fill(EvtCent, 8., TwoQpQnV*energyZPC, uPM*uNM);
1379  fHist_Corr3p_ZDN_SP_PN[0]->Fill(EvtCent, 9., TwoQpQnV*(energyZPC+energyZPA), uPM*uNM);
1380  fHist_Corr3p_ZDN_SP_PN[0]->Fill(EvtCent, 10., TwoQpQnV*energyZNA, uPM*uNM);
1381  fHist_Corr3p_ZDN_SP_PN[0]->Fill(EvtCent, 11., TwoQpQnV*energyZNC, uPM*uNM);
1382  fHist_Corr3p_ZDN_SP_PN[0]->Fill(EvtCent, 12., TwoQpQnV*(energyZNC+energyZNA), uPM*uNM);
1383 
1384  fHist_Corr3p_ZDN_SP_PP[0]->Fill(EvtCent, 0., TwoQpQpV, (uPM*(uPM-1)));
1385  //fHist_Corr3p_ZDN_SP_PP[0]->Fill(EvtCent, 1., energyZPA, 1.);
1386  //fHist_Corr3p_ZDN_SP_PP[0]->Fill(EvtCent, 2., energyZPC, 1.);
1387  //fHist_Corr3p_ZDN_SP_PP[0]->Fill(EvtCent, 3., (energyZPA+energyZPC), 1.);
1388  //fHist_Corr3p_ZDN_SP_PP[0]->Fill(EvtCent, 4., energyZNA, 1.);
1389  //fHist_Corr3p_ZDN_SP_PP[0]->Fill(EvtCent, 5., energyZNC, 1.);
1390  //fHist_Corr3p_ZDN_SP_PP[0]->Fill(EvtCent, 6., (energyZNA+energyZNC), 1.);
1391  fHist_Corr3p_ZDN_SP_PP[0]->Fill(EvtCent, 7., TwoQpQpV*energyZPA, (uPM*(uPM-1)));
1392  fHist_Corr3p_ZDN_SP_PP[0]->Fill(EvtCent, 8., TwoQpQpV*energyZPC, (uPM*(uPM-1)));
1393  fHist_Corr3p_ZDN_SP_PP[0]->Fill(EvtCent, 9., TwoQpQpV*(energyZPC+energyZPA), (uPM*(uPM-1)));
1394  fHist_Corr3p_ZDN_SP_PP[0]->Fill(EvtCent, 10., TwoQpQpV*energyZNA, (uPM*(uPM-1)));
1395  fHist_Corr3p_ZDN_SP_PP[0]->Fill(EvtCent, 11., TwoQpQpV*energyZNC, (uPM*(uPM-1)));
1396  fHist_Corr3p_ZDN_SP_PP[0]->Fill(EvtCent, 12., TwoQpQpV*(energyZNC+energyZNA), (uPM*(uPM-1)));
1397 
1398  fHist_Corr3p_ZDN_SP_NN[0]->Fill(EvtCent, 0., TwoQnQnV, (uNM*(uNM-1)));
1399  //fHist_Corr3p_ZDN_SP_NN[0]->Fill(EvtCent, 1., energyZPA, 1.);
1400  //fHist_Corr3p_ZDN_SP_NN[0]->Fill(EvtCent, 2., energyZPC, 1.);
1401  //fHist_Corr3p_ZDN_SP_NN[0]->Fill(EvtCent, 3., (energyZPA+energyZPC), 1.);
1402  //fHist_Corr3p_ZDN_SP_NN[0]->Fill(EvtCent, 4., energyZNA, 1.);
1403  //fHist_Corr3p_ZDN_SP_NN[0]->Fill(EvtCent, 5., energyZNC, 1.);
1404  //fHist_Corr3p_ZDN_SP_NN[0]->Fill(EvtCent, 6., (energyZNA+energyZNC), 1.);
1405  fHist_Corr3p_ZDN_SP_NN[0]->Fill(EvtCent, 7., TwoQnQnV*energyZPA, (uNM*(uNM-1)));
1406  fHist_Corr3p_ZDN_SP_NN[0]->Fill(EvtCent, 8., TwoQnQnV*energyZPC, (uNM*(uNM-1)));
1407  fHist_Corr3p_ZDN_SP_NN[0]->Fill(EvtCent, 9., TwoQnQnV*(energyZPC+energyZPA), (uNM*(uNM-1)));
1408  fHist_Corr3p_ZDN_SP_NN[0]->Fill(EvtCent, 10., TwoQnQnV*energyZNA, (uNM*(uNM-1)));
1409  fHist_Corr3p_ZDN_SP_NN[0]->Fill(EvtCent, 11., TwoQnQnV*energyZNC, (uNM*(uNM-1)));
1410  fHist_Corr3p_ZDN_SP_NN[0]->Fill(EvtCent, 12., TwoQnQnV*(energyZNC+energyZNA), (uNM*(uNM-1)));
1411  //-----------------------------------------
1412 
1413 
1414 
1415 
1416  //CME w.r.t V0C EP:
1417  TwoQpQnV = 0.; TwoQpQpV = 0.; TwoQnQnV = 0.;
1418  TwoQpQnV = ((uPRe*uNRe-uPIm*uNIm)*QxcnCor + (uPRe*uNIm+uPIm*uNRe)*QycnCor) / (uPM*uNM) ;
1419  TwoQpQpV = ((uPRe*uPRe-uPIm*uPIm-uP2Re)*QxcnCor + (2.*uPRe*uPIm-uP2Im)*QycnCor) / (uPM*(uPM-1)) ;
1420  TwoQnQnV = ((uNRe*uNRe-uNIm*uNIm-uN2Re)*QxcnCor + (2.*uNRe*uNIm-uN2Im)*QycnCor) / (uNM*(uNM-1)) ;
1421 
1422  //Fill profiles:
1423  fHist_Corr3p_SP_Norm_PN[QAindex][1]->Fill(EvtCent, TwoQpQnV, uPM*uNM);
1424  fHist_Corr3p_SP_Norm_PP[QAindex][1]->Fill(EvtCent, TwoQpQpV, (uPM*(uPM-1)));
1425  fHist_Corr3p_SP_Norm_NN[QAindex][1]->Fill(EvtCent, TwoQnQnV, (uNM*(uNM-1)));
1426 
1427  if(QAindex==0){ //B < 0
1428  //charge pos:
1429  fHist_NonIso_SP_PP_Mag0[1]->Fill(EvtCent, 0.5,uPRe/uPM,uPM); //<Cos(nPhi)> ChPos
1430  fHist_NonIso_SP_PP_Mag0[1]->Fill(EvtCent, 1.5,uPIm/uPM,uPM); //<Sin(nPhi)> ChPos
1431 
1432  QnNonIsoRe = (uPRe*QxcnCor + uPIm*QycnCor)/uPM;
1433  QnNonIsoIm = (uPIm*QxcnCor - uPRe*QycnCor)/uPM;
1434  fHist_NonIso_SP_PP_Mag0[1]->Fill(EvtCent, 2.5,QnNonIsoRe,uPM); //<Cos(nPhi-mPsi)> ChPos
1435  fHist_NonIso_SP_PP_Mag0[1]->Fill(EvtCent, 3.5,QnNonIsoIm,uPM); //<Sin(nPhi-mPsi)> ChPos
1436 
1437  QnNonIsoRe = (uPRe*uPRe-uPIm*uPIm-uP2Re)/(uPM*(uPM-1));
1438  QnNonIsoIm = (2.*uPRe*uPIm-uP2Im)/(uPM*(uPM-1));
1439  fHist_NonIso_SP_PP_Mag0[1]->Fill(EvtCent, 4.5,QnNonIsoRe,(uPM*(uPM-1))); //<Cos(nPhi1+nPhi2)> ChPos
1440  fHist_NonIso_SP_PP_Mag0[1]->Fill(EvtCent, 5.5,QnNonIsoIm,(uPM*(uPM-1))); //<Sin(nPhi1+nPhi2)> ChPos
1441 
1442  QnNonIsoRe = (uPRe*uNRe-uPIm*uNIm)/(uPM*uNM);
1443  QnNonIsoIm = (uPRe*uNIm+uPIm*uNRe)/(uPM*uNM);
1444  fHist_NonIso_SP_PP_Mag0[1]->Fill(EvtCent, 6.5,QnNonIsoRe,(uPM*uNM)); //<Cos(nPhi1+nPhi2)> phi1,phi2 opposite charge
1445  fHist_NonIso_SP_PP_Mag0[1]->Fill(EvtCent, 7.5,QnNonIsoIm,(uPM*uNM)); //<Sin(nPhi1+nPhi2)> phi1,phi2 opposite charge
1446 
1447  fHist_NonIso_SP_PP_Mag0[1]->Fill(EvtCent, 8.5,QxcnCor,uPM); //<Cos(mPsiEP)>
1448  fHist_NonIso_SP_PP_Mag0[1]->Fill(EvtCent, 9.5,QycnCor,uPM); //<Sin(mPsiEP)>
1449 
1450  //charge neg:
1451  fHist_NonIso_SP_NN_Mag0[1]->Fill(EvtCent, 0.5,uNRe/uNM,uNM); //<Cos(nPhi)> ChNeg
1452  fHist_NonIso_SP_NN_Mag0[1]->Fill(EvtCent, 1.5,uNIm/uNM,uNM); //<Sin(nPhi)> ChNeg
1453 
1454  QnNonIsoRe = (uNRe*QxcnCor + uNIm*QycnCor)/uNM;
1455  QnNonIsoIm = (uNIm*QxcnCor - uNRe*QycnCor)/uNM;
1456  fHist_NonIso_SP_NN_Mag0[1]->Fill(EvtCent, 2.5,QnNonIsoRe,uNM); //<Cos(nPhi-mPsi)> ChNeg
1457  fHist_NonIso_SP_NN_Mag0[1]->Fill(EvtCent, 3.5,QnNonIsoIm,uNM); //<Cos(nPhi-mPsi)> ChNeg
1458 
1459  QnNonIsoRe = (uNRe*uNRe-uNIm*uNIm-uN2Re)/(uNM*(uNM-1));
1460  QnNonIsoIm = (2.*uNRe*uNIm-uN2Im)/(uNM*(uNM-1));
1461  fHist_NonIso_SP_NN_Mag0[1]->Fill(EvtCent, 4.5,QnNonIsoRe,(uNM*(uNM-1))); //<Cos(nPhi1+nPhi2)> ChNeg
1462  fHist_NonIso_SP_NN_Mag0[1]->Fill(EvtCent, 5.5,QnNonIsoIm,(uNM*(uNM-1))); //<Sin(nPhi1+nPhi2)> ChNeg
1463 
1464  QnNonIsoRe = (uPRe*uNRe-uPIm*uNIm)/(uPM*uNM);
1465  QnNonIsoIm = (uPRe*uNIm+uPIm*uNRe)/(uPM*uNM);
1466  fHist_NonIso_SP_NN_Mag0[1]->Fill(EvtCent, 6.5,QnNonIsoRe,(uPM*uNM)); //<Cos(nPhi1+nPhi2)> phi1,phi2 opposite charge
1467  fHist_NonIso_SP_NN_Mag0[1]->Fill(EvtCent, 7.5,QnNonIsoIm,(uPM*uNM)); //<Sin(nPhi1+nPhi2)> phi1,phi2 opposite charge
1468 
1469  fHist_NonIso_SP_NN_Mag0[1]->Fill(EvtCent, 8.5,QxcnCor,uNM); //<Cos(mPsiEP)>
1470  fHist_NonIso_SP_NN_Mag0[1]->Fill(EvtCent, 9.5,QycnCor,uNM); //<Sin(mPsiEP)>
1471  }
1472  else if(QAindex==1) { //B > 0
1473  //charge pos:
1474  fHist_NonIso_SP_PP_Mag1[1]->Fill(EvtCent, 0.5,uPRe/uPM,uPM); //<Cos(nPhi)> ChPos
1475  fHist_NonIso_SP_PP_Mag1[1]->Fill(EvtCent, 1.5,uPIm/uPM,uPM); //<Sin(nPhi)> ChPos
1476 
1477  QnNonIsoRe = (uPRe*QxcnCor + uPIm*QycnCor)/uPM;
1478  QnNonIsoIm = (uPIm*QxcnCor - uPRe*QycnCor)/uPM;
1479  fHist_NonIso_SP_PP_Mag1[1]->Fill(EvtCent, 2.5,QnNonIsoRe,uPM); //<Cos(nPhi-mPsi)> ChPos
1480  fHist_NonIso_SP_PP_Mag1[1]->Fill(EvtCent, 3.5,QnNonIsoIm,uPM); //<Sin(nPhi-mPsi)> ChPos
1481 
1482  QnNonIsoRe = (uPRe*uPRe-uPIm*uPIm-uP2Re)/(uPM*(uPM-1));
1483  QnNonIsoIm = (2.*uPRe*uPIm-uP2Im)/(uPM*(uPM-1));
1484  fHist_NonIso_SP_PP_Mag1[1]->Fill(EvtCent, 4.5,QnNonIsoRe,(uPM*(uPM-1))); //<Cos(nPhi1+nPhi2)> ChPos
1485  fHist_NonIso_SP_PP_Mag1[1]->Fill(EvtCent, 5.5,QnNonIsoIm,(uPM*(uPM-1))); //<Sin(nPhi1+nPhi2)> ChPos
1486 
1487  QnNonIsoRe = (uPRe*uNRe-uPIm*uNIm)/(uPM*uNM);
1488  QnNonIsoIm = (uPRe*uNIm+uPIm*uNRe)/(uPM*uNM);
1489  fHist_NonIso_SP_PP_Mag1[1]->Fill(EvtCent, 6.5,QnNonIsoRe,(uPM*uNM)); //<Cos(nPhi1+nPhi2)> phi1,phi2 opposite charge
1490  fHist_NonIso_SP_PP_Mag1[1]->Fill(EvtCent, 7.5,QnNonIsoIm,(uPM*uNM)); //<Sin(nPhi1+nPhi2)> phi1,phi2 opposite charge
1491 
1492  fHist_NonIso_SP_PP_Mag1[1]->Fill(EvtCent, 8.5,QxcnCor,uPM); //<Cos(mPsiEP)>
1493  fHist_NonIso_SP_PP_Mag1[1]->Fill(EvtCent, 9.5,QycnCor,uPM); //<Sin(mPsiEP)>
1494 
1495  //charge neg:
1496  fHist_NonIso_SP_NN_Mag1[1]->Fill(EvtCent, 0.5,uNRe/uNM,uNM); //<Cos(nPhi)> ChNeg
1497  fHist_NonIso_SP_NN_Mag1[1]->Fill(EvtCent, 1.5,uNIm/uNM,uNM); //<Sin(nPhi)> ChNeg
1498 
1499  QnNonIsoRe = (uNRe*QxcnCor + uNIm*QycnCor)/uNM;
1500  QnNonIsoIm = (uNIm*QxcnCor - uNRe*QycnCor)/uNM;
1501  fHist_NonIso_SP_NN_Mag1[1]->Fill(EvtCent, 2.5,QnNonIsoRe,uNM); //<Cos(nPhi-mPsi)> ChNeg
1502  fHist_NonIso_SP_NN_Mag1[1]->Fill(EvtCent, 3.5,QnNonIsoIm,uNM); //<Cos(nPhi-mPsi)> ChNeg
1503 
1504  QnNonIsoRe = (uNRe*uNRe-uNIm*uNIm-uN2Re)/(uNM*(uNM-1));
1505  QnNonIsoIm = (2.*uNRe*uNIm-uN2Im)/(uNM*(uNM-1));
1506  fHist_NonIso_SP_NN_Mag1[1]->Fill(EvtCent, 4.5,QnNonIsoRe,(uNM*(uNM-1))); //<Cos(nPhi1+nPhi2)> ChNeg
1507  fHist_NonIso_SP_NN_Mag1[1]->Fill(EvtCent, 5.5,QnNonIsoIm,(uNM*(uNM-1))); //<Sin(nPhi1+nPhi2)> ChNeg
1508 
1509  QnNonIsoRe = (uPRe*uNRe-uPIm*uNIm)/(uPM*uNM);
1510  QnNonIsoIm = (uPRe*uNIm+uPIm*uNRe)/(uPM*uNM);
1511  fHist_NonIso_SP_NN_Mag1[1]->Fill(EvtCent, 6.5,QnNonIsoRe,(uPM*uNM)); //<Cos(nPhi1+nPhi2)> phi1,phi2 opposite charge
1512  fHist_NonIso_SP_NN_Mag1[1]->Fill(EvtCent, 7.5,QnNonIsoIm,(uPM*uNM)); //<Sin(nPhi1+nPhi2)> phi1,phi2 opposite charge
1513 
1514  fHist_NonIso_SP_NN_Mag1[1]->Fill(EvtCent, 8.5,QxcnCor,uNM); //<Cos(mPsiEP)>
1515  fHist_NonIso_SP_NN_Mag1[1]->Fill(EvtCent, 9.5,QycnCor,uNM); //<Sin(mPsiEP)>
1516  }
1517 
1518 
1519  //-------- CME - ZDN correlators:---------
1520  fHist_Corr3p_ZDN_SP_PN[1]->Fill(EvtCent, 0., TwoQpQnV, uPM*uNM);
1521  fHist_Corr3p_ZDN_SP_PN[1]->Fill(EvtCent, 1., energyZPA, 1.);
1522  fHist_Corr3p_ZDN_SP_PN[1]->Fill(EvtCent, 2., energyZPC, 1.);
1523  fHist_Corr3p_ZDN_SP_PN[1]->Fill(EvtCent, 3., (energyZPA+energyZPC), 1.);
1524  fHist_Corr3p_ZDN_SP_PN[1]->Fill(EvtCent, 4., energyZNA, 1.);
1525  fHist_Corr3p_ZDN_SP_PN[1]->Fill(EvtCent, 5., energyZNC, 1.);
1526  fHist_Corr3p_ZDN_SP_PN[1]->Fill(EvtCent, 6., (energyZNA+energyZNC), 1.);
1527  fHist_Corr3p_ZDN_SP_PN[1]->Fill(EvtCent, 7., TwoQpQnV*energyZPA, uPM*uNM);
1528  fHist_Corr3p_ZDN_SP_PN[1]->Fill(EvtCent, 8., TwoQpQnV*energyZPC, uPM*uNM);
1529  fHist_Corr3p_ZDN_SP_PN[1]->Fill(EvtCent, 9., TwoQpQnV*(energyZPC+energyZPA), uPM*uNM);
1530  fHist_Corr3p_ZDN_SP_PN[1]->Fill(EvtCent, 10., TwoQpQnV*energyZNA, uPM*uNM);
1531  fHist_Corr3p_ZDN_SP_PN[1]->Fill(EvtCent, 11., TwoQpQnV*energyZNC, uPM*uNM);
1532  fHist_Corr3p_ZDN_SP_PN[1]->Fill(EvtCent, 12., TwoQpQnV*(energyZNC+energyZNA), uPM*uNM);
1533 
1534  fHist_Corr3p_ZDN_SP_PP[1]->Fill(EvtCent, 0., TwoQpQpV, (uPM*(uPM-1)));
1535  //fHist_Corr3p_ZDN_SP_PP[1]->Fill(EvtCent, 1., energyZPA, 1.);
1536  //fHist_Corr3p_ZDN_SP_PP[1]->Fill(EvtCent, 2., energyZPC, 1.);
1537  //fHist_Corr3p_ZDN_SP_PP[1]->Fill(EvtCent, 3., (energyZPA+energyZPC), 1.);
1538  //fHist_Corr3p_ZDN_SP_PP[1]->Fill(EvtCent, 4., energyZNA, 1.);
1539  //fHist_Corr3p_ZDN_SP_PP[1]->Fill(EvtCent, 5., energyZNC, 1.);
1540  //fHist_Corr3p_ZDN_SP_PP[1]->Fill(EvtCent, 6., (energyZNA+energyZNC), 1.);
1541  fHist_Corr3p_ZDN_SP_PP[1]->Fill(EvtCent, 7., TwoQpQpV*energyZPA, (uPM*(uPM-1)));
1542  fHist_Corr3p_ZDN_SP_PP[1]->Fill(EvtCent, 8., TwoQpQpV*energyZPC, (uPM*(uPM-1)));
1543  fHist_Corr3p_ZDN_SP_PP[1]->Fill(EvtCent, 9., TwoQpQpV*(energyZPC+energyZPA), (uPM*(uPM-1)));
1544  fHist_Corr3p_ZDN_SP_PP[1]->Fill(EvtCent, 10., TwoQpQpV*energyZNA, (uPM*(uPM-1)));
1545  fHist_Corr3p_ZDN_SP_PP[1]->Fill(EvtCent, 11., TwoQpQpV*energyZNC, (uPM*(uPM-1)));
1546  fHist_Corr3p_ZDN_SP_PP[1]->Fill(EvtCent, 12., TwoQpQpV*(energyZNC+energyZNA), (uPM*(uPM-1)));
1547 
1548  fHist_Corr3p_ZDN_SP_NN[1]->Fill(EvtCent, 0., TwoQnQnV, (uNM*(uNM-1)));
1549  //fHist_Corr3p_ZDN_SP_NN[1]->Fill(EvtCent, 1., energyZPA, 1.);
1550  //fHist_Corr3p_ZDN_SP_NN[1]->Fill(EvtCent, 2., energyZPC, 1.);
1551  //fHist_Corr3p_ZDN_SP_NN[1]->Fill(EvtCent, 3., (energyZPA+energyZPC), 1.);
1552  //fHist_Corr3p_ZDN_SP_NN[1]->Fill(EvtCent, 4., energyZNA, 1.);
1553  //fHist_Corr3p_ZDN_SP_NN[1]->Fill(EvtCent, 5., energyZNC, 1.);
1554  //fHist_Corr3p_ZDN_SP_NN[1]->Fill(EvtCent, 6., (energyZNA+energyZNC), 1.);
1555  fHist_Corr3p_ZDN_SP_NN[1]->Fill(EvtCent, 7., TwoQnQnV*energyZPA, (uNM*(uNM-1)));
1556  fHist_Corr3p_ZDN_SP_NN[1]->Fill(EvtCent, 8., TwoQnQnV*energyZPC, (uNM*(uNM-1)));
1557  fHist_Corr3p_ZDN_SP_NN[1]->Fill(EvtCent, 9., TwoQnQnV*(energyZPC+energyZPA), (uNM*(uNM-1)));
1558  fHist_Corr3p_ZDN_SP_NN[1]->Fill(EvtCent, 10., TwoQnQnV*energyZNA, (uNM*(uNM-1)));
1559  fHist_Corr3p_ZDN_SP_NN[1]->Fill(EvtCent, 11., TwoQnQnV*energyZNC, (uNM*(uNM-1)));
1560  fHist_Corr3p_ZDN_SP_NN[1]->Fill(EvtCent, 12., TwoQnQnV*(energyZNC+energyZNA), (uNM*(uNM-1)));
1561  //-----------------------------------------
1562 
1563 
1564  //Fill Mult, POIs vs cent:
1565 
1566  fAvgMultCentRun->Fill(EvtCent,runindex,nRefMult);
1567  fAvgWgtMultCentRun->Fill(EvtCent,runindex,nRefMultWgt);
1568  fAvgPOIposCentRun->Fill(EvtCent,runindex,uPM);
1569  fAvgPOInegCentRun->Fill(EvtCent,runindex,uNM);
1570  fAvgPOIPPCentRun->Fill(EvtCent,runindex,(uPM*(uPM-1)));
1571  fAvgPOINNCentRun->Fill(EvtCent,runindex,(uNM*(uNM-1)));
1572  fAvgPOIOSCentRun->Fill(EvtCent,runindex,uPM*uNM);
1573 
1574 
1575  //------------ eta depedence -----------------
1576  Double_t fEtaCent = -100.;
1577 
1578  for(int ie=0; ie<16; ie++){
1579 
1580  uPM = MPOIposQAEta[ie];
1581  uNM = MPOInegQAEta[ie];
1582 
1583  if(uPM>1 && uNM>1){
1584 
1585  uPRe = QxPosQAEta[ie];
1586  uNRe = QxNegQAEta[ie];
1587  uPIm = QyPosQAEta[ie];
1588  uNIm = QyNegQAEta[ie];
1589 
1590  uP2Re = QxAutoPosQAEta[ie];
1591  uP2Im = QyAutoPosQAEta[ie];
1592  uN2Re = QxAutoNegQAEta[ie];
1593  uN2Im = QyAutoNegQAEta[ie];
1594 
1595 
1596  fEtaCent = fEtaBinFinderForQA->GetBinCenter(ie+1);
1597 
1598  //w.r.t V0A:
1599  TwoQpQnV = 0.; TwoQpQpV = 0.; TwoQnQnV = 0.;
1600  TwoQpQnV = ((uPRe*uNRe-uPIm*uNIm)*QxanCor + (uPRe*uNIm+uPIm*uNRe)*QyanCor) / (uPM*uNM) ;
1601  TwoQpQpV = ((uPRe*uPRe-uPIm*uPIm-uP2Re)*QxanCor + (2.*uPRe*uPIm-uP2Im)*QyanCor) / (uPM*(uPM-1.)) ;
1602  TwoQnQnV = ((uNRe*uNRe-uNIm*uNIm-uN2Re)*QxanCor + (2.*uNRe*uNIm-uN2Im)*QyanCor) / (uNM*(uNM-1.)) ;
1603 
1604  fHist_Corr3p_QAEta_SP_V0A_PN[QAindex]->Fill(fEtaCent,TwoQpQnV,uPM*uNM);
1605  fHist_Corr3p_QAEta_SP_V0A_PP[QAindex]->Fill(fEtaCent,TwoQpQpV,uPM*(uPM-1.));
1606  fHist_Corr3p_QAEta_SP_V0A_NN[QAindex]->Fill(fEtaCent,TwoQnQnV,uNM*(uNM-1.));
1607 
1608  //w.r.t V0C:
1609  TwoQpQnV = 0.; TwoQpQpV = 0.; TwoQnQnV = 0.;
1610  TwoQpQnV = ((uPRe*uNRe-uPIm*uNIm)*QxcnCor + (uPRe*uNIm+uPIm*uNRe)*QycnCor) / (uPM*uNM) ;
1611  TwoQpQpV = ((uPRe*uPRe-uPIm*uPIm-uP2Re)*QxcnCor + (2.*uPRe*uPIm-uP2Im)*QycnCor) / (uPM*(uPM-1.)) ;
1612  TwoQnQnV = ((uNRe*uNRe-uNIm*uNIm-uN2Re)*QxcnCor + (2.*uNRe*uNIm-uN2Im)*QycnCor) / (uNM*(uNM-1.)) ;
1613 
1614  fHist_Corr3p_QAEta_SP_V0C_PN[QAindex]->Fill(fEtaCent,TwoQpQnV,uPM*uNM);
1615  fHist_Corr3p_QAEta_SP_V0C_PP[QAindex]->Fill(fEtaCent,TwoQpQpV,uPM*(uPM-1.));
1616  fHist_Corr3p_QAEta_SP_V0C_NN[QAindex]->Fill(fEtaCent,TwoQnQnV,uNM*(uNM-1.));
1617  }
1618  }
1619  //---------------------------------------
1620 
1621 
1622 
1623 
1624 
1625  //V0A-V0C SP resolution:
1626  fHist_Reso2n_SP_Norm_Det[QAindex][0]->Fill(EvtCent, (QxcnCor*QxanCor+QycnCor*QyanCor));
1627  //V0A-TPC SP resolution:
1628  fHist_Reso2n_SP_Norm_Det[QAindex][1]->Fill(EvtCent, (QTPCRe*QxanCor+QTPCIm*QyanCor));
1629  //V0C-TPC SP resolution:
1630  fHist_Reso2n_SP_Norm_Det[QAindex][2]->Fill(EvtCent, (QTPCRe*QxcnCor+QTPCIm*QycnCor));
1631 
1632  //V0A-V0C:
1633  fHist_Reso2n_ZDN_SP_Det[0]->Fill(EvtCent, 0., (QxcnCor*QxanCor+QycnCor*QyanCor));
1634  fHist_Reso2n_ZDN_SP_Det[0]->Fill(EvtCent, 1., (QxcnCor*QxanCor+QycnCor*QyanCor)*energyZPA);
1635  fHist_Reso2n_ZDN_SP_Det[0]->Fill(EvtCent, 2., (QxcnCor*QxanCor+QycnCor*QyanCor)*energyZPC);
1636  fHist_Reso2n_ZDN_SP_Det[0]->Fill(EvtCent, 3., (QxcnCor*QxanCor+QycnCor*QyanCor)*(energyZPA+energyZPC));
1637  fHist_Reso2n_ZDN_SP_Det[0]->Fill(EvtCent, 4., (QxcnCor*QxanCor+QycnCor*QyanCor)*energyZNA);
1638  fHist_Reso2n_ZDN_SP_Det[0]->Fill(EvtCent, 5., (QxcnCor*QxanCor+QycnCor*QyanCor)*energyZNC);
1639  fHist_Reso2n_ZDN_SP_Det[0]->Fill(EvtCent, 6., (QxcnCor*QxanCor+QycnCor*QyanCor)*(energyZNA+energyZNC));
1640 
1641  //V0A-TPC
1642  fHist_Reso2n_ZDN_SP_Det[1]->Fill(EvtCent, 0., (QTPCRe*QxanCor+QTPCIm*QyanCor));
1643  fHist_Reso2n_ZDN_SP_Det[1]->Fill(EvtCent, 1., (QTPCRe*QxanCor+QTPCIm*QyanCor)*energyZPA);
1644  fHist_Reso2n_ZDN_SP_Det[1]->Fill(EvtCent, 2., (QTPCRe*QxanCor+QTPCIm*QyanCor)*energyZPC);
1645  fHist_Reso2n_ZDN_SP_Det[1]->Fill(EvtCent, 3., (QTPCRe*QxanCor+QTPCIm*QyanCor)*(energyZPA+energyZPC));
1646  fHist_Reso2n_ZDN_SP_Det[1]->Fill(EvtCent, 4., (QTPCRe*QxanCor+QTPCIm*QyanCor)*energyZNA);
1647  fHist_Reso2n_ZDN_SP_Det[1]->Fill(EvtCent, 5., (QTPCRe*QxanCor+QTPCIm*QyanCor)*energyZNC);
1648  fHist_Reso2n_ZDN_SP_Det[1]->Fill(EvtCent, 6., (QTPCRe*QxanCor+QTPCIm*QyanCor)*(energyZNA+energyZNC));
1649 
1650  //V0C-TPC
1651  fHist_Reso2n_ZDN_SP_Det[2]->Fill(EvtCent, 0., (QTPCRe*QxcnCor+QTPCIm*QycnCor));
1652  fHist_Reso2n_ZDN_SP_Det[2]->Fill(EvtCent, 1., (QTPCRe*QxcnCor+QTPCIm*QycnCor)*energyZPA);
1653  fHist_Reso2n_ZDN_SP_Det[2]->Fill(EvtCent, 2., (QTPCRe*QxcnCor+QTPCIm*QycnCor)*energyZPC);
1654  fHist_Reso2n_ZDN_SP_Det[2]->Fill(EvtCent, 3., (QTPCRe*QxcnCor+QTPCIm*QycnCor)*(energyZPA+energyZPC));
1655  fHist_Reso2n_ZDN_SP_Det[2]->Fill(EvtCent, 1., (QTPCRe*QxcnCor+QTPCIm*QycnCor)*energyZNA);
1656  fHist_Reso2n_ZDN_SP_Det[2]->Fill(EvtCent, 2., (QTPCRe*QxcnCor+QTPCIm*QycnCor)*energyZNC);
1657  fHist_Reso2n_ZDN_SP_Det[2]->Fill(EvtCent, 3., (QTPCRe*QxcnCor+QTPCIm*QycnCor)*(energyZNA+energyZNC));
1658 
1659  }//---- SP method -------
1660 
1661 
1662  PostData(1,fListHistos);
1663  PostData(2,fListCalibs);
1664 
1665  fHist_Event_count->Fill(9.5);
1666 
1667 //if(fievent%20==0) {
1668  //cout<<"irun = "<<runindex<<" n "<<n<<" m = "<<m<<" p = "<<p<<" cent= "<<EvtCent<<"\tiCentSPD = "<<iCentSPD<<"\tsumMa= "<<sumMa<<"\tQxA = "<<QxanCor<<endl;
1669  //cout<<" cent= "<<EvtCent<<"\teZNC= "<<energyZNC<<"\teZPC = "<<energyZPC<<"\teZNA= "<<energyZNA<<"\teZPA = "<<energyZPA<<endl;
1670 //}
1671 
1672  fievent++;
1673 
1674 }
1675 //======================= UserExec done =========================
1676 
1677 
1678 
1680 {
1681  AliDebug(2,"\n ... AliAnalysisTaskCMEV0::Terminate() is being called ... \n");
1682 }
1683 
1684 
1685 
1686 
1687 
1688 
1689 
1690 
1691 
1692 
1693 
1694 
1695 
1696 void AliAnalysisTaskCMEV0::GetV0QvectAndMult(const AliAODVZERO *aodV0,Float_t fHarmonic, Double_t& Qxan,Double_t& Qyan,Double_t& sumMa,Double_t& Qxcn,Double_t& Qycn,Double_t& sumMc)
1697 {
1698  for(Int_t iV0 = 0; iV0 < 64; iV0++) {
1699  /*if(fRemChV0A){
1700  if(iV0 == 46)
1701  continue;
1702  }*/
1703  Double_t phiV0 = TMath::PiOver4()*(0.5 + iV0 % 8);
1704  Float_t multv0 = aodV0->GetMultiplicity(iV0);
1705 
1706  if(iV0 < 32) {
1707  Double_t multCorC = -10;
1708 
1709  if(iV0 < 8)
1710  multCorC = multv0/fMultV0->GetBinContent(iV0+1)*fMultV0->GetBinContent(1);
1711  else if(iV0 >= 8 && iV0 < 16)
1712  multCorC = multv0/fMultV0->GetBinContent(iV0+1)*fMultV0->GetBinContent(9);
1713  else if(iV0 >= 16 && iV0 < 24)
1714  multCorC = multv0/fMultV0->GetBinContent(iV0+1)*fMultV0->GetBinContent(17);
1715  else if(iV0 >= 24 && iV0 < 32)
1716  multCorC = multv0/fMultV0->GetBinContent(iV0+1)*fMultV0->GetBinContent(25);
1717 
1718  if(multCorC < 0){
1719  cout<<"Problem with multiplicity in V0C"<<endl;
1720  continue;
1721  }
1722  Qxcn += TMath::Cos(fHarmonic*phiV0) * multCorC;
1723  Qycn += TMath::Sin(fHarmonic*phiV0) * multCorC;
1724 
1725  sumMc = sumMc + multCorC;
1726  }
1727  else{
1728  Double_t multCorA = -10;
1729 
1730  if(iV0 >= 32 && iV0 < 40)
1731  multCorA = multv0/fMultV0->GetBinContent(iV0+1)*fMultV0->GetBinContent(33);
1732  else if(iV0 >= 40 && iV0 < 48)
1733  multCorA = multv0/fMultV0->GetBinContent(iV0+1)*fMultV0->GetBinContent(41);
1734  else if(iV0 >= 48 && iV0 < 56)
1735  multCorA = multv0/fMultV0->GetBinContent(iV0+1)*fMultV0->GetBinContent(49);
1736  else if(iV0 >= 56 && iV0 < 64)
1737  multCorA = multv0/fMultV0->GetBinContent(iV0+1)*fMultV0->GetBinContent(57);
1738 
1739  if(multCorA < 0){
1740  cout<<"Problem with multiplicity in V0A"<<endl;
1741  continue;
1742  }
1743  Qxan += TMath::Cos(fHarmonic*phiV0) * multCorA;
1744  Qyan += TMath::Sin(fHarmonic*phiV0) * multCorA;
1745 
1746  sumMa = sumMa + multCorA;
1747  }
1748  }
1749 }//-------- Get V0 QVect and Multiplicity -----
1750 
1752 {
1753  if(fListZDNCorr){
1754  fHCorrectZDNP = (TH2D *) fListZDNCorr->FindObject(Form("fHist_ZDC_All_Wgt_VsCent_Run%d",run));
1755  }
1756  else{
1757  fHCorrectZDNP = NULL;
1758  printf("\n\n ********** ZDC Wgt Histograms NotFound ***************\n\n");
1759  exit(1);
1760  }
1761 }
1762 
1764 {
1765 
1766  //old method
1767  /*
1768  Int_t centBin = -1;
1769  if(cent<5.0){ centBin = 0;}
1770  else if(cent>=5.0 && cent<10.0){centBin = 1;}
1771  else if(cent>=10.0 && cent<40.0){centBin = 2;}
1772  else if(cent>=40.0) {centBin = 3;}
1773  if(fListNUACorr){
1774  fHCorrectNUApos = (TH3D *) fListNUACorr->FindObject(Form("fHist_NUA_VzPhiEta_Pos_Cent%d_Run%d",centBin,run));
1775  fHCorrectNUAneg = (TH3D *) fListNUACorr->FindObject(Form("fHist_NUA_VzPhiEta_Neg_Cent%d_Run%d",centBin,run));
1776  } */
1777 
1778  if(sfileNUA=="NewR" && fListNUACorr){
1779  for(int i=0;i<4;i++){
1780  fHCorrectNUApos[i] = (TH3D *) fListNUACorr->FindObject(Form("fHist_NUA_VzPhiEta_Pos_Cent%d_Run%d",i,run));
1781  fHCorrectNUAneg[i] = (TH3D *) fListNUACorr->FindObject(Form("fHist_NUA_VzPhiEta_Neg_Cent%d_Run%d",i,run));
1782  }
1783  //cout<<"\n sfileNUA = "<<sfileNUA<<" opening Rihan's NUA file.\n "<<endl;
1784  }
1785  else if(sfileNUA=="NewPt"|| sfileNUA=="NewpT"){
1786  if(fListNUACorr){
1787  for(int i=0;i<4;i++){
1788  fHCorrectNUApos[i] = (TH3D *) fListNUACorr->FindObject(Form("fHist_NUA_pTPhiEta_Pos_Vz%d_Run%d",i,run));
1789  fHCorrectNUAneg[i] = (TH3D *) fListNUACorr->FindObject(Form("fHist_NUA_pTPhiEta_Neg_Vz%d_Run%d",i,run));
1790  }
1791  }
1792  }
1793  else if(sfileNUA=="OldJ") {//from Jacopo's NUA file:
1794  if(!gGrid){
1795  TGrid::Connect("alien://");
1796  }
1797  if(!fileNUApos){
1798  fileNUApos = TFile::Open("alien:///alice/cern.ch/user/m/mhaque/calib_files/15oHI_FB768_PosCh_CenPhiEtaWeights_VtxRbR.root");
1799  mListNUAPos = dynamic_cast<TList*> (fileNUApos->FindObjectAny("CenPhiEta Weights"));
1800  }
1801  if(!fileNUAneg){
1802  fileNUAneg = TFile::Open("alien:///alice/cern.ch/user/m/mhaque/calib_files/15oHI_FB768_NegCh_CenPhiEtaWeights_VtxRbR.root");
1803  mListNUANeg = dynamic_cast<TList*> (fileNUAneg->FindObjectAny("CenPhiEta Weights"));
1804  }
1805  if(mListNUAPos){
1806  for(int i=0;i<4;i++){
1807  fHCorrectNUApos[i] = (TH3D *) mListNUAPos->FindObject(Form("CRCQVecPhiHistVtx[%d][%d]",i,run));
1808  }
1809  }
1810  if(mListNUANeg){
1811  for(int i=0;i<4;i++){
1812  fHCorrectNUAneg[i] = (TH3D *) mListNUANeg->FindObject(Form("CRCQVecPhiHistVtx[%d][%d]",i,run));
1813  }
1814  }
1815  }
1816 
1817 
1818  if(!fHCorrectNUApos[0] || !fHCorrectNUAneg[0]){
1819  printf("\n\n ******** could not open NUA Histograms for run %d, Use Wgt = 1.0 *********\n\n",run);
1820  if(sfileNUA=="OldJ"|| sfileNUA=="NewR"){
1821  for(int i=0;i<4;i++){
1822  fHCorrectNUApos[i] = new TH3D(Form("fHCorrectNUApos_cent%d",i),"",1,-10,10,1,0,6.284,1,-0.9,0.9);
1823  fHCorrectNUAneg[i] = new TH3D(Form("fHCorrectNUAneg_cent%d",i),"",1,-10,10,1,0,6.284,1,-0.9,0.9);
1824  fHCorrectNUApos[i]->SetBinContent(1,1,1,1.0);
1825  fHCorrectNUAneg[i]->SetBinContent(1,1,1,1.0);
1826  //exit(1);
1827  }
1828  }
1829  else if(sfileNUA=="NewPt"|| sfileNUA=="NewpT"){
1830  for(int i=0;i<4;i++){
1831  fHCorrectNUApos[i] = new TH3D(Form("fHCorrectNUApos_cent%d",i),"",1,0,10,1,0,6.284,1,-0.9,0.9);
1832  fHCorrectNUAneg[i] = new TH3D(Form("fHCorrectNUAneg_cent%d",i),"",1,0,10,1,0,6.284,1,-0.9,0.9);
1833  fHCorrectNUApos[i]->SetBinContent(1,1,1,1.0);
1834  fHCorrectNUAneg[i]->SetBinContent(1,1,1,1.0);
1835  //exit(1);
1836  }
1837  }
1838  }
1839 }
1840 
1841 
1842 
1844 {
1845  if(!gGrid){
1846  TGrid::Connect("alien://");
1847  }
1848 
1849  TFile* foadb = 0;
1850  //if(!fRemChV0A)
1851  foadb = TFile::Open("alien:///alice/cern.ch/user/a/adobrin/calibV0HIR.root");
1852  //else
1853  //foadb = TFile::Open("alien:///alice/cern.ch/user/a/adobrin/calibV0HIRNoCh46V0A.root");
1854 
1855  if(!foadb){
1856  printf("OADB V0 calibration file cannot be opened\n");
1857  return;
1858  }
1859 
1860  AliOADBContainer* cont = (AliOADBContainer*) foadb->Get("hMultV0BefCorPfpx");
1861  if(!cont){
1862  printf("OADB object hMultV0BefCorr is not available in the file\n");
1863  return;
1864  }
1865  if(!(cont->GetObject(run))){
1866  printf("OADB object hMultV0BefCorPfpx is not available for run %i\n", run);
1867  return;
1868  }
1869  fMultV0 = ((TH1D*) cont->GetObject(run));
1870 
1871  AliOADBContainer* contQxnam = 0;
1872  if (fHarmonic == 2.)
1873  contQxnam = (AliOADBContainer*) foadb->Get("fqxa2m");
1874  else
1875  contQxnam = (AliOADBContainer*) foadb->Get("fqxa3m");
1876 
1877  if(!contQxnam){
1878  printf("OADB object fqxanm is not available in the file\n");
1879  return;
1880  }
1881  if(!(contQxnam->GetObject(run))){
1882  printf("OADB object fqxanm is not available for run %i\n", run);
1883  return;
1884  }
1885  fQxnmV0A = ((TH1D*) contQxnam->GetObject(run));
1886 
1887  AliOADBContainer* contQynam = 0;
1888  if (fHarmonic == 2.)
1889  contQynam = (AliOADBContainer*) foadb->Get("fqya2m");
1890  else if (fHarmonic == 3.)
1891  contQynam = (AliOADBContainer*) foadb->Get("fqya3m");
1892  else if (fHarmonic == 4.)
1893  contQynam = (AliOADBContainer*) foadb->Get("fqya4m");
1894 
1895  if(!contQynam){
1896  printf("OADB object fqyanm is not available in the file\n");
1897  return;
1898  }
1899  if(!(contQynam->GetObject(run))){
1900  printf("OADB object fqyanm is not available for run %i\n", run);
1901  return;
1902  }
1903  fQynmV0A = ((TH1D*) contQynam->GetObject(run));
1904 
1905  AliOADBContainer* contQxnas = 0;
1906  if (fHarmonic == 2.)
1907  contQxnas = (AliOADBContainer*) foadb->Get("fqxa2s");
1908  else
1909  contQxnas = (AliOADBContainer*) foadb->Get("fqxa3s");
1910 
1911  if(!contQxnas){
1912  printf("OADB object fqxans is not available in the file\n");
1913  return;
1914  }
1915  if(!(contQxnas->GetObject(run))){
1916  printf("OADB object fqxans is not available for run %i\n", run);
1917  return;
1918  }
1919  fQxnsV0A = ((TH1D*) contQxnas->GetObject(run));
1920 
1921  AliOADBContainer* contQynas = 0;
1922  if (fHarmonic == 2.)
1923  contQynas = (AliOADBContainer*) foadb->Get("fqya2s");
1924  else if (fHarmonic == 3.)
1925  contQynas = (AliOADBContainer*) foadb->Get("fqya3s");
1926  else if (fHarmonic == 4.)
1927  contQynas = (AliOADBContainer*) foadb->Get("fqya4s");
1928 
1929  if(!contQynas){
1930  printf("OADB object fqyans is not available in the file\n");
1931  return;
1932  }
1933  if(!(contQynas->GetObject(run))){
1934  printf("OADB object fqyans is not available for run %i\n", run);
1935  return;
1936  }
1937  fQynsV0A = ((TH1D*) contQynas->GetObject(run));
1938 
1939 
1940 
1941  AliOADBContainer* contQxncm = 0;
1942  if (fHarmonic == 2.)
1943  contQxncm = (AliOADBContainer*) foadb->Get("fqxc2m");
1944  else
1945  contQxncm = (AliOADBContainer*) foadb->Get("fqxc3m");
1946 
1947  if(!contQxncm){
1948  printf("OADB object fqxcnm is not available in the file\n");
1949  return;
1950  }
1951  if(!(contQxncm->GetObject(run))){
1952  printf("OADB object fqxcnm is not available for run %i\n", run);
1953  return;
1954  }
1955  fQxnmV0C = ((TH1D*) contQxncm->GetObject(run));
1956 
1957 
1958 
1959  AliOADBContainer* contQyncm = 0;
1960  if (fHarmonic == 2.)
1961  contQyncm = (AliOADBContainer*) foadb->Get("fqyc2m");
1962  else if (fHarmonic == 3.)
1963  contQyncm = (AliOADBContainer*) foadb->Get("fqyc3m");
1964  else if (fHarmonic == 4.)
1965  contQyncm = (AliOADBContainer*) foadb->Get("fqyc4m");
1966 
1967  if(!contQyncm){
1968  printf("OADB object fqyc2m is not available in the file\n");
1969  return;
1970  }
1971  if(!(contQyncm->GetObject(run))){
1972  printf("OADB object fqyc2m is not available for run %i\n", run);
1973  return;
1974  }
1975  fQynmV0C = ((TH1D*) contQyncm->GetObject(run));
1976 
1977 
1978  AliOADBContainer* contQxncs = 0;
1979  if (fHarmonic == 2.)
1980  contQxncs = (AliOADBContainer*) foadb->Get("fqxc2s");
1981  else
1982  contQxncs = (AliOADBContainer*) foadb->Get("fqxc3s");
1983 
1984  if(!contQxncs){
1985  printf("OADB object fqxc2s is not available in the file\n");
1986  return;
1987  }
1988  if(!(contQxncs->GetObject(run))){
1989  printf("OADB object fqxc2s is not available for run %i\n", run);
1990  return;
1991  }
1992  fQxnsV0C = ((TH1D*) contQxncs->GetObject(run));
1993 
1994 
1995  AliOADBContainer* contQyncs = 0;
1996  if (fHarmonic == 2.)
1997  contQyncs = (AliOADBContainer*) foadb->Get("fqyc2s");
1998  else if (fHarmonic == 3.)
1999  contQyncs = (AliOADBContainer*) foadb->Get("fqyc3s");
2000  else if (fHarmonic == 4.)
2001  contQyncs = (AliOADBContainer*) foadb->Get("fqyc4s");
2002 
2003  if(!contQyncs){
2004  printf("OADB object fqycnm is not available in the file\n");
2005  return;
2006  }
2007  if(!(contQyncs->GetObject(run))){
2008  printf("OADB object fqycns is not available for run %i\n", run);
2009  return;
2010  }
2011  fQynsV0C = ((TH1D*) contQyncs->GetObject(run));
2012 }//------- OADB container ------
2013 
2014 
2015 
2016 
2017 double AliAnalysisTaskCMEV0::GetWDist(const AliVVertex* v0, const AliVVertex* v1)
2018 {
2019  // calculate sqrt of weighted distance to other vertex
2020  if (!v0 || !v1) {
2021  AliDebug(2,"\n\n ::GetWDist => One of vertices is not valid\n\n");
2022  return 0;
2023  }
2024  static TMatrixDSym vVb(3);
2025  double dist = -1;
2026  double dx = v0->GetX()-v1->GetX();
2027  double dy = v0->GetY()-v1->GetY();
2028  double dz = v0->GetZ()-v1->GetZ();
2029  double cov0[6],cov1[6];
2030  v0->GetCovarianceMatrix(cov0);
2031  v1->GetCovarianceMatrix(cov1);
2032  vVb(0,0) = cov0[0]+cov1[0];
2033  vVb(1,1) = cov0[2]+cov1[2];
2034  vVb(2,2) = cov0[5]+cov1[5];
2035  vVb(1,0) = vVb(0,1) = cov0[1]+cov1[1];
2036  vVb(0,2) = vVb(1,2) = vVb(2,0) = vVb(2,1) = 0.;
2037  vVb.InvertFast();
2038  if (!vVb.IsValid()) {
2039  AliDebug(2,"Singular Matrix\n");
2040  return dist;
2041  }
2042  dist = vVb(0,0)*dx*dx + vVb(1,1)*dy*dy + vVb(2,2)*dz*dz
2043  + 2*vVb(0,1)*dx*dy + 2*vVb(0,2)*dx*dz + 2*vVb(1,2)*dy*dz;
2044  return dist>0 ? TMath::Sqrt(dist) : -1;
2045 }
2046 
2048  { // check for multi-vertexer pile-up
2049  const int kMinPlpContrib = 5;
2050  const double kMaxPlpChi2 = 5.0;
2051  const double kMinWDist = 15;
2052 
2053  const AliVVertex* vtPrm = 0;
2054  const AliVVertex* vtPlp = 0;
2055 
2056  int nPlp = 0;
2057 
2058  if(!(nPlp=faod->GetNumberOfPileupVerticesTracks()))
2059  return kFALSE;
2060 
2061  vtPrm = faod->GetPrimaryVertex();
2062  if(vtPrm == faod->GetPrimaryVertexSPD())
2063  return kTRUE; // there are pile-up vertices but no primary
2064 
2065  //int bcPrim = vtPrm->GetBC();
2066 
2067  for(int ipl=0;ipl<nPlp;ipl++) {
2068  vtPlp = (const AliVVertex*)faod->GetPileupVertexTracks(ipl);
2069  if (vtPlp->GetNContributors() < kMinPlpContrib) continue;
2070  if (vtPlp->GetChi2perNDF() > kMaxPlpChi2) continue;
2071  //int bcPlp = vtPlp->GetBC();
2072  //if (bcPlp!=AliVTrack::kTOFBCNA && TMath::Abs(bcPlp-bcPrim)>2)
2073  // return kTRUE; // pile-up from other BC
2074 
2075  double wDst = GetWDist(vtPrm,vtPlp);
2076  if (wDst<kMinWDist) continue;
2077 
2078  return kTRUE; // pile-up: well separated vertices
2079  }
2080  return kFALSE;
2081 }
2082 
2083 
2084 
2085 
2086 
2087 
2089 
2090  Bool_t BisPileup=kFALSE;
2091 
2092  Double_t centrV0M=300;
2093  Double_t centrCL1=300;
2094  Double_t centrCL0=300;
2095  Double_t centrTRK=300;
2096 
2097  if(sDataSet=="2010"||sDataSet=="2011"){
2098  centrV0M = ((AliVAODHeader*)faod->GetHeader())->GetCentralityP()->GetCentralityPercentile("V0M");
2099  centrCL1 = ((AliVAODHeader*)faod->GetHeader())->GetCentralityP()->GetCentralityPercentile("CL1");
2100  centrCL0 = ((AliVAODHeader*)faod->GetHeader())->GetCentralityP()->GetCentralityPercentile("CL0");
2101  centrTRK = ((AliVAODHeader*)faod->GetHeader())->GetCentralityP()->GetCentralityPercentile("TRK");
2102  }
2103  else{
2104  fMultSelection = (AliMultSelection*) InputEvent()->FindListObject("MultSelection");
2105  if(!fMultSelection) {
2106  printf("\n\n **WARNING** ::UserExec() AliMultSelection object not found.\n\n");
2107  exit(1);
2108  }
2109  centrV0M = fMultSelection->GetMultiplicityPercentile("V0M");
2110  centrCL1 = fMultSelection->GetMultiplicityPercentile("CL1");
2111  centrCL0 = fMultSelection->GetMultiplicityPercentile("CL0");
2112  centrTRK = fMultSelection->GetMultiplicityPercentile("TRK");
2113  }// 2015
2114 
2115 
2116  if(fRejectPileUp && InputEvent()) {
2117  //if(!fCutsEvent->IsSelected(InputEvent(),MCEvent())) return;
2118  if(sDataSet!="2015") {
2119  if(PileUpMultiVertex(faod)) {
2120  fPileUpCount->Fill(0.5);
2121  BisPileup=kTRUE;
2122  }
2123  Int_t isPileup = faod->IsPileupFromSPD(3);
2124  if(isPileup != 0) {
2125  fPileUpCount->Fill(1.5);
2126  //BisPileup=kTRUE; //
2127  }
2128  if(((AliAODHeader*)faod->GetHeader())->GetRefMultiplicityComb08() < 0) {
2129  fPileUpCount->Fill(2.5);
2130  BisPileup=kTRUE;
2131  }
2132  if(faod->IsIncompleteDAQ()) {
2133  fPileUpCount->Fill(3.5);
2134  BisPileup=kTRUE;
2135  }
2136 
2137  //check vertex consistency
2138  const AliAODVertex* vtTrc = faod->GetPrimaryVertex();
2139  const AliAODVertex* vtSPD = faod->GetPrimaryVertexSPD();
2140 
2141  if(vtTrc->GetNContributors() < 2 || vtSPD->GetNContributors()<1) {
2142  fPileUpCount->Fill(5.5);
2143  BisPileup=kTRUE;
2144  }
2145 
2146  double covTrc[6], covSPD[6];
2147  vtTrc->GetCovarianceMatrix(covTrc);
2148  vtSPD->GetCovarianceMatrix(covSPD);
2149 
2150  double dz = vtTrc->GetZ() - vtSPD->GetZ();
2151 
2152  double errTot = TMath::Sqrt(covTrc[5]+covSPD[5]);
2153  double errTrc = TMath::Sqrt(covTrc[5]);
2154  double nsigTot = dz/errTot;
2155  double nsigTrc = dz/errTrc;
2156 
2157  if(TMath::Abs(dz)>0.2 || TMath::Abs(nsigTot)>10 || TMath::Abs(nsigTrc)>20) {
2158  fPileUpCount->Fill(6.5);
2159  BisPileup=kTRUE;
2160  }
2161  if(fAnalysisUtil->IsPileUpEvent(InputEvent())) {
2162  fPileUpCount->Fill(7.5);
2163  BisPileup=kTRUE;
2164  }
2165  }
2166 
2167  else{ //------------ pileup for 2015 data -----------------
2168  if(!fMultSelection->GetThisEventIsNotPileup())
2169  fPileUpMultSelCount->Fill(0.5);
2170  if(!fMultSelection->GetThisEventIsNotPileupMV())
2171  fPileUpMultSelCount->Fill(1.5);
2172  if(!fMultSelection->GetThisEventIsNotPileupInMultBins())
2173  fPileUpMultSelCount->Fill(2.5);
2174  if(!fMultSelection->GetThisEventHasNoInconsistentVertices())
2175  fPileUpMultSelCount->Fill(3.5);
2176  if(!fMultSelection->GetThisEventPassesTrackletVsCluster())
2177  fPileUpMultSelCount->Fill(4.5);
2178  if(!fMultSelection->GetThisEventIsNotAsymmetricInVZERO())
2179  fPileUpMultSelCount->Fill(5.5);
2180  if(!fMultSelection->GetThisEventIsNotIncompleteDAQ())
2181  fPileUpMultSelCount->Fill(6.5);
2182  if(!fMultSelection->GetThisEventHasGoodVertex2016())
2183  fPileUpMultSelCount->Fill(7.5);
2184 
2185  BisPileup=kFALSE;
2186 
2187  //-- pile-up a la Dobrin for LHC15o -----
2188  if(PileUpMultiVertex(faod)) {
2189  fPileUpCount->Fill(0.5);
2190  BisPileup=kTRUE;
2191  }
2192  Int_t isPileup = faod->IsPileupFromSPD(3);
2193  if(isPileup != 0) {
2194  fPileUpCount->Fill(1.5);
2195  BisPileup=kTRUE;
2196  }
2197  if(((AliAODHeader*)faod->GetHeader())->GetRefMultiplicityComb08() < 0) {
2198  fPileUpCount->Fill(2.5);
2199  BisPileup=kTRUE;
2200  }
2201  if(faod->IsIncompleteDAQ()) {
2202  fPileUpCount->Fill(3.5);
2203  BisPileup=kTRUE;
2204  }
2205  if(fabs(centrV0M-centrCL1)>7.5) {
2206  fPileUpCount->Fill(4.5);
2207  BisPileup=kTRUE;
2208  }
2209 
2210  // check vertex consistency
2211  const AliAODVertex* vtTrc = faod->GetPrimaryVertex();
2212  const AliAODVertex* vtSPD = faod->GetPrimaryVertexSPD();
2213 
2214  if(vtTrc->GetNContributors() < 2 || vtSPD->GetNContributors()<1) {
2215  fPileUpCount->Fill(5.5);
2216  BisPileup=kTRUE;
2217  }
2218 
2219  double covTrc[6], covSPD[6];
2220  vtTrc->GetCovarianceMatrix(covTrc);
2221  vtSPD->GetCovarianceMatrix(covSPD);
2222 
2223  double dz = vtTrc->GetZ() - vtSPD->GetZ();
2224 
2225  double errTot = TMath::Sqrt(covTrc[5]+covSPD[5]);
2226  double errTrc = TMath::Sqrt(covTrc[5]);
2227  double nsigTot = dz/errTot;
2228  double nsigTrc = dz/errTrc;
2229 
2230  if(TMath::Abs(dz)>0.2 || TMath::Abs(nsigTot)>10 || TMath::Abs(nsigTrc)>20) {
2231  fPileUpCount->Fill(6.5);
2232  BisPileup=kTRUE;
2233  }
2234 
2235  //cuts on tracks
2236  const Int_t nTracks = faod->GetNumberOfTracks();
2237  Int_t multEsd = ((AliAODHeader*)faod->GetHeader())->GetNumberOfESDTracks();
2238 
2239  //Int_t multTrk = 0;
2240  //Int_t multTrkBefC = 0;
2241  //Int_t multTrkTOFBefC = 0;
2242  Int_t multTPC = 0;
2243 
2244  for(Int_t it = 0; it < nTracks; it++) {
2245  AliAODTrack* aodTrk = (AliAODTrack*)faod->GetTrack(it);
2246  if(!aodTrk) {
2247  delete aodTrk;
2248  continue;
2249  }
2250  //if(aodTrk->TestFilterBit(32)){
2251  // multTrkBefC++;
2252  // if(TMath::Abs(aodTrk->GetTOFsignalDz()) <= 10. && aodTrk->GetTOFsignal() >= 12000. && aodTrk->GetTOFsignal() <= 25000.)
2253  // multTrkTOFBefC++;
2254  // if((TMath::Abs(aodTrk->Eta()) < 0.8) && (aodTrk->GetTPCNcls() >= 70) && (aodTrk->Pt() >= 0.2) && (aodTrk->Pt() < 20.))
2255  // multTrk++;
2256  //}
2257  if(aodTrk->TestFilterBit(128))
2258  multTPC++;
2259  } // end of for AOD track loop
2260 
2261  Double_t multTPCn = multTPC;
2262  Double_t multEsdn = multEsd;
2263  Double_t multESDTPCDif = multEsdn - multTPCn*3.38;
2264 
2265  /*if(multESDTPCDif > (fRejectPileUpTight?700.:15000.)) {
2266  fPileUpCount->Fill(7.5);
2267  BisPileup=kTRUE;
2268  }*/
2269  if(multESDTPCDif > 15000.){
2270  fPileUpCount->Fill(7.5);
2271  BisPileup=kTRUE;
2272  }
2273  else if(fRejectPileUpTight) {
2274  if(multESDTPCDif > 700.) {
2275  fPileUpCount->Fill(8.5);
2276  BisPileup=kTRUE;
2277  }
2278  if(BisPileup==kFALSE) {
2279  if(!fMultSelection->GetThisEventIsNotPileup()) BisPileup=kTRUE;
2280  if(!fMultSelection->GetThisEventIsNotPileupMV()) BisPileup=kTRUE;
2281  if(!fMultSelection->GetThisEventIsNotPileupInMultBins()) BisPileup=kTRUE;
2282  if(!fMultSelection->GetThisEventHasNoInconsistentVertices()) BisPileup=kTRUE;
2283  if(!fMultSelection->GetThisEventPassesTrackletVsCluster()) BisPileup=kTRUE;
2284  if(!fMultSelection->GetThisEventIsNotIncompleteDAQ()) BisPileup=kTRUE;
2285  if(!fMultSelection->GetThisEventHasGoodVertex2016()) BisPileup=kTRUE;
2286  if(BisPileup) fPileUpCount->Fill(9.5);
2287  }
2288  }
2289  }
2290  }
2291 
2292  return BisPileup;
2293 }//-------pile up function ------
2294 
2295 
2296 
2297 
2299 
2300  Int_t irun = -1;
2301 
2302  for(int i=0;i<fRunFlag;i++){
2303  if(run==runNums[i])
2304  {
2305  irun = i;
2306  break;
2307  }
2308  }
2309  if(irun<0) {
2310  printf("\n ... **WARNING** \n::UserExec() runnumber not listed.\n EXIT..\n");
2311  }
2312 
2313  return irun;
2314 }//------ GetCurrentRunIndex --------
2315 
2316 
2318 
2319  Int_t runArray_2010[89] = {139510, 139507, 139505, 139503, 139465, 139438, 139437, 139360, 139329, 139328, 139314, 139310, 139309, 139173, 139107, 139105, 139038, 139037, 139036, 139029, 139028, 138872, 138871, 138870, 138837, 138732, 138730, 138666, 138662, 138653, 138652, 138638, 138624, 138621, 138583, 138582, 138579, 138578, 138534, 138469, 138442, 138439, 138438, 138396, 138364, 138275, 138225, 138201, 138197, 138192, 138190, 137848, 137844, 137752, 137751, 137724, 137722, 137718, 137704, 137693, 137692, 137691, 137686, 137685, 137639, 137638, 137608, 137595, 137549, 137546, 137544, 137541, 137539, 137531, 137530, 137443, 137441, 137440, 137439, 137434, 137432, 137431, 137243, 137236, 137235, 137232, 137231, 137162, 137161};
2320 
2321  Int_t runArray_2011[68] = {167915, 168115, 168460, 169035, 169238, 169859, 170228, 167920, 168310, 168464, 169091, 169411, 169923, 170230, 167985, 168311, 168467, 169094, 169415, 170027, 170268, 167987, 168322, 168511, 169138, 169417, 170081, 170269, 167988, 168325, 168512, 169144, 169835, 170155, 170270, 168069, 168341, 168514, 169145, 169837, 170159, 170306, 168076, 168342, 168777, 169148, 169838, 170163, 170308, 168105, 168361, 168826, 169156, 169846, 170193, 170309, 168107, 168362, 168988, 169160, 169855, 170203, 168108, 168458, 168992, 169167, 169858, 170204};
2322 
2323  Int_t runArray_2015[90] = {246994, 246991, 246989, 246984, 246982, 246980, 246948, 246945, 246928, 246871, 246870, 246867, 246865, 246864, 246859, 246858, 246851, 246847, 246846, 246845, 246844, 246810, 246809, 246808, 246807, 246805, 246804, 246766, 246765, 246763, 246760, 246759, 246758, 246757, 246751, 246750, 246676, 246675, 246540, 246495, 246493, 246488, 246487, 246434, 246431, 246428, 246424, 246276, 246275, 246272, 246271, 246225, 246222, 246217, 246185, 246182, 246181, 246180, 246178, 246153, 246152, 246151, 246148, 246115, 246113, 246089, 246087, 246053, 246052, 246049, 246048, 246042, 246037, 246036, 246012, 246003, 246001, 245963, 245954, 245952, 245949, 245923, 245833, 245831, 245829, 245705, 245702, 245700, 245692, 245683};
2324 
2325 //Int_t runArray_pPb_13cpass2[14] = {195677, 195675, 195673, 195644, 195635, 195633, 195596, 195593, 195592, 195568, 195567, 195566, 195531, 195529};
2326 
2327  Int_t runArray_pPb_16q_pass1[32] = {265309, 265332, 265334, 265335, 265336, 265338, 265339, 265342, 265343, 265344, 265377, 265378, 265381, 265383, 265384, 265385, 265387, 265388, 265419, 265420, 265421, 265422, 265424, 265425, 265426, 265427, 265435, 265499, 265500, 265501, 265521, 265525};
2328 
2329 
2330 
2331 
2332  if(sPeriod=="2010"){
2333  fRunFlag = 89;
2334  for(int i=0;i<fRunFlag;i++)
2335  runNums[i] = runArray_2010[i];
2336  }
2337  else if(sPeriod=="2011"){
2338  fRunFlag = 68; //<-- 2011 check
2339  for(int i=0;i<fRunFlag;i++)
2340  runNums[i] = runArray_2011[i];
2341  }
2342  else if(sPeriod=="2015" || sPeriod=="2015PbPb"){
2343  fRunFlag = 90;
2344  for(int i=0;i<fRunFlag;i++)
2345  runNums[i] = runArray_2015[i];
2346  }
2347  else if(sPeriod=="2015pPb" || sPeriod=="pPb"){
2348  fRunFlag = 32;
2349  for(int i=0;i<fRunFlag;i++)
2350  runNums[i] = runArray_pPb_16q_pass1[i];
2351  }
2352 
2353 
2354  else{
2355  printf("\n\n ***** Run Number not defined for this data set. *******\n\n Please modify code..\n\n");
2356  exit(1);
2357  }
2358 
2359 }//------- InitializeRunArray ---------
2360 
2361 
2362 
2364 
2365  fHist_Event_count = new TH1F("fHist_Event_count"," ",20,0,20);
2366  fHist_Event_count->GetXaxis()->SetBinLabel(1,"Called Exec()");
2367  fHist_Event_count->GetXaxis()->SetBinLabel(2,"AOD Exist");
2368  fHist_Event_count->GetXaxis()->SetBinLabel(3,"PileUp");
2369  fHist_Event_count->GetXaxis()->SetBinLabel(4,"iCentSPD<90");
2370  fHist_Event_count->GetXaxis()->SetBinLabel(5,"V0 Mult>0");
2371  fHist_Event_count->GetXaxis()->SetBinLabel(6,"Bad Runs");
2372  fHist_Event_count->GetXaxis()->SetBinLabel(7,"..TBA..");
2373 
2374  fHist_Event_count->GetXaxis()->SetBinLabel(10,"Final Event");
2376 
2377  fPileUpMultSelCount = new TH1F("fPileUpMultSelCount", "fPileUpMultSelCount", 10, 0., 10.);
2378  fPileUpMultSelCount->GetXaxis()->SetBinLabel(1,"IsNotPileup");
2379  fPileUpMultSelCount->GetXaxis()->SetBinLabel(2,"IsNotPileupMV");
2380  fPileUpMultSelCount->GetXaxis()->SetBinLabel(3,"IsNotPileupInMultBins");
2381  fPileUpMultSelCount->GetXaxis()->SetBinLabel(4,"InconsistentVertices");
2382  fPileUpMultSelCount->GetXaxis()->SetBinLabel(5,"TrackletVsCluster");
2383  fPileUpMultSelCount->GetXaxis()->SetBinLabel(6,"AsymmetricInVZERO");
2384  fPileUpMultSelCount->GetXaxis()->SetBinLabel(7,"IncompleteDAQ");
2385  fPileUpMultSelCount->GetXaxis()->SetBinLabel(8,"GoodVertex2016");
2387 
2388  fPileUpCount = new TH1F("fPileUpCount", "fPileUpCount", 12, 0., 12.);
2389  fPileUpCount->GetXaxis()->SetBinLabel(1,"plpMV");
2390  fPileUpCount->GetXaxis()->SetBinLabel(2,"fromSPD");
2391  fPileUpCount->GetXaxis()->SetBinLabel(3,"RefMultiplicityComb08");
2392  fPileUpCount->GetXaxis()->SetBinLabel(4,"IncompleteDAQ");
2393  fPileUpCount->GetXaxis()->SetBinLabel(5,"abs(V0M-CL1)>7.5");
2394  fPileUpCount->GetXaxis()->SetBinLabel(6,"missingVtx");
2395  fPileUpCount->GetXaxis()->SetBinLabel(7,"inconsistentVtx");
2396  fPileUpCount->GetXaxis()->SetBinLabel(8,"multESDTPCDif=15000");
2397  fPileUpCount->GetXaxis()->SetBinLabel(9,"multESDTPCDif=700");
2398  fPileUpCount->GetXaxis()->SetBinLabel(10,"extraPileUpMultSel");
2399  fListHistos->Add(fPileUpCount);
2400 
2401  //To be implemented fully:
2402  fTaskConfigParm = new TH1F("fTaskConfigParm", "Connfig Values", 20, 0., 20.);
2403  fTaskConfigParm->GetXaxis()->SetBinLabel(1,"CentMin");
2404  fTaskConfigParm->GetXaxis()->SetBinLabel(2,"CentMax");
2405  fTaskConfigParm->GetXaxis()->SetBinLabel(3,"VzMin");
2406  fTaskConfigParm->GetXaxis()->SetBinLabel(4,"VzMax");
2407  fTaskConfigParm->GetXaxis()->SetBinLabel(5,"EtaMin");
2408  fTaskConfigParm->GetXaxis()->SetBinLabel(6,"EtaMax");
2409  fTaskConfigParm->GetXaxis()->SetBinLabel(7,"PtMin");
2410  fTaskConfigParm->GetXaxis()->SetBinLabel(8,"PtMax");
2411  fTaskConfigParm->GetXaxis()->SetBinLabel(9,"DCAxy");
2412  fTaskConfigParm->GetXaxis()->SetBinLabel(10,"DCAz");
2413  fTaskConfigParm->GetXaxis()->SetBinLabel(11,"FiltBit");
2414  fTaskConfigParm->GetXaxis()->SetBinLabel(12,"nClustTPC");
2415  fTaskConfigParm->GetXaxis()->SetBinLabel(13,"Chi2ClusMin");
2416  fTaskConfigParm->GetXaxis()->SetBinLabel(14,"Chi2ClusMax");
2417  fTaskConfigParm->GetXaxis()->SetBinLabel(15,"harmonic N");
2418  fTaskConfigParm->GetXaxis()->SetBinLabel(16,"harmonic M");
2419  fTaskConfigParm->GetXaxis()->SetBinLabel(17,"harmonicPsi");
2421 
2422 
2423 
2424 
2425 
2426  //----- CME-ZDN correlator SP method---------
2427  for(int i=0;i<3;i++){ //ZDN_SP
2428  //Detector: 0 = V0A, 1 = V0C, 3 = Q-cumulant
2429  fHist_Corr3p_ZDN_SP_PN[i] = new TProfile2D(Form("fHist_Corr3p_ZDN_SP_PosNeg_Det%d",i+1),"opposit charge correlator",90,0,90,15,0,15,"");
2430  fHist_Corr3p_ZDN_SP_PN[i]->Sumw2();
2432  fHist_Corr3p_ZDN_SP_PP[i] = new TProfile2D(Form("fHist_Corr3p_ZDN_SP_PosPos_Det%d",i+1),"pos-pos charge correlator",90,0,90,15,0,15,"");
2433  fHist_Corr3p_ZDN_SP_PP[i]->Sumw2();
2435  fHist_Corr3p_ZDN_SP_NN[i] = new TProfile2D(Form("fHist_Corr3p_ZDN_SP_NegNeg_Det%d",i+1),"neg-neg charge correlator",90,0,90,15,0,15,"");
2436  fHist_Corr3p_ZDN_SP_NN[i]->Sumw2();
2438  }
2439  //SP Resolution:
2440  for(int i=0;i<3;i++){
2441  //Det: 0 = v0c-v0a, 1 = v0a-TPC, 2 = v0c-TPC,
2442  fHist_Reso2n_ZDN_SP_Det[i] = new TProfile2D(Form("fHist_Reso2n_ZDN_SP_DetComb%d",i+1),"Event plane Resolution",90,0,90,8,0,8,"");
2443  fHist_Reso2n_ZDN_SP_Det[i]->Sumw2();
2445  }
2446  //--------------------------------------------
2447 
2448  Double_t centRange[11] = {0,5,10,20,30,40,50,60,70,80,90};
2449 
2450  //----- CME SP method histograms ---------
2451  for(int i=0;i<2;i++){
2452  for(int j=0;j<3;j++){
2453  //Detector: 0 = V0A, 1 = V0C, 3 = Q-cumulant
2454  fHist_Corr3p_SP_Norm_PN[i][j] = new TProfile(Form("fHist_Corr3p_SP_Norm_PosNeg_Mag%d_Det%d",i,j+1),"opposit charge correlator",10,centRange,"");
2455  fHist_Corr3p_SP_Norm_PN[i][j]->Sumw2();
2457  fHist_Corr3p_SP_Norm_PP[i][j] = new TProfile(Form("fHist_Corr3p_SP_Norm_PosPos_Mag%d_Det%d",i,j+1),"pos-pos charge correlator",10,centRange,"");
2458  fHist_Corr3p_SP_Norm_PP[i][j]->Sumw2();
2460  fHist_Corr3p_SP_Norm_NN[i][j] = new TProfile(Form("fHist_Corr3p_SP_Norm_NegNeg_Mag%d_Det%d",i,j+1),"neg-neg charge correlator",10,centRange,"");
2461  fHist_Corr3p_SP_Norm_NN[i][j]->Sumw2();
2463  }
2464  //EP Resolution:
2465  for(int j=0;j<3;j++){
2466  //Det: 0 = v0c-v0a, 1 = v0a-TPC, 2 = v0c-TPC,
2467  fHist_Reso2n_SP_Norm_Det[i][j] = new TProfile(Form("fHist_Reso2n_SP_Norm_Mag%d_DetComb%d",i,j+1),"Event plane Resolution",10,centRange,"");
2468  fHist_Reso2n_SP_Norm_Det[i][j]->Sumw2();
2470  }
2471  }
2472 
2473 
2474 
2475  //----- CME EP method histograms ---------
2476  for(int i=0;i<2;i++){
2477  for(int j=0;j<3;j++){
2478  //Detector: 0 = V0A, 1 = V0C, 3 = Q-cumulant
2479  fHist_Corr3p_EP_Norm_PN[i][j] = new TProfile(Form("fHist_Corr3p_EP_Norm_PosNeg_Mag%d_Det%d",i,j+1),"opposit charge correlator",10,centRange,"");
2480  fHist_Corr3p_EP_Norm_PN[i][j]->Sumw2();
2482  fHist_Corr3p_EP_Norm_PP[i][j] = new TProfile(Form("fHist_Corr3p_EP_Norm_PosPos_Mag%d_Det%d",i,j+1),"pos-pos charge correlator",10,centRange,"");
2483  fHist_Corr3p_EP_Norm_PP[i][j]->Sumw2();
2485  fHist_Corr3p_EP_Norm_NN[i][j] = new TProfile(Form("fHist_Corr3p_EP_Norm_NegNeg_Mag%d_Det%d",i,j+1),"neg-neg charge correlator",10,centRange,"");
2486  fHist_Corr3p_EP_Norm_NN[i][j]->Sumw2();
2488  }
2489  //EP Resolution:
2490  for(int j=0;j<3;j++){
2491  //Det: 0 = v0c-v0a, 1 = v0a-TPC, 2 = v0c-TPC,
2492  fHist_Reso2n_EP_Norm_Det[i][j] = new TProfile(Form("fHist_Reso2n_EP_Norm_Mag%d_DetComb%d",i,j+1),"Event plane Resolution",10,centRange,"");
2493  fHist_Reso2n_EP_Norm_Det[i][j]->Sumw2();
2495  }
2496  }
2497 
2498 
2499 
2500 
2501 
2502 
2503  fHV0AEventPlaneVsCent = new TH2F("fHV0AEventPlaneVsCent","Psi2 from V0A",10,centRange,50,0,3.1415);
2505  fHV0CEventPlaneVsCent = new TH2F("fHV0CEventPlaneVsCent","Psi2 from V0C",10,centRange,50,0,3.1415);
2507  fHTPCEventPlaneVsCent = new TH2F("fHTPCEventPlaneVsCent","Psi2 from TPC",10,centRange,50,0,3.1415);
2509 
2510 
2511 
2512 
2513  TH1::SetDefaultSumw2();
2514 
2515  Char_t name[100], title[100];
2516 
2517 
2518 
2519  //Differential in pT:
2520  //Double_t pTRange[24] = {0,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.,1.2,1.4,1.6,1.8,2.,2.33,2.66,3.,3.5,4.,5.,6.,8.,10.};
2521 
2522  Double_t pTRange[21] = {0.0,0.2,0.4,0.6,0.8,1.0,1.2,1.4,1.6,1.8,2.0,2.2,2.4,2.6,2.8,3.0,3.2,3.4,3.6,3.8,4.0};
2523 
2524  for(int i=0;i<2;i++){
2525  for(int j=0;j<6;j++){
2526  sprintf(name,"fHist_Corr3p_pTSum_EP_V0A_PN_Mag%d_Cent%d",i,j);
2527  sprintf(title,"PN 3p vs (pT1+pT2)/2, Cent %2.0f-%2.0f",centRange[i],centRange[i+1]);
2528  fHist_Corr3p_pTSum_EP_V0A_PN[i][j] = new TProfile(name,title,20,pTRange,"");
2530 
2531  sprintf(name,"fHist_Corr3p_pTSum_EP_V0A_PP_Mag%d_Cent%d",i,j);
2532  sprintf(title,"PP 3p vs (pT1+pT2)/2, Cent %2.0f-%2.0f",centRange[i],centRange[i+1]);
2533  fHist_Corr3p_pTSum_EP_V0A_PP[i][j] = new TProfile(name,title,20,pTRange,"");
2535 
2536  sprintf(name,"fHist_Corr3p_pTSum_EP_V0A_NN_Mag%d_Cent%d",i,j);
2537  sprintf(title,"NN 3p vs (pT1+pT2)/2, Cent %2.0f-%2.0f",centRange[i],centRange[i+1]);
2538  fHist_Corr3p_pTSum_EP_V0A_NN[i][j] = new TProfile(name,title,20,pTRange,"");
2540  //-----v0c----
2541  sprintf(name,"fHist_Corr3p_pTSum_EP_V0C_PN_Mag%d_Cent%d",i,j);
2542  sprintf(title,"PN 3p vs (pT1+pT2)/2, Cent %2.0f-%2.0f",centRange[i],centRange[i+1]);
2543  fHist_Corr3p_pTSum_EP_V0C_PN[i][j] = new TProfile(name,title,20,pTRange,"");
2545 
2546  sprintf(name,"fHist_Corr3p_pTSum_EP_V0C_PP_Mag%d_Cent%d",i,j);
2547  sprintf(title,"PP 3p vs (pT1+pT2)/2, Cent %2.0f-%2.0f",centRange[i],centRange[i+1]);
2548  fHist_Corr3p_pTSum_EP_V0C_PP[i][j] = new TProfile(name,title,20,pTRange,"");
2550 
2551  sprintf(name,"fHist_Corr3p_pTSum_EP_V0C_NN_Mag%d_Cent%d",i,j);
2552  sprintf(title,"NN 3p vs (pT1+pT2)/2, Cent %2.0f-%2.0f",centRange[i],centRange[i+1]);
2553  fHist_Corr3p_pTSum_EP_V0C_NN[i][j] = new TProfile(name,title,20,pTRange,"");
2555  }
2556  }
2557 
2558  for(int i=0;i<2;i++){
2559  for(int j=0;j<6;j++){
2560  sprintf(name,"fHist_Corr3p_pTDiff_EP_V0A_PN_Mag%d_Cent%d",i,j);
2561  sprintf(title,"PN 3p vs |pT1-pT2|, Cent %2.0f-%2.0f",centRange[i],centRange[i+1]);
2562  fHist_Corr3p_pTDiff_EP_V0A_PN[i][j] = new TProfile(name,title,20,pTRange,"");
2564 
2565  sprintf(name,"fHist_Corr3p_pTDiff_EP_V0A_PP_Mag%d_Cent%d",i,j);
2566  sprintf(title,"PP 3p vs |pT1-pT2|, Cent %2.0f-%2.0f",centRange[i],centRange[i+1]);
2567  fHist_Corr3p_pTDiff_EP_V0A_PP[i][j] = new TProfile(name,title,20,pTRange,"");
2569 
2570  sprintf(name,"fHist_Corr3p_pTDiff_EP_V0A_NN_Mag%d_Cent%d",i,j);
2571  sprintf(title,"NN 3p vs |pT1-pT2|, Cent %2.0f-%2.0f",centRange[i],centRange[i+1]);
2572  fHist_Corr3p_pTDiff_EP_V0A_NN[i][j] = new TProfile(name,title,20,pTRange,"");
2574  //-----v0c----
2575  sprintf(name,"fHist_Corr3p_pTDiff_EP_V0C_PN_Mag%d_Cent%d",i,j);
2576  sprintf(title,"PN 3p vs |pT1-pT2|, Cent %2.0f-%2.0f",centRange[i],centRange[i+1]);
2577  fHist_Corr3p_pTDiff_EP_V0C_PN[i][j] = new TProfile(name,title,20,pTRange,"");
2579 
2580  sprintf(name,"fHist_Corr3p_pTDiff_EP_V0C_PP_Mag%d_Cent%d",i,j);
2581  sprintf(title,"PP 3p vs |pT1-pT2|, Cent %2.0f-%2.0f",centRange[i],centRange[i+1]);
2582  fHist_Corr3p_pTDiff_EP_V0C_PP[i][j] = new TProfile(name,title,20,pTRange,"");
2584 
2585  sprintf(name,"fHist_Corr3p_pTDiff_EP_V0C_NN_Mag%d_Cent%d",i,j);
2586  sprintf(title,"NN 3p vs |pT1-pT2|, Cent %2.0f-%2.0f",centRange[i],centRange[i+1]);
2587  fHist_Corr3p_pTDiff_EP_V0C_NN[i][j] = new TProfile(name,title,20,pTRange,"");
2589  }
2590  }
2591 
2592  Double_t EtaRange[9] = {0.0,0.2,0.4,0.6,0.8,1.0,1.2,1.4,1.6};
2593 
2594  for(int i=0;i<2;i++){
2595  for(int j=0;j<6;j++){
2596  sprintf(name,"fHist_Corr3p_EtaDiff_EP_V0A_PN_Mag%d_Cent%d",i,j);
2597  sprintf(title,"PN 3p vs |Eta1-Eta2|, Cent %2.0f-%2.0f",centRange[i],centRange[i+1]);
2598  fHist_Corr3p_EtaDiff_EP_V0A_PN[i][j] = new TProfile(name,title,8,EtaRange,"");
2600 
2601  sprintf(name,"fHist_Corr3p_EtaDiff_EP_V0A_PP_Mag%d_Cent%d",i,j);
2602  sprintf(title,"PP 3p vs |Eta1-Eta2|, Cent %2.0f-%2.0f",centRange[i],centRange[i+1]);
2603  fHist_Corr3p_EtaDiff_EP_V0A_PP[i][j] = new TProfile(name,title,8,EtaRange,"");
2605 
2606  sprintf(name,"fHist_Corr3p_EtaDiff_EP_V0A_NN_Mag%d_Cent%d",i,j);
2607  sprintf(title,"NN 3p vs |Eta1-Eta2|, Cent %2.0f-%2.0f",centRange[i],centRange[i+1]);
2608  fHist_Corr3p_EtaDiff_EP_V0A_NN[i][j] = new TProfile(name,title,8,EtaRange,"");
2610  //-----v0c----
2611  sprintf(name,"fHist_Corr3p_EtaDiff_EP_V0C_PN_Mag%d_Cent%d",i,j);
2612  sprintf(title,"PN 3p vs |Eta1-Eta2|, Cent %2.0f-%2.0f",centRange[i],centRange[i+1]);
2613  fHist_Corr3p_EtaDiff_EP_V0C_PN[i][j] = new TProfile(name,title,8,EtaRange,"");
2615 
2616  sprintf(name,"fHist_Corr3p_EtaDiff_EP_V0C_PP_Mag%d_Cent%d",i,j);
2617  sprintf(title,"PP 3p vs |Eta1-Eta2|, Cent %2.0f-%2.0f",centRange[i],centRange[i+1]);
2618  fHist_Corr3p_EtaDiff_EP_V0C_PP[i][j] = new TProfile(name,title,8,EtaRange,"");
2620 
2621  sprintf(name,"fHist_Corr3p_EtaDiff_EP_V0C_NN_Mag%d_Cent%d",i,j);
2622  sprintf(title,"NN 3p vs |Eta1-Eta2|, Cent %2.0f-%2.0f",centRange[i],centRange[i+1]);
2623  fHist_Corr3p_EtaDiff_EP_V0C_NN[i][j] = new TProfile(name,title,8,EtaRange,"");
2625  }
2626  }
2627 
2628 
2629 
2630 
2631  //non-Isotropic terms for correction:
2632  for(int i=0;i<2;i++){
2633  fHist_NonIso_SP_PP_Mag0[i] = new TProfile2D(Form("fHist_NonIso_SP_PP_Mag0_Det%d",i),"Non Isotropic terms",10,centRange,10,0,10,"");
2635  fHist_NonIso_SP_NN_Mag0[i] = new TProfile2D(Form("fHist_NonIso_SP_NN_Mag0_Det%d",i),"Non Isotropic terms",10,centRange,10,0,10,"");
2637 
2638  fHist_NonIso_SP_PP_Mag1[i] = new TProfile2D(Form("fHist_NonIso_SP_PP_Mag1_Det%d",i),"Non Isotropic terms",10,centRange,10,0,10,"");
2640  fHist_NonIso_SP_NN_Mag1[i] = new TProfile2D(Form("fHist_NonIso_SP_NN_Mag1_Det%d",i),"Non Isotropic terms",10,centRange,10,0,10,"");
2642  }
2643 
2644  for(int i=0;i<2;i++){
2645  fHist_Corr2p_EP_Norm_PN[i] = new TProfile2D(Form("fHist_Corr2p_EP_Norm_PN_Mag%d",i),"<cos(n(phiA-phiB))>",10,centRange,4,0,4,"");
2647  fHist_Corr2p_EP_Norm_PP[i] = new TProfile2D(Form("fHist_Corr2p_EP_Norm_PP_Mag%d",i),"<cos(n(phiA-phiB))>",10,centRange,4,0,4,"");
2649  fHist_Corr2p_EP_Norm_NN[i] = new TProfile2D(Form("fHist_Corr2p_EP_Norm_NN_Mag%d",i),"<cos(n(phiA-phiB))>",10,centRange,4,0,4,"");
2651  }
2652 
2653 
2654 
2655 
2656  //=========== Calibtation Histograms etc ==================
2658 
2659  fEventStatvsRun = new TH1F("fEventStatvsRun","Event stat per run",fRunFlag,0,fRunFlag);
2661 
2662  //for debug only, remove after stable code
2663  hUnderOverBinNUApos = new TH1F("hUnderOverBinNUApos","",90,0,90);
2665  hUnderOverBinNUAneg = new TH1F("hUnderOverBinNUAneg","",90,0,90);
2667 
2668  Double_t fCentBinQvect[16] = {0.,2.5,5,10,15,20,25,30,35,40,45,50,60,70,80,90};
2669 
2670  fHEnergyZNCvsCent = new TH2F("fHEnergyZNCvsCent","ZNC Energy vs cent",15,fCentBinQvect,4000,0,200000);
2672  fHEnergyZNAvsCent = new TH2F("fHEnergyZNAvsCent","ZNA Energy vs cent",15,fCentBinQvect,4000,0,200000);
2674  fHEnergyZPCvsCent = new TH2F("fHEnergyZPCvsCent","ZPC Energy vs cent",15,fCentBinQvect,2000,0,50000);
2676  fHEnergyZPAvsCent = new TH2F("fHEnergyZPAvsCent","ZPA Energy vs cent",15,fCentBinQvect,2000,0,50000);
2678 
2679  fHEnergyZNCvsCentRun = new TProfile2D("fHEnergyZNCvsCentRun","",90,0,90,90,0,90);
2681  fHEnergyZNAvsCentRun = new TProfile2D("fHEnergyZNAvsCentRun","",90,0,90,90,0,90);
2683  fHEnergyZPCvsCentRun = new TProfile2D("fHEnergyZPCvsCentRun","",90,0,90,90,0,90);
2685  fHEnergyZPAvsCentRun = new TProfile2D("fHEnergyZPAvsCentRun","",90,0,90,90,0,90);
2687 
2688  fHEnergyZPCvsZPA = new TH2F("fHEnergyZPCvsZPA","ZNC Energy vs cent",500,0,50000,500,0,50000);
2690  fHEnergyZNCvsZNA = new TH2F("fHEnergyZNCvsZNA","ZNC Energy vs cent",500,50000,150000,500,50000,150000);
2692 
2693  fHCentBinTrkRecenter = new TH1F("fHCentBinTrkRecenter","centrality Binning",15,fCentBinQvect);
2694 
2695 
2696 
2697 
2698  Int_t magField[2] = {0,1}; //0 = Neg, 1 = Pos
2699 
2700  for(int i=0;i<2;i++){
2701  fHist_Corr3p_QAEta_SP_V0A_PN[i] = new TProfile(Form("fHist_Corr3p_QAEta_SP_V0A_PN_Mag%d",magField[i]),"PN, Cent 10-20%",16,-0.8,0.8,"");
2703  fHist_Corr3p_QAEta_SP_V0A_PP[i] = new TProfile(Form("fHist_Corr3p_QAEta_SP_V0A_PP_Mag%d",magField[i]),"PP, Cent 10-20%",16,-0.8,0.8,"");
2705  fHist_Corr3p_QAEta_SP_V0A_NN[i] = new TProfile(Form("fHist_Corr3p_QAEta_SP_V0A_NN_Mag%d",magField[i]),"NN, Cent 10-20%",16,-0.8,0.8,"");
2707  }
2708  for(int i=0;i<2;i++){
2709  fHist_Corr3p_QAEta_SP_V0C_PN[i] = new TProfile(Form("fHist_Corr3p_QAEta_SP_V0C_PN_Mag%d",magField[i]),"PN, Cent 10-20%",16,-0.8,0.8,"");
2711  fHist_Corr3p_QAEta_SP_V0C_PP[i] = new TProfile(Form("fHist_Corr3p_QAEta_SP_V0C_PP_Mag%d",magField[i]),"PP, Cent 10-20%",16,-0.8,0.8,"");
2713  fHist_Corr3p_QAEta_SP_V0C_NN[i] = new TProfile(Form("fHist_Corr3p_QAEta_SP_V0C_NN_Mag%d",magField[i]),"NN, Cent 10-20%",16,-0.8,0.8,"");
2715  }
2716 
2717  fEtaBinFinderForQA = new TH1F("fEtaBinFinderForQA","",16,-0.8,0.8);
2719 
2720 
2721 
2722 
2723 
2724 
2725  Int_t suffixEta[4] = {1,0,1,0}; //{"Pos","Neg","Pos","Neg"};
2726  Int_t suffixVz[4] = {1,1,0,0}; //{"Pos","Pos","Neg","Neg"};
2727 
2728  if(bFillAvgTPCQn){
2729  for(int i=0;i<4;i++){
2730  fHCos1nPosChEtaVz[i] = new TProfile2D(Form("fHCos1nPosChEta%dVz%d",suffixEta[i],suffixVz[i]),"<ptw*cos1n>",90,0,90,fRunFlag,0,fRunFlag);
2731  fListCalibs->Add(fHCos1nPosChEtaVz[i]);
2732  fHSin1nPosChEtaVz[i] = new TProfile2D(Form("fHSin1nPosChEta%dVz%d",suffixEta[i],suffixVz[i]),"<ptw*sin1n>",90,0,90,fRunFlag,0,fRunFlag);
2733  fListCalibs->Add(fHSin1nPosChEtaVz[i]);
2734  fHCos1nNegChEtaVz[i] = new TProfile2D(Form("fHCos1nNegChEta%dVz%d",suffixEta[i],suffixVz[i]),"<ptw*cos1n>",90,0,90,fRunFlag,0,fRunFlag);
2735  fListCalibs->Add(fHCos1nNegChEtaVz[i]);
2736  fHSin1nNegChEtaVz[i] = new TProfile2D(Form("fHSin1nNegChEta%dVz%d",suffixEta[i],suffixVz[i]),"<ptw*sin1n>",90,0,90,fRunFlag,0,fRunFlag);
2737  fListCalibs->Add(fHSin1nNegChEtaVz[i]);
2738 
2739  fHCos2nPosChEtaVz[i] = new TProfile2D(Form("fHCos2nPosChEta%dVz%d",suffixEta[i],suffixVz[i]),"<ptw*cos2n>",90,0,90,fRunFlag,0,fRunFlag);
2740  fListCalibs->Add(fHCos2nPosChEtaVz[i]);
2741  fHSin2nPosChEtaVz[i] = new TProfile2D(Form("fHSin2nPosChEta%dVz%d",suffixEta[i],suffixVz[i]),"<ptw*sin2n>",90,0,90,fRunFlag,0,fRunFlag);
2742  fListCalibs->Add(fHSin2nPosChEtaVz[i]);
2743  fHCos2nNegChEtaVz[i] = new TProfile2D(Form("fHCos2nNegChEta%dVz%d",suffixEta[i],suffixVz[i]),"<ptw*cos2n>",90,0,90,fRunFlag,0,fRunFlag);
2744  fListCalibs->Add(fHCos2nNegChEtaVz[i]);
2745  fHSin2nNegChEtaVz[i] = new TProfile2D(Form("fHSin2nNegChEta%dVz%d",suffixEta[i],suffixVz[i]),"<ptw*sin2n>",90,0,90,fRunFlag,0,fRunFlag);
2746  fListCalibs->Add(fHSin2nNegChEtaVz[i]);
2747 
2748  fHCos3nPosChEtaVz[i] = new TProfile2D(Form("fHCos3nPosChEta%dVz%d",suffixEta[i],suffixVz[i]),"<ptw*cos3n>",90,0,90,fRunFlag,0,fRunFlag);
2749  fListCalibs->Add(fHCos3nPosChEtaVz[i]);
2750  fHSin3nPosChEtaVz[i] = new TProfile2D(Form("fHSin3nPosChEta%dVz%d",suffixEta[i],suffixVz[i]),"<ptw*sin3n>",90,0,90,fRunFlag,0,fRunFlag);
2751  fListCalibs->Add(fHSin3nPosChEtaVz[i]);
2752  fHCos3nNegChEtaVz[i] = new TProfile2D(Form("fHCos3nNegChEta%dVz%d",suffixEta[i],suffixVz[i]),"<ptw*cos3n>",90,0,90,fRunFlag,0,fRunFlag);
2753  fListCalibs->Add(fHCos3nNegChEtaVz[i]);
2754  fHSin3nNegChEtaVz[i] = new TProfile2D(Form("fHSin3nNegChEta%dVz%d",suffixEta[i],suffixVz[i]),"<ptw*sin3n>",90,0,90,fRunFlag,0,fRunFlag);
2755  fListCalibs->Add(fHSin3nNegChEtaVz[i]);
2756 
2757  fHCos4nPosChEtaVz[i] = new TProfile2D(Form("fHCos4nPosChEta%dVz%d",suffixEta[i],suffixVz[i]),"<ptw*cos4n>",90,0,90,fRunFlag,0,fRunFlag);
2758  fListCalibs->Add(fHCos4nPosChEtaVz[i]);
2759  fHSin4nPosChEtaVz[i] = new TProfile2D(Form("fHSin4nPosChEta%dVz%d",suffixEta[i],suffixVz[i]),"<ptw*sin4n>",90,0,90,fRunFlag,0,fRunFlag);
2760  fListCalibs->Add(fHSin4nPosChEtaVz[i]);
2761  fHCos4nNegChEtaVz[i] = new TProfile2D(Form("fHCos4nNegChEta%dVz%d",suffixEta[i],suffixVz[i]),"<ptw*cos4n>",90,0,90,fRunFlag,0,fRunFlag);
2762  fListCalibs->Add(fHCos4nNegChEtaVz[i]);
2763  fHSin4nNegChEtaVz[i] = new TProfile2D(Form("fHSin4nNegChEta%dVz%d",suffixEta[i],suffixVz[i]),"<ptw*sin4n>",90,0,90,fRunFlag,0,fRunFlag);
2764  fListCalibs->Add(fHSin4nNegChEtaVz[i]);
2765 
2766  //Double weighted <..>
2767  fHCos2nDWPosChEtaVz[i] = new TProfile2D(Form("fHCos2nDWPosChEta%dVz%d",suffixEta[i],suffixVz[i]),"<ptw*ptw*cos2n>",90,0,90,fRunFlag,0,fRunFlag);
2769  fHSin2nDWPosChEtaVz[i] = new TProfile2D(Form("fHSin2nDWPosChEta%dVz%d",suffixEta[i],suffixVz[i]),"<ptw*ptw*cos2n>",90,0,90,fRunFlag,0,fRunFlag);
2771  fHCos2nDWNegChEtaVz[i] = new TProfile2D(Form("fHCos2nDWNegChEta%dVz%d",suffixEta[i],suffixVz[i]),"<ptw*ptw*cos2n>",90,0,90,fRunFlag,0,fRunFlag);
2773  fHSin2nDWNegChEtaVz[i] = new TProfile2D(Form("fHSin2nDWNegChEta%dVz%d",suffixEta[i],suffixVz[i]),"<ptw*ptw*cos2n>",90,0,90,fRunFlag,0,fRunFlag);
2775  }
2776  }
2777 
2778 
2779  fV0MultChVsRun = new TProfile2D("fV0MultChVsRun","1-32 V0C, 33-64 V0A",64,0,64,fRunFlag,0,fRunFlag,"");
2781 
2782 
2783 
2784  fV0AQnxVsCentRun = new TProfile2D("fV0ACos2nVsCentRun","<Cos2> vs cent,Run",90,0,90,fRunFlag,0,fRunFlag,"");
2786  fV0AQnyVsCentRun = new TProfile2D("fV0ASin2nVsCentRun","<Sin2> vs cent,Run",90,0,90,fRunFlag,0,fRunFlag,"");
2788 
2789  fV0CQnxVsCentRun = new TProfile2D("fV0CCos2nVsCentRun","<Cos2> vs cent,Run",90,0,90,fRunFlag,0,fRunFlag,"");
2791  fV0CQnyVsCentRun = new TProfile2D("fV0CSin2nVsCentRun","<Sin2> vs cent,Run",90,0,90,fRunFlag,0,fRunFlag,"");
2793 
2794  fTPCQnxVsCentRun = new TProfile2D("fTPCCos2nVsCentRun","<Cos2> vs cent,Run",90,0,90,fRunFlag,0,fRunFlag,"");
2796  fTPCQnyVsCentRun = new TProfile2D("fTPCSin2nVsCentRun","<Sin2> vs cent,Run",90,0,90,fRunFlag,0,fRunFlag,"");
2798 
2799 
2800  //Average Multiplicity, same-sign, opposite-sign pair vs Centrality 1% :
2801 
2802  fAvgMultCentRun = new TProfile2D("fAvgMultCentRun","<Mult> vs cent,Run",90,0,90,fRunFlag,0,fRunFlag,"");
2804  fAvgWgtMultCentRun = new TProfile2D("fAvgWgtMultCentRun","<wgt*Mult> vs cent,Run",90,0,90,fRunFlag,0,fRunFlag,"");
2806  fAvgPOIposCentRun = new TProfile2D("fAvgPOIposCentRun","<wgt*POIs> ch-pos vs cent,Run",90,0,90,fRunFlag,0,fRunFlag,"");
2808  fAvgPOInegCentRun = new TProfile2D("fAvgPOInegCentRun","<wgt*POIs> ch-neg vs cent,Run",90,0,90,fRunFlag,0,fRunFlag,"");
2810  fAvgPOIPPCentRun = new TProfile2D("fAvgPOIPPCentRun","<wgt*POIs> Pos-Pos vs cent,Run",90,0,90,fRunFlag,0,fRunFlag,"");
2812  fAvgPOINNCentRun = new TProfile2D("fAvgPOINNCentRun","<wgt*POIs> Neg-Neg vs cent,Run",90,0,90,fRunFlag,0,fRunFlag,"");
2814  fAvgPOIOSCentRun = new TProfile2D("fAvgPOIOSCentRun","<wgt*POIs> oppo.-sign vs cent,Run",90,0,90,fRunFlag,0,fRunFlag,"");
2816 
2817 
2818 
2819  //Store CME run by Run:
2820  for(int i=0;i<2;i++){//0=V0A,1=V0C
2821  fHist_Corr3p_vsRun_EP_PN[i] = new TProfile2D(Form("fHist_Corr3p_vsRun_EP_PN_Det%d",i+1),"opposit charge correlator",90,0,90,fRunFlag,0,fRunFlag,"");
2823  fHist_Corr3p_vsRun_EP_PP[i] = new TProfile2D(Form("fHist_Corr3p_vsRun_EP_PP_Det%d",i+1),"PosPos charge correlator",90,0,90,fRunFlag,0,fRunFlag,"");
2825  fHist_Corr3p_vsRun_EP_NN[i] = new TProfile2D(Form("fHist_Corr3p_vsRun_EP_NN_Det%d",i+1),"NegNeg charge correlator",90,0,90,fRunFlag,0,fRunFlag,"");
2827  }
2828 
2829 
2830 
2831 
2832 
2833  for(int i=0;i<10;i++){
2834  sprintf(name,"fHistChPosvsEtaPtRun_Cent%d",i);
2835  sprintf(title,"Pos Ch, Cent %2.0f-%2.0f",centRange[i],centRange[i+1]);
2836  fHistChPosvsEtaPtRun[i] = new TH3F(name,title,25,0.2,5.2,16,-0.8,0.8,fRunFlag,0,fRunFlag);
2838  sprintf(name,"fHistChNegvsEtaPtRun_Cent%d",i);
2839  sprintf(title,"Neg Ch, Cent %2.0f-%2.0f",centRange[i],centRange[i+1]);
2840  fHistChNegvsEtaPtRun[i] = new TH3F(name,title,25,0.2,5.2,16,-0.8,0.8,fRunFlag,0,fRunFlag);
2842  }
2843 
2844 
2845 
2846 
2847  Int_t gCentForNUA[5] = {0,5,10,40,90};
2848 
2849  if(bFillEtaPhiNUA) {
2850  for(int i=0;i<4;i++){
2851  for(int j=0;j<fRunFlag;j++){
2852  sprintf(name,"fHistEtaPhiVz_Pos_Cent%d_Run%d",i,runNums[j]);
2853  sprintf(title,"eta,phi,Vz Pos Cent%d-%d%%",gCentForNUA[i],gCentForNUA[i+1]);
2854  fHist3DEtaPhiVz_Pos_Run[i][j] = new TH3F(name,title,10,-10,10,50,0,6.2832,16,-0.8,0.8);
2856 
2857  sprintf(name,"fHistEtaPhiVz_Neg_Cent%d_Run%d",i,runNums[j]);
2858  sprintf(title,"eta,phi,Vz Pos Cent%d-%d%%",gCentForNUA[i],gCentForNUA[i+1]);
2859  fHist3DEtaPhiVz_Neg_Run[i][j] = new TH3F(name,title,10,-10,10,50,0,6.2832,16,-0.8,0.8);
2861  }
2862  }
2863  }
2864 
2865 
2866 
2867  //pT Dependent NUA correction:
2868  fVzBinFinderForNUA = new TH1F("fVzBinFinderForNUA","",4,-10,10);
2870  /*
2871  Double_t pTbinNUA[16] = {0.2,0.4,0.6,0.8,1.0,1.2,1.4,1.6,1.8,2.0,2.4,2.6,3.0,3.5,4.0,5.0};
2872  Double_t etabinNUA[9] = {-0.8,-0.6,-0.4,-0.2,0.0,0.2,0.4,0.6,0.8};
2873  Double_t phibinNUA[51] = {0.,};
2874  Double_t fPhi = 6.2832/50;
2875  for(int i=0;i<51;i++){
2876  phibinNUA[i] = fPhi*i;
2877  }
2878 
2879  if(bFillEtaPhiNUA) {
2880  for(int i=0;i<4;i++){
2881  for(int j=0;j<fRunFlag;j++){
2882  sprintf(name,"fHistEtaPhiPt_Pos_Vz%d_Run%d",i,runNums[j]);
2883  sprintf(title,"eta,phi,Pt Pos Vz%d",i);
2884  fHist3DEtaPhiVz_Pos_Run[i][j] = new TH3F(name,title,15,pTbinNUA,50,phibinNUA,8,etabinNUA);
2885  fListCalibs->Add(fHist3DEtaPhiVz_Pos_Run[i][j]);
2886 
2887  sprintf(name,"fHistEtaPhiPt_Neg_Vz%d_Run%d",i,runNums[j]);
2888  sprintf(title,"eta,phi,Pt Pos Vz%d",i);
2889  fHist3DEtaPhiVz_Neg_Run[i][j] = new TH3F(name,title,15,pTbinNUA,50,phibinNUA,8,etabinNUA);
2890  fListCalibs->Add(fHist3DEtaPhiVz_Neg_Run[i][j]);
2891  }
2892  }
2893  }
2894  */
2895 
2896 
2897 
2898 }
2899 
2900 
virtual void Terminate(Option_t *)
Bool_t CheckEventIsPileUp(AliAODEvent *faod)
TProfile2D * fHist_Corr3p_ZDN_SP_NN[3]
TProfile * fHist_Corr3p_EtaDiff_EP_V0C_NN[2][6]
TProfile * fHist_Reso2n_EP_Norm_Det[2][3]
TProfile * fHist_Corr3p_EtaDiff_EP_V0A_NN[2][6]
double Double_t
Definition: External.C:58
Definition: External.C:260
TProfile2D * fHist_Corr3p_ZDN_SP_PP[3]
Norm = 10 centrality bins along X.
TProfile2D * fHSin3nPosChEtaVz[4]
TH1D * fQynsV0C
sigma Qx2 V0C
Int_t fOldRunNum
number of total run
Definition: External.C:236
Bool_t PileUpMultiVertex(const AliAODEvent *faod)
const char * title
Definition: MakeQAPdf.C:27
TProfile * fHist_Corr3p_pTSum_EP_V0A_PP[2][6]
TProfile2D * fHCos4nPosChEtaVz[4]
TH1D * fQxnmV0A
profile from V0 multiplicity
AliFlowTrackSimple * GetTrack(Int_t i)
TList * fListHistos
Event selection.
TProfile2D * fHist_Corr2p_EP_Norm_NN[2]
AliAnalysisUtils * fAnalysisUtil
MultSelection (RUN2 centrality estimator)
TProfile * fHist_Corr3p_QAEta_SP_V0C_PP[2]
Pos and Neg Mag field.
TProfile2D * fHCos2nNegChEtaVz[4]
TProfile * fHist_Corr3p_pTDiff_EP_V0C_PN[2][6]
TProfile2D * fHSin1nNegChEtaVz[4]
TList * fListFBHijing
collection of Calib Histos
char Char_t
Definition: External.C:18
TProfile * fHist_Corr3p_QAEta_SP_V0A_PP[2]
Pos and Neg Mag field.
Int_t GetCurrentRunIndex(Int_t run)
TProfile * fHist_Corr3p_EP_Norm_PP[2][3]
TProfile2D * fHSin3nNegChEtaVz[4]
TProfile2D * fHSin2nPosChEtaVz[4]
TList * fListCalibs
collection of output
TProfile * fHist_Corr3p_EP_Norm_PN[2][3]
TProfile * fHist_Corr3p_pTDiff_EP_V0A_NN[2][6]
TProfile2D * fHist_Corr3p_ZDN_SP_PN[3]
TProfile2D * fHCos1nPosChEtaVz[4]
TH3F * fHist3DEtaPhiVz_Neg_Run[4][90]
4 centrality bin 90 Bins for Run. NUA
TH1F * hUnderOverBinNUAneg
//temporary Debug, remove for stable code
TProfile * fHist_Corr3p_EP_Norm_NN[2][3]
TProfile2D * fHist_Corr3p_vsRun_EP_PN[2]
AliMultSelection * fMultSelection
input event
TH1F * fPileUpMultSelCount
event count with different cuts
TProfile * fHist_Corr3p_pTSum_EP_V0A_PN[2][6]
TProfile2D * fHist_NonIso_SP_PP_Mag0[2]
TProfile * fHist_Corr3p_EtaDiff_EP_V0A_PN[2][6]
TProfile2D * fHCos4nNegChEtaVz[4]
Double_t Phi() const
TProfile * fHist_Corr3p_QAEta_SP_V0A_PN[2]
TProfile2D * fHCos3nPosChEtaVz[4]
void OpenInfoCalbration(Int_t run, Float_t fHarmonic)
TProfile2D * fHist_Reso2n_ZDN_SP_Det[3]
int Int_t
Definition: External.C:63
TH1D * fQynsV0A
sigma Qx2 V0A
TProfile2D * fHCos2nDWPosChEtaVz[4]
TH1D * fMultV0
Cut parameters which were used.
TProfile2D * fHSin2nNegChEtaVz[4]
float Float_t
Definition: External.C:68
TProfile * fHist_Corr3p_SP_Norm_PP[2][3]
Norm = 10 centrality bins along X.
void GetNUACorrectionHist(Int_t run, TString sfileNUA)
Definition: External.C:252
TProfile * fHist_Corr3p_pTSum_EP_V0A_NN[2][6]
Definition: External.C:228
Definition: External.C:212
TProfile * fHist_Corr3p_pTDiff_EP_V0A_PN[2][6]
TProfile * fHist_Corr3p_pTSum_EP_V0C_PN[2][6]
TProfile2D * fHSin2nDWPosChEtaVz[4]
TProfile2D * fHCos2nDWNegChEtaVz[4]
TProfile2D * fHCos3nNegChEtaVz[4]
TH3F * fHistChNegvsEtaPtRun[10]
10 Centrality Bin
TProfile2D * fHist_NonIso_SP_NN_Mag1[2]
Mag1 = B > 0.
TProfile2D * fHCos2nPosChEtaVz[4]
Int_t fRunFlag
array of runnumbers
TProfile * fHist_Corr3p_QAEta_SP_V0C_NN[2]
AliFlowEventSimple * fEvent
TProfile * fHist_Reso2n_SP_Norm_Det[2][3]
TProfile2D * fHist_Corr2p_EP_Norm_PN[2]
virtual void UserCreateOutputObjects()
TProfile * fHist_Corr3p_pTDiff_EP_V0C_PP[2][6]
TProfile2D * fV0MultChVsRun
opposite sign pairs
void InitializeRunArray(TString sPeriod)
TProfile * fHist_Corr3p_QAEta_SP_V0A_NN[2]
TH3F * fHist3DEtaPhiVz_Pos_Run[4][90]
4 centrality bin
TH1F * fHCentBinTrkRecenter
//temporary Debug, remove for stable code
TProfile2D * fHSin4nNegChEtaVz[4]
TProfile * fHist_Corr3p_pTSum_EP_V0C_NN[2][6]
TProfile2D * fHist_NonIso_SP_PP_Mag1[2]
TProfile * fHist_Corr3p_SP_Norm_PN[2][3]
TProfile2D * fHSin4nPosChEtaVz[4]
TProfile * fHist_Corr3p_EtaDiff_EP_V0C_PP[2][6]
void GetV0QvectAndMult(const AliAODVZERO *aodV0, Float_t fHarmonic, Double_t &Qxan, Double_t &Qyan, Double_t &sumMa, Double_t &Qxcn, Double_t &Qycn, Double_t &sumMc)
TH3D * fHCorrectNUAneg[4]
4 centrality bin
TProfile * fHist_Corr3p_EtaDiff_EP_V0A_PP[2][6]
Float_t EvtCent
counter of event for cout
TProfile * fHist_Corr3p_QAEta_SP_V0C_PN[2]
TProfile2D * fHist_Corr3p_vsRun_EP_NN[2]
Int_t fHarmonicN
Event centrality.
TProfile2D * fHist_NonIso_SP_NN_Mag0[2]
Mag0 = B < 0.
TProfile * fHist_Corr3p_EtaDiff_EP_V0C_PN[2][6]
const char Option_t
Definition: External.C:48
void GetZDCCorrectionHist(Int_t run)
TProfile2D * fAvgPOIOSCentRun
same sign Neg-Neg pairs
Bool_t InPOISelection(Int_t poiType=1) const
TH1D * fQxnmV0C
sigma Qy2 V0A
Double_t Eta() const
const Double_t pi
TProfile2D * fHist_Corr3p_vsRun_EP_PP[2]
TProfile * fHist_Corr3p_SP_Norm_NN[2][3]
bool Bool_t
Definition: External.C:53
TProfile2D * fHSin1nPosChEtaVz[4]
virtual void UserExec(Option_t *option)
TProfile * fHist_Corr3p_pTDiff_EP_V0C_NN[2][6]
TH1D * fFB_Efficiency_Cent[10]
4 centrality bin 90 Bins for Run. NUA
double GetWDist(const AliVVertex *v0, const AliVVertex *v1)
TProfile2D * fHSin2nDWNegChEtaVz[4]
TProfile2D * fAvgPOINNCentRun
same sign Pos-Pos pairs
TProfile * fHist_Corr3p_pTSum_EP_V0C_PP[2][6]
TProfile2D * fHCos1nNegChEtaVz[4]
Int_t NumberOfTracks() const
TProfile * fHist_Corr3p_pTDiff_EP_V0A_PP[2][6]
TProfile2D * fHist_Corr2p_EP_Norm_PP[2]
Two magnetic fields.