]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/Correlations/DPhi/DiHadronPID/AliAnalysisTaskDiHadronPID.h
DiHadronPID task update (Misha.Veldhoen@cern.ch)
[u/mrichter/AliRoot.git] / PWGCF / Correlations / DPhi / DiHadronPID / AliAnalysisTaskDiHadronPID.h
1 #ifndef ALIANALYSYSTASKDIHADRONPID_H
2 #define ALIANALYSYSTASKDIHADRONPID_H
3
4 #include "AliAnalysisTaskSE.h"
5 #include "AliEventPoolManager.h"
6 #include "AliAODTrackCutsDiHadronPID.h"
7 #include "AliAODEventCutsDiHadronPID.h"
8 #include "TObjArray.h"
9 #include "THn.h"
10
11 class AliAnalysisTaskDiHadronPID : public AliAnalysisTaskSE {
12
13 public:
14         // Constructors/Destructors.
15         AliAnalysisTaskDiHadronPID();
16         AliAnalysisTaskDiHadronPID(const char* name);
17         virtual ~AliAnalysisTaskDiHadronPID();
18
19         // Methods from AliAnalysisTaskSE.
20         void UserCreateOutputObjects();
21         void LocalInit();
22         void UserExec(Option_t*);
23         void Terminate(Option_t*);
24
25         // Are all cut objects provided to the task?
26         Bool_t ReadyToStart() const {return (fEventCuts && fTrackCutsTrigger && fTrackCutsAssociated);}
27
28         // Setters.
29         void SetDebugLevel(Int_t debuglevel) {fDebug = debuglevel;}
30     void SetEventCuts(AliAODEventCutsDiHadronPID* eventcuts) {fEventCuts = eventcuts;}
31     void SetTrackCutsTrigger(AliAODTrackCutsDiHadronPID* trackcuts) {fTrackCutsTrigger = trackcuts;}
32     void SetTrackCutsAssociated(AliAODTrackCutsDiHadronPID* trackcuts) {fTrackCutsAssociated = trackcuts;} 
33
34     void SetNDEtaBins(Int_t nbins) {fNDEtaBins = nbins;}
35     void SetNDPhiBins(Int_t nbins) {fNDPhiBins = nbins;}
36     void SetMinEventsForMixing(Int_t nevents) {fMinNEventsForMixing = nevents;}
37     void SetPoolTrackDepth(Int_t trackdepth) {fPoolTrackDepth = trackdepth;}
38     void SetPoolSize(Int_t poolsize) {fPoolSize = poolsize;}
39
40         // Getters.
41         Int_t GetNDEtaBins() const {return fNDEtaBins;}
42         Int_t GetNDPhiBins() const {return fNDPhiBins;}
43         Int_t GetMinEventsForMixing() const {return fMinNEventsForMixing;}
44         Int_t GetPoolTrackDepth() const {return fPoolTrackDepth;}
45         Int_t GetPoolSize() const {return fPoolSize;}
46         Int_t GetDebugLevel() const {return fDebug;}    
47
48 private:
49         //void FillGlobalTracksArray();
50         Bool_t LoadExtMismatchHistos();
51         Double_t GenerateRandomHit(Double_t eta);
52
53 private:
54
55         // PID Response Object.
56         AliPIDResponse*                                 fPIDResponse;                           //! PID Response.
57
58         // Event Cuts Object.
59         AliAODEventCutsDiHadronPID*             fEventCuts;                                     //
60
61         // Track Cuts Object.
62         AliAODTrackCutsDiHadronPID*             fTrackCutsTrigger;                      //
63         AliAODTrackCutsDiHadronPID*             fTrackCutsAssociated;           //
64
65         // Event Pool Manager.
66         AliEventPoolManager*                    fPoolMgr;                                       //! Event pool manager.
67
68         // Track Arrays.
69         TObjArray*                                              fTriggerTracks;                         //! 
70         TObjArray*                                              fAssociatedTracks;                      //!
71         // TObjArray* fGlobalTracksArray; 
72
73         // Current Event.
74         AliAODEvent*                                    fCurrentAODEvent;                       //! Current AOD Event.
75
76         // Output List.
77         TList*                                                  fOutputList;                            //! Output List.
78
79         // Histograms.
80         TH1F*                                                   fPtSpectrum;                            //! Pt Spectrum.
81         TH3F*                                                   fCorrelations;                          //! Correlations Histogram.
82         TH3F*                                                   fMixedEvents;                           //! Mixed Events Histogram.     
83         
84         TObjArray*                                              fTOFhistos;                                     //! Array holding all correlation functions.
85         THnF*                                                   fCorrelationsTOF[5][3];         //! Correlations with TOF info.
86         THnF*                                                   fCorrelationsTOFTPC[5][3];      //! Correlations with TPC and TOF info.
87
88         // Settings.
89         Int_t                                                   fNDEtaBins;                                     //
90         Int_t                                                   fNDPhiBins;                                     //
91         Int_t                                                   fMinNEventsForMixing;           // Pool needs at least this many events for mixing.
92         Int_t                                                   fPoolTrackDepth;                        // For the pool.
93         Int_t                                                   fPoolSize;                                      // 
94         Bool_t                                                  fCalculateTOFmismatch;          //
95
96         // TOF mismatch stuff.
97         TH1F*                                                   fT0Fill;                                        //
98         TH2F*                                                   fLvsEta;                                        //
99         TObjArray*                                              fLvsEtaProjections;                     //              
100
101         // Flags.
102         Int_t                                                   fDebug;                                         // Debug flag.
103
104         ClassDef(AliAnalysisTaskDiHadronPID,2);
105
106 };
107
108 #endif