]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ANALYSIS/AliAnalysisTaskPIDResponse.h
TPC PID update:
[u/mrichter/AliRoot.git] / ANALYSIS / AliAnalysisTaskPIDResponse.h
1 #ifndef ALIANALYSISTASKPIDRESPONSE_H
2 #define ALIANALYSISTASKPIDRESPONSE_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /* $Id: AliAnalysisTaskPIDResponse.h 43642 2010-09-17 15:50:04Z wiechula $ */
8 // Author: Jens Wiechula, 24/02/2011
9
10 //==============================================================================
11 //
12 //
13 //
14 //
15 //==============================================================================
16
17 #include <TVectorDfwd.h>
18 #include <TString.h>
19
20 #ifndef ALIANALYSISTASKSE_H
21 #include "AliAnalysisTaskSE.h"
22 #endif
23
24 class AliPIDResponse;
25 class AliVEvent;
26
27 class AliAnalysisTaskPIDResponse : public AliAnalysisTaskSE {
28   
29   
30 public:
31   AliAnalysisTaskPIDResponse();
32   AliAnalysisTaskPIDResponse(const char *name);
33   virtual ~AliAnalysisTaskPIDResponse();
34
35   void SetIsMC(Bool_t isMC=kTRUE)   { fIsMC=isMC; }
36   void SetCachePID(Bool_t cachePID) { fCachePID=cachePID; }
37   Bool_t GetCachePID() const { return fCachePID; }
38   
39   virtual void UserCreateOutputObjects();
40   
41   virtual void UserExec(Option_t */*option*/);
42
43   void SetOADBPath(const char* path) {fOADBPath=path;}
44   const char* GetOADBPath() const { return fOADBPath.Data(); }
45   void SetTuneOnData(Bool_t flag,Int_t recopass){fIsTunedOnData=flag;fRecoPassTuned=recopass;};
46   
47   void SetUseTPCEtaCorrection(Bool_t useTPCEtaCorrection) { fUseTPCEtaCorrection = useTPCEtaCorrection; };
48   Bool_t UseTPCEtaCorrection() const { return fUseTPCEtaCorrection; };
49
50   void SetSpecialDetectorResponse(const char* det) { fSpecialDetResponse=det; }
51
52 private:
53   Bool_t fIsMC;                        // If we run on MC data
54   Bool_t fCachePID;                    // Cache PID values in transient object
55   TString fOADBPath;                   // OADB path to use
56   TString fSpecialDetResponse;         // Special detector response files for debugging
57   
58   AliPIDResponse *fPIDResponse;        //! PID response Handler
59   Int_t   fRun;                        //! current run number
60   Int_t   fOldRun;                     //! current run number
61   Int_t   fRecoPass;                   //! reconstruction pass
62
63   Bool_t  fIsTunedOnData;              // flag to tune MC on data (dE/dx)
64   Int_t   fRecoPassTuned;              // Reco pass tuned on data for MC
65   
66   Bool_t  fUseTPCEtaCorrection;        //! Use TPC eta correction
67   
68   //
69   void SetRecoInfo();
70     
71   AliAnalysisTaskPIDResponse(const AliAnalysisTaskPIDResponse &other);
72   AliAnalysisTaskPIDResponse& operator=(const AliAnalysisTaskPIDResponse &other);
73   
74   ClassDef(AliAnalysisTaskPIDResponse,4)  // Task to properly set the PID response functions of all detectors
75 };
76 #endif