]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPCdataQA.h
Adding solarisCC5
[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;
ac940b58 20class AliTPCCalPad;
21class TMap;
0ffacf98 22struct eventHeaderStruct;
23
336156cc 24class AliTPCdataQA : public TH1F {
0ffacf98 25
26public:
27 AliTPCdataQA();
28 AliTPCdataQA(const AliTPCdataQA &ped);
ac940b58 29 AliTPCdataQA(TMap *config);
0ffacf98 30 virtual ~AliTPCdataQA();
31
32 AliTPCdataQA& operator = (const AliTPCdataQA &source);
33 void DumpToFile(const Char_t *filename, const Char_t *dir="", const Bool_t append=kFALSE);
258cd111 34 void MakeTree(const char *fname="QApad.root");
35
0ffacf98 36 //
37 Bool_t ProcessEventFast(AliTPCRawStreamFast *rawStreamFast);
38 Bool_t ProcessEventFast(AliRawReader *rawReader);
39 Bool_t ProcessEvent(AliTPCRawStream *rawStream);
40 Bool_t ProcessEvent(AliRawReader *rawReader);
41 Bool_t ProcessEvent(eventHeaderStruct *event);
42
0ffacf98 43 void Analyse();
44 //
45 //
f11b3071 46 void SetPedestal(AliTPCCalPad *pedestalCal){ fPedestal = pedestalCal;}
47 void SetNoise(AliTPCCalPad *noiseCal){ fNoise = noiseCal;}
48
266f8637 49 AliTPCCalPad *GetNoThreshold() const { return fNoThreshold;}
50 AliTPCCalPad *GetMaxCharge() const { return fMaxCharge;}
51 AliTPCCalPad *GetMeanCharge() const { return fMeanCharge;}
52 AliTPCCalPad *GetNLocalMaxima() const { return fNLocalMaxima;}
53 AliTPCCalPad *GetOverThreshold10() const { return fOverThreshold10;}
54 AliTPCCalPad *GetOverThreshold20() const { return fOverThreshold20;}
55 AliTPCCalPad *GetOverThreshold30() const { return fOverThreshold30;}
56 AliTPCCalPad *GetNTimeBins() const { return fNTimeBins;}
57 AliTPCCalPad *GetNPads() const { return fNPads;}
58 AliTPCCalPad *GetTimePosition() const { return fTimePosition;}
0ffacf98 59
60 //
61 AliTPCAltroMapping **GetAltroMapping() { return fMapping; };
62 void SetAltroMapping(AliTPCAltroMapping **mapp) { fMapping = mapp; };
63 //
64 //
266f8637 65 Int_t GetFirstTimeBin() const { return fFirstTimeBin; }
66 Int_t GetLastTimeBin() const { return fLastTimeBin; }
67 Int_t GetAdcMin() const { return fAdcMin; }
68 Int_t GetAdcMax() const { return fAdcMax; }
69 Int_t GetEventCounter() const { return fEventCounter; }
266f8637 70 Bool_t GetIsAnalysed() const { return fIsAnalysed; }
c322f08a 71 void SetRangeTime(Int_t tMin, Int_t tMax){ fFirstTimeBin=tMin; fLastTimeBin=tMax;} // Set time bin range that is used for the pedestal calibration
0ffacf98 72 void SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; } // Set adc range for the pedestal calibration
73
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
0ffacf98 94
0ffacf98 95 AliTPCAltroMapping **fMapping; //! Altro Mapping object
96 //
97 //
336156cc 98 AliTPCCalPad * fPedestal; //! option to set pedestal cal object
99 AliTPCCalPad * fNoise; //! option to set noise cal object
266f8637 100 AliTPCCalPad * fNLocalMaxima; // local maximas found
f11b3071 101 AliTPCCalPad * fMaxCharge; // max charge
102 AliTPCCalPad * fMeanCharge; // mean charge
103 AliTPCCalPad * fNoThreshold; // number of digits
266f8637 104 AliTPCCalPad * fNTimeBins; // timebins width of cluster
105 AliTPCCalPad * fNPads; // pads with of cluster
106 AliTPCCalPad * fTimePosition; // Time position of local maximum
107 AliTPCCalPad * fOverThreshold10; //! local maxima with qMax over threshold
108 AliTPCCalPad * fOverThreshold20; //! local maxima with qMax over threshold
109 AliTPCCalPad * fOverThreshold30; //! local maxima with qMax over threshold
f11b3071 110
111 Int_t fEventCounter; // event Counter
266f8637 112 Bool_t fIsAnalysed; // Set to true after Analyse has been called
c322f08a 113 //
114 // Expand buffer
115 //
116 Float_t** fAllBins; //! array for digit using random access
117 Int_t** fAllSigBins; //! array of pointers to the indexes over threshold
118 Int_t* fAllNSigBins; //!
266f8637 119 Int_t fRowsMax; //! Maximum number of time bins
120 Int_t fPadsMax; //! Maximum number of time bins
121 Int_t fTimeBinsMax; //! Maximum number of time bins
c322f08a 122
0ffacf98 123
124public:
9a090ccd 125 ClassDef(AliTPCdataQA, 3) // Implementation of the TPC pedestal and noise calibration
0ffacf98 126};
127
128
129
130#endif
131