]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - TRD/AliTRDqaBlackEvents.h
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / TRD / AliTRDqaBlackEvents.h
... / ...
CommitLineData
1#ifndef ALITRDQABLACKEVENTS_H
2#define ALITRDQABLACKEVENTS_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id: AliTRDqaBlackEvents.h 23387 2008-01-17 17:25:16Z cblume $ */
7
8////////////////////////////////////////////////////////////////////////////
9// //
10// QA of black events //
11// //
12// Author: //
13// Sylwester Radomski (radomski@physi.uni-heidelberg.de) //
14// //
15////////////////////////////////////////////////////////////////////////////
16
17#include "TObject.h"
18
19class TH1D;
20class TH2D;
21class TH2S;
22class TH3F;
23class TGraph;
24class TObjArray;
25class AliTRDrawStreamOld;
26class AliRawReader;
27
28class AliTRDqaBlackEvents : public TObject {
29
30 public:
31
32 AliTRDqaBlackEvents();
33 AliTRDqaBlackEvents(const AliTRDqaBlackEvents &qa);
34 ~AliTRDqaBlackEvents() {}
35 AliTRDqaBlackEvents& operator = (const AliTRDqaBlackEvents& /*qa*/) { return *this; };
36
37 void Init();
38 void Reset();
39 //Int_t AddEvent(AliTRDrawStream *data, AliRawReader *reader);
40
41 void StartEvent();
42 void AddBuffer(AliTRDrawStreamOld *data, AliRawReader * const reader);
43 void FinishEvent();
44
45 void Process(const char* filename);
46
47 //TH2D *GetChamberPedestal(Int_t sm, Int_t layer, Int_t stack) {return 0;}
48 TH2D *GetChamberPedestal(Int_t det) const {return fChPed[det];}
49
50 //TH2D *GetChamberNoise(Int_t sm, Int_t layer, Int_t stack) {return 0;}
51 TH2D *GetChamberNoise(Int_t det) const {return fChNoise[det];}
52
53 void SetNoiseLevel(Double_t min, Double_t max) {fMinNoise = min; fMaxNoise = max;}
54 void SetFitMethod(Int_t fit) {fFitType = fit;}
55
56 void SetRefFile(const char *filename);
57
58 void DrawChamber(const char *filename, Int_t det, Int_t w=700, Int_t h=400);
59 //void ScanChamber(const char *filename, Int_t first, Int_t last);
60 void DrawSm(const char *filename, Int_t sm, Int_t w=900, Int_t h=700);
61
62 void SetFullView(Int_t v, Int_t thresh, Int_t count) {
63 fCreateFull = v;
64 fThresh = thresh;
65 fCount = count;
66 }
67
68 private:
69
70 Int_t fnEvents; // number of events processed
71 Int_t fCreateFull; // flag if to create a full view
72 Int_t fThresh; // threshold to analyze MCM data
73 Int_t fCount; // minimum number of entries above threshold
74
75 Int_t fRefEv; // reference event number
76
77 //Char_t fRefFileName[256]; // name of the file with reference distributions
78 const Char_t *fRefFileName; // name of the file with reference distributions
79
80 // geometry constants
81 enum {
82 kDET = 540,
83 kROB = 8,
84 kMCM = 16,
85 kADC = 21,
86 kTB = 30,
87 kROW = 16,
88 kPAD = 144,
89 kSM = 18,
90 kCH = 50
91 };
92
93 // histograms per detector
94
95 TH1D *fOccupancy; // how many times is a pad present in data
96 TH2D *fDetRob; // detector -- read out board
97
98 // histograms per chamber
99
100 TH1D *fPed[kDET]; // reconstructed pedestals distribution (on hist per chamber)
101 TH1D *fNoise[kDET]; // reconstructed noise distribution (on hist per chamber)
102 TH1D *fChPP[kDET]; // peak to peak for each chamber
103 TH1D *fNPointDist[kDET]; // distributin of the number of points
104 TH2D *fChPed[kDET]; // Some histograms
105 TH2D *fChNoise[kDET]; // Some histograms
106 TH2D *fNPoint[kDET]; // number of data points
107 TH3F *fData[kDET]; // Some histograms
108 TH1D *fSignal[kDET]; // Some histograms
109 TH2D *fnEntriesRM[kDET]; // number of entries for ROB - MCM
110 TH1D *fnEntriesRMDist[kDET]; // distribtion of number of entries per ROB-MCM
111
112 // direct access to data
113 Float_t fDataDirect[kDET][kROW][kPAD][kCH]; // data array
114 Double_t fSignalDirect[kDET][kCH]; // signal array
115
116 // after reference subtraction
117 TH2D *fChPedRes[kDET]; // histograms after reference subtraction
118 TH2D *fChNoiseRes[kDET]; // histograms after reference subtraction
119
120 TH2D *fTBEvent; // coherent noise
121
122 TH2D *fRefHistPed; // reference distributions
123 TH2D *fRefHistNoise; // reference distributions
124
125 TH2S *fFullSignal[kDET*kROB*kMCM]; // one histogram per MCM
126 Short_t fFullCounter[kDET*kROB*kMCM]; // counts a number of entries with high signal
127
128 // error codes
129 TH1D *fErrorHC; // number of errors HC
130 TH1D *fErrorMCM; // number of errors MCM
131 TH1D *fErrorADC; // number of errors ADC
132
133 TH1D *fErrorSMHC; // number of errors in HC per SM
134 TH1D *fErrorSMMCM; // number of errors in MCM per SM
135 TH1D *fErrorSMADC; // number of errors in ADC per SM
136
137 TH2D *fErrorLocHC[kDET]; // location of errors
138 TH2D *fErrorLocMCM[kDET]; // location
139 TH2D *fErrorLocADC[kDET]; // errors in ADC
140
141 // error fraction
142 TGraph *fErrorGraphHC; // HC errors
143 TGraph *fErrorGraphMCM; // MCM errors
144 TGraph *fErrorGraphADC; // ADC errors
145
146 TGraph *fGraphMCM; // number of strange MCMs detected
147 TGraph *fGraphPP[3]; // number of strange points
148
149
150 // mcm tracklets
151 TObjArray *fMcmTracks; // MCM tracklets
152
153 // problematic MCMs
154 TH2D *fMapMCM; // map of problematic MCMs
155 TH1D *fFracMCM; // fraction of problematicc MCMs
156
157 // full detector view
158 TH2D *fSMHCped; // full detector view of pedestals
159 TH2D *fSMHCerr; // full detector view of errors
160 TH2D *fSMLink[3]; // full detector view
161 TGraph *fGrLink[3]; // full detector view
162
163 //TH1D *fZSsize;
164
165
166 // number of fired ADC channels in total and per SM
167 TGraph *fNumberADC[kSM+1];
168
169 //Int_t fChkDe
170
171 TH1D *fNoiseTotal; // total noise
172 TH1D *fPP; // points
173
174 TH1D *fSmNoiseRms[kSM]; // noise RMS
175 TH1D *fSmNoiseFit[kSM]; // noise fit
176 TH1D *fSmPP[kSM]; // points
177
178
179 TH1D *fEvNoDist[1000]; // event numbers
180
181 //
182 Double_t fMinNoise; // Minimum noise
183 Double_t fMaxNoise; // Maximum noise
184 Int_t fFitType; // fit type
185
186 // variables keeping info in one event
187 Int_t fnErrorHC[2]; // 0 good, 1 error
188 Int_t fnErrorMCM[2]; // 0 good, 1 error
189 Int_t fnErrorADC[2]; // 0 good, 1 error
190
191 Int_t fppThresh[3]; // thresholds for storing pp
192 Int_t fnPP[3]; // number of entries above the thershold
193 Int_t fnLink[3]; // links present, beaf-beaf, good
194 Int_t fnADCinSM[kSM+1]; // number of ADC channels in a SuperModule
195 //
196
197
198
199 // private function
200 void ReadRefHists(Int_t det);
201 Int_t CheckMCM(Int_t index) const;
202
203 Int_t FillBits(TH1D *hist, Int_t code, Int_t offset);
204
205
206 ClassDef(AliTRDqaBlackEvents,1) // QA for black events
207
208};
209#endif