]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPCdataQA.h
AliTPCRecoParam.cxx - Removing old comment
[u/mrichter/AliRoot.git] / TPC / AliTPCdataQA.h
CommitLineData
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>
92ae9768 9#include <TProfile.h>
10#include <TProfile2D.h>
57acd2d2 11#include "AliRecoParam.h"
0ffacf98 12
0ab2a4cc 13#include <TArray.h>
14
0ffacf98 15class TH2F;
16class TTreeSRedirector;
17class AliTPCROC;
18class AliTPCCalROC;
19class AliTPCRawStream;
0c25417d 20class AliTPCRawStreamV3;
0ffacf98 21class AliRawReader;
22class AliTPCAltroMapping;
ac940b58 23class AliTPCCalPad;
24class TMap;
0ffacf98 25struct eventHeaderStruct;
26
336156cc 27class AliTPCdataQA : public TH1F {
0ffacf98 28
29public:
30 AliTPCdataQA();
31 AliTPCdataQA(const AliTPCdataQA &ped);
8ba97cc8 32 AliTPCdataQA(const TMap *config);
0ffacf98 33 virtual ~AliTPCdataQA();
34
35 AliTPCdataQA& operator = (const AliTPCdataQA &source);
8368e0ee 36 void DumpToFile(const Char_t *filename, const Char_t *dir="", Bool_t append=kFALSE);
6a50ff96 37 void MakeTree(const char *fname="QApad.root") const;
258cd111 38
0ffacf98 39 //
6a50ff96 40 Bool_t ProcessEvent(AliTPCRawStream *const rawStream);
41 Bool_t ProcessEvent(AliTPCRawStreamV3 *const rawStreamV3);
42 Bool_t ProcessEvent(AliRawReader *const rawReader);
43 Bool_t ProcessEventOld(AliRawReader *const rawReader);
44 Bool_t ProcessEvent(eventHeaderStruct *const event);
0ffacf98 45
0ffacf98 46 void Analyse();
47 //
48 //
6a50ff96 49 void SetPedestal(AliTPCCalPad *const pedestalCal){ fPedestal = pedestalCal;}
50 void SetNoise(AliTPCCalPad *const noiseCal){ fNoise = noiseCal;}
f11b3071 51
0ab2a4cc 52 // DQM methods
53 void FillOccupancyProfile();
54 void ResetProfiles();
55
56
266f8637 57 AliTPCCalPad *GetNoThreshold() const { return fNoThreshold;}
58 AliTPCCalPad *GetMaxCharge() const { return fMaxCharge;}
59 AliTPCCalPad *GetMeanCharge() const { return fMeanCharge;}
60 AliTPCCalPad *GetNLocalMaxima() const { return fNLocalMaxima;}
61 AliTPCCalPad *GetOverThreshold10() const { return fOverThreshold10;}
62 AliTPCCalPad *GetOverThreshold20() const { return fOverThreshold20;}
63 AliTPCCalPad *GetOverThreshold30() const { return fOverThreshold30;}
64 AliTPCCalPad *GetNTimeBins() const { return fNTimeBins;}
65 AliTPCCalPad *GetNPads() const { return fNPads;}
66 AliTPCCalPad *GetTimePosition() const { return fTimePosition;}
23c9ab21 67 TProfile* GetHistQVsTimeSideA() const {return fHistQVsTimeSideA;}
68 TProfile* GetHistQVsTimeSideC() const {return fHistQVsTimeSideC;}
69 TProfile* GetHistQMaxVsTimeSideA() const {return fHistQMaxVsTimeSideA;}
70 TProfile* GetHistQMaxVsTimeSideC() const {return fHistQMaxVsTimeSideC;}
ce0175fa 71 TH1F* GetHistOccupancyVsEventConst() const {return fHistOccupancyVsEvent;}
72 TH1F* GetHistNclustersVsEventConst() const {return fHistNclustersVsEvent;}
73 TH1F* GetHistOccupancyVsEvent();
74 TH1F* GetHistNclustersVsEvent();
0ffacf98 75
0ab2a4cc 76 // DQM output
77 TProfile* GetHistOccVsSector() const { return fHistOccVsSector; }
92ae9768 78 TProfile2D* GetHistOcc2dVsSector() const { return fHistOcc2dVsSector; }
0ab2a4cc 79 TProfile* GetHistQVsSector() const { return fHistQVsSector; }
80 TProfile* GetHistQmaxVsSector() const { return fHistQmaxVsSector; }
81
0ffacf98 82 //
6a50ff96 83 AliTPCAltroMapping **GetAltroMapping() const { return fMapping; };
0ffacf98 84 void SetAltroMapping(AliTPCAltroMapping **mapp) { fMapping = mapp; };
85 //
86 //
266f8637 87 Int_t GetFirstTimeBin() const { return fFirstTimeBin; }
88 Int_t GetLastTimeBin() const { return fLastTimeBin; }
89 Int_t GetAdcMin() const { return fAdcMin; }
90 Int_t GetAdcMax() const { return fAdcMax; }
91 Int_t GetEventCounter() const { return fEventCounter; }
266f8637 92 Bool_t GetIsAnalysed() const { return fIsAnalysed; }
ce0175fa 93 Int_t GetMaxEvents() const { return fMaxEvents; }
94 Int_t GetEventsPerBin() const { return fEventsPerBin; }
95 Int_t GetSignalCounter() const { return fSignalCounter; }
96 Int_t GetClusterCounter() const { return fClusterCounter;}
97
0ab2a4cc 98 // DQM getter
99 Bool_t GetIsDQM() const { return fIsDQM; }
100
c322f08a 101 void SetRangeTime(Int_t tMin, Int_t tMax){ fFirstTimeBin=tMin; fLastTimeBin=tMax;} // Set time bin range that is used for the pedestal calibration
0ffacf98 102 void SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; } // Set adc range for the pedestal calibration
ce0175fa 103 void SetMaxEvents (Int_t value) { fMaxEvents = value; }
104 void SetEventsPerBin(Int_t value) { fEventsPerBin = value; }
0ab2a4cc 105
106 // DQM setter
107 void SetIsDQM(Bool_t value) { fIsDQM = value; }
c322f08a 108
0ffacf98 109private:
266f8637 110 Int_t Update(const Int_t iSector, const Int_t iRow, const Int_t iPad,
92ae9768 111 const Int_t iTimeBin, Float_t signal,
112 const Int_t iPatch=-1, const Int_t iBranch=-1);
266f8637 113 void FindLocalMaxima(const Int_t iSector);
114
115 void MakeArrays(); // Create arrays for random data acces
116 void CleanArrays(); // Clean arrays for random data acces
117 void SetExpandDigit(const Int_t iRow, Int_t iPad, Int_t iTimeBin,
118 const Float_t signal); // Fill arrays with signals
119 void GetPadAndTimeBin(Int_t bin, Int_t& iPad, Int_t& iTimeBin); // Get pad and time bin corresponding to the 1d bin
120 Float_t GetQ(const Float_t* adcArray, const Int_t time,
121 const Int_t pad, const Int_t maxTimeBins,
6a50ff96 122 Int_t& timeMin,Int_t& timeMax,Int_t& padMin,Int_t& padMax) const;
ce0175fa 123 void UpdateEventHistograms();
266f8637 124
0ffacf98 125 Int_t fFirstTimeBin; // First Time bin needed for analysis
126 Int_t fLastTimeBin; // Last Time bin needed for analysis
127 Int_t fAdcMin; // min adc channel of pedestal value
128 Int_t fAdcMax; // max adc channel of pedestal value
0ffacf98 129
0ffacf98 130 AliTPCAltroMapping **fMapping; //! Altro Mapping object
131 //
132 //
336156cc 133 AliTPCCalPad * fPedestal; //! option to set pedestal cal object
134 AliTPCCalPad * fNoise; //! option to set noise cal object
266f8637 135 AliTPCCalPad * fNLocalMaxima; // local maximas found
f11b3071 136 AliTPCCalPad * fMaxCharge; // max charge
137 AliTPCCalPad * fMeanCharge; // mean charge
138 AliTPCCalPad * fNoThreshold; // number of digits
266f8637 139 AliTPCCalPad * fNTimeBins; // timebins width of cluster
140 AliTPCCalPad * fNPads; // pads with of cluster
141 AliTPCCalPad * fTimePosition; // Time position of local maximum
142 AliTPCCalPad * fOverThreshold10; //! local maxima with qMax over threshold
143 AliTPCCalPad * fOverThreshold20; //! local maxima with qMax over threshold
144 AliTPCCalPad * fOverThreshold30; //! local maxima with qMax over threshold
f11b3071 145
23c9ab21 146 TProfile* fHistQVsTimeSideA; // Q vs time (side A)
147 TProfile* fHistQVsTimeSideC; // Q vs time (side C)
148 TProfile* fHistQMaxVsTimeSideA; // QMax vs time (side A)
149 TProfile* fHistQMaxVsTimeSideC; // QMax vs time (side C)
150
ce0175fa 151 TH1F* fHistOccupancyVsEvent; // Occupancy vs event number (~time)
152 TH1F* fHistNclustersVsEvent; // Nclusters vs event number (~time)
153
f11b3071 154 Int_t fEventCounter; // event Counter
266f8637 155 Bool_t fIsAnalysed; // Set to true after Analyse has been called
ce0175fa 156
157 Int_t fMaxEvents; // Max events for event histograms
158 Int_t fEventsPerBin; // Events per bin for event histograms
159 Int_t fSignalCounter; // Signal counter
160 Int_t fClusterCounter; // Cluster counter
c322f08a 161 //
162 // Expand buffer
163 //
164 Float_t** fAllBins; //! array for digit using random access
165 Int_t** fAllSigBins; //! array of pointers to the indexes over threshold
166 Int_t* fAllNSigBins; //!
266f8637 167 Int_t fRowsMax; //! Maximum number of time bins
168 Int_t fPadsMax; //! Maximum number of time bins
169 Int_t fTimeBinsMax; //! Maximum number of time bins
c322f08a 170
0ab2a4cc 171 // DQM variables
172 Bool_t fIsDQM; //! Is DQM -> Simple output (no 2D!)
173 TProfile* fHistOccVsSector; //! Occ vs sector (for DQM only)
92ae9768 174 TProfile2D* fHistOcc2dVsSector; //! Occ vs sector 2D (for DQM only)
0ab2a4cc 175 TProfile* fHistQVsSector; //! Q vs sector (for DQM only)
176 TProfile* fHistQmaxVsSector; //! QMax vs sector (for DQM only)
177 TArrayD* fOccVec; //! Occupancy help counter for DQM
178 TArrayD* fOccMaxVec; //! Occupancy help normlization for DQM
92ae9768 179 TArrayD* fOccVecFine; //! "2D" occupancy help counter for DQM
180 TArrayD* fOccMaxVecFine; //! "2D" occupancy help normlization for DQM
0ab2a4cc 181
182
ce0175fa 183 ClassDef(AliTPCdataQA, 5) // Implementation of the TPC Raw QA
0ffacf98 184};
185
186
187
188#endif
189