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