Added FF task from Swensy, to be merged with Bastian's
[u/mrichter/AliRoot.git] / PWG4 / JetTasks / AliAnalysisTaskFragmentationFunction.h
CommitLineData
6bec8236 1#ifndef ALIANALYSISTASKFRAGMENTATIONFUNCTION_H
2#define ALIANALYSISTASKFRAGMENTATIONFUNCTION_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7#include "AliAnalysisTaskSE.h"
8
9class AliJetHeader;
10class AliAODJet;
11class TProfile;
12class TH1F;
13
14class AliAnalysisTaskFragmentationFunction : public AliAnalysisTaskSE
15{
16 public:
17 AliAnalysisTaskFragmentationFunction();
18 AliAnalysisTaskFragmentationFunction(const char* name);
19 virtual ~AliAnalysisTaskFragmentationFunction() {;}
20 // Implementation of interface methods
21 virtual Bool_t Notify();
22 virtual void UserCreateOutputObjects();
23 virtual void Init();
24 virtual void LocalInit() {Init();}
25 virtual void UserExec(Option_t *option);
26 virtual void Terminate(Option_t *option);
27
28 virtual void SetAODInput(Bool_t b){fUseAODInput = b;}
29 virtual void SetLimitGenJetEta(Bool_t b){fLimitGenJetEta = b;}
30 virtual void SetRecEtaWindow(Float_t f){fRecEtaWindow = f;}
31 virtual void SetAnalysisType(Int_t i){fAnalysisType = i;}
32 virtual void SetBranchGen(const char* c){fBranchGen = c;}
33 virtual void SetBranchRec(const char* c){fBranchRec = c;}
34 virtual void SetFilterMask(UInt_t i){fFilterMask = i;}
35
36 virtual void FillMonoJetH(Int_t goodBin, AliAODJet* jet, TClonesArray* Tracks);
37 virtual void DefineJetH();
38
39// virtual void DeleteHists();
40 virtual void SetProperties(TH1* h,const char* x, const char* y);
41
42 // Helper
43 //
44
45 // we have different cases
46 // AOD reading -> MC from AOD
47 // ESD reading -> MC from Kinematics
48 // this has to match with our selection of input events
49 enum {kTrackUndef = 0, kTrackAOD, kTrackKineAll,kTrackKineCharged, kTrackAODMCAll, kTrackAODMCCharged, kTrackAODMCChargedAcceptance};
50 enum {kAnaMC = 0x1, kAnaMCESD = 0x2};
51 enum {kMaxJets = 4};
52 enum {kMaxCorrelation = 3};
53
54 //
55 // 0 all jets
56 // 1 all jet in eta window
57 // 2 all jets with partner
58 // 3 all jets in eta window with partner
59 // 4 all jets with partner in eta window
60 enum {kStep0 = 0, kStep1, kStep2, kStep3, kStep4,kMaxStep};
61
62
63 private:
64 AliAnalysisTaskFragmentationFunction(const AliAnalysisTaskFragmentationFunction &det);
65 AliAnalysisTaskFragmentationFunction &operator=(const AliAnalysisTaskFragmentationFunction &det);
66
67 void MakeJetContainer();
68
69 private:
70 AliJetHeader *fJetHeaderRec;
71 AliJetHeader *fJetHeaderGen;
72 AliAODEvent *fAOD; // wherewe take the jets from can be input or output AOD
73 // THnSparseF *fhnJetContainer[kMaxStep*2]; // like particle container in corrfw with different steps need AliCFContainer with Scale(), and clone() to do the same
74 // THnSparseF *fhnCorrelation; // response matrix for unfolding
75
76 TString fBranchRec; // AOD branch name for reconstructed
77 TString fBranchGen; // AOD brnach for genereated
78
79 Bool_t fUseAODInput; // use AOD input
80 Bool_t fUseAODJetInput; // use AOD input
81 Bool_t fUseAODTrackInput; // take track from input AOD not from ouptu AOD
82 Bool_t fUseAODMCInput; // take MC from input AOD not from ouptu AOD
83 Bool_t fUseGlobalSelection; // Limit the eta of the generated jets
84 Bool_t fUseExternalWeightOnly; // use only external weight
85 Bool_t fLimitGenJetEta; // Limit the eta of the generated jets
86 UInt_t fFilterMask; // filter bit for slecected tracks
87 Int_t fAnalysisType; // Analysis type
88 Int_t fTrackTypeRec; // type of tracks used for FF
89 Int_t fTrackTypeGen; // type of tracks used for FF
90 Float_t fAvgTrials; // Average nimber of trials
91 Float_t fExternalWeight; // external weight
92 Float_t fRecEtaWindow; // eta window used for corraltion plots between rec and gen
93
94 Double_t fR;
95 Double_t fdRdNdxi;
96 Double_t fPartPtCut;
97 Double_t fEfactor;
98 Int_t fNff;
99 Int_t fNim;
100 TList* fList;
101
102 Int_t fGlobVar;
103
104 Bool_t fCDFCut;
105
106 // INTERVALS
107 Int_t fnEBin; // Number of energy bins
108 Double_t fEmin;
109 Double_t fEmax;
110 Int_t fnEInterval;
111
112 Int_t fnRBin; // Number of radius bins
113 Double_t fRmin;
114 Double_t fRmax;
115 Int_t fnRInterval;
116
117 // HISTOGRAMS LIMITS
118 Int_t fnEtaHBin;
119 Double_t fEtaHBinMin;
120 Double_t fEtaHBinMax;
121
122 Int_t fnPhiHBin;
123 Double_t fPhiHBinMin;
124 Double_t fPhiHBinMax;
125
126 Int_t fnPtHBin;
127 Double_t fPtHBinMin;
128 Double_t fPtHBinMax;
129
130 Int_t fnEHBin;
131 Double_t fEHBinMin;
132 Double_t fEHBinMax;
133
134 Int_t fnXiHBin;
135 Double_t fXiHBinMax;
136 Double_t fXiHBinMin;
137
138 Int_t fnPthadHBin;
139 Double_t fPthadHBinMin;
140 Double_t fPthadHBinMax;
141
142 Int_t fnZHBin;
143 Double_t fZHBinMin;
144 Double_t fZHBinMax;
145
146 Int_t fnThetaHBin;
147 Double_t fThetaHBinMin;
148 Double_t fThetaHBinMax;
149
150 Int_t fnCosThetaHBin;
151 Double_t fcosThetaHBinMin;
152 Double_t fcosThetaHBinMax;
153
154 Int_t fnkTHBin;
155 Double_t fkTHBinMin;
156 Double_t fkTHBinMax;
157
158 Int_t fnRHBin;
159 Double_t fRHBinMin;
160 Double_t fRHBinMax;
161
162 Int_t fnPtTrigBin;
163
164 //HISTOGRAMS
165 TH1F** fEtaMonoJet1H;
166 TH1F** fPhiMonoJet1H;
167 TH1F** fPtMonoJet1H;
168 TH1F** fEMonoJet1H;
169
170 TH1F*** fdNdXiMonoJet1H;
171 TH1F*** fdNdPtMonoJet1H;
172 TH1F*** fdNdZMonoJet1H;
173 TH1F*** fdNdThetaMonoJet1H;
174 TH1F*** fdNdcosThetaMonoJet1H;
175 TH1F*** fdNdkTMonoJet1H;
176 TH1F*** fdNdpTvsZMonoJet1H;
177 TH1F*** fShapeMonoJet1H;
178 TH1F*** fNMonoJet1sH;
179
180 TH2F*** fThetaPtPartMonoJet1H;
181 TH2F*** fcosThetaPtPartMonoJet1H;
182 TH2F*** fkTPtPartMonoJet1H;
183 TH2F*** fThetaPtJetMonoJet1H;
184 TH2F*** fcosThetaPtJetMonoJet1H;
185 TH2F*** fkTPtJetMonoJet1H;
186 TH2F*** fpTPtJetMonoJet1H;
187
188 //ARRAYS
189 Double_t* farrayEmin; //!
190 Double_t* farrayEmax; //!
191 Double_t* farrayRadii; //!
192 Double_t* farrayPtTrigmin; //!
193 Double_t* farrayPtTrigmax; //!
194
195 // TRACK CONTROL PLOTS
196 TH1F* fptAllTracks; //!
197 TH1F* fetaAllTracks; //!
198 TH1F* fphiAllTracks; //!
199 TH2F* fetaphiptAllTracks; //!
200 TH2F* fetaphiAllTracks; //!
201 TH1F* fptAllTracksCut; //!
202 TH1F* fetaAllTracksCut; //!
203 TH1F* fphiAllTracksCut; //!
204 TH2F* fetaphiptAllTracksCut; //!
205 TH2F* fetaphiAllTracksCut; //!
206
207 TH1F** fptTracks; //!
208 TH1F** fetaTracks; //!
209 TH1F** fphiTracks; //!
210 TH1F** fdetaTracks; //!
211 TH1F** fdphiTracks; //!
212 TH2F** fetaphiptTracks; //!
213 TH2F** fetaphiTracks; //!
214 TH2F** fdetadphiTracks; //!
215 TH1F** fptTracksCut; //!
216 TH1F** fetaTracksCut; //!
217 TH1F** fphiTracksCut; //!
218 TH1F** fdetaTracksCut; //!
219 TH1F** fdphiTracksCut; //!
220 TH2F** fetaphiptTracksCut; //!
221 TH2F** fetaphiTracksCut; //!
222 TH2F** fdetadphiTracksCut; //!
223 TH1F** fNPtTrig;
224 TH1F** fNPtTrigCut;
225
226 TH2F* fvertexXY; //!
227 TH1F* fvertexZ; //!
228 TH1F* fEvtMult; //!
229 TH2F* fEvtMultvsJetPt; //!
230 TH2F* fPtvsEtaJet; //!
231 TH2F* fNpvsEtaJet; //!
232 TH2F* fNpevtvsEtaJet; //!
233 TH2F* fPtvsPtJet; //!
234 TH2F* fNpvsPtJet; //!
235 TH2F* fNpevtvsPtJet; //!
236 TH1F* fPtvsPtJet1D; //!
237 TH1F* fNpvsPtJet1D; //!
238 TH1F* fNpevtvsPtJet1D; //!
239 TH1F* fptLeadingJet; //!
240 TH1F* fetaLeadingJet; //!
241 TH1F* fphiLeadingJet; //!
242 TH1F* fptJet; //!
243 TH1F* fetaJet; //!
244 TH1F* fphiJet; //!
245
246
247 TList* fHistList; //! Output list
248
249 Int_t fNBadRuns; //!
250 TH1F* fNBadRunsH; //!
251
252 ClassDef(AliAnalysisTaskFragmentationFunction, 1) // Analysis task for standard jet analysis
253};
254
255#endif