]>
Commit | Line | Data |
---|---|---|
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 | // Implementation of the TPC pedestal calibration // | |
9 | // // | |
10 | ///////////////////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #include <TObjArray.h> | |
13 | #include "AliTPCCalibRawBase.h" | |
14 | ||
15 | class TArrayF; | |
16 | class TH2F; | |
17 | class TTreeSRedirector; | |
18 | class AliTPCROC; | |
19 | class AliTPCCalROC; | |
20 | class AliTPCRawStream; | |
21 | class AliTPCRawStreamFast; | |
22 | class AliRawReader; | |
23 | class TMap; | |
24 | ||
25 | struct eventHeaderStruct; | |
26 | ||
27 | class AliTPCCalibPedestal : public AliTPCCalibRawBase { | |
28 | ||
29 | public: | |
30 | AliTPCCalibPedestal(); | |
31 | AliTPCCalibPedestal(const AliTPCCalibPedestal &ped); | |
32 | AliTPCCalibPedestal(const TMap *config); | |
33 | virtual ~AliTPCCalibPedestal(); | |
34 | ||
35 | AliTPCCalibPedestal& operator = (const AliTPCCalibPedestal &source); | |
36 | ||
37 | virtual Int_t Update(const Int_t isector, const Int_t iRow, const Int_t iPad, | |
38 | const Int_t iTimeBin, const Float_t signal); | |
39 | virtual void Analyse(); | |
40 | // | |
41 | AliTPCCalROC* GetCalRocPedestal (Int_t sector, Bool_t force=kFALSE); // get calibration object - sector | |
42 | AliTPCCalROC* GetCalRocSigma(Int_t sector, Bool_t force=kFALSE); // get calibration object - sector | |
43 | const TObjArray* GetCalPadPedestal() const {return &fCalRocArrayPedestal;} // get calibration object | |
44 | const TObjArray* GetCalPadSigma() const {return &fCalRocArraySigma;} // get calibration object | |
45 | ||
46 | AliTPCCalROC* GetCalRocMean (Int_t sector, Bool_t force=kFALSE); // get calibration object - sector | |
47 | AliTPCCalROC* GetCalRocRMS(Int_t sector, Bool_t force=kFALSE); // get calibration object - sector | |
48 | const TObjArray* GetCalPadMean() const {return &fCalRocArrayMean;} // get calibration object | |
49 | const TObjArray* GetCalPadRMS() const {return &fCalRocArrayRMS;} // get calibration object | |
50 | ||
51 | TH2F* GetHistoPedestal (Int_t sector, Bool_t force=kFALSE); // get refernce histogram | |
52 | // | |
53 | void SetTimeAnalysis(Bool_t time = kTRUE); // Use ONLY in TPCPEDESTALda on LDC for one sector! | |
54 | void AnalyseTime(Int_t nevents); // Makes sense only in TPCPEDESTALda on LDC! | |
55 | TArrayF **GetTimePedestals() const { return fTimeSignal; } // Get array with time dependent pedestals (for one sector!) | |
56 | // | |
57 | Int_t GetAdcMin() const { return fAdcMin; } | |
58 | Int_t GetAdcMax() const { return fAdcMax; } | |
59 | Float_t GetAnaMeanDown() const { return fAnaMeanDown; } | |
60 | Float_t GetAnaMeanUp() const { return fAnaMeanUp; } | |
61 | ||
62 | void SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; } // Set adc range for the pedestal calibration | |
63 | void SetAnalysisTruncationRange(Float_t down, Float_t up) {fAnaMeanDown=down; fAnaMeanUp=up;} //Set range for truncated mean analysis of the channel information | |
64 | ||
65 | void Merge(AliTPCCalibPedestal * const ped); | |
66 | virtual Long64_t Merge(TCollection * const list); | |
67 | ||
68 | Bool_t TestEvent(); // Test the fast approach to fill histogram - used for test purposes | |
69 | ||
70 | private: | |
71 | Int_t fAdcMin; // min adc channel of pedestal value | |
72 | Int_t fAdcMax; // max adc channel of pedestal value | |
73 | ||
74 | Float_t fAnaMeanDown; // Truncated mean channel analysis - lower cut | |
75 | Float_t fAnaMeanUp; // Truncated mean channel analysis - upper cut | |
76 | ||
77 | Bool_t fTimeAnalysis; //! Should we use the time dependent analysis? ONLY ON LDC! | |
78 | ||
79 | TObjArray fCalRocArrayPedestal; // Array of AliTPCCalROC class for pedestal values from gaus fit | |
80 | TObjArray fCalRocArraySigma; // Array of AliTPCCalROC class for noise values from gaus fit | |
81 | ||
82 | TObjArray fHistoPedestalArray; // Calibration histograms for Pedestal distribution | |
83 | ||
84 | TArrayF **fTimeSignal; //! Arrays which hold time dependent signals | |
85 | ||
86 | TObjArray fCalRocArrayMean; // Array of AliTPCCalROC class for pedestal values, simple mean | |
87 | TObjArray fCalRocArrayRMS; // Array of AliTPCCalROC class for noise values, simple rms | |
88 | ||
89 | TH2F* GetHisto(Int_t sector, TObjArray *arr, | |
90 | Int_t nbinsY, Float_t ymin, Float_t ymax, | |
91 | const Char_t *type, Bool_t force); | |
92 | ||
93 | AliTPCCalROC* GetCalRoc(Int_t sector, TObjArray* arr, Bool_t force); | |
94 | ||
95 | ClassDef(AliTPCCalibPedestal, 7) // Implementation of the TPC pedestal and noise calibration | |
96 | }; | |
97 | ||
98 | ||
99 | ||
100 | #endif | |
101 |