]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/AliFMDBackgroundCorrection.h
Adding directory with the production requests
[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 #include "AliFMDFloatMap.h"
22 #include "TH2F.h"
23 class AliTrackReference;
24
25 class AliFMDBackgroundCorrection : public TNamed {
26   
27 public:
28   
29   AliFMDBackgroundCorrection() ;
30   ~AliFMDBackgroundCorrection() {};
31   void GenerateBackgroundCorrection(Bool_t from_hits=kFALSE,
32                                     Int_t nvtxbins=10,
33                                     Float_t zvtxcut=10,
34                                     Int_t nBinsEta=100, 
35                                     Bool_t storeInAlien = kFALSE, 
36                                     Int_t runNo =0, 
37                                     Int_t endRunNo=999999999, 
38                                     const Char_t* filename="background.root", 
39                                     Bool_t simulate = kFALSE, 
40                                     Int_t nEvents=10,
41                                     Bool_t inFile = kFALSE,
42                                     const Char_t* infilename="");
43   
44   class AliFMDInputBG : public AliFMDInput {
45     
46   public :
47     //AliFMDInputBG() ; 
48     AliFMDInputBG(Bool_t hits_not_trackrefs);
49     Bool_t Init();
50     
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; }
59   private:
60     Bool_t ProcessHit(AliFMDHit* h, TParticle* p );
61     Bool_t ProcessTrackRef(AliTrackReference* tr, TParticle* p );
62     Bool_t ProcessEvent(UShort_t det,
63                         Char_t ring, 
64                         UShort_t sector, 
65                         UShort_t strip,
66                         Int_t nTrack,
67                         Float_t charge);
68                 
69     Bool_t Begin(Int_t event );
70     Bool_t End();
71     TObjArray fPrimaryArray;
72     TObjArray fHitArray;
73     TH2F    fPrimaryMapInner;
74     TH2F    fPrimaryMapOuter;
75     AliFMDFloatMap fHitMap;
76     Int_t fPrim;
77     Int_t fHits;
78     Double_t fZvtxCut;
79     Int_t fNvtxBins;
80     Int_t fPrevTrack;
81     Int_t fPrevDetector;
82     Char_t fPrevRing;
83     Int_t fPrevSec;
84     Int_t fNbinsEta;
85   };
86   
87 private:
88   
89   void Simulate(Int_t);
90   void ProcessPrimaries(AliRunLoader*);
91   TObjArray fCorrectionArray;
92   TList     fPrimaryList;
93   //Double_t fZvtxCut;
94   // Int_t fNvtxBins;
95   //Int_t fNbinsEta;
96   ClassDef(AliFMDBackgroundCorrection,0)
97   
98 };
99 #endif
100 // EOF