2 // $Id: AliAnalysisTaskLongRangeCorrelations.h 405 2014-03-21 11:49:16Z cmayer $
3 #ifndef _AliAnalysisTaskLongRangeCorrelations_H_
4 #define _AliAnalysisTaskLongRangeCorrelations_H_
6 /* Copyright(c) 2012, ALICE Experiment at CERN, All rights reserved. *
7 * See cxx source for full Copyright notice */
9 ////////////////////////////////////////////////////////////////////////
11 // Analysis class for Long-range Correlations
13 // Look for correlations in eta (and in phi)
15 // This class needs input AODs.
16 // The output is a list of analysis-specific containers.
21 ////////////////////////////////////////////////////////////////////////
31 class AliEventPoolManager;
35 #include "AliAnalysisTaskSE.h"
37 class AliAnalysisTaskLongRangeCorrelations : public AliAnalysisTaskSE {
39 AliAnalysisTaskLongRangeCorrelations(const char *name="AliAnalysisTaskLongRangeCorrelations");
40 virtual ~AliAnalysisTaskLongRangeCorrelations();
42 /* virtual void NotifyRun(); */
43 virtual void UserCreateOutputObjects();
44 virtual void UserExec(Option_t *);
45 virtual void Terminate(Option_t *);
47 void SetRunMixing(Bool_t runMixing) { fRunMixing = runMixing; }
48 void SetMixingTracks(Int_t mixingTracks) { fMixingTracks = mixingTracks; }
49 void SetTrackFilter(Int_t trackFilter) { fTrackFilter = trackFilter; }
51 void SetCentralityRange(Double_t centMin, Double_t centMax) {
52 fCentMin = centMin; fCentMax = centMax;
54 void SetPtRange(Double_t ptMin, Double_t ptMax) {
55 fPtMin = ptMin; fPtMax = ptMax;
57 void SetPhiRange(Double_t phiMin, Double_t phiMax) {
58 fPhiMin = phiMin; fPhiMax = phiMax;
60 void SetMaxAbsVertexZ(Double_t maxAbsVertexZ) { fMaxAbsVertexZ = maxAbsVertexZ; }
62 void SetSelectPrimaryMCParticles(Int_t flagMC, Int_t flagMCData) {
63 fSelectPrimaryMCParticles = flagMC;
64 fSelectPrimaryMCDataParticles = flagMCData;
67 void SetRangeN(Int_t nMin, Int_t nMax, Double_t deltaEta) {
73 Double_t GetDeltaEta() const { return fDeltaEta; }
74 Int_t GetNMin() const { return fNMin; }
75 Int_t GetNMax() const { return fNMax; }
77 TString GetOutputListName() const;
80 // for now up to second moments:
83 // <n_1, n_2>(phi_1,eta_1;phi_2,eta_2)
84 void CalculateMoments(TString, TObjArray*, TObjArray*, Double_t, Double_t);
85 void ComputeNXForThisEvent(TObjArray*, const char*, Double_t, Double_t);
86 THnSparse* ComputeNForThisEvent(TObjArray*, const char*, Double_t) const;
87 void FillNEtaHist(TString, THnSparse*, Double_t);
89 TObjArray* GetAcceptedTracks(AliAODEvent*, TClonesArray*, Double_t);
90 TObjArray* GetAcceptedTracks(TClonesArray*, Double_t);
92 // filling histograms by name
93 void Fill(const char*, Double_t); // TH1 weight=1
94 void Fill(const char*, Double_t, Double_t ); // TH2 weight=1
95 void Fill(const char*, Double_t, Double_t, Double_t); // TH3 weight=1
96 void Fill(const char*, const Double_t*, Double_t weight=1); // THnSparse
98 void SetupForMixing();
100 THnSparse* MakeHistSparsePhiEta(const char* name) const;
101 AliTHn* MakeHistPhiEta(const char* name) const;
102 AliTHn* MakeHistPhiEtaPhiEta(const char* name) const;
105 TList* fOutputList; //! Output list
106 TAxis* fVertexZ; //! vertex z bins
107 Bool_t fRunMixing; //
108 AliEventPoolManager* fPoolMgr; //! event pool manager
109 Int_t fMixingTracks; //
110 Int_t fTrackFilter; //
111 Double_t fCentMin, fCentMax; // centrality range
112 Double_t fPtMin, fPtMax; // P_{T} range
113 Double_t fPhiMin, fPhiMax; // #phi range
114 Double_t fMaxAbsVertexZ; // max abs(zvertex)
115 Int_t fSelectPrimaryMCParticles; // 0: no, 1: yes, -1: only non-primary particles
116 Int_t fSelectPrimaryMCDataParticles; // 0: no, 1: yes, -1: only non-primary particles
121 Int_t fnBinsCent, fnBinsPt, fnBinsPhi, fnBinsEta;
122 Double_t fxMinCent, fxMinPt, fxMinPhi, fxMinEta;
123 Double_t fxMaxCent, fxMaxPt, fxMaxPhi, fxMaxEta;
125 AliAnalysisTaskLongRangeCorrelations(const AliAnalysisTaskLongRangeCorrelations&); // not implemented
126 AliAnalysisTaskLongRangeCorrelations& operator=(const AliAnalysisTaskLongRangeCorrelations&); // not implemented
128 ClassDef(AliAnalysisTaskLongRangeCorrelations, 1);
131 class LRCParticle : public TObject {
133 LRCParticle(Double_t eta=0, Double_t phi=0)
134 : fEta(eta), fPhi(phi) {}
135 virtual ~LRCParticle() {}
137 Double_t Eta() const { return fEta; }
138 Double_t Phi() const { return fPhi; }
142 LRCParticle(const LRCParticle&);
143 LRCParticle& operator=(const LRCParticle&);
147 ClassDef(LRCParticle, 1);
149 #endif // _AliAnalysisTaskLongRangeCorrelations_H_