]>
Commit | Line | Data |
---|---|---|
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 | ||
8 | #include <TH1F.h> | |
9 | class TProfile; | |
10 | #include "AliRecoParam.h" | |
11 | ||
12 | class TArrayF; | |
13 | class TH2F; | |
14 | class TTreeSRedirector; | |
15 | class AliTPCROC; | |
16 | class AliTPCCalROC; | |
17 | class AliTPCRawStream; | |
18 | class AliTPCRawStreamV3; | |
19 | class AliTPCRawStreamFast; | |
20 | class AliRawReader; | |
21 | class AliTPCAltroMapping; | |
22 | class AliTPCCalPad; | |
23 | class TMap; | |
24 | struct eventHeaderStruct; | |
25 | ||
26 | class AliTPCdataQA : public TH1F { | |
27 | ||
28 | public: | |
29 | AliTPCdataQA(); | |
30 | AliTPCdataQA(AliRecoParam::EventSpecie_t es); | |
31 | AliTPCdataQA(const AliTPCdataQA &ped); | |
32 | AliTPCdataQA(const TMap *config); | |
33 | virtual ~AliTPCdataQA(); | |
34 | ||
35 | AliTPCdataQA& operator = (const AliTPCdataQA &source); | |
36 | void DumpToFile(const Char_t *filename, const Char_t *dir="", Bool_t append=kFALSE); | |
37 | void MakeTree(const char *fname="QApad.root") const; | |
38 | ||
39 | // | |
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); | |
47 | ||
48 | void Analyse(); | |
49 | // | |
50 | // | |
51 | void SetPedestal(AliTPCCalPad *const pedestalCal){ fPedestal = pedestalCal;} | |
52 | void SetNoise(AliTPCCalPad *const noiseCal){ fNoise = noiseCal;} | |
53 | ||
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;} | |
64 | TProfile* GetHistQVsTimeSideA() const {return fHistQVsTimeSideA;} | |
65 | TProfile* GetHistQVsTimeSideC() const {return fHistQVsTimeSideC;} | |
66 | TProfile* GetHistQMaxVsTimeSideA() const {return fHistQMaxVsTimeSideA;} | |
67 | TProfile* GetHistQMaxVsTimeSideC() const {return fHistQMaxVsTimeSideC;} | |
68 | TH1F* GetHistOccupancyVsEventConst() const {return fHistOccupancyVsEvent;} | |
69 | TH1F* GetHistNclustersVsEventConst() const {return fHistNclustersVsEvent;} | |
70 | TH1F* GetHistOccupancyVsEvent(); | |
71 | TH1F* GetHistNclustersVsEvent(); | |
72 | ||
73 | // | |
74 | AliTPCAltroMapping **GetAltroMapping() const { return fMapping; }; | |
75 | void SetAltroMapping(AliTPCAltroMapping **mapp) { fMapping = mapp; }; | |
76 | // | |
77 | // | |
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; } | |
83 | Bool_t GetIsAnalysed() const { return fIsAnalysed; } | |
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 | ||
89 | void SetRangeTime(Int_t tMin, Int_t tMax){ fFirstTimeBin=tMin; fLastTimeBin=tMax;} // Set time bin range that is used for the pedestal calibration | |
90 | void SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; } // Set adc range for the pedestal calibration | |
91 | void SetMaxEvents (Int_t value) { fMaxEvents = value; } | |
92 | void SetEventsPerBin(Int_t value) { fEventsPerBin = value; } | |
93 | ||
94 | private: | |
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, | |
106 | Int_t& timeMin,Int_t& timeMax,Int_t& padMin,Int_t& padMax) const; | |
107 | void UpdateEventHistograms(); | |
108 | ||
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 | |
113 | ||
114 | AliTPCAltroMapping **fMapping; //! Altro Mapping object | |
115 | // | |
116 | // | |
117 | AliTPCCalPad * fPedestal; //! option to set pedestal cal object | |
118 | AliTPCCalPad * fNoise; //! option to set noise cal object | |
119 | AliTPCCalPad * fNLocalMaxima; // local maximas found | |
120 | AliTPCCalPad * fMaxCharge; // max charge | |
121 | AliTPCCalPad * fMeanCharge; // mean charge | |
122 | AliTPCCalPad * fNoThreshold; // number of digits | |
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 | |
129 | ||
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 | ||
135 | TH1F* fHistOccupancyVsEvent; // Occupancy vs event number (~time) | |
136 | TH1F* fHistNclustersVsEvent; // Nclusters vs event number (~time) | |
137 | ||
138 | Int_t fEventCounter; // event Counter | |
139 | Bool_t fIsAnalysed; // Set to true after Analyse has been called | |
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 | |
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; //! | |
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 | |
154 | ||
155 | ClassDef(AliTPCdataQA, 5) // Implementation of the TPC Raw QA | |
156 | }; | |
157 | ||
158 | ||
159 | ||
160 | #endif | |
161 |