]>
Commit | Line | Data |
---|---|---|
0ffacf98 | 1 | #ifndef ALITPCDATAQA_H |
2 | #define ALITPCDATAQA_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | ||
7 | ||
336156cc | 8 | #include <TH1F.h> |
23c9ab21 | 9 | #include <TProfile.h> |
0ffacf98 | 10 | #include <TObjArray.h> |
57acd2d2 | 11 | #include "AliRecoParam.h" |
0ffacf98 | 12 | |
13 | class TArrayF; | |
14 | class TH2F; | |
15 | class TTreeSRedirector; | |
16 | class AliTPCROC; | |
17 | class AliTPCCalROC; | |
18 | class AliTPCRawStream; | |
0c25417d | 19 | class AliTPCRawStreamV3; |
0ffacf98 | 20 | class AliTPCRawStreamFast; |
21 | class AliRawReader; | |
22 | class AliTPCAltroMapping; | |
ac940b58 | 23 | class AliTPCCalPad; |
24 | class TMap; | |
0ffacf98 | 25 | struct eventHeaderStruct; |
26 | ||
336156cc | 27 | class AliTPCdataQA : public TH1F { |
0ffacf98 | 28 | |
29 | public: | |
30 | AliTPCdataQA(); | |
57acd2d2 | 31 | AliTPCdataQA(AliRecoParam::EventSpecie_t es); |
0ffacf98 | 32 | AliTPCdataQA(const AliTPCdataQA &ped); |
8ba97cc8 | 33 | AliTPCdataQA(const TMap *config); |
0ffacf98 | 34 | virtual ~AliTPCdataQA(); |
35 | ||
36 | AliTPCdataQA& operator = (const AliTPCdataQA &source); | |
8368e0ee | 37 | void DumpToFile(const Char_t *filename, const Char_t *dir="", Bool_t append=kFALSE); |
258cd111 | 38 | void MakeTree(const char *fname="QApad.root"); |
39 | ||
0ffacf98 | 40 | // |
41 | Bool_t ProcessEventFast(AliTPCRawStreamFast *rawStreamFast); | |
42 | Bool_t ProcessEventFast(AliRawReader *rawReader); | |
43 | Bool_t ProcessEvent(AliTPCRawStream *rawStream); | |
0c25417d | 44 | Bool_t ProcessEvent(AliTPCRawStreamV3 *rawStreamV3); |
0ffacf98 | 45 | Bool_t ProcessEvent(AliRawReader *rawReader); |
0c25417d | 46 | Bool_t ProcessEventOld(AliRawReader *rawReader); |
0ffacf98 | 47 | Bool_t ProcessEvent(eventHeaderStruct *event); |
48 | ||
0ffacf98 | 49 | void Analyse(); |
50 | // | |
51 | // | |
f11b3071 | 52 | void SetPedestal(AliTPCCalPad *pedestalCal){ fPedestal = pedestalCal;} |
53 | void SetNoise(AliTPCCalPad *noiseCal){ fNoise = noiseCal;} | |
54 | ||
266f8637 | 55 | AliTPCCalPad *GetNoThreshold() const { return fNoThreshold;} |
56 | AliTPCCalPad *GetMaxCharge() const { return fMaxCharge;} | |
57 | AliTPCCalPad *GetMeanCharge() const { return fMeanCharge;} | |
58 | AliTPCCalPad *GetNLocalMaxima() const { return fNLocalMaxima;} | |
59 | AliTPCCalPad *GetOverThreshold10() const { return fOverThreshold10;} | |
60 | AliTPCCalPad *GetOverThreshold20() const { return fOverThreshold20;} | |
61 | AliTPCCalPad *GetOverThreshold30() const { return fOverThreshold30;} | |
62 | AliTPCCalPad *GetNTimeBins() const { return fNTimeBins;} | |
63 | AliTPCCalPad *GetNPads() const { return fNPads;} | |
64 | AliTPCCalPad *GetTimePosition() const { return fTimePosition;} | |
23c9ab21 | 65 | TProfile* GetHistQVsTimeSideA() const {return fHistQVsTimeSideA;} |
66 | TProfile* GetHistQVsTimeSideC() const {return fHistQVsTimeSideC;} | |
67 | TProfile* GetHistQMaxVsTimeSideA() const {return fHistQMaxVsTimeSideA;} | |
68 | TProfile* GetHistQMaxVsTimeSideC() const {return fHistQMaxVsTimeSideC;} | |
0ffacf98 | 69 | |
70 | // | |
71 | AliTPCAltroMapping **GetAltroMapping() { return fMapping; }; | |
72 | void SetAltroMapping(AliTPCAltroMapping **mapp) { fMapping = mapp; }; | |
73 | // | |
74 | // | |
266f8637 | 75 | Int_t GetFirstTimeBin() const { return fFirstTimeBin; } |
76 | Int_t GetLastTimeBin() const { return fLastTimeBin; } | |
77 | Int_t GetAdcMin() const { return fAdcMin; } | |
78 | Int_t GetAdcMax() const { return fAdcMax; } | |
79 | Int_t GetEventCounter() const { return fEventCounter; } | |
266f8637 | 80 | Bool_t GetIsAnalysed() const { return fIsAnalysed; } |
c322f08a | 81 | void SetRangeTime(Int_t tMin, Int_t tMax){ fFirstTimeBin=tMin; fLastTimeBin=tMax;} // Set time bin range that is used for the pedestal calibration |
0ffacf98 | 82 | void SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; } // Set adc range for the pedestal calibration |
83 | ||
0ffacf98 | 84 | |
c322f08a | 85 | |
0ffacf98 | 86 | private: |
266f8637 | 87 | Int_t Update(const Int_t iSector, const Int_t iRow, const Int_t iPad, |
88 | const Int_t iTimeBin, Float_t signal); | |
89 | void FindLocalMaxima(const Int_t iSector); | |
90 | ||
91 | void MakeArrays(); // Create arrays for random data acces | |
92 | void CleanArrays(); // Clean arrays for random data acces | |
93 | void SetExpandDigit(const Int_t iRow, Int_t iPad, Int_t iTimeBin, | |
94 | const Float_t signal); // Fill arrays with signals | |
95 | void GetPadAndTimeBin(Int_t bin, Int_t& iPad, Int_t& iTimeBin); // Get pad and time bin corresponding to the 1d bin | |
96 | Float_t GetQ(const Float_t* adcArray, const Int_t time, | |
97 | const Int_t pad, const Int_t maxTimeBins, | |
98 | Int_t& timeMin,Int_t& timeMax,Int_t& padMin,Int_t& padMax); | |
99 | ||
0ffacf98 | 100 | Int_t fFirstTimeBin; // First Time bin needed for analysis |
101 | Int_t fLastTimeBin; // Last Time bin needed for analysis | |
102 | Int_t fAdcMin; // min adc channel of pedestal value | |
103 | Int_t fAdcMax; // max adc channel of pedestal value | |
0ffacf98 | 104 | |
0ffacf98 | 105 | AliTPCAltroMapping **fMapping; //! Altro Mapping object |
106 | // | |
107 | // | |
336156cc | 108 | AliTPCCalPad * fPedestal; //! option to set pedestal cal object |
109 | AliTPCCalPad * fNoise; //! option to set noise cal object | |
266f8637 | 110 | AliTPCCalPad * fNLocalMaxima; // local maximas found |
f11b3071 | 111 | AliTPCCalPad * fMaxCharge; // max charge |
112 | AliTPCCalPad * fMeanCharge; // mean charge | |
113 | AliTPCCalPad * fNoThreshold; // number of digits | |
266f8637 | 114 | AliTPCCalPad * fNTimeBins; // timebins width of cluster |
115 | AliTPCCalPad * fNPads; // pads with of cluster | |
116 | AliTPCCalPad * fTimePosition; // Time position of local maximum | |
117 | AliTPCCalPad * fOverThreshold10; //! local maxima with qMax over threshold | |
118 | AliTPCCalPad * fOverThreshold20; //! local maxima with qMax over threshold | |
119 | AliTPCCalPad * fOverThreshold30; //! local maxima with qMax over threshold | |
f11b3071 | 120 | |
23c9ab21 | 121 | TProfile* fHistQVsTimeSideA; // Q vs time (side A) |
122 | TProfile* fHistQVsTimeSideC; // Q vs time (side C) | |
123 | TProfile* fHistQMaxVsTimeSideA; // QMax vs time (side A) | |
124 | TProfile* fHistQMaxVsTimeSideC; // QMax vs time (side C) | |
125 | ||
f11b3071 | 126 | Int_t fEventCounter; // event Counter |
266f8637 | 127 | Bool_t fIsAnalysed; // Set to true after Analyse has been called |
c322f08a | 128 | // |
129 | // Expand buffer | |
130 | // | |
131 | Float_t** fAllBins; //! array for digit using random access | |
132 | Int_t** fAllSigBins; //! array of pointers to the indexes over threshold | |
133 | Int_t* fAllNSigBins; //! | |
266f8637 | 134 | Int_t fRowsMax; //! Maximum number of time bins |
135 | Int_t fPadsMax; //! Maximum number of time bins | |
136 | Int_t fTimeBinsMax; //! Maximum number of time bins | |
c322f08a | 137 | |
0ffacf98 | 138 | |
139 | public: | |
23c9ab21 | 140 | ClassDef(AliTPCdataQA, 4) // Implementation of the TPC pedestal and noise calibration |
0ffacf98 | 141 | }; |
142 | ||
143 | ||
144 | ||
145 | #endif | |
146 |