3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
6 * See cxx source for full Copyright notice
8 // Thil class computes background corrections for the FMD. The correction is computed
9 // in eta,phi cells and the objects stored can be put into alien to use with analysis.
11 // Author: Hans Hjersing Dalsgaard, NBI, hans.dalsgaard@cern.ch
15 #ifndef ALIFMDBACKGROUNDCORRECTION_H
16 #define ALIFMDBACKGROUNDCORRECTION_H
18 #include "AliFMDInput.h"
19 #include "TObjArray.h"
20 #include "AliRunLoader.h"
21 #include "AliFMDFloatMap.h"
23 class AliTrackReference;
25 class AliFMDBackgroundCorrection : public TNamed {
29 AliFMDBackgroundCorrection() ;
30 ~AliFMDBackgroundCorrection() {};
31 void GenerateBackgroundCorrection(Bool_t from_hits=kFALSE,
35 Bool_t storeInAlien = kFALSE,
37 Int_t endRunNo=999999999,
38 const Char_t* filename="background.root",
39 Bool_t simulate = kFALSE,
41 Bool_t inFile = kFALSE,
42 const Char_t* infilename="");
44 class AliFMDInputBG : public AliFMDInput {
48 AliFMDInputBG(Bool_t hits_not_trackrefs);
51 Int_t GetNprim() {return fPrim;}
52 Int_t GetNhits() {return fHits;}
53 void SetVtxCutZ(Double_t vtxCut) { fZvtxCut = vtxCut;}
54 void SetNvtxBins(Int_t nBins) { fNvtxBins = nBins;}
55 void SetNbinsEta(Int_t nBins) { fNbinsEta = nBins;}
56 TObjArray* GetHits() {return &fHitArray;}
57 TObjArray* GetPrimaries() {return &fPrimaryArray;}
58 AliRunLoader* GetRunLoader() {return fLoader; }
60 Bool_t ProcessHit(AliFMDHit* h, TParticle* p );
61 Bool_t ProcessTrackRef(AliTrackReference* tr, TParticle* p );
62 Bool_t ProcessEvent(UShort_t det,
69 Bool_t Begin(Int_t event );
71 TObjArray fPrimaryArray;
73 TH2F fPrimaryMapInner;
74 TH2F fPrimaryMapOuter;
75 AliFMDFloatMap fHitMap;
76 AliFMDFloatMap fLastTrackByStrip;
91 void ProcessPrimaries(AliRunLoader*);
92 TObjArray fCorrectionArray;
97 ClassDef(AliFMDBackgroundCorrection,0)