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 */
7 #include "AliAnalysisTaskSE.h"
8 #include "AliEventPoolManager.h"
9 #include "AliAODTrackCutsDiHadronPID.h"
10 #include "AliAODEventCutsDiHadronPID.h"
11 #include "TObjArray.h"
14 class AliAnalysisTaskDiHadronPID : public AliAnalysisTaskSE {
17 // Constructors/Destructors.
18 AliAnalysisTaskDiHadronPID();
19 AliAnalysisTaskDiHadronPID(const char* name);
20 virtual ~AliAnalysisTaskDiHadronPID();
23 AliAnalysisTaskDiHadronPID(const AliAnalysisTaskDiHadronPID&);
24 AliAnalysisTaskDiHadronPID& operator=(const AliAnalysisTaskDiHadronPID&);
27 // Methods from AliAnalysisTaskSE.
28 void UserCreateOutputObjects();
30 void UserExec(Option_t*);
31 void Terminate(Option_t*);
33 // Are all cut objects provided to the task?
34 Bool_t ReadyToStart() const {return (fEventCuts && fTrackCutsTrigger && fTrackCutsAssociated);}
37 void SetEventCuts(AliAODEventCutsDiHadronPID* eventcuts) {fEventCuts = eventcuts;}
38 void SetTrackCutsTrigger(AliAODTrackCutsDiHadronPID* trackcuts) {fTrackCutsTrigger = trackcuts;}
39 void SetTrackCutsAssociated(AliAODTrackCutsDiHadronPID* trackcuts) {fTrackCutsAssociated = trackcuts;}
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;}
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;}
57 // Overrides methods from AliAnalyisTaskSE.
58 void SelectCollisionCandidates(UInt_t offlineTriggerMask = AliVEvent::kMB);
59 void SetDebugLevel(Int_t level);
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;}
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;}
79 //void FillGlobalTracksArray();
80 Bool_t LoadExtMismatchHistos();
81 Double_t GenerateRandomHit(Double_t eta);
82 void PrintPoolManagerContents();
86 // PID Response Object.
87 AliPIDResponse* fPIDResponse; //! PID Response.
90 AliAODEventCutsDiHadronPID* fEventCuts; //
93 AliAODTrackCutsDiHadronPID* fTrackCutsTrigger; //
94 AliAODTrackCutsDiHadronPID* fTrackCutsAssociated; //
96 // Event Pool Manager.
97 AliEventPoolManager* fPoolMgr; //! Event pool manager.
100 TObjArray* fTriggerTracks; //!
101 TObjArray* fAssociatedTracks; //!
102 // TObjArray* fGlobalTracksArray;
105 AliAODEvent* fCurrentAODEvent; //! Current AOD Event.
108 TList* fOutputList; //! Output List.
111 TH1F* fPtSpectrumTOFbins; //! Pt Spectrum.
112 TH3F* fCorrelationsTOFbins; //! Correlations Histogram.
113 TH3F* fMixedEventsTOFbins; //! Mixed Events Histogram.
115 TH1F* fPtSpectrumTOFTPCbins; //! Pt Spectrum.
116 TH3F* fCorrelationsTOFTPCbins; //! Correlations Histogram.
117 TH3F* fMixedEventsTOFTPCbins; //! Mixed Events Histogram.
118 TObjArray* fMixedEventsTOFTPCbinsPID; //! Mixed Events Histograms, with PID.
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.
130 Int_t fMinNEventsForMixing; // Pool needs at least this many events for mixing.
131 Int_t fPoolTrackDepth; // For the pool.
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; //
137 // TOF mismatch stuff.
140 TObjArray* fLvsEtaProjections; //
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
150 ClassDef(AliAnalysisTaskDiHadronPID, 3);