]>
Commit | Line | Data |
---|---|---|
c3ac94c6 | 1 | |
2 | #include "AliFMDAnaCalibEventSelectionEfficiency.h" | |
3 | #include <TH2F.h> | |
4 | #include <TH1F.h> | |
5 | #include <TBrowser.h> | |
6 | ||
7 | ClassImp(AliFMDAnaCalibEventSelectionEfficiency) | |
8 | #if 0 | |
9 | ; // For Emacs | |
10 | #endif | |
11 | ||
12 | //____________________________________________________________________ | |
13 | AliFMDAnaCalibEventSelectionEfficiency::AliFMDAnaCalibEventSelectionEfficiency() : TObject(), | |
14 | fCorrection(), | |
15 | fIsInit(kFALSE) | |
16 | { | |
17 | ||
18 | ||
19 | ||
20 | } | |
21 | ||
22 | ||
23 | //____________________________________________________________________ | |
24 | AliFMDAnaCalibEventSelectionEfficiency::AliFMDAnaCalibEventSelectionEfficiency(const AliFMDAnaCalibEventSelectionEfficiency& o) : TObject(o), fCorrection(o.fCorrection), fIsInit(o.fIsInit) | |
25 | { | |
26 | // Copy ctor | |
27 | } | |
28 | //____________________________________________________________________ | |
29 | AliFMDAnaCalibEventSelectionEfficiency& | |
30 | AliFMDAnaCalibEventSelectionEfficiency::operator=(const AliFMDAnaCalibEventSelectionEfficiency& o) | |
31 | { | |
32 | // Assignment operator | |
33 | ||
34 | return (*this); | |
35 | } | |
36 | //____________________________________________________________________ | |
37 | void AliFMDAnaCalibEventSelectionEfficiency::Init() { | |
38 | ||
39 | fCorrection.SetName("EventSelectionEffCorrection"); | |
40 | ||
41 | fIsInit = kTRUE; | |
42 | ||
43 | } | |
44 | //____________________________________________________________________ | |
45 | void AliFMDAnaCalibEventSelectionEfficiency::SetCorrection(TH1F* hCorrection) { | |
46 | ||
47 | fCorrection.SetBins(hCorrection->GetNbinsX(), | |
48 | hCorrection->GetXaxis()->GetXmin(), | |
49 | hCorrection->GetXaxis()->GetXmax()); | |
50 | for(Int_t i=1; i<=hCorrection->GetNbinsX(); i++) { | |
51 | fCorrection.SetBinContent(i,hCorrection->GetBinContent(i)); | |
52 | fCorrection.SetBinError(i,hCorrection->GetBinError(i)); | |
53 | } | |
54 | ||
55 | ||
56 | } | |
57 | //____________________________________________________________________ | |
58 | Float_t AliFMDAnaCalibEventSelectionEfficiency::GetCorrection(Int_t vtxbin) { | |
59 | ||
60 | if( (vtxbin-1) > fCorrection.GetNbinsX() || vtxbin < 0) | |
61 | return 0; | |
62 | ||
63 | Float_t correction = fCorrection.GetBinContent(vtxbin+1); | |
64 | ||
65 | return correction; | |
66 | ||
67 | } | |
68 | ||
69 | //____________________________________________________________________ | |
70 | void AliFMDAnaCalibEventSelectionEfficiency::Browse(TBrowser* b) | |
71 | { | |
72 | ||
73 | } | |
74 | ||
75 | //____________________________________________________________________ | |
76 | // | |
77 | // EOF | |
78 | // |