cb68eb1d |
1 | //-*- Mode: C++ -*- |
2 | |
3 | #ifndef ALIANALYSISTASKNETPARTICLE_H |
4 | #define ALIANALYSISTASKNETPARTICLE_H |
5 | |
6 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
7 | * See cxx source for full Copyright notice */ |
8 | |
9 | // Task for NetParticle Distributions |
10 | // Authors: Jochen Thaeder <jochen@thaeder.de> |
11 | |
12 | #include "AliAnalysisTaskSE.h" |
13 | #include "TList.h" |
14 | #include "THnSparse.h" |
15 | |
16 | #include "AliAnalysisNetParticleHelper.h" |
17 | #include "AliAnalysisNetParticleEffCont.h" |
18 | #include "AliAnalysisNetParticleDCA.h" |
19 | #include "AliAnalysisNetParticleDistribution.h" |
20 | |
21 | class AliESDEvent; |
22 | class AliESDInputHandler; |
9be43c8e |
23 | class AliAODEvent; |
24 | class AliAODInputHandler; |
cb68eb1d |
25 | class AliMCEvent; |
26 | class AliStack; |
27 | class AliPIDResponse; |
28 | class AliESDResponse; |
29 | |
30 | class AliAnalysisTaskNetParticle : public AliAnalysisTaskSE { |
31 | |
32 | public: |
33 | |
34 | /* |
35 | * --------------------------------------------------------------------------------- |
36 | * Constructor / Destructor |
37 | * --------------------------------------------------------------------------------- |
38 | */ |
39 | |
40 | AliAnalysisTaskNetParticle(const char *name = "AliAnalysisTaskNetParticle"); |
41 | virtual ~AliAnalysisTaskNetParticle(); |
42 | |
43 | /* |
44 | * --------------------------------------------------------------------------------- |
45 | * Task Methods |
46 | * --------------------------------------------------------------------------------- |
47 | */ |
48 | |
49 | virtual void UserCreateOutputObjects(); |
50 | virtual void UserExec(Option_t *option); |
51 | virtual void Terminate(Option_t *); |
52 | |
53 | /* |
54 | * --------------------------------------------------------------------------------- |
55 | * Public Methods |
56 | * --------------------------------------------------------------------------------- |
57 | */ |
58 | |
59 | /** Initialize Task */ |
60 | Int_t Initialize(); |
61 | |
62 | /* |
63 | * --------------------------------------------------------------------------------- |
64 | * Setter |
65 | * --------------------------------------------------------------------------------- |
66 | */ |
67 | |
68 | void SetIsMC() {fIsMC = kTRUE;} |
9be43c8e |
69 | void SetIsAOD(Bool_t b) {fIsAOD = b;} |
cb68eb1d |
70 | void SetUseQATHnSparse(Bool_t b) {fUseQATHnSparse = b;} |
71 | |
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;} |
9be43c8e |
76 | |
cb68eb1d |
77 | |
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;} |
81 | |
9be43c8e |
82 | void SetTrackFilterBit(Int_t i) {fAODtrackCutBit = i;} |
83 | |
cb68eb1d |
84 | /* |
85 | * --------------------------------------------------------------------------------- |
86 | * Setter - Pass-Through |
87 | * --------------------------------------------------------------------------------- |
88 | */ |
89 | |
90 | void SetCentralityBinMax(Int_t d) {fHelper->SetCentralityBinMax(d);} |
91 | void SetVertexZMax(Float_t f) {fHelper->SetVertexZMax(f);} |
92 | |
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);} |
97 | |
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); |
101 | } |
102 | |
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);} |
106 | |
107 | /////////////////////////////////////////////////////////////////////////////////// |
108 | |
109 | private: |
110 | |
111 | AliAnalysisTaskNetParticle(const AliAnalysisTaskNetParticle&); // not implemented |
112 | AliAnalysisTaskNetParticle& operator=(const AliAnalysisTaskNetParticle&); // not implemented |
113 | |
114 | /* |
115 | * --------------------------------------------------------------------------------- |
116 | * Setup/Reset Methods - private |
117 | * --------------------------------------------------------------------------------- |
118 | */ |
119 | |
120 | /** Setup Event */ |
121 | Int_t SetupEvent(); |
122 | |
123 | /** Setup ESD Event */ |
124 | Int_t SetupESDEvent(); |
125 | |
9be43c8e |
126 | /** Setup AOD Event */ |
127 | Int_t SetupAODEvent(); |
128 | |
cb68eb1d |
129 | /** Setup MC Event */ |
130 | Int_t SetupMCEvent(); |
131 | |
132 | /** Reset Event */ |
133 | void ResetEvent(); |
134 | |
135 | /* |
136 | * --------------------------------------------------------------------------------- |
137 | * Members - private |
138 | * --------------------------------------------------------------------------------- |
139 | */ |
140 | |
141 | AliAnalysisNetParticleHelper *fHelper; //! Helper class |
142 | AliAnalysisNetParticleEffCont *fEffCont; //! Efficiency and Contamination class |
143 | AliAnalysisNetParticleDCA *fDCA; //! DCA class |
144 | AliAnalysisNetParticleDistribution *fDist; //! Distributions class |
145 | |
146 | // --- OutLists ---------------------------------------------------------- |
147 | |
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 |
153 | |
154 | // --- ESD only ---------------------------------------------------------- |
155 | |
156 | AliESDEvent *fESD; //! Ptr to ESD event |
157 | AliESDInputHandler *fESDHandler; //! Ptr to ESD Handler |
158 | |
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 |
9be43c8e |
163 | |
164 | // --- AOD only ---------------------------------------------------------- |
165 | |
166 | AliAODEvent *fAOD; //! Ptr to AOD event |
167 | AliAODInputHandler *fAODHandler; //! Ptr to AOD Handler |
cb68eb1d |
168 | |
169 | // --- Flags ------------------------------------------------------------- |
170 | |
171 | Bool_t fIsMC; // Is MC event |
9be43c8e |
172 | Bool_t fIsAOD; // analysis mode : 0 = ESDs | 1 = AODs |
cb68eb1d |
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 |
177 | |
178 | // --- MC only ----------------------------------------------------------- |
179 | |
180 | AliMCEvent *fMCEvent; //! Ptr to MC event |
181 | AliStack *fMCStack; //! Ptr to MC stack |
182 | |
183 | // ----------------------------------------------------------------------- |
184 | |
f910f3d8 |
185 | THnSparseF *fHnQA; //! THnSparseF : tracks for QA |
cb68eb1d |
186 | Float_t fUseQATHnSparse; // Usage of THnSparse for QA |
187 | |
188 | // ----------------------------------------------------------------------- |
189 | |
190 | Float_t fEtaMax; // Max, absolut eta |
f910f3d8 |
191 | Float_t *fPtRange; //! Array of pt [min,max] |
192 | Float_t *fPtRangeEff; //! Array of pt [min,max] for efficiency |
cb68eb1d |
193 | |
9be43c8e |
194 | Int_t fAODtrackCutBit; // Track filter bit for AOD tracks |
195 | |
cb68eb1d |
196 | // ----------------------------------------------------------------------- |
197 | |
198 | ClassDef(AliAnalysisTaskNetParticle, 1); |
199 | }; |
200 | |
201 | #endif |