Updates to Trains. create a job-script to help
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / IdentifiedHighPt / lib / AliHighPtDeDxBase.h
CommitLineData
4ebdd20e 1#ifndef ALIHIGHPTDEDXBASE_H
2#define ALIHIGHPTDEDXBASE_H
3
4#include <TNamed.h>
5#include <TH1.h>
6#include <TH2.h>
7#include <TH3.h>
8#include <TProfile.h>
9#include <TProfile2D.h>
10#include <TF1.h>
11#include <TCanvas.h>
12
13class AliHighPtDeDxBase : public TNamed {
14 public:
15 AliHighPtDeDxBase(); // default constructor
16 AliHighPtDeDxBase(const char* name, const char* title); // named constructor
17 virtual ~AliHighPtDeDxBase(); // default destructor
18
19 void MakeNice1dHisto(TH1* hist, TVirtualPad* c1);
20 void MakeNice2dHisto(TH2* hist, TVirtualPad* c1, Bool_t colz=kFALSE);
21
22 TCanvas* DrawPhiCutHistograms();
23 TCanvas* FindCanvas(const Char_t* canvasName,
24 Int_t xwidth, Int_t ywidth);
25 TCanvas* DrawNice(TH1* hist, const Char_t* canvasName,
26 Int_t xwidth, Int_t ywidth, const Char_t* option);
27
28 Double_t GetEtaLow() { return fEtaLow; }
29 Double_t GetEtaHigh() { return fEtaHigh; }
30 Bool_t IsMc() { return fIsMc; }
31
32 virtual void SetIsMc (Bool_t value) { fIsMc = value; }
33
34 virtual void SetUseRunCut (Bool_t value) { fUseRunCut = value; }
35 virtual void SetRun (Int_t value) { fRun = value; }
36 virtual void SetUseEtaCut(Bool_t value);
37 virtual void SetUseEtaCutAbs(Bool_t value);
38 virtual void SetEtaLow (Double_t value) { fEtaLow = value; }
39 virtual void SetEtaHigh (Double_t value) { fEtaHigh = value; }
40 virtual void SetUseFilterCut(Bool_t value) { fUseFilterCut = value; }
41 virtual void SetFilter (Int_t value) { fFilter = value; }
42 virtual void SetUsePhiCut (Bool_t value) { fUsePhiCut = value; }
43 virtual void SetPhiCutLow (TF1* value) { fPhiCutLow = value; }
44 virtual void SetPhiCutHigh (TF1* value) { fPhiCutHigh = value; }
45
46 virtual void SetEventVtxStatus(Int_t value) { fEventVtxStatus = value; }
47 virtual void SetEventVtxStatusMc(Int_t value) { fEventVtxStatusMc = value; }
48 virtual void SetEventRun(Int_t value) { fEventRun = value; }
49 virtual void SetEventMag(Double_t value) { fEventMag = value; }
50 virtual void SetEventTrigger(Int_t value) { fEventTrigger = value; }
51 virtual void SetTrackCharge(Int_t value) { fTrackCharge = value; }
52 virtual void SetTrackEta(Double_t value) { fTrackEta = value; }
53 virtual void SetTrackP(Double_t value) { fTrackP = value; }
54 virtual void SetTrackPt(Double_t value) { fTrackPt = value; }
55 virtual void SetTrackFilter(Int_t value) { fTrackFilter = value; }
56 virtual void SetTrackPhi(Double_t value) { fTrackPhi = value; }
57 virtual void SetTrackDeDx(Double_t value) { fTrackDeDx = value; }
58 virtual void SetTrackNcl(Int_t value) { fTrackNcl = value; }
59 virtual void SetTrackBeta(Double_t value) { fTrackBeta = value; }
60
61 virtual void SetTrackPidMc(Int_t value) { fTrackPidMc = value; }
62 virtual void SetTrackPrimaryMc(Int_t value) { fTrackPrimaryMc = value; }
63
64 TF1* GetStandardPhiCutLow();
65 TF1* GetStandardPhiCutHigh();
66
67 TH1D* GetHistNevents() { return hNevents; };
68 TH1D* GetHistVtxStatus() { return hVtxStatus; };
69 TH1D* GetHistPt() { return hPt; };
70 TH1D* GetHistEta() { return hEta; };
71 TProfile* GetHistMeanPt() { return hMeanPt; };
72 TH3F* GetHistNclVsPhiVsPtBefore() { return hNclVsPhiVsPtBefore; }
73 TH3F* GetHistNclVsPhiVsPtAfter() { return hNclVsPhiVsPtAfter; }
74
75 virtual void FillEventInfo();
76 virtual void FillTrackInfo(Float_t weight=1);
77 virtual Bool_t EventAccepted();
78 virtual Bool_t TrackAccepted();
79 virtual void Init(Int_t nPtBins, Double_t* ptBins);
80
81 void Print(Option_t* option="") const;
82
83 protected: // so we can use the variables in derived classes
84 // cut ranges
85 Bool_t fIsMc; // kTRUE is data is Mc (e.g. pid info is available)
86 Bool_t fUseRunCut; // kTRUE to only sture data from fRun
87 Int_t fRun;
88 Bool_t fUseEtaCut; // kTRUE to require fEtaLow < eta < fEtaHigh
89 Bool_t fUseEtaCutAbs; // kTRUE to require fEtaLow < eta < fEtaHigh
90 Double_t fEtaLow;
91 Double_t fEtaHigh;
92 Bool_t fUseFilterCut; // kTRUE to require that fFilter (bit) was set
93 Int_t fFilter;
94 Bool_t fUsePhiCut; // kTRUE to use pT > 2.0 edge cut
95 TF1* fPhiCutLow; // Function for phi cut low
96 TF1* fPhiCutHigh; // Function for phi cut low
97
98 // Actual values for the event and track
99 Int_t fEventVtxStatus; //! event vtx status
100 Int_t fEventVtxStatusMc; //! event vtx status based on Mc vtx
101 Int_t fEventRun; //! event run
102 Double_t fEventMag; //! event magnetic field
103 Double_t fEventTrigger; //! 1 is triggered / 0 if not (Mc only)
104
105 Int_t fTrackCharge; //! charge (+1 or -1)
106 Double_t fTrackEta; //! eta
107 Double_t fTrackP; //! p
108 Double_t fTrackPt; //! pt
109 Int_t fTrackFilter; //! filter
110 Double_t fTrackPhi; //! phi
111 Double_t fTrackPhiCutVariable; //! derived phi variable used for cutting
112 Double_t fTrackDeDx; //! dE/dx for track
113 Int_t fTrackNcl; //! N cl used for dE/dx for track
114 Double_t fTrackBeta; //! Beta
115
116 Int_t fTrackPidMc; //! Mc pid information
117 Int_t fTrackPrimaryMc; //! Mc information if track is primary
118
119 private:
120 // Debug histograms
121 TH1D* hVtxStatus;
122 TH1D* hNevents;
123 TH1D* hPhi;
124 TH1D* hEta;
125 TH1D* hPt;
126 TProfile* hMeanPt;
127 TH3F* hNclVsPhiVsPtBefore;
128 TH3F* hNclVsPhiVsPtAfter;
129 ClassDef(AliHighPtDeDxBase, 4) // AliHighPtDeDxBase information
130 };
131
132#endif
133