]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/SPECTRA/PiKaPr/TPCTOFpA/AliAnalysisTPCTOFpA.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / PiKaPr / TPCTOFpA / AliAnalysisTPCTOFpA.h
1 #ifndef ALIANALYSISTPCTOFPA_H
2 #define ALIANALYSISTPCTOFPA_H
3
4 //////////////////////////////////////////////////////////////////////////////
5 //                                                                          //
6 // This analysis extracts pT-spectra of charged kaons, protons, and pions.  //
7 // It is based on particles identifation via the dE/dx signal of the TPC.   //
8 //                                                                          //
9 //////////////////////////////////////////////////////////////////////////////
10
11 class TH1;
12 class TH1F;
13 class TH2D;
14 class TH3D;
15 class TList;
16 class TObjArray;
17 class AliESDEvent;
18 class AliESDtrack;
19 class AliESDtrackCuts;
20 class AliHeader;
21 class AliESDpid;
22
23
24 #include "AliAnalysisTaskSE.h"
25 #include "THnSparse.h"
26
27 class AliAnalysisTPCTOFpA : public AliAnalysisTaskSE {
28  public:
29   AliAnalysisTPCTOFpA(const char *name);
30   AliAnalysisTPCTOFpA();
31   virtual ~AliAnalysisTPCTOFpA() {}
32   //
33   virtual void   UserCreateOutputObjects();
34   virtual void   UserExec(Option_t *option);
35   virtual void   Terminate(Option_t *);
36   //
37   Bool_t         SelectOnImpPar(AliESDtrack* t);
38   //
39   void           SetESDtrackCuts(AliESDtrackCuts * trackCuts){fESDtrackCuts = trackCuts;};
40   void           SetAlephParameters(const Double_t * parameters){for(Int_t j=0;j<5;j++) fAlephParameters[j] = parameters[j]; Initialize();};
41   void           SetIsMCtrue(Bool_t isMCdata = kTRUE){fMCtrue = isMCdata;};
42   void           SetUseHBTmultiplicity(Bool_t useHBTmultiplicity = kTRUE){fUseHBTmultiplicity = useHBTmultiplicity;};
43   void           SetUseTPConlyTracks(Bool_t useTPConlyTracks = kTRUE){fUseTPConlyTracks = useTPConlyTracks;};
44   void           SetSaveMotherPDG(Bool_t saveMotherPDG =kTRUE){fSaveMotherPDG = saveMotherPDG;};
45   void           SetSmallTHnSparse(Bool_t smallTHnSparse = kTRUE) {fSmallTHnSparse = smallTHnSparse;};
46   void           SetTPCnSigmaCuts(Double_t nSigmaTPCLow = -3., Double_t nSigmaTPCHigh = 3.){fTPCnSigmaCutLow = nSigmaTPCLow; fTPCnSigmaCutHigh = nSigmaTPCHigh;};
47   void           SetRapidityCuts(Double_t rapidityLow = 0., Double_t rapidityHigh = 0.5){fRapidityCutLow = rapidityLow; fRapidityCutHigh = rapidityHigh;};
48   void           SetEvenDCAbinning(Bool_t EvenDCAbinning = kTRUE) {fEvenDCAbinning = EvenDCAbinning;};
49   void           SetIspA(Bool_t ispA = kTRUE) {fIspA = ispA;};
50   void           SetRapCMS(Bool_t rapCMS = kTRUE) {fRapCMS = rapCMS;};
51   void           SetCentEst(TString centEst = "V0M") {fCentEst = centEst.Data();};
52   void           SetTOFmisMatch(Int_t TOFmisMatch = 2) {fTOFmisMatch = TOFmisMatch;};
53   void           SetTOFwindow(Double_t TOFwindow = 10.) {fTOFwindow = TOFwindow;};
54   void           SetCrossedRows(Double_t crossedRows = 70.) {fCrossedRows = crossedRows;};
55   void           SetRatioRowsClusters(Double_t ratioRowsClusters = 0.8) {fRatioRowsClusters = ratioRowsClusters;};
56   void           SetTRDinReject(Bool_t TRDinReject = kFALSE) {fTRDinReject = TRDinReject;};
57   void           SetDCAzCut(Double_t dcaZcut = 2.){fDCAzCut = dcaZcut;};
58   void           Initialize();
59   //
60   
61  private:
62   //
63   void  BinLogAxis(const TH1 *h);
64   Int_t GetPythiaEventProcessType(const AliHeader* aHeader, const Bool_t adebug = kFALSE) const;
65   //
66   AliESDEvent *fESD;                   //! ESD object
67   TList       *fListHist;              //! list for histograms
68   //
69   AliESDtrackCuts * fESDtrackCuts;     // basic cut variables
70   AliESDtrackCuts * fESDTrackCutsMult; // cuts for the MULTIPLICITY DETERMINATION
71   AliESDpid       * fESDpid;           // basic TPC object for n-sigma cuts
72   Bool_t        fMCtrue;               // flag if real data or MC is processed
73   Bool_t        fOnlyQA;               // flag if only QA histograms should be filled
74   Bool_t        fUseHBTmultiplicity;   // flag if multiplicity determination should be done as in the HBT paper
75   Bool_t        fUseTPConlyTracks;     // flag if TPConly-track should be used
76   Bool_t        fSaveMotherPDG;        // flag if PDG of mother should be saved (weak decays)
77   Bool_t        fSmallTHnSparse;       // flag if to do cuts on TPC n-sigma and rapidity in task or not
78   Bool_t        fIspA;                 // flag for pA analysis                                                               
79   Bool_t        fRapCMS;               // flag if rapitidy should be shifted by 0.465 do have rap in CMS of pPb
80   TString       fCentEst;              // string which contains the string for the centrality estimator
81   Int_t         fTOFmisMatch;          // switch for how tof mismatch should be handled. possible options 0,1,2
82   Bool_t        fTRDinReject;          // flag to reject all tracks with TRDin flag set
83   Double_t      fTOFwindow;            // set cut on dx and dz TOF window
84   Double_t      fDCAzCut;              // set cut on DCA z -standard is 2cm
85   Double_t      fCrossedRows;          // min. number of crossed rows for track cuts
86   Double_t      fRatioRowsClusters;    // ratio of findable clusters over crossed rows
87   Double_t      fTPCnSigmaCutLow;      // low border for TPC n-sigma cut
88   Double_t      fTPCnSigmaCutHigh;     // high border for TPC n-sigma cut
89   Double_t      fRapidityCutLow;       // low border for rapidity cut
90   Double_t      fRapidityCutHigh;      // high border for rapidity cut
91   Double_t      fEvenDCAbinning;       // same bin width for all bins in DCA xy
92   Double_t      fAlephParameters[5];   // Aleph Parameters for Bethe-Bloch
93
94   //
95   //
96   //
97   THnSparseF * fHistRealTracks;        //! histogram with all necessary information for real tracks
98   THnSparseF * fHistMCparticles;       //! histogram with all necessary information for MC particles
99   //
100   TH3D       * fHistPidQA;             //! histogram for the QA of the PID
101   TH2D       * fHistMult;              //! control histogram for multiplicity
102   TH1D       * fHistCentrality;        //! control histogram for centrality
103   TH2D       * fHistTOFwindow;         //! control histogram for TOF window
104   //
105   AliAnalysisTPCTOFpA(const AliAnalysisTPCTOFpA&); 
106   AliAnalysisTPCTOFpA& operator=(const AliAnalysisTPCTOFpA&); 
107
108   ClassDef(AliAnalysisTPCTOFpA, 1); 
109 };
110
111 #endif