]>
Commit | Line | Data |
---|---|---|
6788af99 | 1 | #ifndef ALIANALYSYSTASKDIHADRONPID_H |
2 | #define ALIANALYSYSTASKDIHADRONPID_H | |
97724bd1 | 3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
4 | * See cxx source for full Copyright notice */ | |
5 | /* $Id$ */ | |
6788af99 | 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 | ||
f054df96 | 22 | private: |
23 | AliAnalysisTaskDiHadronPID(const AliAnalysisTaskDiHadronPID&); | |
24 | AliAnalysisTaskDiHadronPID& operator=(const AliAnalysisTaskDiHadronPID&); | |
25 | ||
26 | public: | |
6788af99 | 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. | |
6788af99 | 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;} | |
50dfda71 | 46 | void SetMixEvents(Bool_t mixevents = kTRUE) {fMixEvents = mixevents;} |
47 | void SetMixTriggers(Bool_t mixtriggers = kTRUE) {fMixTriggers = mixtriggers;} | |
6788af99 | 48 | |
07d62e30 | 49 | void SetCalculateMismatch(Bool_t calcmismatch) {fCalculateMismatch = calcmismatch;} |
5c01a71f | 50 | void SetMakeTOFCorrelations(Bool_t makeTOF) {fMakeTOFcorrelations = makeTOF;} |
0770be27 | 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;} | |
a5422983 | 55 | void SetExtendPtAxis(Bool_t extendptaxis) {fExtendPtAxis = extendptaxis;} |
5c01a71f | 56 | |
bb2a7c0b | 57 | // Overrides methods from AliAnalyisTaskSE. |
c905f765 | 58 | void SelectCollisionCandidates(UInt_t offlineTriggerMask = AliVEvent::kMB); |
bb2a7c0b | 59 | void SetDebugLevel(Int_t level); |
c905f765 | 60 | |
6788af99 | 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;} | |
50dfda71 | 67 | Bool_t GetMixEvents() const {return fMixEvents;} |
68 | Bool_t GetMixTriggers() const {return fMixTriggers;} | |
6788af99 | 69 | |
07d62e30 | 70 | Bool_t GetCalculateMismatch() const {return fCalculateMismatch;} |
5c01a71f | 71 | Bool_t GetMakeTOFCorrelations() const {return fMakeTOFcorrelations;} |
0770be27 | 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;} | |
a5422983 | 76 | Bool_t GetExtendPtAxis() const {return fExtendPtAxis;} |
5c01a71f | 77 | |
6788af99 | 78 | private: |
79 | //void FillGlobalTracksArray(); | |
80 | Bool_t LoadExtMismatchHistos(); | |
81 | Double_t GenerateRandomHit(Double_t eta); | |
50dfda71 | 82 | void PrintPoolManagerContents(); |
6788af99 | 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. | |
07d62e30 | 111 | TH1F* fPtSpectrumTOFbins; //! Pt Spectrum. |
112 | TH3F* fCorrelationsTOFbins; //! Correlations Histogram. | |
113 | TH3F* fMixedEventsTOFbins; //! Mixed Events Histogram. | |
6788af99 | 114 | |
07d62e30 | 115 | TH1F* fPtSpectrumTOFTPCbins; //! Pt Spectrum. |
116 | TH3F* fCorrelationsTOFTPCbins; //! Correlations Histogram. | |
a5422983 | 117 | TH3F* fMixedEventsTOFTPCbins; //! Mixed Events Histogram. |
118 | TObjArray* fMixedEventsTOFTPCbinsPID; //! Mixed Events Histograms, with PID. | |
07d62e30 | 119 | |
5c01a71f | 120 | TObjArray* fTOFhistos; //! Array holding all correlation functions with TOF information. |
07d62e30 | 121 | TObjArray* fTOFmismatch; //! Array holding mismatches, using fTOFPtAxis. |
5c01a71f | 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. | |
07d62e30 | 124 | TObjArray* fTOFTPCmismatch; //! Array holding mismatches, using fTOFTPCPtAxis. |
5c01a71f | 125 | TAxis* fTOFTPCPtAxis; //! P_t axis used for the TOF/ TPC correlation histograms. |
6788af99 | 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; // | |
50dfda71 | 133 | Bool_t fMixEvents; // NOT YET IMPLEMENTED. |
134 | Bool_t fMixTriggers; // If true, triggers are mixed, if not true, associateds are mixed. | |
07d62e30 | 135 | Bool_t fCalculateMismatch; // |
6788af99 | 136 | |
137 | // TOF mismatch stuff. | |
138 | TH1F* fT0Fill; // | |
139 | TH2F* fLvsEta; // | |
140 | TObjArray* fLvsEtaProjections; // | |
141 | ||
142 | // Flags. | |
5c01a71f | 143 | Bool_t fMakeTOFcorrelations; // |
0770be27 | 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. | |
a5422983 | 148 | Bool_t fExtendPtAxis; // Extends pT |
6788af99 | 149 | |
07d62e30 | 150 | ClassDef(AliAnalysisTaskDiHadronPID, 3); |
6788af99 | 151 | |
152 | }; | |
153 | ||
154 | #endif |