Updates to Trains. create a job-script to help
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / IdentifiedHighPt / lib / AliHighPtDeDxSpectra.h
CommitLineData
4ebdd20e 1#ifndef ALIHIGHPTDEDXSPECTRA_H
2#define ALIHIGHPTDEDXSPECTRA_H
3
4#include <TNamed.h>
5#include <TH1.h>
6
7#include "AliHighPtDeDxData.h"
8#include "AliHighPtDeDxMc.h"
9
10class AliHighPtDeDxSpectra : public TNamed {
11 public:
12 AliHighPtDeDxSpectra(); // default constructor
13 AliHighPtDeDxSpectra(const char* name, const char* title); // named constructor
14 virtual ~AliHighPtDeDxSpectra(); // default destructor
15
16 void GetCorrectedSpectra(AliHighPtDeDxData* data,
17 AliHighPtDeDxMc* mc);
18
19 void SetUseMcNoVtxCorrection(Bool_t value) { fUseMcNoVtxCorrection = value; };
20 void SetUseFittedEfficiency(Bool_t value) { fUseFittedEfficiency = value; };
21 void SetUseBinCorrection(Bool_t value) { fUseBinCorrection = value; };
22 void SetDebugLevel(Int_t value) { fDebugLevel = value; };
23
24 Double_t GetNevents() { return fNevents; };
25 TH1D* GetHistPt() { return hPt; };
26 TH1D* GetHistNevents() { return hNevents; };
27 TH1D* GetHistTriggerEfficiency() { return hTriggerEfficiency; };
28 TH1D* GetHistEfficiency() { return hEfficiency; };
29 TH1D* GetHistBinCorrection() { return hBinCorrection; };
30 TH1D* GetHistMcNoVtxCorrection() { return hMcNoVtxCorrection; };
31 TH1D* GetHistMeanPt() { return hMeanPt; };
32 TF1* GetFuncEfficiency() { return fEfficiency; };
33 TF1* GetFuncBinFit() { return fBinFit; };
34
35
36 private:
37
38 TH1D* ConstructBinCorrection(TH1D* histPt, TProfile* histMeanPt);
39 TH1D* ConstructTriggerEfficiency(AliHighPtDeDxMc* mc);
40 TH1D* GetEventCount(AliHighPtDeDxData* data, AliHighPtDeDxMc* mc);
41 TH1D* ConstructTrackCorrection(AliHighPtDeDxMc* mc);
42 TF1* FitEfficiency(TH1D* histEff);
43 void NormalizePt(TH1* hist);
44
45 // members
46 Int_t fDebugLevel; // debug level
47 Bool_t fUseMcNoVtxCorrection;
48 Bool_t fUseFittedEfficiency;
49 Bool_t fUseBinCorrection;
50 // use MC to correct down the novtx fraction outside the vtx cut
51 // see AliHighPtDeDxMc::FillEventInfo() for details
52 Double_t fNevents; // corrected number of events
53
54 // histograms
55 TH1D* hPt; // pt spectrum for
56 TH1D* hNevents; // events
57 TH1D* hTriggerEfficiency; // trigger efficency
58 TH1D* hEfficiency; // track correction
59 TH1D* hMcNoVtxCorrection; // mc no vtx correction
60 TH1D* hBinCorrection; // bin correction
61 TH1D* hMeanPt; // mean pt of data
62 TF1* fEfficiency; // fitted efficiency
63 TF1* fBinFit; // fit used for bin correction
64
65 ClassDef(AliHighPtDeDxSpectra, 1) // AliHighPtDeDxSpectra information
66 };
67
68#endif
69