The charge at cluster maxima used in the dataQA
[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; }
68 Bool_t GetOldRCUformat() const { return fOldRCUformat; }
69 Bool_t GetIsAnalysed() const { return fIsAnalysed; }
c322f08a 70 void SetRangeTime(Int_t tMin, Int_t tMax){ fFirstTimeBin=tMin; fLastTimeBin=tMax;} // Set time bin range that is used for the pedestal calibration
0ffacf98 71 void SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; } // Set adc range for the pedestal calibration
72
73 void SetOldRCUformat(Bool_t format=kTRUE) { fOldRCUformat = format; }
0ffacf98 74
c322f08a 75
0ffacf98 76private:
266f8637 77 Int_t Update(const Int_t iSector, const Int_t iRow, const Int_t iPad,
78 const Int_t iTimeBin, Float_t signal);
79 void FindLocalMaxima(const Int_t iSector);
80
81 void MakeArrays(); // Create arrays for random data acces
82 void CleanArrays(); // Clean arrays for random data acces
83 void SetExpandDigit(const Int_t iRow, Int_t iPad, Int_t iTimeBin,
84 const Float_t signal); // Fill arrays with signals
85 void GetPadAndTimeBin(Int_t bin, Int_t& iPad, Int_t& iTimeBin); // Get pad and time bin corresponding to the 1d bin
86 Float_t GetQ(const Float_t* adcArray, const Int_t time,
87 const Int_t pad, const Int_t maxTimeBins,
88 Int_t& timeMin,Int_t& timeMax,Int_t& padMin,Int_t& padMax);
89
0ffacf98 90 Int_t fFirstTimeBin; // First Time bin needed for analysis
91 Int_t fLastTimeBin; // Last Time bin needed for analysis
92 Int_t fAdcMin; // min adc channel of pedestal value
93 Int_t fAdcMax; // max adc channel of pedestal value
94 Bool_t fOldRCUformat; //! Should we use the old RCU format for data reading
95
0ffacf98 96 AliTPCAltroMapping **fMapping; //! Altro Mapping object
97 //
98 //
336156cc 99 AliTPCCalPad * fPedestal; //! option to set pedestal cal object
100 AliTPCCalPad * fNoise; //! option to set noise cal object
266f8637 101 AliTPCCalPad * fNLocalMaxima; // local maximas found
f11b3071 102 AliTPCCalPad * fMaxCharge; // max charge
103 AliTPCCalPad * fMeanCharge; // mean charge
104 AliTPCCalPad * fNoThreshold; // number of digits
266f8637 105 AliTPCCalPad * fNTimeBins; // timebins width of cluster
106 AliTPCCalPad * fNPads; // pads with of cluster
107 AliTPCCalPad * fTimePosition; // Time position of local maximum
108 AliTPCCalPad * fOverThreshold10; //! local maxima with qMax over threshold
109 AliTPCCalPad * fOverThreshold20; //! local maxima with qMax over threshold
110 AliTPCCalPad * fOverThreshold30; //! local maxima with qMax over threshold
f11b3071 111
112 Int_t fEventCounter; // event Counter
266f8637 113 Bool_t fIsAnalysed; // Set to true after Analyse has been called
c322f08a 114 //
115 // Expand buffer
116 //
117 Float_t** fAllBins; //! array for digit using random access
118 Int_t** fAllSigBins; //! array of pointers to the indexes over threshold
119 Int_t* fAllNSigBins; //!
266f8637 120 Int_t fRowsMax; //! Maximum number of time bins
121 Int_t fPadsMax; //! Maximum number of time bins
122 Int_t fTimeBinsMax; //! Maximum number of time bins
c322f08a 123
0ffacf98 124
125public:
266f8637 126 ClassDef(AliTPCdataQA, 2) // Implementation of the TPC pedestal and noise calibration
0ffacf98 127};
128
129
130
131#endif
132