Add new class for Pedestal Calibration (M.Ivanov, J.Wiechula)
[u/mrichter/AliRoot.git] / TPC / AliTPCCalibPedestal.h
CommitLineData
8bc7e885 1#ifndef ALITPCCALIBPEDESTAL_H
2#define ALITPCCALIBPEDESTAL_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6
7
8
9
10class TObjArray;
11class TH2F;
12class TH2S;
13class TH1S;
14class TH1F;
15class TH1D;
16class TF1;
17class TTreeSRedirector;
18class AliTPCROC;
19class AliRawReader;
20
21
22class AliTPCCalibPedestal : public TObject {
23
24public:
25 AliTPCCalibPedestal();
26 virtual ~AliTPCCalibPedestal();
27
28 Bool_t ProcessEvent(AliRawReader *rawReader);
29 Int_t Update(const Int_t isector, const Int_t iRow, const Int_t iPad,
30 const Int_t iTimeBin, const Float_t signal);
31 void Analyse();
32 //
33 AliTPCCalROC* GetCalRocPedestal (Int_t sector, Bool_t force=kFALSE); //get calibration object - sector
34 AliTPCCalROC* GetCalRocRMS(Int_t sector, Bool_t force=kFALSE); //get calibration object - sector
35 const TObjArray* GetCalPadPedestal (){return &fCalRocArrayPedestal;}//get calibration object
36 const TObjArray* GetCalPadRMS(){return &fCalRocArrayRMS;} //get calibration object
37
38 TH2S* GetHistoPedestal (Int_t sector, Bool_t force=kFALSE); //get refernce histogram
39 void DumpToFile(const Char_t *filename, const Char_t *dir="", const Bool_t append=kFALSE);
40 //
41 Short_t GetDebugLevel(){ return fDebugLevel; }
42 void SetDebugLevel(Short_t debug=1){ fDebugLevel = debug;}
43
44
45 Bool_t TestEvent(); //test the fast approach to fill histogram - used for test purposes
46
47private:
48 Int_t fFirstTimeBin; // First Time bin needed for analysis
49 Int_t fLastTimeBin; // Last Time bin needed for analysis
50
51 Int_t fAdcMin; // min adc channel of pedestal value
52 Int_t fAdcMax; // max adc channel of pedestal value
53
54 AliTPCROC *fROC; //! ROC information
55
56 TObjArray fCalRocArrayPedestal; // Array of AliTPCCalROC class for Time0 calibration
57 TObjArray fCalRocArrayRMS; // Array of AliTPCCalROC class for signal width calibration
58
59 TObjArray fHistoPedestalArray; // Calibration histograms for Pedestal distribution
60
61 TTreeSRedirector *fDebugStreamer; //! debug streamer
62
63 Short_t fDebugLevel;
64 //! debugging
65
66 TH2S* GetHisto(Int_t sector, TObjArray *arr,
67 Int_t nbinsY, Float_t ymin, Float_t ymax,
68 Char_t *type, Bool_t force);
69
70 AliTPCCalROC* GetCalRoc(Int_t sector, TObjArray* arr, Bool_t force);
71
72public:
73
74
75 ClassDef(AliTPCCalibPedestal,1)
76};
77
78
79
80#endif
81