]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/AliFMDBackgroundCorrection.h
Added calculation of a strip in a FMD ring
[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 AliFMDBackgroundCorrection : public TNamed {
23   
24 public:
25   
26   AliFMDBackgroundCorrection() ;
27   ~AliFMDBackgroundCorrection() {};
28   void GenerateBackgroundCorrection(Int_t nvtxbins=10,
29                                     Float_t zvtxcut=10,
30                                     Int_t nBinsEta=100, 
31                                     Bool_t storeInAlien = kFALSE, 
32                                     Int_t runNo =0, 
33                                     Int_t endRunNo=999999999, 
34                                     const Char_t* filename="background.root", 
35                                     Bool_t simulate = kFALSE, 
36                                     Int_t nEvents=10,
37                                     Bool_t inFile = kFALSE,
38                                     const Char_t* infilename="");
39   
40   class AliFMDInputBG : public AliFMDInput {
41     
42   public :
43     AliFMDInputBG() ; 
44    
45     Bool_t Init();
46     
47     Int_t GetNprim() {return fPrim;}
48     Int_t GetNhits() {return fHits;}
49     void  SetVtxCutZ(Double_t vtxCut) { fZvtxCut = vtxCut;}
50     void  SetNvtxBins(Int_t nBins) { fNvtxBins = nBins;}
51     void  SetNbinsEta(Int_t nBins) { fNbinsEta = nBins;}
52     TObjArray*  GetHits() {return &fHitArray;}
53     TObjArray*  GetPrimaries() {return &fPrimaryArray;}
54     AliRunLoader* GetRunLoader() {return fLoader; }
55   private:
56     Bool_t ProcessHit(AliFMDHit* h, TParticle* p );
57     Bool_t Begin(Int_t event );
58     TObjArray fPrimaryArray;
59     TObjArray fHitArray;
60     Int_t fPrim;
61     Int_t fHits;
62     Double_t fZvtxCut;
63     Int_t fNvtxBins;
64     Int_t fPrevTrack;
65     Int_t fPrevDetector;
66     Char_t fPrevRing;
67     Int_t fNbinsEta;
68   };
69   
70 private:
71   
72   void Simulate(Int_t);
73   void ProcessPrimaries(AliRunLoader*);
74   TObjArray fCorrectionArray;
75   TList     fPrimaryList;
76   //Double_t fZvtxCut;
77   // Int_t fNvtxBins;
78   //Int_t fNbinsEta;
79   ClassDef(AliFMDBackgroundCorrection,0)
80   
81 };
82 #endif
83 // EOF