]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGCF/Correlations/DPhi/AliAnalysisTaskLongRangeCorrelations.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGCF / Correlations / DPhi / AliAnalysisTaskLongRangeCorrelations.h
CommitLineData
43d6f3d4 1// -*- C++ -*-
e474b5d3 2// $Id: AliAnalysisTaskLongRangeCorrelations.h 405 2014-03-21 11:49:16Z cmayer $
43d6f3d4 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
24class TAxis;
25class TClonesArray;
26class TList;
27class TObjArray;
28
29class AliAODEvent;
30class AliAODHeader;
31class AliEventPoolManager;
32class AliTHn;
33
34#include <TObject.h>
35#include "AliAnalysisTaskSE.h"
36
37class AliAnalysisTaskLongRangeCorrelations : public AliAnalysisTaskSE {
38public:
39 AliAnalysisTaskLongRangeCorrelations(const char *name="AliAnalysisTaskLongRangeCorrelations");
40 virtual ~AliAnalysisTaskLongRangeCorrelations();
41
42 /* virtual void NotifyRun(); */
43 virtual void UserCreateOutputObjects();
44 virtual void UserExec(Option_t *);
45 virtual void Terminate(Option_t *);
46
47 void SetRunMixing(Bool_t runMixing) { fRunMixing = runMixing; }
48 void SetMixingTracks(Int_t mixingTracks) { fMixingTracks = mixingTracks; }
49 void SetTrackFilter(Int_t trackFilter) { fTrackFilter = trackFilter; }
50
51 void SetCentralityRange(Double_t centMin, Double_t centMax) {
52 fCentMin = centMin; fCentMax = centMax;
53 }
54 void SetPtRange(Double_t ptMin, Double_t ptMax) {
55 fPtMin = ptMin; fPtMax = ptMax;
56 }
57 void SetPhiRange(Double_t phiMin, Double_t phiMax) {
58 fPhiMin = phiMin; fPhiMax = phiMax;
59 }
60 void SetMaxAbsVertexZ(Double_t maxAbsVertexZ) { fMaxAbsVertexZ = maxAbsVertexZ; }
61
62 void SetSelectPrimaryMCParticles(Int_t flagMC, Int_t flagMCData) {
63 fSelectPrimaryMCParticles = flagMC;
64 fSelectPrimaryMCDataParticles = flagMCData;
65 }
66
a742e0d7 67 void SetRangeN(Int_t nMin, Int_t nMax, Double_t deltaEta) {
43d6f3d4 68 fNMin = nMin;
69 fNMax = nMax;
a742e0d7 70 fDeltaEta = deltaEta;
43d6f3d4 71 }
72
e474b5d3 73 Double_t GetDeltaEta() const { return fDeltaEta; }
74 Int_t GetNMin() const { return fNMin; }
75 Int_t GetNMax() const { return fNMax; }
76
43d6f3d4 77 TString GetOutputListName() const;
78
79protected:
80 // for now up to second moments:
81 // <n_1>(phi_1,eta_1)
82 // <n_2>(phi_2,eta_2)
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);
88
89 TObjArray* GetAcceptedTracks(AliAODEvent*, TClonesArray*, Double_t);
90 TObjArray* GetAcceptedTracks(TClonesArray*, Double_t);
91
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
97
98 void SetupForMixing();
99
100 THnSparse* MakeHistSparsePhiEta(const char* name) const;
101 AliTHn* MakeHistPhiEta(const char* name) const;
102 AliTHn* MakeHistPhiEtaPhiEta(const char* name) const;
103
104private:
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
117 Int_t fNMin;
118 Int_t fNMax;
a742e0d7 119 Double_t fDeltaEta;
43d6f3d4 120 // histogram data
121 Int_t fnBinsCent, fnBinsPt, fnBinsPhi, fnBinsEta;
122 Double_t fxMinCent, fxMinPt, fxMinPhi, fxMinEta;
123 Double_t fxMaxCent, fxMaxPt, fxMaxPhi, fxMaxEta;
124
125 AliAnalysisTaskLongRangeCorrelations(const AliAnalysisTaskLongRangeCorrelations&); // not implemented
126 AliAnalysisTaskLongRangeCorrelations& operator=(const AliAnalysisTaskLongRangeCorrelations&); // not implemented
127
128 ClassDef(AliAnalysisTaskLongRangeCorrelations, 1);
129} ;
130
131class LRCParticle : public TObject {
132public:
133 LRCParticle(Double_t eta=0, Double_t phi=0)
134 : fEta(eta), fPhi(phi) {}
135 virtual ~LRCParticle() {}
136
137 Double_t Eta() const { return fEta; }
138 Double_t Phi() const { return fPhi; }
139
140protected:
141private:
142 LRCParticle(const LRCParticle&);
143 LRCParticle& operator=(const LRCParticle&);
144
145 Double_t fEta;
146 Double_t fPhi;
147 ClassDef(LRCParticle, 1);
148} ;
149#endif // _AliAnalysisTaskLongRangeCorrelations_H_
150