Added possibility to do cut on TPCnSigma and rapidity in the task.
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / PiKaPr / TPCTOF / AliAnalysisCombinedHadronSpectra.h
CommitLineData
aa2bbd47 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 TH2D;
d93f62b9 14class TH3D;
aa2bbd47 15class TList;
16class TObjArray;
17class AliESDEvent;
18class AliESDtrack;
19class AliESDtrackCuts;
20class AliHeader;
21class AliESDpid;
22
23
24#include "AliAnalysisTaskSE.h"
25#include "THnSparse.h"
26
27class AliAnalysisCombinedHadronSpectra : public AliAnalysisTaskSE {
28 public:
29 AliAnalysisCombinedHadronSpectra(const char *name);
30 AliAnalysisCombinedHadronSpectra();
31 virtual ~AliAnalysisCombinedHadronSpectra() {}
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;};
c8d1f015 43 void SetUseTPConlyTracks(Bool_t useTPConlyTracks = kTRUE){fUseTPConlyTracks = useTPConlyTracks;};
44 void SetSaveMotherPDG(Bool_t saveMotherPDG =kTRUE){fSaveMotherPDG = saveMotherPDG;};
d3484a41 45 void SetSmallTHnSparse(Bool_t smallTHnSparse = kFALSE) {fSmallTHnSparse = smallTHnSparse;};
46 void SetTPCnSigmaCuts(Double_t nSigmaTPCLow = -3., Double_t nSigmaTPCHigh = 3.){fTPCnSigmaCutLow = nSigmaTPCLow; fTPCnSigmaCutHigh = nSigmaTPCHigh;};
47 void SetRapidityCuts(Double_t rapidityLow = -0.2, Double_t rapidityHigh = 0.2){fRapidityCutLow = rapidityLow; fRapidityCutHigh = rapidityHigh;};
aa2bbd47 48 void Initialize();
49 //
50
51 private:
52 //
d93f62b9 53 void BinLogAxis(const TH1 *h);
aa2bbd47 54 Int_t GetPythiaEventProcessType(const AliHeader* aHeader, const Bool_t adebug = kFALSE) const;
55 //
56 AliESDEvent *fESD; //! ESD object
57 TList *fListHist; //! list for histograms
58 //
59 AliESDtrackCuts * fESDtrackCuts; // basic cut variables
60 AliESDtrackCuts * fESDTrackCutsMult; // cuts for the MULTIPLICITY DETERMINATION
61 AliESDpid * fESDpid; // basic TPC object for n-sigma cuts
62 Bool_t fMCtrue; // flag if real data or MC is processed
63 Bool_t fOnlyQA; // flag if only QA histograms should be filled
64 Bool_t fUseHBTmultiplicity; // flag if multiplicity determination should be done as in the HBT paper
c8d1f015 65 Bool_t fUseTPConlyTracks; // flag if TPConly-track should be used
66 Bool_t fSaveMotherPDG; // flag if PDG of mother should be saved (weak decays)
d3484a41 67 Bool_t fSmallTHnSparse; // flag if to do cuts on TPC n-sigma and rapidity in task or not
68 Double_t fTPCnSigmaCutLow; // low border for TPC n-sigma cut
69 Double_t fTPCnSigmaCutHigh; // high border for TPC n-sigma cut
70 Double_t fRapidityCutLow; // low border for rapidity cut
71 Double_t fRapidityCutHigh; // high border for rapidity cut
aa2bbd47 72 Double_t fAlephParameters[5]; // Aleph Parameters for Bethe-Bloch
d3484a41 73
aa2bbd47 74 //
75 //
76 //
d93f62b9 77 THnSparseF * fHistRealTracks; //! histogram with all necessary information for real tracks
78 THnSparseF * fHistMCparticles; //! histogram with all necessary information for MC particles
aa2bbd47 79 //
d93f62b9 80 TH3D * fHistPidQA; //! histogram for the QA of the PID
aa2bbd47 81 TH2D * fHistMult; //! control histogram for multiplicity
82 TH1D * fHistCentrality; //! control histogram for centrality
83 //
84 AliAnalysisCombinedHadronSpectra(const AliAnalysisCombinedHadronSpectra&);
85 AliAnalysisCombinedHadronSpectra& operator=(const AliAnalysisCombinedHadronSpectra&);
86
87 ClassDef(AliAnalysisCombinedHadronSpectra, 1);
88};
89
90#endif