]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ANALYSIS/AliAnalysisTaskPIDResponse.h
Add a protection to avoid crash in QA (Julian)
[u/mrichter/AliRoot.git] / ANALYSIS / AliAnalysisTaskPIDResponse.h
index e0c028bf54d4703685b2eae9de32234ae6326af9..ce2a0b38ed34f2e762bc76eb41a0074aa6414a71 100644 (file)
 //==============================================================================
 
 #include <TVectorDfwd.h>
+#include <TString.h>
 
 #ifndef ALIANALYSISTASKSE_H
 #include "AliAnalysisTaskSE.h"
 #endif
 
 class AliPIDResponse;
-class TList;
+class AliVEvent;
 
 class AliAnalysisTaskPIDResponse : public AliAnalysisTaskSE {
   
@@ -31,72 +32,45 @@ public:
   AliAnalysisTaskPIDResponse(const char *name);
   virtual ~AliAnalysisTaskPIDResponse();
 
-  void SetIsMC(Bool_t isMC=kTRUE) { fIsMC=isMC; }
+  void SetIsMC(Bool_t isMC=kTRUE)   { fIsMC=isMC; }
+  void SetCachePID(Bool_t cachePID) { fCachePID=cachePID; }
+  Bool_t GetCachePID() const { return fCachePID; }
   
   virtual void UserCreateOutputObjects();
   
   virtual void UserExec(Option_t */*option*/);
 
-  void SetTOFTimeZeroType(Int_t type) { fTOFTimeZeroTypeUser=type; }
-  void SetTOFres(Float_t res)         { fTOFres=res;               }
+  void SetOADBPath(const char* path) {fOADBPath=path;}
+  const char* GetOADBPath() const { return fOADBPath.Data(); }
+  void SetTuneOnData(Bool_t flag,Int_t recopass){fIsTunedOnData=flag;fRecoPassTuned=recopass;};
   
-private:
-  Bool_t fIsMC;                        //  If we run on MC data
+  void SetUseTPCEtaCorrection(Bool_t useTPCEtaCorrection) { fUseTPCEtaCorrection = useTPCEtaCorrection; };
+  Bool_t UseTPCEtaCorrection() const { return fUseTPCEtaCorrection; };
+
+  void SetSpecialDetectorResponse(const char* det) { fSpecialDetResponse=det; }
 
-  Int_t   fTOFTimeZeroTypeUser;        //  start time type for tof (ESD)
-  Int_t   fTOFTimeZeroType;            //! default start time type for tof (ESD)
-  Float_t fTOFres;                     //  TOF resolution
+private:
+  Bool_t fIsMC;                        // If we run on MC data
+  Bool_t fCachePID;                    // Cache PID values in transient object
+  TString fOADBPath;                   // OADB path to use
+  TString fSpecialDetResponse;         // Special detector response files for debugging
   
   AliPIDResponse *fPIDResponse;        //! PID response Handler
-  TList                 *fListQA;      //! list with all QA objects
-  TList                 *fListQAits;   //! List with ITS QA objects
-  TList                 *fListQAtpc;   //! List with TPC QA objects
-  TList                 *fListQAtrd;   //! List with TRD QA objects
-  TList                 *fListQAtof;   //! List with TOF QA objects
-
-  TString fBeamType;                   //! beam type (PP) or (PBPB)
-  TString fLHCperiod;                  //! LHC period
-  TString fMCperiodTPC;                //! corresponding MC period to use for the TPC splines
-  Int_t   fRecoPass;                   //! reconstruction pass
   Int_t   fRun;                        //! current run number
   Int_t   fOldRun;                     //! current run number
-  
-  TObjArray *fArrPidResponseMaster;    //  TPC pid splines
-
-  void ExecNewRun();
-
-  //qa object initialisation
-  void SetupTTSqa();
-  void SetupTPCqa();
-  void SetupTRDqa();
-  void SetupTOFqa();
+  Int_t   fRecoPass;                   //! reconstruction pass
 
-  //
-  void FillITSqa();
-  void FillTPCqa();
-  void FillTOFqa();
+  Bool_t  fIsTunedOnData;              // flag to tune MC on data (dE/dx)
+  Int_t   fRecoPassTuned;              // Reco pass tuned on data for MC
+  
+  Bool_t  fUseTPCEtaCorrection;        //! Use TPC eta correction
   
-  //
-  //setup parametrisations
-  //
-  void SetITSParametrisation();
-
-  //TPC
-  void SetTPCPidResponseMaster();
-  void SetTPCParametrisation();
-
   //
   void SetRecoInfo();
-  
-  //helper functions
-  TVectorD* MakeLogBinning(Int_t nbinsX, Double_t xmin, Double_t xmax);
-  TVectorD* MakeLinBinning(Int_t nbinsX, Double_t xmin, Double_t xmax);
-  TVectorD* MakeArbitraryBinning(const char* bins);
-  
-  
+    
   AliAnalysisTaskPIDResponse(const AliAnalysisTaskPIDResponse &other);
   AliAnalysisTaskPIDResponse& operator=(const AliAnalysisTaskPIDResponse &other);
   
-  ClassDef(AliAnalysisTaskPIDResponse,1)  // Task to properly set the PID response functions of all detectors
+  ClassDef(AliAnalysisTaskPIDResponse,4)  // Task to properly set the PID response functions of all detectors
 };
 #endif