]>
Commit | Line | Data |
---|---|---|
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 | ||
f1b14fa2 | 8 | #include <TObject.h> |
9 | #include <TObjArray.h> | |
8bc7e885 | 10 | |
bdf99a93 | 11 | class TArrayF; |
8bc7e885 | 12 | class TH2F; |
8bc7e885 | 13 | class TTreeSRedirector; |
14 | class AliTPCROC; | |
bc331d5b | 15 | class AliTPCCalROC; |
a7dce0bc | 16 | class AliTPCRawStream; |
08205ed7 | 17 | class AliTPCRawStreamFast; |
aa983e4f | 18 | class AliRawReader; |
8bc7e885 | 19 | |
bdf99a93 | 20 | struct eventHeaderStruct; |
8bc7e885 | 21 | |
22 | class AliTPCCalibPedestal : public TObject { | |
23 | ||
24 | public: | |
25 | AliTPCCalibPedestal(); | |
bc331d5b | 26 | AliTPCCalibPedestal(const AliTPCCalibPedestal &ped); |
8bc7e885 | 27 | virtual ~AliTPCCalibPedestal(); |
bc331d5b | 28 | |
29 | AliTPCCalibPedestal& operator = (const AliTPCCalibPedestal &source); | |
30 | ||
08205ed7 | 31 | Bool_t ProcessEventFast(AliTPCRawStreamFast *rawStreamFast); |
32 | Bool_t ProcessEventFast(AliRawReader *rawReader); | |
33 | ||
bc331d5b | 34 | Bool_t ProcessEvent(AliTPCRawStream *rawStream); |
35 | Bool_t ProcessEvent(AliRawReader *rawReader); | |
36 | Bool_t ProcessEvent(eventHeaderStruct *event); | |
37 | ||
bdf99a93 | 38 | Int_t Update(const Int_t isector, const Int_t iRow, const Int_t iPad, |
39 | const Int_t iTimeBin, const Float_t signal); | |
40 | void Analyse(); | |
8bc7e885 | 41 | // |
bc331d5b | 42 | AliTPCCalROC* GetCalRocPedestal (Int_t sector, Bool_t force=kFALSE); // get calibration object - sector |
43 | AliTPCCalROC* GetCalRocRMS(Int_t sector, Bool_t force=kFALSE); // get calibration object - sector | |
44 | const TObjArray* GetCalPadPedestal (){return &fCalRocArrayPedestal;} // get calibration object | |
45 | const TObjArray* GetCalPadRMS(){return &fCalRocArrayRMS;} // get calibration object | |
aa983e4f | 46 | |
bc331d5b | 47 | TH2F* GetHistoPedestal (Int_t sector, Bool_t force=kFALSE); // get refernce histogram |
48 | void DumpToFile(const Char_t *filename, const Char_t *dir="", const Bool_t append=kFALSE); | |
8bc7e885 | 49 | // |
bdf99a93 | 50 | void SetTimeAnalysis(Bool_t time = kTRUE); // Use ONLY in TPCPEDESTALda on LDC for one sector! |
51 | void AnalyseTime(Int_t nevents); // Makes sense only in TPCPEDESTALda on LDC! | |
52 | TArrayF **GetTimePedestals() const { return fTimeSignal; } // Get array with time dependent pedestals (for one sector!) | |
53 | // | |
aa983e4f | 54 | Int_t GetFirstTimeBin() const { return fFirstTimeBin; } |
55 | Int_t GetLastTimeBin() const { return fLastTimeBin; } | |
56 | Int_t GetAdcMin() const { return fAdcMin; } | |
57 | Int_t GetAdcMax() const { return fAdcMax; } | |
bc331d5b | 58 | |
aa983e4f | 59 | void SetRangeTime(Int_t tMin, Int_t tMax){ fFirstTimeBin=tMin; fLastTimeBin=tMax; } // Set time bin range that is used for the pedestal calibration |
60 | void SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; } // Set adc range for the pedestal calibration | |
8bc7e885 | 61 | |
bdf99a93 | 62 | void SetOldRCUformat(Bool_t format=kTRUE) { fOldRCUformat = format; } |
aa983e4f | 63 | |
bdf99a93 | 64 | void Merge(AliTPCCalibPedestal *ped); |
8bc7e885 | 65 | |
bdf99a93 | 66 | Bool_t TestEvent(); // Test the fast approach to fill histogram - used for test purposes |
8bc7e885 | 67 | |
68 | private: | |
bdf99a93 | 69 | |
8bc7e885 | 70 | Int_t fFirstTimeBin; // First Time bin needed for analysis |
71 | Int_t fLastTimeBin; // Last Time bin needed for analysis | |
bdf99a93 | 72 | |
8bc7e885 | 73 | Int_t fAdcMin; // min adc channel of pedestal value |
74 | Int_t fAdcMax; // max adc channel of pedestal value | |
bdf99a93 | 75 | |
aa983e4f | 76 | Bool_t fOldRCUformat; //! Should we use the old RCU format for data reading |
bdf99a93 | 77 | Bool_t fTimeAnalysis; //! Should we use the time dependent analysis? ONLY ON LDC! |
a7dce0bc | 78 | |
8bc7e885 | 79 | AliTPCROC *fROC; //! ROC information |
bdf99a93 | 80 | |
8bc7e885 | 81 | TObjArray fCalRocArrayPedestal; // Array of AliTPCCalROC class for Time0 calibration |
82 | TObjArray fCalRocArrayRMS; // Array of AliTPCCalROC class for signal width calibration | |
bdf99a93 | 83 | |
8bc7e885 | 84 | TObjArray fHistoPedestalArray; // Calibration histograms for Pedestal distribution |
bdf99a93 | 85 | |
86 | TArrayF **fTimeSignal; //! Arrays which hold time dependent signals | |
87 | ||
bc331d5b | 88 | TH2F* GetHisto(Int_t sector, TObjArray *arr, |
8bc7e885 | 89 | Int_t nbinsY, Float_t ymin, Float_t ymax, |
90 | Char_t *type, Bool_t force); | |
bdf99a93 | 91 | |
8bc7e885 | 92 | AliTPCCalROC* GetCalRoc(Int_t sector, TObjArray* arr, Bool_t force); |
93 | ||
94 | public: | |
08205ed7 | 95 | ClassDef(AliTPCCalibPedestal, 2) // Implementation of the TPC pedestal and noise calibration |
8bc7e885 | 96 | }; |
97 | ||
98 | ||
99 | ||
100 | #endif | |
101 |