AliPhysics  d565ceb (d565ceb)
AliAnalysisTaskCMEV0.h
Go to the documentation of this file.
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice */
3 /* $Id: $ */
4 
5 #ifndef AliAnalysisTaskCMEV0_H
6 #define AliAnalysisTaskCMEV0_H
7 
9 // AliAnalysisTaskCMEV0:
10 // analysis task for ZDC gain Equalization
11 // and CME analysis using VZERO Detector
12 // Author: Rihan Haque (mhaque@cern.ch)
14 
15 #include "TH1.h"
16 #include "TH2.h"
17 #include "TH3.h"
18 #include "TH2F.h"
19 #include "TProfile2D.h"
20 #include "TProfile.h"
21 #include "TString.h"
22 //#include "TRandom3.h"
23 #include "AliAnalysisTaskSE.h"
24 
25 
26 class AliAODEvent;
27 class AliAODVZERO;
28 class AliVVertex;
29 class AliFlowEventSimple;
30 class AliMultSelection;
31 class AliAnalysisUtils;
32 class AliPIDResponse;
33 class TList;
34 
36 
37 public:
38 
40 //AliAnalysisTaskCMEV0(const char *name);
41  AliAnalysisTaskCMEV0(const TString name);
42  virtual ~AliAnalysisTaskCMEV0();
43 
44  virtual void UserCreateOutputObjects();
45  virtual void UserExec(Option_t *option);
46  virtual void Terminate(Option_t *);
47 
48 
49  void SetInputListNUA(TList *finputNUA) {this->fListNUACorr = finputNUA;}
50  void SetGainCorrZDNP(TList *finputZDN) {this->fListZDNCorr = finputZDN;}
51  void SetFBEfficiencyList(TList *fFBlist) {this->fListFBHijing = fFBlist;}
52  void SetInputListforV0M(TList *finputV0M) {this->fListV0MCorr = finputV0M;}
53  void SetRejectPileUp(Bool_t pileup) {this->fRejectPileUp = pileup;}
54  void SetRejectPileUpTight(Bool_t pileupt8) {this->fRejectPileUpTight = pileupt8;}
55  void SetStoreTPCQnAvg(Bool_t bstoreTPCQn) {this->bFillAvgTPCQn = bstoreTPCQn;}
56  void SetFillNUAHist(Bool_t bfillNUAhist) {this->bFillEtaPhiNUA = bfillNUAhist;}
57  void SetApplyNUACorr(Bool_t fUseNUACorr) {this->bApplyNUACorr = fUseNUACorr;}
58  void SetApplyZDCCorr(Bool_t fUseZDCCorr) {this->bApplyZDCCorr = fUseZDCCorr;}
59  void SetDataSet(TString fdataset) {this->sDataSet = fdataset;}
60  void SetAnalysisSet(TString fanalysisSet) {this->sAnalysisSet = fanalysisSet;}
61  void SetCentEstimator(TString centEstim) {this->sCentEstimator = centEstim;}
62  void SetHarmonicN(Int_t harmonic1) {this->fHarmonicN = harmonic1;}
63  void SetHarmonicM(Int_t harmonic2) {this->fHarmonicM = harmonic2;}
64  void SetPsiHarmonic(Int_t nforpsi) {this->fHarmonicPsi = nforpsi;}
65  void SetApplyNUAinEP(Bool_t bApplyNUAEP) {this->bApplyNUAforEP = bApplyNUAEP;}
66  void SetSourceFileNUA(TString sfilenua) {this->sFileNUA = sfilenua;}
67  void SetFillZDNCalHist(Bool_t bfillZDC) {this->bFillZDCinfo = bfillZDC;}
68  void SetSkipNestedLoop(Bool_t bskipNest) {this->bSkipNestedTrk = bskipNest;}
69  void SetMCEffiDimension(TString mcDimen) {this->sMCdimension = mcDimen;}
70  void SetRemoveNegTrkRndm(Bool_t remRndm) {this->bRemNegTrkRndm = remRndm;}
71  void SetApplyV0MCorr(Bool_t bV0Mcorr) {this->bApplyV0MCorr = bV0Mcorr;}
73  void SetTrackFilterBit(Int_t gf) {this->gFilterBit = gf;}
74 
75 
76 private:
77 
78  AliAnalysisTaskCMEV0(const AliAnalysisTaskCMEV0& aAnalysisTask);
80 
83  double GetWDist(const AliVVertex* v0, const AliVVertex* v1);
84 
85  void OpenInfoCalbration(Int_t run, Float_t fHarmonic);
86  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);
87  void DefineHistograms();
88  void GetNUACorrectionHist(Int_t run, TString sfileNUA);
89  void GetZDCCorrectionHist(Int_t run);
90  void GetV0MCorrectionHist(Int_t run);
91 
92  void InitializeRunArray(TString sPeriod);
94  Float_t GetDPhiStar(Float_t phi1, Float_t pt1, Float_t charge1, Float_t phi2, Float_t pt2, Float_t charge2, Float_t radius, Float_t bSign);
95 
96 
97 
99  AliMultSelection* fMultSelection;
100  AliAnalysisUtils* fAnalysisUtil;
101 
105 
106  TList* fListFBHijing; // Hijing Efficiency list
107  TList* fListNUACorr; // NUA Correction List
108  TList* fListZDNCorr; // ZDC gain Correction Wgts
110 
122 
123  TString sDataSet; // Dataset: 2010, 2011, or 2015.
124  TString sAnalysisSet; // Values: recenter1,recenter2,analysis1
125  TString sCentEstimator; // Centrality Estimator
126  TString sFileNUA; // NUA source file.
127  TString sMCdimension; // Dimention for MC effi Correction
128 
129 
130 
136  Int_t fHarmonicN; // Harmonic n
137  Int_t fHarmonicM; // Harmonic m
138  Int_t fHarmonicPsi; // Harmonic psi
144 
145 
148  TH1F *fPileUpCount;
150 
151  //runtime v0 calibration info histograms:
161  //---------------------------------
162 
163  //--- profiles for TPC Q-vector recenter. (They are filled, not read)
172 
181 
185 
186 
191 
192  TProfile2D *fHEnergyZNCvsCentRun;
193  TProfile2D *fHEnergyZNAvsCentRun;
194  TProfile2D *fHEnergyZPCvsCentRun;
195  TProfile2D *fHEnergyZPAvsCentRun;
196 
199 
202 
204 
206 
207  TProfile2D *fV0AQ2xVsCentRun;
208  TProfile2D *fV0AQ2yVsCentRun;
209  TProfile2D *fV0CQ2xVsCentRun;
210  TProfile2D *fV0CQ2yVsCentRun;
211 
212  TProfile2D *fV0AQ3xVsCentRun;
213  TProfile2D *fV0AQ3yVsCentRun;
214  TProfile2D *fV0CQ3xVsCentRun;
215  TProfile2D *fV0CQ3yVsCentRun;
216 
217  TProfile2D *fTPCQ2xVsCentRun;
218  TProfile2D *fTPCQ2yVsCentRun;
219  TProfile2D *fTPCQ3xVsCentRun;
220  TProfile2D *fTPCQ3yVsCentRun;
221 
224  TFile *fileNUApos;
225  TFile *fileNUAneg;
226 
227  TProfile2D *fAvgMultCentRun;
228  TProfile2D *fAvgWgtMultCentRun;
229  TProfile2D *fAvgPOIposCentRun;
230  TProfile2D *fAvgPOInegCentRun;
231  TProfile2D *fAvgPOIPPCentRun;
232  TProfile2D *fAvgPOINNCentRun;
233  TProfile2D *fAvgPOIOSCentRun;
234 
235  TProfile2D *fV0MultChVsRun;
236 
240 
244 
245  TProfile2D *fRejectRatioVsCR;
246 
251 
252 
253 
254  TProfile2D *fCentV0MvsVzRun;
255  TProfile2D *fCent3pvsVzRun;
256 
267  //TRandom3 fRand; //!
268 
269 
270 
271 
272 
273 
274 
275 
276 
277 
278 
279 
280 
281  // [ Arrays of Histrograms here: ]
282 
283 
286 
287 
290 
292 
295 
296 
297  //CME using scalar product method:
298  TProfile *fHist_Corr3p_SP_Norm_PN[2][3];
299  TProfile *fHist_Corr3p_SP_Norm_PP[2][3];
300  TProfile *fHist_Corr3p_SP_Norm_NN[2][3];
301  TProfile *fHist_Reso2n_SP_Norm_Det[2][3];
302 
303  //CME Using Event plane method:
304  TProfile *fHist_Corr3p_EP_Norm_PN[2][3];
305  TProfile *fHist_Corr3p_EP_Norm_PP[2][3];
306  TProfile *fHist_Corr3p_EP_Norm_NN[2][3];
307  TProfile *fHist_Reso2n_EP_Norm_Det[2][3];
308 
309  //CME(EP) vs Refmult:
310  TProfile *fHist_Corr3p_EP_Refm_PN[2][3];
311  TProfile *fHist_Corr3p_EP_Refm_PP[2][3];
312  TProfile *fHist_Corr3p_EP_Refm_NN[2][3];
313  TProfile *fHist_Reso2n_EP_Refm_Det[2][3];
314 
315 
316 
317  TProfile2D *fHist_Corr3p_vsRun_EP_PN[2]; // 0=V0A,1=V0C
318  TProfile2D *fHist_Corr3p_vsRun_EP_PP[2]; //
319  TProfile2D *fHist_Corr3p_vsRun_EP_NN[2]; //
320 
321  //CME ZDN correlator: Spectator neutron
322  TProfile2D *fHist_Corr3p_ZDN_SP_PN[3];
323  TProfile2D *fHist_Corr3p_ZDN_SP_PP[3];
324  TProfile2D *fHist_Corr3p_ZDN_SP_NN[3];
325  TProfile2D *fHist_Reso2n_ZDN_SP_Det[3];
326 
327  //CME pT differential Histograms:
328 
329  //(pT_A + pT_B)/2.0
336 
337  // |(pT_A - pT_B)|
344 
345  // |(Eta_A - Eta_B)|
352 
353 
354  //QA: pos/neg ratio:
357 
358  //QA eta dependence:
362 
366 
367  //--- profiles for TPC <Q> (They are filled)
368  TProfile2D *fHCos1nPosChEtaVz[4];
369  TProfile2D *fHCos2nPosChEtaVz[4];
370  TProfile2D *fHCos3nPosChEtaVz[4];
371  TProfile2D *fHCos4nPosChEtaVz[4];
372  TProfile2D *fHSin1nPosChEtaVz[4];
373  TProfile2D *fHSin2nPosChEtaVz[4];
374  TProfile2D *fHSin3nPosChEtaVz[4];
375  TProfile2D *fHSin4nPosChEtaVz[4];
376 
377  TProfile2D *fHCos1nNegChEtaVz[4];
378  TProfile2D *fHCos2nNegChEtaVz[4];
379  TProfile2D *fHCos3nNegChEtaVz[4];
380  TProfile2D *fHCos4nNegChEtaVz[4];
381  TProfile2D *fHSin1nNegChEtaVz[4];
382  TProfile2D *fHSin2nNegChEtaVz[4];
383  TProfile2D *fHSin3nNegChEtaVz[4];
384  TProfile2D *fHSin4nNegChEtaVz[4];
385 
386  TProfile2D *fHCos2nDWPosChEtaVz[4];
387  TProfile2D *fHSin2nDWPosChEtaVz[4];
388  TProfile2D *fHCos2nDWNegChEtaVz[4];
389  TProfile2D *fHSin2nDWNegChEtaVz[4];
390 
391  //Store Non-isotropic terms:
392  TProfile2D *fHist_NonIso_SP_PP_Mag0[2];
393  TProfile2D *fHist_NonIso_SP_NN_Mag0[2];
394  TProfile2D *fHist_NonIso_SP_PP_Mag1[2];
395  TProfile2D *fHist_NonIso_SP_NN_Mag1[2];
396 
397 
398  //2particle correlation vs Cent:
399  TProfile2D *fHist_Corr2p_EP_Norm_PN[2];
400  TProfile2D *fHist_Corr2p_EP_Norm_PP[2];
401  TProfile2D *fHist_Corr2p_EP_Norm_NN[2];
402 
403  //2particle correlation vs Refm:
404  TProfile2D *fHist_Corr2p_EP_Refm_PN[2];
405  TProfile2D *fHist_Corr2p_EP_Refm_PP[2];
406  TProfile2D *fHist_Corr2p_EP_Refm_NN[2];
407 
408 
409 
410 
411  ClassDef(AliAnalysisTaskCMEV0, 1); //
412 };
413 
414 #endif
415 
TProfile * fHist_Corr3p_EP_Refm_PN[2][3]
virtual void Terminate(Option_t *)
void SetFillZDNCalHist(Bool_t bfillZDC)
Bool_t CheckEventIsPileUp(AliAODEvent *faod)
TProfile2D * fHist_Corr3p_ZDN_SP_NN[3]
void SetPsiHarmonic(Int_t nforpsi)
TProfile * fHist_Corr3p_EtaDiff_EP_V0C_NN[2][6]
void SetCentEstimator(TString centEstim)
void SetApplyNUAinEP(Bool_t bApplyNUAEP)
Float_t GetDPhiStar(Float_t phi1, Float_t pt1, Float_t charge1, Float_t phi2, Float_t pt2, Float_t charge2, Float_t radius, Float_t bSign)
TProfile * fHist_Reso2n_EP_Norm_Det[2][3]
TProfile2D * fHCos1nNegChEtaNegVzPos
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.
void SetDataSet(TString fdataset)
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)
TProfile2D * fHist_Corr2p_EP_Refm_PN[2]
TProfile * fHist_Corr3p_pTSum_EP_V0A_PP[2][6]
void SetApplyV0MCorr(Bool_t bV0Mcorr)
TProfile2D * fHCos4nPosChEtaVz[4]
TH1D * fQxnmV0A
profile from V0 multiplicity
TList * fListHistos
Event selection.
TProfile2D * fHist_Corr2p_EP_Norm_NN[2]
TProfile2D * fHSin1nNegChEtaPosVzPos
TProfile2D * fHCos1nNegChEtaPosVzNeg
AliAnalysisUtils * fAnalysisUtil
MultSelection (RUN2 centrality estimator)
void SetApplyZDCCorr(Bool_t fUseZDCCorr)
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]
TProfile2D * fHSin1nPosChEtaNegVzPos
void SetTrackFilterBit(Int_t gf)
TList * fListFBHijing
collection of NUA Histograms
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
TCanvas * c
Definition: TestFitELoss.C:172
TProfile * fHist_Corr3p_EP_Norm_PN[2][3]
TProfile2D * fHSin1nNegChEtaPosVzNeg
TH3F * fFB_Efficiency_Neg[10]
3d correction Map
TProfile * fHist_Corr3p_pTDiff_EP_V0A_NN[2][6]
TProfile2D * fHist_Corr2p_EP_Refm_PP[2]
Two magnetic fields.
TProfile2D * fHist_Corr3p_ZDN_SP_PN[3]
TProfile2D * fHCos1nPosChEtaVz[4]
TH1F * hUnderOverBinNUAneg
//temporary Debug, remove for stable code
TProfile * fHist_Corr3p_EP_Norm_NN[2][3]
TProfile2D * fHist_Corr3p_vsRun_EP_PN[2]
void SetAnalysisSet(TString fanalysisSet)
TProfile2D * fHSin1nNegChEtaNegVzNeg
TProfile2D * fHSin1nPosChEtaPosVzPos
TProfile2D * fHCos1nNegChEtaPosVzPos
TProfile2D * fCentV0MvsVzRun
V0C Average <Qn>, n=2,3.
AliMultSelection * fMultSelection
input event
TH1F * fPileUpMultSelCount
event count with different cuts
TProfile2D * fHCos1nPosChEtaNegVzPos
TProfile * fHist_Corr3p_pTSum_EP_V0A_PN[2][6]
void SetFillNUAHist(Bool_t bfillNUAhist)
TProfile2D * fHist_NonIso_SP_PP_Mag0[2]
TProfile * fHist_Corr3p_EtaDiff_EP_V0A_PN[2][6]
TProfile2D * fHCos4nNegChEtaVz[4]
TH3F * fHist3DEtaPhiVz_Neg_Run[5][90]
5 centrality bin 90 Bins for Run. NUA
TProfile * fHist_Corr3p_QAEta_SP_V0A_PN[2]
TProfile2D * fHCos3nPosChEtaVz[4]
void OpenInfoCalbration(Int_t run, Float_t fHarmonic)
void SetInputListforV0M(TList *finputV0M)
TProfile * fHist_Reso2n_EP_Refm_Det[2][3]
TProfile2D * fHist_Reso2n_ZDN_SP_Det[3]
int Int_t
Definition: External.C:63
void SetPileUpCutParam(Float_t m, Float_t c)
void SetSkipNestedLoop(Bool_t bskipNest)
TH1D * fQynsV0A
sigma Qx2 V0A
TProfile2D * fHCos2nDWPosChEtaVz[4]
TList * fListNUAHist
collection of Calib Histos
TH1D * fMultV0
Cut parameters which were used.
void SetGainCorrZDNP(TList *finputZDN)
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)
AliAnalysisTaskCMEV0 & operator=(const AliAnalysisTaskCMEV0 &aAnalysisTask)
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]
void SetApplyNUACorr(Bool_t fUseNUACorr)
void SetHarmonicM(Int_t harmonic2)
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]
void SetHarmonicN(Int_t harmonic1)
TProfile * fHist_Corr3p_EP_Refm_NN[2][3]
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]
TProfile2D * fHSin1nNegChEtaNegVzPos
void SetSourceFileNUA(TString sfilenua)
TProfile2D * fHCos1nPosChEtaPosVzNeg
void GetV0MCorrectionHist(Int_t run)
TH1F * fHCentBinTrkRecenter
//temporary Debug, remove for stable code
TProfile2D * fHSin4nNegChEtaVz[4]
TProfile2D * fHist_Corr2p_EP_Refm_NN[2]
TProfile * fHist_Corr3p_pTSum_EP_V0C_NN[2][6]
TProfile2D * fHist_NonIso_SP_PP_Mag1[2]
void SetMCEffiDimension(TString mcDimen)
TProfile2D * fHSin1nPosChEtaPosVzNeg
TProfile * fHist_Corr3p_SP_Norm_PN[2][3]
void SetStoreTPCQnAvg(Bool_t bstoreTPCQn)
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)
TProfile * fHist_Corr3p_EtaDiff_EP_V0A_PP[2][6]
TProfile2D * fHCos1nPosChEtaPosVzPos
sigma Qy2 V0C
Float_t EvtCent
counter of event for cout
TH2D * fHAvgerageQnV0C
V0A Average <Qn>, n=2,3.
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
TH1D * fQxnmV0C
sigma Qy2 V0A
void SetRemoveNegTrkRndm(Bool_t remRndm)
TProfile2D * fHSin1nPosChEtaNegVzNeg
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]
TH3D * fHCorrectNUAneg[5]
5 centrality bin
TProfile * fHist_Corr3p_EP_Refm_PP[2][3]
void SetInputListNUA(TList *finputNUA)
void SetFBEfficiencyList(TList *fFBlist)
virtual void UserExec(Option_t *option)
TH2D * fHAvgerageQnV0A
for V0-Mult Gain Correction per channel.
void SetRejectPileUpTight(Bool_t pileupt8)
TProfile * fHist_Corr3p_pTDiff_EP_V0C_NN[2][6]
TProfile2D * fHCos1nPosChEtaNegVzNeg
TH1D * fFB_Efficiency_Cent[10]
5 centrality bin 90 Bins for Run. NUA
TProfile2D * fHCos1nNegChEtaNegVzNeg
double GetWDist(const AliVVertex *v0, const AliVVertex *v1)
TProfile2D * fHSin2nDWNegChEtaVz[4]
TProfile2D * fAvgPOINNCentRun
same sign Pos-Pos pairs
void SetRejectPileUp(Bool_t pileup)
TH3F * fHist3DEtaPhiVz_Pos_Run[5][90]
5 centrality bin
TProfile * fHist_Corr3p_pTSum_EP_V0C_PP[2][6]
TProfile2D * fHCos1nNegChEtaVz[4]
TProfile * fHist_Corr3p_pTDiff_EP_V0A_PP[2][6]
TProfile2D * fHist_Corr2p_EP_Norm_PP[2]
Two magnetic fields.