Bugfix in the config.
[u/mrichter/AliRoot.git] / PWG4 / JetTasks / AliAnalysisTaskFragmentationFunction.h
CommitLineData
d7238ca3 1/*************************************************************************
2 * Task for Fragmentation Function Analysis in PWG4 Jet Task Force Train *
3 *************************************************************************/
4
6bec8236 5#ifndef ALIANALYSISTASKFRAGMENTATIONFUNCTION_H
6#define ALIANALYSISTASKFRAGMENTATIONFUNCTION_H
d7238ca3 7
6bec8236 8/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
9 * See cxx source for full Copyright notice */
f32b5a77 10
d7238ca3 11/* $Id$ */
6bec8236 12
d7238ca3 13class AliESDEvent;
14class AliAODEvent;
15class TList;
6bec8236 16class TH1F;
d7238ca3 17class TH2F;
18
19
20#include "AliAnalysisTaskSE.h"
21
22class AliAnalysisTaskFragmentationFunction : public AliAnalysisTaskSE {
6bec8236 23
6bec8236 24 public:
6bec8236 25
d7238ca3 26 class AliFragFuncHistos : public TObject
27 {
6bec8236 28
d7238ca3 29 public:
30
31 AliFragFuncHistos(const char* name = "FFhistos",
32 Int_t nJetPt = 0, Float_t jetPtMin = 0, Float_t jetPtMax = 0,
33 Int_t nPt = 0, Float_t ptMin = 0, Float_t ptMax = 0,
34 Int_t nXi = 0, Float_t xiMin = 0, Float_t xiMax = 0,
35 Int_t nZ = 0, Float_t zMin = 0, Float_t zMax = 0);
36 AliFragFuncHistos(const AliFragFuncHistos& copy);
37 AliFragFuncHistos& operator=(const AliFragFuncHistos &o);
38 virtual ~AliFragFuncHistos();
39
40 virtual void DefineHistos();
41 virtual void FillFF(Float_t trackPt, Float_t jetPt,Bool_t incrementJetPt);
42 virtual void AddToOutput(TList* list) const;
43
44 private:
45
46 Int_t fNBinsJetPt; // FF histos bins
47 Float_t fJetPtMin; // FF histos limits
48 Float_t fJetPtMax; // FF histos limits
49 Int_t fNBinsPt; // FF histos bins
50 Float_t fPtMin; // FF histos limits
51 Float_t fPtMax; // FF histos limits
52 Int_t fNBinsXi; // FF histos bins
53 Float_t fXiMin; // FF histos limits
54 Float_t fXiMax; // FF histos limits
55 Int_t fNBinsZ; // FF histos bins
56 Float_t fZMin; // FF histos limits
57 Float_t fZMax; // FF histos limits
6bec8236 58
d7238ca3 59 TH2F* fh2TrackPt; //! FF: track transverse momentum
60 TH2F* fh2Xi; //! FF: xi
61 TH2F* fh2Z; //! FF: z
62 TH1F* fh1JetPt; //! jet pt
63
64 TString fName; // histo names prefix
65
66 ClassDef(AliFragFuncHistos, 1);
67 };
68
69
70 class AliFragFuncQAJetHistos : public TObject
71 {
72
73 public:
6bec8236 74
d7238ca3 75 AliFragFuncQAJetHistos(const char* name = "QAJethistos",
76 Int_t nPt = 0, Float_t ptMin = 0, Float_t ptMax = 0,
77 Int_t nEta = 0, Float_t etaMin = 0, Float_t etaMax = 0,
78 Int_t nPhi = 0, Float_t phiMin = 0, Float_t phiMax = 0);
79
80 AliFragFuncQAJetHistos(const AliFragFuncQAJetHistos& copy);
81 AliFragFuncQAJetHistos& operator=(const AliFragFuncQAJetHistos &o);
82 virtual ~AliFragFuncQAJetHistos();
83 virtual void DefineHistos();
84 virtual void FillJetQA(Float_t eta, Float_t phi, Float_t pt);
85 virtual void AddToOutput(TList* list) const;
86
87 private:
88
89 Int_t fNBinsPt; // jet QA histos bins
90 Float_t fPtMin; // jet QA histos limits
91 Float_t fPtMax; // jet QA histos limits
92 Int_t fNBinsEta; // jet QA histos bins
93 Float_t fEtaMin; // jet QA histos limits
94 Float_t fEtaMax; // jet QA histos limits
95 Int_t fNBinsPhi; // jet QA histos bins
96 Float_t fPhiMin; // jet QA histos limits
97 Float_t fPhiMax; // jet QA histos limits
98
99 TH2F* fh2EtaPhi; //! jet phi vs eta
100 TH1F* fh1Pt; //! jet transverse momentum
101 TString fName; // histo names prefix
102
103 ClassDef(AliFragFuncQAJetHistos, 1);
104 };
105
106
107 class AliFragFuncQATrackHistos : public TObject
108 {
109
110 public:
111
112 AliFragFuncQATrackHistos(const char* name = "QATrackhistos",
113 Int_t nPt = 0, Float_t ptMin = 0, Float_t ptMax = 0,
114 Int_t nEta = 0, Float_t etaMin = 0, Float_t etaMax = 0,
115 Int_t nPhi = 0, Float_t phiMin = 0, Float_t phiMax = 0,
116 Float_t ptThresh = 0);
117
118 AliFragFuncQATrackHistos(const AliFragFuncQATrackHistos& copy);
119 AliFragFuncQATrackHistos& operator=(const AliFragFuncQATrackHistos &o);
120 virtual ~AliFragFuncQATrackHistos();
121 virtual void DefineHistos();
122 virtual void FillTrackQA(Float_t eta, Float_t phi, Float_t pt);
123 virtual void AddToOutput(TList* list) const;
124
125 private:
126
127 Int_t fNBinsPt; // track QA histos bins
128 Float_t fPtMin; // track QA histos limits
129 Float_t fPtMax; // track QA histos limits
130 Int_t fNBinsEta; // track QA histos bins
131 Float_t fEtaMin; // track QA histos limits
132 Float_t fEtaMax; // track QA histos limits
133 Int_t fNBinsPhi; // track QA histos bins
134 Float_t fPhiMin; // track QA histos limits
135 Float_t fPhiMax; // track QA histos limits
136
137 Float_t fHighPtThreshold; // high pt track phi vs eta distribution
138
139 TH2F* fh2EtaPhi; //! track phi vs eta
140 TH1F* fh1Pt; //! track transverse momentum
141 TH2F* fh2HighPtEtaPhi; //! phi vs eta for high pt (>fgHighPtThreshold) tracks
142
143 TString fName; // histo names prefix
144
145 ClassDef(AliFragFuncQATrackHistos, 1);
146 };
147
148
149 AliAnalysisTaskFragmentationFunction();
150 AliAnalysisTaskFragmentationFunction(const char *name);
151 AliAnalysisTaskFragmentationFunction(const AliAnalysisTaskFragmentationFunction &copy);
152 AliAnalysisTaskFragmentationFunction& operator=(const AliAnalysisTaskFragmentationFunction &o);
153 virtual ~AliAnalysisTaskFragmentationFunction();
154
155 virtual void UserCreateOutputObjects();
156 virtual void Init();
157 virtual void LocalInit() {Init();}
158 virtual void UserExec(Option_t *option);
159 virtual void Terminate(Option_t* );
160
161 virtual void SetTrackTypeGen(Int_t i){fTrackTypeGen = i;}
162 virtual void SetJetTypeGen(Int_t i){fJetTypeGen = i;}
163
164 virtual void SetBranchGenJets(const char* c){fBranchGenJets = c;}
165 virtual void SetBranchRecJets(const char* c){fBranchRecJets = c;}
166
167 virtual void SetTrackCuts(Float_t trackPt = 0.15, Float_t trackEtaMin = -0.9, Float_t trackEtaMax = 0.9, Float_t trackPhiMin = 0., Float_t trackPhiMax = 2*TMath::Pi())
168 {fTrackPtCut = trackPt; fTrackEtaMin = trackEtaMin; fTrackEtaMax = trackEtaMax; fTrackPhiMin = trackPhiMin; fTrackPhiMax = trackPhiMax;}
169 virtual void SetFilterMask(UInt_t i) {fFilterMask = i;}
170 virtual void SetJetCuts(Float_t jetPt = 5., Float_t jetEtaMin = -0.5, Float_t jetEtaMax = 0.5, Float_t jetPhiMin = 0., Float_t jetPhiMax = 2*TMath::Pi())
171 {fJetPtCut = jetPt; fJetEtaMin = jetEtaMin; fJetEtaMax = jetEtaMax; fJetPhiMin = jetPhiMin; fJetPhiMax = jetPhiMax;}
172 virtual void SetDijetCuts(Float_t deltaPhi = 0., Float_t invMassMin = -1., Float_t invMassMax = -1., Float_t cdfCut = -1., Float_t eMeanMin = -1., Float_t eMeanMax = -1., Float_t eFraction = -1.)
173 {fDijetDeltaPhiCut = deltaPhi; fDijetInvMassMin = invMassMin; fDijetInvMassMax = invMassMax; fDijetCDFcut = cdfCut; fDijetEMeanMin = eMeanMin; fDijetEMeanMax = eMeanMax; fDijetEFraction = eFraction;}
174 virtual void SetFFRadius(Float_t r = 0.4) { fFFRadius = r; }
175
176 static void SetProperties(TH1* h,const char* x, const char* y);
177 static void SetProperties(TH2* h,const char* x, const char* y,const char* z);
178
179 void SetHighPtThreshold(Float_t pt = 5.) { fQATrackHighPtThreshold = pt; }
180
181
182 void SetFFHistoBins(Int_t nJetPt = 55, Float_t jetPtMin = 5, Float_t jetPtMax = 60,
183 Int_t nPt = 70, Float_t ptMin = 0., Float_t ptMax = 70.,
184 Int_t nXi = 70, Float_t xiMin = 0., Float_t xiMax = 7.,
185 Int_t nZ = 22, Float_t zMin = 0., Float_t zMax = 1.1)
186 { fFFNBinsJetPt = nJetPt; fFFJetPtMin = jetPtMin; fFFJetPtMax = jetPtMax;
187 fFFNBinsPt = nPt; fFFPtMin = ptMin; fFFPtMax = ptMax;
188 fFFNBinsXi = nXi; fFFXiMin = xiMin; fFFXiMax = xiMax;
189 fFFNBinsZ = nZ; fFFZMin = zMin; fFFZMax = zMax; }
190
191 void SetQAJetHistoBins(Int_t nPt = 200, Float_t ptMin = 0., Float_t ptMax = 200.,
192 Int_t nEta = 20, Float_t etaMin = -1.0, Float_t etaMax = 1.0,
193 Int_t nPhi = 60, Float_t phiMin = 0., Float_t phiMax = 2*TMath::Pi())
194 { fQAJetNBinsPt = nPt; fQAJetPtMin = ptMin; fQAJetPtMax = ptMax;
195 fQAJetNBinsEta = nEta; fQAJetEtaMin = etaMin; fQAJetEtaMax = etaMax;
196 fQAJetNBinsPhi = nPhi; fQAJetPhiMin = phiMin; fQAJetPhiMax = phiMax; }
197
198 void SetQATrackHistoBins(Int_t nPt = 70, Float_t ptMin = 0., Float_t ptMax = 70.,
199 Int_t nEta = 20, Float_t etaMin = -1.0, Float_t etaMax = 1.0,
200 Int_t nPhi = 60, Float_t phiMin = 0., Float_t phiMax = 2*TMath::Pi())
201 { fQATrackNBinsPt = nPt; fQATrackPtMin = ptMin; fQATrackPtMax = ptMax;
202 fQATrackNBinsEta = nEta; fQATrackEtaMin = etaMin; fQATrackEtaMax = etaMax;
203 fQATrackNBinsPhi = nPhi; fQATrackPhiMin = phiMin; fQATrackPhiMax = phiMax; }
204
205
206 Float_t GetFFRadius() const { return fFFRadius; }
207 void GetJetTracksTrackrefs(TList* l, AliAODJet* j);
208 void GetJetTracksPointing(TList* in, TList* out, AliAODJet* j, const Double_t r, Double_t& pt);
209
210
6bec8236 211 private:
d7238ca3 212
213 // Consts
214
215 enum {kTrackUndef=0, kTrackAOD, kTrackAODCuts, kTrackKineAll, kTrackKineCharged, kTrackKineChargedAcceptance, kTrackAODMCAll, kTrackAODMCCharged, kTrackAODMCChargedAcceptance};
216 enum {kJetsUndef=0, kJetsRec, kJetsRecAcceptance, kJetsGen, kJetsGenAcceptance, kJetsKine, kJetsKineAcceptance};
217
218
219 Int_t GetListOfTracks(TList* list, Int_t type);
220 Int_t GetListOfJets(TList* list, Int_t type);
221
222 AliESDEvent* fESD; // ESD event
223 AliAODEvent* fAOD; // AOD event
224 AliMCEvent* fMCEvent; // MC event
225
226 TString fBranchRecJets; // branch name for reconstructed jets
227 TString fBranchGenJets; // branch name for generated jets
228
229 Int_t fTrackTypeGen; // type of generated tracks
230 Int_t fJetTypeGen; // type of generated jets
231
232 UInt_t fFilterMask; // filter bit for selected tracks
233
234 // track cuts
235 Float_t fTrackPtCut; // track transverse momentum cut
236 Float_t fTrackEtaMin; // track eta cut
237 Float_t fTrackEtaMax; // track eta cut
238 Float_t fTrackPhiMin; // track phi cut
239 Float_t fTrackPhiMax; // track phi cut
240
241 // jet cuts
242 Float_t fJetPtCut; // jet transverse momentum cut
243 Float_t fJetEtaMin; // jet eta cut
244 Float_t fJetEtaMax; // jet eta cut
245 Float_t fJetPhiMin; // jet phi cut
246 Float_t fJetPhiMax; // jet phi cut
247
248
249 Float_t fFFRadius; // if radius > 0 construct FF from tracks within cone around jet axis, otherwise use trackRefs
250
251 // dijet cuts
252 Float_t fDijetDeltaPhiCut; // should be comment here
253 Float_t fDijetInvMassMin; // should be comment here
254 Float_t fDijetInvMassMax; // should be comment here
255 Float_t fDijetCDFcut; // should be comment here
256 Float_t fDijetEMeanMin; // should be comment here
257 Float_t fDijetEMeanMax; // should be comment here
258 Float_t fDijetEFractionCut; // should be comment here
259 Float_t fDijetEFraction; // should be comment here
260
261 TList* fTracksRec; //! reconstructed tracks
262 TList* fTracksRecCuts; //! reconstructed tracks after cuts
263 TList* fTracksGen; //! generated tracks
264
265 TList* fJetsRec; //! jets from reconstructed tracks
266 TList* fJetsRecCuts; //! jets from reonstructed tracks after jet cuts
267 TList* fJetsGen; //! jets from generated tracks
268
269
270 AliFragFuncQATrackHistos* fQATrackHistosRec; //! track QA: reconstructed tracks
271 AliFragFuncQATrackHistos* fQATrackHistosRecCuts; //! track QA: reconstructed tracks after cuts
272 AliFragFuncQATrackHistos* fQATrackHistosGen; //! track QA: generated tracks
273
274 AliFragFuncQAJetHistos* fQAJetHistosRec; //! jet QA: jets from reconstructed tracks
275 AliFragFuncQAJetHistos* fQAJetHistosRecCuts; //! jet QA: jets from reconstructed tracks after jet cuts
276 AliFragFuncQAJetHistos* fQAJetHistosRecCutsLeading; //! jet QA: leading jet from reconstructed tracks after jet cuts
277 AliFragFuncQAJetHistos* fQAJetHistosGen; //! jet QA: jets from generated tracks
278 AliFragFuncQAJetHistos* fQAJetHistosGenLeading; //! jet QA: leading jet from generated tracks
279
280 AliFragFuncHistos* fFFHistosRecCuts; //! FF reconstructed tracks after cuts
281 AliFragFuncHistos* fFFHistosRecLeading; //! FF reconstructed tracks after cuts: all reconstructed tracks pt / leading track pt
282 AliFragFuncHistos* fFFHistosRecLeadingTrack; //! FF reconstructed tracks after cuts: leading track pt / jet pt
283 AliFragFuncHistos* fFFHistosGen; //! FF generated tracks after cuts
284 AliFragFuncHistos* fFFHistosGenLeading; //! FF generated tracks after cuts: all generated tracks pt / leading track pt
285 AliFragFuncHistos* fFFHistosGenLeadingTrack; //! FF generated tracks after cuts: leading track pt / jet pt
286
287 Float_t fQATrackHighPtThreshold; // track QA high transverse momentum threshold
288
289 // histogram bins
290
291 Int_t fFFNBinsJetPt; // FF histos bins
292 Float_t fFFJetPtMin; // FF histos limits
293 Float_t fFFJetPtMax; // FF histos limits
294
295 Int_t fFFNBinsPt; // FF histos bins
296 Float_t fFFPtMin; // FF histos limits
297 Float_t fFFPtMax; // FF histos limits
298
299 Int_t fFFNBinsXi; // FF histos bins
300 Float_t fFFXiMin; // FF histos limits
301 Float_t fFFXiMax; // FF histos limits
302
303 Int_t fFFNBinsZ; // FF histos bins
304 Float_t fFFZMin; // FF histos limits
305 Float_t fFFZMax; // FF histos limits
306
307 Int_t fQAJetNBinsPt; // jet QA histos bins
308 Float_t fQAJetPtMin; // jet QA histos limits
309 Float_t fQAJetPtMax; // jet QA histos limits
310
311 Int_t fQAJetNBinsEta; // jet QA histos bins
312 Float_t fQAJetEtaMin; // jet QA histos limits
313 Float_t fQAJetEtaMax; // jet QA histos limits
314
315 Int_t fQAJetNBinsPhi; // jet QA histos bins
316 Float_t fQAJetPhiMin; // jet QA histos limits
317 Float_t fQAJetPhiMax; // jet QA histos limits
318
319 Int_t fQATrackNBinsPt; // track QA histos bins
320 Float_t fQATrackPtMin; // track QA histos limits
321 Float_t fQATrackPtMax; // track QA histos limits
322
323 Int_t fQATrackNBinsEta; // track QA histos bins
324 Float_t fQATrackEtaMin; // track QA histos limits
325 Float_t fQATrackEtaMax; // track QA histos limits
326
327 Int_t fQATrackNBinsPhi; // track QA histos bins
328 Float_t fQATrackPhiMin; // track QA histos limits
329 Float_t fQATrackPhiMax; // track QA histos limits
330
331
332 // Histograms
333 TList *fCommonHistList; // List of common histos
334
335 TH1F *fh1EvtSelection; //! event cuts
336 TH1F *fh1VertexNContributors; //! NContributors to prim vertex
337 TH1F *fh1VertexZ; //! prim vertex z distribution
338 TH1F *fh1EvtMult; //! number of reconstructed tracks after cuts
339 TH1F *fh1nRecJetsCuts; //! number of jets from reconstructed tracks per event
340 TH1F *fh1nGenJets; //! number of jets from generated tracks per event
341
342 ClassDef(AliAnalysisTaskFragmentationFunction, 2);
6bec8236 343};
d7238ca3 344
6bec8236 345#endif