]> git.uio.no Git - u/mrichter/AliRoot.git/blame - FMD/AliFMDBackgroundCorrection.h
Test script
[u/mrichter/AliRoot.git] / FMD / AliFMDBackgroundCorrection.h
CommitLineData
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"
627ba74b 21#include "AliFMDFloatMap.h"
22#include "TH2F.h"
08d168d9 23class AliTrackReference;
24
df0d5480 25class AliFMDBackgroundCorrection : public TNamed {
26
27public:
28
29 AliFMDBackgroundCorrection() ;
30 ~AliFMDBackgroundCorrection() {};
08d168d9 31 void GenerateBackgroundCorrection(Bool_t from_hits=kFALSE,
32 Int_t nvtxbins=10,
df0d5480 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,
109e97cd 40 Int_t nEvents=10,
41 Bool_t inFile = kFALSE,
42 const Char_t* infilename="");
df0d5480 43
44 class AliFMDInputBG : public AliFMDInput {
45
46 public :
08d168d9 47 //AliFMDInputBG() ;
48 AliFMDInputBG(Bool_t hits_not_trackrefs);
df0d5480 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;}
ca3af5d9 58 AliRunLoader* GetRunLoader() {return fLoader; }
df0d5480 59 private:
ca3af5d9 60 Bool_t ProcessHit(AliFMDHit* h, TParticle* p );
08d168d9 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
ca3af5d9 69 Bool_t Begin(Int_t event );
627ba74b 70 Bool_t End();
df0d5480 71 TObjArray fPrimaryArray;
72 TObjArray fHitArray;
627ba74b 73 TH2F fPrimaryMapInner;
74 TH2F fPrimaryMapOuter;
75 AliFMDFloatMap fHitMap;
6289b3e8 76 AliFMDFloatMap fLastTrackByStrip;
df0d5480 77 Int_t fPrim;
78 Int_t fHits;
79 Double_t fZvtxCut;
80 Int_t fNvtxBins;
81 Int_t fPrevTrack;
82 Int_t fPrevDetector;
83 Char_t fPrevRing;
d130d8a2 84 Int_t fPrevSec;
df0d5480 85 Int_t fNbinsEta;
86 };
87
88private:
89
90 void Simulate(Int_t);
91 void ProcessPrimaries(AliRunLoader*);
df0d5480 92 TObjArray fCorrectionArray;
ca3af5d9 93 TList fPrimaryList;
94 //Double_t fZvtxCut;
95 // Int_t fNvtxBins;
96 //Int_t fNbinsEta;
df0d5480 97 ClassDef(AliFMDBackgroundCorrection,0)
98
99};
100#endif
101// EOF