3 #ifndef ALIANALYSISTASKNETPARTICLE_H
4 #define ALIANALYSISTASKNETPARTICLE_H
6 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
7 * See cxx source for full Copyright notice */
9 // Task for NetParticle Distributions
10 // Authors: Jochen Thaeder <jochen@thaeder.de>
12 #include "AliAnalysisTaskSE.h"
14 #include "THnSparse.h"
16 #include "AliAnalysisNetParticleHelper.h"
17 #include "AliAnalysisNetParticleEffCont.h"
18 #include "AliAnalysisNetParticleDCA.h"
19 #include "AliAnalysisNetParticleDistribution.h"
22 class AliESDInputHandler;
24 class AliAODInputHandler;
30 class AliAnalysisTaskNetParticle : public AliAnalysisTaskSE {
35 * ---------------------------------------------------------------------------------
36 * Constructor / Destructor
37 * ---------------------------------------------------------------------------------
40 AliAnalysisTaskNetParticle(const char *name = "AliAnalysisTaskNetParticle");
41 virtual ~AliAnalysisTaskNetParticle();
44 * ---------------------------------------------------------------------------------
46 * ---------------------------------------------------------------------------------
49 virtual void UserCreateOutputObjects();
50 virtual void UserExec(Option_t *option);
51 virtual void Terminate(Option_t *);
54 * ---------------------------------------------------------------------------------
56 * ---------------------------------------------------------------------------------
59 /** Initialize Task */
63 * ---------------------------------------------------------------------------------
65 * ---------------------------------------------------------------------------------
68 void SetIsMC() {fIsMC = kTRUE;}
69 void SetIsAOD(Bool_t b) {fIsAOD = b;}
71 void SetESDTrackCutMode(Int_t i) {fESDTrackCutMode = i;}
72 void SetModeEffCreation(Int_t i) {fModeEffCreation = i;}
73 void SetModeDCACreation(Int_t i) {fModeDCACreation = i;}
74 void SetModeDistCreation(Int_t i) {fModeDistCreation = i;}
75 void SetModeQACreation(Int_t i) {fModeQACreation = i;}
77 void SetEtaMax(Float_t f) {fEtaMax = f;}
78 void SetPtRange(Float_t f1, Float_t f2) {fPtRange[0] = f1; fPtRange[1] = f2;}
79 void SetPtRangeEff(Float_t f1, Float_t f2) {fPtRangeEff[0] = f1; fPtRangeEff[1] = f2;}
81 void SetTrackFilterBit(Int_t i) {fAODtrackCutBit = i;}
83 void SetNetParticleHelper(AliAnalysisNetParticleHelper *helper) {
89 ///////////////////////////////////////////////////////////////////////////////////
93 AliAnalysisTaskNetParticle(const AliAnalysisTaskNetParticle&); // not implemented
94 AliAnalysisTaskNetParticle& operator=(const AliAnalysisTaskNetParticle&); // not implemented
97 * ---------------------------------------------------------------------------------
98 * Setup/Reset Methods - private
99 * ---------------------------------------------------------------------------------
105 /** Setup ESD Event */
106 Int_t SetupESDEvent();
108 /** Setup AOD Event */
109 Int_t SetupAODEvent();
111 /** Setup MC Event */
112 Int_t SetupMCEvent();
118 * ---------------------------------------------------------------------------------
119 * Helper Methods - private
120 * ---------------------------------------------------------------------------------
122 /** Create QA histograms */
123 void CreateQAHists();
125 /** Process ESD tracks and fill QA histograms */
129 * ---------------------------------------------------------------------------------
131 * ---------------------------------------------------------------------------------
134 AliAnalysisNetParticleHelper *fHelper; // Helper class
135 AliAnalysisNetParticleEffCont *fEffCont; //! Efficiency and Contamination class
136 AliAnalysisNetParticleDCA *fDCA; //! DCA class
137 AliAnalysisNetParticleDistribution *fDist; //! Distributions class
139 // --- OutLists ----------------------------------------------------------
141 TList *fOutList; //! Ptr to output data container
142 TList *fOutListEff; //! Ptr to output data container - efficiency
143 TList *fOutListCont; //! Ptr to output data container - contamination
144 TList *fOutListDCA; //! Ptr to output data container - DCA
145 TList *fOutListQA; //! Ptr to QA output data container
147 // --- ESD only ----------------------------------------------------------
149 AliESDEvent *fESD; //! Ptr to ESD event
150 AliESDInputHandler *fESDHandler; //! Ptr to ESD Handler
152 AliESDtrackCuts *fESDTrackCutsBase; //! ESD cuts - base settings
153 AliESDtrackCuts *fESDTrackCuts; //! ESD cuts
154 AliESDtrackCuts *fESDTrackCutsBkg; //! ESD cuts for Bkg
155 AliESDtrackCuts *fESDTrackCutsEff; //! ESD cuts for efficiency determination -> larger pt Range
157 // --- AOD only ----------------------------------------------------------
159 AliAODEvent *fAOD; //! Ptr to AOD event
160 AliAODInputHandler *fAODHandler; //! Ptr to AOD Handler
162 // --- Flags -------------------------------------------------------------
164 Bool_t fIsMC; // Is MC event
165 Bool_t fIsAOD; // analysis mode : 0 = ESDs | 1 = AODs
166 Int_t fESDTrackCutMode; // ESD track cut mode : 0 = clean | 1 dirty
167 Int_t fModeEffCreation ; // Correction creation mode : 1 = on | 0 = off
168 Int_t fModeDCACreation; // DCA creation mode : 1 = on | 0 = off
169 Int_t fModeDistCreation; // Dist creation mode : 1 = on | 0 = off
170 Int_t fModeQACreation; // QA creation mode : 1 = on | 0 = off
172 // --- MC only -----------------------------------------------------------
174 AliMCEvent *fMCEvent; //! Ptr to MC event
175 AliStack *fMCStack; //! Ptr to MC stack
177 // -----------------------------------------------------------------------
179 THnSparseF *fHnQA; //! THnSparseF : tracks for QA
181 // -----------------------------------------------------------------------
183 Float_t fEtaMax; // Max, absolut eta
184 Float_t fPtRange[2]; // Array of pt [min,max]
185 Float_t fPtRangeEff[2]; // Array of pt [min,max] for efficiency
187 Int_t fAODtrackCutBit; // Track filter bit for AOD tracks
189 // -----------------------------------------------------------------------
191 ClassDef(AliAnalysisTaskNetParticle, 1);