]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPCdataQA.h
TPC/AliTPCcalibDButil.cxx(1356): warning #191: type qualifier is meaningless on cast...
[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
12class TArrayF;
13class TH2F;
14class TTreeSRedirector;
15class AliTPCROC;
16class AliTPCCalROC;
17class AliTPCRawStream;
0c25417d 18class AliTPCRawStreamV3;
0ffacf98 19class AliTPCRawStreamFast;
20class AliRawReader;
21class AliTPCAltroMapping;
ac940b58 22class AliTPCCalPad;
23class TMap;
0ffacf98 24struct eventHeaderStruct;
25
336156cc 26class AliTPCdataQA : public TH1F {
0ffacf98 27
28public:
29 AliTPCdataQA();
57acd2d2 30 AliTPCdataQA(AliRecoParam::EventSpecie_t es);
0ffacf98 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 ProcessEventFast(AliTPCRawStreamFast *const rawStreamFast);
41 Bool_t ProcessEventFast(AliRawReader *const rawReader);
42 Bool_t ProcessEvent(AliTPCRawStream *const rawStream);
43 Bool_t ProcessEvent(AliTPCRawStreamV3 *const rawStreamV3);
44 Bool_t ProcessEvent(AliRawReader *const rawReader);
45 Bool_t ProcessEventOld(AliRawReader *const rawReader);
46 Bool_t ProcessEvent(eventHeaderStruct *const event);
0ffacf98 47
0ffacf98 48 void Analyse();
49 //
50 //
6a50ff96 51 void SetPedestal(AliTPCCalPad *const pedestalCal){ fPedestal = pedestalCal;}
52 void SetNoise(AliTPCCalPad *const noiseCal){ fNoise = noiseCal;}
f11b3071 53
266f8637 54 AliTPCCalPad *GetNoThreshold() const { return fNoThreshold;}
55 AliTPCCalPad *GetMaxCharge() const { return fMaxCharge;}
56 AliTPCCalPad *GetMeanCharge() const { return fMeanCharge;}
57 AliTPCCalPad *GetNLocalMaxima() const { return fNLocalMaxima;}
58 AliTPCCalPad *GetOverThreshold10() const { return fOverThreshold10;}
59 AliTPCCalPad *GetOverThreshold20() const { return fOverThreshold20;}
60 AliTPCCalPad *GetOverThreshold30() const { return fOverThreshold30;}
61 AliTPCCalPad *GetNTimeBins() const { return fNTimeBins;}
62 AliTPCCalPad *GetNPads() const { return fNPads;}
63 AliTPCCalPad *GetTimePosition() const { return fTimePosition;}
23c9ab21 64 TProfile* GetHistQVsTimeSideA() const {return fHistQVsTimeSideA;}
65 TProfile* GetHistQVsTimeSideC() const {return fHistQVsTimeSideC;}
66 TProfile* GetHistQMaxVsTimeSideA() const {return fHistQMaxVsTimeSideA;}
67 TProfile* GetHistQMaxVsTimeSideC() const {return fHistQMaxVsTimeSideC;}
ce0175fa 68 TH1F* GetHistOccupancyVsEventConst() const {return fHistOccupancyVsEvent;}
69 TH1F* GetHistNclustersVsEventConst() const {return fHistNclustersVsEvent;}
70 TH1F* GetHistOccupancyVsEvent();
71 TH1F* GetHistNclustersVsEvent();
0ffacf98 72
73 //
6a50ff96 74 AliTPCAltroMapping **GetAltroMapping() const { return fMapping; };
0ffacf98 75 void SetAltroMapping(AliTPCAltroMapping **mapp) { fMapping = mapp; };
76 //
77 //
266f8637 78 Int_t GetFirstTimeBin() const { return fFirstTimeBin; }
79 Int_t GetLastTimeBin() const { return fLastTimeBin; }
80 Int_t GetAdcMin() const { return fAdcMin; }
81 Int_t GetAdcMax() const { return fAdcMax; }
82 Int_t GetEventCounter() const { return fEventCounter; }
266f8637 83 Bool_t GetIsAnalysed() const { return fIsAnalysed; }
ce0175fa 84 Int_t GetMaxEvents() const { return fMaxEvents; }
85 Int_t GetEventsPerBin() const { return fEventsPerBin; }
86 Int_t GetSignalCounter() const { return fSignalCounter; }
87 Int_t GetClusterCounter() const { return fClusterCounter;}
88
c322f08a 89 void SetRangeTime(Int_t tMin, Int_t tMax){ fFirstTimeBin=tMin; fLastTimeBin=tMax;} // Set time bin range that is used for the pedestal calibration
0ffacf98 90 void SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; } // Set adc range for the pedestal calibration
ce0175fa 91 void SetMaxEvents (Int_t value) { fMaxEvents = value; }
92 void SetEventsPerBin(Int_t value) { fEventsPerBin = value; }
c322f08a 93
0ffacf98 94private:
266f8637 95 Int_t Update(const Int_t iSector, const Int_t iRow, const Int_t iPad,
96 const Int_t iTimeBin, Float_t signal);
97 void FindLocalMaxima(const Int_t iSector);
98
99 void MakeArrays(); // Create arrays for random data acces
100 void CleanArrays(); // Clean arrays for random data acces
101 void SetExpandDigit(const Int_t iRow, Int_t iPad, Int_t iTimeBin,
102 const Float_t signal); // Fill arrays with signals
103 void GetPadAndTimeBin(Int_t bin, Int_t& iPad, Int_t& iTimeBin); // Get pad and time bin corresponding to the 1d bin
104 Float_t GetQ(const Float_t* adcArray, const Int_t time,
105 const Int_t pad, const Int_t maxTimeBins,
6a50ff96 106 Int_t& timeMin,Int_t& timeMax,Int_t& padMin,Int_t& padMax) const;
ce0175fa 107 void UpdateEventHistograms();
266f8637 108
0ffacf98 109 Int_t fFirstTimeBin; // First Time bin needed for analysis
110 Int_t fLastTimeBin; // Last Time bin needed for analysis
111 Int_t fAdcMin; // min adc channel of pedestal value
112 Int_t fAdcMax; // max adc channel of pedestal value
0ffacf98 113
0ffacf98 114 AliTPCAltroMapping **fMapping; //! Altro Mapping object
115 //
116 //
336156cc 117 AliTPCCalPad * fPedestal; //! option to set pedestal cal object
118 AliTPCCalPad * fNoise; //! option to set noise cal object
266f8637 119 AliTPCCalPad * fNLocalMaxima; // local maximas found
f11b3071 120 AliTPCCalPad * fMaxCharge; // max charge
121 AliTPCCalPad * fMeanCharge; // mean charge
122 AliTPCCalPad * fNoThreshold; // number of digits
266f8637 123 AliTPCCalPad * fNTimeBins; // timebins width of cluster
124 AliTPCCalPad * fNPads; // pads with of cluster
125 AliTPCCalPad * fTimePosition; // Time position of local maximum
126 AliTPCCalPad * fOverThreshold10; //! local maxima with qMax over threshold
127 AliTPCCalPad * fOverThreshold20; //! local maxima with qMax over threshold
128 AliTPCCalPad * fOverThreshold30; //! local maxima with qMax over threshold
f11b3071 129
23c9ab21 130 TProfile* fHistQVsTimeSideA; // Q vs time (side A)
131 TProfile* fHistQVsTimeSideC; // Q vs time (side C)
132 TProfile* fHistQMaxVsTimeSideA; // QMax vs time (side A)
133 TProfile* fHistQMaxVsTimeSideC; // QMax vs time (side C)
134
ce0175fa 135 TH1F* fHistOccupancyVsEvent; // Occupancy vs event number (~time)
136 TH1F* fHistNclustersVsEvent; // Nclusters vs event number (~time)
137
f11b3071 138 Int_t fEventCounter; // event Counter
266f8637 139 Bool_t fIsAnalysed; // Set to true after Analyse has been called
ce0175fa 140
141 Int_t fMaxEvents; // Max events for event histograms
142 Int_t fEventsPerBin; // Events per bin for event histograms
143 Int_t fSignalCounter; // Signal counter
144 Int_t fClusterCounter; // Cluster counter
c322f08a 145 //
146 // Expand buffer
147 //
148 Float_t** fAllBins; //! array for digit using random access
149 Int_t** fAllSigBins; //! array of pointers to the indexes over threshold
150 Int_t* fAllNSigBins; //!
266f8637 151 Int_t fRowsMax; //! Maximum number of time bins
152 Int_t fPadsMax; //! Maximum number of time bins
153 Int_t fTimeBinsMax; //! Maximum number of time bins
c322f08a 154
ce0175fa 155 ClassDef(AliTPCdataQA, 5) // Implementation of the TPC Raw QA
0ffacf98 156};
157
158
159
160#endif
161