]>
Commit | Line | Data |
---|---|---|
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 | ||
49 | void SetCalculateMismatch(Bool_t calcmismatch) {fCalculateMismatch = calcmismatch;} | |
50 | void SetMakeTOFCorrelations(Bool_t makeTOF) {fMakeTOFcorrelations = makeTOF;} | |
51 | void SetMakeTOFTPCCorrelationsPi(Bool_t makeTOFTPC) {fMakeTOFTPCcorrelationsPi = makeTOFTPC;} | |
52 | void SetMakeTOFTPCCorrelationsKa(Bool_t makeTOFTPC) {fMakeTOFTPCcorrelationsKa = makeTOFTPC;} | |
53 | void SetMakeTOFTPCCorrelationsPr(Bool_t makeTOFTPC) {fMakeTOFTPCcorrelationsPr = makeTOFTPC;} | |
54 | void SetTOFIntervalFactorTOFTPC(Double_t factor = 1.) {fTOFIntervalFactorTOFTPC = factor;} | |
55 | void SetExtendPtAxis(Bool_t extendptaxis) {fExtendPtAxis = extendptaxis;} | |
56 | ||
57 | // Overrides methods from AliAnalyisTaskSE. | |
58 | void SelectCollisionCandidates(UInt_t offlineTriggerMask = AliVEvent::kMB); | |
59 | void SetDebugLevel(Int_t level); | |
60 | ||
61 | // Getters. | |
62 | Int_t GetNDEtaBins() const {return fNDEtaBins;} | |
63 | Int_t GetNDPhiBins() const {return fNDPhiBins;} | |
64 | Int_t GetMinEventsForMixing() const {return fMinNEventsForMixing;} | |
65 | Int_t GetPoolTrackDepth() const {return fPoolTrackDepth;} | |
66 | Int_t GetPoolSize() const {return fPoolSize;} | |
67 | Bool_t GetMixEvents() const {return fMixEvents;} | |
68 | Bool_t GetMixTriggers() const {return fMixTriggers;} | |
69 | ||
70 | Bool_t GetCalculateMismatch() const {return fCalculateMismatch;} | |
71 | Bool_t GetMakeTOFCorrelations() const {return fMakeTOFcorrelations;} | |
72 | Bool_t GetMakeTOFTPCCorrelationsPi() const {return fMakeTOFTPCcorrelationsPi;} | |
73 | Bool_t GetMakeTOFTPCCorrelationsKa() const {return fMakeTOFTPCcorrelationsKa;} | |
74 | Bool_t GetMakeTOFTPCCorrelationsPr() const {return fMakeTOFTPCcorrelationsPr;} | |
75 | Double_t GetTOFIntervalFactorTOFTPC() const {return fTOFIntervalFactorTOFTPC;} | |
76 | Bool_t GetExtendPtAxis() const {return fExtendPtAxis;} | |
77 | ||
78 | private: | |
79 | //void FillGlobalTracksArray(); | |
80 | Bool_t LoadExtMismatchHistos(); | |
81 | Double_t GenerateRandomHit(Double_t eta); | |
82 | void PrintPoolManagerContents(); | |
83 | ||
84 | private: | |
85 | ||
86 | // PID Response Object. | |
87 | AliPIDResponse* fPIDResponse; //! PID Response. | |
88 | ||
89 | // Event Cuts Object. | |
90 | AliAODEventCutsDiHadronPID* fEventCuts; // | |
91 | ||
92 | // Track Cuts Object. | |
93 | AliAODTrackCutsDiHadronPID* fTrackCutsTrigger; // | |
94 | AliAODTrackCutsDiHadronPID* fTrackCutsAssociated; // | |
95 | ||
96 | // Event Pool Manager. | |
97 | AliEventPoolManager* fPoolMgr; //! Event pool manager. | |
98 | ||
99 | // Track Arrays. | |
100 | TObjArray* fTriggerTracks; //! | |
101 | TObjArray* fAssociatedTracks; //! | |
102 | // TObjArray* fGlobalTracksArray; | |
103 | ||
104 | // Current Event. | |
105 | AliAODEvent* fCurrentAODEvent; //! Current AOD Event. | |
106 | ||
107 | // Output List. | |
108 | TList* fOutputList; //! Output List. | |
109 | ||
110 | // Histograms. | |
111 | TH1F* fPtSpectrumTOFbins; //! Pt Spectrum. | |
112 | TH3F* fCorrelationsTOFbins; //! Correlations Histogram. | |
113 | TH3F* fMixedEventsTOFbins; //! Mixed Events Histogram. | |
114 | ||
115 | TH1F* fPtSpectrumTOFTPCbins; //! Pt Spectrum. | |
116 | TH3F* fCorrelationsTOFTPCbins; //! Correlations Histogram. | |
117 | TH3F* fMixedEventsTOFTPCbins; //! Mixed Events Histogram. | |
118 | TObjArray* fMixedEventsTOFTPCbinsPID; //! Mixed Events Histograms, with PID. | |
119 | ||
120 | TObjArray* fTOFhistos; //! Array holding all correlation functions with TOF information. | |
121 | TObjArray* fTOFmismatch; //! Array holding mismatches, using fTOFPtAxis. | |
122 | TAxis* fTOFPtAxis; //! P_t axis used for the TOF correlation histograms. | |
123 | TObjArray* fTOFTPChistos; //! Array holding all correlation functions with TOF and TPC information. | |
124 | TObjArray* fTOFTPCmismatch; //! Array holding mismatches, using fTOFTPCPtAxis. | |
125 | TAxis* fTOFTPCPtAxis; //! P_t axis used for the TOF/ TPC correlation histograms. | |
126 | ||
127 | // Settings. | |
128 | Int_t fNDEtaBins; // | |
129 | Int_t fNDPhiBins; // | |
130 | Int_t fMinNEventsForMixing; // Pool needs at least this many events for mixing. | |
131 | Int_t fPoolTrackDepth; // For the pool. | |
132 | Int_t fPoolSize; // | |
133 | Bool_t fMixEvents; // NOT YET IMPLEMENTED. | |
134 | Bool_t fMixTriggers; // If true, triggers are mixed, if not true, associateds are mixed. | |
135 | Bool_t fCalculateMismatch; // | |
136 | ||
137 | // TOF mismatch stuff. | |
138 | TH1F* fT0Fill; // | |
139 | TH2F* fLvsEta; // | |
140 | TObjArray* fLvsEtaProjections; // | |
141 | ||
142 | // Flags. | |
143 | Bool_t fMakeTOFcorrelations; // | |
144 | Bool_t fMakeTOFTPCcorrelationsPi; // | |
145 | Bool_t fMakeTOFTPCcorrelationsKa; // | |
146 | Bool_t fMakeTOFTPCcorrelationsPr; // | |
147 | Double_t fTOFIntervalFactorTOFTPC; // Makes the TOF interval longer while keeping the resolution constant. | |
148 | Bool_t fExtendPtAxis; // Extends pT | |
149 | ||
150 | ClassDef(AliAnalysisTaskDiHadronPID, 3); | |
151 | ||
152 | }; | |
153 | ||
154 | #endif |