]>
Commit | Line | Data |
---|---|---|
0f772b9f | 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 | ||
19 | class TH1D; | |
20 | class TH2D; | |
27fe785b | 21 | class TH2S; |
22 | class TH3F; | |
e508dc19 | 23 | class TGraph; |
24 | class TObjArray; | |
0f772b9f | 25 | class AliTRDrawStreamTB; |
26 | ||
27 | class AliTRDqaBlackEvents : public TObject { | |
28 | ||
29 | public: | |
30 | ||
31 | AliTRDqaBlackEvents(); | |
32 | AliTRDqaBlackEvents(const AliTRDqaBlackEvents &qa); | |
33 | ~AliTRDqaBlackEvents() {} | |
34 | AliTRDqaBlackEvents& operator = (const AliTRDqaBlackEvents& /*qa*/) { return *this; }; | |
35 | ||
36 | void Init(); | |
37 | void Reset(); | |
38 | Int_t AddEvent(AliTRDrawStreamTB *data); | |
39 | void Process(const char* filename); | |
40 | ||
41 | //TH2D *GetChamberPedestal(Int_t sm, Int_t layer, Int_t stack) {return 0;} | |
42 | TH2D *GetChamberPedestal(Int_t det) {return fChPed[det];} | |
43 | ||
44 | //TH2D *GetChamberNoise(Int_t sm, Int_t layer, Int_t stack) {return 0;} | |
45 | TH2D *GetChamberNoise(Int_t det) {return fChNoise[det];} | |
46 | ||
47 | void SetNoiseLevel(Double_t min, Double_t max) {fMinNoise = min; fMaxNoise = max;} | |
9b99c029 | 48 | void SetFitMethod(Int_t fit) {fFitType = fit;} |
0f772b9f | 49 | |
e508dc19 | 50 | void SetRefFile(const char *filename); |
51 | ||
0f772b9f | 52 | void DrawChamber(const char *filename, Int_t det, Int_t w=700, Int_t h=400); |
53 | //void ScanChamber(const char *filename, Int_t first, Int_t last); | |
54 | void DrawSm(const char *filename, Int_t sm, Int_t w=900, Int_t h=700); | |
55 | ||
27fe785b | 56 | void SetFullView(Int_t v, Int_t thresh, Int_t count) { |
57 | fCreateFull = v; | |
58 | fThresh = thresh; | |
59 | fCount = count; | |
60 | } | |
61 | ||
0f772b9f | 62 | private: |
9b99c029 | 63 | |
c29b11ff | 64 | Int_t fnEvents; // number of events processed |
27fe785b | 65 | Int_t fCreateFull; // flag if to create a full view |
66 | Int_t fThresh; // threshold to analyze MCM data | |
67 | Int_t fCount; // minimum number of entries above threshold | |
68 | ||
e508dc19 | 69 | Char_t fRefFileName[256]; // name of the file with reference distributions |
70 | ||
71 | ||
27fe785b | 72 | // geometry constants |
73 | enum { | |
74 | kDET = 540, | |
75 | kROB = 8, | |
76 | kMCM = 16, | |
77 | kADC = 21, | |
78 | kTB = 30, | |
79 | kCOL = 16, | |
e508dc19 | 80 | kPAD = 144, |
81 | kSM = 18 | |
27fe785b | 82 | }; |
83 | ||
84 | // histograms per detector | |
f5fd37e8 | 85 | |
9b99c029 | 86 | TH1D *fOccupancy; // how many times is a pad present in data |
27fe785b | 87 | TH2D *fDetRob; // detector -- read out board |
88 | ||
89 | // histograms per chamber | |
90 | ||
91 | TH1D *fPed[kDET]; // reconstructed pedestals distribution (on hist per chamber) | |
92 | TH1D *fNoise[kDET]; // reconstructed noise distribution (on hist per chamber) | |
e508dc19 | 93 | TH1D *fChPP[kDET]; // peak to peak for each chamber |
27fe785b | 94 | TH1D *fNPointDist[kDET]; // distributin of the number of points |
95 | TH2D *fChPed[kDET]; // Some histograms | |
96 | TH2D *fChNoise[kDET]; // Some histograms | |
97 | TH2D *fNPoint[kDET]; // number of data points | |
98 | TH3F *fData[kDET]; // Some histograms | |
99 | TH1D *fSignal[kDET]; // Some histograms | |
100 | TH2D *fnEntriesRM[kDET]; // number of entries for ROB - MCM | |
101 | TH1D *fnEntriesRMDist[kDET]; // distribtion of number of entries per ROB-MCM | |
102 | ||
e508dc19 | 103 | // after reference subtraction |
104 | TH2D *fChPedRes[kDET]; // histograms after reference subtraction | |
105 | TH2D *fChNoiseRes[kDET]; // histograms after reference subtraction | |
106 | ||
107 | TH2D *fTBEvent; // coherent noise | |
108 | ||
109 | TH2D *fRefHistPed; // reference distributions | |
110 | TH2D *fRefHistNoise; // reference distributions | |
111 | ||
27fe785b | 112 | TH2S *fFullSignal[kDET*kROB*kMCM]; // one histogram per MCM |
113 | Short_t fFullCounter[kDET*kROB*kMCM]; // counts a number of entries with high signal | |
114 | ||
e508dc19 | 115 | // error codes |
116 | TH1D *fErrorHC; // number of errors HC | |
117 | TH1D *fErrorMCM; // number of errors MCM | |
118 | TH1D *fErrorADC; // number of errors ADC | |
119 | ||
120 | TH1D *fErrorSMHC; // number of errors in HC per SM | |
121 | TH1D *fErrorSMMCM; // number of errors in MCM per SM | |
122 | TH1D *fErrorSMADC; // number of errors in ADC per SM | |
0f772b9f | 123 | |
e508dc19 | 124 | TH2D *fErrorLocHC[kDET]; // location of errors |
125 | TH2D *fErrorLocMCM[kDET]; // location | |
126 | TH2D *fErrorLocADC[kDET]; // errors in ADC | |
c29b11ff | 127 | |
e508dc19 | 128 | // error fraction |
129 | TGraph *fErrorGraphHC; | |
130 | TGraph *fErrorGraphMCM; | |
131 | TGraph *fErrorGraphADC; | |
132 | ||
133 | TGraph *fGraphMCM; // number of strange MCMs detected | |
0f772b9f | 134 | |
e508dc19 | 135 | // mcm trackles |
136 | TObjArray *fMcmTracks; | |
137 | ||
138 | // problematic MCMs | |
139 | TH2D *fMapMCM; | |
140 | TH1D *fFracMCM; | |
141 | ||
142 | // full detector view | |
143 | TH2D *fSMHCped; | |
144 | TH2D *fSMHCerr; | |
145 | ||
146 | // number of fired ADC channels in total and per SM | |
147 | TGraph *fNumberADC[kSM+1]; | |
148 | ||
149 | //Int_t fChkDe | |
150 | ||
151 | TH1D *fNoiseTotal; | |
152 | TH1D *fPP; | |
153 | ||
154 | TH1D *fSmNoiseRms[kSM]; | |
155 | TH1D *fSmNoiseFit[kSM]; | |
156 | TH1D *fSmPP[kSM]; | |
157 | ||
158 | // | |
0f772b9f | 159 | Double_t fMinNoise; // Minimum noise |
160 | Double_t fMaxNoise; // Maximum noise | |
e508dc19 | 161 | Int_t fFitType; |
162 | ||
163 | // private function | |
164 | void ReadRefHists(Int_t det); | |
165 | Int_t CheckMCM(Int_t index); | |
166 | ||
0f772b9f | 167 | |
168 | ClassDef(AliTRDqaBlackEvents,0) // QA for black events | |
169 | ||
170 | }; | |
171 | #endif |