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, updated Mar 2012
8 #include "AliAnalysisTaskSE.h"
22 class AliESDtrackCuts;
23 class AliESDMuonTrack;
24 class AliEvtPoolManager;
27 class AliDhcTask : public AliAnalysisTaskSE {
30 AliDhcTask(const char *name);
31 virtual ~AliDhcTask() {}
33 void SetCentBins(TAxis *bins) { fBCent=bins; }
34 void SetCentMethod(const char *name) { fCentMethod = name; }
35 void SetCentMixBins(TAxis *bins) { fMixBCent=bins; }
36 void SetDEtaDPhiBins(Int_t nbe, Int_t nbp) { fNBdeta=nbe; fNBdphi=nbp; }
37 void SetDoWeights(Bool_t b) { fDoWeights = b; }
38 void SetFillMuons(Bool_t b) { fFillMuons = b; }
39 void SetEtaMax(Double_t eta) { fEtaMax = eta; }
40 void SetPoolSize(Int_t p) { fPoolSize = p; }
41 void SetPtABins(TAxis *bins) { fBPtA=bins; }
42 void SetPtRange(Double_t min, Double_t max) { fPtMin=min; fPtMax=max; }
43 void SetPtTBins(TAxis *bins) { fBPtT=bins; }
44 void SetTrackDepth(Int_t t) { fTrackDepth = t; }
45 void SetTracksName(const char *n) { fTracksName = n; }
46 void SetVerbosity(Int_t v) { fVerbosity = v; }
47 void SetZVtxBins(TAxis *bins) { fBZvtx=bins; }
48 void SetZVtxMixBins(TAxis *bins) { fMixBZvtx=bins; }
49 void SetZvtx(Double_t zvtx) { fZVtxMax = zvtx; }
50 void SetHEffT(THnF *h) { fHEffT=h; }
51 void SetHEffA(THnF *h) { fHEffA=h; }
52 void SetAnaMode(Int_t iAna);
53 enum eAnaMode {kHH, kMuH, kHMu, kMuMu, kPSide, kASide};
56 enum ePairingScheme {kSameEvt, kDiffEvt};
57 enum eDataType {kESD, kAOD};
60 void InitEventMixer();
61 void GetESDTracks(MiniEvent*);
62 void GetAODTracks(MiniEvent*);
63 Bool_t VertexOk(TObject* obj) const;
64 Bool_t IsGoodMUONtrack(AliESDMuonTrack &track);
65 Double_t DeltaPhi(Double_t phia, Double_t phib,
66 Double_t rangeMin = -TMath::Pi()/2,
67 Double_t rangeMax = 3*TMath::Pi()/2) const;
68 Int_t Correlate(const MiniEvent &arr1, const MiniEvent &arr2, Int_t pairing = kSameEvt);
69 void UserCreateOutputObjects();
70 void UserExec(Option_t *option);
71 void Terminate(Option_t *);
74 Int_t fVerbosity; // 0 = silence
75 Double_t fEtaMax; // Max |eta| cut for standard ESD or AOD analysis
76 Double_t fZVtxMax; // Max |z| cut (cm)
77 Double_t fPtMin; // Min pt cut
78 Double_t fPtMax; // Max pt cut
79 Int_t fTrackDepth; // #tracks to fill pool
80 Int_t fPoolSize; // Maximum number of events
81 TString fTracksName; // name of track collection
82 Bool_t fDoWeights; // if true weight with 1/N per event
83 Bool_t fFillMuons; // fill the muon tracks into the mini event
84 Double_t fEtaTLo; // Min eta for triggers
85 Double_t fEtaTHi; // Max eta for triggers
86 Double_t fEtaALo; // Min eta for associated
87 Double_t fEtaAHi; // Max eta for associated
88 AliESDEvent *fESD; //! ESD object
89 AliAODEvent *fAOD; //! AOD object
90 TList *fOutputList; //! Output list
91 TH2 *fHEvt; //! Cent vs vtx.
92 TH2 *fHTrk; //! Phi vs Eta
93 TH1 *fHPtAss; //! Pt ass
94 TH1 *fHPtTrg; //! Pt trg
95 TH1 *fHPtTrgEvt; //! Pt trg per event for weighting
96 TH3 *fHPtTrgNorm1S; //! Pt trg same events in cent. and zvtx bins, method 1
97 TH3 *fHPtTrgNorm1M; //! Pt trg mixed events in cent. and zvtx bins, method 1
98 TH3 *fHPtTrgNorm2S; //! Pt trg same events in cent. and zvtx bins, method 2
99 TH3 *fHPtTrgNorm2M; //! Pt trg mixed events in cent. and zvtx bins, method 2
100 TH1 *fHCent; //! Centrality
101 TH1 *fHZvtx; //! Zvertex
102 Int_t fNbins; //! Number of histogram bins
103 TH2 **fHSs; //! Same-evt correlations
104 TH2 **fHMs; //! Diff-evt correlations
105 TH1 **fHPts; //! Pt distributions
106 TFormula *fIndex; //! Index for histograms
107 Double_t fCentrality; //! V0M for now
108 Double_t fZVertex; //! Of current event
109 AliESDtrackCuts *fEsdTPCOnly; //! Track cuts
110 AliEvtPoolManager *fPoolMgr; //! Event mixer
111 TString fCentMethod; // centrality selection method
112 Int_t fNBdeta; // no. deta bins
113 Int_t fNBdphi; // no. dphi bins
114 TAxis *fBPtT; // ptt binning
115 TAxis *fBPtA; // pta binning
116 TAxis *fBCent; // centrality binning
117 TAxis *fBZvtx; // zvtx binning
118 TAxis *fMixBCent; // centrality binning for mixing
119 TAxis *fMixBZvtx; // zvtx binning for mixing
120 THnF *fHEffT; // efficiency for trigger particles
121 THnF *fHEffA; // efficiency for associate particles
123 AliDhcTask(const AliDhcTask&); // not implemented
124 AliDhcTask &operator=(const AliDhcTask&); // not implemented
126 ClassDef(AliDhcTask, 3);