Changing to centrality dependent corrections
[u/mrichter/AliRoot.git] / ANALYSIS / TenderSupplies / AliTPCTenderSupply.h
1 #ifndef ALITPCTENDERSUPPLY_H
2 #define ALITPCTENDERSUPPLY_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 ////////////////////////////////////////////////////////////////////////
8 //                                                                    //
9 //  TPC tender, reapply pid on the fly                                //
10 //                                                                    //
11 ////////////////////////////////////////////////////////////////////////
12
13 #include <TString.h>
14
15 #include <AliTenderSupply.h>
16
17 class TObjArray;
18 class AliESDpid;
19 class AliSplineFit;
20 class AliGRPObject;
21 class TGraphErrors;
22 class AliAnalysisManager;
23 class TF1;
24
25 class AliTPCTenderSupply: public AliTenderSupply {
26   
27 public:
28   AliTPCTenderSupply();
29   AliTPCTenderSupply(const char *name, const AliTender *tender=NULL);
30   
31   virtual ~AliTPCTenderSupply(){;}
32
33   void SetGainCorrection(Bool_t gainCorr) {fGainCorrection=gainCorr;}
34   void SetAttachmentCorrection(Bool_t attCorr) {fAttachmentCorrection=attCorr;}
35   void SetDebugLevel(Int_t level)         {fDebugLevel=level;}
36   void SetMip(Double_t mip)               {fMip=mip;}
37   void SetResponseFunctions(TObjArray *arr) {fArrPidResponseMaster=arr;}
38   Double_t GetMultiplicityCorrectionMean(Double_t tpcMulti);
39   Double_t GetMultiplicityCorrectionSigma(Double_t tpcMulti);
40
41   void AddSpecificStorage(const char* cdbPath, const char* storage);
42
43   virtual void              Init();
44   virtual void              ProcessEvent();
45   
46 private:
47   AliESDpid          *fESDpid;         //! ESD pid object
48   AliSplineFit       *fGainNew;        //! New gain correction
49   AliSplineFit       *fGainOld;        //! Old gain correction
50   TGraphErrors       *fGainAttachment; //! new attachment correction
51
52   Bool_t fIsMC;                      //! if or not we have MC analysis
53   Bool_t fGainCorrection;            //  Perform gain correction
54   Bool_t fAttachmentCorrection;      //  Perform attachment correction
55   Bool_t fPcorrection;               //!Perform pressure correction
56   Bool_t fMultiCorrection;           //!Perform multiplicity correction
57   TObjArray *fArrPidResponseMaster;  //array with gain curves
58   TF1 *fMultiCorrMean;               //!multiplicity correction for mean
59   TF1 *fMultiCorrSigma;              //!multiplicity correction for resolution
60   TObjArray *fSpecificStorages;      //array with specific storages
61   
62   Int_t fDebugLevel;                 //debug level
63   Double_t fMip;                     //mip position
64   
65   AliGRPObject *fGRP;                //!GRP for pressure temperature correction
66
67   TString fBeamType;                 //! beam type (PP) or (PBPB)
68   TString fLHCperiod;                //! LHC period
69   TString fMCperiod;                 //! corresponding MC period to use for the splines
70   Int_t   fRecoPass;                 //! reconstruction pass
71
72   void SetSplines();
73   Double_t GetGainCorrection();
74
75   Double_t GetTPCMultiplicityBin();
76
77   void SetBeamType();
78   
79   void SetParametrisation();
80   void SetRecoInfo();
81   
82   AliTPCTenderSupply(const AliTPCTenderSupply&c);
83   AliTPCTenderSupply& operator= (const AliTPCTenderSupply&c);
84   
85   ClassDef(AliTPCTenderSupply, 2);  // TPC tender task
86 };
87
88
89 #endif
90