2 #include "AliFMDAnaCalibBackgroundCorrection.h"
7 ClassImp(AliFMDAnaCalibBackgroundCorrection)
12 //____________________________________________________________________
13 AliFMDAnaCalibBackgroundCorrection::AliFMDAnaCalibBackgroundCorrection() : TObject(),
17 fListOfDoubleHitCorrection()
25 //____________________________________________________________________
26 AliFMDAnaCalibBackgroundCorrection::AliFMDAnaCalibBackgroundCorrection(const AliFMDAnaCalibBackgroundCorrection& o)
27 : TObject(o), fArray(o.fArray), fAxis(o.fAxis), fIsInit(o.fIsInit), fListOfDoubleHitCorrection()
31 //____________________________________________________________________
32 AliFMDAnaCalibBackgroundCorrection&
33 AliFMDAnaCalibBackgroundCorrection::operator=(const AliFMDAnaCalibBackgroundCorrection& o)
35 // Assignment operator
42 //____________________________________________________________________
43 TH2F* AliFMDAnaCalibBackgroundCorrection::GetBgCorrection(Int_t det,
46 TObjArray* ringArray = GetRingArray(det,ring);
47 TH2F* hCorrection = (TH2F*)ringArray->At(vtxbin);
51 //____________________________________________________________________
52 void AliFMDAnaCalibBackgroundCorrection::SetBgCorrection(Int_t det,
59 TObjArray* ringArray = GetRingArray(det,ring);
60 ringArray->AddAtAndExpand(hCorrection,vtxbin);
63 //____________________________________________________________________
64 TH1F* AliFMDAnaCalibBackgroundCorrection::GetDoubleHitCorrection(Int_t det,
68 TH1F* hCorrection = (TH1F*)fListOfDoubleHitCorrection.FindObject(Form("hDoubleHitCorrection_FMD%d%c",det,ring));
72 //____________________________________________________________________
73 void AliFMDAnaCalibBackgroundCorrection::SetDoubleHitCorrection(Int_t det,
76 hCorrection->SetName(Form("hDoubleHitCorrection_FMD%d%c",det,ring));
77 fListOfDoubleHitCorrection.Add(hCorrection);
79 //____________________________________________________________________
80 void AliFMDAnaCalibBackgroundCorrection::SetRefAxis(TAxis* axis) {
83 fAxis.Set(axis->GetNbins(),axis->GetXmin(),axis->GetXmax());
86 //____________________________________________________________________
87 void AliFMDAnaCalibBackgroundCorrection::Init() {
90 for(Int_t det = 1; det<=3;det++) {
91 TObjArray* detArray = new TObjArray();
93 fArray.AddAtAndExpand(detArray,det);
94 Int_t nRings = (det == 1 ? 1 : 2);
95 for(Int_t ring = 0;ring<nRings;ring++) {
96 TObjArray* ringArray = new TObjArray();
97 ringArray->SetOwner();
98 detArray->AddAtAndExpand(ringArray,ring);
105 //____________________________________________________________________
106 TObjArray* AliFMDAnaCalibBackgroundCorrection::GetRingArray(Int_t det,
109 Int_t ringNumber = (ring == 'I' ? 0 : 1);
110 TObjArray* detArray = (TObjArray*)fArray.At(det);
111 TObjArray* ringArray = (TObjArray*)detArray->At(ringNumber);
115 //____________________________________________________________________
116 Int_t AliFMDAnaCalibBackgroundCorrection::GetNvtxBins() {
118 return fAxis.GetNbins();
121 //____________________________________________________________________
122 Float_t AliFMDAnaCalibBackgroundCorrection::GetVtxCutZ() {
124 return fAxis.GetXmax();
128 //____________________________________________________________________
130 AliFMDAnaCalibBackgroundCorrection::Browse(TBrowser* b)
132 b->Add(&fAxis, "Vertex bins");
133 b->Add(&fArray, "Array of histograms w/BG corrections");
136 //____________________________________________________________________