]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPCdataQA.h
Adding pad type correction (Marian)
[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>
0ffacf98 9#include <TObjArray.h>
10
11class TArrayF;
12class TH2F;
13class TTreeSRedirector;
14class AliTPCROC;
15class AliTPCCalROC;
16class AliTPCRawStream;
17class AliTPCRawStreamFast;
18class AliRawReader;
19class AliTPCAltroMapping;
20class AliTPCCalPad;
21struct eventHeaderStruct;
22
336156cc 23class AliTPCdataQA : public TH1F {
0ffacf98 24
25public:
26 AliTPCdataQA();
27 AliTPCdataQA(const AliTPCdataQA &ped);
28 virtual ~AliTPCdataQA();
29
30 AliTPCdataQA& operator = (const AliTPCdataQA &source);
31 void DumpToFile(const Char_t *filename, const Char_t *dir="", const Bool_t append=kFALSE);
258cd111 32 void MakeTree(const char *fname="QApad.root");
33
0ffacf98 34 //
35 Bool_t ProcessEventFast(AliTPCRawStreamFast *rawStreamFast);
36 Bool_t ProcessEventFast(AliRawReader *rawReader);
37 Bool_t ProcessEvent(AliTPCRawStream *rawStream);
38 Bool_t ProcessEvent(AliRawReader *rawReader);
39 Bool_t ProcessEvent(eventHeaderStruct *event);
40
0ffacf98 41 void Analyse();
42 //
43 //
f11b3071 44 void SetPedestal(AliTPCCalPad *pedestalCal){ fPedestal = pedestalCal;}
45 void SetNoise(AliTPCCalPad *noiseCal){ fNoise = noiseCal;}
46
266f8637 47 AliTPCCalPad *GetNoThreshold() const { return fNoThreshold;}
48 AliTPCCalPad *GetMaxCharge() const { return fMaxCharge;}
49 AliTPCCalPad *GetMeanCharge() const { return fMeanCharge;}
50 AliTPCCalPad *GetNLocalMaxima() const { return fNLocalMaxima;}
51 AliTPCCalPad *GetOverThreshold10() const { return fOverThreshold10;}
52 AliTPCCalPad *GetOverThreshold20() const { return fOverThreshold20;}
53 AliTPCCalPad *GetOverThreshold30() const { return fOverThreshold30;}
54 AliTPCCalPad *GetNTimeBins() const { return fNTimeBins;}
55 AliTPCCalPad *GetNPads() const { return fNPads;}
56 AliTPCCalPad *GetTimePosition() const { return fTimePosition;}
0ffacf98 57
58 //
59 AliTPCAltroMapping **GetAltroMapping() { return fMapping; };
60 void SetAltroMapping(AliTPCAltroMapping **mapp) { fMapping = mapp; };
61 //
62 //
266f8637 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 Int_t GetEventCounter() const { return fEventCounter; }
266f8637 68 Bool_t GetIsAnalysed() const { return fIsAnalysed; }
c322f08a 69 void SetRangeTime(Int_t tMin, Int_t tMax){ fFirstTimeBin=tMin; fLastTimeBin=tMax;} // Set time bin range that is used for the pedestal calibration
0ffacf98 70 void SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; } // Set adc range for the pedestal calibration
71
0ffacf98 72
c322f08a 73
0ffacf98 74private:
266f8637 75 Int_t Update(const Int_t iSector, const Int_t iRow, const Int_t iPad,
76 const Int_t iTimeBin, Float_t signal);
77 void FindLocalMaxima(const Int_t iSector);
78
79 void MakeArrays(); // Create arrays for random data acces
80 void CleanArrays(); // Clean arrays for random data acces
81 void SetExpandDigit(const Int_t iRow, Int_t iPad, Int_t iTimeBin,
82 const Float_t signal); // Fill arrays with signals
83 void GetPadAndTimeBin(Int_t bin, Int_t& iPad, Int_t& iTimeBin); // Get pad and time bin corresponding to the 1d bin
84 Float_t GetQ(const Float_t* adcArray, const Int_t time,
85 const Int_t pad, const Int_t maxTimeBins,
86 Int_t& timeMin,Int_t& timeMax,Int_t& padMin,Int_t& padMax);
87
0ffacf98 88 Int_t fFirstTimeBin; // First Time bin needed for analysis
89 Int_t fLastTimeBin; // Last Time bin needed for analysis
90 Int_t fAdcMin; // min adc channel of pedestal value
91 Int_t fAdcMax; // max adc channel of pedestal value
0ffacf98 92
0ffacf98 93 AliTPCAltroMapping **fMapping; //! Altro Mapping object
94 //
95 //
336156cc 96 AliTPCCalPad * fPedestal; //! option to set pedestal cal object
97 AliTPCCalPad * fNoise; //! option to set noise cal object
266f8637 98 AliTPCCalPad * fNLocalMaxima; // local maximas found
f11b3071 99 AliTPCCalPad * fMaxCharge; // max charge
100 AliTPCCalPad * fMeanCharge; // mean charge
101 AliTPCCalPad * fNoThreshold; // number of digits
266f8637 102 AliTPCCalPad * fNTimeBins; // timebins width of cluster
103 AliTPCCalPad * fNPads; // pads with of cluster
104 AliTPCCalPad * fTimePosition; // Time position of local maximum
105 AliTPCCalPad * fOverThreshold10; //! local maxima with qMax over threshold
106 AliTPCCalPad * fOverThreshold20; //! local maxima with qMax over threshold
107 AliTPCCalPad * fOverThreshold30; //! local maxima with qMax over threshold
f11b3071 108
109 Int_t fEventCounter; // event Counter
266f8637 110 Bool_t fIsAnalysed; // Set to true after Analyse has been called
c322f08a 111 //
112 // Expand buffer
113 //
114 Float_t** fAllBins; //! array for digit using random access
115 Int_t** fAllSigBins; //! array of pointers to the indexes over threshold
116 Int_t* fAllNSigBins; //!
266f8637 117 Int_t fRowsMax; //! Maximum number of time bins
118 Int_t fPadsMax; //! Maximum number of time bins
119 Int_t fTimeBinsMax; //! Maximum number of time bins
c322f08a 120
0ffacf98 121
122public:
9a090ccd 123 ClassDef(AliTPCdataQA, 3) // Implementation of the TPC pedestal and noise calibration
0ffacf98 124};
125
126
127
128#endif
129