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