]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/AliFMDBackgroundCorrection.h
0589120f3f8e2ba417374c02da2c1f5ba8c2271c
[u/mrichter/AliRoot.git] / FMD / AliFMDBackgroundCorrection.h
1 // -*- mode: C++ -*- 
2
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
4  * reserved. 
5  *
6  * See cxx source for full Copyright notice                               
7  */
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.
10 //
11 // Author: Hans Hjersing Dalsgaard, NBI, hans.dalsgaard@cern.ch
12 //
13 // 
14
15 #ifndef ALIFMDBACKGROUNDCORRECTION_H
16 #define ALIFMDBACKGROUNDCORRECTION_H
17
18 #include "AliFMDInput.h"
19 #include "TObjArray.h"
20 #include "AliRunLoader.h"
21
22 class AliTrackReference;
23
24 class AliFMDBackgroundCorrection : public TNamed {
25   
26 public:
27   
28   AliFMDBackgroundCorrection() ;
29   ~AliFMDBackgroundCorrection() {};
30   void GenerateBackgroundCorrection(Bool_t from_hits=kFALSE,
31                                     Int_t nvtxbins=10,
32                                     Float_t zvtxcut=10,
33                                     Int_t nBinsEta=100, 
34                                     Bool_t storeInAlien = kFALSE, 
35                                     Int_t runNo =0, 
36                                     Int_t endRunNo=999999999, 
37                                     const Char_t* filename="background.root", 
38                                     Bool_t simulate = kFALSE, 
39                                     Int_t nEvents=10,
40                                     Bool_t inFile = kFALSE,
41                                     const Char_t* infilename="");
42   
43   class AliFMDInputBG : public AliFMDInput {
44     
45   public :
46     //AliFMDInputBG() ; 
47     AliFMDInputBG(Bool_t hits_not_trackrefs);
48     Bool_t Init();
49     
50     Int_t GetNprim() {return fPrim;}
51     Int_t GetNhits() {return fHits;}
52     void  SetVtxCutZ(Double_t vtxCut) { fZvtxCut = vtxCut;}
53     void  SetNvtxBins(Int_t nBins) { fNvtxBins = nBins;}
54     void  SetNbinsEta(Int_t nBins) { fNbinsEta = nBins;}
55     TObjArray*  GetHits() {return &fHitArray;}
56     TObjArray*  GetPrimaries() {return &fPrimaryArray;}
57     AliRunLoader* GetRunLoader() {return fLoader; }
58   private:
59     Bool_t ProcessHit(AliFMDHit* h, TParticle* p );
60     Bool_t ProcessTrackRef(AliTrackReference* tr, TParticle* p );
61     Bool_t ProcessEvent(UShort_t det,
62                         Char_t ring, 
63                         UShort_t sector, 
64                         UShort_t strip,
65                         Int_t nTrack,
66                         Float_t charge);
67                 
68     Bool_t Begin(Int_t event );
69     TObjArray fPrimaryArray;
70     TObjArray fHitArray;
71     Int_t fPrim;
72     Int_t fHits;
73     Double_t fZvtxCut;
74     Int_t fNvtxBins;
75     Int_t fPrevTrack;
76     Int_t fPrevDetector;
77     Char_t fPrevRing;
78     Int_t fPrevSec;
79     Int_t fNbinsEta;
80   };
81   
82 private:
83   
84   void Simulate(Int_t);
85   void ProcessPrimaries(AliRunLoader*);
86   TObjArray fCorrectionArray;
87   TList     fPrimaryList;
88   //Double_t fZvtxCut;
89   // Int_t fNvtxBins;
90   //Int_t fNbinsEta;
91   ClassDef(AliFMDBackgroundCorrection,0)
92   
93 };
94 #endif
95 // EOF