]>
Commit | Line | Data |
---|---|---|
df0d5480 | 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" | |
ca3af5d9 | 20 | #include "AliRunLoader.h" |
df0d5480 | 21 | |
08d168d9 | 22 | class AliTrackReference; |
23 | ||
df0d5480 | 24 | class AliFMDBackgroundCorrection : public TNamed { |
25 | ||
26 | public: | |
27 | ||
28 | AliFMDBackgroundCorrection() ; | |
29 | ~AliFMDBackgroundCorrection() {}; | |
08d168d9 | 30 | void GenerateBackgroundCorrection(Bool_t from_hits=kFALSE, |
31 | Int_t nvtxbins=10, | |
df0d5480 | 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, | |
109e97cd | 39 | Int_t nEvents=10, |
40 | Bool_t inFile = kFALSE, | |
41 | const Char_t* infilename=""); | |
df0d5480 | 42 | |
43 | class AliFMDInputBG : public AliFMDInput { | |
44 | ||
45 | public : | |
08d168d9 | 46 | //AliFMDInputBG() ; |
47 | AliFMDInputBG(Bool_t hits_not_trackrefs); | |
df0d5480 | 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;} | |
ca3af5d9 | 57 | AliRunLoader* GetRunLoader() {return fLoader; } |
df0d5480 | 58 | private: |
ca3af5d9 | 59 | Bool_t ProcessHit(AliFMDHit* h, TParticle* p ); |
08d168d9 | 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 | ||
ca3af5d9 | 68 | Bool_t Begin(Int_t event ); |
df0d5480 | 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 fNbinsEta; | |
79 | }; | |
80 | ||
81 | private: | |
82 | ||
83 | void Simulate(Int_t); | |
84 | void ProcessPrimaries(AliRunLoader*); | |
df0d5480 | 85 | TObjArray fCorrectionArray; |
ca3af5d9 | 86 | TList fPrimaryList; |
87 | //Double_t fZvtxCut; | |
88 | // Int_t fNvtxBins; | |
89 | //Int_t fNbinsEta; | |
df0d5480 | 90 | ClassDef(AliFMDBackgroundCorrection,0) |
91 | ||
92 | }; | |
93 | #endif | |
94 | // EOF |