]>
Commit | Line | Data |
---|---|---|
0127ccf6 | 1 | // -*- C++ -*- |
bb5da4b0 | 2 | // $Id: AliAnalysisTaskLongRangeCorrelations.h 233 2012-12-02 14:46:41Z cmayer $ |
0127ccf6 | 3 | #ifndef _AliAnalysisTaskLongRangeCorrelations_H_ |
4 | #define _AliAnalysisTaskLongRangeCorrelations_H_ | |
5 | ||
6 | /* Copyright(c) 2012, ALICE Experiment at CERN, All rights reserved. * | |
7 | * See cxx source for full Copyright notice */ | |
8 | ||
9 | //////////////////////////////////////////////////////////////////////// | |
10 | // | |
11 | // Analysis class for Long-range Correlations | |
12 | // | |
13 | // Look for correlations in eta (and in phi) | |
14 | // | |
15 | // This class needs input AODs. | |
16 | // The output is a list of analysis-specific containers. | |
17 | // | |
18 | // Author: | |
19 | // Christoph Mayer | |
20 | // | |
21 | //////////////////////////////////////////////////////////////////////// | |
22 | ||
23 | ||
bb5da4b0 | 24 | class TAxis; |
25 | class TClonesArray; | |
0127ccf6 | 26 | class TList; |
27 | class TObjArray; | |
28 | ||
29 | class AliAODEvent; | |
30 | class AliAODHeader; | |
31 | class AliEventPoolManager; | |
32 | ||
33 | #include <TObject.h> | |
34 | #include "AliAnalysisTaskSE.h" | |
35 | ||
36 | class AliAnalysisTaskLongRangeCorrelations : public AliAnalysisTaskSE { | |
37 | public: | |
38 | AliAnalysisTaskLongRangeCorrelations(const char *name="AliAnalysisTaskLongRangeCorrelations"); | |
39 | virtual ~AliAnalysisTaskLongRangeCorrelations(); | |
40 | ||
41 | /* virtual void NotifyRun(); */ | |
42 | virtual void UserCreateOutputObjects(); | |
43 | virtual void UserExec(Option_t *); | |
44 | virtual void Terminate(Option_t *); | |
45 | ||
46 | void SetRunMixing(Bool_t runMixing) { fRunMixing = runMixing; } | |
47 | void SetMixingTracks(Int_t mixingTracks) { fMixingTracks = mixingTracks; } | |
48 | void SetTrackFilter(Int_t trackFilter) { fTrackFilter = trackFilter; } | |
49 | ||
50 | void SetCentralityRange(Double_t centMin, Double_t centMax) { | |
51 | fCentMin = centMin; fCentMax = centMax; | |
52 | } | |
53 | void SetPtRange(Double_t ptMin, Double_t ptMax) { | |
54 | fPtMin = ptMin; fPtMax = ptMax; | |
55 | } | |
56 | void SetPhiRange(Double_t phiMin, Double_t phiMax) { | |
57 | fPhiMin = phiMin; fPhiMax = phiMax; | |
58 | } | |
2f3fa1ff | 59 | void SetMaxAbsVertexZ(Double_t maxAbsVertexZ) { fMaxAbsVertexZ = maxAbsVertexZ; } |
0127ccf6 | 60 | |
61 | TString GetOutputListName() const; | |
62 | ||
63 | protected: | |
64 | // for now up to second moments: | |
65 | // <n_1>(phi_1,eta_1) | |
66 | // <n_2>(phi_2,eta_2) | |
67 | // <n_1, n_2>(phi_1,eta_1;phi_2,eta_2) | |
bb5da4b0 | 68 | void CalculateMoments(TString, TObjArray*, TObjArray*, Double_t, Double_t); |
69 | void ComputeNXForThisEvent(TObjArray*, const char*, Double_t, Double_t); | |
70 | THnSparse* ComputeNForThisEvent(TObjArray*, const char*, Double_t) const; | |
f7cfafa3 | 71 | void FillNEtaHist(TString, THnSparse*, Double_t); |
0127ccf6 | 72 | |
1f46915b | 73 | TObjArray* GetAcceptedTracks(AliAODEvent*, Double_t); |
74 | TObjArray* GetAcceptedTracks(TClonesArray*, Double_t); | |
0127ccf6 | 75 | |
76 | // filling histograms by name | |
1f46915b | 77 | void Fill(const char*, Double_t); // TH1 weight=1 |
78 | void Fill(const char*, Double_t, Double_t ); // TH2 weight=1 | |
79 | void Fill(const char*, Double_t, Double_t, Double_t); // TH3 weight=1 | |
80 | void Fill(const char*, const Double_t*, Double_t weight=1); // THnSparse | |
0127ccf6 | 81 | |
82 | void SetupForMixing(); | |
83 | ||
84 | THnSparse* MakeHistSparsePhiEta(const char* name) const; | |
85 | THnSparse* MakeHistSparsePhiEtaPhiEta(const char* name) const; | |
86 | ||
87 | private: | |
88 | TList* fOutputList; //! Output list | |
bb5da4b0 | 89 | TAxis* fVertexZ; //! vertex z bins |
0127ccf6 | 90 | Bool_t fRunMixing; // |
91 | AliEventPoolManager* fPoolMgr; //! event pool manager | |
92 | Int_t fMixingTracks; // | |
93 | Int_t fTrackFilter; // | |
94 | Double_t fCentMin, fCentMax; // centrality range | |
95 | Double_t fPtMin, fPtMax; // P_{T} range | |
96 | Double_t fPhiMin, fPhiMax; // #phi range | |
2f3fa1ff | 97 | Double_t fMaxAbsVertexZ; // max abs(zvertex) |
0127ccf6 | 98 | // histogram data |
99 | Int_t fnBinsCent, fnBinsPt, fnBinsPhi, fnBinsEta; | |
100 | Double_t fxMinCent, fxMinPt, fxMinPhi, fxMinEta; | |
101 | Double_t fxMaxCent, fxMaxPt, fxMaxPhi, fxMaxEta; | |
102 | ||
103 | AliAnalysisTaskLongRangeCorrelations(const AliAnalysisTaskLongRangeCorrelations&); // not implemented | |
104 | AliAnalysisTaskLongRangeCorrelations& operator=(const AliAnalysisTaskLongRangeCorrelations&); // not implemented | |
105 | ||
106 | ClassDef(AliAnalysisTaskLongRangeCorrelations, 1); | |
107 | } ; | |
108 | ||
109 | class LRCParticle : public TObject { | |
110 | public: | |
111 | LRCParticle(Double_t eta=0, Double_t phi=0) | |
112 | : fEta(eta), fPhi(phi) {} | |
113 | virtual ~LRCParticle() {} | |
114 | ||
115 | Double_t Eta() const { return fEta; } | |
116 | Double_t Phi() const { return fPhi; } | |
117 | ||
118 | protected: | |
119 | private: | |
120 | LRCParticle(const LRCParticle&); | |
121 | LRCParticle& operator=(const LRCParticle&); | |
122 | ||
123 | Double_t fEta; | |
124 | Double_t fPhi; | |
125 | ClassDef(LRCParticle, 1); | |
126 | } ; | |
127 | #endif // _AliAnalysisTaskLongRangeCorrelations_H_ | |
128 |