adding Misha's task
[u/mrichter/AliRoot.git] / PWGCF / Correlations / DPhi / AliAnalysisTaskDiHadronPID.h
1 // ----------------------------------------------------------------------------
2 // Header file.
3 // ----------------------------------------------------------------------------
4 // Last Rev.: 17th of February 2012. (v08)
5 // ----------------------------------------------------------------------------
6
7 #ifndef ALIANALYSISTASKDIHADRONPID_H
8 #define ALIANALYSISTASKDIHADRONPID_H
9
10 #include "AliAnalysisTaskSE.h"
11 #include "THnSparse.h"
12
13 class TH1F;
14 class TH2F;
15 class TH3F;
16 //class THnSparseF;
17 class TList;
18 class TObjArray;
19 class TString;
20
21 class AliAODTrack;
22 class AliAODEvent;
23 class AliAODVertex;
24
25 class AliPIDResponse;
26
27 class AliAnalysisTaskDiHadronPID: public AliAnalysisTaskSE {
28
29 public:
30         // Required functions.
31         AliAnalysisTaskDiHadronPID();
32         AliAnalysisTaskDiHadronPID(const char *name);
33         virtual ~AliAnalysisTaskDiHadronPID();
34         
35         virtual void UserCreateOutputObjects();
36         virtual void UserExec(Option_t *option);
37         virtual void Terminate(Option_t *);
38     
39     // Setters
40     void SetVerbose(Bool_t verbose=kTRUE) {fVerbose=verbose;}
41     void SetCalculateMixedEvents(Bool_t mixedevents=kTRUE) {fCalculateMixedEvents=mixedevents;}
42     
43     // Getters
44     Bool_t GetVerbose() {return fVerbose;}
45     Bool_t GetCalculateMixedEvents() {return fCalculateMixedEvents;}
46     
47 private:
48         // Private Functions.   
49         AliAnalysisTaskDiHadronPID(const AliAnalysisTaskDiHadronPID&); // NOT IMPLEMENTED.
50         AliAnalysisTaskDiHadronPID& operator=(const AliAnalysisTaskDiHadronPID&); // NOT IMPLEMENTED.
51         
52         Bool_t SelectTrack(AliAODTrack *track, Int_t cuts=0);
53         Bool_t SelectEvent(AliAODVertex *vertex);
54         
55         void FillPIDPartnersArray();
56         AliAODTrack* GetTrackPartner(AliAODTrack* track);
57
58         Double_t PhiRange(Double_t DPhi);
59         
60 private:
61         // PID object.
62         AliPIDResponse          *fPIDResponse;              //! PID Response Handler.
63         
64         // Event and Track related objects.
65         AliAODEvent                     *fAODEvent;                 //! The AOD Event.
66         AliAODHeader            *fAODHeader;                //! The AOD Header.
67         AliAODVertex            *fAODVertex;                //! The AOD Vertex.
68         
69         AliAODTrack                     *fAODTrack;                 //! Current AOD Track.
70
71         TObjArray                       *fPIDPartners;              //! Partner Tracks.
72         
73         // HISTOGRAMS.
74
75         // Event Sample Plots.
76         TH1F                        *fCentrality;               //! Centrality Histogram.
77         TH1F                        *fVertexZ;                  //! Vertex Z position.
78
79     // Track cuts counts.
80     TH1F                *fTrackCuts;                //! Different Track cuts.
81     
82         // Unidentified Spectra.
83         TH1F                        *fPtSpectrum;               //! Unidentified Pt-spectrum (after standard track cuts).
84     TH3F                *fAssociatedDistribution;   //! Associated distribution. 
85
86         // QA plots PID.
87         TH2F                            *fTPCnSigmaProton;          //! TPC nSigma plot for Protons.
88         TH2F                            *fTOFnSigmaProton;          //! TOF nSigma plot for Protons.
89         TH2F                            *fTPCnSigmaPion;            //! TPC nSigma plot for Pions.
90         TH2F                            *fTOFnSigmaPion;            //! TOF nSigma plot for Pions.      
91         TH2F                            *fTPCnSigmaKaon;            //! TPC nSigma plot for Kaons.
92         TH2F                            *fTOFnSigmaKaon;            //! TOF nSigma plot for Kaons.
93         
94     // PID signals as function of pT and Eta
95         TH3F                            *fTPCSignal;                            //! TPC signal (pt,eta).
96         TH3F                            *fTOFSignal;                            //! TOF signal (pT,eta).
97     
98         // Unidentified Di-Hadron Correlations & Mixed Events.
99         TH3F                            *fDiHadron;                 //! Di-Hadron correlations. 
100         TH3F                            *fMixedEvents;              //! Mixed Events.
101         
102         // Di-Hadron Correlations with TPC and TOF signals.
103     TH3F                *fDiHadronTPC[3][10];       //! Di-Hadron correlations with TPC signal.
104     TH3F                *fDiHadronTOF[3][10];       //! Di-Hadron correlations with TOF signal.
105         THnSparseF                      *fDiHadronTPCTOF[3][10];        //! Di-Hadron correlations with both TPC and TOF signal.
106
107         // List of Histograms.
108         TList                       *fHistoList;                //! List of Histograms.
109         
110         // Other data members.
111         Bool_t                          fVerbose;                   // Generates verbal output if kTRUE.
112         UInt_t                          fMask;                      // PID efficiency graphs will be made for this mask.
113     Bool_t              fCalculateMixedEvents;      // 
114     
115     // Trigger buffer.
116     Double_t            fTrigBuffer[25000][4];      //!
117         Int_t               fTrigBufferIndex;           //!
118     Int_t               fTrigBufferSize;            //!
119     
120     
121         ClassDef(AliAnalysisTaskDiHadronPID,1);
122         
123 };
124
125 #endif
126