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;}
70 void SetUseQATHnSparse(Bool_t b) {fUseQATHnSparse = b;}
72 void SetESDTrackCutMode(Int_t i) {fESDTrackCutMode = i;}
73 void SetModeEffCreation(Int_t i) {fModeEffCreation = i;}
74 void SetModeDCACreation(Int_t i) {fModeDCACreation = i;}
75 void SetModeDistCreation(Int_t i) {fModeDistCreation = i;}
78 void SetEtaMax(Float_t f) {fEtaMax = f;}
79 void SetPtRange(Float_t f1, Float_t f2) {fPtRange[0] = f1; fPtRange[1] = f2;}
80 void SetPtRangeEff(Float_t f1, Float_t f2) {fPtRangeEff[0] = f1; fPtRangeEff[1] = f2;}
82 void SetTrackFilterBit(Int_t i) {fAODtrackCutBit = i;}
85 * ---------------------------------------------------------------------------------
86 * Setter - Pass-Through
87 * ---------------------------------------------------------------------------------
90 void SetCentralityBinMax(Int_t d) {fHelper->SetCentralityBinMax(d);}
91 void SetVertexZMax(Float_t f) {fHelper->SetVertexZMax(f);}
93 void SetRapidityMax(Float_t f) {fHelper->SetRapidityMax(f);}
94 void SetMinTrackLengthMC(Float_t f) {fHelper->SetMinTrackLengthMC(f);}
95 void SetNSigmaMaxCdd(Float_t f) {fHelper->SetNSigmaMaxCdd(f);}
96 void SetNSigmaMaxCzz(Float_t f) {fHelper->SetNSigmaMaxCzz(f);}
98 void SetParticleSpecies(AliPID::EParticleType pid) {fHelper->SetParticleSpecies(pid);}
99 void SetControlParticleSpecies(Int_t pdgCode, Bool_t isNeutral, const Char_t *name) {
100 fHelper->SetControlParticleSpecies(pdgCode, isNeutral, name);
103 void SetNSigmaMaxTPC(Float_t f) {fHelper->SetNSigmaMaxTPC(f);}
104 void SetNSigmaMaxTOF(Float_t f) {fHelper->SetNSigmaMaxTOF(f);}
105 void SetMinPtForTOFRequired(Float_t f) {fHelper->SetMinPtForTOFRequired(f);}
107 ///////////////////////////////////////////////////////////////////////////////////
111 AliAnalysisTaskNetParticle(const AliAnalysisTaskNetParticle&); // not implemented
112 AliAnalysisTaskNetParticle& operator=(const AliAnalysisTaskNetParticle&); // not implemented
115 * ---------------------------------------------------------------------------------
116 * Setup/Reset Methods - private
117 * ---------------------------------------------------------------------------------
123 /** Setup ESD Event */
124 Int_t SetupESDEvent();
126 /** Setup AOD Event */
127 Int_t SetupAODEvent();
129 /** Setup MC Event */
130 Int_t SetupMCEvent();
136 * ---------------------------------------------------------------------------------
138 * ---------------------------------------------------------------------------------
141 AliAnalysisNetParticleHelper *fHelper; //! Helper class
142 AliAnalysisNetParticleEffCont *fEffCont; //! Efficiency and Contamination class
143 AliAnalysisNetParticleDCA *fDCA; //! DCA class
144 AliAnalysisNetParticleDistribution *fDist; //! Distributions class
146 // --- OutLists ----------------------------------------------------------
148 TList *fOutList; //! Ptr to output data container
149 TList *fOutListEff; //! Ptr to output data container - efficiency
150 TList *fOutListCont; //! Ptr to output data container - contamination
151 TList *fOutListDCA; //! Ptr to output data container - DCA
152 TList *fOutListQA; //! Ptr to QA output data container
154 // --- ESD only ----------------------------------------------------------
156 AliESDEvent *fESD; //! Ptr to ESD event
157 AliESDInputHandler *fESDHandler; //! Ptr to ESD Handler
159 AliESDtrackCuts *fESDTrackCutsBase; //! ESD cuts - base settings
160 AliESDtrackCuts *fESDTrackCuts; //! ESD cuts
161 AliESDtrackCuts *fESDTrackCutsBkg; //! ESD cuts for Bkg
162 AliESDtrackCuts *fESDTrackCutsEff; //! ESD cuts for efficiency determination -> larger pt Range
164 // --- AOD only ----------------------------------------------------------
166 AliAODEvent *fAOD; //! Ptr to AOD event
167 AliAODInputHandler *fAODHandler; //! Ptr to AOD Handler
169 // --- Flags -------------------------------------------------------------
171 Bool_t fIsMC; // Is MC event
172 Bool_t fIsAOD; // analysis mode : 0 = ESDs | 1 = AODs
173 Int_t fESDTrackCutMode; // ESD track cut mode : 0 = clean | 1 dirty
174 Int_t fModeEffCreation ; // Correction creation mode : 1 = on | 0 = off
175 Int_t fModeDCACreation; // DCA creation mode : 1 = on | 0 = off
176 Int_t fModeDistCreation; // Dist creation mode : 1 = on | 0 = off
178 // --- MC only -----------------------------------------------------------
180 AliMCEvent *fMCEvent; //! Ptr to MC event
181 AliStack *fMCStack; //! Ptr to MC stack
183 // -----------------------------------------------------------------------
185 THnSparseF *fHnQA; //! THnSparseF : tracks for QA
186 Float_t fUseQATHnSparse; // Usage of THnSparse for QA
188 // -----------------------------------------------------------------------
190 Float_t fEtaMax; // Max, absolut eta
191 Float_t *fPtRange; //! Array of pt [min,max]
192 Float_t *fPtRangeEff; //! Array of pt [min,max] for efficiency
194 Int_t fAODtrackCutBit; // Track filter bit for AOD tracks
196 // -----------------------------------------------------------------------
198 ClassDef(AliAnalysisTaskNetParticle, 1);