]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/CorrelationsDPhi/FourierDecomposition/AliDhcTask.h
Moving fourier decomposition analysis code
[u/mrichter/AliRoot.git] / PWG4 / CorrelationsDPhi / FourierDecomposition / AliDhcTask.h
CommitLineData
48a61f36 1// Dihadron correlations task - simple task to read ESD or AOD input,
2// calculate same- and mixed-event correlations, and fill THnSparse
3// output. -A. Adare, Apr 2011
4
5
6#ifndef AliDhcTask_cxx
7#define AliDhcTask_cxx
8
9class TH1;
10class TH2;
11class THnSparse;
12class TObject;
13class TObjArray;
14class AliESDEvent;
15class AliAODEvent;
16class AliESDtrackCuts;
17class KiddiePoolManager;
18
19#include "AliAnalysisTaskSE.h"
20#include "KiddiePoolClasses.h"
21
22class AliDhcTask : public AliAnalysisTaskSE {
23 public:
24 AliDhcTask() :
25 AliAnalysisTaskSE(), fVerbosity(0), fESD(0), fAOD(0), fOutputList(0),
26 fHistPt(0), fHEvt(0), fHTrk(0), fHS(0), fHM(0), fPoolMgr(0), fCentrality(99),
27 fZVertex(99), fZVtxMax(10), fPtMin(0), fPtMax(100), fInputHandler(0),
28 fEsdTrackCutsTPCOnly(0) {}
29 AliDhcTask(const char *name);
30 virtual ~AliDhcTask() {}
31
32 virtual void UserCreateOutputObjects();
33 virtual void UserExec(Option_t *option);
34 virtual void Terminate(Option_t *);
35 void SetVerbosity(const Int_t v) { fVerbosity = v; }
36
37 protected:
38 enum ePairHistAxes {kDeta, kPtAssc, kPtTrig, kCent, kDphi,
39 kZvtx, kChargeComb};
40 enum eEventHistAxes {kZvtxEvt, kCentV0M, kCentCL1};
41 enum eTrackHistAxes {kPhiTrk, kEtaTrk};
42 enum ePairingScheme {kSameEvt, kDiffEvt};
43 enum eDataType {kESD, kAOD};
44
45 void BookHistos();
46 void InitEventMixer();
47 MiniEvent* GetESDTrax() const;
48 MiniEvent* GetAODTrax() const;
49 Bool_t VertexOk(TObject* obj) const;
50 Double_t DeltaPhi(Double_t phia, Double_t phib,
51 Double_t rangeMin = -TMath::Pi()/2,
52 Double_t rangeMax = 3*TMath::Pi()/2) const;
53 Int_t Correlate(const MiniEvent &arr1, const MiniEvent &arr2,
54 Int_t pairing = kSameEvt, Double_t weight = 1.);
55
56 private:
57 Int_t fVerbosity; // 0 = silence
58 AliESDEvent *fESD; //! ESD object
59 AliAODEvent *fAOD; //! AOD object
60 TList *fOutputList; //! Output list
61 TH1F *fHistPt; //! Pt spectrum
62 TH2 *fHEvt; //! Cent, vtx, etc.
63 TH2 *fHTrk; //! Phi, Eta, etc.
64 THnSparse *fHS; //! Same-evt correlations
65 THnSparse *fHM; //! Diff-evt correlations
66 KiddiePoolManager* fPoolMgr; //! Event mixer
67 Double_t fCentrality; //! V0M for now
68 Double_t fZVertex; //! Of current event
69 Double_t fZVtxMax; //! Max |z| cut (cm)
70 Double_t fPtMin; //! Min pt cut
71 Double_t fPtMax; //! Max pt cut
72 AliInputEventHandler* fInputHandler;
73 AliESDtrackCuts* fEsdTrackCutsTPCOnly;
74
75 AliDhcTask(const AliDhcTask&); // not implemented
76 AliDhcTask &operator=(const AliDhcTask&); // not implemented
77
78 ClassDef(AliDhcTask, 1);
79};
80
81#endif