]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/JetTasks/AliAnalysisTaskFragmentationFunction.h
fetch centrality also when reading from input AOD
[u/mrichter/AliRoot.git] / PWG4 / JetTasks / AliAnalysisTaskFragmentationFunction.h
1 // *************************************************************************
2 // * Task for Fragmentation Function Analysis in PWG4 Jet Task Force Train *
3 // *************************************************************************
4
5 #ifndef ALIANALYSISTASKFRAGMENTATIONFUNCTION_H
6 #define ALIANALYSISTASKFRAGMENTATIONFUNCTION_H
7
8 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
9  * See cxx source for full Copyright notice                               */
10
11 /* $Id$ */
12
13 class AliESDEvent;
14 class AliAODEvent;
15 class AliAODExtension;
16 class TList;
17 class TH1F;
18 class TH2F;
19 class TH3F;
20 class TProfile;
21 class THnSparse; 
22 class TRandom3;
23 class TArrayS;
24
25 #include "AliAnalysisTaskSE.h"
26
27 class AliAnalysisTaskFragmentationFunction : public AliAnalysisTaskSE {
28
29  public:
30   
31   //----------------------------------------
32   class AliFragFuncHistos : public TObject
33   {
34     
35     public:
36     
37     AliFragFuncHistos(const char* name = "FFhistos", 
38              Int_t nJetPt = 0, Float_t jetPtMin = 0, Float_t jetPtMax = 0,
39              Int_t nPt = 0, Float_t ptMin = 0, Float_t ptMax = 0,
40              Int_t nXi = 0, Float_t xiMin = 0, Float_t xiMax = 0,
41              Int_t nZ  = 0, Float_t zMin  = 0, Float_t zMax  = 0);
42     AliFragFuncHistos(const AliFragFuncHistos& copy);
43     AliFragFuncHistos& operator=(const AliFragFuncHistos &o);
44     virtual ~AliFragFuncHistos();
45     
46     virtual void DefineHistos();
47     virtual void FillFF(Float_t trackPt, Float_t jetPt,Bool_t incrementJetPt, Float_t norm = 0);
48     virtual void AddToOutput(TList* list) const;
49
50   private:
51
52     Int_t   fNBinsJetPt; // FF histos bins
53     Float_t fJetPtMin;   // FF histos limits
54     Float_t fJetPtMax;   // FF histos limits
55     Int_t   fNBinsPt;    // FF histos bins
56     Float_t fPtMin;      // FF histos limits
57     Float_t fPtMax;      // FF histos limits
58     Int_t   fNBinsXi;    // FF histos bins
59     Float_t fXiMin;      // FF histos limits
60     Float_t fXiMax;      // FF histos limits
61     Int_t   fNBinsZ;     // FF histos bins
62     Float_t fZMin;       // FF histos limits
63     Float_t fZMax;       // FF histos limits
64   
65     TH2F*   fh2TrackPt;   //! FF: track transverse momentum 
66     TH2F*   fh2Xi;        //! FF: xi 
67     TH2F*   fh2Z;         //! FF: z  
68     TH1F*   fh1JetPt;     //! jet pt 
69
70     TString fNameFF;      // histo names prefix
71     
72     ClassDef(AliFragFuncHistos, 1);
73   };
74   
75   //----------------------------------------
76   class AliFragFuncQAJetHistos : public TObject
77   {
78
79   public:
80  
81     AliFragFuncQAJetHistos(const char* name = "QAJethistos",
82                 Int_t nPt  = 0, Float_t ptMin  = 0, Float_t ptMax  = 0,
83                 Int_t nEta = 0, Float_t etaMin = 0, Float_t etaMax = 0,
84                 Int_t nPhi = 0, Float_t phiMin = 0, Float_t phiMax = 0);
85       
86     AliFragFuncQAJetHistos(const AliFragFuncQAJetHistos& copy);
87     AliFragFuncQAJetHistos& operator=(const AliFragFuncQAJetHistos &o);
88     virtual ~AliFragFuncQAJetHistos();
89     virtual void DefineHistos();
90     virtual void FillJetQA(Float_t eta, Float_t phi, Float_t pt);
91     virtual void AddToOutput(TList* list) const;
92
93   private:
94     
95     Int_t   fNBinsPt;    // jet QA histos bins
96     Float_t fPtMin;      // jet QA histos limits
97     Float_t fPtMax;      // jet QA histos limits
98     Int_t   fNBinsEta;   // jet QA histos bins
99     Float_t fEtaMin;     // jet QA histos limits
100     Float_t fEtaMax;     // jet QA histos limits
101     Int_t   fNBinsPhi;   // jet QA histos bins
102     Float_t fPhiMin;     // jet QA histos limits
103     Float_t fPhiMax;     // jet QA histos limits
104     
105     TH2F*   fh2EtaPhi;   //! jet phi vs eta 
106     TH1F*   fh1Pt;       //! jet transverse momentum 
107     TString fNameQAJ;    // histo names prefix
108     
109     ClassDef(AliFragFuncQAJetHistos, 1);
110   };
111   
112   //----------------------------------------
113   class AliFragFuncQATrackHistos : public TObject
114   {
115
116   public:
117
118     AliFragFuncQATrackHistos(const char* name = "QATrackhistos", 
119                   Int_t nPt  = 0, Float_t ptMin  = 0, Float_t ptMax  = 0,
120                   Int_t nEta = 0, Float_t etaMin = 0, Float_t etaMax = 0,
121                   Int_t nPhi = 0, Float_t phiMin = 0, Float_t phiMax = 0, 
122                   Float_t ptThresh = 0);
123     
124     AliFragFuncQATrackHistos(const AliFragFuncQATrackHistos& copy);
125     AliFragFuncQATrackHistos& operator=(const AliFragFuncQATrackHistos &o);
126     virtual ~AliFragFuncQATrackHistos();
127     virtual void DefineHistos();
128     virtual void FillTrackQA(Float_t eta, Float_t phi, Float_t pt, Bool_t weightPt = kFALSE, Float_t norm = 0.);
129     virtual void AddToOutput(TList* list) const;
130
131   private:
132     
133     Int_t   fNBinsPt;    // track QA histos bins in pt
134     Float_t fPtMin;      // track QA histos limits in pt
135     Float_t fPtMax;      // track QA histos limits in pt
136     Int_t   fNBinsEta;   // track QA histos bins in eta
137     Float_t fEtaMin;     // track QA histos limits in eta
138     Float_t fEtaMax;     // track QA histos limits in eta
139     Int_t   fNBinsPhi;   // track QA histos bins in phi
140     Float_t fPhiMin;     // track QA histos limits in phi
141     Float_t fPhiMax;     // track QA histos limits in phi
142
143     Float_t fHighPtThreshold; //  high pt track phi vs eta distribution
144
145     TH2F*   fh2EtaPhi;        //! track phi vs eta 
146     TH1F*   fh1Pt;            //! track transverse momentum 
147     TH2F*   fh2HighPtEtaPhi;  //! phi vs eta for high pt (>fgHighPtThreshold) tracks
148     TH2F*   fh2PhiPt;         //! track phi vs pt
149
150     TString fNameQAT;         // histo names prefix
151     
152     ClassDef(AliFragFuncQATrackHistos, 2);
153   };
154   
155   //----------------------------------------
156   class AliFragFuncIntraJetHistos : public TObject
157   {
158
159   public:
160     
161     AliFragFuncIntraJetHistos(const char* name = "IntraJethistos", 
162              Int_t nJetPt    = 0, Float_t jetPtMin    = 0, Float_t jetPtMax    = 0,
163              Int_t nPt       = 0, Float_t ptMin       = 0, Float_t ptMax       = 0,
164              Int_t nZ        = 0, Float_t zMin        = 0, Float_t zMax        = 0,
165              Int_t nCosTheta = 0, Float_t costhetaMin = 0, Float_t costhetaMax = 0,
166              Int_t nTheta    = 0, Float_t thetaMin    = 0, Float_t thetaMax    = 0,
167              Int_t nJt       = 0, Float_t jtMin       = 0, Float_t jtMax       = 0);
168     AliFragFuncIntraJetHistos(const AliFragFuncIntraJetHistos& copy);
169     AliFragFuncIntraJetHistos& operator=(const AliFragFuncIntraJetHistos &o);
170     virtual ~AliFragFuncIntraJetHistos();
171     
172     virtual void DefineHistos();
173     virtual void FillIntraJet(const TLorentzVector* trackV, const TLorentzVector* jetV, Float_t norm = 0);
174     virtual void AddToOutput(TList* list) const;
175
176   private:
177
178     Int_t   fNBinsJetPt;    // IntraJet histos bins in jet pt
179     Float_t fJetPtMin;      // IntraJet histos limits in jet pt
180     Float_t fJetPtMax;      // IntraJet histos limits in jet pt
181     Int_t   fNBinsPt;       // IntraJet histos bins in pt
182     Float_t fPtMin;         // IntraJet histos limits in pt
183     Float_t fPtMax;         // IntraJet histos limits in pt
184     Int_t   fNBinsZ;        // IntraJet histos bins in z
185     Float_t fZMin;          // IntraJet histos limits in z
186     Float_t fZMax;          // IntraJet histos limits in z
187     Int_t   fNBinsJt;       // IntraJet histos bins in jt
188     Float_t fJtMin;         // IntraJet histos limits in jt
189     Float_t fJtMax;         // IntraJet histos limits in jt
190     Int_t   fNBinsTheta;    // IntraJet histos bins in theta
191     Float_t fThetaMin;      // IntraJet histos limits in theta
192     Float_t fThetaMax;      // IntraJet histos limits in theta
193     Int_t   fNBinsCosTheta; // IntraJet histos bins in cos(theta)
194     Float_t fCosThetaMin;   // IntraJet histos limits in cos(theta)
195     Float_t fCosThetaMax;   // IntraJet histos limits in cos(theta)
196   
197     TH2F*   fh2CosTheta;    //! IntraJet: cos(theta) distribution
198     TH2F*   fh2PtZ;       //! IntraJet: pt vs z distribution
199
200     TH3F*   fh3ThetaZ;      //! IntraJet: theta, z, jet pt
201     TH3F*   fh3JtTheta;     //! IntraJet: jt, theta, jet pt
202     TH3F*   fh3JtZ;         //! IntraJet: jt, z, jet pt
203
204     TString fNameIJ;         // histo names prefix
205     
206     ClassDef(AliFragFuncIntraJetHistos, 1);
207   };
208
209   //----------------------------------------
210   class AliFragFuncDiJetHistos : public TObject
211   {
212
213     public:
214     
215     AliFragFuncDiJetHistos(const char* name = "DiJetHistos", Int_t kindSlices = 0,
216              Int_t nJetinvMass = 0, Float_t jetInvMassMin = 0, Float_t jetInvMassMax = 0,
217              Int_t nJetPt = 0, Float_t jetPtMin = 0, Float_t jetPtMax = 0,
218              Int_t nPt = 0, Float_t ptMin = 0, Float_t ptMax = 0,
219              Int_t nXi = 0, Float_t xiMin = 0, Float_t xiMax = 0,
220              Int_t nZ  = 0, Float_t zMin  = 0, Float_t zMax  = 0);
221     AliFragFuncDiJetHistos(const AliFragFuncDiJetHistos& copy);
222     AliFragFuncDiJetHistos& operator=(const AliFragFuncDiJetHistos &o);
223     virtual ~AliFragFuncDiJetHistos();
224     
225     virtual void DefineDiJetHistos();
226     virtual void FillDiJetFF(Int_t jetType, Float_t trackPt, Float_t jetPt, Double_t jetBin, Bool_t incrementJetPt);
227     virtual void AddToOutput(TList* list) const;
228     
229     private:
230
231     Int_t   fKindSlices;      // DJ kind of slices
232     Int_t   fNBinsJetInvMass; // FF histos bins
233     Float_t fJetInvMassMin;   // FF histos limits
234     Float_t fJetInvMassMax;   // FF histos limits
235     Int_t   fNBinsJetPt;      // FF histos bins
236     Float_t fJetPtMin;        // FF histos limits
237     Float_t fJetPtMax;        // FF histos limits
238     Int_t   fNBinsPt;         // FF histos bins
239     Float_t fPtMin;           // FF histos limits
240     Float_t fPtMax;           // FF histos limits
241     Int_t   fNBinsXi;         // FF histos bins
242     Float_t fXiMin;           // FF histos limits
243     Float_t fXiMax;           // FF histos limits
244     Int_t   fNBinsZ;          // FF histos bins
245     Float_t fZMin;            // FF histos limits
246     Float_t fZMax;            // FF histos limits
247
248     TH2F*   fh2TrackPtJet1; //! FF dijet : track transverse momentum of jet 1 
249     TH2F*   fh2TrackPtJet2; //! FF dijet : track transverse momentum of jet 2 
250     TH2F*   fh2TrackPtJet;  //! FF dijet : track transverse momentum of jets 1 and 2   
251     TH1F*   fh1Jet1Pt;      //! jet 1 pt 
252     TH1F*   fh1Jet2Pt;      //! jet 2 pt 
253     TH1F*   fh1JetPt;       //! jet 1 and 2 pt 
254     TH2F*   fh2Xi1;         //! FF dijet : xi of jet 1 
255     TH2F*   fh2Xi2;         //! FF dijet : xi of jet 2
256     TH2F*   fh2Xi;          //! FF dijet : xi of jet 1 and 2 
257     TH2F*   fh2Z1;          //! FF dijet : z of jet 1   
258     TH2F*   fh2Z2;          //! FF dijet : z of jet 2 
259     TH2F*   fh2Z;           //! FF dijet : z of jet 1 and 2 
260     TH2F*   fh2Pt1;         //! FF dijet : z of jet 1   
261     TH2F*   fh2Pt2;         //! FF dijet : z of jet 2 
262     TH2F*   fh2Pt;          //! FF dijet : z of jet 1 and 2 
263
264     TString fNameDJ;        // histo names prefix
265     
266     ClassDef(AliFragFuncDiJetHistos, 1);
267   };
268
269   //----------------------------------------
270   class AliFragFuncQADiJetHistos : public TObject
271   {
272     public:
273     AliFragFuncQADiJetHistos(const char* name = "QADiJetHistos", Int_t kindSlices = 0,
274              Int_t nInvMass = 0, Float_t invMassMin = 0, Float_t invMassMax = 0,
275              Int_t nJetPt = 0,   Float_t jetPtMin = 0, Float_t jetPtMax = 0,
276              Int_t nDeltaPhi = 0, Float_t deltaPhiMin = 0, Float_t deltaPhiMax = 0,
277              Int_t nDeltaEta = 0, Float_t deltaEtaMin = 0, Float_t deltaEtaMax = 0,
278              Int_t nDeltaPt  = 0, Float_t deltaPtMin  = 0, Float_t deltaPtMax  = 0,
279              Int_t nInBal    = 0, Float_t inBalMin  = 0, Float_t inBalMax  = 0);
280     AliFragFuncQADiJetHistos(const AliFragFuncQADiJetHistos& copy);
281     AliFragFuncQADiJetHistos& operator=(const AliFragFuncQADiJetHistos &o);
282     virtual ~AliFragFuncQADiJetHistos();
283     
284     virtual void DefineQADiJetHistos();
285     virtual void FillDiJetQA(Double_t invMass, Double_t deltaPhi, Double_t deltaEta, Double_t deltaPt, Double_t inBal, Double_t jetBin);
286     virtual void AddToOutput(TList* list) const;
287     
288     private:
289     
290     Int_t   fKindSlices;       // DJ kind of slices
291     Int_t   fNBinsJetInvMass;  // FF histos bins in jet invariant mass
292     Float_t fJetInvMassMin;    // FF histos limits in jet invariant mass
293     Float_t fJetInvMassMax;    // FF histos limits in jet invariant mass
294     Int_t   fNBinsJetPt;       // FF histos bins in jet pt
295     Float_t fJetPtMin;         // FF histos limits in jet pt
296     Float_t fJetPtMax;         // FF histos limits in jet pt
297     Int_t   fNBinsDeltaPhi;    // FF histos bins in jet delta phi
298     Float_t fDeltaPhiMin;      // FF histos limits in jet delta phi
299     Float_t fDeltaPhiMax;      // FF histos limits in jet delta phi
300     Int_t   fNBinsDeltaEta;    // FF histos bins in jet delta eta
301     Float_t fDeltaEtaMin;      // FF histos limits in jet delta eta
302     Float_t fDeltaEtaMax;      // FF histos limits in jet delta eta
303     Int_t   fNBinsDeltaPt;     // FF histos bins in jet delta pt
304     Float_t fDeltaPtMin;       // FF histos limits in jet delta pt
305     Float_t fDeltaPtMax;       // FF histos limits in jet delta pt
306     Int_t   fNBinsInBal;       // FF histos bins in jet delta pt
307     Float_t fInBalMin;         // FF histos limits in pt inbalance
308     Float_t fInBalMax;         // FF histos limits in pt inbalance
309
310     TH2F*   fh2InvMass;        // FF dijet invariant mass histos
311     TH2F*   fh2DeltaPhi;       // FF dijet delta phi histos
312     TH2F*   fh2DeltaEta;       // FF dijet delta eta histos
313     TH2F*   fh2DeltaPt;        // FF dijet delta pt histos
314     TH2F*   fh2InBal;        // FF dijet delta pt histos
315
316     TString fNameQADJ;         // histo names prefix
317     
318     ClassDef(AliFragFuncQADiJetHistos, 1);
319   };
320
321   AliAnalysisTaskFragmentationFunction(); 
322   AliAnalysisTaskFragmentationFunction(const char *name);
323   AliAnalysisTaskFragmentationFunction(const  AliAnalysisTaskFragmentationFunction &copy);
324   AliAnalysisTaskFragmentationFunction& operator=(const  AliAnalysisTaskFragmentationFunction &o);
325   virtual ~AliAnalysisTaskFragmentationFunction();
326   
327   virtual void   UserCreateOutputObjects();
328   virtual void   Init();
329   virtual void   LocalInit() {Init();}
330   virtual void   UserExec(Option_t *option);
331   virtual void   Terminate(Option_t* );
332   virtual Bool_t Notify();
333   virtual void   SetNonStdFile(char* c){fNonStdFile = c;} 
334
335   virtual void   SetTrackTypeGen(Int_t i){fTrackTypeGen = i;}
336   virtual void   SetJetTypeGen(Int_t i){fJetTypeGen = i;}
337   virtual void   SetJetTypeRecEff(Int_t i){fJetTypeRecEff = i;}
338
339   virtual void   SetBranchRecBackJets(const char* c){fBranchRecBackJets = c;}
340   virtual void   SetBranchRecBackClusters(const char* c){fBranchRecBckgClusters = c;}
341   virtual void   SetBranchGenJets(const char* c){fBranchGenJets = c;}
342   virtual void   SetBranchRecJets(const char* c){fBranchRecJets = c;}
343
344   virtual void   SetTrackCuts(Float_t trackPt = 0.15, Float_t trackEtaMin = -0.9, Float_t trackEtaMax = 0.9, 
345                               Float_t trackPhiMin = 0., Float_t trackPhiMax = 2*TMath::Pi())
346   {fTrackPtCut = trackPt; fTrackEtaMin = trackEtaMin; fTrackEtaMax = trackEtaMax; 
347     fTrackPhiMin = trackPhiMin; fTrackPhiMax = trackPhiMax;}
348   virtual void   SetFilterMask(UInt_t i) {fFilterMask = i;}
349   virtual void   UsePhysicsSelection(Bool_t b) {fUsePhysicsSelection = b;}
350   virtual void   SetEventClass(Int_t i){fEventClass = i;}
351   virtual void   SetMaxVertexZ(Float_t z){fMaxVertexZ = z;}
352   virtual void   SetJetCuts(Float_t jetPt = 5., Float_t jetEtaMin = -0.5, Float_t jetEtaMax = 0.5, 
353                             Float_t jetPhiMin = 0., Float_t jetPhiMax = 2*TMath::Pi())
354   {fJetPtCut = jetPt; fJetEtaMin = jetEtaMin; fJetEtaMax = jetEtaMax; 
355     fJetPhiMin = jetPhiMin; fJetPhiMax = jetPhiMax;}
356   virtual void   SetDiJetCuts(Int_t cutType = 1, Float_t deltaPhiCut = 0.,  
357                               Float_t cdfCut = 0.5, Float_t ptFractionCut = 0.6)
358   {fDiJetCut = cutType; fDiJetDeltaPhiCut = deltaPhiCut;  
359     fDiJetCDFCut = cdfCut; fDiJetPtFractionCut = ptFractionCut;}
360   virtual void   SetKindSlices(Int_t slice = 1) {fDiJetKindBins = slice;}
361
362   virtual void   SetFFRadius(Float_t r = 0.4) { fFFRadius = r; }
363   virtual void   SetFFBckgRadius(Float_t r = 0.7) { fFFBckgRadius = r; }
364   virtual void   SetBckgMode(Bool_t bg = 1) { fBckgMode = bg; }
365   virtual void   SetBckgType(Int_t bg0 = 0, Int_t bg1 = 1,Int_t bg2 = 2, Int_t bg3 = 3, Int_t bg4 = 4) 
366   { fBckgType[0] = bg0; fBckgType[1] = bg1; fBckgType[2] = bg2; fBckgType[3] = bg3; fBckgType[4] = bg4; }
367   virtual void   SetIJMode(Int_t ij = 1)      {fIJMode = ij;}
368   virtual void   SetQAMode(Int_t qa = 3)      {fQAMode = qa;}
369   virtual void   SetFFMode(Int_t ff = 1)      {fFFMode = ff;}
370   virtual void   SetDJMode(Int_t dj = 1)      {fDJMode = dj;}
371   virtual void   SetEffMode(Int_t eff = 1)    {fEffMode = eff;}
372   virtual void   SetPhiCorrMode(Int_t pc = 1) {fPhiCorrMode = pc;}
373   virtual void   SetBckgSubMethod(Int_t bg = 0) {fBckgSubMethod = bg;}
374
375   virtual void   UseRecEffRecJetPtBins(Bool_t useRec = kFALSE)  { fUseRecEffRecJetPtBins = useRec; }
376   virtual void   UseResponseRecJetPtBins(Bool_t useRec = kTRUE) { fUseResponseRecJetPtBins = useRec; }
377
378   static  void   SetProperties(TH1* h,const char* x, const char* y);
379   static  void   SetProperties(TH1* h,const char* x, const char* y,const char* z);
380   static  void   SetProperties(THnSparse* h,const Int_t dim, const char** labels);
381
382   void   SetHighPtThreshold(Float_t pt = 5.) { fQATrackHighPtThreshold = pt; }
383
384   void   SetFFHistoBins(Int_t nJetPt = 245, Float_t jetPtMin = 5, Float_t jetPtMax = 250, 
385                         Int_t nPt = 200, Float_t ptMin = 0., Float_t ptMax = 200., 
386                         Int_t nXi = 70, Float_t xiMin = 0., Float_t xiMax = 7.,
387                         Int_t nZ = 22,  Float_t zMin = 0.,  Float_t zMax = 1.1)
388   { fFFNBinsJetPt = nJetPt; fFFJetPtMin = jetPtMin; fFFJetPtMax = jetPtMax; 
389     fFFNBinsPt = nPt; fFFPtMin = ptMin; fFFPtMax = ptMax;
390     fFFNBinsXi = nXi; fFFXiMin = xiMin; fFFXiMax = xiMax;
391     fFFNBinsZ  = nZ;  fFFZMin  = zMin;  fFFZMax  = zMax; }
392   
393   void  SetQAJetHistoBins(Int_t nPt = 300, Float_t ptMin = 0., Float_t ptMax = 300.,
394                           Int_t nEta = 20, Float_t etaMin = -1.0, Float_t etaMax = 1.0,
395                           Int_t nPhi = 60, Float_t phiMin = 0., Float_t phiMax = 2*TMath::Pi())
396     { fQAJetNBinsPt = nPt; fQAJetPtMin = ptMin; fQAJetPtMax = ptMax;
397       fQAJetNBinsEta = nEta; fQAJetEtaMin = etaMin; fQAJetEtaMax = etaMax;
398       fQAJetNBinsPhi = nPhi; fQAJetPhiMin = phiMin; fQAJetPhiMax = phiMax; }
399   
400   void  SetQATrackHistoBins(Int_t nPt = 200, Float_t ptMin = 0., Float_t ptMax = 200.,
401                             Int_t nEta = 20, Float_t etaMin = -1.0, Float_t etaMax = 1.0,
402                             Int_t nPhi = 60, Float_t phiMin = 0., Float_t phiMax = 2*TMath::Pi())
403   { fQATrackNBinsPt = nPt; fQATrackPtMin = ptMin; fQATrackPtMax = ptMax;
404     fQATrackNBinsEta = nEta; fQATrackEtaMin = etaMin; fQATrackEtaMax = etaMax;
405     fQATrackNBinsPhi = nPhi; fQATrackPhiMin = phiMin; fQATrackPhiMax = phiMax; }
406   
407   void  SetPhiCorrHistoBins(Int_t nPt = 200, Float_t ptMin = 0., Float_t ptMax = 200.,
408                                  Int_t nEta = 1, Float_t etaMin = -0.9, Float_t etaMax = 0.9,
409                                  Int_t nPhi = 64, Float_t phiMin = -3.2, Float_t phiMax = 3.2)
410   { fPhiCorrNBinsPt = nPt; fPhiCorrPtMin = ptMin; fPhiCorrPtMax = ptMax;
411     fPhiCorrNBinsEta = nEta; fPhiCorrEtaMin = etaMin; fPhiCorrEtaMax = etaMax;
412     fPhiCorrNBinsPhi = nPhi; fPhiCorrPhiMin = phiMin; fPhiCorrPhiMax = phiMax; }
413
414   void   SetIJHistoBins(Int_t nJetPt = 23, Float_t jetPtMin = 5, Float_t jetPtMax = 120, Int_t nPt = 120, Float_t ptMin = 0., Float_t ptMax = 120., 
415                         Int_t nZ = 22,  Float_t zMin = 0.,  Float_t zMax = 1.1, Int_t nCosTheta = 100,  Float_t costhetaMin = 0.,  Float_t costhetaMax = 1.,
416                         Int_t nTheta = 200,  Float_t thetaMin = -0.5,  Float_t thetaMax = 1.5, Int_t nJt = 25,  Float_t jtMin = 0.,  Float_t jtMax = 5.)
417   { fIJNBinsJetPt = nJetPt; fIJJetPtMin = jetPtMin; fIJJetPtMax = jetPtMax; fIJNBinsPt = nPt; fIJPtMin = ptMin; fIJPtMax = ptMax;
418     fIJNBinsZ = nZ; fIJZMin = zMin; fIJZMax = zMax;fIJNBinsCosTheta  = nCosTheta;  fIJCosThetaMin  = costhetaMin;  fIJCosThetaMax  = costhetaMax;
419     fIJNBinsTheta  = nTheta;  fIJThetaMin  = thetaMin;  fIJThetaMax  = thetaMax; fIJNBinsJt  = nJt;  fIJJtMin  = jtMin;  fIJJtMax  = jtMax; }
420
421   void SetDiJetHistoBins(Int_t nJetInvMass = 245, Float_t jetInvMassMin = 5, Float_t jetInvMassMax = 250, Int_t nJetPt = 245, Float_t jetPtMin = 5, 
422                          Float_t jetPtMax = 250, Int_t nPt = 200, Float_t ptMin = 0., Float_t ptMax = 200., Int_t nXi = 70, Float_t xiMin = 0., 
423                          Float_t xiMax = 7., Int_t nZ = 22,  Float_t zMin = 0.,  Float_t zMax = 1.1)
424   {
425     fDiJetNBinsJetInvMass = nJetInvMass; fDiJetJetInvMassMin = jetInvMassMin; fDiJetJetInvMassMax = jetInvMassMax; fDiJetNBinsJetPt = nJetPt; fDiJetJetPtMin = jetPtMin; 
426     fDiJetJetPtMax = jetPtMax; fDiJetNBinsPt = nPt; fDiJetPtMin = ptMin; fDiJetPtMax = ptMax; fDiJetNBinsXi = nXi; fDiJetXiMin = xiMin; 
427     fDiJetXiMax = xiMax; fDiJetNBinsZ = nZ; fDiJetZMin = zMin; fDiJetZMax = zMax;
428   }
429
430   void SetQADiJetHistoBins(Int_t nInvMass = 245, Float_t invMassMin = 5., Float_t invMassMax = 250., Int_t nJetPt = 245, Float_t jetPtMin = 5, Float_t jetPtMax = 250, 
431                            Int_t nDeltaPhi = 100, Float_t deltaPhiMin = 0., Float_t deltaPhiMax = TMath::Pi(), Int_t nDeltaEta = 22, Float_t deltaEtaMin = 0., 
432                            Float_t deltaEtaMax = 1.1, Int_t nDeltaPt = 100, Float_t deltaPtMin = 0., Float_t deltaPtMax = 100.,
433                            Int_t nInBal = 22, Float_t inBalMin = -1.1, Float_t inBalMax = 1.1)
434   {
435     fQADiJetNBinsInvMass = nInvMass; fQADiJetInvMassMin = invMassMin; fQADiJetInvMassMax = invMassMax; fQADiJetNBinsJetPt = nJetPt; fQADiJetJetPtMin = jetPtMin; 
436     fQADiJetJetPtMax = jetPtMax; fQADiJetNBinsDeltaPhi = nDeltaPhi; fQADiJetDeltaPhiMin = deltaPhiMin; fQADiJetDeltaPhiMax = deltaPhiMax; fQADiJetNBinsDeltaEta = nDeltaEta; 
437     fQADiJetDeltaEtaMin = deltaEtaMin; fQADiJetDeltaEtaMax = deltaEtaMax; fQADiJetNBinsDeltaPt = nDeltaPt; fQADiJetDeltaPtMin = deltaPtMin; fQADiJetDeltaPtMax = deltaPtMax;
438     fQADiJetNBinsInBal = nInBal; fQADiJetInBalMin = inBalMin; fQADiJetInBalMax = inBalMax;
439   }
440
441   Float_t  GetFFRadius() const { return fFFRadius; }
442   Float_t  GetFFBckgRadius() const { return fFFBckgRadius; }
443   void     GetJetTracksTrackrefs(TList* l, const AliAODJet* j);
444   void     GetJetTracksPointing(TList* in, TList* out, const AliAODJet* j, const Double_t r, Double_t& pt);  
445   void     GetTracksOutOfNJets(Int_t nCases, TList* in, TList* out, TList* jets, Double_t& pt);
446   void     GetTracksOutOfNJetsStat(Int_t nCases, TList* in, TList* out, TList* jets, Double_t& pt, Double_t &normFactor);
447   void     GetTracksTiltedwrpJetAxis(Float_t alpha, TList* inputlist, TList* outputlist, AliAODJet* jet, Double_t radius, Double_t& sumPt);
448   void     GetTracksTiltedwrpJetAxisWindow(Float_t alpha, TList* inputlist, TList* outputlist, AliAODJet* jet, Double_t radius, Double_t& sumPt, Double_t &normFactor);
449
450   Double_t GetDiJetBin(Double_t invMass, Double_t leadingJetPt, Double_t eMean, Int_t kindSlices); // function to find which bin fill
451   Double_t InvMass(const AliAODJet* jet1, const AliAODJet* jet2);
452   void     AssociateGenRec(TList* tracksAODMCCharged,TList* tracksRec, TArrayI& indexAODTr,TArrayI& indexMCTr,TArrayS& isGenPrim);
453   void     FillSingleTrackRecEffHisto(AliFragFuncQATrackHistos* trackQAGen, AliFragFuncQATrackHistos* trackQARec, TList* tracksGen, const TArrayI& indexAODTr, const TArrayS& isGenPrim);
454   void     FillJetTrackRecEffHisto(TObject* histGen,TObject* histRec,Double_t jetPtGen,Double_t jetPtRec, TList* jetTrackList, const TList* tracksGen,
455                                    const TArrayI& indexAODTr,const TArrayS& isGenPrim, const Bool_t useRecJetPt);
456
457   void     FillSingleTrackResponse(THnSparse* hnResponse, TList* tracksGen, TList* tracksRec, const TArrayI& indexAODTr, const TArrayS& isGenPrim);
458
459   void     FillJetTrackResponse(THnSparse* hnResponsePt, THnSparse* hnResponseZ, THnSparse* hnResponseXi, 
460                                 Double_t jetPtGen, Double_t jetPtRec, TList* jetTrackList,
461                                 const TList* tracksGen, TList* tracksRec, const TArrayI& indexAODTr, const TArrayS& isGenPrim,const Bool_t useRecJetPt);
462   
463   // 
464
465
466   Float_t  CalcJetArea(const Float_t etaJet, const Float_t rc) const;
467   void     GetClusterTracksOutOf1Jet(AliAODJet* jet, TList* outputlist, Double_t &normFactor);
468   void     GetClusterTracksMedian(TList* outputlist, Double_t &normFactor);
469
470   void     FillBckgHistos(Int_t type, TList* inputtracklist, TList* inputjetlist, AliAODJet* jet, 
471                           Float_t leadTrackPt, TLorentzVector* leadTrackV, AliFragFuncHistos* ffbckghistocuts,
472                           AliFragFuncHistos* ffbckghistoleading,AliFragFuncIntraJetHistos* ijbckghistocuts, 
473                           AliFragFuncIntraJetHistos* ijbckghistoleading,AliFragFuncQATrackHistos* qabckghistos);    
474   AliAODJet* GetAODBckgSubJet(AliAODJet* jet, Int_t method);
475
476   // Consts
477   
478   enum {kTrackUndef=0, kTrackAOD, kTrackAODQualityCuts, kTrackAODCuts, kTrackKineAll, kTrackKineCharged, kTrackKineChargedAcceptance, 
479         kTrackAODMCAll, kTrackAODMCCharged, kTrackAODMCChargedAcceptance};
480   enum {kJetsUndef=0, kJetsRec, kJetsRecAcceptance, kJetsGen, kJetsGenAcceptance, kJetsKine, kJetsKineAcceptance};
481   enum {kBckgPerp=0, kBckgOutLJ, kBckgOut2J, kBckgClusters, kBckgClustersOutLeading, kBckgOut3J, kBckgOutAJ, kBckgOutLJStat, 
482         kBckgOut2JStat, kBckgOut3JStat, kBckgOutAJStat,  kBckgASide, kBckgASideWindow, kBckgPerpWindow};
483
484  
485  private:
486   
487   Int_t   GetListOfTracks(TList* list, Int_t type);
488   Int_t   GetListOfJets(TList* list, Int_t type);
489   Int_t   GetListOfBckgJets(TList *list, Int_t type);
490
491   AliESDEvent* fESD;      // ESD event
492   AliAODEvent* fAOD;      // AOD event
493   AliAODExtension  *fAODExtension; //! where we take the jets from can be input or output AOD
494   //AliMCEvent*  fMCEvent;  // MC event
495   TString       fNonStdFile; // name of delta aod file to catch the extension
496  
497  
498   TString fBranchRecJets;         // branch name for reconstructed jets
499   TString fBranchRecBackJets;     // branch name for reconstructed background jets
500   TString fBranchRecBckgClusters; // branch name for reconstructed background clusters 
501   TString fBranchGenJets;         // branch name for generated jets
502   
503   Int_t   fTrackTypeGen;        // type of generated tracks
504   Int_t   fJetTypeGen;          // type of generated jets
505
506   Int_t   fJetTypeRecEff;       // type of jets used for filling reconstruction efficiency histos
507
508   UInt_t  fFilterMask;          // filter bit for selected tracks
509   Bool_t  fUsePhysicsSelection; // switch for event selection
510   Int_t   fEventClass;          // event class to be looked at for this instace of the task
511   Float_t fMaxVertexZ;          // maximum abs(z) position of primiary vertex [cm]
512
513   // track cuts
514   Float_t fTrackPtCut;    // track transverse momentum cut
515   Float_t fTrackEtaMin;   // track eta cut
516   Float_t fTrackEtaMax;   // track eta cut
517   Float_t fTrackPhiMin;   // track phi cut
518   Float_t fTrackPhiMax;   // track phi cut
519   
520   // jet cuts
521   Float_t fJetPtCut;      // jet transverse momentum cut
522   Float_t fJetEtaMin;     // jet eta cut
523   Float_t fJetEtaMax;     // jet eta cut
524   Float_t fJetPhiMin;     // jet phi cut
525   Float_t fJetPhiMax;     // jet phi cut
526
527   // di-jet cuts
528   Int_t   fDiJetCut;            // dijet cut selection
529   Float_t fDiJetDeltaPhiCut;    // delta phi cut value
530   Float_t fDiJetPtFractionCut;  // fraction of pt cut value
531   Float_t fDiJetCDFCut;         // cdf cut value
532
533   Int_t   fDiJetKindBins;       // type of bins: invmass, etleading, emean
534
535   Float_t fFFRadius;        // if radius > 0 construct FF from tracks within cone around jet axis, otherwise use trackRefs  
536   Float_t fFFBckgRadius;    // compute background outside cone of this radius around jet axes
537   Bool_t  fBckgMode;        // Set background subtraction mode
538   Int_t   fBckgType[5];     // Set background subtraction mode
539   Int_t   fIJMode;          // Set intrajet mode
540   Int_t   fQAMode;          // QA mode: 0x00=0 none, 0x01=1 track qa, 0x10=2 track qa, 0x11=3 both
541   Int_t   fFFMode;          // fragmentation function mode
542   Int_t   fDJMode;          // dijet mode: 0x00=0 none, 0x01=1 di-jet, 0x10=2 di-jet qa, 0x11=3 both
543   Int_t   fEffMode;         // efficiency mode
544   Int_t   fPhiCorrMode;     // track phi correlation mode
545
546   Bool_t  fUseRecEffRecJetPtBins;   // bin track reconstruction efficiency in reconstructed/generated jet pt bins 
547   Bool_t  fUseResponseRecJetPtBins; // bin track response matrix in reconstructed/generated jet pt bins 
548
549   Float_t fAvgTrials;       // average number of trials per event
550   
551   TList* fTracksRec;            //! reconstructed tracks
552   TList* fTracksRecCuts;        //! reconstructed tracks after cuts
553   TList* fTracksGen;            //! generated tracks 
554   TList* fTracksAODMCCharged;   //! AOD MC tracks 
555   TList* fTracksRecQualityCuts; //! reconstructed tracks after quality cuts, no acceptance/pt cut
556
557   
558   TList* fJetsRec;        //! jets from reconstructed tracks
559   TList* fJetsRecCuts;    //! jets from reonstructed tracks after jet cuts 
560   TList* fJetsGen;        //! jets from generated tracks
561   TList* fJetsRecEff;     //! jets used for reconstruction efficiency histos 
562   TList* fBckgJetsRec;      //! jets from reconstructed tracks
563   TList* fBckgJetsRecCuts;  //! jets from reonstructed tracks after jet cuts
564   TList* fBckgJetsGen;      //! jets from generated tracks
565  
566   
567   AliFragFuncQATrackHistos* fQATrackHistosRec;      //! track QA: reconstructed tracks
568   AliFragFuncQATrackHistos* fQATrackHistosRecCuts;  //! track QA: reconstructed tracks after cuts
569   AliFragFuncQATrackHistos* fQATrackHistosGen;      //! track QA: generated tracks
570   
571   AliFragFuncQAJetHistos*  fQAJetHistosRec;             //! jet QA: jets from reconstructed tracks
572   AliFragFuncQAJetHistos*  fQAJetHistosRecCuts;         //! jet QA: jets from reconstructed tracks after jet cuts 
573   AliFragFuncQAJetHistos*  fQAJetHistosRecCutsLeading;  //! jet QA: leading jet from reconstructed tracks after jet cuts 
574   AliFragFuncQAJetHistos*  fQAJetHistosGen;             //! jet QA: jets from generated tracks  
575   AliFragFuncQAJetHistos*  fQAJetHistosGenLeading;      //! jet QA: leading jet from generated tracks  
576   AliFragFuncQAJetHistos*  fQAJetHistosRecEffLeading;   //! jet QA: leading jet used for reconstruction efficiency histos  
577   
578
579   AliFragFuncHistos*  fFFHistosRecCuts;         //! FF reconstructed tracks after cuts 
580   AliFragFuncHistos*  fFFHistosRecLeading;      //! FF reconstructed tracks after cuts: all reconstructed tracks pt / leading track pt  
581   AliFragFuncHistos*  fFFHistosRecLeadingTrack; //! FF reconstructed tracks after cuts: leading track pt / jet pt
582   AliFragFuncHistos*  fFFHistosGen;             //! FF generated tracks after cuts 
583   AliFragFuncHistos*  fFFHistosGenLeading;      //! FF generated tracks after cuts: all generated tracks pt / leading track pt  
584   AliFragFuncHistos*  fFFHistosGenLeadingTrack; //! FF generated tracks after cuts: leading track pt / jet pt
585
586
587   AliFragFuncIntraJetHistos*  fIJHistosRecCuts;         //! IJ reconstructed tracks after cuts 
588   AliFragFuncIntraJetHistos*  fIJHistosRecLeading;      //! IJ reconstructed tracks after cuts: all reconstructed tracks pt / leading track pt  
589   AliFragFuncIntraJetHistos*  fIJHistosRecLeadingTrack; //! IJ reconstructed tracks after cuts: leading track pt / jet pt
590   AliFragFuncIntraJetHistos*  fIJHistosGen;             //! IJ generated tracks after cuts 
591   AliFragFuncIntraJetHistos*  fIJHistosGenLeading;      //! IJ generated tracks after cuts: all generated tracks pt / leading track pt  
592   AliFragFuncIntraJetHistos*  fIJHistosGenLeadingTrack; //! IJ generated tracks after cuts: leading track pt / jet pt
593
594   AliFragFuncDiJetHistos* fFFDiJetHistosRecCuts;         //! DiJet FF reconstructed tracks after cuts
595   AliFragFuncDiJetHistos* fFFDiJetHistosRecLeading;      //! DiJet FF reconstructed tracks after cuts: all reconstructed tracks pt / leading track pt
596   AliFragFuncDiJetHistos* fFFDiJetHistosRecLeadingTrack; //! DiJet FF reconstructed tracks after cuts: leading track pt / jet pt
597
598   AliFragFuncDiJetHistos* fFFDiJetHistosGen;             //! DiJet FF generated tracks after cuts 
599   AliFragFuncDiJetHistos* fFFDiJetHistosGenLeading;      //! DiJet FF generated tracks after cuts: all generated tracks pt / leading track pt 
600   AliFragFuncDiJetHistos* fFFDiJetHistosGenLeadingTrack; //! DiJet FF generated tracks after cuts: leading track pt / jet pt 
601
602   AliFragFuncQADiJetHistos* fQADiJetHistosRecCuts;       //! Dijet QA : reconstructed tracks after cuts
603   AliFragFuncQADiJetHistos* fQADiJetHistosGen;           //! DiJet QA: jets from generated tracks  
604
605   AliFragFuncQATrackHistos* fPhiCorrHistosJetArea;        //! tracks in area of leading jet (phi = phi_jet - phi_track, eta = eta_track)
606   AliFragFuncQATrackHistos* fPhiCorrHistosTransverseArea; //! tracks in area transverse region (shift of phi by 90�)
607   AliFragFuncQATrackHistos* fPhiCorrHistosAwayArea;       //! tracks in area in away region (shift of phi by 180�)
608
609   Float_t  fQATrackHighPtThreshold;       // track QA high transverse momentum threshold
610   
611   // histogram bins  
612
613   Int_t   fFFNBinsJetPt;    // FF histos bins
614   Float_t fFFJetPtMin;      // FF histos limits
615   Float_t fFFJetPtMax;      // FF histos limits
616
617   Int_t   fFFNBinsPt;       // FF histos bins
618   Float_t fFFPtMin;         // FF histos limits
619   Float_t fFFPtMax;         // FF histos limits
620
621   Int_t   fFFNBinsXi;       // FF histos bins
622   Float_t fFFXiMin;         // FF histos limits
623   Float_t fFFXiMax;         // FF histos limits
624
625   Int_t   fFFNBinsZ;        // FF histos bins
626   Float_t fFFZMin;          // FF histos limits
627   Float_t fFFZMax;          // FF histos limits
628
629   Int_t   fQAJetNBinsPt;    // jet QA histos bins
630   Float_t fQAJetPtMin;      // jet QA histos limits
631   Float_t fQAJetPtMax;      // jet QA histos limits
632   
633   Int_t   fQAJetNBinsEta;   // jet QA histos bins
634   Float_t fQAJetEtaMin;     // jet QA histos limits
635   Float_t fQAJetEtaMax;     // jet QA histos limits
636   
637   Int_t   fQAJetNBinsPhi;   // jet QA histos bins
638   Float_t fQAJetPhiMin;     // jet QA histos limits
639   Float_t fQAJetPhiMax;     // jet QA histos limits
640   
641   Int_t   fQATrackNBinsPt;  // track QA histos bins
642   Float_t fQATrackPtMin;    // track QA histos limits
643   Float_t fQATrackPtMax;    // track QA histos limits
644   
645   Int_t   fQATrackNBinsEta; // track QA histos bins
646   Float_t fQATrackEtaMin;   // track QA histos limits
647   Float_t fQATrackEtaMax;   // track QA histos limits
648   
649   Int_t   fQATrackNBinsPhi; // track QA histos bins
650   Float_t fQATrackPhiMin;   // track QA histos limits
651   Float_t fQATrackPhiMax;   // track QA histos limits
652   
653   Int_t   fIJNBinsJetPt;    // IJ histos bins
654   Float_t fIJJetPtMin;      // IJ histos limits
655   Float_t fIJJetPtMax;      // IJ histos limits
656
657   Int_t   fIJNBinsPt;       // IJ histos bins
658   Float_t fIJPtMin;         // IJ histos limits
659   Float_t fIJPtMax;         // IJ histos limits
660
661   Int_t   fIJNBinsZ;        // IJ histos bins
662   Float_t fIJZMin;          // IJ histos limits
663   Float_t fIJZMax;          // IJ histos limits
664
665   Int_t   fIJNBinsCosTheta; // IJ histos bins
666   Float_t fIJCosThetaMin;   // IJ histos limits
667   Float_t fIJCosThetaMax;   // IJ histos limits
668
669   Int_t   fIJNBinsTheta;    // IJ histos bins
670   Float_t fIJThetaMin;      // IJ histos limits
671   Float_t fIJThetaMax;      // IJ histos limits
672   
673   Int_t   fIJNBinsJt;       // IJ histos bins
674   Float_t fIJJtMin;         // IJ histos limits
675   Float_t fIJJtMax;         // IJ histos limits
676
677   Int_t   fDiJetNBinsJetInvMass; // FF dijet histos bins
678   Float_t fDiJetJetInvMassMin;   // FF dijet histos limits
679   Float_t fDiJetJetInvMassMax;   // FF dijet histos limits
680   Int_t   fDiJetNBinsJetPt;      // FF dijet histos bins
681   Float_t fDiJetJetPtMin;        // FF dijet histos limits
682   Float_t fDiJetJetPtMax;        // FF dijet histos limits
683   Int_t   fDiJetNBinsPt;         // FF dijet histos bins
684   Float_t fDiJetPtMin;           // FF dijet histos limits
685   Float_t fDiJetPtMax;           // FF dijet histos limits
686   Int_t   fDiJetNBinsXi;         // FF dijet histos bins
687   Float_t fDiJetXiMin;           // FF dijet histos limits
688   Float_t fDiJetXiMax;           // FF dijet histos limits
689   Int_t   fDiJetNBinsZ;          // FF dijet histos bins
690   Float_t fDiJetZMin;            // FF dijet histos limits
691   Float_t fDiJetZMax;            // FF dijet histos limits
692
693   Int_t   fQADiJetNBinsInvMass;  // dijet QA histos bins
694   Float_t fQADiJetInvMassMin;    // dijet QA histos limits
695   Float_t fQADiJetInvMassMax;    // dijet QA histos limits
696
697   Int_t   fQADiJetNBinsJetPt;    // dijet QA histos bins
698   Float_t fQADiJetJetPtMin;      // dijet QA histos limits
699   Float_t fQADiJetJetPtMax;      // dijet QA histos limits
700
701   Int_t   fQADiJetNBinsDeltaPhi; // dijet QA histos bins
702   Float_t fQADiJetDeltaPhiMin;   // dijet QA histos limits
703   Float_t fQADiJetDeltaPhiMax;   // dijet QA histos limits
704
705   Int_t   fQADiJetNBinsDeltaEta; // dijet QA histos bins
706   Float_t fQADiJetDeltaEtaMin;   // dijet QA histos limits
707   Float_t fQADiJetDeltaEtaMax;   // dijet QA histos limits
708
709   Int_t   fQADiJetNBinsDeltaPt;  // dijet QA histos bins
710   Float_t fQADiJetDeltaPtMin;    // dijet QA histos limits
711   Float_t fQADiJetDeltaPtMax;    // dijet QA histos limits
712
713   Int_t   fQADiJetNBinsInBal;  // dijet QA histos bins
714   Float_t fQADiJetInBalMin;    // dijet QA histos limits
715   Float_t fQADiJetInBalMax;    // dijet QA histos limits
716
717   // phi correlation
718   Int_t   fPhiCorrNBinsPt;  // track related to jet histos bins 
719   Float_t fPhiCorrPtMin;    // track related to jet histos limits
720   Float_t fPhiCorrPtMax;    // track related to jet histos limits
721   
722   Int_t   fPhiCorrNBinsEta; // track related to jet histos bins
723   Float_t fPhiCorrEtaMin;   // track related to jet histos limits
724   Float_t fPhiCorrEtaMax;   // track related to jet histos limits
725   
726   Int_t   fPhiCorrNBinsPhi; // track related to jet histos bins
727   Float_t fPhiCorrPhiMin;   // track related to jet histos limits
728   Float_t fPhiCorrPhiMax;   // track related to jet histos limits
729
730   // Histograms
731   TList *fCommonHistList;         // List of common histos
732   
733   TH1F  *fh1EvtSelection;         //! event cuts 
734   TH1F  *fh1VertexNContributors;  //! NContributors to prim vertex
735   TH1F  *fh1VertexZ;              //! prim vertex z distribution
736   TH1F  *fh1EvtMult;              //! number of reconstructed tracks after cuts 
737   TH1F  *fh1EvtCent;              //! centrality percentile 
738
739   TH2F  *fh2TrackPtVsDCAXY;       //! track pt vs DCA 
740   TH2F  *fh2TrackPtVsDCAZ;        //! track pt vs DCA
741
742
743   TProfile* fh1Xsec;              //! pythia cross section and trials
744   TH1F*     fh1Trials;            //! sum of trials
745   TH1F*     fh1PtHard;            //! pt hard of the event
746   TH1F*     fh1PtHardTrials;      //! pt hard of the event
747
748   TH1F  *fh1nRecJetsCuts;         //! number of jets from reconstructed tracks per event 
749   TH1F  *fh1nGenJets;             //! number of jets from generated tracks per event
750   TH1F  *fh1nRecEffJets;          //! number of jets for reconstruction eff per event
751   TH1F  *fh1nRecBckgJetsCuts;     //! number of jets from reconstructed tracks per event
752   TH1F  *fh1nGenBckgJets;         //! number of jets from generated tracks per event
753   TH2F  *fh2PtRecVsGenPrim;       //! association rec/gen MC: rec vs gen pt 
754
755   // tracking efficiency 
756   
757   AliFragFuncQATrackHistos* fQATrackHistosRecEffGen;      //! tracking efficiency: generated primaries 
758   AliFragFuncQATrackHistos* fQATrackHistosRecEffRec;      //! tracking efficiency: reconstructed primaries
759
760   AliFragFuncHistos*  fFFHistosRecEffGen;                 //! tracking efficiency: FF generated primaries  
761   AliFragFuncHistos*  fFFHistosRecEffRec;                 //! tracking efficiency: FF reconstructed primaries
762
763   // momentum resolution 
764   THnSparse* fhnResponseSinglePt;    //! single track response pt
765   THnSparse* fhnResponseJetTrackPt;  //! jet track response pt 
766   THnSparse* fhnResponseJetZ;        //! jet track response z 
767   THnSparse* fhnResponseJetXi;       //! jet track response xi
768
769
770   // Background
771   TH1F  *fh1OutLeadingMult;       //! background multiplicity outside leading jet
772   TH1F  *fh1OutLeadingStatMult;   //! background multiplicity outside leading jet (stat)
773   TH1F  *fh1PerpMult;             //! background multiplicity perpendicular to the leading jet
774   TH1F  *fh1ASideMult;            //! background multiplicity perpendicular to the leading jet
775   TH1F  *fh1ASideWindowMult;      //! background multiplicity perpendicular to the leading jet
776   TH1F  *fh1PerpWindowMult;       //! background multiplicity perpendicular to the leading jet
777   TH1F  *fh1Out2JetsMult;         //! background multiplicity outside 2 jets
778   TH1F  *fh1Out3JetsMult;         //! background multiplicity outside 3 jets
779   TH1F  *fh1MedianClustersMult;   //! background multiplicity median cluster
780   TH1F  *fh1OutClustersMult;      //! background multiplicity clusters outside leading jet
781
782   AliFragFuncQATrackHistos* fQABckgHisto0RecCuts;  //! track QA: reconstructed tracks after cuts
783   AliFragFuncQATrackHistos* fQABckgHisto0Gen;      //! track QA: generated tracks
784   AliFragFuncQATrackHistos* fQABckgHisto1RecCuts;  //! track QA: reconstructed tracks after cuts
785   AliFragFuncQATrackHistos* fQABckgHisto1Gen;      //! track QA: generated tracks
786   AliFragFuncQATrackHistos* fQABckgHisto2RecCuts;  //! track QA: reconstructed tracks after cuts
787   AliFragFuncQATrackHistos* fQABckgHisto2Gen;      //! track QA: generated tracks
788   AliFragFuncQATrackHistos* fQABckgHisto3RecCuts;  //! track QA: reconstructed tracks after cuts
789   AliFragFuncQATrackHistos* fQABckgHisto3Gen;      //! track QA: generated tracks
790   AliFragFuncQATrackHistos* fQABckgHisto4RecCuts;  //! track QA: reconstructed tracks after cuts
791   AliFragFuncQATrackHistos* fQABckgHisto4Gen;      //! track QA: generated tracks
792   
793   AliFragFuncHistos*  fFFBckgHisto0RecCuts;       //! Bckg (outside leading jet or 2 jets or more) FF reconstructed tracks after cuts 
794   AliFragFuncHistos*  fFFBckgHisto0RecLeading;    //! Bckg (outside leading jet or 2 jets or more) FF reconstructed tracks after cuts: all reconstructed tracks pt / leading track pt  
795   AliFragFuncHistos*  fFFBckgHisto0Gen;           //! Bckg (outside leading jet or 2 jets or more) FF generated tracks after cuts 
796   AliFragFuncHistos*  fFFBckgHisto0GenLeading;    //! Bckg (outside leading jet or 2 jets or more) FF reconstructed tracks after cuts: all reconstructed tracks pt / leading track pt  
797   AliFragFuncHistos*  fFFBckgHisto1RecCuts;       //! Bckg (outside leading jet or 2 jets or more) FF reconstructed tracks after cuts 
798   AliFragFuncHistos*  fFFBckgHisto1RecLeading;    //! Bckg (outside leading jet or 2 jets or more) FF reconstructed tracks after cuts: all reconstructed tracks pt / leading track pt  
799   AliFragFuncHistos*  fFFBckgHisto1Gen;           //! Bckg (outside leading jet or 2 jets or more) FF generated tracks after cuts 
800   AliFragFuncHistos*  fFFBckgHisto1GenLeading;    //! Bckg (outside leading jet or 2 jets or more) FF reconstructed tracks after cuts: all reconstructed tracks pt / leading track pt  
801   AliFragFuncHistos*  fFFBckgHisto2RecCuts;       //! Bckg (outside leading jet or 2 jets or more) FF reconstructed tracks after cuts 
802   AliFragFuncHistos*  fFFBckgHisto2RecLeading;    //! Bckg (outside leading jet or 2 jets or more) FF reconstructed tracks after cuts: all reconstructed tracks pt / leading track pt  
803   AliFragFuncHistos*  fFFBckgHisto2Gen;           //! Bckg (outside leading jet or 2 jets or more) FF generated tracks after cuts 
804   AliFragFuncHistos*  fFFBckgHisto2GenLeading;    //! Bckg (outside leading jet or 2 jets or more) FF reconstructed tracks after cuts: all reconstructed tracks pt / leading track pt  
805   AliFragFuncHistos*  fFFBckgHisto3RecCuts;       //! Bckg (outside leading jet or 3 jets or more) FF reconstructed tracks after cuts 
806   AliFragFuncHistos*  fFFBckgHisto3RecLeading;    //! Bckg (outside leading jet or 3 jets or more) FF reconstructed tracks after cuts: all reconstructed tracks pt / leading track pt  
807   AliFragFuncHistos*  fFFBckgHisto3Gen;           //! Bckg (outside leading jet or 3 jets or more) FF generated tracks after cuts 
808   AliFragFuncHistos*  fFFBckgHisto3GenLeading;    //! Bckg (outside leading jet or 3 jets or more) FF reconstructed tracks after cuts: all reconstructed tracks pt / leading track pt
809   AliFragFuncHistos*  fFFBckgHisto4RecCuts;       //! Bckg (outside leading jet or 4 jets or more) FF reconstructed tracks after cuts 
810   AliFragFuncHistos*  fFFBckgHisto4RecLeading;    //! Bckg (outside leading jet or 4 jets or more) FF reconstructed tracks after cuts: all reconstructed tracks pt / leading track pt  
811   AliFragFuncHistos*  fFFBckgHisto4Gen;           //! Bckg (outside leading jet or 4 jets or more) FF generated tracks after cuts 
812   AliFragFuncHistos*  fFFBckgHisto4GenLeading;    //! Bckg (outside leading jet or 4 jets or more) FF reconstructed tracks after cuts: all reconstructed tracks pt / leading track pt
813
814
815   AliFragFuncIntraJetHistos*  fIJBckgHisto0RecCuts;    //!
816   AliFragFuncIntraJetHistos*  fIJBckgHisto0RecLeading; //!
817   AliFragFuncIntraJetHistos*  fIJBckgHisto0Gen;        //!
818   AliFragFuncIntraJetHistos*  fIJBckgHisto0GenLeading; //!
819   AliFragFuncIntraJetHistos*  fIJBckgHisto1RecCuts;    //!
820   AliFragFuncIntraJetHistos*  fIJBckgHisto1RecLeading; //!
821   AliFragFuncIntraJetHistos*  fIJBckgHisto1Gen;        //!
822   AliFragFuncIntraJetHistos*  fIJBckgHisto1GenLeading; //!
823   AliFragFuncIntraJetHistos*  fIJBckgHisto2RecCuts;    //!
824   AliFragFuncIntraJetHistos*  fIJBckgHisto2RecLeading; //!
825   AliFragFuncIntraJetHistos*  fIJBckgHisto2Gen;        //!
826   AliFragFuncIntraJetHistos*  fIJBckgHisto2GenLeading; //!
827   AliFragFuncIntraJetHistos*  fIJBckgHisto3RecCuts;    //!
828   AliFragFuncIntraJetHistos*  fIJBckgHisto3RecLeading; //!
829   AliFragFuncIntraJetHistos*  fIJBckgHisto3Gen;        //!
830   AliFragFuncIntraJetHistos*  fIJBckgHisto3GenLeading; //!
831   AliFragFuncIntraJetHistos*  fIJBckgHisto4RecCuts;    //!
832   AliFragFuncIntraJetHistos*  fIJBckgHisto4RecLeading; //!
833   AliFragFuncIntraJetHistos*  fIJBckgHisto4Gen;        //!
834   AliFragFuncIntraJetHistos*  fIJBckgHisto4GenLeading; //!
835
836   TRandom3*                   fRandom;          // TRandom3 for background estimation 
837   Int_t                       fBckgSubMethod;   // Bckg method: 1 = leading jet excluded, 2 = 2 most energetic jets excluded        
838
839   ClassDef(AliAnalysisTaskFragmentationFunction, 10);
840 };
841
842 #endif