Taking into account that only 1 or 2 values may be present for the
[u/mrichter/AliRoot.git] / PWG2 / SPECTRA / AliAnalysisTaskESDDedx.h
1 #ifndef AliAnalysisTaskESDDedx_cxx
2 #define AliAnalysisTaskESDDedx_cxx
3
4 /*  See cxx source for full Copyright notice */
5
6 //-----------------------------------------------------------------
7 //                 AliAnalysisTaskESDDedx class
8 //            This task is for QAing the dE/dx from the ESD
9 //              Origin: B.H. Nov2007, hippolyt@in2p3.fr
10 //-----------------------------------------------------------------
11
12 class TList;
13 class TH1F;
14 class TH2F;
15 class AliESDEvent;
16
17 #include "AliAnalysisTask.h"
18
19 class AliAnalysisTaskESDDedx : public AliAnalysisTask {
20  public:
21   AliAnalysisTaskESDDedx(const char    *rName = "AliAnalysisTaskESDDedx",
22                          const Bool_t   rAllConstrainedFlag     = kFALSE,
23                          const Bool_t   rMidPseudoRapidityFlag  = kFALSE,
24                          const Bool_t   rSelTrackRemoveKink     = kTRUE,
25                          const Bool_t   rSelTrackWithOnTheFlyV0 = kFALSE,
26                          const Int_t    rSelTrackMinClustersTPC = 50,
27                          const Int_t    rSelTrackMinClustersITS =  0,
28                          const Float_t  rSelTrackMaxChi2PerClusterTPC = 3.5,
29                          const Float_t  rSelTrackMaxChi2PerClusterITS = 10,
30                          const Double_t rSelTrackMaxCov11 = 2.0,
31                          const Double_t rSelTrackMaxCov22 = 2.0,
32                          const Double_t rSelTrackMaxCov33 = 0.5,
33                          const Double_t rSelTrackMaxCov44 = 0.5,
34                          const Double_t rSelTrackMaxCov55 = 2.0,
35                          const Double_t rSelV0MaxDcaDaughters = 0.5,
36                          const Double_t rSelV0MinDecayLength  = 0.0);
37
38   virtual ~AliAnalysisTaskESDDedx() {}
39   
40   virtual void   ConnectInputData(Option_t *);
41   virtual void   CreateOutputObjects();
42   virtual void   Exec(Option_t *option);
43   virtual void   Terminate(Option_t *);
44   
45  private:
46
47   Bool_t         IsAccepted(AliESDtrack *track);
48   //  Float_t        GetSigmaToVertex(AliESDtrack* esdTrack);
49
50   AliESDEvent *fESD;                                //! ESD object
51   TList       *fListHist;                           //! List of histograms
52   TH1F        *fHistPtot;                           //! Ptot spectrum
53
54   TH1F        *fHistMultiplicity;                   //! Multiplicity distribution
55   TH2F        *fHistTPCDedxVsMomentum;              //! TPC dE/dx vs momemtum
56   TH2F        *fHistITSDedxVsMomentum;              //! ITS dE/dx vs momemtum
57   TH1F        *fHistMassK0;                         //! Invariant Mass of K0s
58   TH1F        *fHistMassLambda;                     //! Invariant Mass of Lambda
59   TH1F        *fHistMassAntiLambda;                 //! Invariant Mass of Anti-Lambda
60   TH2F        *fHistTPCDedxVsMomPosK0;              //! TPC dE/dx vs momemtum for K0 positive daughter
61   TH2F        *fHistTPCDedxVsMomNegK0;              //! TPC dE/dx vs momemtum for K0 negative daughter
62   TH2F        *fHistTPCDedxVsMomPosLambda;          //! TPC dE/dx vs momemtum for Lambda positive daughter
63   TH2F        *fHistTPCDedxVsMomNegLambda;          //! TPC dE/dx vs momemtum for Lambda negative daughter
64   TH2F        *fHistTPCDedxVsMomPosAntiLambda;      //! TPC dE/dx vs momemtum for Anti-Lambda positive daughter
65   TH2F        *fHistTPCDedxVsMomNegAntiLambda;      //! TPC dE/dx vs momemtum for Anti-Lambda negative daughter
66   TH1F        *fHistDiffInOutMomentum;              //! Difference between inner and outer TPC momenta
67   TH1F        *fHistDiffPrimOutMomentum;            //! Difference between primary and outer TPC momenta
68   TH1F        *fHistDiffPrimMeanMomentum;           //! Difference between primary and (inner+outer)/2 TPC momenta
69   TH1F        *fHistPercPrimMeanMomentum;           //! Percentage between primary and (inner+outer)/2 TPC momenta
70   TH1F        *fHistPrimEta;                        //! Pseudorapidity distribution
71   TH2F        *fHistPercPrimMeanMomentumVsEta;      //! Same as fHistDiffPrimMeanMomentum but vs pseudorapidity
72   TH2F        *fHistPercPrimMeanMomentumVsPrim;     //! Same as fHistDiffPrimMeanMomentum but vs primary momentum
73           
74   TH1F        *fHistMultiplicityCuts;               //! Same as above but once primary track cuts applied
75   TH2F        *fHistTPCDedxVsMomentumCuts;          //!
76   TH2F        *fHistITSDedxVsMomentumCuts;          //!
77   TH1F        *fHistMassK0Cuts;                     //!
78   TH1F        *fHistMassLambdaCuts;                 //!
79   TH1F        *fHistMassAntiLambdaCuts;             //!
80   TH2F        *fHistTPCDedxVsMomPosK0Cuts;          //!
81   TH2F        *fHistTPCDedxVsMomNegK0Cuts;          //!
82   TH2F        *fHistTPCDedxVsMomPosLambdaCuts;      //!
83   TH2F        *fHistTPCDedxVsMomNegLambdaCuts;      //!
84   TH2F        *fHistTPCDedxVsMomPosAntiLambdaCuts;  //!
85   TH2F        *fHistTPCDedxVsMomNegAntiLambdaCuts;  //!
86   TH1F        *fHistDiffInOutMomentumCuts;          //!
87   TH1F        *fHistDiffPrimOutMomentumCuts;        //!
88   TH1F        *fHistDiffPrimMeanMomentumCuts;       //!
89   TH1F        *fHistPercPrimMeanMomentumCuts;       //!
90   TH1F        *fHistPrimEtaCuts;                    //!
91   TH2F        *fHistPercPrimMeanMomentumVsEtaCuts;  //!
92   TH2F        *fHistPercPrimMeanMomentumVsPrimCuts; //!
93
94   Bool_t       fAllConstrainedFlag;                 // Primary vertex constrain requirement
95   Bool_t       fMidPseudoRapidityFlag;              // Mid-eta requirement
96
97                                                     // Track selections: streaming allowed and needed !
98   Bool_t       fSelTrackRemoveKink;                 // Remove kink candidates
99   Bool_t       fSelTrackWithOnTheFlyV0;             // Select daughter tracks from on-the-fly V0s
100   Int_t        fSelTrackMinClustersTPC;             // Minimum number of cluster in the TPC
101   Int_t        fSelTrackMinClustersITS;             // Minimum number of cluster in the ITS
102   Float_t      fSelTrackMaxChi2PerClusterTPC;       // Maximum chisq per cluster in the TPC
103   Float_t      fSelTrackMaxChi2PerClusterITS;       // Maximum chisq per cluster in the ITS
104   Double_t     fSelTrackMaxCov11;                   // Maximum value for cov.mat. diag. element
105   Double_t     fSelTrackMaxCov22;                   // Maximum value for cov.mat. diag. element
106   Double_t     fSelTrackMaxCov33;                   // Maximum value for cov.mat. diag. element
107   Double_t     fSelTrackMaxCov44;                   // Maximum value for cov.mat. diag. element
108   Double_t     fSelTrackMaxCov55;                   // Maximum value for cov.mat. diag. element
109   Double_t     fSelV0MaxDcaDaughters;               // Maximum value for DCA between V0 daughter tracks
110   Double_t     fSelV0MinDecayLength;                // Minimum value for V0 decay length
111
112   AliAnalysisTaskESDDedx(const AliAnalysisTaskESDDedx&);            // not implemented
113   AliAnalysisTaskESDDedx& operator=(const AliAnalysisTaskESDDedx&); // not implemented
114   
115   ClassDef(AliAnalysisTaskESDDedx, 1);
116 };
117
118 #endif