switch to fill only events added
[u/mrichter/AliRoot.git] / ANALYSIS / AliAnalysisTaskPIDCombined.h
1 #ifndef ALIPIDCOMBINEDTASK_H
2 #define ALIPIDCOMBINEDTASK_H
3 /* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 //#########################################################
7 //#                                                       # 
8 //#        Task for testing the combined PID              #
9 //#                                                       #
10 //#  Pietro Antonioli, INFN / Pietro.Antonioli@bo.infn.it #
11 //#  Jens Wiechula, Uni Tübingen / Jens.Wiechula@cern.ch  #
12 //#                                                       #
13 //#########################################################
14
15 #include <AliPID.h>
16 #include <AliPIDResponse.h>
17 #include <AliPIDCombined.h>
18
19 #include <AliESDtrackCuts.h>
20 #include <AliAnalysisFilter.h>
21
22 #include "AliAnalysisTaskSE.h"
23
24 class TH1F;
25 class TH2D;
26 class fPIDResponse;
27 class fPIDCombined;
28
29 class AliAnalysisTaskPIDCombined : public AliAnalysisTaskSE {
30   
31 public:
32   static const Int_t kPtBins = 6;
33
34
35   AliAnalysisTaskPIDCombined();
36   AliAnalysisTaskPIDCombined(const char *name);
37   virtual ~AliAnalysisTaskPIDCombined(){;}
38   
39   virtual void  UserExec(Option_t *option);
40   virtual void  UserCreateOutputObjects();
41     
42
43 private:
44
45   TList fHistList;                   //! list of histograms
46   TH2D *fProbTPCnSigma[AliPID::kSPECIES];    //! probabilities vs nSigma in the TPC
47   TH2D *fProbTOFnSigma[AliPID::kSPECIES];    //! probabilities vs nSigma  the TOF
48   TH2D *fProbTPCTOFnSigmaTPC[AliPID::kSPECIES];    //! comb. probabilities vs nSigma TPC
49   TH2D *fProbTPC[AliPID::kSPECIES];          //! probabilities vs mom in the TPC
50   TH2D *fProbTOF[AliPID::kSPECIES];          //! probabilities vs mom in the TOF
51   TH2D *fProbTPCTOF[AliPID::kSPECIES];       //! combined probabilities vs mom TPC-TOF
52   TH1F *fPriors[AliPID::kSPECIES];           //! priors
53
54   TH2D *fProbTPCTOFnSigTPCMom[kPtBins][AliPID::kSPECIES];  // prob. x mom. bins
55   TH2D *fProbTPCnSigTPCMom[kPtBins][AliPID::kSPECIES];     // prob. x mom. bins
56   TH2D *fProbTOFnSigTOFMom[kPtBins][AliPID::kSPECIES];     // prob. x mom. bins
57
58   TH2D *fPriorsUsed[AliPID::kSPECIES];       //! priors used
59
60   const AliPIDResponse *fPIDResponse;     //! PID response object
61   AliPIDCombined       *fPIDCombined;     //! combined PID object
62   AliESDtrackCuts      *fTrackCuts;            //! track selection
63   AliAnalysisFilter    *fTrackFilter;         //! track filter
64
65   TH2D *fDeDx;                              //! histo with the dedx
66   TH2D *fDeDxTuned;                         //! histo to check the dedx tuning in MC
67
68
69   AliAnalysisTaskPIDCombined(const AliAnalysisTaskPIDCombined &c);
70   AliAnalysisTaskPIDCombined& operator= (const AliAnalysisTaskPIDCombined &c);
71
72   void FillHistogram(const char* name, Double_t x, Double_t weight=1.);
73   void FillHistogram(const char* name, Double_t x, Double_t y, Double_t weight=1.);
74   Int_t GetMomBin(Float_t mom);
75   static const char* fgkBinMomDesc[kPtBins];
76   
77   ClassDef(AliAnalysisTaskPIDCombined, 2);
78 };
79 #endif