]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/Correlations/DPhi/FourierDecomposition/AliDhcTask_opt.h
coverity
[u/mrichter/AliRoot.git] / PWGCF / Correlations / DPhi / FourierDecomposition / AliDhcTask_opt.h
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
9 class TFormula;
10 class TH1;
11 class TH2;
12 class TObjArray;
13 class TObject;
14 class TProfile2D;
15 class AliAODEvent;
16 class AliESDEvent;
17 class AliESDtrackCuts;
18 class KiddiePoolManager;
19
20 #include "AliAnalysisTaskSE.h"
21 #include "KiddiePoolClasses.h"
22
23 class AliDhcTask : public AliAnalysisTaskSE {
24  public:
25   AliDhcTask() : 
26     AliAnalysisTaskSE(), fVerbosity(0), fEtaMax(1), fZVtxMax(10), fPtMin(0.25), fPtMax(15),
27     fESD(0), fAOD(0), fOutputList(0), fHistPt(0), fHEvt(0), fHTrk(0), fHPtAss(0), 
28     fHPtTrg(0), fHCent(0), fHZvtx(0), fNbins(0), fHSs(0), fHMs(0), fIndex(0), 
29     fCentrality(99), fZVertex(99), fEsdTrackCutsTPCOnly(0), fPoolMgr(0) {}
30
31   AliDhcTask(const char *name);
32   virtual ~AliDhcTask() {}
33   
34   void         SetVerbosity(Int_t v)                  { fVerbosity = v;         }
35   void         SetPtRange(Double_t min, Double_t max) { fPtMin=min; fPtMax=max; }
36   void         SetEtaMax(Double_t eta)                { fEtaMax = eta;          }
37   void         SetZvtx(Double_t zvtx)                 { fZVtxMax = zvtx;        }
38
39  protected:
40   enum ePairingScheme {kSameEvt, kDiffEvt};
41   enum eDataType      {kESD, kAOD};
42
43   void         BookHistos();
44   void         InitEventMixer();
45   MiniEvent*   GetESDTrax() const;
46   MiniEvent*   GetAODTrax() const;
47   Bool_t       VertexOk(TObject* obj) const;
48   Double_t     DeltaPhi(Double_t phia, Double_t phib, 
49                         Double_t rangeMin = -TMath::Pi()/2, 
50                         Double_t rangeMax = 3*TMath::Pi()/2) const;
51   Int_t        Correlate(const MiniEvent &arr1, const MiniEvent &arr2, 
52                          Int_t pairing = kSameEvt, Double_t weight = 1.);
53   void         UserCreateOutputObjects();
54   void         UserExec(Option_t *option);
55   void         Terminate(Option_t *);
56
57  private:
58   Int_t        fVerbosity;       //  0 = silence
59   Double_t     fEtaMax;          //  Max |eta| cut (cm)
60   Double_t     fZVtxMax;         //  Max |z| cut (cm)
61   Double_t     fPtMin;           //  Min pt cut
62   Double_t     fPtMax;           //  Max pt cut
63   AliESDEvent *fESD;             //! ESD object
64   AliAODEvent *fAOD;             //! AOD object
65   TList       *fOutputList;      //! Output list
66   TH1F        *fHistPt;          //! Pt spectrum
67   TH2         *fHEvt;            //! Cent, vtx, etc.
68   TH2         *fHTrk;            //! Phi, Eta, etc.
69   TH1         *fHPtAss;          //! Pt ass 
70   TH1         *fHPtTrg;          //! Pt trg
71   TH1         *fHCent;           //! Centrality
72   TH1         *fHZvtx;           //! Zvertex
73   Int_t        fNbins;           //! Number of histogram bins
74   TH2        **fHSs;             //! Same-evt correlations
75   TH2        **fHMs;             //! Diff-evt correlations
76   TFormula    *fIndex;           //! Index for histograms
77   TProfile2D **fMeanPtTrg;       //! Mean pt trig 
78   TProfile2D **fMeanPtAss;       //! Mean pt ass
79   TProfile2D **fMean2PtTrg;      //! RMS pt trig 
80   TProfile2D **fMean2PtAss;      //! RMS pt ass
81   Double_t     fCentrality;      //! V0M for now
82   Double_t     fZVertex;         //! Of current event
83   AliESDtrackCuts   *fEsdTrackCutsTPCOnly; //! Track cuts
84   KiddiePoolManager *fPoolMgr;             //! Event mixer
85
86   AliDhcTask(const AliDhcTask&);            // not implemented
87   AliDhcTask &operator=(const AliDhcTask&); // not implemented
88
89   ClassDef(AliDhcTask, 2);
90 };
91
92 #endif