]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/Correlations/DPhi/DiHadronPID/AliAnalysisTaskDiHadronPID.h
update dihadron PID (Misha Veldhoen <Misha.Veldhoen@cern.ch>)
[u/mrichter/AliRoot.git] / PWGCF / Correlations / DPhi / DiHadronPID / AliAnalysisTaskDiHadronPID.h
1 #ifndef ALIANALYSYSTASKDIHADRONPID_H
2 #define ALIANALYSYSTASKDIHADRONPID_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * 
4 * See cxx source for full Copyright notice */ 
5 /* $Id$ */
6
7 #include "AliAnalysisTaskSE.h"
8 #include "AliEventPoolManager.h"
9 #include "AliAODTrackCutsDiHadronPID.h"
10 #include "AliAODEventCutsDiHadronPID.h"
11 #include "TObjArray.h"
12 #include "THn.h"
13
14 class AliAnalysisTaskDiHadronPID : public AliAnalysisTaskSE {
15
16 public:
17         // Constructors/Destructors.
18         AliAnalysisTaskDiHadronPID();
19         AliAnalysisTaskDiHadronPID(const char* name);
20         virtual ~AliAnalysisTaskDiHadronPID();
21
22 private:
23         AliAnalysisTaskDiHadronPID(const AliAnalysisTaskDiHadronPID&);
24         AliAnalysisTaskDiHadronPID& operator=(const AliAnalysisTaskDiHadronPID&);
25
26 public:
27         // Methods from AliAnalysisTaskSE.
28         void UserCreateOutputObjects();
29         void LocalInit();
30         void UserExec(Option_t*);
31         void Terminate(Option_t*);
32
33         // Are all cut objects provided to the task?
34         Bool_t ReadyToStart() const {return (fEventCuts && fTrackCutsTrigger && fTrackCutsAssociated);}
35
36         // Setters.
37     void SetEventCuts(AliAODEventCutsDiHadronPID* eventcuts) {fEventCuts = eventcuts;}
38     void SetTrackCutsTrigger(AliAODTrackCutsDiHadronPID* trackcuts) {fTrackCutsTrigger = trackcuts;}
39     void SetTrackCutsAssociated(AliAODTrackCutsDiHadronPID* trackcuts) {fTrackCutsAssociated = trackcuts;} 
40
41     void SetNDEtaBins(Int_t nbins) {fNDEtaBins = nbins;}
42     void SetNDPhiBins(Int_t nbins) {fNDPhiBins = nbins;}
43     void SetMinEventsForMixing(Int_t nevents) {fMinNEventsForMixing = nevents;}
44     void SetPoolTrackDepth(Int_t trackdepth) {fPoolTrackDepth = trackdepth;}
45     void SetPoolSize(Int_t poolsize) {fPoolSize = poolsize;}
46     void SetMixEvents(Bool_t mixevents = kTRUE) {fMixEvents = mixevents;}
47     void SetMixTriggers(Bool_t mixtriggers = kTRUE) {fMixTriggers = mixtriggers;}
48         //void SetDebugLevel(Int_t debuglevel) {fDebug = debuglevel;}
49
50         void SetCalculateMismatch(Bool_t calcmismatch) {fCalculateMismatch = calcmismatch;}
51         void SetMakeTOFCorrelations(Bool_t makeTOF) {fMakeTOFcorrelations = makeTOF;}
52         void SetMakeTOFTPCCorrelations(Bool_t makeTOFTPC) {fMakeTOFTPCcorrelations = makeTOFTPC;}
53
54         // Getters.
55         Int_t GetNDEtaBins() const {return fNDEtaBins;}
56         Int_t GetNDPhiBins() const {return fNDPhiBins;}
57         Int_t GetMinEventsForMixing() const {return fMinNEventsForMixing;}
58         Int_t GetPoolTrackDepth() const {return fPoolTrackDepth;}
59         Int_t GetPoolSize() const {return fPoolSize;}
60         Bool_t GetMixEvents() const {return fMixEvents;}
61         Bool_t GetMixTriggers() const {return fMixTriggers;}
62         //Int_t GetDebugLevel() const {return fDebug;}  
63
64         Bool_t GetCalculateMismatch() const {return fCalculateMismatch;}
65         Bool_t GetMakeTOFCorrelations() const {return fMakeTOFcorrelations;}
66         Bool_t GetMakeTOFTPCCorrelations() const {return fMakeTOFTPCcorrelations;}
67
68 private:
69         //void FillGlobalTracksArray();
70         Bool_t LoadExtMismatchHistos();
71         Double_t GenerateRandomHit(Double_t eta);
72         void PrintPoolManagerContents();
73
74 private:
75
76         // PID Response Object.
77         AliPIDResponse*                                 fPIDResponse;                           //! PID Response.
78
79         // Event Cuts Object.
80         AliAODEventCutsDiHadronPID*             fEventCuts;                                     //
81
82         // Track Cuts Object.
83         AliAODTrackCutsDiHadronPID*             fTrackCutsTrigger;                      //
84         AliAODTrackCutsDiHadronPID*             fTrackCutsAssociated;           //
85
86         // Event Pool Manager.
87         AliEventPoolManager*                    fPoolMgr;                                       //! Event pool manager.
88
89         // Track Arrays.
90         TObjArray*                                              fTriggerTracks;                         //! 
91         TObjArray*                                              fAssociatedTracks;                      //!
92         // TObjArray* fGlobalTracksArray; 
93
94         // Current Event.
95         AliAODEvent*                                    fCurrentAODEvent;                       //! Current AOD Event.
96
97         // Output List.
98         TList*                                                  fOutputList;                            //! Output List.
99
100         // Histograms.
101         TH1F*                                                   fPtSpectrumTOFbins;                     //! Pt Spectrum.
102         TH3F*                                                   fCorrelationsTOFbins;           //! Correlations Histogram.
103         TH3F*                                                   fMixedEventsTOFbins;            //! Mixed Events Histogram.     
104         
105         TH1F*                                                   fPtSpectrumTOFTPCbins;          //! Pt Spectrum.
106         TH3F*                                                   fCorrelationsTOFTPCbins;        //! Correlations Histogram.
107         TH3F*                                                   fMixedEventsTOFTPCbins;         //! Mixed Events Histogram.     
108
109         TObjArray*                                              fTOFhistos;                                     //! Array holding all correlation functions with TOF information.
110         TObjArray*                                              fTOFmismatch;                           //! Array holding mismatches, using fTOFPtAxis.
111         TAxis*                                                  fTOFPtAxis;                                     //! P_t axis used for the TOF correlation histograms.
112         TObjArray*                                              fTOFTPChistos;                          //! Array holding all correlation functions with TOF and TPC information.
113         TObjArray*                                              fTOFTPCmismatch;                        //! Array holding mismatches, using fTOFTPCPtAxis.
114         TAxis*                                                  fTOFTPCPtAxis;                          //! P_t axis used for the TOF/ TPC correlation histograms.
115
116         // Settings.
117         Int_t                                                   fNDEtaBins;                                     //
118         Int_t                                                   fNDPhiBins;                                     //
119         Int_t                                                   fMinNEventsForMixing;           // Pool needs at least this many events for mixing.
120         Int_t                                                   fPoolTrackDepth;                        // For the pool.
121         Int_t                                                   fPoolSize;                                      // 
122         Bool_t                                                  fMixEvents;                                     // NOT YET IMPLEMENTED.
123         Bool_t                                                  fMixTriggers;                           // If true, triggers are mixed, if not true, associateds are mixed.
124         Bool_t                                                  fCalculateMismatch;                     //
125
126         // TOF mismatch stuff.
127         TH1F*                                                   fT0Fill;                                        //
128         TH2F*                                                   fLvsEta;                                        //
129         TObjArray*                                              fLvsEtaProjections;                     //              
130
131         // Flags.
132         Bool_t                                                  fMakeTOFcorrelations;           //
133         Bool_t                                                  fMakeTOFTPCcorrelations;        //
134         //Int_t                                                 fDebug;                                         // Debug flag.
135
136         ClassDef(AliAnalysisTaskDiHadronPID, 3);
137
138 };
139
140 #endif