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 */
6 /* $Id: AliTRDqaBlackEvents.h 23387 2008-01-17 17:25:16Z cblume $ */
8 ////////////////////////////////////////////////////////////////////////////
10 // QA of black events //
13 // Sylwester Radomski (radomski@physi.uni-heidelberg.de) //
15 ////////////////////////////////////////////////////////////////////////////
25 class AliTRDrawStreamOld;
28 class AliTRDqaBlackEvents : public TObject {
32 AliTRDqaBlackEvents();
33 AliTRDqaBlackEvents(const AliTRDqaBlackEvents &qa);
34 ~AliTRDqaBlackEvents() {}
35 AliTRDqaBlackEvents& operator = (const AliTRDqaBlackEvents& /*qa*/) { return *this; };
39 //Int_t AddEvent(AliTRDrawStream *data, AliRawReader *reader);
42 void AddBuffer(AliTRDrawStreamOld *data, AliRawReader * const reader);
45 void Process(const char* filename);
47 //TH2D *GetChamberPedestal(Int_t sm, Int_t layer, Int_t stack) {return 0;}
48 TH2D *GetChamberPedestal(Int_t det) const {return fChPed[det];}
50 //TH2D *GetChamberNoise(Int_t sm, Int_t layer, Int_t stack) {return 0;}
51 TH2D *GetChamberNoise(Int_t det) const {return fChNoise[det];}
53 void SetNoiseLevel(Double_t min, Double_t max) {fMinNoise = min; fMaxNoise = max;}
54 void SetFitMethod(Int_t fit) {fFitType = fit;}
56 void SetRefFile(const char *filename);
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);
62 void SetFullView(Int_t v, Int_t thresh, Int_t count) {
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
75 Int_t fRefEv; // reference event number
77 //Char_t fRefFileName[256]; // name of the file with reference distributions
78 const Char_t *fRefFileName; // name of the file with reference distributions
93 // histograms per detector
95 TH1D *fOccupancy; // how many times is a pad present in data
96 TH2D *fDetRob; // detector -- read out board
98 // histograms per chamber
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
112 // direct access to data
113 Float_t fDataDirect[kDET][kROW][kPAD][kCH]; // data array
114 Double_t fSignalDirect[kDET][kCH]; // signal array
116 // after reference subtraction
117 TH2D *fChPedRes[kDET]; // histograms after reference subtraction
118 TH2D *fChNoiseRes[kDET]; // histograms after reference subtraction
120 TH2D *fTBEvent; // coherent noise
122 TH2D *fRefHistPed; // reference distributions
123 TH2D *fRefHistNoise; // reference distributions
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
129 TH1D *fErrorHC; // number of errors HC
130 TH1D *fErrorMCM; // number of errors MCM
131 TH1D *fErrorADC; // number of errors ADC
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
137 TH2D *fErrorLocHC[kDET]; // location of errors
138 TH2D *fErrorLocMCM[kDET]; // location
139 TH2D *fErrorLocADC[kDET]; // errors in ADC
142 TGraph *fErrorGraphHC; // HC errors
143 TGraph *fErrorGraphMCM; // MCM errors
144 TGraph *fErrorGraphADC; // ADC errors
146 TGraph *fGraphMCM; // number of strange MCMs detected
147 TGraph *fGraphPP[3]; // number of strange points
151 TObjArray *fMcmTracks; // MCM tracklets
154 TH2D *fMapMCM; // map of problematic MCMs
155 TH1D *fFracMCM; // fraction of problematicc MCMs
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
166 // number of fired ADC channels in total and per SM
167 TGraph *fNumberADC[kSM+1];
171 TH1D *fNoiseTotal; // total noise
174 TH1D *fSmNoiseRms[kSM]; // noise RMS
175 TH1D *fSmNoiseFit[kSM]; // noise fit
176 TH1D *fSmPP[kSM]; // points
179 TH1D *fEvNoDist[1000]; // event numbers
182 Double_t fMinNoise; // Minimum noise
183 Double_t fMaxNoise; // Maximum noise
184 Int_t fFitType; // fit type
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
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
200 void ReadRefHists(Int_t det);
201 Int_t CheckMCM(Int_t index) const;
203 Int_t FillBits(TH1D *hist, Int_t code, Int_t offset);
206 ClassDef(AliTRDqaBlackEvents,1) // QA for black events