]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGCF/Correlations/DPhi/AliAnalysisTaskLongRangeCorrelations.h
Update on LRC (Christoph Mayer <Christoph.Mayer@cern.ch>)
[u/mrichter/AliRoot.git] / PWGCF / Correlations / DPhi / AliAnalysisTaskLongRangeCorrelations.h
CommitLineData
0127ccf6 1// -*- C++ -*-
f7cfafa3 2// $Id: AliAnalysisTaskLongRangeCorrelations.h 232 2012-11-28 17:27:59Z 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
24class TList;
25class TObjArray;
1f46915b 26class TClonesArray;
0127ccf6 27
28class AliAODEvent;
29class AliAODHeader;
30class AliEventPoolManager;
31
32#include <TObject.h>
33#include "AliAnalysisTaskSE.h"
34
35class AliAnalysisTaskLongRangeCorrelations : public AliAnalysisTaskSE {
36public:
37 AliAnalysisTaskLongRangeCorrelations(const char *name="AliAnalysisTaskLongRangeCorrelations");
38 virtual ~AliAnalysisTaskLongRangeCorrelations();
39
40 /* virtual void NotifyRun(); */
41 virtual void UserCreateOutputObjects();
42 virtual void UserExec(Option_t *);
43 virtual void Terminate(Option_t *);
44
45 void SetRunMixing(Bool_t runMixing) { fRunMixing = runMixing; }
46 void SetMixingTracks(Int_t mixingTracks) { fMixingTracks = mixingTracks; }
47 void SetTrackFilter(Int_t trackFilter) { fTrackFilter = trackFilter; }
48
49 void SetCentralityRange(Double_t centMin, Double_t centMax) {
50 fCentMin = centMin; fCentMax = centMax;
51 }
52 void SetPtRange(Double_t ptMin, Double_t ptMax) {
53 fPtMin = ptMin; fPtMax = ptMax;
54 }
55 void SetPhiRange(Double_t phiMin, Double_t phiMax) {
56 fPhiMin = phiMin; fPhiMax = phiMax;
57 }
2f3fa1ff 58 void SetMaxAbsVertexZ(Double_t maxAbsVertexZ) { fMaxAbsVertexZ = maxAbsVertexZ; }
0127ccf6 59
60 TString GetOutputListName() const;
61
62protected:
63 // for now up to second moments:
64 // <n_1>(phi_1,eta_1)
65 // <n_2>(phi_2,eta_2)
66 // <n_1, n_2>(phi_1,eta_1;phi_2,eta_2)
f7cfafa3 67 void CalculateMoments(TString, TObjArray*, TObjArray*, Double_t);
68 void ComputeNXForThisEvent(TObjArray*, const char*, Double_t);
0127ccf6 69 THnSparse* ComputeNForThisEvent(TObjArray*, const char*) const;
f7cfafa3 70 void FillNEtaHist(TString, THnSparse*, Double_t);
0127ccf6 71
1f46915b 72 TObjArray* GetAcceptedTracks(AliAODEvent*, Double_t);
73 TObjArray* GetAcceptedTracks(TClonesArray*, Double_t);
0127ccf6 74
75 // filling histograms by name
1f46915b 76 void Fill(const char*, Double_t); // TH1 weight=1
77 void Fill(const char*, Double_t, Double_t ); // TH2 weight=1
78 void Fill(const char*, Double_t, Double_t, Double_t); // TH3 weight=1
79 void Fill(const char*, const Double_t*, Double_t weight=1); // THnSparse
0127ccf6 80
81 void SetupForMixing();
82
83 THnSparse* MakeHistSparsePhiEta(const char* name) const;
84 THnSparse* MakeHistSparsePhiEtaPhiEta(const char* name) const;
85
86private:
87 TList* fOutputList; //! Output list
88 Bool_t fRunMixing; //
89 AliEventPoolManager* fPoolMgr; //! event pool manager
90 Int_t fMixingTracks; //
91 Int_t fTrackFilter; //
92 Double_t fCentMin, fCentMax; // centrality range
93 Double_t fPtMin, fPtMax; // P_{T} range
94 Double_t fPhiMin, fPhiMax; // #phi range
2f3fa1ff 95 Double_t fMaxAbsVertexZ; // max abs(zvertex)
0127ccf6 96 // histogram data
97 Int_t fnBinsCent, fnBinsPt, fnBinsPhi, fnBinsEta;
98 Double_t fxMinCent, fxMinPt, fxMinPhi, fxMinEta;
99 Double_t fxMaxCent, fxMaxPt, fxMaxPhi, fxMaxEta;
100
101 AliAnalysisTaskLongRangeCorrelations(const AliAnalysisTaskLongRangeCorrelations&); // not implemented
102 AliAnalysisTaskLongRangeCorrelations& operator=(const AliAnalysisTaskLongRangeCorrelations&); // not implemented
103
104 ClassDef(AliAnalysisTaskLongRangeCorrelations, 1);
105} ;
106
107class LRCParticle : public TObject {
108public:
109 LRCParticle(Double_t eta=0, Double_t phi=0)
110 : fEta(eta), fPhi(phi) {}
111 virtual ~LRCParticle() {}
112
113 Double_t Eta() const { return fEta; }
114 Double_t Phi() const { return fPhi; }
115
116protected:
117private:
118 LRCParticle(const LRCParticle&);
119 LRCParticle& operator=(const LRCParticle&);
120
121 Double_t fEta;
122 Double_t fPhi;
123 ClassDef(LRCParticle, 1);
124} ;
125#endif // _AliAnalysisTaskLongRangeCorrelations_H_
126