PWG2/SPECTRA -> PWGLF/SPECTRA migration
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / PiKaPr / TPC / pp900 / AliAnalysisTaskChargedHadronSpectra.h
CommitLineData
635c8b48 1#ifndef ALIANALYSISTASKCHARGEDHADRONSPECTRA_H
2#define ALIANALYSISTASKCHARGEDHADRONSPECTRA_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
11class TH1;
12class TH1F;
13class TH2F;
14class TH3F;
15class TList;
16class TObjArray;
17class AliESDEvent;
18class AliESDtrack;
19class AliESDtrackCuts;
20class AliHeader;
10d100d4 21class AliESDpid;
635c8b48 22
23
24#include "AliAnalysisTaskSE.h"
3c038b30 25#include "THnSparse.h"
635c8b48 26
27class AliAnalysisTaskChargedHadronSpectra : public AliAnalysisTaskSE {
28 public:
29 AliAnalysisTaskChargedHadronSpectra(const char *name);
30 AliAnalysisTaskChargedHadronSpectra();
31 virtual ~AliAnalysisTaskChargedHadronSpectra() {}
32 //
c77fc043 33 virtual void UserCreateOutputObjects();
34 virtual void UserExec(Option_t *option);
635c8b48 35 virtual void Terminate(Option_t *);
36 //
3c038b30 37 Bool_t SelectOnImpPar(AliESDtrack* t);
38 //
635c8b48 39 void SetESDtrackCuts(AliESDtrackCuts * trackCuts){fESDtrackCuts = trackCuts;};
3c038b30 40 void SetAlephParameters(const Double_t * parameters){for(Int_t j=0;j<5;j++) fAlephParameters[j] = parameters[j]; Initialize();};
635c8b48 41 void SetIsMCtrue(Bool_t isMCdata = kTRUE){fMCtrue = isMCdata;};
3c038b30 42 void SetTrackingMode(Int_t trackingMode = 0){fTrackingMode = trackingMode; Initialize();};
43 void Initialize();
635c8b48 44 //
3c038b30 45 static TH1D * AnalyseClassicProton(const TH3F * input, Int_t EtaBinLow,Int_t EtaBinHigh, const Double_t * AlephParams);
46 static TH1D * AnalyseClassicPion(const TH3F * input, Int_t EtaBinLow, Int_t EtaBinHigh, const Double_t * AlephParams);
47 static TH1D * AnalyseClassicKaon(const TH3F * input, Int_t EtaBinLow, Int_t EtaBinHigh, const Double_t * AlephParams);
635c8b48 48 //
49 static void Postprocess(const TList * ListOfHistogramsMC,const TList * ListOfHistogramsData, const Char_t *filename);
50
51 private:
52 //
53 void BinLogX(const TH1 *h);
54 Int_t GetPythiaEventProcessType(const AliHeader* aHeader, const Bool_t adebug = kFALSE) const;
55 //
56 AliESDEvent *fESD; //! ESD object
c77fc043 57 TList *fListHist; //! list for histograms
635c8b48 58 //
3c038b30 59 AliESDtrackCuts * fESDtrackCuts; // basic cut variables
60 AliESDpid * fESDpid; // basic TPC object for n-sigma cuts
635c8b48 61 Bool_t fMCtrue; // flag if real data or MC is processed
3c038b30 62 Int_t fTrackingMode; // flag which traking mode should be used: 0: TPC only, 1: global tracking
635c8b48 63 Double_t fAlephParameters[5]; // Aleph Parameters for Bethe-Bloch
64 //
65 // MC histogram
66 //
c77fc043 67 TH3F *fHistPtMCKaon; //! (mult,eta,pT) for Kaons MC truth; neg. x-axis for neg. particles, pos. x-axis for pos. particles
68 TH3F *fHistPtMCProton; //! (mult,eta,pT) for Protons MC truth; neg. x-axis for neg. particles, pos. x-axis for pos. particles
69 TH3F *fHistPtMCPion; //! (mult,eta,pT) for Pions MC truth; neg. x-axis for neg. particles, pos. x-axis for pos. particles
635c8b48 70
71 // reconstructed particle histograms
c77fc043 72 TH3F *fHistPtEtaKaon; //! (mult,eta,pT) for Kaons; neg. x-axis for neg. particles, pos. x-axis for pos. particles
73 TH3F *fHistPtEtaKaonNoKink; //! (mult,eta,pT) for Kaons withou accepting the Kink mother; neg. x-axis for neg. particles, pos. x-axis for pos. particles
74 TH3F *fHistPtEtaProton; //! (mult,eta,pT) for Protons; neg. x-axis for neg. particles, pos. x-axis for pos. particles
75 TH3F *fHistPtEtaProtonDCA; //! (DCA,eta,pT) for Protons; neg. x-axis for neg. particles, pos. x-axis for pos. particles; special histogram for protons
76 TH3F *fHistPtEtaPion; //! (mult,eta,pT) for Pions; neg. x-axis for neg. particles, pos. x-axis for pos. particles
635c8b48 77 //
c77fc043 78 TH3F *fHistClassicKaon; //! (Pt,eta,delta dEdx) for Kaons for different eta; neg. x-axis for neg. particles, pos. x-axis for pos. particles
79 TH3F *fHistClassicProton; //! (Pt,eta,delta dEdx) for Protons for different eta; neg. x-axis for neg. particles, pos. x-axis for pos. particles
80 TH3F *fHistClassicPion; //! (Pt,eta,delta dEdx) for Pions for different eta; neg. x-axis for neg. particles, pos. x-axis for pos. particles
635c8b48 81
82 // histograms of general interest
3c038b30 83 TH3F *fDeDx; //! dEdx spectrum
84 TH2F *fHistTrackPerEvent; //! tracks per event for multiplicity studies; code: (0) all calls; (1) all selected; (2) all selected with vtx. < 10cm;
85 TH3F *fHistTrackPerEventMC; //! (code, TrackPerEvent, isSelected) tracks per event, codes represent different event types (non-diffractive,..), is selected according to event selection procedure
c77fc043 86 TH2F *fSecProtons; //! control histogram for secondary interactions
3c038b30 87 TH3F *fVertexZ; //! control histogram for the z-position of the vertex
635c8b48 88 //
c77fc043 89 TH2F *fHistEtaNcls; //! 2d histogram (eta, nTPCclusters) which will define our acceptance
90 TH2F *fHistEtaPhi; //! 2d histogram (eta, phi) which will show dead regions
635c8b48 91
92 // histograms for efficiency studies
c77fc043 93 TH3F *fHistEffProton; //! (code,eta,pT) special hist. for eff. studies; code 0: true primary p, 1: true sec. p, 2: misidentified, 3: weak decay sec.
94 TH3F *fHistEffProtonDCA; //! (code,dca,pT) special hist. for eff. studies; code 0: true primary p, 1: true sec. p, 2: misidentified, 3: weak decay sec.
95 TH3F *fHistEffPion; //! (code,eta,pT) special hist. for eff. studies; code 0: true primary pi, 1: true sec. pi, 2: misidentified, 3: weak decay sec., 4: muons
96 TH3F *fHistEffKaon; //! (code,eta,pT) special hist. for eff. studies; code 0: true primary K, 1: true sec. K, 2: misidentified, 3: weak decay sec.
3c038b30 97 //
98 //
99 //
100 THnSparseS * fHistRealTracks; //! histogram with all necessary information for real tracks
101 THnSparseS * fHistMCparticles; //! histogram with all necessary information for MC particles
635c8b48 102
635c8b48 103
104 AliAnalysisTaskChargedHadronSpectra(const AliAnalysisTaskChargedHadronSpectra&);
105 AliAnalysisTaskChargedHadronSpectra& operator=(const AliAnalysisTaskChargedHadronSpectra&);
106
3c038b30 107 ClassDef(AliAnalysisTaskChargedHadronSpectra, 1);
635c8b48 108};
109
110#endif